: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
(0,k.__)("Please wait while %1$s connects to %2$s to get related keyphrases...","wordpress-seo"),"Yoast SEO","Semrush")," ",(0,e.createElement)(g.SvgIcon,{icon:"loading-spinner"})),Pr=(0,M.makeOutboundLink)(),Fr=()=>(0,e.createElement)(n.Fragment,null,(0,e.createElement)("p",null,(0,k.sprintf)(/* translators: %s : Expands to "Semrush". */
(0,k.__)("You've reached your request limit for today. Check back tomorrow or upgrade your plan over at %s.","wordpress-seo"),"Semrush")),(0,e.createElement)(Pr,{href:window.wpseoAdminL10n["shortlinks.semrush.prices"],className:"yoast-button-upsell"},(0,k.sprintf)(/* translators: %s : Expands to "Semrush". */
(0,k.__)("Upgrade your %s plan","wordpress-seo"),"Semrush"),(0,e.createElement)("span",{"aria-hidden":"true",className:"yoast-button-upsell__caret"}))),Mr="yoast-semrush-country-selector",qr=[{value:"us",name:"United States - US"},{value:"uk",name:"United Kingdom - UK"},{value:"ca",name:"Canada - CA"},{value:"ru",name:"Russia - RU"},{value:"de",name:"Germany - DE"},{value:"fr",name:"France - FR"},{value:"es",name:"Spain - ES"},{value:"it",name:"Italy - IT"},{value:"br",name:"Brazil - BR"},{value:"au",name:"Australia - AU"},{value:"ar",name:"Argentina - AR"},{value:"be",name:"Belgium - BE"},{value:"ch",name:"Switzerland - CH"},{value:"dk",name:"Denmark - DK"},{value:"fi",name:"Finland - FI"},{value:"hk",name:"Hong Kong - HK"},{value:"ie",name:"Ireland - IE"},{value:"il",name:"Israel - IL"},{value:"mx",name:"Mexico - MX"},{value:"nl",name:"Netherlands - NL"},{value:"no",name:"Norway - NO"},{value:"pl",name:"Poland - PL"},{value:"se",name:"Sweden - SE"},{value:"sg",name:"Singapore - SG"},{value:"tr",name:"Turkey - TR"},{value:"jp",name:"Japan - JP"},{value:"in",name:"India - IN"},{value:"hu",name:"Hungary - HU"},{value:"af",name:"Afghanistan - AF"},{value:"al",name:"Albania - AL"},{value:"dz",name:"Algeria - DZ"},{value:"ao",name:"Angola - AO"},{value:"am",name:"Armenia - AM"},{value:"at",name:"Austria - AT"},{value:"az",name:"Azerbaijan - AZ"},{value:"bh",name:"Bahrain - BH"},{value:"bd",name:"Bangladesh - BD"},{value:"by",name:"Belarus - BY"},{value:"bz",name:"Belize - BZ"},{value:"bo",name:"Bolivia - BO"},{value:"ba",name:"Bosnia and Herzegovina - BA"},{value:"bw",name:"Botswana - BW"},{value:"bn",name:"Brunei - BN"},{value:"bg",name:"Bulgaria - BG"},{value:"cv",name:"Cabo Verde - CV"},{value:"kh",name:"Cambodia - KH"},{value:"cm",name:"Cameroon - CM"},{value:"cl",name:"Chile - CL"},{value:"co",name:"Colombia - CO"},{value:"cr",name:"Costa Rica - CR"},{value:"hr",name:"Croatia - HR"},{value:"cy",name:"Cyprus - CY"},{value:"cz",name:"Czech Republic - CZ"},{value:"cd",name:"Congo - CD"},{value:"do",name:"Dominican Republic - DO"},{value:"ec",name:"Ecuador - EC"},{value:"eg",name:"Egypt - EG"},{value:"sv",name:"El Salvador - SV"},{value:"ee",name:"Estonia - EE"},{value:"et",name:"Ethiopia - ET"},{value:"ge",name:"Georgia - GE"},{value:"gh",name:"Ghana - GH"},{value:"gr",name:"Greece - GR"},{value:"gt",name:"Guatemala - GT"},{value:"gy",name:"Guyana - GY"},{value:"ht",name:"Haiti - HT"},{value:"hn",name:"Honduras - HN"},{value:"is",name:"Iceland - IS"},{value:"id",name:"Indonesia - ID"},{value:"jm",name:"Jamaica - JM"},{value:"jo",name:"Jordan - JO"},{value:"kz",name:"Kazakhstan - KZ"},{value:"kw",name:"Kuwait - KW"},{value:"lv",name:"Latvia - LV"},{value:"lb",name:"Lebanon - LB"},{value:"lt",name:"Lithuania - LT"},{value:"lu",name:"Luxembourg - LU"},{value:"mg",name:"Madagascar - MG"},{value:"my",name:"Malaysia - MY"},{value:"mt",name:"Malta - MT"},{value:"mu",name:"Mauritius - MU"},{value:"md",name:"Moldova - MD"},{value:"mn",name:"Mongolia - MN"},{value:"me",name:"Montenegro - ME"},{value:"ma",name:"Morocco - MA"},{value:"mz",name:"Mozambique - MZ"},{value:"na",name:"Namibia - NA"},{value:"np",name:"Nepal - NP"},{value:"nz",name:"New Zealand - NZ"},{value:"ni",name:"Nicaragua - NI"},{value:"ng",name:"Nigeria - NG"},{value:"om",name:"Oman - OM"},{value:"py",name:"Paraguay - PY"},{value:"pe",name:"Peru - PE"},{value:"ph",name:"Philippines - PH"},{value:"pt",name:"Portugal - PT"},{value:"ro",name:"Romania - RO"},{value:"sa",name:"Saudi Arabia - SA"},{value:"sn",name:"Senegal - SN"},{value:"rs",name:"Serbia - RS"},{value:"sk",name:"Slovakia - SK"},{value:"si",name:"Slovenia - SI"},{value:"za",name:"South Africa - ZA"},{value:"kr",name:"South Korea - KR"},{value:"lk",name:"Sri Lanka - LK"},{value:"th",name:"Thailand - TH"},{value:"bs",name:"Bahamas - BS"},{value:"tt",name:"Trinidad and Tobago - TT"},{value:"tn",name:"Tunisia - TN"},{value:"ua",name:"Ukraine - UA"},{value:"ae",name:"United Arab Emirates - AE"},{value:"uy",name:"Uruguay - UY"},{value:"ve",name:"Venezuela - VE"},{value:"vn",name:"Vietnam - VN"},{value:"zm",name:"Zambia - ZM"},{value:"zw",name:"Zimbabwe - ZW"},{value:"ly",name:"Libya - LY"}];class Dr extends n.Component{constructor(e){super(e),this.relatedKeyphrasesRequest=this.relatedKeyphrasesRequest.bind(this),this.onChangeHandler=this.onChangeHandler.bind(this)}componentDidMount(){this.props.response&&this.props.keyphrase===this.props.lastRequestKeyphrase||this.relatedKeyphrasesRequest()}storeCountryCode(e){ee()({path:"yoast/v1/semrush/country_code",method:"POST",data:{country_code:e}})}async relatedKeyphrasesRequest(){const{keyphrase:e,countryCode:t,newRequest:s}=this.props;s(t,e),this.storeCountryCode(t);const n=await this.doRequest(e,t);200!==n.status?this.handleFailedResponse(n):this.handleSuccessResponse(n)}handleSuccessResponse(e){const{setNoResultsFound:t,setRequestSucceeded:s}=this.props;0!==e.results.rows.length?s(e):t()}handleFailedResponse(e){const{setRequestLimitReached:t,setRequestFailed:s}=this.props;"error"in e&&(e.error.includes("TOTAL LIMIT EXCEEDED")?t():s(e))}async doRequest(e,t){return await ee()({path:(0,Es.addQueryArgs)("/yoast/v1/semrush/related_keyphrases",{keyphrase:e,country_code:t})})}onChangeHandler(e){this.props.setCountry(e)}render(){return(0,e.createElement)("div",{id:Mr},(0,e.createElement)(g.SingleSelect,{id:Mr+"-select",label:(0,k.__)("Show results for:","wordpress-seo"),name:"semrush-country-code",options:qr,selected:this.props.countryCode,onChange:this.onChangeHandler,wrapperClassName:"yoast-field-group yoast-field-group--inline"}),(0,e.createElement)(g.NewButton,{id:Mr+"-button",variant:"secondary",onClick:this.relatedKeyphrasesRequest},(0,k.__)("Select country","wordpress-seo")))}}Dr.propTypes={keyphrase:o().string,countryCode:o().string,response:o().object,lastRequestKeyphrase:o().string,setCountry:o().func.isRequired,newRequest:o().func.isRequired,setNoResultsFound:o().func.isRequired,setRequestSucceeded:o().func.isRequired,setRequestLimitReached:o().func.isRequired,setRequestFailed:o().func.isRequired},Dr.defaultProps={keyphrase:"",countryCode:"us",response:{},lastRequestKeyphrase:""};const Or=Dr,Nr=(0,M.makeOutboundLink)(c().a`
color: ${y.colors.$color_help_text};
color: ${y.colors.$color_snippet_focus};
// Overwrite the default blue active color for links.
color: ${y.colors.$color_help_text};
`),$r=(0,M.makeOutboundLink)();class Br extends n.Component{constructor(e){super(e),this.transformTrendDataToChartPoints=this.transformTrendDataToChartPoints.bind(this),this.getAreaChartDataTableHeaderLabels=this.getAreaChartDataTableHeaderLabels.bind(this),this.mapAreaChartDataToTableData=this.mapAreaChartDataToTableData.bind(this)}transformTrendDataToChartPoints(e){return e.split(",").map(((e,t)=>({x:t,y:parseFloat(e)})))}getAreaChartDataTableHeaderLabels(){return[(0,k.__)("Twelve months ago","wordpress-seo"),(0,k.__)("Eleven months ago","wordpress-seo"),(0,k.__)("Ten months ago","wordpress-seo"),(0,k.__)("Nine months ago","wordpress-seo"),(0,k.__)("Eight months ago","wordpress-seo"),(0,k.__)("Seven months ago","wordpress-seo"),(0,k.__)("Six months ago","wordpress-seo"),(0,k.__)("Five months ago","wordpress-seo"),(0,k.__)("Four months ago","wordpress-seo"),(0,k.__)("Three months ago","wordpress-seo"),(0,k.__)("Two months ago","wordpress-seo"),(0,k.__)("Last month","wordpress-seo")]}mapAreaChartDataToTableData(e){return Math.round(100*e)}render(){const{keyphrase:t,relatedKeyphrases:s,countryCode:r,data:a,renderAction:o}=this.props,l="https://www.semrush.com/analytics/keywordoverview/?q="+encodeURIComponent(t)+"&db="+encodeURIComponent(r);return a&&!(0,i.isEmpty)(a.results)&&(0,e.createElement)(n.Fragment,null,(0,e.createElement)("table",{className:"yoast yoast-table"},(0,e.createElement)("thead",null,(0,e.createElement)("tr",null,(0,e.createElement)("th",{scope:"col",className:"yoast-table--primary"},(0,k.__)("Related keyphrase","wordpress-seo")),(0,e.createElement)("th",{scope:"col",abbr:(0,k.__)("Volume","wordpress-seo")},(0,k.__)("Volume","wordpress-seo"),(0,e.createElement)(Nr,{href:window.wpseoAdminL10n["shortlinks.semrush.volume_help"],className:"dashicons"},(0,e.createElement)("span",{className:"screen-reader-text"},/* translators: Hidden accessibility text. */
(0,k.__)("Learn more about the related keyphrases volume","wordpress-seo")))),(0,e.createElement)("th",{scope:"col",abbr:(0,k.__)("Trend","wordpress-seo")},(0,k.__)("Trend","wordpress-seo"),(0,e.createElement)(Nr,{href:window.wpseoAdminL10n["shortlinks.semrush.trend_help"],className:"dashicons"},(0,e.createElement)("span",{className:"screen-reader-text"},/* translators: Hidden accessibility text. */
(0,k.__)("Learn more about the related keyphrases trend","wordpress-seo")))),o&&(0,e.createElement)("td",{className:"yoast-table--nobreak"}))),(0,e.createElement)("tbody",null,a.results.rows.map(((t,n)=>{const r=t[0],a=this.transformTrendDataToChartPoints(t[2]),i=this.getAreaChartDataTableHeaderLabels();return(0,e.createElement)("tr",{key:n},(0,e.createElement)("td",null,r),(0,e.createElement)("td",null,t[1]),(0,e.createElement)("td",{className:"yoast-table--nopadding"},(0,e.createElement)(Ee,{width:66,height:24,data:a,strokeWidth:1.8,strokeColor:"#498afc",fillColor:"#ade3fc",className:"yoast-related-keyphrases-modal__chart",mapChartDataToTableData:this.mapAreaChartDataToTableData,dataTableCaption:(0,k.__)("Keyphrase volume in the last 12 months on a scale from 0 to 100.","wordpress-seo"),dataTableHeaderLabels:i})),o&&(0,e.createElement)("td",{className:"yoast-table--nobreak"},o(r,s)))})))),(0,e.createElement)("p",{style:{marginBottom:0}},(0,e.createElement)($r,{href:l},(0,k.sprintf)(/* translators: %s expands to Semrush */
(0,k.__)("Get more insights at %s","wordpress-seo"),"Semrush"))))}}Br.propTypes={data:o().object,keyphrase:o().string,relatedKeyphrases:o().array,countryCode:o().string,renderAction:o().func},Br.defaultProps={data:{},keyphrase:"",relatedKeyphrases:[],countryCode:"us",renderAction:null};const Ur=Br,Wr=(0,M.makeOutboundLink)(),Kr=()=>(0,e.createElement)(g.Alert,{type:"info"},(0,k.sprintf)(/* translators: %s: Expands to "Yoast SEO". */
(0,k.__)("You’ll reach more people with multiple keyphrases! Want to quickly add these related keyphrases to the %s analyses for even better content optimization?","wordpress-seo"),"Yoast SEO")+" ",(0,e.createElement)(Wr,{href:window.wpseoAdminL10n["shortlinks.semrush.premium_landing_page"]},(0,k.sprintf)(/* translators: %s: Expands to "Yoast SEO Premium". */
(0,k.__)("Explore %s!","wordpress-seo"),"Yoast SEO Premium"))),Hr=()=>(0,e.createElement)(g.Alert,{type:"error"},(0,k.__)("We've encountered a problem trying to get related keyphrases. Please try again later.","wordpress-seo")),Yr=()=>(0,e.createElement)(g.Alert,{type:"warning"},(0,k.sprintf)(/* translators: %s: Expands to "Yoast SEO". */
(0,k.__)("You've reached the maximum amount of 4 related keyphrases. You can change or remove related keyphrases in the %s metabox or sidebar.","wordpress-seo"),"Yoast SEO"));function zr(t){const{response:s,lastRequestKeyphrase:r,keyphrase:a,newRequest:o,setCountry:l,renderAction:c,countryCode:d,requestLimitReached:u,setRequestFailed:p,setNoResultsFound:m,relatedKeyphrases:h,setRequestSucceeded:g,setRequestLimitReached:y}=t,f=Cs().isPremium;return(0,e.createElement)(n.Fragment,null,!u&&(0,e.createElement)(n.Fragment,null,!f&&(0,e.createElement)(Kr,null),f&&function(e){return e&&e.length>=4}(h)&&(0,e.createElement)(Yr,null),(0,e.createElement)(Or,{countryCode:d,setCountry:l,newRequest:o,keyphrase:a,setRequestFailed:p,setNoResultsFound:m,setRequestSucceeded:g,setRequestLimitReached:y,response:s,lastRequestKeyphrase:r})),function(t){const{isPending:s,requestLimitReached:n,isSuccess:r,response:a,requestHasData:o}=t;return s?(0,e.createElement)(Ar,null):n?(0,e.createElement)(Fr,null):!r&&function(e){return!(0,i.isEmpty)(e)&&"error"in e}(a)?(0,e.createElement)(Hr,null):o?void 0:(0,e.createElement)("p",null,(0,k.__)("Sorry, there's no data available for that keyphrase/country combination.","wordpress-seo"))}(t),(0,e.createElement)(Ur,{keyphrase:a,relatedKeyphrases:h,countryCode:d,renderAction:c,data:s}))}zr.propTypes={keyphrase:o().string,relatedKeyphrases:o().array,renderAction:o().func,requestLimitReached:o().bool,countryCode:o().string.isRequired,setCountry:o().func.isRequired,newRequest:o().func.isRequired,setRequestSucceeded:o().func.isRequired,setRequestLimitReached:o().func.isRequired,setRequestFailed:o().func.isRequired,setNoResultsFound:o().func.isRequired,response:o().object,lastRequestKeyphrase:o().string},zr.defaultProps={keyphrase:"",relatedKeyphrases:[],renderAction:null,requestLimitReached:!1,response:{},lastRequestKeyphrase:""};const jr=(0,C.compose)([(0,h.withSelect)((e=>{const{getFocusKeyphrase:t,getSEMrushSelectedCountry:s,getSEMrushRequestLimitReached:n,getSEMrushRequestResponse:r,getSEMrushRequestIsSuccess:a,getSEMrushIsRequestPending:o,getSEMrushRequestHasData:i,getSEMrushRequestKeyphrase:l}=e("yoast-seo/editor");return{keyphrase:t(),countryCode:s(),requestLimitReached:n(),response:r(),isSuccess:a(),isPending:o(),requestHasData:i(),lastRequestKeyphrase:l()}})),(0,h.withDispatch)((e=>{const{setSEMrushChangeCountry:t,setSEMrushNewRequest:s,setSEMrushRequestSucceeded:n,setSEMrushRequestFailed:r,setSEMrushSetRequestLimitReached:a,setSEMrushNoResultsFound:o}=e("yoast-seo/editor");return{setCountry:e=>{t(e)},newRequest:(e,t)=>{s(e,t)},setRequestSucceeded:e=>{n(e)},setRequestFailed:e=>{r(e)},setRequestLimitReached:()=>{a()},setNoResultsFound:()=>{o()}}}))])(zr),Vr=(0,k.__)("Check your text on even more SEO criteria and get an enhanced keyphrase analysis, making it easier to optimize your content.","wordpress-seo"),Gr=t=>{const{locationContext:s}=(0,d.useRootContext)(),n=(0,Es.addQueryArgs)(wpseoAdminL10n[t.buyLink],{context:s});return(0,e.createElement)(Ys,{title:(0,k.__)("Get more help with writing content that ranks","wordpress-seo"),description:t.description,benefitsTitle:/* translators: %s expands to 'Yoast SEO Premium'. */
(0,k.sprintf)("%s also gives you:","Yoast SEO Premium"),benefits:Ms(),upsellButtonText:(0,k.sprintf)(/* translators: %s expands to 'Yoast SEO Premium'. */
(0,k.__)("Unlock with %s","wordpress-seo"),"Yoast SEO Premium"),upsellButton:{href:n,className:"yoast-button-upsell",rel:null,"data-ctb-id":"f6a84663-465f-4cb5-8ba5-f7a6d72224b2","data-action":"load-nfd-ctb"},upsellButtonLabel:(0,k.__)("1 year of premium support and updates included!","wordpress-seo")})};Gr.propTypes={buyLink:o().string.isRequired,description:o().string},Gr.defaultProps={description:Vr};const Zr=Gr,Xr=({location:t})=>{const[s,r]=(0,n.useState)(!1),a=(0,n.useCallback)((()=>r(!1)),[]),o=(0,n.useCallback)((()=>r(!0)),[]),i=(0,m.useSvgAria)();return(0,e.createElement)(n.Fragment,null,s&&(0,e.createElement)($,{title:(0,k.__)("Unlock Premium SEO analysis","wordpress-seo"),onRequestClose:a,additionalClassName:"",className:`${O} yoast-gutenberg-modal__box yoast-gutenberg-modal__no-padding`,id:"yoast-premium-seo-analysis-modal",shouldCloseOnClickOutside:!0},(0,e.createElement)(D,null,(0,e.createElement)(Zr,{buyLink:`shortlinks.upsell.${t}.premium_seo_analysis_button`}))),"sidebar"===t&&(0,e.createElement)(Y,{id:"yoast-premium-seo-analysis-modal-open-button",title:(0,k.__)("Premium SEO analysis","wordpress-seo"),prefixIcon:{icon:"seo-score-none",color:y.colors.$color_grey},onClick:o},(0,e.createElement)("div",{className:"yst-root"},(0,e.createElement)(m.Badge,{size:"small",variant:"upsell"},(0,e.createElement)(Fs,{className:"yst-w-2.5 yst-h-2.5 yst-shrink-0",...i})))),"metabox"===t&&(0,e.createElement)("div",{className:"yst-root"},(0,e.createElement)(F,{id:"yoast-premium-seo-analysis-metabox-modal-open-button",onClick:o},(0,e.createElement)(g.SvgIcon,{icon:"seo-score-none",color:y.colors.$color_grey}),(0,e.createElement)(F.Text,null,(0,k.__)("Premium SEO analysis","wordpress-seo")),(0,e.createElement)(m.Badge,{size:"small",variant:"upsell"},(0,e.createElement)(Fs,{className:"yst-w-2.5 yst-h-2.5 yst-mr-1 yst-shrink-0",...i}),(0,e.createElement)("span",null,"Premium")))))};Xr.propTypes={location:o().string},Xr.defaultProps={location:"sidebar"};const Qr=Xr,Jr=t=>(0,e.createElement)(Ys,{title:(0,k.__)("Reach a wider audience","wordpress-seo"),description:(0,k.__)("Get help optimizing for up to 5 related keyphrases. This helps you reach a wider audience and get more traffic.","wordpress-seo"),benefitsTitle:/* translators: %s expands to 'Yoast SEO Premium'. */
(0,k.sprintf)("%s also gives you:","Yoast SEO Premium"),benefits:Ms(),upsellButtonText:(0,k.sprintf)(/* translators: %s expands to 'Yoast SEO Premium'. */
(0,k.__)("Unlock with %s","wordpress-seo"),"Yoast SEO Premium"),upsellButton:{href:t.buyLink,className:"yoast-button-upsell",rel:null,"data-ctb-id":"f6a84663-465f-4cb5-8ba5-f7a6d72224b2","data-action":"load-nfd-ctb"},upsellButtonLabel:(0,k.__)("1 year free support and updates included!","wordpress-seo")});Jr.propTypes={buyLink:o().string.isRequired};const ea=Jr,ta=()=>{const[t,,,s,r]=(0,m.useToggleState)(!1),a=(0,n.useContext)(d.LocationContext),{locationContext:o}=(0,d.useRootContext)(),i=(0,m.useSvgAria)(),l=wpseoAdminL10n["sidebar"===a.toLowerCase()?"shortlinks.upsell.sidebar.additional_button":"shortlinks.upsell.metabox.additional_button"];return(0,e.createElement)(e.Fragment,null,t&&(0,e.createElement)($,{title:(0,k.__)("Add related keyphrases","wordpress-seo"),onRequestClose:r,additionalClassName:"",id:"yoast-additional-keyphrases-modal",className:`${O} yoast-gutenberg-modal__box yoast-gutenberg-modal__no-padding`,shouldCloseOnClickOutside:!0},(0,e.createElement)(D,null,(0,e.createElement)(ea,{buyLink:(0,Es.addQueryArgs)(l,{context:o})}))),"sidebar"===a&&(0,e.createElement)(Y,{id:"yoast-additional-keyphrase-modal-open-button",title:(0,k.__)("Add related keyphrase","wordpress-seo"),prefixIcon:{icon:"plus",color:y.colors.$color_grey_medium_dark},onClick:s},(0,e.createElement)("div",{className:"yst-root"},(0,e.createElement)(m.Badge,{size:"small",variant:"upsell"},(0,e.createElement)(Fs,{className:"yst-w-2.5 yst-h-2.5 yst-shrink-0",...i})))),"metabox"===a&&(0,e.createElement)("div",{className:"yst-root"},(0,e.createElement)(F,{id:"yoast-additional-keyphrase-metabox-modal-open-button",onClick:s},(0,e.createElement)(g.SvgIcon,{icon:"plus",color:y.colors.$color_grey_medium_dark}),(0,e.createElement)(F.Text,null,(0,k.__)("Add related keyphrase","wordpress-seo")),(0,e.createElement)(m.Badge,{size:"small",variant:"upsell"},(0,e.createElement)(Fs,{className:"yst-w-2.5 yst-h-2.5 yst-mr-1 yst-shrink-0",...i}),(0,e.createElement)("span",null,"Premium")))))};var sa,na,ra,aa,oa,ia,la,ca,da,ua,pa,ma,ha,ga,ya,fa,ba,wa,Ea,va,ka,_a,Ta,xa,Sa,Ra,Ca,Ia,La,Aa,Pa,Fa,Ma,qa,Da,Oa,Na,$a,Ba,Ua,Wa,Ka,Ha,Ya,za,ja,Va;function Ga(){return Ga=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},Ga.apply(this,arguments)}const Za=t=>e.createElement("svg",Ga({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 448 360"},t),sa||(sa=e.createElement("circle",{cx:226,cy:211,r:149,fill:"#f0ecf0"})),na||(na=e.createElement("path",{fill:"#fbd2a6",d:"M173.53 189.38s-35.47-5.3-41.78-11c-9.39-24.93-29.61-48-35.47-66.21-.71-2.24 3.72-11.39 3.53-15.41s-5.34-11.64-5.23-14-.09-15.27-.09-15.27l-4.75-.72s-5.13 6.07-3.56 9.87c-1.73-4.19 4.3 7.93.5 9.35 0 0-6-5.94-11.76-8.27s-19.57-3.65-19.57-3.65L43.19 73l-4.42.6L31 69.7l-2.85 5.12 7.53 5.29L40.86 92l17.19 10.2 10.2 10.56 9.86 3.56s26.49 79.67 45 92c17 11.33 37.23 15.92 37.23 15.92z"})),ra||(ra=e.createElement("path",{fill:"#a4286a",d:"M270.52 345.13c2.76-14.59 15.94-35.73 30.24-54.58 16.22-21.39 14-79.66-33.19-91.46-17.3-4.32-52.25-1-59.85-3.41C186.54 189 170 187 168 190.17c-5 10.51-7.73 27.81-5.51 36.26 1.18 4.73 3.54 5.91 20.49 13.4-5.12 15-16.35 26.3-22.86 37s7.88 27.2 7.1 33.51c-.48 3.8-4.26 21.13-7.18 34.25a149.47 149.47 0 0 0 110.3 8.66 25.66 25.66 0 0 1 .18-8.12z"})),aa||(aa=e.createElement("path",{fill:"#9a5815",d:"M206.76 66.43c-5 14.4-1.42 25.67-3.93 40.74-10 60.34-24.08 43.92-31.44 93.6 7.24-14.19 14.32-15.82 20.63-23.11-.83 3.09-10.25 13.75-8.05 34.81 9.85-8.51 6.35-8.75 11.86-8.54.36 3.25 3.53 3.22-3.59 10.53 2.52.69 17.42-14.32 20.16-12.66s0 5.72-6 7.76c2.15 2.2 30.47-3.87 43.81-14.71 4.93-4 10-13.16 13.38-18.2 7.17-10.62 12.38-24.77 17.71-36.6 8.94-19.87 15.09-39.34 16.11-61.31.53-10.44-3.41-18.44-4.41-28.86-2.57-27.8-67.63-37.26-86.24 16.55z"})),oa||(oa=e.createElement("path",{fill:"#efb17c",d:"M277.74 179.06c.62-.79 1.24-1.59 1.84-2.39-.85 2.59-1.52 3.73-1.84 2.39z"})),ia||(ia=e.createElement("path",{fill:"#fbd2a6",d:"M216.1 206.72c3.69-5.42 8.28-3.35 15.57-8.28 3.76-3.06 1.57-9.46 1.77-11.82 18.25 4.56 37.38-1.18 49.07-16 .62 5.16-2.77 22.27-.2 27 4.73 8.67 13.4 18.92 13.4 18.92-35.47-2.76-63.45 39-89.86 44.54 5.52-28.74-2.36-35.84 10.25-54.36z"})),la||(la=e.createElement("path",{fill:"#f6b488",d:"m235.21 167.9 53.21-25.23s-3.65 24-6.5 32.72c-64.05 62.66-46.47-7.33-46.71-7.49z"})),ca||(ca=e.createElement("path",{fill:"#fbd2a6",d:"M226.86 50.64C215 59.31 206.37 93.21 204 95.57c-19.46 19.47-3.59 41.39-3.94 51.24-.2 5.52-4.14 25.42 5.72 29.36 22.22 8.89 60-3.48 67.19-12.61 13.28-16.75 40.89-94.78 17.74-108.19-7.92-4.58-42.78-20.18-63.85-4.73z"})),da||(da=e.createElement("path",{fill:"#e5766c",d:"M243.69 143.66c-10.7-6.16-8.56-6.73-19.76-12.71-3.86-2.07-3.94.64-6.32 0-2.91-.79-1.39-2.74-5.37-3.48-6.52-1.21-3.67 3.63-3.15 6 1.32 6.15-8.17 17.3 3.26 21.42 12.65 4.55 21.38-9.41 31.34-11.23z"})),ua||(ua=e.createElement("path",{fill:"#fff",d:"M240.68 143.9c-11.49-5.53-11.65-8.17-24.64-11.69-8.6-2.32-5.53 1-5.69 4.42-.2 4.16-1.26 9.87 4.9 12.66 9 4.09 18.16-6.02 25.43-5.39zm.7-40.9c-.16 1.26-.06 4.9 5.46 8.25 11.43-4.73 16.36-2.56 17-3.33 1.48-1.76-2-8.87-7.88-9.85-5.58-.94-14.14 1.24-14.58 4.93z"})),pa||(pa=e.createElement("path",{fill:"#000001",d:"M263.53 108.19c-4.32-4.33-6.85-6.24-12.26-8.21-2.77-1-6.18.18-8.65 1.67a3.65 3.65 0 0 0-1.24 1.23h-.12a3.73 3.73 0 0 1 1-1.52 12.53 12.53 0 0 1 11.93-3c4.73 1 9.43 4.63 9.42 9.82z"})),ma||(ma=e.createElement("circle",{cx:254.13,cy:104.05,r:4.19,fill:"#000001"})),ha||(ha=e.createElement("path",{fill:"#fff",d:"M225.26 99.22c-.29 1-6.6 3.45-10.92 1.48-1.15-3.24-5-6.43-5.25-6.71-.5-2.86 5.55-8 10.06-6.3a10.21 10.21 0 0 1 6.11 11.53z"})),ga||(ga=e.createElement("path",{fill:"#000001",d:"M209.29 94.21c-.19-2.34 1.84-4.1 3.65-5.2 7-3.87 13.18 3 12.43 10h-.12c-.14-4-2.38-8.44-6.47-9.11a3.19 3.19 0 0 0-2.42.31c-1.37.85-2.38 2-3.89 2.56-1 .45-1.92.42-3 1.4h-.22z"})),ya||(ya=e.createElement("circle",{cx:219.55,cy:95.28,r:4,fill:"#000001"})),fa||(fa=e.createElement("path",{fill:"#efb17c",d:"M218.66 120.27a27.32 27.32 0 0 0 4.54 3.45c-2.29-.72-4.28-.69-6.32-2.27-2.53-2-3.39-5.16-.73-7.72 10.24-9.82 12.56-13.82 14.77-24.42-1 12.37-6 17.77-10.63 23.18-2.53 2.97-4.68 5.06-1.63 7.78z"})),ba||(ba=e.createElement("path",{fill:"#a57c52",d:"M231.22 69.91c-.67-3.41-8.78-2.83-11.06-1.93-3.48 1.39-6.08 5.22-7.13 8.53 2.9-4.3 6.74-8.12 12.46-6 1.16.42 3.18 2.35 4.48 1.85s1.03-2.2 1.25-2.45zm32.16 8.56c-2.75-1.66-12.24-5.08-12.18.82 2.56.24 5-.19 7.64.95 11.22 4.76 12.77 17.61 12.85 17.86.2-.53.1 1.26.23.7-.02.2.95-12.12-8.54-20.33z"})),wa||(wa=e.createElement("path",{fill:"#fbd2a6",d:"M53.43 250.73c6.29 0-.6-.17 7.34 0 1.89.05-2.38-.7 0-.69 4.54-4.2 12.48-.74 20.6-2.45 4.55.35 3.93 1.35 5.59 4.19 4.89 8.38 4.78 14.21 14 19.56 16.42 8.38 66 12.92 88.49 18.86 5.52.83 42.64-20.15 61-23.75 6.51 10.74 11.46 28.68 8.39 34.93-6.54 13.3-57.07 25.4-75.91 25.15C156.47 326.18 94 294 92.2 293c-.94-.57.7-.7-7.68 0s-10.15.72-17.47-1.4c-3-.87-4.61-1.33-6.33-3.54-2 .22-3.39.2-4.78-1-3.15-2.74-4.84-6.61-2.73-10.06h-.12c-3.35-2.48-6.54-7.69-3.08-11.72 1-1.18 6.06-1.94 7.77-2.28-1.58-.29-6.37.19-7.49-.72-3.06-2.5-4.96-11.55 3.14-11.55z"})),Ea||(Ea=e.createElement("path",{fill:"#a4286a",d:"M303.22 237.52c-9.87-11.88-41.59 8.19-47.8 12.34s-14.89 17.95-14.89 17.95c6 9.43 8.36 31 5.65 46.34l30.51-3s18-15.62 22.59-28.7 6.3-42.54 6.3-42.54"})),va||(va=e.createElement("path",{fill:"#cb9833",d:"M278.63 31.67c-6.08 0-22.91 4.07-22.93 12.91 0 11 47.9 38.38 16.14 85.85 10.21-.79 10.79-8.12 14.92-14.93-3.66 77-49.38 93.58-40.51 142.25 7.68-25.81 20.3-11.62 38.13-33.84 3.45 4.88 9 18.28-9.46 33.78 50-31.26 57.31-56.6 51.92-95C319.93 113.53 348.7 42 278.63 31.67z"})),ka||(ka=e.createElement("path",{fill:"#fbd2a6",d:"M283.64 126.83c-2.42 9.67-8 15.76-1.48 16.46A21.26 21.26 0 0 0 302 132.6c5.17-8.52 3.93-16.44-2.46-18s-13.48 2.56-15.9 12.23z"})),_a||(_a=e.createElement("path",{fill:"#efb17c",d:"M38 73.45c1.92 2 4.25 9.21 6.32 10.91 2.25 1.85 5.71 2.12 8.1 4.45 3.66-2 6-8.72 10-9.31-2.59 1.31-4.42 3.5-6.93 4.88-1.42.8-3 1.31-4.38 2.25-2.16-1.46-4.27-1.77-6.26-3.38-2.52-2.02-5.31-8-6.85-9.8z"})),Ta||(Ta=e.createElement("path",{fill:"#efb17c",d:"M39 74.4c4.83 1.1 12.52 6.44 15.89 10-3.22-1.34-14.73-6.15-15.89-10zm.62-1.5c6.71-.79 18 1.54 23.29 5.9-3.85-.2-5.42-1.48-9-2.94-4.08-1.69-8.83-2.03-14.29-2.96zm46.43 14.58c-3.72-1.32-10.52-1.13-13.22 3.52 2-1.16 1.84-2.11 4.18-1.72-3.81-4.15 8.16-.74 11.6-.24m-2.78 13.15c.56-3.29-8-7.81-10.58-9.17-6.25-3.29-12.16 1.36-19.33-4.53 5.94 6.1 14.23 2.5 19.55 5.76 3.06 1.88 8.65 6.09 9.35 9.38-.23-.4 1.29-1.44 1.01-1.44z"})),xa||(xa=e.createElement("circle",{cx:38.13,cy:30.03,r:3.14,fill:"#b89ac8"})),Sa||(Sa=e.createElement("circle",{cx:60.26,cy:39.96,r:3.14,fill:"#e31e0c"})),Ra||(Ra=e.createElement("circle",{cx:50.29,cy:25.63,r:3.14,fill:"#3baa45"})),Ca||(Ca=e.createElement("circle",{cx:22.19,cy:19.21,r:3.14,fill:"#2ca9e1"})),Ia||(Ia=e.createElement("circle",{cx:22.19,cy:30.03,r:3.14,fill:"#e31e0c"})),La||(La=e.createElement("circle",{cx:26.86,cy:8.28,r:3.14,fill:"#3baa45"})),Aa||(Aa=e.createElement("circle",{cx:49.32,cy:39.99,r:3.14,fill:"#e31e0c"})),Pa||(Pa=e.createElement("circle",{cx:63.86,cy:59.52,r:3.14,fill:"#f8ad39"})),Fa||(Fa=e.createElement("circle",{cx:50.88,cy:50.72,r:3.14,fill:"#3baa45"})),Ma||(Ma=e.createElement("circle",{cx:63.47,cy:76.17,r:3.14,fill:"#e31e0c"})),qa||(qa=e.createElement("circle",{cx:38.34,cy:14.83,r:3.14,fill:"#2ca9e1"})),Da||(Da=e.createElement("circle",{cx:44.44,cy:5.92,r:3.14,fill:"#f8ad39"})),Oa||(Oa=e.createElement("circle",{cx:57.42,cy:10.24,r:3.14,fill:"#e31e0c"})),Na||(Na=e.createElement("circle",{cx:66.81,cy:12.4,r:3.14,fill:"#2ca9e1"})),$a||($a=e.createElement("circle",{cx:77.95,cy:5.14,r:3.14,fill:"#b89ac8"})),Ba||(Ba=e.createElement("circle",{cx:77.95,cy:30.34,r:3.14,fill:"#e31e0c"})),Ua||(Ua=e.createElement("circle",{cx:80.97,cy:16.55,r:3.14,fill:"#f8ad39"})),Wa||(Wa=e.createElement("circle",{cx:62.96,cy:27.27,r:3.14,fill:"#3baa45"})),Ka||(Ka=e.createElement("circle",{cx:75.36,cy:48.67,r:3.14,fill:"#2ca9e1"})),Ha||(Ha=e.createElement("circle",{cx:76.11,cy:65.31,r:3.14,fill:"#3baa45"})),Ya||(Ya=e.createElement("path",{fill:"#71b026",d:"M78.58 178.43C54.36 167.26 32 198.93 5 198.93c19.56 20.49 63.53 1.52 69 15.5 1.48-14.01 4.11-30.9 4.58-36z"})),za||(za=e.createElement("path",{fill:"#074a67",d:"M67.75 251.08c0-4.65 10.13-72.65 10.13-72.65h2.8l-9.09 72.3z"})),ja||(ja=e.createElement("ellipse",{cx:255.38,cy:103.18,fill:"#fff",rx:1.84,ry:1.77})),Va||(Va=e.createElement("ellipse",{cx:221.24,cy:94.75,fill:"#fff",rx:1.84,ry:1.77}))),Xa=(0,C.compose)([(0,h.withSelect)(((e,t)=>{const{isAlertDismissed:s}=e(t.store||"yoast-seo/editor");return{isAlertDismissed:s(t.alertKey)}})),(0,h.withDispatch)(((e,t)=>{const{dismissAlert:s}=e(t.store||"yoast-seo/editor");return{onDismissed:()=>s(t.alertKey)}}))]),Qa=({children:t,id:s,hasIcon:n=!0,title:r,image:a=null,isAlertDismissed:o,onDismissed:i})=>o?null:(0,e.createElement)("div",{id:s,className:"notice-yoast yoast is-dismissible"},(0,e.createElement)("div",{className:"notice-yoast__container"},(0,e.createElement)("div",null,(0,e.createElement)("div",{className:"notice-yoast__header"},n&&(0,e.createElement)("span",{className:"yoast-icon"}),(0,e.createElement)("h2",{className:"notice-yoast__header-heading"},r)),(0,e.createElement)("p",null,t)),a&&(0,e.createElement)(a,{height:"60"})),(0,e.createElement)("button",{type:"button",className:"notice-dismiss",onClick:i},(0,e.createElement)("span",{className:"screen-reader-text"},/* translators: Hidden accessibility text. */
(0,k.__)("Dismiss this notice.","wordpress-seo"))));Qa.propTypes={children:o().node.isRequired,id:o().string.isRequired,hasIcon:o().bool,title:o().any.isRequired,image:o().elementType,isAlertDismissed:o().bool.isRequired,onDismissed:o().func.isRequired};const Ja=Xa(Qa),eo=({store:t="yoast-seo/editor",image:s=null,title:n,promoId:r,alertKey:a,children:o,...i})=>(0,h.select)(t).isPromotionActive(r)&&(0,e.createElement)(Ja,{alertKey:a,store:t,id:a,title:n,image:s,...i},o);eo.propTypes={store:o().string,image:o().elementType,title:o().any.isRequired,promoId:o().string.isRequired,alertKey:o().string.isRequired,children:o().node};const to=({store:t="yoast-seo/editor",location:s="sidebar",...r})=>{const a=(0,h.useSelect)((e=>e(t).getIsPremium()),[t]),o=(0,h.useSelect)((e=>e(t).selectLinkParams()),[t]),i="sidebar"===s?(0,k.sprintf)(/* translators: %1$s expands to YOAST SEO PREMIUM */
(0,k.__)("BLACK FRIDAY SALE: %1$s","wordpress-seo"),"YOAST SEO PREMIUM"):(0,n.createInterpolateElement)((0,k.sprintf)(/* translators: %1$s expands to YOAST SEO PREMIUM, %2$s expands to a link on yoast.com, %3$s expands to the anchor end tag. */
(0,k.__)("BLACK FRIDAY SALE: %1$s %2$sBuy now!%3$s","wordpress-seo"),"YOAST SEO PREMIUM","<a>","</a>"),{a:(0,e.createElement)("a",{href:(0,Es.addQueryArgs)("https://yoa.st/black-friday-sale",o),target:"_blank",rel:"noreferrer"})});return a?null:(0,e.createElement)(eo,{id:`black-friday-2023-promotion-${s}`,promoId:"black-friday-2023-promotion",alertKey:"black-friday-2023-promotion",store:t,title:i,image:Image,...r},(0,e.createElement)("span",{className:"yoast-bf-sale-badge"},(0,k.__)("30% OFF!","wordpress-seo")," "),"sidebar"===s&&(0,e.createElement)("a",{className:"yst-block yst--mb-[1em]",href:(0,Es.addQueryArgs)("https://yoa.st/black-friday-sale",o),target:"_blank",rel:"noreferrer"},(0,k.__)("Buy now!","wordpress-seo")))};to.propTypes={store:o().string,location:o().oneOf(["sidebar","metabox"])};const so=t=>s=>!(()=>{var e,t;const s=(0,h.select)("yoast-seo/editor").getIsPremium(),n=(0,h.select)("yoast-seo/editor").getWarningMessage();return(s&&null!==(e=null===(t=(0,h.select)("yoast-seo-premium/editor"))||void 0===t?void 0:t.getMetaboxWarning())&&void 0!==e?e:[]).length>0||n.length>0})()&&(0,e.createElement)(t,{...s}),no=so((()=>{const t=(0,h.useSelect)((e=>e("yoast-seo/editor").selectLinkParams()),[]),s=(0,k.sprintf)(/* translators: %1$s expands to 'WooCommerce'. */
(0,k.__)("Is your %1$s store ready for Black Friday?","wordpress-seo"),"WooCommerce");return(0,e.createElement)(eo,{id:"black-friday-2023-product-editor-checklist",alertKey:"black-friday-2023-product-editor-checklist",promoId:"black-friday-2023-checklist",store:"yoast-seo/editor",title:s,image:Za},(0,n.createInterpolateElement)((0,k.sprintf)(/* translators: %1$s expands to a 'strong' start tag, %2$s to a 'strong' end tag. */
(0,k.__)("The Yoast %1$sultimate Black Friday checklist%2$s helps you prepare in time, so you can boost your results during this sale.","wordpress-seo"),"<strong>","</strong>"),{strong:(0,e.createElement)("strong",null)})," ",(0,e.createElement)("a",{href:(0,Es.addQueryArgs)("https://yoa.st/black-friday-checklist",t),target:"_blank",rel:"noreferrer"},(0,k.__)("Get the checklist and start optimizing now!","wordpress-seo")))})),ro=so(to);function ao({settings:t}){const s=(0,h.useSelect)((e=>e("yoast-seo/editor").getIsTerm()),[]),a=(0,h.useSelect)((e=>e("yoast-seo/editor").getIsProduct()),[])&&window.wpseoScriptData&&"1"===window.wpseoScriptData.isWooCommerceActive;return(0,e.createElement)(n.Fragment,null,(0,e.createElement)(r.Fill,{name:"YoastMetabox"},(0,e.createElement)(Vs,{key:"warning",renderPriority:1},(0,e.createElement)(es,null)),(0,e.createElement)(Vs,{key:"time-constrained-notification",renderPriority:2},a&&(0,e.createElement)(no,null),(0,e.createElement)(ro,{image:null,hasIcon:!1,location:"metabox"})),t.isKeywordAnalysisActive&&(0,e.createElement)(Vs,{key:"keyword-input",renderPriority:8},(0,e.createElement)(Mt.KeywordInput,{isSEMrushIntegrationActive:t.isSEMrushIntegrationActive}),!window.wpseoScriptData.metabox.isPremium&&(0,e.createElement)(r.Fill,{name:"YoastRelatedKeyphrases"},(0,e.createElement)(jr,null))),(0,e.createElement)(Vs,{key:"search-appearance",renderPriority:9},(0,e.createElement)(ns,{id:"yoast-snippet-editor-metabox",title:(0,k.__)("Search appearance","wordpress-seo"),initialIsOpen:!0},(0,e.createElement)(Jt,{hasPaperStyle:!1}))),t.isContentAnalysisActive&&(0,e.createElement)(Vs,{key:"readability-analysis",renderPriority:10},(0,e.createElement)(Mt.ReadabilityAnalysis,{shouldUpsell:t.shouldUpsell})),t.isKeywordAnalysisActive&&(0,e.createElement)(Vs,{key:"seo-analysis",renderPriority:20},(0,e.createElement)(n.Fragment,null,(0,e.createElement)(Mt.SeoAnalysis,{shouldUpsell:t.shouldUpsell,shouldUpsellWordFormRecognition:t.isWordFormRecognitionActive}),t.shouldUpsell&&(0,e.createElement)(Qr,{location:"metabox"}))),t.isInclusiveLanguageAnalysisActive&&(0,e.createElement)(Vs,{key:"inclusive-language-analysis",renderPriority:21},(0,e.createElement)(Mt.InclusiveLanguageAnalysis,null)),t.isKeywordAnalysisActive&&(0,e.createElement)(Vs,{key:"additional-keywords-upsell",renderPriority:22},t.shouldUpsell&&(0,e.createElement)(ta,null)),t.isKeywordAnalysisActive&&t.isWincherIntegrationActive&&(0,e.createElement)(Vs,{key:"wincher-seo-performance",renderPriority:23},(0,e.createElement)(Ft,{location:"metabox"})),t.shouldUpsell&&!s&&(0,e.createElement)(Vs,{key:"internal-linking-suggestions-upsell",renderPriority:25},(0,e.createElement)(zs,null)),t.isCornerstoneActive&&(0,e.createElement)(Vs,{key:"cornerstone",renderPriority:30},(0,e.createElement)(Dt,null)),t.displayAdvancedTab&&(0,e.createElement)(Vs,{key:"advanced",renderPriority:40},(0,e.createElement)(ns,{id:"collapsible-advanced-settings",title:(0,k.__)("Advanced","wordpress-seo")},(0,e.createElement)(sn,null))),t.displaySchemaSettings&&(0,e.createElement)(Vs,{key:"schema",renderPriority:50},(0,e.createElement)(Lr,null)),(0,e.createElement)(Vs,{key:"social",renderPriority:-1},(0,e.createElement)(fr,{target:"wpseo-section-social"})),t.isInsightsEnabled&&(0,e.createElement)(Vs,{key:"insights",renderPriority:52},(0,e.createElement)(Ps,{location:"metabox"}))))}ao.propTypes={settings:o().object.isRequired};const oo=(0,C.compose)([(0,h.withSelect)(((e,t)=>{const{getPreferences:s}=e("yoast-seo/editor");return{settings:s(),store:t.store}}))])(ao);function io({target:t,store:s,theme:n}){return(0,e.createElement)(w,{target:t},(0,e.createElement)(R,{store:s,theme:n}),(0,e.createElement)(oo,{store:s,theme:n}))}io.propTypes={target:o().string.isRequired,store:o().object,theme:o().object};const lo=[];let co=null;class uo extends n.Component{constructor(e){super(e),this.state={registeredComponents:[]}}registerComponent(e,t){this.setState({registeredComponents:[...this.state.registeredComponents,{key:e,Component:t}]})}render(){return this.state.registeredComponents.map((({Component:t,key:s})=>(0,e.createElement)(t,{key:s})))}}function po(e,t){null===co||null===co.current?lo.push({key:e,Component:t}):co.current.registerComponent(e,t)}const mo=window.yoast.externals.redux,ho=window.jQuery;var go=s.n(ho);function yo(e){let t="";var s;return t=!1===function(e){if("undefined"==typeof tinyMCE||void 0===tinyMCE.editors||0===tinyMCE.editors.length)return!1;const t=tinyMCE.get(e);return null!==t&&!t.isHidden()}(e)||0==(s=e,null!==document.getElementById(s+"_ifr"))?function(e){return document.getElementById(e)&&document.getElementById(e).value||""}(e):tinyMCE.get(e).getContent(),t}i.noop,i.noop,i.noop;const{removeMarks:fo}=f.markers,{updateReplacementVariable:bo,updateData:wo,hideReplacementVariables:Eo,setContentImage:vo,setEditorDataContent:ko,setEditorDataTitle:_o,setEditorDataExcerpt:To,setEditorDataImageUrl:xo,setEditorDataSlug:So}=mo.actions;window.yoast=window.yoast||{},window.yoast.initEditorIntegration=function(t){window.YoastSEO=window.YoastSEO||{},window.YoastSEO._registerReactComponent=po,function(t){const s=Cs();co=(0,n.createRef)();const a={isRtl:s.isRtl};(0,n.render)((0,e.createElement)(r.SlotFillProvider,null,(0,e.createElement)(d.Root,{context:{locationContext:"classic-metabox"}},(0,e.createElement)(io,{target:"wpseo-metabox-root",store:t,theme:a})),(0,e.createElement)(uo,{ref:co})),document.getElementById("wpseo-metabox-root")),lo.forEach((e=>{co.current.registerComponent(e.key,e.Component)}))}(t)},window.yoast.EditorData=class{constructor(e,t,s="content"){this._refresh=e,this._store=t,this._tinyMceId=s,this._previousData={},this._previousEditorData={},this.updateReplacementData=this.updateReplacementData.bind(this),this.refreshYoastSEO=this.refreshYoastSEO.bind(this)}initialize(e,t=[]){const s=this.getInitialData(e);var n,r;n=s,r=this._store,(0,i.forEach)(n,((e,t)=>{zt.includes(t)||r.dispatch(Kt(t,e))})),this._store.dispatch(Eo(t)),this._previousEditorData.content=s.content,this._store.dispatch(ko(s.content)),this._previousEditorData.contentImage=s.contentImage,this._store.dispatch(vo(s.contentImage)),this.setImageInSnippetPreview(s.snippetPreviewImageURL||s.contentImage),this._previousEditorData.slug=s.slug,this._store.dispatch(So(s.slug)),this.updateReplacementData({target:{value:s.title}},"title"),this.updateReplacementData({target:{value:s.excerpt}},"excerpt"),this.updateReplacementData({target:{value:s.excerpt_only}},"excerpt_only"),this.subscribeToElements(),this.subscribeToStore(),this.subscribeToSnippetPreviewImage(),this.subscribeToTinyMceEditor(),this.subscribeToSlug()}subscribeToTinyMceEditor(){const e=e=>{if((0,i.isString)(e)||(e=this.getContent()),this._previousEditorData.content===e)return;if(this._previousEditorData.content=e,this._store.dispatch(ko(e)),this.featuredImageIsSet)return;const t=this.getContentImage(e);this._previousEditorData.contentImage!==t&&(this._previousEditorData.contentImage=t,this._store.dispatch(vo(t)),this.setImageInSnippetPreview(t))};go()(document).on("tinymce-editor-init",((t,s)=>{s.id===this._tinyMceId&&(e(this.getContent()),["input","change","cut","paste"].forEach((t=>s.on(t,(0,i.debounce)(e,1e3)))))}));const t=document.getElementById("attachment_content");t&&(e(t.value),t.addEventListener("input",(t=>e(t.target.value))))}subscribeToSlug(){const e=e=>{this._previousEditorData.slug!==e&&(this._previousEditorData.slug=e,this._store.dispatch(So(e)),this._store.dispatch(wo({slug:e})))},t=document.getElementById("slug");t&&t.addEventListener("input",(t=>e(t.target.value)));const s=document.getElementById("post_name");s&&s.addEventListener("input",(t=>e(t.target.value)));const n=document.getElementById("edit-slug-buttons");n&&new MutationObserver(((t,s)=>t.forEach((t=>{t.addedNodes.forEach((t=>{var n,r;if(null==t||null===(n=t.classList)||void 0===n||!n.contains("edit-slug"))return;const a=null===(r=document.getElementById("editable-post-name-full"))||void 0===r?void 0:r.innerText;a&&(e(a),s.disconnect(),this.subscribeToSlug())}))})))).observe(n,{childList:!0})}subscribeToSnippetPreviewImage(){if((0,i.isUndefined)(wp.media)||(0,i.isUndefined)(wp.media.featuredImage))return;go()("#postimagediv").on("click","#remove-post-thumbnail",(()=>{this.featuredImageIsSet=!1,this.setImageInSnippetPreview(this.getContentImage(this.getContent()))}));const e=wp.media.featuredImage.frame();var t,s,n;e.on("select",(()=>{const t=e.state().get("selection").first().attributes.url;t&&(this.featuredImageIsSet=!0,this.setImageInSnippetPreview(t))})),t=this._tinyMceId,s=["init"],n=()=>{const e=this.getContentImage(this.getContent()),t=this.getFeaturedImage()||e||"";this._store.dispatch(vo(e)),this.setImageInSnippetPreview(t)},"undefined"!=typeof tinyMCE&&"function"==typeof tinyMCE.on&&tinyMCE.on("addEditor",(function(e){const r=e.editor;r.id===t&&(0,i.forEach)(s,(function(e){r.on(e,n)}))}))}getFeaturedImage(){const e=go()("#set-post-thumbnail img").attr("src");return e?(this.featuredImageIsSet=!0,e):(this.featuredImageIsSet=!1,null)}setImageInSnippetPreview(e){this._store.dispatch(xo(e)),this._store.dispatch(wo({snippetPreviewImageURL:e}))}getContentImage(e){if(this.featuredImageIsSet)return"";const t=f.languageProcessing.imageInText(e);if(0===t.length)return"";const s=go().parseHTML(t.join(""));for(const e of s)if(e.src)return e.src;return""}getTitle(){const e=document.getElementById("title")||document.getElementById("name");return e&&e.value||""}getExcerpt(e=!0){const t=document.getElementById("excerpt"),s=t&&t.value||"",n="ja"===function(){const e=Cs();return(0,i.get)(e,"contentLocale","en_US")}()?80:156;return""!==s||!1===e?s:function(e,t=156){return(e=(e=(0,Ut.stripTags)(e)).trim()).length<=t||(e=e.substring(0,t),/\s/.test(e)&&(e=e.substring(0,e.lastIndexOf(" ")))),e}(this.getContent(),n)}getSlug(){let e="";const t=document.getElementById("new-post-slug")||document.getElementById("slug");return t?e=t.value:null!==document.getElementById("editable-post-name-full")&&(e=document.getElementById("editable-post-name-full").textContent),e}getContent(){return fo(yo(this._tinyMceId))}subscribeToElements(){this.subscribeToInputElement("title","title"),this.subscribeToInputElement("excerpt","excerpt"),this.subscribeToInputElement("excerpt","excerpt_only")}subscribeToInputElement(e,t){const s=document.getElementById(e);s&&s.addEventListener("input",(e=>{this.updateReplacementData(e,t)}))}updateReplacementData(e,t){let s=e.target.value;if("excerpt"===t&&""===s&&(s=this.getExcerpt()),this._previousEditorData[t]!==s){switch(this._previousEditorData[t]=s,t){case"title":this._store.dispatch(_o(s));break;case"excerpt":this._store.dispatch(To(s))}this._store.dispatch(bo(t,s))}}isShallowEqual(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e)if(e.hasOwnProperty(s)&&(!(s in t)||e[s]!==t[s]))return!1;return!0}refreshYoastSEO(){const e=this.getData();!this.isShallowEqual(this._previousData,e)&&(this.handleEditorChange(e),this._previousData=e,window.YoastSEO&&window.YoastSEO.app&&window.YoastSEO.app.refresh())}handleEditorChange(e){this._previousData.excerpt!==e.excerpt&&(this._store.dispatch(bo("excerpt",e.excerpt)),this._store.dispatch(bo("excerpt_only",e.excerpt_only))),this._previousData.snippetPreviewImageURL!==e.snippetPreviewImageURL&&this.setImageInSnippetPreview(e.snippetPreviewImageURL),this._previousData.slug!==e.slug&&this._store.dispatch(So(e.slug)),this._previousData.title!==e.title&&this._store.dispatch(_o(e.title))}subscribeToStore(){this.subscriber=(0,i.debounce)(this.refreshYoastSEO,500),this._store.subscribe(this.subscriber)}getInitialData(e){e=function(e,t){if(!e.custom_taxonomies)return e;const s={};return(0,i.forEach)(e.custom_taxonomies,((e,t)=>{const{name:n,label:r,descriptionName:a,descriptionLabel:o}=function(e){const t=jt(e);return{name:"ct_"+t,label:Ht(e+" (custom taxonomy)"),descriptionName:"ct_desc_"+t,descriptionLabel:Ht(e+" description (custom taxonomy)")}}(t),i="string"==typeof e.name?(0,M.decodeHTML)(e.name):e.name,l="string"==typeof e.description?(0,M.decodeHTML)(e.description):e.description;s[n]={value:i,label:r},s[a]={value:l,label:o}})),t.dispatch(function(e){return{type:"SNIPPET_EDITOR_UPDATE_REPLACEMENT_VARIABLES_BATCH",updatedVariables:e}}(s)),(0,i.omit)({...e},"custom_taxonomies")}(e=function(e,t){return e.custom_fields?((0,i.forEach)(e.custom_fields,((e,s)=>{const{name:n,label:r}=function(e){return{name:"cf_"+jt(e),label:Ht(e+" (custom field)")}}(s);t.dispatch(Kt(n,e,r))})),(0,i.omit)({...e},"custom_fields")):e}(e,this._store),this._store);const t=this.getContent(),s=this.getFeaturedImage();return{...e,title:this.getTitle(),excerpt:this.getExcerpt(),excerpt_only:this.getExcerpt(!1),slug:this.getSlug(),content:t,snippetPreviewImageURL:s,contentImage:this.getContentImage(t)}}getData(){return{...this._store.getState().snippetEditor.data,title:this.getTitle(),content:this.getContent(),excerpt:this.getExcerpt(),excerpt_only:this.getExcerpt(!1)}}}})()})();