wp_back/wp-content/plugins/wordpress-seo/js/dist/editor-modules.js

154 lines
81 KiB
JavaScript
Raw Normal View History

2024-05-20 15:37:46 +03:00
!function(e){var t={};function a(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,a),s.l=!0,s.exports}a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)a.d(n,s,function(t){return e[t]}.bind(null,s));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=294)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.yoast.propTypes},function(e,t){e.exports=window.React},function(e,t){e.exports=window.lodash},function(e,t){e.exports=window.wp.data},,,function(e,t){e.exports=window.yoast.componentsNew},function(e,t){e.exports=window.yoast.helpers},,function(e,t){e.exports=window.yoast.styledComponents},function(e,t){function a(){return e.exports=a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,a.apply(this,arguments)}e.exports=a,e.exports.default=e.exports,e.exports.__esModule=!0},,function(e,t){e.exports=window.yoast.analysis},function(e,t){e.exports=window.wp.url},function(e,t){e.exports=window.yoast.externals.redux},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(4);function s(){return Object(n.get)(window,"wpseoScriptData.metabox",{intl:{},isRtl:!1})}},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=window.yoast.styleGuide},function(e,t){e.exports=window.wp.compose},,function(e,t){e.exports=window.yoast.externals.contexts},,,function(e,t){e.exports=window.wp.apiFetch},,function(e,t,a){"use strict";a.d(t,"b",(function(){return s})),a.d(t,"a",(function(){return r}));var n=a(0);function s(e){return e.charAt(0).toUpperCase()+e.slice(1)}function r(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return Object(n.createInterpolateElement)(e,{a:Object(n.createElement)("a",{id:a,href:t,target:"_blank",rel:"noopener noreferrer"})})}},function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=i(a(3)),r=i(a(127)),o=i(a(130));function i(e){return e&&e.__esModule?e:{default:e}}var c=void 0;t.default=function(e){var t=e.mixedString,a=e.components,i=e.throwErrors;if(c=t,!a)return t;if("object"!==(void 0===a?"undefined":n(a))){if(i)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var l=(0,o.default)(t);try{return function e(t,a){var o,i,l,u,d,p,m,h,b=[],f={};for(p=0;p<t.length;p++)if("string"!==(d=t[p]).type){if(!a.hasOwnProperty(d.value)||void 0===a[d.value])throw new Error("Invalid interpolation, missing component node: `"+d.value+"`");if("object"!==n(a[d.value]))throw new Error("Invalid interpolation, component node must be a ReactElement or null: `"+d.value+"`","\n> "+c);if("componentClose"===d.type)throw new Error("Missing opening component token: `"+d.value+"`");if("componentOpen"===d.type){o=a[d.value],l=p;break}b.push(a[d.value])}else b.push(d.value);return o&&(u=function(e,t){var a,n,s=t[e],r=0;for(n=e+1;n<t.length;n++)if((a=t[n]).value===s.value){if("componentOpen"===a.type){r++;continue}if("componentClose"===a.type){if(0===r)return n;r--}}throw new Error("Missing closing component token `"+s.value+"`")}(l,t),m=e(t.
h2 > button {
padding-left: 24px;
padding-top: 16px;
&:hover {
background-color: #f0f0f0;
}
}
div[class^="collapsible_content"] {
padding: 24px 0;
margin: 0 24px;
border-top: 1px solid rgba(0,0,0,0.2);
}
`;t.a=e=>Object(r.createElement)(c,s()({hasPadding:!0,hasSeparator:!0},e))},,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return i})),a.d(t,"b",(function(){return c})),a.d(t,"c",(function(){return l})),a.d(t,"d",(function(){return u}));var n=a(4),s=a(9),r=a(42);const o=e=>({type:e.subtype,width:e.width,height:e.height,url:e.url,id:e.id,sizes:e.sizes,alt:e.alt||e.title||e.name});function i(e){return new Promise((t,a)=>{window.wp.media.attachment||a(),window.wp.media.attachment(e).fetch().then(e=>{t(o(e))}).catch(()=>a())})}function c(e){(function(e){const t=window.wp.media();return t.on("select",()=>{const a=t.state().get("selection").first();e(o(a.attributes))}),t})(e).open()}const l=e=>{const{width:t,height:a}=e,n=Object(r.determineFacebookImageMode)({width:t,height:a}),o=r.FACEBOOK_IMAGE_SIZES[n+"Width"],i=r.FACEBOOK_IMAGE_SIZES[n+"Height"],c=Object.values(e.sizes).find(e=>e.width>=o&&e.height>=i);return{url:c?c.url:e.url,id:e.id,warnings:Object(s.validateFacebookImage)(e),alt:e.alt||""}},u=e=>{const t="summary"!==Object(n.get)(window,"wpseoScriptData.metabox.twitterCardType")?"landscape":"square",a=r.TWITTER_IMAGE_SIZES[t+"Width"],o=r.TWITTER_IMAGE_SIZES[t+"Height"],i=Object.values(e.sizes).find(e=>e.width>=a&&e.height>=o);return{url:i?i.url:e.url,id:e.id,warnings:Object(s.validateTwitterImage)(e),alt:e.alt||""}}},,,,,function(e,t,a){"use strict";function n(){}a.d(t,"a",(function(){return n}))},,,function(e,t,a){"use strict";a.r(t),a.d(t,"getIconForScore",(function(){return i})),a.d(t,"default",(function(){return c}));var n=a(19),s=a(14);function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const a=e.getIdentifier(),n={score:e.score,rating:s.interpreters.scoreToRating(e.score),hasMarks:e.hasMarks(),marker:e.getMarker(),id:a,text:e.text,markerId:t.length>0?`${t}:${a}`:a,hasBetaBadge:e.hasBetaBadge(),hasJumps:e.hasJumps(),editFieldName:e.editFieldName};return"ok"===n.rating&&(n.rating="OK"),n}function o(e,t){switch(e.rating){case"error":t.errorsResults.push(e);break;case"feedback":t.considerationsResults.push(e);break;case"bad":t.problemsResults.push(e);break;case"OK":t.improvementsResults.push(e);break;case"good":t.goodResults.push(e)}return t}function i(e){switch(e){case"loading":return{icon:"loading-spinner",color:n.colors.$color_green_medium_light};case"not-set":return{icon:"seo-score-none",color:n.colors.$color_score_icon};case"noindex":return{icon:"seo-score-none",color:n.colors.$color_noindex};case"good":return{icon:"seo-score-good",color:n.colors.$color_green_medium};case"ok":return{icon:"seo-score-ok",color:n.colors.$color_ok};default:return{icon:"seo-score-bad",color:n.colors.$color_red}}}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a={errorsResults:[],problemsResults:[],improvementsResults:[],goodResults:[],considerationsResults:[]};if(!e)return a;for(let n=0;n<e.length;n++){const s=e[n];s.text&&(a=o(r(s,t),a))}return a}},,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(4),s=a(17);function r(){const e=Object(s.a)();return Object(n.get)(e,"contentLocale","en_US")}},function(e,t,a){"use strict";var n=a(0),s=a(8),r=a(2),o=a.n(r);const i=e=>{const[t,a]=Object(n.useState)(!1),{prefixIcon:r}=e;return Object(n.createElement)("div",{className:"yoast components-panel__body "+(t?"is-opened":"")},Object(n.createElement)("h2",{className:"components-panel__body-title"},Object(n.createElement)("button",{onClick:function(){a(!t)},className:"components-button components-panel__body-toggle"},Object(n.createElement)("span",{className:"yoast-icon-span",style:{fill:""+(r&&r.color||"")}},r&&Object(n.createElement)(s.SvgIcon,{icon:r.icon,color:r.color,size:r.size})),Object(n.createElement)("span",{className:"yoast-title-container"},Object(n.createElement)("div",{className:"yoast-title"},e.title),Object(n.createElement)("div",{className:"yoast-subtitle"},e.subTitle)),e.hasBetaBadgeLabel&&Object(n.createElement)(s.BetaBadge,null),Object(n.createElement)("span",{className:"yoast-chevron","aria-hidden":"true"}))),t&&e.children)};t.a=i,i.propType
display: inline-block;
position: relative;
outline: none;
text-decoration: none;
border-radius: 100%;
width: 24px;
height: 24px;
margin: -4px 0;
vertical-align: middle;
color: ${n.colors.$color_help_text};
&:hover,
&:focus {
color: ${n.colors.$color_snippet_focus};
}
// Overwrite the default blue active color for links.
&:active {
color: ${n.colors.$color_help_text};
}
&::before {
position: absolute;
top: 0;
left: 0;
padding: 2px;
content: "\f223";
}
`);t.a=i},,function(e,t,a){"use strict";a.r(t),a.d(t,"sortResultsByIdentifier",(function(){return c})),a.d(t,"default",(function(){return l})),a.d(t,"initializationDone",(function(){return u}));var n=a(38),s=a(16),r=a(14),o=a(58);let i=!1;function c(e){return e.sort((e,t)=>e._identifier.localeCompare(t._identifier))}function l(e,t,a,l,u){if(!i)return;const d=r.Paper.parse(t());e.analyze(d).then(r=>{const{result:{seo:o,readability:i,inclusiveLanguage:p}}=r;if(o){const e=o[""];e.results.forEach(e=>{e.getMarker=()=>()=>a(d,e.marks)}),e.results=c(e.results),l.dispatch(s.actions.setSeoResultsForKeyword(d.getKeyword(),e.results)),l.dispatch(s.actions.setOverallSeoScore(e.score,d.getKeyword())),l.dispatch(s.actions.refreshSnippetEditor()),u.saveScores(e.score,d.getKeyword())}i&&(i.results.forEach(e=>{e.getMarker=()=>()=>a(d,e.marks)}),i.results=c(i.results),l.dispatch(s.actions.setReadabilityResults(i.results)),l.dispatch(s.actions.setOverallReadabilityScore(i.score)),l.dispatch(s.actions.refreshSnippetEditor()),u.saveContentScore(i.score)),p&&(p.results.forEach(e=>{e.getMarker=()=>()=>a(d,e.marks)}),p.results=c(p.results),l.dispatch(s.actions.setInclusiveLanguageResults(p.results)),l.dispatch(s.actions.setOverallInclusiveLanguageScore(p.score)),l.dispatch(s.actions.refreshSnippetEditor()),u.saveInclusiveLanguageScore(p.score)),Object(n.doAction)("yoast.analysis.refresh",r,{paper:d,worker:e,collectData:t,applyMarks:a,store:l,dataCollector:u})}).catch(o.a)}function u(){i=!0}},,,function(e,t,a){"use strict";a.r(t),a.d(t,"nonReplaceVars",(function(){return l})),a.d(t,"fillReplacementVariables",(function(){return u})),a.d(t,"handlePrefixes",(function(){return d})),a.d(t,"createLabelFromName",(function(){return p})),a.d(t,"pushNewReplaceVar",(function(){return m})),a.d(t,"replaceSpaces",(function(){return h})),a.d(t,"prepareCustomFieldForDispatch",(function(){return b})),a.d(t,"prepareCustomTaxonomyForDispatch",(function(){return f})),a.d(t,"mapCustomTaxonomies",(function(){return g})),a.d(t,"mapCustomFields",(function(){return y})),a.d(t,"excerptFromContent",(function(){return O})),a.d(t,"applyReplaceUsingPlugin",(function(){return j}));var n=a(4),s=a(133),r=a(47),o=a(27),i=a(9);const{stripHTMLTags:c}=i.strings,l=["slug","content","contentImage","snippetPreviewImageURL"];function u(e,t){Object(n.forEach)(e,(e,a)=>{l.includes(a)||t.dispatch(Object(r.q)(a,e))})}function d(e){if(!["ct_","cf_","pt_"].includes(e.substr(0,3)))return e.replace(/_/g," ");const t=e.slice(0,3);switch(-1!==(e=e.slice(3)).indexOf("desc_")&&(e=e.slice(5)+" description"),t){case"ct_":e+=" (custom taxonomy)";break;case"cf_":e+=" (custom field)";break;case"pt_":e="Post type ("+(e=e.replace("single","singular"))+")"}return e}function p(e){return e=d(e),Object(o.b)(e)}function m(e,t){return e.push({name:t.name,label:t.label||p(t.name),value:t.value}),e}function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_";return e.replace(/\s/g,t)}function b(e){return{name:"cf_"+h(e),label:Object(o.b)(e+" (custom field)")}}function f(e){const t=h(e);return{name:"ct_"+t,label:Object(o.b)(e+" (custom taxonomy)"),descriptionName:"ct_desc_"+t,descriptionLabel:Object(o.b)(e+" description (custom taxonomy)")}}function g(e,t){return e.custom_taxonomies?(Object(n.forEach)(e.custom_taxonomies,(e,a)=>{const{name:n,label:s,descriptionName:o,descriptionLabel:i}=f(a);t.dispatch(Object(r.q)(n,e.name,s)),t.dispatch(Object(r.q)(o,e.description,i))}),Object(n.omit)({...e},"custom_taxonomies")):e}function y(e,t){return e.custom_fields?(Object(n.forEach)(e.custom_fields,(e,a)=>{const{name:n,label:s}=b(a);t.dispatch(Object(r.q)(n,e,s))}),Object(n.omit)({...e},"custom_fields")):e}function O(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:156;return(e=(e=Object(s.stripTags)(e)).trim()).length<=t||(e=e.substring(0,t),/\s/.test(e)&&(e=e.substring(0,e.lastIndexOf(" ")))),e}const j=function(e){const t=Object(n.get)(window,["YoastSEO","app","pluggable"],!1);if(!t||!Object(n.get)(window,["YoastSEO","app","pluggable","loaded"],!1))return function(e){const t=Object(n.get
/* Translators: %s translates to the Post Label in singular form */
Object(s.sprintf)(Object(s.__)("Make sure to save your %s for changes to take effect","wordpress-seo"),a)),Object(n.createElement)("button",{className:"yoast-button yoast-button--primary yoast-button--post-settings-modal",type:"button",onClick:f},
/* Translators: %s translates to the Post Label in singular form */
Object(s.sprintf)(Object(s.__)("Return to your %s","wordpress-seo"),a)))))),Object(n.createElement)(l.a,{id:t+"-open-button",title:i,suffixIcon:{size:"20px",icon:"pencil-square"},onClick:m}))};p.propTypes={id:i.a.string.isRequired,postTypeName:i.a.string.isRequired,children:i.a.oneOfType([i.a.node,i.a.arrayOf(i.a.node)]).isRequired,title:i.a.string.isRequired,isOpen:i.a.bool.isRequired,open:i.a.func.isRequired,close:i.a.func.isRequired,shouldCloseOnClickOutside:i.a.bool,showChangesWarning:i.a.bool},p.defaultProps={shouldCloseOnClickOutside:!0,showChangesWarning:!0},t.a=p},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return f})),a.d(t,"c",(function(){return g})),a.d(t,"b",(function(){return y}));var n=a(0),s=a(2),r=a.n(s),o=a(1),i=a(4),c=a(86),l=a.n(c),u=a(8),d=a(9),p=a(79),m=()=>Object(n.createElement)("p",{className:"yoast-wincher-seo-performance-modal__loading-message"},Object(o.__)("Tracking the ranking position...","wordpress-seo")," ",Object(n.createElement)(u.SvgIcon,{icon:"loading-spinner"}));const h=Object(d.makeOutboundLink)();function b(e){return Math.round(100*e)}function f(e){let{chartData:t}=e;if(Object(i.isEmpty)(t)||Object(i.isEmpty)(t.position))return"?";const a=function(e){return Array.from({length:e.position.history.length},(e,t)=>t+1).map(e=>Object(o.sprintf)(Object(o._n)("%d day","%d days",e,"wordpress-seo"),e))}(t),s=t.position.history.map((e,t)=>({x:t,y:101-e.value}));return Object(n.createElement)(p.a,{width:66,height:24,data:s,strokeWidth:1.8,strokeColor:"#498afc",fillColor:"#ade3fc",className:"yoast-related-keyphrases-modal__chart",mapChartDataToTableData:b,dataTableCaption:Object(o.__)("Keyphrase position in the last 90 days on a scale from 0 to 100.","wordpress-seo"),dataTableHeaderLabels:a})}function g(e){return!e||!e.position||e.position.value>100?"> 100":e.position.value}function y(e){const{keyphrase:t,rowData:a,onTrackKeyphrase:s,onUntrackKeyphrase:r,isFocusKeyphrase:c,isDisabled:d,isLoading:p}=e,b=!Object(i.isEmpty)(a),y=Object(n.useCallback)(()=>{d||(b?r(t,a.id):s(t))},[t,s,r,b,a,d]);return Object(n.createElement)("tr",null,Object(n.createElement)("td",{className:"yoast-table--nopadding"},function(e){let{keyphrase:t,isEnabled:a,toggleAction:s,isLoading:r}=e;return r?Object(n.createElement)(u.SvgIcon,{icon:"loading-spinner"}):Object(n.createElement)(u.Toggle,{id:"toggle-keyphrase-tracking-"+t,className:"wincher-toggle",isEnabled:a,onSetToggleState:s,showToggleStateLabel:!1})}({keyphrase:t,isEnabled:b,toggleAction:y,isLoading:p})),Object(n.createElement)("td",null,t,c&&Object(n.createElement)("span",null,"*")),function(e){const{rowData:t,websiteId:a}=e,s=!Object(i.isEmpty)(t),r=t&&t.updated_at&&l()(t.updated_at)>=l()().subtract(7,"days"),c=t?Object(o.sprintf)("https://app.wincher.com/websites/%s/keywords?serp=%s&utm_medium=plugin&utm_source=yoast&referer=yoast&partner=yoast",a,t.id):null;return s?r?Object(n.createElement)(n.Fragment,null,Object(n.createElement)("td",null,g(t)),Object(n.createElement)("td",{className:"yoast-table--nopadding"},Object(n.createElement)(f,{chartData:t})),Object(n.createElement)("td",{className:"yoast-table--nobreak"},Object(n.createElement)(h,{href:c},Object(o.__)("View","wordpress-seo")))):Object(n.createElement)(n.Fragment,null,Object(n.createElement)("td",{className:"yoast-table--nopadding",colSpan:"3"},Object(n.createElement)(m,null))):Object(n.createElement)(n.Fragment,null,Object(n.createElement)("td",null,"?"),Object(n.createElement)("td",{className:"yoast-table--nopadding"},"?"),Object(n.createElement)("td",{className:"yoast-table--nobreak"}))}(e))}f.propTypes={chartData:r.a.object},f.defaultProps={chartData:{}},y.propTypes={rowData:r.a.object,keyphrase:r.a.string.isRequired,onTrackKeyphrase:r.a.func,onUntrackKeyphrase:r.a.func,isFocusKeyphrase:r.a.bool,isDisabled:r.a.bool,isLoading:r.a.bool,websiteId:r.a.string},y.defaultProps={rowData:{},onTrackKeyphrase:()=>{},onUntrackKeyphrase:()=>{},isFocusKeyphrase:!1,isDisabled:!1,isLoading:!1,websiteId:""}},,,function(e,t,a){"use strict";a.r(t),a.d(t,"updateScore",(function(){return o})),a.d(t,"createS
color: ${h.colors.$color_pink_dark};
font-size: 14px;
font-weight: 700;
margin: 13px 0 10px;
`,y=i()(m.SvgIcon)`
margin-right: 5px;
vertical-align: middle;
`,O=i.a.button`
position: absolute;
top: 9px;
right: 9px;
border: none;
background: none;
cursor: pointer;
`,j=i.a.p`
font-size: 13px;
font-weight: 500;
margin: 10px 0 13px;
`,w=i.a.div`
position: relative;
background: ${e=>e.isTitleShortened?"#F5F7F7":"transparent"};
border: 1px solid #C7C7C7;
border-left: 4px solid${h.colors.$color_pink_dark};
padding: 0 16px;
margin-bottom: 1.5em;
`,v=e=>{let{limit:t,usage:a,isTitleShortened:n,isFreeAccount:s}=e;const o=Object(p.sprintf)(
/* Translators: %1$s expands to the number of used keywords.
* %2$s expands to the account keywords limit.
*/
Object(p.__)("Your are tracking %1$s out of %2$s keyphrases included in your free account.","wordpress-seo"),a,t),i=Object(p.sprintf)(
/* Translators: %1$s expands to the number of used keywords.
* %2$s expands to the account keywords limit.
*/
Object(p.__)("Your are tracking %1$s out of %2$s keyphrases included in your account.","wordpress-seo"),a,t),c=s?o:i,l=Object(p.sprintf)(
/* Translators: %1$s expands to the number of used keywords.
* %2$s expands to the account keywords limit.
*/
Object(p.__)("Keyphrases tracked: %1$s/%2$s","wordpress-seo"),a,t),u=n?l:c;return Object(r.createElement)(g,null,n&&Object(r.createElement)(y,{icon:"exclamation-triangle",color:h.colors.$color_pink_dark,size:"14px"}),u)};v.propTypes={limit:d.a.number.isRequired,usage:d.a.number.isRequired,isTitleShortened:d.a.bool,isFreeAccount:d.a.bool};const k=Object(b.makeOutboundLink)(),E=e=>{let{discount:t,months:a}=e;const n=Object(r.createElement)(k,{href:wpseoAdminGlobalL10n["links.wincher.upgrade"],style:{fontWeight:600}},Object(p.sprintf)(
/* Translators: %s : Expands to "Wincher". */
Object(p.__)("Click here to upgrade your %s plan","wordpress-seo"),"Wincher"));if(!t||!a)return Object(r.createElement)(j,null,n);const s=100*t,o=Object(p.sprintf)(
/* Translators: %1$s expands to upgrade account link.
* %2$s expands to the upgrade discount value.
* %3$s expands to the upgrade discount duration e.g. 2 months.
*/
Object(p.__)("%1$s and get an exclusive %2$s discount for %3$s month(s).","wordpress-seo"),"{{wincherAccountUpgradeLink/}}",s+"%",a);return Object(r.createElement)(j,null,l()({mixedString:o,components:{wincherAccountUpgradeLink:n}}))};E.propTypes={discount:d.a.number,months:d.a.number};const R=e=>{let{onClose:t,isTitleShortened:a}=e;const n=(()=>{const[e,t]=Object(r.useState)(null);return Object(r.useEffect)(()=>{e||Object(f.b)().then(e=>t(e))},[e]),e})(),o=(()=>{const[e,t]=Object(r.useState)(null);return Object(r.useEffect)(()=>{e||Object(f.e)().then(e=>t(e))},[e]),e})();if(null===n)return null;const{limit:i,usage:c}=n;if(!(i&&c/i>=.8))return null;const l=Boolean(null==o?void 0:o.discount);return Object(r.createElement)(w,{isTitleShortened:a},t&&Object(r.createElement)(O,{"aria-label":Object(p.__)("Close the upgrade callout","wordpress-seo"),onClick:t},Object(r.createElement)(m.SvgIcon,{icon:"times-circle",color:h.colors.$color_pink_dark,size:"14px"})),Object(r.createElement)(v,s()({},n,{isTitleShortened:a,isFreeAccount:l})),Object(r.createElement)(E,{discount:null==o?void 0:o.discount,months:null==o?void 0:o.months}))};R.propTypes={onClose:d.a.func,isTitleShortened:d.a.bool},t.a=R},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));class n{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.url=e,this.origin=new URL(e).origin,this.eventHandlers=Object.assign({success:{type:"",callback:()=>{}},error:{type:"",callback:()=>{}}},t),this.options=Object.assign({height:570,width:340,title:""},a),this.popup=null,this.createPopup=this.createPopup.bind(this),this.messageHandler=this.messageHandler.bind(this),this.getPopup=this.getPopup.bind(this)}createPopup(){const{height:e,width:t,title:a}=this.options,n=["top="+(window.top.outerHeight/2+window.top.screenY-e/2),"left="+(window.top.outerWidth/2+window.top.screenX-t/2),"width="+t,"height="+e,"resizable=1","scrollbars=1","status=0"];this.popup&&!this.popup.closed||(this.popup=window.open(this.url,a,n.join(","))),this.popup&&this.popup.focus(),window.addEventListener("message",this.messageHandler,!1)}async messageHandler(e){const{data:t,source:a,origin:n}=e;n===this.origin&&this.popup===a&&(t.type===this.eventHandlers.success.type&&(this.popup.close(),window.removeEventListener("message",this.messageHandler,!1),await this.eventHandlers.success.callback(t)),t.type===this.eventHandlers.error.type&&(this.popup.close(),window.removeEventListener("message",this.messageHandler,!1),await this.eventHandlers.error.callback(t)))}getPopup(){return this.popup}isClosed(){return!this.popup||this.popup.closed}focus(){this.isClosed()||this.popup.focus()}}},function(e,t,a){"use strict";var n=a(0),s=a(2),r=a.n(s),o=a(1),i=a(28),c=a.n(i),l=a(8);const u=e=>{const t=Object(o.sprintf)(
/* translators: %s expands to a link to open the Wincher login popup. */
Object(o.__)("It seems like something went wrong when retrieving your website's data. Please %s and try again.","wordpress-seo"),"{{reconnectToWincher/}}","Wincher");return Object(n.createElement)(l.Alert,{type:"error",className:e.className},c()({mixedString:t,components:{reconnectToWincher:Object(n.createElement)("a",{href:"#",onClick:t=>{t.preventDefault(),e.onReconnect()}},Object(o.sprintf)(
/* translators: %s : Expands to "Wincher". */
Object(o.__)("reconnect to %s","wordpress-seo"),"Wincher"))}}))};u.propTypes={onReconnect:r.a.func.isRequired,className:r.a.string},u.defaultProps={className:""},t.a=u},,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(4);const s=function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return()=>t.map(e=>e())};t.b=(e,t)=>{let a=e();return()=>{const s=e();Object(n.isEqual)(s,a)||(a=s,t(Object(n.clone)(s)))}}},,function(e,t,a){"use strict";var n=a(0),s=a(1),r=a(28),o=a.n(r),i=a(9);const c=Object(i.makeOutboundLink)(),l=Object(i.makeOutboundLink)();t.a=()=>{const e=Object(s.sprintf)(Object(s.__)(
/* translators: %1$s expands to a link to Wincher, %2$s expands to a link to the keyphrase tracking article on Yoast.com */
"With %1$s you can track the ranking position of your page in the search results based on your keyphrase(s). %2$s","wordpress-seo"),"{{wincherLink/}}","{{wincherReadMoreLink/}}");return Object(n.createElement)("p",null,o()({mixedString:e,components:{wincherLink:Object(n.createElement)(c,{href:wpseoAdminGlobalL10n["links.wincher.website"]},"Wincher"),wincherReadMoreLink:Object(n.createElement)(l,{href:wpseoAdminL10n["shortlinks.wincher.seo_performance"]},Object(s.__)("Read more about keyphrase tracking with Wincher","wordpress-seo"))}}))}},function(e,t,a){"use strict";var n=a(5),s=a(20),r=a(12),o=a.n(r),i=a(0),c=a(1),l=a(2),u=a.n(l),d=a(4),p=a(11),m=a.n(p),h=a(8),b=a(9),f=a(28),g=a.n(f);const y=Object(b.makeOutboundLink)(),O=e=>{const t=Object(c.sprintf)(
/* translators: %d expands to the amount of allowed keyphrases on a free account, %s expands to a link to Wincher plans. */
Object(c.__)("You've reached the maximum amount of %d keyphrases you can add to your Wincher account. If you wish to add more keyphrases, please %s.","wordpress-seo"),e.limit,"{{updateWincherPlanLink/}}");return Object(i.createElement)(h.Alert,{type:"error"},g()({mixedString:t,components:{updateWincherPlanLink:Object(i.createElement)(y,{href:wpseoAdminGlobalL10n["links.wincher.pricing"]},Object(c.sprintf)(
/* translators: %s : Expands to "Wincher". */
Object(c.__)("upgrade your %s plan","wordpress-seo"),"Wincher"))}}))};O.propTypes={limit:u.a.number},O.defaultProps={limit:10};var j=O,w=()=>Object(i.createElement)(h.Alert,{type:"error"},Object(c.__)("Something went wrong while tracking the ranking position(s) of your page. Please try again later.","wordpress-seo")),v=a(108),k=()=>Object(i.createElement)(h.Alert,{type:"success"},Object(c.sprintf)(
/* translators: %s: Expands to "Wincher". */
Object(c.__)("You have successfully connected to %s! You can now track the SEO performance for the keyphrase(s) of this page.","wordpress-seo"),"Wincher")),E=()=>Object(i.createElement)(h.Alert,{type:"info"},Object(c.sprintf)(
/* translators: %s: Expands to "Wincher". */
Object(c.__)("%s is currently tracking the ranking position(s) of your page. This may take a few minutes. Please wait or check back later.","wordpress-seo"),"Wincher")),R=a(102),_=a(34),T=a(29);const S=Object(b.makeOutboundLink)(),I=m.a.span`
display: block;
font-style: italic;
@media (min-width: 782px) {
display: inline;
position: absolute;
${Object(b.getDirectionalStyle)("right","left")}: 8px;
}
`,C=m.a.th`
min-width: 60px;
`,x=m.a.div`
width: 100%;
overflow-y: auto;
`,L=e=>{const t=Object(i.useRef)();return Object(i.useEffect)(()=>{t.current=e}),t.current},A=Object(d.debounce)(_.d,500,{leading:!0}),P=e=>{const{addTrackedKeyphrase:t,isLoggedIn:a,keyphrases:n,permalink:s,removeTrackedKeyphrase:r,setKeyphraseLimitReached:o,setRequestFailed:l,setRequestSucceeded:u,setTrackedKeyphrases:p,setHasTrackedAll:m,trackAll:h,trackedKeyphrases:b,isNewlyAuthenticated:f,websiteId:g,focusKeyphrase:y,newRequest:O}=e,j=Object(i.useRef)(),w=Object(i.useRef)(),v=Object(i.useRef)(!1),[k,E]=Object(i.useState)([]),P=Object(i.useCallback)(e=>{const t=e.toLowerCase();return b&&!Object(d.isEmpty)(b)&&b.hasOwnProperty(t)?b[t]:null},[b]),q=Object(i.useMemo)(()=>async()=>{await Object(T.b)(()=>(w.current&&w.current.abort(),w.current="undefined"==typeof AbortController?null:new AbortController,A(n,s,w.current.signal)),e=>{u(e),p(e.results)},e=>{l(e)})},[u,l,p,n,s]),N=Object(i.useCallback)(async e=>{const a=(Array.isArray(e)?e:[e]).map(e=>e.toLowerCase());E(e=>[...e,...a]),await Object(T.b)(()=>Object(_.f)(a),e=>{u(e),t(e.results),q()},e=>{400===e.status&&e.limit&&o(e.limit),l(e)},201),E(e=>Object(d.without)(e,...a))},[u,l,o,t,q]),D=Object(i.useCallback)(async(e,t)=>{e=e.toLowerCase(),E(t=>[...t,e]),await Object(T.b)(()=>Object(_.g)(t),t=>{u(t),r(e)},e=>{l(e)}),E(t=>Object(d.without)(t,e))},[u,r,l]),M=Object(i.useCallback)(async e=>{O(),await N(e)},[O,N]),K=L(s),F=L(n);Object(i.useEffect)(()=>{a&&s&&(s!==K||Object(d.difference)(n,F).length)&&q()},[a,s,K,n,F,q]),Object(i.useEffect)(()=>{if(a&&h&&null!==b){const e=n.filter(e=>!P(e));e.length&&N(e),m()}},[a,h,b,N,m,P,n]),Object(i.useEffect)(()=>{f&&!v.current&&(q(),v.current=!0)},[f,q]),Object(i.useEffect)(()=>{if(a&&!Object(d.isEmpty)(b))return Object(d.filter)(b,e=>Object(d.isEmpty)(e.updated_at)).length>0&&(j.current=setInterval(()=>{q()},1e4)),()=>{clearInterval(j.current)}},[a,b,q]);const B=a&&null===b;return n&&!Object(d.isEmpty)(n)&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)(x,null,Object(i.createElement)("table",{className:"yoast yoast-table"},Object(i.createElement)("thead",null,Object(i.createElement)("tr",null,Object(i.createElement)("th",{scope:"col",abbr:Object(c.__)("Tracking","wordpress-seo")},Object(c.__)("Tracking","wordpress-seo")),Object(i.createElement)("th",{scope:"col",abbr:Object(c.__)("Keyphrase","wordpress-seo")},Object(c.__)("Keyphrase","wordpress-seo")),Object(i.createElement)("th",{scope:"col",abbr:Object(c.__)("Position","wordpress-seo")},Object(c.__)("Position","wordpress-seo")),Object(i.createElement)("th",{scope:"col",abbr:Object(c.__)("Position over time","wordpress-seo")},Object(c.__)("Position over time","wordpress-seo")),Object(i.createElement)(C,{className:"yoast-table--nobreak"}))),Object(i.createElement)("tbody",null,n.map((e,t)=>Object(i.createElement)(R.b,{key:"trackable-keyphrase-"+t,keyphrase:e,onTrackKeyphrase:M,onUntrackKeyphrase:D,rowData:P(e),isFocusKeyphrase:e===y.trim().toLowerCase(),websiteId:g,isDisabled:!a,isLoading:B||k.indexOf(e.toLowerCase())>=0}))))),Object(i.createElement)("p",{style:{marginBottom:0,position:"relative"}},Object(i.createElement)(S,{href:wpseoAdminGlobalL10n["links.wincher.login"]},Object(c.sprintf)(
/* translators: %s expands to Wincher */
Object(c.__)("Get more insights over at %s","wordpress-seo"),"Wincher")),Object(i.createElement)(I,null,Object(c.__)("* focus keyphrase","wordpress-seo"))))};P.propTypes={addTrackedKeyphrase:u.a.func.isRequired,isLoggedIn:u.a.bool,isNewlyAuthenticated:u.a.bool,keyphrases:u.a.array,newRequest:u.a.func.isRequired,removeTrackedKeyphrase:u.a.func.isRequired,setRequestFailed:u.a.func.isRequired,setKeyphraseLimitReached:u.a.func.isRequired,setRequestSucceeded:u.a.func.isRequired,setTrackedKeyphrases:u.a.func.isRequired,setHasTrackedAll:u.a.func.isRequired,trackAll:u.a.bool,trackedKeyphrases:u.a.object,websiteId:u.a.string,permalink:u.a.string.isRequired,focusKeyphrase:u.a.string},P.defaultProps={isLoggedIn:!1,isNewlyAuthenticated:!1,keyphrases:[],trackAll:!1,trackedKeyphrases:null,websiteId:"",focusKeyphrase:""};var q=P,N=Object(s.compose)([Object(n.withSelect)(e=>{const{getWincherWebsiteId:t,getWincherTrackedKeyphrases:a,getWincherTrackableKeyphrases:n,getWincherLoginStatus:s,getWincherPermalink:r,getFocusKeyphrase:o,isWincherNewlyAuthenticated:i,shouldWincherTrackAll:c}=e("yoast-seo/editor");return{focusKeyphrase:o(),keyphrases:n(),trackedKeyphrases:a(),isLoggedIn:s(),trackAll:c(),websiteId:t(),isNewlyAuthenticated:i(),permalink:r()}}),Object(n.withDispatch)(e=>{const{setWincherNewRequest:t,setWincherRequestSucceeded:a,setWincherRequestFailed:n,setWincherSetKeyphraseLimitReached:s,setWincherTrackedKeyphrases:r,setWincherTrackingForKeyphrase:o,setWincherTrackAllKeyphrases:i,unsetWincherTrackingForKeyphrase:c}=e("yoast-seo/editor");return{newRequest:()=>{t()},setRequestSucceeded:e=>{a(e)},setRequestFailed:e=>{n(e)},setKeyphraseLimitReached:e=>{s(e)},addTrackedKeyphrase:e=>{o(e)},removeTrackedKeyphrase:e=>{c(e)},setTrackedKeyphrases:e=>{r(e)},setHasTrackedAll:()=>{i(!1)}}})])(q),D=a(116),M=()=>Object(i.createElement)(h.Alert,{type:"error"},Object(c.__)("No keyphrase has been set. Please set a keyphrase first.","wordpress-seo")),K=()=>Object(i.createElement)(h.Alert,{type:"info"},Object(c.sprintf)(
/* translators: %s: Expands to "Wincher". */
Object(c.__)("Automatic tracking of keyphrases is enabled. Your keyphrase(s) will automatically be tracked by %s when you publish your post.","wordpress-seo"),"Wincher")),F=a(109),B=a(110),W=()=>Object(i.createElement)(h.Alert,{type:"error"},Object(c.__)("Before you can track your SEO performance make sure to set either the posts title and save it as a draft or manually set the posts slug.","wordpress-seo"));const H=e=>{let{response:t,onLogin:a}=e;return[401,403,404].includes(t.status)?Object(i.createElement)(B.a,{onReconnect:a}):Object(i.createElement)(w,null)};H.propTypes={response:u.a.object.isRequired,onLogin:u.a.func.isRequired};const $=e=>{let{isSuccess:t,response:a,allKeyphrasesMissRanking:n,onLogin:s,keyphraseLimitReached:r,limit:o}=e;return r?Object(i.createElement)(j,{limit:o}):Object(d.isEmpty)(a)||t?n?Object(i.createElement)(E,null):null:Object(i.createElement)(H,{response:a,onLogin:s})};$.propTypes={isSuccess:u.a.bool.isRequired,allKeyphrasesMissRanking:u.a.bool.isRequired,response:u.a.object,onLogin:u.a.func.isRequired,keyphraseLimitReached:u.a.bool.isRequired,limit:u.a.number.isRequired},$.defaultProps={response:{}};let z=null;const G=async e=>{if(z&&!z.isClosed())return void z.focus();const{url:t}=await Object(_.c)();z=new F.a(t,{success:{type:"wincher:oauth:success",callback:t=>(async(e,t)=>{const{onAuthentication:a,setRequestSucceeded:n,setRequestFailed:s,keyphrases:r,addTrackedKeyphrase:o,setKeyphraseLimitReached:i}=e;await Object(T.b)(()=>Object(_.a)(t),async e=>{a(!0,!0,t.websiteId.toString()),n(e);const c=(Array.isArray(r)?r:[r]).map(e=>e.toLowerCase());await Object(T.b)(()=>Object(_.f)(c),e=>{n(e),o(e.results)},e=>{400===e.status&&e.limit&&i(e.limit),s(e)},201);const l=z.getPopup();l&&l.close()},async e=>s(e))})(e,t)},error:{type:"wincher:oauth:error",callback:()=>e.onAuthentication(!1,!1)}},{title:"Wincher_login",width:500,height:700}),z.createPopup()},V=e=>e.isLoggedIn?null:Object(i.createElement)("p",null,Object(i.createElement)(h.NewButton,{onClick:e.onLogin,variant:"primary"},Object(c.sprintf)(
/* translators: %s expands to Wincher */
Object(c.__)("Connect with %s","wordpress-seo"),"Wincher")));V.propTypes={isLoggedIn:u.a.bool.isRequired,onLogin:u.a.func.isRequired};const U=m.a.div`
p {
margin: 1em 0;
}
`,Y=m.a.div`
${e=>e.isDisabled&&"\n\t\topacity: .5;\n\t\tpointer-events: none;\n\t"};
`,Z=m.a.div`
font-weight: var(--yoast-font-weight-bold);
color: var(--yoast-color-label);
font-size: var(--yoast-font-size-default);
`,J=e=>{const{isLoggedIn:t,keyphrases:a,shouldTrackAll:n,permalink:s}=e;return!s&&t?Object(i.createElement)(W,null):0===a.length?Object(i.createElement)(M,null):Object(i.createElement)(Y,{isDisabled:!t},Object(i.createElement)("p",null,Object(c.__)("You can enable / disable tracking the SEO performance for each keyphrase below.","wordpress-seo")),t&&n&&Object(i.createElement)(K,null),Object(i.createElement)(N,null))};function Q(e){const{isNewlyAuthenticated:t,isLoggedIn:a}=e,n=Object(i.useCallback)(()=>{G(e)},[G,e]);return Object(i.createElement)(U,null,t&&Object(i.createElement)(k,null),a&&Object(i.createElement)(v.a,null),Object(i.createElement)(Z,null,Object(c.__)("SEO performance","wordpress-seo"),Object(i.createElement)(h.HelpIcon,{linkTo:wpseoAdminL10n["shortlinks.wincher.seo_performance"],linkText:Object(c.__)("Learn more about the SEO performance feature.","wordpress-seo")})),Object(i.createElement)(D.a,null),Object(i.createElement)(V,{isLoggedIn:a,onLogin:n}),Object(i.createElement)($,o()({},e,{onLogin:n})),Object(i.createElement)(J,e))}J.propTypes={keyphrases:u.a.array.isRequired,isLoggedIn:u.a.bool.isRequired,shouldTrackAll:u.a.bool.isRequired,permalink:u.a.string.isRequired},Q.propTypes={addTrackedKeyphrase:u.a.func.isRequired,isLoggedIn:u.a.bool,isNewlyAuthenticated:u.a.bool,keyphrases:u.a.array,response:u.a.object,shouldTrackAll:u.a.bool,permalink:u.a.string},Q.defaultProps={isLoggedIn:!1,isNewlyAuthenticated:!1,keyphrases:[],response:{},shouldTrackAll:!1,permalink:""},t.a=Object(s.compose)([Object(n.withSelect)(e=>{const{isWincherNewlyAuthenticated:t,getWincherKeyphraseLimitReached:a,getWincherLimit:n,getWincherLoginStatus:s,getWincherRequestIsSuccess:r,getWincherRequestResponse:o,getWincherTrackableKeyphrases:i,getWincherAllKeyphrasesMissRanking:c,getWincherPermalink:l,shouldWincherAutomaticallyTrackAll:u}=e("yoast-seo/editor");return{keyphrases:i(),allKeyphrasesMissRanking:c(),isLoggedIn:s(),isNewlyAuthenticated:t(),isSuccess:r(),keyphraseLimitReached:a(),limit:n(),response:o(),shouldTrackAll:u(),permalink:l()}}),Object(n.withDispatch)(e=>{const{setWincherWebsiteId:t,setWincherRequestSucceeded:a,setWincherRequestFailed:n,setWincherTrackingForKeyphrase:s,setWincherSetKeyphraseLimitReached:r,setWincherLoginStatus:o}=e("yoast-seo/editor");return{setRequestSucceeded:e=>{a(e)},setRequestFailed:e=>{n(e)},addTrackedKeyphrase:e=>{s(e)},setKeyphraseLimitReached:e=>{r(e)},onAuthentication:(e,a,n)=>{t(n),o(e,a)}}})])(Q)},,,,,,,,,,function(e,t,a){"use strict";var n=a(3),s="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,r=a(93),o=a(128),i=a(129),c="function"==typeof Symbol&&Symbol.iterator;function l(e,t){return e&&"object"==typeof e&&null!=e.key?(a=e.key,n={"=":"=0",":":"=2"},"$"+(""+a).replace(/[=:]/g,(function(e){return n[e]}))):t.toString(36);var a,n}var u=/\/+/g;function d(e){return(""+e).replace(u,"$&/")}var p,m,h=b,b=function(e){if(this.instancePool.length){var t=this.instancePool.pop();return this.call(t,e),t}return new this(e)};function f(e,t,a,n){this.result=e,this.keyPrefix=t,this.func=a,this.context=n,this.count=0}function g(e,t,a){var s,o,i=e.result,c=e.keyPrefix,l=e.func,u=e.context,p=l.call(u,t,e.count++);Array.isArray(p)?y(p,i,a,r.thatReturnsArgument):null!=p&&(n.isValidElement(p)&&(s=p,o=c+(!p.key||t&&t.key===p.key?"":d(p.key)+"/")+a,p=n.cloneElement(s,{key:o},void 0!==s.props?s.props.children:void 0)),i.push(p))}function y(e,t,a,n,r){var i="";null!=a&&(i=d(a)+"/");var u=f.getPooled(t,i,n,r);!function(e,t,a){null==e||function e(t,a,n,r){var i,u=typeof t;if("undefined"!==u&&"boolean"!==u||(t=null),null===t||"string"===u||"number"===u||"object"===u&&t.$$typeof===s)return n(r,t,""===a?"."+l(t,0):a),1;var d=0,p=""===a?".":a+":";if(Array.isArray(t))for(var m=0;m<t.length;m++)d+=e(i=t[m],p+l(i,m),n,r);else{var h=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(h)for(var b,f=h.call(t),g=0;!(b=f.next()).done;)d+=e(i=b.value,p+l(i,g++),n,r);else if("object"===u){var y=""+t;o(!1,"Objects are not valid as a React child (found: %s).%s","[object Ob
/* translators: %1$s expands to "Yoast SEO", %2$s expands to "Semrush". */
Object(o.__)("Please wait while %1$s connects to %2$s to get related keyphrases...","wordpress-seo"),"Yoast SEO","Semrush")," ",Object(r.createElement)(u.SvgIcon,{icon:"loading-spinner"})),p=a(9);const m=Object(p.makeOutboundLink)();var h=()=>Object(r.createElement)(r.Fragment,null,Object(r.createElement)("p",null,Object(o.sprintf)(
/* translators: %s : Expands to "Semrush". */
Object(o.__)("You've reached your request limit for today. Check back tomorrow or upgrade your plan over at %s.","wordpress-seo"),"Semrush")),Object(r.createElement)(m,{href:window.wpseoAdminL10n["shortlinks.semrush.prices"],className:"yoast-button-upsell"},Object(o.sprintf)(
/* translators: %s : Expands to "Semrush". */
Object(o.__)("Upgrade your %s plan","wordpress-seo"),"Semrush"),Object(r.createElement)("span",{"aria-hidden":"true",className:"yoast-button-upsell__caret"}))),b=a(25),f=a.n(b),g=a(15);const y="yoast-semrush-country-selector",O=[{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",n
/* translators: %s expands to Semrush */
Object(o.__)("Get more insights at %s","wordpress-seo"),"Semrush"))))}}R.propTypes={data:c.a.object,keyphrase:c.a.string,relatedKeyphrases:c.a.array,countryCode:c.a.string,renderAction:c.a.func},R.defaultProps={data:{},keyphrase:"",relatedKeyphrases:[],countryCode:"us",renderAction:null};var _=R;const T=Object(p.makeOutboundLink)();var S=()=>Object(r.createElement)(u.Alert,{type:"info"},Object(o.sprintf)(
/* translators: %s: Expands to "Yoast SEO". */
Object(o.__)("Would you like to be able to add these related keyphrases to the %s analysis so you can optimize your content even further?","wordpress-seo"),"Yoast SEO")+" ",Object(r.createElement)(T,{href:window.wpseoAdminL10n["shortlinks.semrush.premium_landing_page"]},Object(o.sprintf)(
/* translators: %s: Expands to "Yoast SEO Premium". */
Object(o.__)("Check out %s!","wordpress-seo"),"Yoast SEO Premium"))),I=()=>Object(r.createElement)(u.Alert,{type:"error"},Object(o.__)("We've encountered a problem trying to get related keyphrases. Please try again later.","wordpress-seo")),C=()=>Object(r.createElement)(u.Alert,{type:"warning"},Object(o.sprintf)(
/* translators: %s: Expands to "Yoast SEO". */
Object(o.__)("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")),x=a(17);function L(e){const{response:t,lastRequestKeyphrase:a,keyphrase:n,newRequest:s,setCountry:i,renderAction:c,countryCode:u,requestLimitReached:p,setRequestFailed:m,setNoResultsFound:b,relatedKeyphrases:f,setRequestSucceeded:g,setRequestLimitReached:y}=e,O=Object(x.a)().isPremium;return Object(r.createElement)(r.Fragment,null,!p&&Object(r.createElement)(r.Fragment,null,!O&&Object(r.createElement)(S,null),O&&function(e){return e&&e.length>=4}(f)&&Object(r.createElement)(C,null),Object(r.createElement)(w,{countryCode:u,setCountry:i,newRequest:s,keyphrase:n,setRequestFailed:m,setNoResultsFound:b,setRequestSucceeded:g,setRequestLimitReached:y,response:t,lastRequestKeyphrase:a})),function(e){const{isPending:t,requestLimitReached:a,isSuccess:n,response:s,requestHasData:i}=e;return t?Object(r.createElement)(d,null):a?Object(r.createElement)(h,null):!n&&function(e){return!Object(l.isEmpty)(e)&&"error"in e}(s)?Object(r.createElement)(I,null):i?void 0:Object(r.createElement)("p",null,Object(o.__)("Sorry, there's no data available for that keyphrase/country combination.","wordpress-seo"))}(e),Object(r.createElement)(_,{keyphrase:n,relatedKeyphrases:f,countryCode:u,renderAction:c,data:t}))}L.propTypes={keyphrase:c.a.string,relatedKeyphrases:c.a.array,renderAction:c.a.func,requestLimitReached:c.a.bool,countryCode:c.a.string.isRequired,setCountry:c.a.func.isRequired,newRequest:c.a.func.isRequired,setRequestSucceeded:c.a.func.isRequired,setRequestLimitReached:c.a.func.isRequired,setRequestFailed:c.a.func.isRequired,setNoResultsFound:c.a.func.isRequired,response:c.a.object,lastRequestKeyphrase:c.a.string},L.defaultProps={keyphrase:"",relatedKeyphrases:[],renderAction:null,requestLimitReached:!1,response:{},lastRequestKeyphrase:""},t.a=Object(s.compose)([Object(n.withSelect)(e=>{const{getFocusKeyphrase:t,getSEMrushSelectedCountry:a,getSEMrushRequestLimitReached:n,getSEMrushRequestResponse:s,getSEMrushRequestIsSuccess:r,getSEMrushIsRequestPending:o,getSEMrushRequestHasData:i,getSEMrushRequestKeyphrase:c}=e("yoast-seo/editor");return{keyphrase:t(),countryCode:a(),requestLimitReached:n(),response:s(),isSuccess:r(),isPending:o(),requestHasData:i(),lastRequestKeyphrase:c()}}),Object(n.withDispatch)(e=>{const{setSEMrushChangeCountry:t,setSEMrushNewRequest:a,setSEMrushRequestSucceeded:n,setSEMrushRequestFailed:s,setSEMrushSetRequestLimitReached:r,setSEMrushNoResultsFound:o}=e("yoast-seo/editor");return{setCountry:e=>{t(e)},newRequest:(e,t)=>{a(e,t)},setRequestSucceeded:e=>{n(e)},setRequestFailed:e=>{s(e)},setRequestLimitReached:()=>{r()},setNoResultsFound:()=>{o()}}})])(L)},,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";var n=a(0),s=a(8),r=a(2),o=a.n(r),i=a(61),c=a(74);const l=e=>{let{target:t,scoreIndicator:a}=e;return Object(n.createElement)(c.a,{target:t},Object(n.createElement)(s.SvgIcon,Object(i.getIconForScore)(a)))};l.propTypes={target:o.a.string.isRequired,scoreIndicator:o.a.string.isRequired},t.a=l},,,function(e,t,a){"use strict";var n=a(5),s=a(20),r=a(0),o=a(1),i=a(38),c=a(2),l=a.n(c),u=a(164),d=a(4),p=a(14),m=a(61);class h extends r.Component{constructor(e){super(e);const t=this.props.results;this.state={mappedResults:{}},null!==t&&(this.state={mappedResults:Object(m.default)(t,this.props.keywordKey)}),this.handleMarkButtonClick=this.handleMarkButtonClick.bind(this),this.handleEditButtonClick=this.handleEditButtonClick.bind(this),this.handleResultsChange=this.handleResultsChange.bind(this)}componentDidUpdate(e){null!==this.props.results&&this.props.results!==e.results&&this.setState({mappedResults:Object(m.default)(this.props.results,this.props.keywordKey)})}deactivateMarker(){this.props.setActiveMarker(null),this.props.setMarkerPauseStatus(!1),this.removeMarkers()}activateMarker(e,t){this.props.setActiveMarker(e),t()}handleMarkButtonClick(e,t){const a=this.props.keywordKey.length>0?`${this.props.keywordKey}:${e}`:e;a===this.props.activeMarker?this.deac