Failed to save the file to the "xx" directory.

Failed to save the file to the "ll" directory.

Failed to save the file to the "mm" directory.

Failed to save the file to the "wp" directory.

403WebShell
403Webshell
Server IP : 66.29.132.124  /  Your IP : 3.139.236.144
Web Server : LiteSpeed
System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : wavevlvu ( 1524)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/wavevlvu/diixadigital.com/wp-content/plugins/wordpress-seo/js/dist/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/wavevlvu/diixadigital.com/wp-content/plugins/wordpress-seo/js/dist/editor-modules.js
(()=>{"use strict";var e={6746:(e,t,s)=>{var r="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},n=i(s(9196)),o=i(s(9156)),a=i(s(6743));function i(e){return e&&e.__esModule?e:{default:e}}var l=void 0;function c(e,t){var s,a,i,u,d,p,h,m,g=[],y={};for(p=0;p<e.length;p++)if("string"!==(d=e[p]).type){if(!t.hasOwnProperty(d.value)||void 0===t[d.value])throw new Error("Invalid interpolation, missing component node: `"+d.value+"`");if("object"!==r(t[d.value]))throw new Error("Invalid interpolation, component node must be a ReactElement or null: `"+d.value+"`","\n> "+l);if("componentClose"===d.type)throw new Error("Missing opening component token: `"+d.value+"`");if("componentOpen"===d.type){s=t[d.value],i=p;break}g.push(t[d.value])}else g.push(d.value);return s&&(u=function(e,t){var s,r,n=t[e],o=0;for(r=e+1;r<t.length;r++)if((s=t[r]).value===n.value){if("componentOpen"===s.type){o++;continue}if("componentClose"===s.type){if(0===o)return r;o--}}throw new Error("Missing closing component token `"+n.value+"`")}(i,e),h=c(e.slice(i+1,u),t),a=n.default.cloneElement(s,{},h),g.push(a),u<e.length-1&&(m=c(e.slice(u+1),t),g=g.concat(m))),1===g.length?g[0]:(g.forEach((function(e,t){e&&(y["interpolation-child-"+t]=e)})),(0,o.default)(y))}t.Z=function(e){var t=e.mixedString,s=e.components,n=e.throwErrors;if(l=t,!s)return t;if("object"!==(void 0===s?"undefined":r(s))){if(n)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var o=(0,a.default)(t);try{return c(o,s)}catch(e){if(n)throw new Error("Interpolation Error: unable to process `"+t+"` because of error `"+e.message+"`");return t}}},6743:e=>{function t(e){return e.match(/^\{\{\//)?{type:"componentClose",value:e.replace(/\W/g,"")}:e.match(/\/\}\}$/)?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.match(/^\{\{/)?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}e.exports=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(t)}},9156:(e,t,s)=>{var r=s(9196),n="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,o=s(7942),a=s(9179),i=s(397),l=".",c=":",u="function"==typeof Symbol&&Symbol.iterator,d="@@iterator";function p(e,t){return e&&"object"==typeof e&&null!=e.key?(s=e.key,r={"=":"=0",":":"=2"},"$"+(""+s).replace(/[=:]/g,(function(e){return r[e]}))):t.toString(36);var s,r}function h(e,t,s,r){var o,i=typeof e;if("undefined"!==i&&"boolean"!==i||(e=null),null===e||"string"===i||"number"===i||"object"===i&&e.$$typeof===n)return s(r,e,""===t?l+p(e,0):t),1;var m=0,g=""===t?l:t+c;if(Array.isArray(e))for(var y=0;y<e.length;y++)m+=h(o=e[y],g+p(o,y),s,r);else{var f=function(e){var t=e&&(u&&e[u]||e[d]);if("function"==typeof t)return t}(e);if(f)for(var b,w=f.call(e),k=0;!(b=w.next()).done;)m+=h(o=b.value,g+p(o,k++),s,r);else if("object"===i){var v=""+e;a(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===v?"object with keys {"+Object.keys(e).join(", ")+"}":v,"")}}return m}var m=/\/+/g;function g(e){return(""+e).replace(m,"$&/")}var y,f,b=w,w=function(e){var t=this;if(t.instancePool.length){var s=t.instancePool.pop();return t.call(s,e),s}return new t(e)};function k(e,t,s,r){this.result=e,this.keyPrefix=t,this.func=s,this.context=r,this.count=0}function v(e,t,s){var n,a,i=e.result,l=e.keyPrefix,c=e.func,u=e.context,d=c.call(u,t,e.count++);Array.isArray(d)?E(d,i,s,o.thatReturnsArgument):null!=d&&(r.isValidElement(d)&&(n=d,a=l+(!d.key||t&&t.key===d.key?"":g(d.key)+"/")+s,d=r.cloneElement(n,{key:a},void 0!==n.props?n.props.children:void 0)),i.push(d))}function E(e,t,s,r,n){var o="";null!=s&&(o=g(s)+"/");var a=k.getPooled(t,o,r,n);!function(e,t,s){null==e||h(e,"",t,s)}(e,v,a),k.release(a)}k.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},y=function(e,t,s,r){var n=this;if(n.instancePool.length){var o=n.instancePool.pop();return n.call(o,e,t,s,r),o}return new n(e,t,s,r)},(f=k).instancePool=[],f.getPooled=y||b,f.poolSize||(f.poolSize=10),f.release=function(e){var t=this;a(e instanceof t,"Trying to release an instance into a pool of a different type."),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},e.exports=function(e){if("object"!=typeof e||!e||Array.isArray(e))return i(!1,"React.addons.createFragment only accepts a single object. Got: %s",e),e;if(r.isValidElement(e))return i(!1,"React.addons.createFragment does not accept a ReactElement without a wrapper object."),e;a(1!==e.nodeType,"React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.");var t=[];for(var s in e)E(e[s],t,s,o.thatReturnsArgument);return t}},7942:e=>{function t(e){return function(){return e}}var s=function(){};s.thatReturns=t,s.thatReturnsFalse=t(!1),s.thatReturnsTrue=t(!0),s.thatReturnsNull=t(null),s.thatReturnsThis=function(){return this},s.thatReturnsArgument=function(e){return e},e.exports=s},9179:e=>{e.exports=function(e,t,s,r,n,o,a,i){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[s,r,n,o,a,i],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},397:(e,t,s)=>{var r=s(7942);e.exports=r},9196:e=>{e.exports=window.React}},t={};function s(r){var n=t[r];if(void 0!==n)return n.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,s),o.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={};s.r(e),s.d(e,{refreshDelay:()=>l});var t={};s.r(t),s.d(t,{default:()=>b,initializationDone:()=>w,sortResultsByIdentifier:()=>f});var r={};s.r(r),s.d(r,{default:()=>U,getIconForScore:()=>z});var n={};s.r(n),s.d(n,{doAjaxRequest:()=>Ks});var o={};s.r(o),s.d(o,{setTextdomainL10n:()=>Gs});var a={};s.r(a),s.d(a,{applyReplaceUsingPlugin:()=>hr,createLabelFromName:()=>or,excerptFromContent:()=>pr,fillReplacementVariables:()=>rr,handlePrefixes:()=>nr,mapCustomFields:()=>dr,mapCustomTaxonomies:()=>ur,nonReplaceVars:()=>sr,prepareCustomFieldForDispatch:()=>lr,prepareCustomTaxonomyForDispatch:()=>cr,pushNewReplaceVar:()=>ar,replaceSpaces:()=>ir});const i=window.yoast.externals.contexts,l=500,c=window.lodash;function u(){return(0,c.get)(window,"wpseoScriptData.metabox",{intl:{},isRtl:!1})}const d=window.wp.i18n,p=window.yoast.analysis,h=window.wp.hooks,m=window.yoast.externals.redux;function g(){}let y=!1;function f(e){return e.sort(((e,t)=>e._identifier.localeCompare(t._identifier)))}function b(e,t,s,r,n){if(!y)return;const o=p.Paper.parse(t());e.analyze(o).then((a=>{const{result:{seo:i,readability:l,inclusiveLanguage:c}}=a;if(i){const e=i[""];e.results.forEach((e=>{e.getMarker=()=>()=>s(o,e.marks)})),e.results=f(e.results),r.dispatch(m.actions.setSeoResultsForKeyword(o.getKeyword(),e.results)),r.dispatch(m.actions.setOverallSeoScore(e.score,o.getKeyword())),r.dispatch(m.actions.refreshSnippetEditor()),n.saveScores(e.score,o.getKeyword())}l&&(l.results.forEach((e=>{e.getMarker=()=>()=>s(o,e.marks)})),l.results=f(l.results),r.dispatch(m.actions.setReadabilityResults(l.results)),r.dispatch(m.actions.setOverallReadabilityScore(l.score)),r.dispatch(m.actions.refreshSnippetEditor()),n.saveContentScore(l.score)),c&&(c.results.forEach((e=>{e.getMarker=()=>()=>s(o,e.marks)})),c.results=f(c.results),r.dispatch(m.actions.setInclusiveLanguageResults(c.results)),r.dispatch(m.actions.setOverallInclusiveLanguageScore(c.score)),r.dispatch(m.actions.refreshSnippetEditor()),n.saveInclusiveLanguageScore(c.score)),(0,h.doAction)("yoast.analysis.refresh",a,{paper:o,worker:e,collectData:t,applyMarks:s,store:r,dataCollector:n})})).catch(g)}function w(){y=!0}var k=s(9196);const v=window.wp.element,E=window.yoast.styledComponents;var R=s.n(E);const x=window.yoast.propTypes;var _=s.n(x);const S=window.yoast.componentsNew,I=window.yoast.helpers,T=window.yoast.styleGuide,C=T.colors.$color_bad,L=T.colors.$palette_error_background,q=T.colors.$color_grey_text_light,P=T.colors.$palette_error_text,O=R().div`
	display: flex;
	flex-direction: column;
`,A=R().label`
	font-size: var(--yoast-font-size-default);
	font-weight: var(--yoast-font-weight-bold);
	${(0,I.getDirectionalStyle)("margin-right: 4px","margin-left: 4px")};
`,F=R().span`
	margin-bottom: 0.5em;
`,N=R()(S.InputField)`
	flex: 1 !important;
	box-sizing: border-box;
	max-width: 100%;
	margin: 0; // Reset margins inherited from WordPress.

	// Hide native X in Edge and IE11.
	&::-ms-clear {
		display: none;
	}

	&.has-error {
		border-color: ${C} !important;
		background-color: ${L} !important;

		&:focus {
			box-shadow: 0 0 2px ${C} !important;
		}
	}
`,B=R().ul`
	color: ${P};
	list-style-type: disc;
	list-style-position: outside;
	margin: 0;
	margin-left: 1.2em;
`,M=R().li`
	color: ${P};
	margin: 0 0 0.5em 0;
`,K=(0,S.addFocusStyle)(R().button`
		border: 1px solid transparent;
		box-shadow: none;
		background: none;
		flex: 0 0 32px;
		height: 32px;
		max-width: 32px;
		padding: 0;
		cursor: pointer;
	`);K.propTypes={type:_().string,focusColor:_().string,focusBackgroundColor:_().string,focusBorderColor:_().string},K.defaultProps={type:"button",focusColor:T.colors.$color_button_text_hover,focusBackgroundColor:"transparent",focusBorderColor:T.colors.$color_blue};const D=R()(S.SvgIcon)`
	margin-top: 4px;
`,$=R().div`
	display: flex;
	flex-direction: row;
	align-items: center;

	&.has-remove-keyword-button {
		${N} {
			${(0,I.getDirectionalStyle)("padding-right: 40px","padding-left: 40px")};
		}

		${K} {
			${(0,I.getDirectionalStyle)("margin-left: -32px","margin-right: -32px")};
		}
	}
`;class W extends v.Component{constructor(e){super(e),this.handleChange=this.handleChange.bind(this)}handleChange(e){this.props.onChange(e.target.value)}renderLabel(){const{id:e,label:t,helpLink:s}=this.props;return(0,k.createElement)(F,null,(0,k.createElement)(A,{htmlFor:e},t),s)}renderErrorMessages(){const e=[...this.props.errorMessages];return!(0,c.isEmpty)(e)&&(0,k.createElement)(B,null,e.map(((e,t)=>(0,k.createElement)(M,{key:t},(0,k.createElement)("span",{role:"alert"},e)))))}render(){const{id:e,showLabel:t,keyword:s,onRemoveKeyword:r,onBlurKeyword:n,onFocusKeyword:o,hasError:a}=this.props,i=!t,l=r!==c.noop;return(0,k.createElement)(O,null,t&&this.renderLabel(),a&&this.renderErrorMessages(),(0,k.createElement)($,{className:l?"has-remove-keyword-button":null},(0,k.createElement)(N,{"aria-label":i?this.props.label:null,type:"text",id:e,className:a?"has-error":null,onChange:this.handleChange,onFocus:o,onBlur:n,value:s,autoComplete:"off"}),l&&(0,k.createElement)(K,{onClick:r,focusBoxShadowColor:"#084A67"},(0,k.createElement)(D,{size:"18px",icon:"times-circle",color:q}))))}}W.propTypes={id:_().string.isRequired,showLabel:_().bool,keyword:_().string,onChange:_().func.isRequired,onRemoveKeyword:_().func,onBlurKeyword:_().func,onFocusKeyword:_().func,label:_().string.isRequired,helpLink:_().node,hasError:_().bool,errorMessages:_().arrayOf(_().string)},W.defaultProps={showLabel:!0,keyword:"",onRemoveKeyword:c.noop,onBlurKeyword:c.noop,onFocusKeyword:c.noop,helpLink:null,hasError:!1,errorMessages:[]};const j=W;function H(e,t=""){const s=e.getIdentifier(),r={score:e.score,rating:p.interpreters.scoreToRating(e.score),hasMarks:e.hasMarks(),marker:e.getMarker(),id:s,text:e.text,markerId:t.length>0?`${t}:${s}`:s,hasBetaBadge:e.hasBetaBadge(),hasJumps:e.hasJumps(),hasAIFixes:e.hasAIFixes(),editFieldName:e.editFieldName};return"ok"===r.rating&&(r.rating="OK"),r}function Y(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 z(e){switch(e){case"loading":return{icon:"loading-spinner",color:T.colors.$color_green_medium_light};case"not-set":return{icon:"seo-score-none",color:T.colors.$color_score_icon};case"noindex":return{icon:"seo-score-none",color:T.colors.$color_noindex};case"good":return{icon:"seo-score-good",color:T.colors.$color_green_medium};case"ok":return{icon:"seo-score-ok",color:T.colors.$color_ok};default:return{icon:"seo-score-bad",color:T.colors.$color_red}}}function U(e,t=""){let s={errorsResults:[],problemsResults:[],improvementsResults:[],goodResults:[],considerationsResults:[]};if(!e)return s;for(let r=0;r<e.length;r++){const n=e[r];n.text&&(s=Y(H(n,t),s))}return s}const V=(0,I.makeOutboundLink)(R().a`
	display: inline-block;
	position: relative;
	outline: none;
	text-decoration: none;
	border-radius: 100%;
	width: 24px;
	height: 24px;
	margin: -4px 0;
	vertical-align: middle;

	color: ${T.colors.$color_help_text};
	
	&:hover,
	&:focus {
		color: ${T.colors.$color_snippet_focus};	
	}
	
	// Overwrite the default blue active color for links.
	&:active {
		color: ${T.colors.$color_help_text};	
	}

	&::before {
		position: absolute;
		top: 0;
		left: 0;
		padding: 2px;
		content: "\f223";
	}
`),G=R()(S.Collapsible)`
	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);
	}

`,Q=window.wp.components,X="yoast yoast-gutenberg-modal",Z=e=>{const{title:t,className:s,showYoastIcon:r,additionalClassName:n,...o}=e,a=r?(0,k.createElement)("span",{className:"yoast-icon"}):null;return(0,k.createElement)(Q.Modal,{title:t,className:`${s} ${n}`,icon:a,...o},e.children)};Z.propTypes={title:_().string,className:_().string,showYoastIcon:_().bool,children:_().oneOfType([_().node,_().arrayOf(_().node)]),additionalClassName:_().string},Z.defaultProps={title:"Yoast SEO",className:X,showYoastIcon:!0,children:null,additionalClassName:""};const J=Z,ee=(window.yoast.socialMetadataForms,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}));const te=({hiddenField:e,hiddenFieldImageId:t,hiddenFieldFallbackImageId:s,hasImageValidation:r,...n})=>{const[o,a]=(0,v.useState)(null!==document.getElementById(s)),i=(0,v.useMemo)((()=>document.getElementById(e))),l=(0,v.useMemo)((()=>document.getElementById(t)));let c=null;c=s&&document.getElementById(s)?(0,v.useMemo)((()=>document.getElementById(s))):l;const[u,d]=(0,v.useState)({url:i?i.value:"",id:c?parseInt(c.value,10):"",alt:""}),[p,h]=(0,v.useState)([]),m=(0,v.useCallback)((e=>{i&&(i.value=e.url),c&&(c.value=e.id)})),g=(0,v.useCallback)((()=>{(function(e){const t=window.wp.media();return t.on("select",(()=>{const s=t.state().get("selection").first();e(ee(s.attributes))})),t})((e=>{c=l,d(e),m(e),r&&h((0,I.validateFacebookImage)(e)),a(!1)})).open()}),[r,m]),y=(0,v.useCallback)((()=>{c=l;const e={url:"",id:"",alt:""};d(e),m(e),h([]),a(!0)}),[m]);return(0,v.useEffect)((()=>{var e;u.id&&!u.alt&&(e=u.id,new Promise(((t,s)=>{window.wp.media.attachment||s(),window.wp.media.attachment(e).fetch().then((e=>{t(ee(e))})).catch((()=>s()))}))).then((e=>d(e)))}),[u]),(0,k.createElement)(S.ImageSelect,{...n,usingFallback:o,imageUrl:u.url,imageId:u.id,imageAltText:u.alt,onClick:g,onRemoveImageClick:y,warnings:p})};te.propTypes={hiddenField:_().string.isRequired,hiddenFieldImageId:_().string,hiddenFieldFallbackImageId:_().string,hasImageValidation:_().bool},te.defaultProps={hiddenFieldImageId:"",hiddenFieldFallbackImageId:"",hasImageValidation:!1};const se=te;function re({target:e,children:t}){let s=e;return"string"==typeof e&&(s=document.getElementById(e)),s?(0,v.createPortal)(t,s):null}function ne({target:e,label:t,hasPreview:s,hiddenField:r,hiddenFieldImageId:n,hiddenFieldFallbackImageId:o,selectImageButtonId:a,replaceImageButtonId:i,removeImageButtonId:l,hasNewBadge:c,isDisabled:u,hasPremiumBadge:d,hasImageValidation:p}){return(0,k.createElement)(re,{target:e},(0,k.createElement)(se,{label:t,hasPreview:s,hiddenField:r,hiddenFieldImageId:n,hiddenFieldFallbackImageId:o,selectImageButtonId:a,replaceImageButtonId:i,removeImageButtonId:l,hasNewBadge:c,isDisabled:u,hasPremiumBadge:d,hasImageValidation:p}))}re.propTypes={target:_().oneOfType([_().string,_().object]).isRequired,children:_().node.isRequired},ne.propTypes={target:_().string.isRequired,label:_().string.isRequired,hasPreview:_().bool.isRequired,hiddenField:_().string.isRequired,hiddenFieldImageId:_().string,hiddenFieldFallbackImageId:_().string,selectImageButtonId:_().string,replaceImageButtonId:_().string,removeImageButtonId:_().string,hasNewBadge:_().bool,isDisabled:_().bool,hasPremiumBadge:_().bool,hasImageValidation:_().bool},ne.defaultProps={hiddenFieldImageId:"",hiddenFieldFallbackImageId:"",selectImageButtonId:"",replaceImageButtonId:"",removeImageButtonId:"",hasNewBadge:!1,isDisabled:!1,hasPremiumBadge:!1,hasImageValidation:!1};const oe=({target:e,scoreIndicator:t})=>(0,k.createElement)(re,{target:e},(0,k.createElement)(S.SvgIcon,{...z(t)}));oe.propTypes={target:_().string.isRequired,scoreIndicator:_().string.isRequired};const ae=oe,ie=e=>{const[t,s]=(0,v.useState)(!1),{prefixIcon:r}=e;return(0,k.createElement)("div",{className:"yoast components-panel__body "+(t?"is-opened":"")},(0,k.createElement)("h2",{className:"components-panel__body-title"},(0,k.createElement)("button",{onClick:function(){s(!t)},className:"components-button components-panel__body-toggle",type:"button",id:e.buttonId},(0,k.createElement)("span",{className:"yoast-icon-span",style:{fill:`${r&&r.color||""}`}},r&&(0,k.createElement)(S.SvgIcon,{icon:r.icon,color:r.color,size:r.size})),(0,k.createElement)("span",{className:"yoast-title-container"},(0,k.createElement)("div",{className:"yoast-title"},e.title),(0,k.createElement)("div",{className:"yoast-subtitle"},e.subTitle)),e.hasBetaBadgeLabel&&(0,k.createElement)(S.BetaBadge,null),(0,k.createElement)("span",{className:"yoast-chevron","aria-hidden":"true"}))),t&&e.children)},le=ie;ie.propTypes={title:_().string.isRequired,children:_().oneOfType([_().node,_().arrayOf(_().node)]).isRequired,prefixIcon:_().object,subTitle:_().string,hasBetaBadgeLabel:_().bool,buttonId:_().string},ie.defaultProps={prefixIcon:null,subTitle:"",hasBetaBadgeLabel:!1,buttonId:null};const ce=({children:e})=>(0,k.createElement)("div",null,e);ce.propTypes={renderPriority:_().number.isRequired,children:_().node.isRequired};const ue=ce,de=({theme:e,location:t,children:s})=>(0,k.createElement)(i.LocationProvider,{value:t},(0,k.createElement)(E.ThemeProvider,{theme:e},s));de.propTypes={theme:_().object.isRequired,location:_().oneOf(["sidebar","metabox","modal"]).isRequired,children:_().element.isRequired};const pe=de,he=window.wp.compose,me=window.wp.data,ge=e=>(0,k.createElement)("div",{className:"yoast components-panel__body"},(0,k.createElement)("h2",{className:"components-panel__body-title"},(0,k.createElement)("button",{id:e.id,onClick:e.onClick,className:"components-button components-panel__body-toggle",type:"button"},e.prefixIcon&&(0,k.createElement)("span",{className:"yoast-icon-span",style:{fill:`${e.prefixIcon&&e.prefixIcon.color||""}`}},(0,k.createElement)(S.SvgIcon,{size:e.prefixIcon.size,icon:e.prefixIcon.icon})),(0,k.createElement)("span",{className:"yoast-title-container"},(0,k.createElement)("div",{className:"yoast-title"},e.title),(0,k.createElement)("div",{className:"yoast-subtitle"},e.subTitle)),e.children,e.suffixIcon&&(0,k.createElement)(S.SvgIcon,{size:e.suffixIcon.size,icon:e.suffixIcon.icon}),e.SuffixHeroIcon))),ye=ge;ge.propTypes={onClick:_().func.isRequired,title:_().string.isRequired,id:_().string,subTitle:_().string,suffixIcon:_().object,SuffixHeroIcon:_().object,prefixIcon:_().object,children:_().node},ge.defaultProps={id:"",suffixIcon:null,SuffixHeroIcon:null,prefixIcon:null,subTitle:"",children:null};const fe=({id:e,postTypeName:t,children:s,title:r,isOpen:n,close:o,open:a,shouldCloseOnClickOutside:l,showChangesWarning:c,SuffixHeroIcon:u})=>(0,k.createElement)(v.Fragment,null,n&&(0,k.createElement)(i.LocationProvider,{value:"modal"},(0,k.createElement)(J,{title:r,onRequestClose:o,additionalClassName:"yoast-collapsible-modal yoast-post-settings-modal",id:"id",shouldCloseOnClickOutside:l},(0,k.createElement)("div",{className:"yoast-content-container"},(0,k.createElement)("div",{className:"yoast-modal-content"},s)),(0,k.createElement)("div",{className:"yoast-notice-container"},(0,k.createElement)("hr",null),(0,k.createElement)("div",{className:"yoast-button-container"},c&&(0,k.createElement)("p",null,/* Translators: %s translates to the Post Label in singular form */
(0,d.sprintf)((0,d.__)("Make sure to save your %s for changes to take effect","wordpress-seo"),t)),(0,k.createElement)("button",{className:"yoast-button yoast-button--primary yoast-button--post-settings-modal",type:"button",onClick:o},/* Translators: %s translates to the Post Label in singular form */
(0,d.sprintf)((0,d.__)("Return to your %s","wordpress-seo"),t)))))),(0,k.createElement)(ye,{id:e+"-open-button",title:r,SuffixHeroIcon:u,suffixIcon:u?null:{size:"20px",icon:"pencil-square"},onClick:a}));fe.propTypes={id:_().string.isRequired,postTypeName:_().string.isRequired,children:_().oneOfType([_().node,_().arrayOf(_().node)]).isRequired,title:_().string.isRequired,isOpen:_().bool.isRequired,open:_().func.isRequired,close:_().func.isRequired,shouldCloseOnClickOutside:_().bool,showChangesWarning:_().bool,SuffixHeroIcon:_().object},fe.defaultProps={shouldCloseOnClickOutside:!0,showChangesWarning:!0};const be=fe,we=(0,he.compose)([(0,me.withSelect)(((e,t)=>{const{getPostOrPageString:s,getIsModalOpen:r}=e("yoast-seo/editor");return{postTypeName:s(),isOpen:r(t.id)}})),(0,me.withDispatch)(((e,t)=>{const{openEditorModal:s,closeEditorModal:r}=e("yoast-seo/editor");return{open:()=>s(t.id),close:r}}))])(be),ke=(0,he.compose)([(0,me.withSelect)(((e,t)=>{const{isAlertDismissed:s}=e(t.store||"yoast-seo/editor");return{isAlertDismissed:s(t.alertKey)}})),(0,me.withDispatch)(((e,t)=>{const{dismissAlert:s}=e(t.store||"yoast-seo/editor");return{onDismissed:()=>s(t.alertKey)}}))])(S.Alert),ve=window.yoast.analysisReport,Ee=window.yoast.uiLibrary,Re=k.forwardRef((function(e,t){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),k.createElement("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"}))})),xe=(R().div`
	min-width: 600px;

	@media screen and ( max-width: 680px ) {
		min-width: 0;
		width: 86vw;
	}
`,R().div`
	@media screen and ( min-width: 600px ) {
		max-width: 420px;
	}
`),_e=(R()(S.Icon)`
	float: ${(0,I.getDirectionalStyle)("right","left")};
	margin: ${(0,I.getDirectionalStyle)("0 0 16px 16px","0 16px 16px 0")};

	&& {
		width: 150px;
		height: 150px;

		@media screen and ( max-width: 680px ) {
			width: 80px;
			height: 80px;
		}
	}
`,window.wp.url),Se=R().div`
  padding: 25px 32px 32px;
  color: #303030;
`,Ie=R().ul`
  margin: 0;
  padding: 0;

  li {
    list-style-image: var(--yoast-svg-icon-check);
    margin: 0.5rem 0 0 1.5rem;
    line-height: 1.4em;

    &::marker {
      font-size: 1.5rem;
    }
  }
`,Te=R().span`
  display: block;
  margin-top: 4px;
`,Ce=R().h2`
  margin-top: 0;
  margin-bottom: 0.25rem;
  color: #303030;
  font-size: 0.8125rem;
  font-weight: 600;
`,Le=R().p`
  display: block;
  margin: 0.25rem 0 1rem 0 !important;
  max-width: 420px;
`,qe=R().hr`
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  border-top: 0;
  border-bottom: 1px solid #E2E8F0;
`,Pe=R().div`
  text-align: center;
`,Oe=R().a`
  width: 100%;
`,Ae=(0,I.makeOutboundLink)(Oe);class Fe extends v.Component{constructor(e){super(e),this.state={defaultPrice:"99"}}createBenefitsList(e){return e.length>0&&(0,k.createElement)(Ie,{role:"list"},e.map(((e,t)=>(0,k.createElement)("li",{key:`upsell-benefit-${t}`},(0,v.createInterpolateElement)(e,{strong:(0,k.createElement)("strong",null)})))))}render(){const e=(0,me.select)("yoast-seo/editor").isPromotionActive("black-friday-2024-promotion"),{defaultPrice:t}=this.state,s=e?"69.30":null,r=s||t;return(0,k.createElement)(v.Fragment,null,e&&(0,k.createElement)("div",{className:"yst-flex  yst-items-center yst-text-lg yst-content-between yst-bg-black yst-text-amber-300 yst-h-9 yst-border-amber-300 yst-border-y yst-border-x-0 yst-border-solid yst-px-6"},(0,k.createElement)("div",{className:"yst-mx-auto"},(0,d.__)("30% OFF - BLACK FRIDAY","wordpress-seo"))),(0,k.createElement)(Se,null,(0,k.createElement)(Ce,null,this.props.title),(0,k.createElement)(Le,null,this.props.description),(0,k.createElement)(Pe,null,(0,k.createElement)(Ae,{...this.props.upsellButton},this.props.upsellButtonText,this.props.upsellButtonHasCaret&&(0,k.createElement)("span",{"aria-hidden":"true",className:"yoast-button-upsell__caret"})),(0,k.createElement)("div",{className:"yst-text-slate-600 yst-my-4"},s&&(0,k.createElement)(v.Fragment,null,(0,k.createElement)("span",{className:"yst-text-slate-500 yst-line-through"},t)," "),(0,k.createElement)("span",{className:"yst-text-slate-900 yst-text-2xl yst-font-bold"},r)," ",(0,d.__)("$ USD / € EUR / £ GBP per year (ex. VAT)","wordpress-seo")),(0,k.createElement)(Te,{id:this.props.upsellButton["aria-describedby"]},this.props.upsellButtonLabel)),(0,k.createElement)(qe,null),(0,k.createElement)(Ce,null,this.props.benefitsTitle),this.createBenefitsList(this.props.benefits)))}}Fe.propTypes={title:_().node,benefits:_().array,benefitsTitle:_().node,description:_().node,upsellButton:_().object,upsellButtonText:_().string.isRequired,upsellButtonLabel:_().string,upsellButtonHasCaret:_().bool},Fe.defaultProps={title:null,description:null,benefits:[],benefitsTitle:null,upsellButton:{href:"",className:"button button-primary"},upsellButtonLabel:"",upsellButtonHasCaret:!0};const Ne=Fe,Be=(0,d.__)("Check your text on even more SEO criteria and get an enhanced keyphrase analysis, making it easier to optimize your content.","wordpress-seo"),Me=e=>{const{locationContext:t}=(0,i.useRootContext)(),s=(0,_e.addQueryArgs)(wpseoAdminL10n[e.buyLink],{context:t});return(0,k.createElement)(Ne,{title:(0,d.__)("Get more help with writing content that ranks","wordpress-seo"),description:e.description,benefitsTitle:/* translators: %s expands to 'Yoast SEO Premium'. */
(0,d.sprintf)("%s also gives you:","Yoast SEO Premium"),benefits:[(0,d.sprintf)(/* translators: %1$s expands to a strong opening tag, %2$s expands to a strong closing tag. */
(0,d.__)("%1$sAI%2$s: Better SEO titles and meta descriptions, faster.","wordpress-seo"),"<strong>","</strong>"),(0,d.sprintf)(/* translators: %1$s expands to a strong opening tag, %2$s expands to a strong closing tag. */
(0,d.__)("%1$sMultiple keywords%2$s: Rank higher for more searches.","wordpress-seo"),"<strong>","</strong>"),(0,d.sprintf)(/* translators: %1$s expands to a strong opening tag, %2$s expands to a strong closing tag. */
(0,d.__)("%1$sSuper fast%2$s internal linking suggestions.","wordpress-seo"),"<strong>","</strong>"),(0,d.sprintf)(/* translators: %1$s expands to a strong opening tag, %2$s expands to a strong closing tag. */
(0,d.__)("%1$sNo more broken links%2$s: Automatic redirect manager.","wordpress-seo"),"<strong>","</strong>"),(0,d.sprintf)(/* translators: %1$s expands to a strong opening tag, %2$s expands to a strong closing tag. */
(0,d.__)("%1$sAppealing social previews%2$s people actually want to click on.","wordpress-seo"),"<strong>","</strong>"),(0,d.sprintf)(/* translators: %1$s expands to a strong opening tag, %2$s expands to a strong closing tag. */
(0,d.__)("%1$s24/7 support%2$s: Also on evenings and weekends.","wordpress-seo"),"<strong>","</strong>")],upsellButtonText:(0,d.sprintf)(/* translators: %s expands to 'Yoast SEO Premium'. */
(0,d.__)("Unlock with %s","wordpress-seo"),"Yoast SEO Premium"),upsellButton:{href:s,className:"yoast-button-upsell",rel:null,"data-ctb-id":"f6a84663-465f-4cb5-8ba5-f7a6d72224b2","data-action":"load-nfd-ctb"},upsellButtonLabel:(0,d.__)("1 year of premium support and updates included!","wordpress-seo")})};Me.propTypes={buyLink:_().string.isRequired,description:_().string},Me.defaultProps={description:Be};const Ke=Me;class De extends v.Component{constructor(e){super(e);const t=this.props.results;this.state={mappedResults:{}},null!==t&&(this.state={mappedResults:U(t,this.props.keywordKey)}),this.handleMarkButtonClick=this.handleMarkButtonClick.bind(this),this.handleEditButtonClick=this.handleEditButtonClick.bind(this),this.handleResultsChange=this.handleResultsChange.bind(this),this.renderHighlightingUpsell=this.renderHighlightingUpsell.bind(this),this.createMarkButton=this.createMarkButton.bind(this)}componentDidUpdate(e){null!==this.props.results&&this.props.results!==e.results&&this.setState({mappedResults:U(this.props.results,this.props.keywordKey)})}createMarkButton({ariaLabel:e,id:t,className:s,status:r,onClick:n,isPressed:o}){return(0,k.createElement)(v.Fragment,null,(0,k.createElement)(S.IconButtonToggle,{marksButtonStatus:r,className:s,onClick:n,id:t,icon:"eye",pressed:o,ariaLabel:e}),this.props.shouldUpsellHighlighting&&(0,k.createElement)("div",{className:"yst-root"},(0,k.createElement)(Ee.Badge,{className:"yst-absolute yst-px-[3px] yst-py-[3px] yst--right-[6.5px] yst--top-[6.5px]",size:"small",variant:"upsell"},(0,k.createElement)(Re,{className:"yst-w-2.5 yst-h-2.5 yst-shrink-0",role:"img","aria-hidden":!0,focusable:!1}))))}deactivateMarker(){this.props.setActiveMarker(null),this.props.setMarkerPauseStatus(!1),this.removeMarkers()}activateMarker(e,t){this.props.setActiveMarker(e),t()}handleMarkButtonClick(e,t){const s=this.props.keywordKey.length>0?`${this.props.keywordKey}:${e}`:e;this.props.activeAIFixesButton&&this.props.setActiveAIFixesButton(null),s===this.props.activeMarker?this.deactivateMarker():this.activateMarker(s,t)}handleResultsChange(e,t,s){const r=this.props.keywordKey.length>0?`${this.props.keywordKey}:${e}`:e;r===this.props.activeMarker&&(s?(0,c.isUndefined)(t)||this.activateMarker(r,t):this.deactivateMarker())}focusOnKeyphraseField(e){const t=this.props.keywordKey,s=""===t?"focus-keyword-input-"+e:"yoast-keyword-input-"+t+"-"+e,r=document.getElementById(s);r.focus(),r.scrollIntoView({behavior:"auto",block:"center",inline:"center"})}focusOnGooglePreviewField(e,t){let s;s="metaDescriptionKeyword"===e||"metaDescriptionLength"===e?"description":"titleWidth"===e||"keyphraseInSEOTitle"===e?"title":"slug";const r=document.getElementById("yoast-google-preview-"+s+"-"+t);r.focus(),r.scrollIntoView({behavior:"auto",block:"center",inline:"center"})}handleEditButtonClick(e){const t=this.props.location;"functionWordsInKeyphrase"!==e&&"keyphraseLength"!==e?(["metaDescriptionKeyword","metaDescriptionLength","titleWidth","keyphraseInSEOTitle","slugKeyword"].includes(e)&&this.handleGooglePreviewFocus(t,e),(0,h.doAction)("yoast.focus.input",e)):this.focusOnKeyphraseField(t)}handleGooglePreviewFocus(e,t){if("sidebar"===e)document.getElementById("yoast-search-appearance-modal-open-button").click(),setTimeout((()=>this.focusOnGooglePreviewField(t,"modal")),500);else{const s=document.getElementById("yoast-snippet-editor-metabox");s&&"false"===s.getAttribute("aria-expanded")?(s.click(),setTimeout((()=>this.focusOnGooglePreviewField(t,e)),100)):this.focusOnGooglePreviewField(t,e)}}removeMarkers(){window.YoastSEO.analysis.applyMarks(new p.Paper("",{}),[])}renderHighlightingUpsell(e,t){const s=(0,d.__)("Highlight areas of improvement in your text, no more searching for a needle in a haystack, straight to optimizing! Now also in Elementor!","wordpress-seo");return e&&(0,k.createElement)(J,{title:(0,d.__)("Unlock Premium SEO analysis","wordpress-seo"),onRequestClose:t,additionalClassName:"",className:`${X} yoast-gutenberg-modal__box yoast-gutenberg-modal__no-padding`,id:"yoast-premium-seo-analysis-highlighting-modal",shouldCloseOnClickOutside:!0},(0,k.createElement)(xe,null,(0,k.createElement)(Ke,{buyLink:this.props.highlightingUpsellLink,description:s})))}render(){const{mappedResults:e}=this.state,{errorsResults:t,improvementsResults:s,goodResults:r,considerationsResults:n,problemsResults:o}=e,{upsellResults:a,resultCategoryLabels:i}=this.props,l={errors:(0,d.__)("Errors","wordpress-seo"),problems:(0,d.__)("Problems","wordpress-seo"),improvements:(0,d.__)("Improvements","wordpress-seo"),considerations:(0,d.__)("Considerations","wordpress-seo"),goodResults:(0,d.__)("Good results","wordpress-seo")},c=Object.assign(l,i);let u=this.props.marksButtonStatus;return"enabled"===u&&this.props.shortcodesForParsing.length>0&&(u="disabled"),(0,k.createElement)(v.Fragment,null,(0,k.createElement)(ve.ContentAnalysis,{errorsResults:t,problemsResults:o,upsellResults:a,improvementsResults:s,considerationsResults:n,goodResults:r,activeMarker:this.props.activeMarker,onMarkButtonClick:this.handleMarkButtonClick,onEditButtonClick:this.handleEditButtonClick,marksButtonClassName:this.props.marksButtonClassName,editButtonClassName:this.props.editButtonClassName,marksButtonStatus:u,headingLevel:3,keywordKey:this.props.keywordKey,isPremium:this.props.isPremium,resultCategoryLabels:c,onResultChange:this.handleResultsChange,shouldUpsellHighlighting:this.props.shouldUpsellHighlighting,renderAIFixesButton:this.props.renderAIFixesButton,renderHighlightingUpsell:this.renderHighlightingUpsell,markButtonFactory:this.createMarkButton}))}}De.propTypes={results:_().array,upsellResults:_().array,marksButtonClassName:_().string,editButtonClassName:_().string,marksButtonStatus:_().oneOf(["enabled","disabled","hidden"]),setActiveMarker:_().func.isRequired,setMarkerPauseStatus:_().func.isRequired,setActiveAIFixesButton:_().func.isRequired,activeMarker:_().string,activeAIFixesButton:_().string,keywordKey:_().string,location:_().string,isPremium:_().bool,resultCategoryLabels:_().shape({errors:_().string,problems:_().string,improvements:_().string,considerations:_().string,goodResults:_().string}),shortcodesForParsing:_().array,shouldUpsellHighlighting:_().bool,highlightingUpsellLink:_().string,renderAIFixesButton:_().func},De.defaultProps={results:null,upsellResults:[],marksButtonStatus:"enabled",marksButtonClassName:"",editButtonClassName:"",activeMarker:null,activeAIFixesButton:null,keywordKey:"",location:"",isPremium:!1,resultCategoryLabels:{},shortcodesForParsing:[],shouldUpsellHighlighting:!1,highlightingUpsellLink:"",renderAIFixesButton:()=>{}};const $e=De,We=(0,he.compose)([(0,me.withSelect)((e=>{const{getActiveMarker:t,getIsPremium:s,getShortcodesForParsing:r,getActiveAIFixesButton:n}=e("yoast-seo/editor");return{activeMarker:t(),isPremium:s(),shortcodesForParsing:r(),activeAIFixesButton:n()}})),(0,me.withDispatch)((e=>{const{setActiveMarker:t,setMarkerPauseStatus:s,setActiveAIFixesButton:r}=e("yoast-seo/editor");return{setActiveMarker:t,setMarkerPauseStatus:s,setActiveAIFixesButton:r}}))])($e),je=window.yoast.relatedKeyphraseSuggestions,He=()=>(0,k.createElement)("p",{className:"yoast-related-keyphrases-modal__loading-message"},(0,d.sprintf)(/* translators: %1$s expands to "Yoast SEO", %2$s expands to "Semrush". */
(0,d.__)("Please wait while %1$s connects to %2$s to get related keyphrases...","wordpress-seo"),"Yoast SEO","Semrush")," ",(0,k.createElement)(S.SvgIcon,{icon:"loading-spinner"})),Ye=(0,I.makeOutboundLink)(),ze=()=>(0,k.createElement)(v.Fragment,null,(0,k.createElement)("p",null,(0,d.sprintf)(/* translators: %s : Expands to "Semrush". */
(0,d.__)("You've reached your request limit for today. Check back tomorrow or upgrade your plan over at %s.","wordpress-seo"),"Semrush")),(0,k.createElement)(Ye,{href:window.wpseoAdminL10n["shortlinks.semrush.prices"],className:"yoast-button-upsell"},(0,d.sprintf)(/* translators: %s : Expands to "Semrush". */
(0,d.__)("Upgrade your %s plan","wordpress-seo"),"Semrush"),(0,k.createElement)("span",{"aria-hidden":"true",className:"yoast-button-upsell__caret"}))),Ue=window.wp.apiFetch;var Ve=s.n(Ue);const Ge=({countryCode:e,setCountry:t,newRequest:s,keyphrase:r,setRequestFailed:n,setNoResultsFound:o,setRequestSucceeded:a,setRequestLimitReached:i,response:l,lastRequestKeyphrase:c,userLocale:u})=>{const[d,p]=(0,v.useState)(e),h=(0,v.useCallback)((e=>{"error"in e&&(e.error.includes("TOTAL LIMIT EXCEEDED")?i():n(e))}),[i,n]),m=(0,v.useCallback)((async()=>{s(e,r),Ve()({path:"yoast/v1/semrush/country_code",method:"POST",data:{country_code:e}});const t=await Ve()({path:(0,_e.addQueryArgs)("/yoast/v1/semrush/related_keyphrases",{keyphrase:r,country_code:e})});if(200===t.status)return 0===t.results.rows.length?void o():(a(t),void p(e));h(t)}),[e,r,s]);return(0,v.useEffect)((()=>{l&&r===c||m()}),[]),(0,k.createElement)(je.CountrySelector,{countryCode:e,activeCountryCode:d,onChange:t,onClick:m,className:"yst-my-5 lg:yst-w-4/5",userLocale:u})};Ge.propTypes={keyphrase:_().string,countryCode:_().string,response:_().object,lastRequestKeyphrase:_().string,setCountry:_().func.isRequired,newRequest:_().func.isRequired,setNoResultsFound:_().func.isRequired,setRequestSucceeded:_().func.isRequired,setRequestLimitReached:_().func.isRequired,setRequestFailed:_().func.isRequired,userLocale:_().string},Ge.defaultProps={keyphrase:"",countryCode:"us",response:{},lastRequestKeyphrase:"",userLocale:null};const Qe=Ge,Xe=(0,I.makeOutboundLink)(),Ze=()=>(0,k.createElement)(S.Alert,{type:"info"},(0,d.sprintf)(/* translators: %s: Expands to "Yoast SEO". */
(0,d.__)("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,k.createElement)(Xe,{href:window.wpseoAdminL10n["shortlinks.semrush.premium_landing_page"]},(0,d.sprintf)(/* translators: %s: Expands to "Yoast SEO Premium". */
(0,d.__)("Explore %s!","wordpress-seo"),"Yoast SEO Premium"))),Je=()=>(0,k.createElement)(S.Alert,{type:"error"},(0,d.__)("We've encountered a problem trying to get related keyphrases. Please try again later.","wordpress-seo")),et=()=>(0,k.createElement)(S.Alert,{type:"warning"},(0,d.sprintf)(/* translators: %s: Expands to "Yoast SEO". */
(0,d.__)("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 tt(e){var t,s,r;const{response:n,lastRequestKeyphrase:o,keyphrase:a,newRequest:i,setCountry:l,renderAction:p,countryCode:h,requestLimitReached:m,setRequestFailed:g,setNoResultsFound:y,relatedKeyphrases:f,setRequestSucceeded:b,setRequestLimitReached:w,isPending:E,isRtl:R,userLocale:x}=e,_=u().isPremium,S=(0,I.makeOutboundLink)(),T="https://www.semrush.com/analytics/keywordoverview/?q="+encodeURIComponent(a)+"&db="+encodeURIComponent(h);return(0,k.createElement)(Ee.Root,{context:{isRtl:R}},!m&&(0,k.createElement)(v.Fragment,null,!_&&(0,k.createElement)(Ze,null),_&&function(e){return e&&e.length>=4}(f)&&(0,k.createElement)(et,null),(0,k.createElement)(Qe,{countryCode:h,setCountry:l,newRequest:i,keyphrase:a,setRequestFailed:g,setNoResultsFound:y,setRequestSucceeded:b,setRequestLimitReached:w,response:n,lastRequestKeyphrase:o,userLocale:x.split("_")[0]})),function(e){const{isPending:t,requestLimitReached:s,isSuccess:r,response:n,requestHasData:o}=e;return t?(0,k.createElement)(He,null):s?(0,k.createElement)(ze,null):!r&&function(e){return!(0,c.isEmpty)(e)&&"error"in e}(n)?(0,k.createElement)(Je,null):o?void 0:(0,k.createElement)("p",null,(0,d.__)("Sorry, there's no data available for that keyphrase/country combination.","wordpress-seo"))}(e),(0,k.createElement)(je.KeyphrasesTable,{relatedKeyphrases:f,columnNames:null==n||null===(t=n.results)||void 0===t?void 0:t.columnNames,data:null==n||null===(s=n.results)||void 0===s?void 0:s.rows,isPending:E,renderButton:p}),(null==n||null===(r=n.results)||void 0===r?void 0:r.rows)&&(0,k.createElement)("p",{className:"yst-mb-0 yst-mt-2"},(0,k.createElement)(S,{href:T},(0,d.sprintf)(/* translators: %s expands to Semrush */
(0,d.__)("Get more insights at %s","wordpress-seo"),"Semrush"))))}tt.propTypes={keyphrase:_().string,relatedKeyphrases:_().array,renderAction:_().func,requestLimitReached:_().bool,countryCode:_().string.isRequired,setCountry:_().func.isRequired,newRequest:_().func.isRequired,setRequestSucceeded:_().func.isRequired,setRequestLimitReached:_().func.isRequired,setRequestFailed:_().func.isRequired,setNoResultsFound:_().func.isRequired,response:_().object,lastRequestKeyphrase:_().string,isRtl:_().bool,userLocale:_().string,isPending:_().bool},tt.defaultProps={keyphrase:"",relatedKeyphrases:[],renderAction:null,requestLimitReached:!1,response:{},lastRequestKeyphrase:"",isRtl:!1,userLocale:null,isPending:!1};const st=(0,he.compose)([(0,me.withSelect)((e=>{const{getFocusKeyphrase:t,getSEMrushSelectedCountry:s,getSEMrushRequestLimitReached:r,getSEMrushRequestResponse:n,getSEMrushRequestIsSuccess:o,getSEMrushIsRequestPending:a,getSEMrushRequestHasData:i,getSEMrushRequestKeyphrase:l,getPreference:c}=e("yoast-seo/editor");return{keyphrase:t(),countryCode:s(),requestLimitReached:r(),response:n(),isSuccess:o(),isPending:a(),requestHasData:i(),lastRequestKeyphrase:l(),isRtl:c("isRtl",!1),userLocale:c("userLocale","en_US")}})),(0,me.withDispatch)((e=>{const{setSEMrushChangeCountry:t,setSEMrushNewRequest:s,setSEMrushRequestSucceeded:r,setSEMrushRequestFailed:n,setSEMrushSetRequestLimitReached:o,setSEMrushNoResultsFound:a}=e("yoast-seo/editor");return{setCountry:e=>{t(e)},newRequest:(e,t)=>{s(e,t)},setRequestSucceeded:e=>{r(e)},setRequestFailed:e=>{n(e)},setRequestLimitReached:()=>{o()},setNoResultsFound:()=>{a()}}}))])(tt),rt=window.moment;var nt=s.n(rt),ot=s(6746);const at=(0,I.makeOutboundLink)(),it=e=>{const t=(0,d.sprintf)(/* translators: %d expands to the amount of allowed keyphrases on a free account, %s expands to a link to Wincher plans. */
(0,d.__)("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(0,k.createElement)(S.Alert,{type:"error"},(0,ot.Z)({mixedString:t,components:{updateWincherPlanLink:(0,k.createElement)(at,{href:wpseoAdminGlobalL10n["links.wincher.pricing"]},(0,d.sprintf)(/* translators: %s : Expands to "Wincher". */
(0,d.__)("upgrade your %s plan","wordpress-seo"),"Wincher"))}}))};it.propTypes={limit:_().number},it.defaultProps={limit:10};const lt=it,ct=()=>(0,k.createElement)(S.Alert,{type:"error"},(0,d.__)("Something went wrong while tracking the ranking position(s) of your page. Please try again later.","wordpress-seo"));async function ut(e,t,s,r=200){try{const n=await e();return!!n&&(n.status===r?t(n):s(n))}catch(e){console.error(e.message)}}async function dt(e){try{return await Ve()(e)}catch(e){return e.error&&e.status?e:e instanceof Response&&await e.json()}}async function pt(e){return(0,c.isArray)(e)||(e=[e]),await dt({path:"yoast/v1/wincher/keyphrases/track",method:"POST",data:{keyphrases:e}})}const ht=R().p`
	color: ${T.colors.$color_pink_dark};
	font-size: 14px;
	font-weight: 700;
	margin: 13px 0 10px;
`,mt=R()(S.SvgIcon)`
	margin-right: 5px;
	vertical-align: middle;
`,gt=R().button`
	position: absolute;
	top: 9px;
	right: 9px;
	border: none;
    background: none;
    cursor: pointer;
`,yt=R().p`
	font-size: 13px;
	font-weight: 500;
	margin: 10px 0 13px;
`,ft=R().div`
	position: relative;
	background: ${e=>e.isTitleShortened?"#F5F7F7":"transparent"};
	border: 1px solid #C7C7C7;
	border-left: 4px solid${T.colors.$color_pink_dark};
	padding: 0 16px;
	margin-bottom: 1.5em;
`,bt=e=>{const[t,s]=(0,v.useState)(null);return(0,v.useEffect)((()=>{e&&!t&&async function(){return await dt({path:"yoast/v1/wincher/account/limit",method:"GET"})}().then((e=>s(e)))}),[t]),t};bt.propTypes={limit:_().bool.isRequired};const wt=({limit:e,usage:t,isTitleShortened:s,isFreeAccount:r})=>{const n=(0,d.sprintf)(
/* Translators: %1$s expands to the number of used keywords.
   * %2$s expands to the account keywords limit.
   */
(0,d.__)("Your are tracking %1$s out of %2$s keyphrases included in your free account.","wordpress-seo"),t,e),o=(0,d.sprintf)(
/* Translators: %1$s expands to the number of used keywords.
   * %2$s expands to the account keywords limit.
   */
(0,d.__)("Your are tracking %1$s out of %2$s keyphrases included in your account.","wordpress-seo"),t,e),a=r?n:o,i=(0,d.sprintf)(
/* Translators: %1$s expands to the number of used keywords.
   * %2$s expands to the account keywords limit.
   */
(0,d.__)("Keyphrases tracked: %1$s/%2$s","wordpress-seo"),t,e),l=s?i:a;return(0,k.createElement)(ht,null,s&&(0,k.createElement)(mt,{icon:"exclamation-triangle",color:T.colors.$color_pink_dark,size:"14px"}),l)};wt.propTypes={limit:_().number.isRequired,usage:_().number.isRequired,isTitleShortened:_().bool,isFreeAccount:_().bool};const kt=(0,I.makeOutboundLink)(),vt=({discount:e,months:t})=>{const s=(0,k.createElement)(kt,{href:wpseoAdminGlobalL10n["links.wincher.upgrade"],style:{fontWeight:600}},(0,d.sprintf)(/* Translators: %s : Expands to "Wincher". */
(0,d.__)("Click here to upgrade your %s plan","wordpress-seo"),"Wincher"));if(!e||!t)return(0,k.createElement)(yt,null,s);const r=100*e,n=(0,d.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.
   */
(0,d.__)("%1$s and get an exclusive %2$s discount for %3$s month(s).","wordpress-seo"),"{{wincherAccountUpgradeLink/}}",r+"%",t);return(0,k.createElement)(yt,null,(0,ot.Z)({mixedString:n,components:{wincherAccountUpgradeLink:s}}))};vt.propTypes={discount:_().number,months:_().number};const Et=({onClose:e,isTitleShortened:t,trackingInfo:s})=>{const r=(()=>{const[e,t]=(0,v.useState)(null);return(0,v.useEffect)((()=>{e||async function(){return await dt({path:"yoast/v1/wincher/account/upgrade-campaign",method:"GET"})}().then((e=>t(e)))}),[e]),e})();if(null===s)return null;const{limit:n,usage:o}=s;if(!(n&&o/n>=.8))return null;const a=Boolean(null==r?void 0:r.discount);return(0,k.createElement)(ft,{isTitleShortened:t},e&&(0,k.createElement)(gt,{type:"button","aria-label":(0,d.__)("Close the upgrade callout","wordpress-seo"),onClick:e},(0,k.createElement)(S.SvgIcon,{icon:"times-circle",color:T.colors.$color_pink_dark,size:"14px"})),(0,k.createElement)(wt,{...s,isTitleShortened:t,isFreeAccount:a}),(0,k.createElement)(vt,{discount:null==r?void 0:r.discount,months:null==r?void 0:r.months}))};Et.propTypes={onClose:_().func,isTitleShortened:_().bool,trackingInfo:_().object};const Rt=Et,xt=()=>(0,k.createElement)(S.Alert,{type:"success"},(0,d.sprintf)(/* translators: %s: Expands to "Wincher". */
(0,d.__)("You have successfully connected to %s! You can now track the SEO performance for the keyphrase(s) of this page.","wordpress-seo"),"Wincher")),_t=()=>(0,k.createElement)(S.Alert,{type:"info"},(0,d.sprintf)(/* translators: %s: Expands to "Wincher". */
(0,d.__)("%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")),St=({data:e,mapChartDataToTableData:t,dataTableCaption:s,dataTableHeaderLabels:r,isDataTableVisuallyHidden:n})=>e.length!==r.length?(0,k.createElement)("p",null,(0,d.__)("The number of headers and header labels don't match.","wordpress-seo")):(0,k.createElement)("div",{className:n?"screen-reader-text":null},(0,k.createElement)("table",null,(0,k.createElement)("caption",null,s),(0,k.createElement)("thead",null,(0,k.createElement)("tr",null,r.map(((e,t)=>(0,k.createElement)("th",{key:t},e))))),(0,k.createElement)("tbody",null,(0,k.createElement)("tr",null,e.map(((e,s)=>(0,k.createElement)("td",{key:s},t(e.y))))))));St.propTypes={data:_().arrayOf(_().shape({x:_().number,y:_().number})).isRequired,mapChartDataToTableData:_().func,dataTableCaption:_().string.isRequired,dataTableHeaderLabels:_().array.isRequired,isDataTableVisuallyHidden:_().bool},St.defaultProps={mapChartDataToTableData:null,isDataTableVisuallyHidden:!0};const It=St,Tt=({data:e,width:t,height:s,fillColor:r,strokeColor:n,strokeWidth:o,className:a,mapChartDataToTableData:i,dataTableCaption:l,dataTableHeaderLabels:c,isDataTableVisuallyHidden:u})=>{const d=Math.max(1,Math.max(...e.map((e=>e.x)))),p=Math.max(1,Math.max(...e.map((e=>e.y)))),h=s-o,m=e.map((e=>`${e.x/d*t},${h-e.y/p*h+o}`)).join(" "),g=`0,${h+o} `+m+` ${t},${h+o}`;return(0,k.createElement)(v.Fragment,null,(0,k.createElement)("svg",{width:t,height:s,viewBox:`0 0 ${t} ${s}`,className:a,role:"img","aria-hidden":"true",focusable:"false"},(0,k.createElement)("polygon",{fill:r,points:g}),(0,k.createElement)("polyline",{fill:"none",stroke:n,strokeWidth:o,strokeLinejoin:"round",strokeLinecap:"round",points:m})),i&&(0,k.createElement)(It,{data:e,mapChartDataToTableData:i,dataTableCaption:l,dataTableHeaderLabels:c,isDataTableVisuallyHidden:u}))};Tt.propTypes={data:_().arrayOf(_().shape({x:_().number,y:_().number})).isRequired,width:_().number.isRequired,height:_().number.isRequired,fillColor:_().string,strokeColor:_().string,strokeWidth:_().number,className:_().string,mapChartDataToTableData:_().func,dataTableCaption:_().string.isRequired,dataTableHeaderLabels:_().array.isRequired,isDataTableVisuallyHidden:_().bool},Tt.defaultProps={fillColor:null,strokeColor:"#000000",strokeWidth:1,className:"",mapChartDataToTableData:null,isDataTableVisuallyHidden:!0};const Ct=Tt,Lt=()=>(0,k.createElement)("p",{className:"yoast-wincher-seo-performance-modal__loading-message"},(0,d.__)("Tracking the ranking position...","wordpress-seo")," ",(0,k.createElement)(S.SvgIcon,{icon:"loading-spinner"})),qt=R()(S.SvgIcon)`
	margin-left: 2px;
	flex-shrink: 0;
	rotate: ${e=>e.isImproving?"-90deg":"90deg"};
`,Pt=R().span`
	color: ${e=>e.isImproving?"#69AB56":"#DC3332"};
	font-size: 13px;
	font-weight: 600;
	line-height: 20px;
	margin-right: 2px;
	margin-left: 12px;
`,Ot=R().td`
	padding-right: 0 !important;

	& > div {
		margin: 0px;
	}
`,At=R().td`
	padding-left: 2px !important;
`,Ft=R().td.attrs({className:"yoast-table--nopadding"})`
	& > div {
		justify-content: center;
	}
`,Nt=R().div`
	display: flex;
	align-items: center;
	& > a {
		box-sizing: border-box;
	}
`,Bt=R().button`
	background: none;
	color: inherit;
	border: none;
	padding: 0;
	font: inherit;
	cursor: pointer;
	outline: inherit;
    display: flex;
    align-items: center;
`,Mt=R().tr`
	background-color: ${e=>e.isEnabled?"#FFFFFF":"#F9F9F9"} !important;
`;function Kt(e){return Math.round(100*e)}function Dt({chartData:e}){if((0,c.isEmpty)(e)||(0,c.isEmpty)(e.position))return"?";const t=function(e){return Array.from({length:e.position.history.length},((e,t)=>t+1)).map((e=>(0,d.sprintf)((0,d._n)("%d day","%d days",e,"wordpress-seo"),e)))}(e),s=e.position.history.map(((e,t)=>({x:t,y:101-e.value})));return(0,k.createElement)(Ct,{width:66,height:24,data:s,strokeWidth:1.8,strokeColor:"#498afc",fillColor:"#ade3fc",mapChartDataToTableData:Kt,dataTableCaption:(0,d.__)("Keyphrase position in the last 90 days on a scale from 0 to 100.","wordpress-seo"),dataTableHeaderLabels:t})}Dt.propTypes={chartData:_().object},Dt.defaultProps={chartData:{}};const $t=({rowData:e})=>{var t;if(null==e||null===(t=e.position)||void 0===t||!t.change)return(0,k.createElement)(Dt,{chartData:e});const s=e.position.change<0;return(0,k.createElement)(v.Fragment,null,(0,k.createElement)(Dt,{chartData:e}),(0,k.createElement)(Pt,{isImproving:s},Math.abs(e.position.change)),(0,k.createElement)(qt,{icon:"caret-right",color:s?"#69AB56":"#DC3332",size:"14px",isImproving:s}))};function Wt(e){var t;const{keyphrase:s,rowData:r,onTrackKeyphrase:n,onUntrackKeyphrase:o,isFocusKeyphrase:a,isDisabled:i,isLoading:l,isSelected:u,onSelectKeyphrases:p}=e,h=!(0,c.isEmpty)(r),m=!(0,c.isEmpty)(null==r||null===(t=r.position)||void 0===t?void 0:t.history),g=(0,v.useCallback)((()=>{i||(h?o(s,r.id):n(s))}),[s,n,o,h,r,i]),y=(0,v.useCallback)((()=>{p((e=>u?e.filter((e=>e!==s)):e.concat(s)))}),[p,u,s]);return(0,k.createElement)(Mt,{isEnabled:h},(0,k.createElement)(Ot,null,m&&(0,k.createElement)(S.Checkbox,{id:"select-"+s,onChange:y,checked:u,label:""})),(0,k.createElement)(At,null,s,a&&(0,k.createElement)("span",null,"*")),function(e){const{rowData:t,websiteId:s,keyphrase:r,onSelectKeyphrases:n}=e,o=(0,v.useCallback)((()=>{n([r])}),[n,r]),a=!(0,c.isEmpty)(t),i=t&&t.updated_at&&nt()(t.updated_at)>=nt()().subtract(7,"days"),l=t?(0,d.sprintf)("https://app.wincher.com/websites/%s/keywords?serp=%s&utm_medium=plugin&utm_source=yoast&referer=yoast&partner=yoast",s,t.id):null;return a?i?(0,k.createElement)(v.Fragment,null,(0,k.createElement)("td",null,(0,k.createElement)(Nt,null,function(e){return!e||!e.position||e.position.value>100?"> 100":e.position.value}(t),(0,k.createElement)(S.ButtonStyledLink,{variant:"secondary",href:l,style:{height:28,marginLeft:12},rel:"noopener",target:"_blank"},(0,d.__)("View","wordpress-seo")))),(0,k.createElement)("td",{className:"yoast-table--nopadding"},(0,k.createElement)(Bt,{type:"button",onClick:o},(0,k.createElement)($t,{rowData:t}))),(0,k.createElement)("td",null,(u=t.updated_at,nt()(u).fromNow()))):(0,k.createElement)("td",{className:"yoast-table--nopadding",colSpan:"3"},(0,k.createElement)(Lt,null)):(0,k.createElement)("td",{className:"yoast-table--nopadding",colSpan:"3"},(0,k.createElement)("i",null,(0,d.__)("Activate tracking to show the ranking position","wordpress-seo")));var u}(e),(0,k.createElement)(Ft,null,function({keyphrase:e,isEnabled:t,toggleAction:s,isLoading:r}){return r?(0,k.createElement)(S.SvgIcon,{icon:"loading-spinner"}):(0,k.createElement)(S.Toggle,{id:`toggle-keyphrase-tracking-${e}`,className:"wincher-toggle",isEnabled:t,onSetToggleState:s,showToggleStateLabel:!1})}({keyphrase:s,isEnabled:h,toggleAction:g,isLoading:l})))}$t.propTypes={rowData:_().object},Wt.propTypes={rowData:_().object,keyphrase:_().string.isRequired,onTrackKeyphrase:_().func,onUntrackKeyphrase:_().func,isFocusKeyphrase:_().bool,isDisabled:_().bool,isLoading:_().bool,websiteId:_().string,isSelected:_().bool.isRequired,onSelectKeyphrases:_().func.isRequired},Wt.defaultProps={rowData:{},onTrackKeyphrase:()=>{},onUntrackKeyphrase:()=>{},isFocusKeyphrase:!1,isDisabled:!1,isLoading:!1,websiteId:""};const jt=(0,I.makeOutboundLink)(),Ht=R().span`
	display: block;
	font-style: italic;

	@media (min-width: 782px) {
		display: inline;
		position: absolute;
		${(0,I.getDirectionalStyle)("right","left")}: 8px;
	}
`,Yt=R().div`
	width: 100%;
	overflow-y: auto;
`,zt=R().th`
	pointer-events: ${e=>e.isDisabled?"none":"initial"};
	padding-right: 0 !important;

	& > div {
		margin: 0px;
	}
`,Ut=R().th`
	padding-left: 2px !important;
`,Vt=e=>{const t=(0,v.useRef)();return(0,v.useEffect)((()=>{t.current=e})),t.current},Gt=(0,c.debounce)((async function(e=null,t=null,s=null,r){return await dt({path:"yoast/v1/wincher/keyphrases",method:"POST",data:{keyphrases:e,permalink:s,startAt:t},signal:r})}),500,{leading:!0}),Qt=e=>{const{addTrackedKeyphrase:t,isLoggedIn:s,keyphrases:r,permalink:n,removeTrackedKeyphrase:o,setKeyphraseLimitReached:a,setRequestFailed:i,setRequestSucceeded:l,setTrackedKeyphrases:u,setHasTrackedAll:p,trackAll:h,trackedKeyphrases:m,isNewlyAuthenticated:g,websiteId:y,focusKeyphrase:f,newRequest:b,startAt:w,selectedKeyphrases:E,onSelectKeyphrases:R}=e,x=(0,v.useRef)(),_=(0,v.useRef)(),I=(0,v.useRef)(!1),[T,C]=(0,v.useState)([]),L=(0,v.useCallback)((e=>{const t=e.toLowerCase();return m&&!(0,c.isEmpty)(m)&&m.hasOwnProperty(t)?m[t]:null}),[m]),q=(0,v.useMemo)((()=>async()=>{await ut((()=>(_.current&&_.current.abort(),_.current="undefined"==typeof AbortController?null:new AbortController,Gt(r,w,n,_.current.signal))),(e=>{l(e),u(e.results)}),(e=>{i(e)}))}),[l,i,u,r,n,w]),P=(0,v.useCallback)((async e=>{const s=(Array.isArray(e)?e:[e]).map((e=>e.toLowerCase()));C((e=>[...e,...s])),await ut((()=>pt(s)),(e=>{l(e),t(e.results),q()}),(e=>{400===e.status&&e.limit&&a(e.limit),i(e)}),201),C((e=>(0,c.without)(e,...s)))}),[l,i,a,t,q]),O=(0,v.useCallback)((async(e,t)=>{e=e.toLowerCase(),C((t=>[...t,e])),await ut((()=>async function(e){return await dt({path:"yoast/v1/wincher/keyphrases/untrack",method:"DELETE",data:{keyphraseID:e}})}(t)),(t=>{l(t),o(e)}),(e=>{i(e)})),C((t=>(0,c.without)(t,e)))}),[l,o,i]),A=(0,v.useCallback)((async e=>{b(),await P(e)}),[b,P]),F=Vt(n),N=Vt(r),B=Vt(w),M=n&&w;(0,v.useEffect)((()=>{s&&M&&(n!==F||(0,c.difference)(r,N).length||w!==B)&&q()}),[s,n,F,r,N,q,M,w,B]),(0,v.useEffect)((()=>{if(s&&h&&null!==m){const e=r.filter((e=>!L(e)));e.length&&P(e),p()}}),[s,h,m,P,p,L,r]),(0,v.useEffect)((()=>{g&&!I.current&&(q(),I.current=!0)}),[g,q]),(0,v.useEffect)((()=>{if(s&&!(0,c.isEmpty)(m))return(0,c.filter)(m,(e=>(0,c.isEmpty)(e.updated_at))).length>0&&(x.current=setInterval((()=>{q()}),1e4)),()=>{clearInterval(x.current)}}),[s,m,q]);const K=s&&null===m,D=(0,v.useMemo)((()=>(0,c.isEmpty)(m)?[]:Object.values(m).filter((e=>{var t;return!(0,c.isEmpty)(null==e||null===(t=e.position)||void 0===t?void 0:t.history)})).map((e=>e.keyword))),[m]),$=(0,v.useMemo)((()=>E.length>0&&D.length>0&&D.every((e=>E.includes(e)))),[E,D]),W=(0,v.useCallback)((()=>{R($?[]:D)}),[R,$,D]),j=(0,v.useMemo)((()=>(0,c.orderBy)(r,[e=>Object.values(m||{}).map((e=>e.keyword)).includes(e)],["desc"])),[r,m]);return r&&!(0,c.isEmpty)(r)&&(0,k.createElement)(v.Fragment,null,(0,k.createElement)(Yt,null,(0,k.createElement)("table",{className:"yoast yoast-table"},(0,k.createElement)("thead",null,(0,k.createElement)("tr",null,(0,k.createElement)(zt,{isDisabled:0===D.length},(0,k.createElement)(S.Checkbox,{id:"select-all",onChange:W,checked:$,label:""})),(0,k.createElement)(Ut,{scope:"col",abbr:(0,d.__)("Keyphrase","wordpress-seo")},(0,d.__)("Keyphrase","wordpress-seo")),(0,k.createElement)("th",{scope:"col",abbr:(0,d.__)("Position","wordpress-seo")},(0,d.__)("Position","wordpress-seo")),(0,k.createElement)("th",{scope:"col",abbr:(0,d.__)("Position over time","wordpress-seo")},(0,d.__)("Position over time","wordpress-seo")),(0,k.createElement)("th",{scope:"col",abbr:(0,d.__)("Last updated","wordpress-seo")},(0,d.__)("Last updated","wordpress-seo")),(0,k.createElement)("th",{scope:"col",abbr:(0,d.__)("Tracking","wordpress-seo")},(0,d.__)("Tracking","wordpress-seo")))),(0,k.createElement)("tbody",null,j.map(((e,t)=>(0,k.createElement)(Wt,{key:`trackable-keyphrase-${t}`,keyphrase:e,onTrackKeyphrase:A,onUntrackKeyphrase:O,rowData:L(e),isFocusKeyphrase:e===f.trim().toLowerCase(),websiteId:y,isDisabled:!s,isLoading:K||T.indexOf(e.toLowerCase())>=0,isSelected:E.includes(e),onSelectKeyphrases:R})))))),(0,k.createElement)("p",{style:{marginBottom:0,position:"relative"}},(0,k.createElement)(jt,{href:wpseoAdminGlobalL10n["links.wincher.login"]},(0,d.sprintf)(/* translators: %s expands to Wincher */
(0,d.__)("Get more insights over at %s","wordpress-seo"),"Wincher")),(0,k.createElement)(Ht,null,(0,d.__)("* focus keyphrase","wordpress-seo"))))};Qt.propTypes={addTrackedKeyphrase:_().func.isRequired,isLoggedIn:_().bool,isNewlyAuthenticated:_().bool,keyphrases:_().array,newRequest:_().func.isRequired,removeTrackedKeyphrase:_().func.isRequired,setRequestFailed:_().func.isRequired,setKeyphraseLimitReached:_().func.isRequired,setRequestSucceeded:_().func.isRequired,setTrackedKeyphrases:_().func.isRequired,setHasTrackedAll:_().func.isRequired,trackAll:_().bool,trackedKeyphrases:_().object,websiteId:_().string,permalink:_().string.isRequired,focusKeyphrase:_().string,startAt:_().string,selectedKeyphrases:_().arrayOf(_().string).isRequired,onSelectKeyphrases:_().func.isRequired},Qt.defaultProps={isLoggedIn:!1,isNewlyAuthenticated:!1,keyphrases:[],trackAll:!1,websiteId:"",focusKeyphrase:""};const Xt=Qt,Zt=(0,he.compose)([(0,me.withSelect)((e=>{const{getWincherWebsiteId:t,getWincherTrackableKeyphrases:s,getWincherLoginStatus:r,getWincherPermalink:n,getFocusKeyphrase:o,isWincherNewlyAuthenticated:a,shouldWincherTrackAll:i}=e("yoast-seo/editor");return{focusKeyphrase:o(),keyphrases:s(),isLoggedIn:r(),trackAll:i(),websiteId:t(),isNewlyAuthenticated:a(),permalink:n()}})),(0,me.withDispatch)((e=>{const{setWincherNewRequest:t,setWincherRequestSucceeded:s,setWincherRequestFailed:r,setWincherSetKeyphraseLimitReached:n,setWincherTrackedKeyphrases:o,setWincherTrackingForKeyphrase:a,setWincherTrackAllKeyphrases:i,unsetWincherTrackingForKeyphrase:l}=e("yoast-seo/editor");return{newRequest:()=>{t()},setRequestSucceeded:e=>{s(e)},setRequestFailed:e=>{r(e)},setKeyphraseLimitReached:e=>{n(e)},addTrackedKeyphrase:e=>{a(e)},removeTrackedKeyphrase:e=>{l(e)},setTrackedKeyphrases:e=>{o(e)},setHasTrackedAll:()=>{i(!1)}}}))])(Xt),Jt=(0,I.makeOutboundLink)(),es=(0,I.makeOutboundLink)(),ts=()=>{const e=(0,d.sprintf)((0,d.__)(/* 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(0,k.createElement)("p",null,(0,ot.Z)({mixedString:e,components:{wincherLink:(0,k.createElement)(Jt,{href:wpseoAdminGlobalL10n["links.wincher.website"]},"Wincher"),wincherReadMoreLink:(0,k.createElement)(es,{href:wpseoAdminL10n["shortlinks.wincher.seo_performance"]},(0,d.__)("Read more about keyphrase tracking with Wincher","wordpress-seo"))}}))},ss=()=>(0,k.createElement)(S.Alert,{type:"error"},(0,d.__)("No keyphrase has been set. Please set a keyphrase first.","wordpress-seo")),rs=()=>(0,k.createElement)(S.Alert,{type:"info"},(0,d.sprintf)(/* translators: %s: Expands to "Wincher". */
(0,d.__)("Automatic tracking of keyphrases is enabled. Your keyphrase(s) will automatically be tracked by %s when you publish your post.","wordpress-seo"),"Wincher"));class ns{constructor(e,t={},s={}){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:""},s),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:s}=this.options,r=["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,s,r.join(","))),this.popup&&this.popup.focus(),window.addEventListener("message",this.messageHandler,!1)}async messageHandler(e){const{data:t,source:s,origin:r}=e;r===this.origin&&this.popup===s&&(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()}}const os=e=>{const t=(0,d.sprintf)(/* translators: %s expands to a link to open the Wincher login popup. */
(0,d.__)("It seems like something went wrong when retrieving your website's data. Please %s and try again.","wordpress-seo"),"{{reconnectToWincher/}}","Wincher");return(0,k.createElement)(S.Alert,{type:"error",className:e.className},(0,ot.Z)({mixedString:t,components:{reconnectToWincher:(0,k.createElement)("a",{href:"#",onClick:t=>{t.preventDefault(),e.onReconnect()}},(0,d.sprintf)(/* translators: %s : Expands to "Wincher". */
(0,d.__)("reconnect to %s","wordpress-seo"),"Wincher"))}}))};os.propTypes={onReconnect:_().func.isRequired,className:_().string},os.defaultProps={className:""};const as=os,is=()=>(0,k.createElement)(S.Alert,{type:"error"},(0,d.__)("Before you can track your SEO performance make sure to set either the post’s title and save it as a draft or manually set the post’s slug.","wordpress-seo")),ls=window.yoast["chart.js"],cs="label";function us(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function ds(e,t){e.labels=t}function ps(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:cs;const r=[];e.datasets=t.map((t=>{const n=e.datasets.find((e=>e[s]===t[s]));return n&&t.data&&!r.includes(n)?(r.push(n),Object.assign(n,t),n):{...t}}))}function hs(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cs;const s={labels:[],datasets:[]};return ds(s,e.labels),ps(s,e.datasets,t),s}function ms(e,t){const{height:s=150,width:r=300,redraw:n=!1,datasetIdKey:o,type:a,data:i,options:l,plugins:c=[],fallbackContent:u,updateMode:d,...p}=e,h=(0,k.useRef)(null),m=(0,k.useRef)(),g=()=>{h.current&&(m.current=new ls.Chart(h.current,{type:a,data:hs(i,o),options:l&&{...l},plugins:c}),us(t,m.current))},y=()=>{us(t,null),m.current&&(m.current.destroy(),m.current=null)};return(0,k.useEffect)((()=>{!n&&m.current&&l&&function(e,t){const s=e.options;s&&t&&Object.assign(s,t)}(m.current,l)}),[n,l]),(0,k.useEffect)((()=>{!n&&m.current&&ds(m.current.config.data,i.labels)}),[n,i.labels]),(0,k.useEffect)((()=>{!n&&m.current&&i.datasets&&ps(m.current.config.data,i.datasets,o)}),[n,i.datasets]),(0,k.useEffect)((()=>{m.current&&(n?(y(),setTimeout(g)):m.current.update(d))}),[n,l,i.labels,i.datasets,d]),(0,k.useEffect)((()=>{m.current&&(y(),setTimeout(g))}),[a]),(0,k.useEffect)((()=>(g(),()=>y())),[]),k.createElement("canvas",Object.assign({ref:h,role:"img",height:s,width:r},p),u)}const gs=(0,k.forwardRef)(ms);function ys(e,t){return ls.Chart.register(t),(0,k.forwardRef)(((t,s)=>k.createElement(gs,Object.assign({},t,{ref:s,type:e}))))}const fs=ys("line",ls.LineController),bs={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};ls._adapters._date.override("function"==typeof nt()?{_id:"moment",formats:function(){return bs},parse:function(e,t){return"string"==typeof e&&"string"==typeof t?e=nt()(e,t):e instanceof nt()||(e=nt()(e)),e.isValid()?e.valueOf():null},format:function(e,t){return nt()(e).format(t)},add:function(e,t,s){return nt()(e).add(t,s).valueOf()},diff:function(e,t,s){return nt()(e).diff(nt()(t),s)},startOf:function(e,t,s){return e=nt()(e),"isoWeek"===t?(s=Math.trunc(Math.min(Math.max(0,s),6)),e.isoWeekday(s).startOf("day").valueOf()):e.startOf(t).valueOf()},endOf:function(e,t){return nt()(e).endOf(t).valueOf()}}:{}),Math.PI,Number.POSITIVE_INFINITY,Math.log10,Math.sign,"undefined"==typeof window||window.requestAnimationFrame,new Map,Object.create(null),Object.create(null),Number.EPSILON;const ws=["top","right","bottom","left"];function ks(e,t,s){const r={};s=s?"-"+s:"";for(let n=0;n<4;n++){const o=ws[n];r[o]=parseFloat(e[t+"-"+o+s])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}!function(){let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}}(),ls.Chart.register(ls.CategoryScale,ls.LineController,ls.LineElement,ls.PointElement,ls.LinearScale,ls.TimeScale,ls.Legend,ls.Tooltip);const vs=["#ff983b","#ffa3f7","#3798ff","#ff3b3b","#acce81","#b51751","#3949ab","#26c6da","#ccb800","#de66ff","#4db6ac","#ffab91","#45f5f1","#77f210","#90a4ae","#ffd54f","#006b5e","#8ec7d2","#b1887c","#cc9300"];function Es({datasets:e,isChartShown:t,keyphrases:s}){if(!t)return null;const r=(0,v.useMemo)((()=>Object.fromEntries([...s].sort().map(((e,t)=>[e,vs[t%vs.length]])))),[s]),n=e.map((e=>{const t=r[e.label];return{...e,data:e.data.map((({datetime:e,value:t})=>({x:e,y:t}))),lineTension:0,pointRadius:1,pointHoverRadius:4,borderWidth:2,pointHitRadius:6,backgroundColor:t,borderColor:t}})).filter((e=>!1!==e.selected));return(0,k.createElement)(fs,{height:100,data:{datasets:n},options:{plugins:{legend:{display:!0,position:"bottom",labels:{color:"black",usePointStyle:!0,boxHeight:7,boxWidth:7},onClick:c.noop},tooltip:{enabled:!0,callbacks:{title:e=>nt()(e[0].raw.x).utc().format("YYYY-MM-DD")},titleAlign:"center",mode:"xPoint",position:"nearest",usePointStyle:!0,boxHeight:7,boxWidth:7,boxPadding:2}},scales:{x:{bounds:"ticks",type:"time",time:{unit:"day",minUnit:"day"},grid:{display:!1},ticks:{autoSkipPadding:50,maxRotation:0,color:"black"}},y:{bounds:"ticks",offset:!0,reverse:!0,ticks:{precision:0,color:"black"},max:101}}}})}ls.Interaction.modes.xPoint=(e,t,s,r)=>{const n=function(e,t){if("native"in e)return e;const{canvas:s,currentDevicePixelRatio:r}=t,n=(h=s).ownerDocument.defaultView.getComputedStyle(h,null),o="border-box"===n.boxSizing,a=ks(n,"padding"),i=ks(n,"border","width"),{x:l,y:c,box:u}=function(e,t){const s=e.touches,r=s&&s.length?s[0]:e,{offsetX:n,offsetY:o}=r;let a,i,l=!1;if(((e,t,s)=>(e>0||t>0)&&(!s||!s.shadowRoot))(n,o,e.target))a=n,i=o;else{const e=t.getBoundingClientRect();a=r.clientX-e.left,i=r.clientY-e.top,l=!0}return{x:a,y:i,box:l}}(e,s),d=a.left+(u&&i.left),p=a.top+(u&&i.top);var h;let{width:m,height:g}=t;return o&&(m-=a.width+i.width,g-=a.height+i.height),{x:Math.round((l-d)/m*s.width/r),y:Math.round((c-p)/g*s.height/r)}}(t,e);let o=[];if(ls.Interaction.evaluateInteractionItems(e,"x",n,((e,t,s)=>{e.inXRange(n.x,r)&&o.push({element:e,datasetIndex:t,index:s})})),0===o.length)return o;const a=o.reduce(((e,t)=>Math.abs(n.x-e.element.x)<Math.abs(n.x-t.element.x)?e:t)).element.x;return o=o.filter((e=>e.element.x===a)),o.some((e=>Math.abs(e.element.y-n.y)<10))?o:[]},Es.propTypes={datasets:_().arrayOf(_().shape({label:_().string.isRequired,data:_().arrayOf(_().shape({datetime:_().string.isRequired,value:_().number.isRequired})).isRequired,selected:_().bool})).isRequired,isChartShown:_().bool.isRequired,keyphrases:_().array.isRequired};const Rs=({response:e,onLogin:t})=>[401,403,404].includes(e.status)?(0,k.createElement)(as,{onReconnect:t}):(0,k.createElement)(ct,null);Rs.propTypes={response:_().object.isRequired,onLogin:_().func.isRequired};const xs=({isSuccess:e,response:t,allKeyphrasesMissRanking:s,onLogin:r,keyphraseLimitReached:n,limit:o})=>n?(0,k.createElement)(lt,{limit:o}):(0,c.isEmpty)(t)||e?s?(0,k.createElement)(_t,null):null:(0,k.createElement)(Rs,{response:t,onLogin:r});xs.propTypes={isSuccess:_().bool.isRequired,allKeyphrasesMissRanking:_().bool.isRequired,response:_().object,onLogin:_().func.isRequired,keyphraseLimitReached:_().bool.isRequired,limit:_().number.isRequired},xs.defaultProps={response:{}};let _s=null;const Ss=async e=>{if(_s&&!_s.isClosed())return void _s.focus();const{url:t}=await async function(){return await dt({path:"yoast/v1/wincher/authorization-url",method:"GET"})}();_s=new ns(t,{success:{type:"wincher:oauth:success",callback:t=>(async(e,t)=>{const{onAuthentication:s,setRequestSucceeded:r,setRequestFailed:n,keyphrases:o,addTrackedKeyphrase:a,setKeyphraseLimitReached:i}=e;await ut((()=>async function(e){const{code:t,websiteId:s}=e;return await dt({path:"yoast/v1/wincher/authenticate",method:"POST",data:{code:t,websiteId:s}})}(t)),(async e=>{s(!0,!0,t.websiteId.toString()),r(e);const l=(Array.isArray(o)?o:[o]).map((e=>e.toLowerCase()));await ut((()=>pt(l)),(e=>{r(e),a(e.results)}),(e=>{400===e.status&&e.limit&&i(e.limit),n(e)}),201);const c=_s.getPopup();c&&c.close()}),(async e=>n(e)))})(e,t)},error:{type:"wincher:oauth:error",callback:()=>e.onAuthentication(!1,!1)}},{title:"Wincher_login",width:500,height:700}),_s.createPopup()},Is=e=>e.isLoggedIn?null:(0,k.createElement)("p",null,(0,k.createElement)(S.NewButton,{onClick:e.onLogin,variant:"primary"},(0,d.sprintf)(/* translators: %s expands to Wincher */
(0,d.__)("Connect with %s","wordpress-seo"),"Wincher")));Is.propTypes={isLoggedIn:_().bool.isRequired,onLogin:_().func.isRequired};const Ts=R().div`
	p {
		margin: 1em 0;
	}
`,Cs=R().div`
	${e=>e.isDisabled&&"\n\t\topacity: .5;\n\t\tpointer-events: none;\n\t"};
`,Ls=R().div`
	font-weight: var(--yoast-font-weight-bold);
	color: var(--yoast-color-label);
	font-size: var(--yoast-font-size-default);
`,qs=R().div.attrs({className:"yoast-field-group"})`
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 14px;
`,Ps=R().div`
	margin: 8px 0;
`,Os=nt().utc().startOf("day"),As=[{name:(0,d.__)("Last day","wordpress-seo"),value:nt()(Os).subtract(1,"days").format(),defaultIndex:1},{name:(0,d.__)("Last week","wordpress-seo"),value:nt()(Os).subtract(1,"week").format(),defaultIndex:2},{name:(0,d.__)("Last month","wordpress-seo"),value:nt()(Os).subtract(1,"month").format(),defaultIndex:3},{name:(0,d.__)("Last year","wordpress-seo"),value:nt()(Os).subtract(1,"year").format(),defaultIndex:0}],Fs=e=>{const{onSelect:t,selected:s,options:r,isLoggedIn:n}=e;return n?r.length<1?null:(0,k.createElement)("select",{className:"components-select-control__input",id:"wincher-period-picker",value:(null==s?void 0:s.value)||r[0].value,onChange:t},r.map((e=>(0,k.createElement)("option",{key:e.name,value:e.value},e.name)))):null};Fs.propTypes={onSelect:_().func.isRequired,selected:_().object,options:_().array.isRequired,isLoggedIn:_().bool.isRequired};const Ns=e=>{const{trackedKeyphrases:t,isLoggedIn:s,keyphrases:r,shouldTrackAll:n,permalink:o,historyDaysLimit:a}=e;if(!o&&s)return(0,k.createElement)(is,null);if(0===r.length)return(0,k.createElement)(ss,null);const i=nt()(Os).subtract(a,"days"),l=As.filter((e=>nt()(e.value).isSameOrAfter(i))),u=(0,c.orderBy)(l,(e=>e.defaultIndex),"desc")[0],[p,h]=(0,v.useState)(u),[m,g]=(0,v.useState)([]),y=m.length>0,f=(0,he.usePrevious)(t);(0,v.useEffect)((()=>{if(!(0,c.isEmpty)(t)&&(0,c.difference)(Object.keys(t),Object.keys(f||[])).length){const e=Object.values(t).map((e=>e.keyword));g(e)}}),[t,f]),(0,v.useEffect)((()=>{h(u)}),[null==u?void 0:u.name]);const b=(0,v.useCallback)((e=>{const t=As.find((t=>t.value===e.target.value));t&&h(t)}),[h]),w=(0,v.useMemo)((()=>(0,c.isEmpty)(m)||(0,c.isEmpty)(t)?[]:Object.values(t).filter((e=>{var t;return!(null==e||null===(t=e.position)||void 0===t||!t.history)})).map((e=>{var t;return{label:e.keyword,data:e.position.history,selected:m.includes(e.keyword)&&!(0,c.isEmpty)(null===(t=e.position)||void 0===t?void 0:t.history)}}))),[m,t]);return(0,k.createElement)(Cs,{isDisabled:!s},(0,k.createElement)("p",null,(0,d.__)("You can enable / disable tracking the SEO performance for each keyphrase below.","wordpress-seo")),s&&n&&(0,k.createElement)(rs,null),(0,k.createElement)(qs,null,(0,k.createElement)(Fs,{selected:p,onSelect:b,options:l,isLoggedIn:s})),(0,k.createElement)(Ps,null,(0,k.createElement)(Es,{isChartShown:y,datasets:w,keyphrases:r})),(0,k.createElement)(Zt,{startAt:null==p?void 0:p.value,selectedKeyphrases:m,onSelectKeyphrases:g,trackedKeyphrases:t}))};function Bs(e){const{isNewlyAuthenticated:t,isLoggedIn:s}=e,r=(0,v.useCallback)((()=>{Ss(e)}),[Ss,e]),n=bt(s);return(0,k.createElement)(Ts,null,t&&(0,k.createElement)(xt,null),s&&(0,k.createElement)(Rt,{trackingInfo:n}),(0,k.createElement)(Ls,null,(0,d.__)("SEO performance","wordpress-seo"),(0,k.createElement)(S.HelpIcon,{linkTo:wpseoAdminL10n["shortlinks.wincher.seo_performance"]
/* translators: Hidden accessibility text. */,linkText:(0,d.__)("Learn more about the SEO performance feature.","wordpress-seo")})),(0,k.createElement)(ts,null),(0,k.createElement)(Is,{isLoggedIn:s,onLogin:r}),(0,k.createElement)(xs,{...e,onLogin:r}),(0,k.createElement)(Ns,{...e,historyDaysLimit:(null==n?void 0:n.historyDays)||31}))}Ns.propTypes={trackedKeyphrases:_().object,keyphrases:_().array.isRequired,isLoggedIn:_().bool.isRequired,shouldTrackAll:_().bool.isRequired,permalink:_().string.isRequired,historyDaysLimit:_().number},Bs.propTypes={trackedKeyphrases:_().object,addTrackedKeyphrase:_().func.isRequired,isLoggedIn:_().bool,isNewlyAuthenticated:_().bool,keyphrases:_().array,response:_().object,shouldTrackAll:_().bool,permalink:_().string,historyDaysLimit:_().number},Bs.defaultProps={trackedKeyphrases:null,isLoggedIn:!1,isNewlyAuthenticated:!1,keyphrases:[],response:{},shouldTrackAll:!1,permalink:"",historyDaysLimit:0};const Ms=(0,he.compose)([(0,me.withSelect)((e=>{const{isWincherNewlyAuthenticated:t,getWincherKeyphraseLimitReached:s,getWincherLimit:r,getWincherHistoryDaysLimit:n,getWincherLoginStatus:o,getWincherRequestIsSuccess:a,getWincherRequestResponse:i,getWincherTrackableKeyphrases:l,getWincherTrackedKeyphrases:c,getWincherAllKeyphrasesMissRanking:u,getWincherPermalink:d,shouldWincherAutomaticallyTrackAll:p}=e("yoast-seo/editor");return{keyphrases:l(),trackedKeyphrases:c(),allKeyphrasesMissRanking:u(),isLoggedIn:o(),isNewlyAuthenticated:t(),isSuccess:a(),keyphraseLimitReached:s(),limit:r(),response:i(),shouldTrackAll:p(),permalink:d(),historyDaysLimit:n()}})),(0,me.withDispatch)((e=>{const{setWincherWebsiteId:t,setWincherRequestSucceeded:s,setWincherRequestFailed:r,setWincherTrackingForKeyphrase:n,setWincherSetKeyphraseLimitReached:o,setWincherLoginStatus:a}=e("yoast-seo/editor");return{setRequestSucceeded:e=>{s(e)},setRequestFailed:e=>{r(e)},addTrackedKeyphrase:e=>{n(e)},setKeyphraseLimitReached:e=>{o(e)},onAuthentication:(e,s,r)=>{t(r),a(e,s)}}}))])(Bs);function Ks(e,t,s,r){return new Promise(((n,o)=>{jQuery.ajax({type:e,url:t,beforeSend:s?e=>{e.setRequestHeader("X-WP-Nonce",s)}:null,data:r,dataType:"json",success:n,error:o})}))}let Ds,$s,Ws,js;const Hs=/<(\/)?(\w+)\s*(\/)?>/g;function Ys(e,t,s,r,n){return{element:e,tokenStart:t,tokenLength:s,prevOffset:r,leadingTextStart:n,children:[]}}function zs(){const e=Ds.length-$s;0!==e&&Ws.push(Ds.substring($s,$s+e))}function Us(e){const{element:t,tokenStart:s,tokenLength:r,prevOffset:n,children:o}=e,a=js[js.length-1],i=Ds.substring(a.prevOffset,s);i&&a.children.push(i),a.children.push((0,v.cloneElement)(t,null,...o)),a.prevOffset=n||s+r}function Vs(e){const t=function(){const e=Hs.exec(Ds);if(null===e)return["no-more-tokens"];const t=e.index,[s,r,n,o]=e,a=s.length;return o?["self-closed",n,t,a]:r?["closer",n,t,a]:["opener",n,t,a]}(),[s,r,n,o]=t,a=js.length,i=n>$s?$s:null;if(!e[r])return zs(),!1;switch(s){case"no-more-tokens":if(0!==a){const{leadingTextStart:e,tokenStart:t}=js.pop();Ws.push(Ds.substring(e,e+t))}return zs(),!1;case"self-closed":return 0===a?(null!==i&&Ws.push(Ds.substring(i,n)),Ws.push(e[r]),$s=n+o,!0):(Us(Ys(e[r],n,o)),$s=n+o,!0);case"opener":return js.push(Ys(e[r],n,o,n+o,i)),$s=n+o,!0;case"closer":if(1===a)return function(e){const{element:t,leadingTextStart:s,prevOffset:r,tokenStart:n,children:o}=js.pop(),a=e?Ds.substring(r,e):Ds.substring(r);a&&o.push(a),null!==s&&Ws.push(Ds.substring(s,n)),Ws.push((0,v.cloneElement)(t,null,...o))}(n),$s=n+o,!0;const t=js.pop(),s=Ds.substring(t.prevOffset,n);t.children.push(s),t.prevOffset=n+o;const l=Ys(t.element,t.tokenStart,t.tokenLength,n+o);return l.children=t.children,Us(l),$s=n+o,!0;default:return zs(),!1}}function Gs(e,t="wpseoYoastJSL10n"){const s=(0,c.get)(window,[t,e,"locale_data",e],!1);"yoast-components"===e&&(e="wordpress-seo"),!1===s?(0,d.setLocaleData)({"":{}},e):(0,d.setLocaleData)(s,e)}const Qs=window.wp.sanitize,Xs="SNIPPET_EDITOR_UPDATE_REPLACEMENT_VARIABLE",Zs="SNIPPET_EDITOR_UPDATE_REPLACEMENT_VARIABLES_BATCH";function Js(e,t,s="",r=!1){const n="string"==typeof t?(0,I.decodeHTML)(t):t;return{type:Xs,name:e,value:n,label:s,hidden:r}}function er(e){return e.charAt(0).toUpperCase()+e.slice(1)}const{stripHTMLTags:tr}=I.strings,sr=["slug","content","contentImage","snippetPreviewImageURL"];function rr(e,t){(0,c.forEach)(e,((e,s)=>{sr.includes(s)||t.dispatch(Js(s,e))}))}function nr(e){if(!["ct_","cf_","pt_"].includes(e.substring(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 or(e){return er(e=nr(e))}function ar(e,t){return e.push({name:t.name,label:t.label||or(t.name),value:t.value}),e}function ir(e,t="_"){return e.replace(/\s/g,t)}function lr(e){return{name:"cf_"+ir(e),label:er(e+" (custom field)")}}function cr(e){const t=ir(e);return{name:"ct_"+t,label:er(e+" (custom taxonomy)"),descriptionName:"ct_desc_"+t,descriptionLabel:er(e+" description (custom taxonomy)")}}function ur(e,t){if(!e.custom_taxonomies)return e;const s={};return(0,c.forEach)(e.custom_taxonomies,((e,t)=>{const{name:r,label:n,descriptionName:o,descriptionLabel:a}=cr(t),i="string"==typeof e.name?(0,I.decodeHTML)(e.name):e.name,l="string"==typeof e.description?(0,I.decodeHTML)(e.description):e.description;s[r]={value:i,label:n},s[o]={value:l,label:a}})),t.dispatch(function(e){return{type:Zs,updatedVariables:e}}(s)),(0,c.omit)({...e},"custom_taxonomies")}function dr(e,t){return e.custom_fields?((0,c.forEach)(e.custom_fields,((e,s)=>{const{name:r,label:n}=lr(s);t.dispatch(Js(r,e,n))})),(0,c.omit)({...e},"custom_fields")):e}function pr(e,t=156){return(e=(e=(0,Qs.stripTags)(e)).trim()).length<=t||(e=e.substring(0,t),/\s/.test(e)&&(e=e.substring(0,e.lastIndexOf(" ")))),e}const hr=function(e){const t=(0,c.get)(window,["YoastSEO","app","pluggable"],!1);if(!t||!(0,c.get)(window,["YoastSEO","app","pluggable","loaded"],!1))return function(e){const t=(0,c.get)(window,["YoastSEO","wp","replaceVarsPlugin","replaceVariables"],c.identity);return{url:e.url,title:tr(t(e.title)),description:tr(t(e.description)),filteredSEOTitle:e.filteredSEOTitle?tr(t(e.filteredSEOTitle)):""}}(e);const s=t._applyModifications.bind(t);return{url:e.url,title:tr(s("data_page_title",e.title)),description:tr(s("data_meta_desc",e.description)),filteredSEOTitle:e.filteredSEOTitle?tr(s("data_page_title",e.filteredSEOTitle)):""}};var mr="score-text",gr="image yoast-logo svg",yr=jQuery;function fr(e,t,s=null){var r,n,o,a,i;if(null!==s)return(0,c.get)(s,t,"");const l=(0,me.select)("yoast-seo/editor").getIsPremium(),u={na:(0,d.__)("Not available","wordpress-seo"),bad:(0,d.__)("Needs improvement","wordpress-seo"),ok:(0,d.__)("OK","wordpress-seo"),good:(0,d.__)("Good","wordpress-seo")},p={keyword:{label:l?(0,d.__)("Premium SEO analysis:","wordpress-seo"):(0,d.__)("SEO analysis:","wordpress-seo"),anchor:"yoast-seo-analysis-collapsible-metabox",status:u},content:{label:(0,d.__)("Readability analysis:","wordpress-seo"),anchor:"yoast-readability-analysis-collapsible-metabox",status:u},"inclusive-language":{label:(0,d.__)("Inclusive language:","wordpress-seo"),anchor:"yoast-inclusive-language-analysis-collapsible-metabox",status:{...u,ok:(0,d.__)("Potentially non-inclusive","wordpress-seo")}}};return null!=p&&null!==(r=p[e])&&void 0!==r&&null!==(n=r.status)&&void 0!==n&&n[t]?`<a href="#${null===(o=p[e])||void 0===o?void 0:o.anchor}">${null===(a=p[e])||void 0===a?void 0:a.label}</a> <strong>${null===(i=p[e])||void 0===i?void 0:i.status[t]}</strong>`:""}window.yoast=window.yoast||{},window.yoast.editorModules={analysis:{getL10nObject:u,getContentLocale:function(){const e=u();return(0,c.get)(e,"contentLocale","en_US")},getIndicatorForScore:function(e){return(0,c.isNil)(e)||(e/=10),function(e){switch(e){case"feedback":return{className:"na",screenReaderText:(0,d.__)("Not available","wordpress-seo"),screenReaderReadabilityText:(0,d.__)("Not available","wordpress-seo"),screenReaderInclusiveLanguageText:(0,d.__)("Not available","wordpress-seo")};case"bad":return{className:"bad",screenReaderText:(0,d.__)("Needs improvement","wordpress-seo"),screenReaderReadabilityText:(0,d.__)("Needs improvement","wordpress-seo"),screenReaderInclusiveLanguageText:(0,d.__)("Needs improvement","wordpress-seo")};case"ok":return{className:"ok",screenReaderText:(0,d.__)("OK SEO score","wordpress-seo"),screenReaderReadabilityText:(0,d.__)("OK","wordpress-seo"),screenReaderInclusiveLanguageText:(0,d.__)("Potentially non-inclusive","wordpress-seo")};case"good":return{className:"good",screenReaderText:(0,d.__)("Good SEO score","wordpress-seo"),screenReaderReadabilityText:(0,d.__)("Good","wordpress-seo"),screenReaderInclusiveLanguageText:(0,d.__)("Good","wordpress-seo")};default:return{className:"loading",screenReaderText:"",screenReaderReadabilityText:"",screenReaderInclusiveLanguageText:""}}}(p.interpreters.scoreToRating(e))},constants:e,refreshAnalysis:t},components:{HelpLink:V,TopLevelProviders:pe,higherorder:{withYoastSidebarPriority:e=>{const t=t=>{const{renderPriority:s,...r}=t;return(0,k.createElement)(e,{...r})};return t.propTypes={renderPriority:_().number},t}},contentAnalysis:{KeywordInput:j,mapResults:r},contexts:{location:{LocationContext:i.LocationContext,LocationProvider:i.LocationProvider,LocationConsumer:i.LocationConsumer}},SidebarItem:ue,SidebarCollapsible:le,MetaboxCollapsible:e=>(0,k.createElement)(G,{hasPadding:!0,hasSeparator:!0,...e}),Modal:J,portals:{Portal:re,ImageSelectPortal:ne,ScoreIconPortal:ae}},containers:{EditorModal:we,PersistentDismissableAlert:ke,Results:We,SEMrushRelatedKeyphrases:st,WincherSEOPerformance:Ms},helpers:{ajaxHelper:n,createInterpolateElement:(e,t)=>{if(Ds=e,$s=0,Ws=[],js=[],Hs.lastIndex=0,!(e=>{const t="object"==typeof e,s=t&&Object.values(e);return t&&s.length&&s.every((e=>(0,v.isValidElement)(e)))})(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are WPElements");do{}while(Vs(t));return(0,v.createElement)(v.Fragment,null,...Ws)},createWatcher:(e,t)=>{let s=e();return()=>{const r=e();(0,c.isEqual)(r,s)||(s=r,t((0,c.clone)(r)))}},isBlockEditor:function(){return window.wpseoScriptData&&"1"===window.wpseoScriptData.isBlockEditor},i18n:o,replacementVariableHelpers:a,publishBox:{updateScore:function(e,t,s=null){var r=yr("#"+e+"-score"),n=gr+" "+t;r.children(".image").attr("class",n);var o=fr(e,t,s);r.children("."+mr).html(o)},createScoresInPublishBox:function(e,t,s=null){const r=yr("<div />",{class:"misc-pub-section yoast yoast-seo-score "+e+"-score",id:e+"-score"}),n=yr("<span />",{class:mr,html:fr(e,t,s)}),o=yr("<span>").attr("class",gr+" na");r.append(o).append(n),yr("#yoast-seo-publishbox-section").append(r)},scrollToCollapsible:function(e){const t=yr("#wpadminbar"),s=yr(e);if(!t||!s)return;const r="fixed"===t.css("position")?t.height():0;yr([document.documentElement,document.body]).animate({scrollTop:s.offset().top-r},1e3),s.trigger("focus"),0===s.parent().siblings().length&&s.trigger("click")}},updateAdminBar:function(e){jQuery("#wp-admin-bar-wpseo-menu .wpseo-score-icon").attr("title",e.screenReaderText).attr("class","wpseo-score-icon "+e.className).find(".wpseo-score-text").text(e.screenReaderText)},updateTrafficLight:function(e){var t=jQuery(".yst-traffic-light"),s=t.closest(".wpseo-meta-section-link"),r=jQuery("#wpseo-traffic-light-desc"),n=e.className||"na";t.attr("class","yst-traffic-light "+n),s.attr("aria-describedby","wpseo-traffic-light-desc"),r.length>0?r.text(e.screenReaderText):s.closest("li").append("<span id='wpseo-traffic-light-desc' class='screen-reader-text'>"+e.screenReaderText+"</span>")}}}})()})();

Youez - 2016 - github.com/yon3zu
LinuXploit