????JFIF??x?x????'403WebShell
403Webshell
Server IP : 104.21.32.1  /  Your IP : 216.73.216.191
Web Server : LiteSpeed
System : Linux premium151.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
User : tempvsty ( 647)
PHP Version : 8.0.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/./././././tempvsty/peekmysite.com/wp-content/plugins/wordpress-seo/js/dist/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/./././././tempvsty/peekmysite.com/wp-content/plugins/wordpress-seo/js/dist/editor-modules.js
(()=>{var e={4184:(e,t)=>{var s;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var s=arguments[t];if(s){var i=typeof s;if("string"===i||"number"===i)e.push(s);else if(Array.isArray(s)){if(s.length){var n=o.apply(null,s);n&&e.push(n)}}else if("object"===i){if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]")){e.push(s.toString());continue}for(var a in s)r.call(s,a)&&s[a]&&e.push(a)}}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(s=function(){return o}.apply(t,[]))||(e.exports=s)}()},6746:(e,t,s)=>{"use strict";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},o=a(s(9196)),i=a(s(9156)),n=a(s(6743));function a(e){return e&&e.__esModule?e:{default:e}}var l=void 0;function c(e,t){var s,n,a,d,u,p,h,m,y=[],g={};for(p=0;p<e.length;p++)if("string"!==(u=e[p]).type){if(!t.hasOwnProperty(u.value)||void 0===t[u.value])throw new Error("Invalid interpolation, missing component node: `"+u.value+"`");if("object"!==r(t[u.value]))throw new Error("Invalid interpolation, component node must be a ReactElement or null: `"+u.value+"`","\n> "+l);if("componentClose"===u.type)throw new Error("Missing opening component token: `"+u.value+"`");if("componentOpen"===u.type){s=t[u.value],a=p;break}y.push(t[u.value])}else y.push(u.value);return s&&(d=function(e,t){var s,r,o=t[e],i=0;for(r=e+1;r<t.length;r++)if((s=t[r]).value===o.value){if("componentOpen"===s.type){i++;continue}if("componentClose"===s.type){if(0===i)return r;i--}}throw new Error("Missing closing component token `"+o.value+"`")}(a,e),h=c(e.slice(a+1,d),t),n=o.default.cloneElement(s,{},h),y.push(n),d<e.length-1&&(m=c(e.slice(d+1),t),y=y.concat(m))),1===y.length?y[0]:(y.forEach((function(e,t){e&&(g["interpolation-child-"+t]=e)})),(0,i.default)(g))}t.Z=function(e){var t=e.mixedString,s=e.components,o=e.throwErrors;if(l=t,!s)return t;if("object"!==(void 0===s?"undefined":r(s))){if(o)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var i=(0,n.default)(t);try{return c(i,s)}catch(e){if(o)throw new Error("Interpolation Error: unable to process `"+t+"` because of error `"+e.message+"`");return t}}},6743:e=>{"use strict";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)=>{"use strict";var r=s(9196),o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,i=s(7942),n=s(9179),a=s(397),l=".",c=":",d="function"==typeof Symbol&&Symbol.iterator,u="@@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 i,a=typeof e;if("undefined"!==a&&"boolean"!==a||(e=null),null===e||"string"===a||"number"===a||"object"===a&&e.$$typeof===o)return s(r,e,""===t?l+p(e,0):t),1;var m=0,y=""===t?l:t+c;if(Array.isArray(e))for(var g=0;g<e.length;g++)m+=h(i=e[g],y+p(i,g),s,r);else{var f=function(e){var t=e&&(d&&e[d]||e[u]);if("function"==typeof t)return t}(e);if(f)for(var x,w=f.call(e),b=0;!(x=w.next()).done;)m+=h(i=x.value,y+p(i,b++),s,r);else if("object"===a){var v=""+e;n(!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 y(e){return(""+e).replace(m,"$&/")}var g,f,x=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 b(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 o,n,a=e.result,l=e.keyPrefix,c=e.func,d=e.context,u=c.call(d,t,e.count++);Array.isArray(u)?k(u,a,s,i.thatReturnsArgument):null!=u&&(r.isValidElement(u)&&(o=u,n=l+(!u.key||t&&t.key===u.key?"":y(u.key)+"/")+s,u=r.cloneElement(o,{key:n},void 0!==o.props?o.props.children:void 0)),a.push(u))}function k(e,t,s,r,o){var i="";null!=s&&(i=y(s)+"/");var n=b.getPooled(t,i,r,o);!function(e,t,s){null==e||h(e,"",t,s)}(e,v,n),b.release(n)}b.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},g=function(e,t,s,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,e,t,s,r),i}return new o(e,t,s,r)},(f=b).instancePool=[],f.getPooled=g||x,f.poolSize||(f.poolSize=10),f.release=function(e){var t=this;n(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 a(!1,"React.addons.createFragment only accepts a single object. Got: %s",e),e;if(r.isValidElement(e))return a(!1,"React.addons.createFragment does not accept a ReactElement without a wrapper object."),e;n(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)k(e[s],t,s,i.thatReturnsArgument);return t}},7942:e=>{"use strict";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=>{"use strict";e.exports=function(e,t,s,r,o,i,n,a){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,o,i,n,a],d=0;(l=new Error(t.replace(/%s/g,(function(){return c[d++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},397:(e,t,s)=>{"use strict";var r=s(7942);e.exports=r},9196:e=>{"use strict";e.exports=window.React}},t={};function s(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,s),i.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})},(()=>{"use strict";var e={};s.r(e),s.d(e,{refreshDelay:()=>a});var t={};s.r(t),s.d(t,{default:()=>f,initializationDone:()=>x,sortResultsByIdentifier:()=>g});var r={};s.r(r),s.d(r,{default:()=>z,getIconForScore:()=>K});var o={};s.r(o),s.d(o,{doAjaxRequest:()=>Ps});var i={};s.r(i),s.d(i,{applyReplaceUsingPlugin:()=>Xs,createLabelFromName:()=>Hs,excerptFromContent:()=>Qs,fillReplacementVariables:()=>Ws,handlePrefixes:()=>Us,mapCustomFields:()=>Zs,mapCustomTaxonomies:()=>Gs,nonReplaceVars:()=>Ds,prepareCustomFieldForDispatch:()=>Ys,prepareCustomTaxonomyForDispatch:()=>Vs,pushNewReplaceVar:()=>Ks,replaceSpaces:()=>zs});const n=window.yoast.externals.contexts,a=500,l=window.lodash;function c(){return(0,l.get)(window,"wpseoScriptData.metabox",{intl:{},isRtl:!1})}const d=window.wp.i18n,u=window.yoast.analysis,p=window.wp.hooks,h=window.yoast.externals.redux;function m(){}let y=!1;function g(e){return e.sort(((e,t)=>e._identifier.localeCompare(t._identifier)))}function f(e,t,s,r,o){if(!y)return;const i=u.Paper.parse(t());e.analyze(i).then((n=>{const{result:{seo:a,readability:l,inclusiveLanguage:c}}=n;if(a){const e=a[""];e.results.forEach((e=>{e.getMarker=()=>()=>s(i,e.marks)})),e.results=g(e.results),r.dispatch(h.actions.setSeoResultsForKeyword(i.getKeyword(),e.results)),r.dispatch(h.actions.setOverallSeoScore(e.score,i.getKeyword())),r.dispatch(h.actions.refreshSnippetEditor()),o.saveScores(e.score,i.getKeyword())}l&&(l.results.forEach((e=>{e.getMarker=()=>()=>s(i,e.marks)})),l.results=g(l.results),r.dispatch(h.actions.setReadabilityResults(l.results)),r.dispatch(h.actions.setOverallReadabilityScore(l.score)),r.dispatch(h.actions.refreshSnippetEditor()),o.saveContentScore(l.score)),c&&(c.results.forEach((e=>{e.getMarker=()=>()=>s(i,e.marks)})),c.results=g(c.results),r.dispatch(h.actions.setInclusiveLanguageResults(c.results)),r.dispatch(h.actions.setOverallInclusiveLanguageScore(c.score)),r.dispatch(h.actions.refreshSnippetEditor()),o.saveInclusiveLanguageScore(c.score)),(0,p.doAction)("yoast.analysis.refresh",n,{paper:i,worker:e,collectData:t,applyMarks:s,store:r,dataCollector:o})})).catch(m)}function x(){y=!0}const w=window.wp.element,b=window.yoast.styledComponents;var v=s.n(b);const k=window.yoast.propTypes;var j=s.n(k);const _=window.yoast.componentsNew,S=window.yoast.helpers,R=window.yoast.styleGuide,C=window.ReactJSXRuntime,E=R.colors.$color_bad,L=R.colors.$palette_error_background,I=R.colors.$color_grey_text_light,T=R.colors.$palette_error_text,N=v().div`
	display: flex;
	flex-direction: column;
`,M=v().label`
	font-size: var(--yoast-font-size-default);
	font-weight: var(--yoast-font-weight-bold);
	${(0,S.getDirectionalStyle)("margin-right: 4px","margin-left: 4px")};
`,P=v().span`
	margin-bottom: 0.5em;
`,A=v()(_.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: ${E} !important;
		background-color: ${L} !important;

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

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

		${F} {
			${(0,S.getDirectionalStyle)("margin-left: -32px","margin-right: -32px")};
		}
	}
`;class D extends w.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,C.jsxs)(P,{children:[(0,C.jsx)(M,{htmlFor:e,children:t}),s]})}renderErrorMessages(){const e=[...this.props.errorMessages];return!(0,l.isEmpty)(e)&&(0,C.jsx)(O,{children:e.map(((e,t)=>(0,C.jsx)(q,{children:(0,C.jsx)("span",{role:"alert",children:e})},t)))})}render(){const{id:e,showLabel:t,keyword:s,onRemoveKeyword:r,onBlurKeyword:o,onFocusKeyword:i,hasError:n}=this.props,a=!t,c=r!==l.noop;return(0,C.jsxs)(N,{children:[t&&this.renderLabel(),n&&this.renderErrorMessages(),(0,C.jsxs)(B,{className:c?"has-remove-keyword-button":null,children:[(0,C.jsx)(A,{"aria-label":a?this.props.label:null,type:"text",id:e,className:n?"has-error":null,onChange:this.handleChange,onFocus:i,onBlur:o,value:s,autoComplete:"off"}),c&&(0,C.jsx)(F,{onClick:r,focusBoxShadowColor:"#084A67",children:(0,C.jsx)($,{size:"18px",icon:"times-circle",color:I})})]})]})}}D.propTypes={id:j().string.isRequired,showLabel:j().bool,keyword:j().string,onChange:j().func.isRequired,onRemoveKeyword:j().func,onBlurKeyword:j().func,onFocusKeyword:j().func,label:j().string.isRequired,helpLink:j().node,hasError:j().bool,errorMessages:j().arrayOf(j().string)},D.defaultProps={showLabel:!0,keyword:"",onRemoveKeyword:l.noop,onBlurKeyword:l.noop,onFocusKeyword:l.noop,helpLink:null,hasError:!1,errorMessages:[]};const W=D;function U(e,t=""){const s=e.getIdentifier(),r={score:e.score,rating:u.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 H(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 K(e){switch(e){case"loading":return{icon:"loading-spinner",color:R.colors.$color_green_medium_light};case"not-set":return{icon:"seo-score-none",color:R.colors.$color_score_icon};case"noindex":return{icon:"seo-score-none",color:R.colors.$color_noindex};case"good":return{icon:"seo-score-good",color:R.colors.$color_green_medium};case"ok":return{icon:"seo-score-ok",color:R.colors.$color_ok};default:return{icon:"seo-score-bad",color:R.colors.$color_red}}}function z(e,t=""){let s={errorsResults:[],problemsResults:[],improvementsResults:[],goodResults:[],considerationsResults:[]};if(!e)return s;for(let r=0;r<e.length;r++){const o=e[r];o.text&&(s=H(U(o,t),s))}return s}const Y=(0,S.makeOutboundLink)(v().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: ${R.colors.$color_help_text};
	
	&:hover,
	&:focus {
		color: ${R.colors.$color_snippet_focus};	
	}
	
	// Overwrite the default blue active color for links.
	&:active {
		color: ${R.colors.$color_help_text};	
	}

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

`,G=window.wp.components,Z=e=>{const{title:t,className:s,showYoastIcon:r,additionalClassName:o,...i}=e,n=r?(0,C.jsx)("span",{className:"yoast-icon"}):null;return(0,C.jsx)(G.Modal,{title:t,className:`${s} ${o}`,icon:n,...i,children:e.children})};Z.propTypes={title:j().string,className:j().string,showYoastIcon:j().bool,children:j().oneOfType([j().node,j().arrayOf(j().node)]),additionalClassName:j().string},Z.defaultProps={title:"Yoast SEO",className:"yoast yoast-gutenberg-modal",showYoastIcon:!0,children:null,additionalClassName:""};const Q=Z,X=window.yoast.socialMetadataForms,J=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 ee=({hiddenField:e,hiddenFieldImageId:t,hiddenFieldFallbackImageId:s,hasImageValidation:r,...o})=>{const[i,n]=(0,w.useState)(null!==document.getElementById(s)),a=(0,w.useMemo)((()=>document.getElementById(e))),l=(0,w.useMemo)((()=>document.getElementById(t)));let c=null;c=s&&document.getElementById(s)?(0,w.useMemo)((()=>document.getElementById(s))):l;const[d,u]=(0,w.useState)({url:a?a.value:"",id:c?parseInt(c.value,10):"",alt:""}),[p,h]=(0,w.useState)([]),m=(0,w.useCallback)((e=>{a&&(a.value=e.url),c&&(c.value=e.id)})),y=(0,w.useCallback)((()=>{(function(e){const t=window.wp.media();return t.on("select",(()=>{const s=t.state().get("selection").first();e(J(s.attributes))})),t})((e=>{c=l,u(e),m(e),r&&h((0,S.validateFacebookImage)(e)),n(!1)})).open()}),[r,m]),g=(0,w.useCallback)((()=>{c=l;const e={url:"",id:"",alt:""};u(e),m(e),h([]),n(!0)}),[m]);return(0,w.useEffect)((()=>{var e;d.id&&!d.alt&&(e=d.id,new Promise(((t,s)=>{window.wp.media.attachment||s(),window.wp.media.attachment(e).fetch().then((e=>{t(J(e))})).catch((()=>s()))}))).then((e=>u(e)))}),[d]),(0,C.jsx)(_.ImageSelect,{...o,usingFallback:i,imageUrl:d.url,imageId:d.id,imageAltText:d.alt,onClick:y,onRemoveImageClick:g,warnings:p})};ee.propTypes={hiddenField:j().string.isRequired,hiddenFieldImageId:j().string,hiddenFieldFallbackImageId:j().string,hasImageValidation:j().bool},ee.defaultProps={hiddenFieldImageId:"",hiddenFieldFallbackImageId:"",hasImageValidation:!1};const te=ee;function se({target:e,children:t}){let s=e;return"string"==typeof e&&(s=document.getElementById(e)),s?(0,w.createPortal)(t,s):null}function re({target:e,label:t,hasPreview:s,hiddenField:r,hiddenFieldImageId:o,hiddenFieldFallbackImageId:i,selectImageButtonId:n,replaceImageButtonId:a,removeImageButtonId:l,hasNewBadge:c,isDisabled:d,hasPremiumBadge:u,hasImageValidation:p}){return(0,C.jsx)(se,{target:e,children:(0,C.jsx)(te,{label:t,hasPreview:s,hiddenField:r,hiddenFieldImageId:o,hiddenFieldFallbackImageId:i,selectImageButtonId:n,replaceImageButtonId:a,removeImageButtonId:l,hasNewBadge:c,isDisabled:d,hasPremiumBadge:u,hasImageValidation:p})})}se.propTypes={target:j().oneOfType([j().string,j().object]).isRequired,children:j().node.isRequired},re.propTypes={target:j().string.isRequired,label:j().string.isRequired,hasPreview:j().bool.isRequired,hiddenField:j().string.isRequired,hiddenFieldImageId:j().string,hiddenFieldFallbackImageId:j().string,selectImageButtonId:j().string,replaceImageButtonId:j().string,removeImageButtonId:j().string,hasNewBadge:j().bool,isDisabled:j().bool,hasPremiumBadge:j().bool,hasImageValidation:j().bool},re.defaultProps={hiddenFieldImageId:"",hiddenFieldFallbackImageId:"",selectImageButtonId:"",replaceImageButtonId:"",removeImageButtonId:"",hasNewBadge:!1,isDisabled:!1,hasPremiumBadge:!1,hasImageValidation:!1};const oe=({target:e,scoreIndicator:t})=>(0,C.jsx)(se,{target:e,children:(0,C.jsx)(_.SvgIcon,{...K(t)})});oe.propTypes={target:j().string.isRequired,scoreIndicator:j().string.isRequired};const ie=oe,ne=e=>{const[t,s]=(0,w.useState)(!1),{prefixIcon:r}=e;return(0,C.jsxs)("div",{className:"yoast components-panel__body "+(t?"is-opened":""),children:[(0,C.jsx)("h2",{className:"components-panel__body-title",children:(0,C.jsxs)("button",{onClick:function(){s(!t)},className:"components-button components-panel__body-toggle",type:"button",id:e.buttonId,children:[(0,C.jsx)("span",{className:"yoast-icon-span",style:{fill:`${r&&r.color||""}`},children:r&&(0,C.jsx)(_.SvgIcon,{icon:r.icon,color:r.color,size:r.size})}),(0,C.jsxs)("span",{className:"yoast-title-container",children:[(0,C.jsx)("div",{className:"yoast-title",children:e.title}),(0,C.jsx)("div",{className:"yoast-subtitle",children:e.subTitle})]}),e.hasBetaBadgeLabel&&(0,C.jsx)(_.BetaBadge,{}),(0,C.jsx)("span",{className:"yoast-chevron","aria-hidden":"true"})]})}),t&&e.children]})},ae=ne;ne.propTypes={title:j().string.isRequired,children:j().oneOfType([j().node,j().arrayOf(j().node)]).isRequired,prefixIcon:j().object,subTitle:j().string,hasBetaBadgeLabel:j().bool,buttonId:j().string},ne.defaultProps={prefixIcon:null,subTitle:"",hasBetaBadgeLabel:!1,buttonId:null};const le=({children:e})=>(0,C.jsx)("div",{children:e});le.propTypes={renderPriority:j().number.isRequired,children:j().node.isRequired};const ce=le,de=({theme:e,location:t,children:s})=>(0,C.jsx)(n.LocationProvider,{value:t,children:(0,C.jsx)(b.ThemeProvider,{theme:e,children:s})});de.propTypes={theme:j().object.isRequired,location:j().oneOf(["sidebar","metabox","modal"]).isRequired,children:j().element.isRequired};const ue=de,pe=window.wp.compose,he=window.wp.data,me=e=>(0,C.jsx)("div",{className:"yoast components-panel__body",children:(0,C.jsx)("h2",{className:"components-panel__body-title",children:(0,C.jsxs)("button",{id:e.id,onClick:e.onClick,className:"components-button components-panel__body-toggle",type:"button",children:[e.prefixIcon&&(0,C.jsx)("span",{className:"yoast-icon-span",style:{fill:`${e.prefixIcon&&e.prefixIcon.color||""}`},children:(0,C.jsx)(_.SvgIcon,{size:e.prefixIcon.size,icon:e.prefixIcon.icon})}),(0,C.jsxs)("span",{className:"yoast-title-container",children:[(0,C.jsx)("div",{className:"yoast-title",children:e.title}),(0,C.jsx)("div",{className:"yoast-subtitle",children:e.subTitle})]}),e.children,e.suffixIcon&&(0,C.jsx)(_.SvgIcon,{size:e.suffixIcon.size,icon:e.suffixIcon.icon}),e.SuffixHeroIcon]})})}),ye=me;me.propTypes={onClick:j().func.isRequired,title:j().string.isRequired,id:j().string,subTitle:j().string,suffixIcon:j().object,SuffixHeroIcon:j().object,prefixIcon:j().object,children:j().node},me.defaultProps={id:"",suffixIcon:null,SuffixHeroIcon:null,prefixIcon:null,subTitle:"",children:null};const ge=({id:e,postTypeName:t,children:s,title:r,isOpen:o,close:i,open:a,shouldCloseOnClickOutside:l,showChangesWarning:c,SuffixHeroIcon:u})=>(0,C.jsxs)(w.Fragment,{children:[o&&(0,C.jsx)(n.LocationProvider,{value:"modal",children:(0,C.jsxs)(Q,{title:r,onRequestClose:i,additionalClassName:"yoast-collapsible-modal yoast-post-settings-modal",id:"id",shouldCloseOnClickOutside:l,children:[(0,C.jsx)("div",{className:"yoast-content-container",children:(0,C.jsx)("div",{className:"yoast-modal-content",children:s})}),(0,C.jsxs)("div",{className:"yoast-notice-container",children:[(0,C.jsx)("hr",{}),(0,C.jsxs)("div",{className:"yoast-button-container",children:[c&&(0,C.jsx)("p",{children:/* 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,C.jsx)("button",{className:"yoast-button yoast-button--primary yoast-button--post-settings-modal",type:"button",onClick:i,children:/* Translators: %s translates to the Post Label in singular form */
(0,d.sprintf)((0,d.__)("Return to your %s","wordpress-seo"),t)})]})]})]})}),(0,C.jsx)(ye,{id:e+"-open-button",title:r,SuffixHeroIcon:u,suffixIcon:u?null:{size:"20px",icon:"pencil-square"},onClick:a})]});ge.propTypes={id:j().string.isRequired,postTypeName:j().string.isRequired,children:j().oneOfType([j().node,j().arrayOf(j().node)]).isRequired,title:j().string.isRequired,isOpen:j().bool.isRequired,open:j().func.isRequired,close:j().func.isRequired,shouldCloseOnClickOutside:j().bool,showChangesWarning:j().bool,SuffixHeroIcon:j().object},ge.defaultProps={shouldCloseOnClickOutside:!0,showChangesWarning:!0};const fe=ge,xe=(0,pe.compose)([(0,he.withSelect)(((e,t)=>{const{getPostOrPageString:s,getIsModalOpen:r}=e("yoast-seo/editor");return{postTypeName:s(),isOpen:r(t.id)}})),(0,he.withDispatch)(((e,t)=>{const{openEditorModal:s,closeEditorModal:r}=e("yoast-seo/editor");return{open:()=>s(t.id),close:r}}))])(fe),we=(0,pe.compose)([(0,he.withSelect)(((e,t)=>{const{isAlertDismissed:s}=e(t.store||"yoast-seo/editor");return{isAlertDismissed:s(t.alertKey)}})),(0,he.withDispatch)(((e,t)=>{const{dismissAlert:s}=e(t.store||"yoast-seo/editor");return{onDismissed:()=>s(t.alertKey)}}))])(_.Alert),be=window.yoast.analysisReport,ve=window.yoast.uiLibrary;var ke=s(9196),je=s.n(ke);const _e=ke.forwardRef((function(e,t){return ke.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),ke.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"}))})),Se=window.wp.url,Re=(e,t)=>{try{return(0,w.createInterpolateElement)(e,t)}catch(t){return console.error("Error in translation for:",e,t),e}};var Ce,Ee;function Le(){return Le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Le.apply(this,arguments)}const Ie=e=>ke.createElement("svg",Le({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 425 456.27"},e),Ce||(Ce=ke.createElement("path",{d:"M73 405.26a66.79 66.79 0 0 1-6.54-1.7 64.75 64.75 0 0 1-6.28-2.31c-1-.42-2-.89-3-1.37-1.49-.72-3-1.56-4.77-2.56-1.5-.88-2.71-1.64-3.83-2.39-.9-.61-1.8-1.26-2.68-1.92a70.154 70.154 0 0 1-5.08-4.19 69.21 69.21 0 0 1-8.4-9.17c-.92-1.2-1.68-2.25-2.35-3.24a70.747 70.747 0 0 1-3.44-5.64 68.29 68.29 0 0 1-8.29-32.55V142.13a68.26 68.26 0 0 1 8.29-32.55c1-1.92 2.21-3.82 3.44-5.64s2.55-3.58 4-5.27a69.26 69.26 0 0 1 14.49-13.25C50.37 84.19 52.27 83 54.2 82A67.59 67.59 0 0 1 73 75.09a68.75 68.75 0 0 1 13.75-1.39h169.66L263 55.39H86.75A86.84 86.84 0 0 0 0 142.13v196.09A86.84 86.84 0 0 0 86.75 425h11.32v-18.35H86.75A68.75 68.75 0 0 1 73 405.26zM368.55 60.85l-1.41-.53-6.41 17.18 1.41.53a68.06 68.06 0 0 1 8.66 4c1.93 1 3.82 2.2 5.65 3.43A69.19 69.19 0 0 1 391 98.67c1.4 1.68 2.72 3.46 3.95 5.27s2.39 3.72 3.44 5.64a68.29 68.29 0 0 1 8.29 32.55v264.52H233.55l-.44.76c-3.07 5.37-6.26 10.48-9.49 15.19L222 425h203V142.13a87.2 87.2 0 0 0-56.45-81.28z"})),Ee||(Ee=ke.createElement("path",{stroke:"#000",strokeMiterlimit:10,strokeWidth:3.81,d:"M119.8 408.28v46c28.49-1.12 50.73-10.6 69.61-29.58 19.45-19.55 36.17-50 52.61-96L363.94 1.9H305l-98.25 272.89-48.86-153h-54l71.7 184.18a75.67 75.67 0 0 1 0 55.12c-7.3 18.68-20.25 40.66-55.79 47.19z"}))),Te=ke.forwardRef((function(e,t){return ke.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),ke.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"}))})),Ne=ke.forwardRef((function(e,t){return ke.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),ke.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z"}))})),Me=ke.forwardRef((function(e,t){return ke.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),ke.createElement("path",{d:"M3 1a1 1 0 000 2h1.22l.305 1.222a.997.997 0 00.01.042l1.358 5.43-.893.892C3.74 11.846 4.632 14 6.414 14H15a1 1 0 000-2H6.414l1-1H14a1 1 0 00.894-.553l3-6A1 1 0 0017 3H6.28l-.31-1.243A1 1 0 005 1H3zM16 16.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM6.5 18a1.5 1.5 0 100-3 1.5 1.5 0 000 3z"}))}));var Pe=s(4184),Ae=s.n(Pe);const Oe="yoast-seo/editor",qe=({isOpen:e,onClose:t,id:s,upsellLink:r,title:o="",description:i="",benefits:n=[],note:a="",ctbId:l="",modalTitle:c})=>{const u=(0,he.select)(Oe).isPromotionActive("black-friday-promotion"),p=(0,he.select)(Oe).getIsWooCommerceActive();return(0,C.jsx)(ve.Modal,{isOpen:e,onClose:t,id:s,children:(0,C.jsx)(ve.Modal.Panel,{className:"yst-max-w-[26.25rem] yst-p-0",hasCloseButton:!1,children:(0,C.jsxs)(ve.Modal.Container,{children:[(0,C.jsxs)(ve.Modal.Container.Header,{className:"yst-p-6 yst-border-b-slate-200 yst-border-b yst-flex yst-justify-start yst-gap-4 yst-items-center",children:[p?(0,C.jsx)(Me,{className:"yst-text-woo-light yst-w-6 yst-h-6 yst-scale-x-[-1]"}):(0,C.jsx)(Ie,{className:"yst-fill-primary-500 yst-w-5 yst-h-5"}),(0,C.jsx)(ve.Modal.Title,{as:"h3",className:Ae()(p?"yst-text-woo-light":"yst-text-primary-500","yst-text-xl"),children:c}),(0,C.jsx)(ve.Modal.CloseButton,{className:"yst-top-2",onClick:t,screenReaderText:(0,d.__)("Close modal","wordpress-seo")})]}),(0,C.jsxs)(ve.Modal.Container.Content,{className:"yst-p-0",children:[u&&(0,C.jsx)("div",{className:"yst-flex yst-font-semibold 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",children:(0,C.jsx)("div",{className:"yst-mx-auto",children:(0,d.__)("BLACK FRIDAY | 30% OFF","wordpress-seo")})}),(0,C.jsxs)("div",{className:"yst-py-6 yst-px-12",children:[(0,C.jsx)(ve.Title,{as:"h3",className:"yst-mb-1 yst-leading-5 yst-text-sm yst-font-normal",children:o}),(0,C.jsx)("p",{className:"yst-mb-2",children:i}),n.length>0&&(0,C.jsx)("ul",{className:"yst-my-2",children:n.map(((e,t)=>(0,C.jsxs)("li",{className:"yst-flex yst-gap-1 yst-mb-2",children:[(0,C.jsx)(Te,{className:"yst-w-5 yst-h-5 yst--ms-1 yst-shrink-0 yst-inline yst-text-green-600"}),(0,C.jsx)("p",{className:"yst-text-slate-600",children:e})]},`${s}-upsell-benefit-${t}`)))}),(0,C.jsxs)("div",{className:"yst-text-center",children:[(0,C.jsxs)(ve.Button,{as:"a",variant:"upsell",className:"yst-my-2 yst-gap-1.5",href:r,target:"_blank","data-action":"load-nfd-ctb","data-ctb-id":l,children:[(0,C.jsx)(Ne,{className:"yst-w-4 yst-h-4 yst--ms-1 yst-shrink-0"}),(0,d.sprintf)(/* translators: %s expands to 'Yoast SEO Premium' or 'Yoast Woocommerce SEO'. */
(0,d.__)("Explore %s","wordpress-seo"),p?"Yoast WooCommerce SEO":"Yoast SEO Premium"),(0,C.jsx)("span",{className:"yst-sr-only",children:(0,d.__)("Opens in a new tab","wordpress-seo")})]}),(0,C.jsx)("div",{children:a})]})]})]})]})})})},Fe=({isOpen:e,closeModal:t,id:s,upsellLink:r})=>{const{locationContext:o}=(0,n.useRootContext)(),i=(0,Se.addQueryArgs)(wpseoAdminL10n[r],{context:o}),a=[Re((0,d.sprintf)(/* translators: %1$s and %2$s are opening and closing span tags. */
(0,d.__)("%1$sKeyphrase distribution:%2$s See if your keywords are spread evenly so search engines understand your topic","wordpress-seo"),"<span>","</span>"),{span:(0,C.jsx)("span",{className:"yst-font-semibold"})}),Re((0,d.sprintf)(/* translators: %1$s and %2$s are opening and closing span tags. */
(0,d.__)("%1$sTitle check:%2$s Instantly spot missing titles and fix them for better click-through rates","wordpress-seo"),"<span>","</span>"),{span:(0,C.jsx)("span",{className:"yst-font-semibold"})}),Re((0,d.sprintf)(/* translators: %1$s and %2$s are opening and closing span tags. */
(0,d.__)("%1$sSynonyms:%2$s Include synonyms of your keyphrase for a more natural flow and smarter suggestions","wordpress-seo"),"<span>","</span>"),{span:(0,C.jsx)("span",{className:"yst-font-semibold"})})];return(0,C.jsx)(qe,{isOpen:e,onClose:t,id:s,title:(0,d.__)("Get deeper keyphrase insights and stronger headlines","wordpress-seo"),upsellLink:i,benefits:a,note:(0,d.__)("Upgrade to optimize with precision","wordpress-seo"),ctbId:"f6a84663-465f-4cb5-8ba5-f7a6d72224b2",modalTitle:(0,d.sprintf)(/* translators: %1$s is for Premium SEO analysis. */
(0,d.__)("Unlock %1$s","wordpress-seo"),"Premium SEO analysis")})};Fe.propTypes={isOpen:j().bool.isRequired,closeModal:j().func.isRequired,id:j().string.isRequired,upsellLink:j().string.isRequired};class $e extends w.Component{constructor(e){super(e);const t=this.props.results;this.state={mappedResults:{}},null!==t&&(this.state={mappedResults:z(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:z(this.props.results,this.props.keywordKey)})}createMarkButton({ariaLabel:e,id:t,className:s,status:r,onClick:o,isPressed:i}){return(0,C.jsxs)(w.Fragment,{children:[(0,C.jsx)(_.IconButtonToggle,{marksButtonStatus:r,className:s,onClick:o,id:t,icon:"eye",pressed:i,ariaLabel:e}),this.props.shouldUpsellHighlighting&&(0,C.jsx)("div",{className:"yst-root",children:(0,C.jsx)(ve.Badge,{className:"yst-absolute yst-px-[3px] yst-py-[3px] yst--end-[6.5px] yst--top-[6.5px]",size:"small",variant:"upsell",children:(0,C.jsx)(_e,{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,l.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,p.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 u.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(0,C.jsx)(Fe,{isOpen:e,closeModal:t,id:"yoast-premium-seo-analysis-highlighting-modal",upsellLink:this.props.highlightingUpsellLink,description:s})}render(){const{mappedResults:e}=this.state,{errorsResults:t,improvementsResults:s,goodResults:r,considerationsResults:o,problemsResults:i}=e,{upsellResults:n,resultCategoryLabels:a}=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,a);let u=this.props.marksButtonStatus;return"enabled"===u&&this.props.shortcodesForParsing.length>0&&(u="disabled"),(0,C.jsx)(w.Fragment,{children:(0,C.jsx)(be.ContentAnalysis,{errorsResults:t,problemsResults:i,upsellResults:n,improvementsResults:s,considerationsResults:o,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,renderAIOptimizeButton:this.props.renderAIOptimizeButton,renderHighlightingUpsell:this.renderHighlightingUpsell,markButtonFactory:this.createMarkButton})})}}$e.propTypes={results:j().array,upsellResults:j().array,marksButtonClassName:j().string,editButtonClassName:j().string,marksButtonStatus:j().oneOf(["enabled","disabled","hidden"]),setActiveMarker:j().func.isRequired,setMarkerPauseStatus:j().func.isRequired,setActiveAIFixesButton:j().func.isRequired,activeMarker:j().string,activeAIFixesButton:j().string,keywordKey:j().string,location:j().string,isPremium:j().bool,resultCategoryLabels:j().shape({errors:j().string,problems:j().string,improvements:j().string,considerations:j().string,goodResults:j().string}),shortcodesForParsing:j().array,shouldUpsellHighlighting:j().bool,highlightingUpsellLink:j().string,renderAIOptimizeButton:j().func},$e.defaultProps={results:null,upsellResults:[],marksButtonStatus:"enabled",marksButtonClassName:"",editButtonClassName:"",activeMarker:null,activeAIFixesButton:null,keywordKey:"",location:"",isPremium:!1,resultCategoryLabels:{},shortcodesForParsing:[],shouldUpsellHighlighting:!1,highlightingUpsellLink:"",renderAIOptimizeButton:()=>{}};const Be=$e,De=(0,pe.compose)([(0,he.withSelect)((e=>{const{getActiveMarker:t,getIsPremium:s,getShortcodesForParsing:r,getActiveAIFixesButton:o}=e("yoast-seo/editor");return{activeMarker:t(),isPremium:s(),shortcodesForParsing:r(),activeAIFixesButton:o()}})),(0,he.withDispatch)((e=>{const{setActiveMarker:t,setMarkerPauseStatus:s,setActiveAIFixesButton:r}=e("yoast-seo/editor");return{setActiveMarker:t,setMarkerPauseStatus:s,setActiveAIFixesButton:r}}))])(Be),We=window.yoast.relatedKeyphraseSuggestions;function Ue(e){const{requestLimitReached:t,isSuccess:s,response:r,requestHasData:o,relatedKeyphrases:i}=e;return t?"requestLimitReached":!s&&function(e){return"invalid_json"===(null==e?void 0:e.code)||"fetch_error"===(null==e?void 0:e.code)||!(0,l.isEmpty)(e)&&"error"in e}(r)?"requestFailed":o?function(e){return e&&e.length>=4}(i)?"maxRelatedKeyphrases":null:"requestEmpty"}function He(e){var t,s;const{keyphrase:r="",relatedKeyphrases:o=[],renderAction:i=null,requestLimitReached:n=!1,countryCode:a="us",setCountry:l,newRequest:c,response:d={},isRtl:u=!1,userLocale:p="en_US",isPending:h=!1,isPremium:m=!1,semrushUpsellLink:y="",premiumUpsellLink:g=""}=e,[f,x]=(0,w.useState)(a),b=(0,w.useCallback)((async()=>{c(a,r),x(a)}),[a,r,c]);return(0,C.jsxs)(ve.Root,{context:{isRtl:u},children:[!n&&!m&&(0,C.jsx)(We.PremiumUpsell,{url:g,className:"yst-mb-4"}),!n&&(0,C.jsx)(We.CountrySelector,{countryCode:a,activeCountryCode:f,onChange:l,onClick:b,className:"yst-mb-4",userLocale:p.split("_")[0]}),!h&&(0,C.jsx)(We.UserMessage,{variant:Ue(e),upsellLink:y}),(0,C.jsx)(We.KeyphrasesTable,{relatedKeyphrases:o,columnNames:null==d||null===(t=d.results)||void 0===t?void 0:t.columnNames,data:null==d||null===(s=d.results)||void 0===s?void 0:s.rows,isPending:h,renderButton:i,className:"yst-mt-4"})]})}He.propTypes={keyphrase:j().string,relatedKeyphrases:j().array,renderAction:j().func,requestLimitReached:j().bool,countryCode:j().string.isRequired,setCountry:j().func.isRequired,newRequest:j().func.isRequired,response:j().object,isRtl:j().bool,userLocale:j().string,isPending:j().bool,isPremium:j().bool,semrushUpsellLink:j().string,premiumUpsellLink:j().string};const Ke=(0,pe.compose)([(0,he.withSelect)((e=>{const{getFocusKeyphrase:t,getSEMrushSelectedCountry:s,getSEMrushRequestLimitReached:r,getSEMrushRequestResponse:o,getSEMrushRequestIsSuccess:i,getSEMrushIsRequestPending:n,getSEMrushRequestHasData:a,getSEMrushRequestKeyphrase:l,getPreference:c,getIsPremium:d,selectLinkParams:u}=e("yoast-seo/editor");return{keyphrase:t(),countryCode:s(),requestLimitReached:r(),response:o(),isSuccess:i(),isPending:n(),requestHasData:a(),lastRequestKeyphrase:l(),isRtl:c("isRtl",!1),userLocale:c("userLocale","en_US"),isPremium:d(),semrushUpsellLink:(0,Se.addQueryArgs)("https://yoa.st/semrush-prices",u()),premiumUpsellLink:(0,Se.addQueryArgs)("https://yoa.st/413",u())}})),(0,he.withDispatch)((e=>{const{setSEMrushChangeCountry:t,setSEMrushNewRequest:s}=e("yoast-seo/editor");return{setCountry:e=>{t(e)},newRequest:(e,t)=>{s(e,t)}}}))])(He),ze=window.moment;var Ye=s.n(ze),Ve=s(6746);const Ge=(0,S.makeOutboundLink)(),Ze=e=>{const t=(0,d.sprintf)(/* translators: %1$d expands to the amount of allowed keyphrases on a free account, %2$s expands to a link to Wincher plans. */
(0,d.__)("You've reached the maximum amount of %1$d keyphrases you can add to your Wincher account. If you wish to add more keyphrases, please %2$s.","wordpress-seo"),e.limit,"{{updateWincherPlanLink/}}");return(0,C.jsx)(_.Alert,{type:"error",children:(0,Ve.Z)({mixedString:t,components:{updateWincherPlanLink:(0,C.jsx)(Ge,{href:wpseoAdminGlobalL10n["links.wincher.pricing"],children:(0,d.sprintf)(/* translators: %s : Expands to "Wincher". */
(0,d.__)("upgrade your %s plan","wordpress-seo"),"Wincher")})}})})};Ze.propTypes={limit:j().number},Ze.defaultProps={limit:10};const Qe=Ze,Xe=()=>(0,C.jsx)(_.Alert,{type:"error",children:(0,d.__)("Something went wrong while tracking the ranking position(s) of your page. Please try again later.","wordpress-seo")}),Je=window.wp.apiFetch;var et=s.n(Je);async function tt(e,t,s,r=200){try{const o=await e();return!!o&&(o.status===r?t(o):s(o))}catch(e){console.error(e.message)}}async function st(e){try{return await et()(e)}catch(e){return e.error&&e.status?e:e instanceof Response&&await e.json()}}async function rt(e){return(0,l.isArray)(e)||(e=[e]),await st({path:"yoast/v1/wincher/keyphrases/track",method:"POST",data:{keyphrases:e}})}const ot=v().p`
	color: ${R.colors.$color_pink_dark};
	font-size: 14px;
	font-weight: 700;
	margin: 13px 0 10px;
`,it=v()(_.SvgIcon)`
	margin-right: 5px;
	vertical-align: middle;
`,nt=v().button`
	position: absolute;
	top: 9px;
	right: 9px;
	border: none;
    background: none;
    cursor: pointer;
`,at=v().p`
	font-size: 13px;
	font-weight: 500;
	margin: 10px 0 13px;
`,lt=v().div`
	position: relative;
	background: ${e=>e.isTitleShortened?"#F5F7F7":"transparent"};
	border: 1px solid #C7C7C7;
	border-left: 4px solid${R.colors.$color_pink_dark};
	padding: 0 16px;
	margin-bottom: 1.5em;
`,ct=e=>{const[t,s]=(0,w.useState)(null);return(0,w.useEffect)((()=>{e&&!t&&async function(){return await st({path:"yoast/v1/wincher/account/limit",method:"GET"})}().then((e=>s(e)))}),[t]),t};ct.propTypes={limit:j().bool.isRequired};const dt=({limit:e,usage:t,isTitleShortened:s,isFreeAccount:r})=>{const 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 free account.","wordpress-seo"),t,e),i=(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),n=r?o:i,a=(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?a:n;return(0,C.jsxs)(ot,{children:[s&&(0,C.jsx)(it,{icon:"exclamation-triangle",color:R.colors.$color_pink_dark,size:"14px"}),l]})};dt.propTypes={limit:j().number.isRequired,usage:j().number.isRequired,isTitleShortened:j().bool,isFreeAccount:j().bool};const ut=(0,S.makeOutboundLink)(),pt=({discount:e,months:t})=>{const s=(0,C.jsx)(ut,{href:wpseoAdminGlobalL10n["links.wincher.upgrade"],style:{fontWeight:600},children:(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,C.jsx)(at,{children:s});const r=100*e,o=(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,C.jsx)(at,{children:(0,Ve.Z)({mixedString:o,components:{wincherAccountUpgradeLink:s}})})};pt.propTypes={discount:j().number,months:j().number};const ht=({onClose:e,isTitleShortened:t,trackingInfo:s})=>{const r=(()=>{const[e,t]=(0,w.useState)(null);return(0,w.useEffect)((()=>{e||async function(){return await st({path:"yoast/v1/wincher/account/upgrade-campaign",method:"GET"})}().then((e=>t(e)))}),[e]),e})();if(null===s)return null;const{limit:o,usage:i}=s;if(!(o&&i/o>=.8))return null;const n=Boolean(null==r?void 0:r.discount);return(0,C.jsxs)(lt,{isTitleShortened:t,children:[e&&(0,C.jsx)(nt,{type:"button","aria-label":(0,d.__)("Close the upgrade callout","wordpress-seo"),onClick:e,children:(0,C.jsx)(_.SvgIcon,{icon:"times-circle",color:R.colors.$color_pink_dark,size:"14px"})}),(0,C.jsx)(dt,{...s,isTitleShortened:t,isFreeAccount:n}),(0,C.jsx)(pt,{discount:null==r?void 0:r.discount,months:null==r?void 0:r.months})]})};ht.propTypes={onClose:j().func,isTitleShortened:j().bool,trackingInfo:j().object};const mt=ht,yt=()=>(0,C.jsx)(_.Alert,{type:"success",children:(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")}),gt=()=>(0,C.jsx)(_.Alert,{type:"info",children:(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")}),ft=({data:e,mapChartDataToTableData:t,dataTableCaption:s,dataTableHeaderLabels:r,isDataTableVisuallyHidden:o})=>e.length!==r.length?(0,C.jsx)("p",{children:(0,d.__)("The number of headers and header labels don't match.","wordpress-seo")}):(0,C.jsx)("div",{className:o?"screen-reader-text":null,children:(0,C.jsxs)("table",{children:[(0,C.jsx)("caption",{children:s}),(0,C.jsx)("thead",{children:(0,C.jsx)("tr",{children:r.map(((e,t)=>(0,C.jsx)("th",{children:e},t)))})}),(0,C.jsx)("tbody",{children:(0,C.jsx)("tr",{children:e.map(((e,s)=>(0,C.jsx)("td",{children:t(e.y)},s)))})})]})});ft.propTypes={data:j().arrayOf(j().shape({x:j().number,y:j().number})).isRequired,mapChartDataToTableData:j().func,dataTableCaption:j().string.isRequired,dataTableHeaderLabels:j().array.isRequired,isDataTableVisuallyHidden:j().bool},ft.defaultProps={mapChartDataToTableData:null,isDataTableVisuallyHidden:!0};const xt=ft,wt=({data:e,width:t,height:s,fillColor:r,strokeColor:o,strokeWidth:i,className:n,mapChartDataToTableData:a,dataTableCaption:l,dataTableHeaderLabels:c,isDataTableVisuallyHidden:d})=>{const u=Math.max(1,Math.max(...e.map((e=>e.x)))),p=Math.max(1,Math.max(...e.map((e=>e.y)))),h=s-i,m=e.map((e=>`${e.x/u*t},${h-e.y/p*h+i}`)).join(" "),y=`0,${h+i} `+m+` ${t},${h+i}`;return(0,C.jsxs)(w.Fragment,{children:[(0,C.jsxs)("svg",{width:t,height:s,viewBox:`0 0 ${t} ${s}`,className:n,role:"img","aria-hidden":"true",focusable:"false",children:[(0,C.jsx)("polygon",{fill:r,points:y}),(0,C.jsx)("polyline",{fill:"none",stroke:o,strokeWidth:i,strokeLinejoin:"round",strokeLinecap:"round",points:m})]}),a&&(0,C.jsx)(xt,{data:e,mapChartDataToTableData:a,dataTableCaption:l,dataTableHeaderLabels:c,isDataTableVisuallyHidden:d})]})};wt.propTypes={data:j().arrayOf(j().shape({x:j().number,y:j().number})).isRequired,width:j().number.isRequired,height:j().number.isRequired,fillColor:j().string,strokeColor:j().string,strokeWidth:j().number,className:j().string,mapChartDataToTableData:j().func,dataTableCaption:j().string.isRequired,dataTableHeaderLabels:j().array.isRequired,isDataTableVisuallyHidden:j().bool},wt.defaultProps={fillColor:null,strokeColor:"#000000",strokeWidth:1,className:"",mapChartDataToTableData:null,isDataTableVisuallyHidden:!0};const bt=wt,vt=()=>(0,C.jsxs)("p",{className:"yoast-wincher-seo-performance-modal__loading-message",children:[(0,d.__)("Tracking the ranking position…","wordpress-seo")," ",(0,C.jsx)(_.SvgIcon,{icon:"loading-spinner"})]}),kt=v()(_.SvgIcon)`
	margin-left: 2px;
	flex-shrink: 0;
	rotate: ${e=>e.isImproving?"-90deg":"90deg"};
`,jt=v().span`
	color: ${e=>e.isImproving?"#69AB56":"#DC3332"};
	font-size: 13px;
	font-weight: 600;
	line-height: 20px;
	margin-right: 2px;
	margin-left: 12px;
`,_t=v().td`
	padding-right: 0 !important;

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

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

	& > div {
		margin: 0px;
	}
`,Wt=v().th`
	padding-left: 2px !important;
`,Ut=e=>{const t=(0,w.useRef)();return(0,w.useEffect)((()=>{t.current=e})),t.current},Ht=(0,l.debounce)((async function(e=null,t=null,s=null,r){return await st({path:"yoast/v1/wincher/keyphrases",method:"POST",data:{keyphrases:e,permalink:s,startAt:t},signal:r})}),500,{leading:!0}),Kt=e=>{const{addTrackedKeyphrase:t,isLoggedIn:s,keyphrases:r,permalink:o,removeTrackedKeyphrase:i,setKeyphraseLimitReached:n,setRequestFailed:a,setRequestSucceeded:c,setTrackedKeyphrases:u,setHasTrackedAll:p,trackAll:h,trackedKeyphrases:m,isNewlyAuthenticated:y,websiteId:g,focusKeyphrase:f,newRequest:x,startAt:b,selectedKeyphrases:v,onSelectKeyphrases:k}=e,j=(0,w.useRef)(),S=(0,w.useRef)(),R=(0,w.useRef)(!1),[E,L]=(0,w.useState)([]),I=(0,w.useCallback)((e=>{const t=e.toLowerCase();return m&&!(0,l.isEmpty)(m)&&m.hasOwnProperty(t)?m[t]:null}),[m]),T=(0,w.useMemo)((()=>async()=>{await tt((()=>(S.current&&S.current.abort(),S.current="undefined"==typeof AbortController?null:new AbortController,Ht(r,b,o,S.current.signal))),(e=>{c(e),u(e.results)}),(e=>{a(e)}))}),[c,a,u,r,o,b]),N=(0,w.useCallback)((async e=>{const s=(Array.isArray(e)?e:[e]).map((e=>e.toLowerCase()));L((e=>[...e,...s])),await tt((()=>rt(s)),(e=>{c(e),t(e.results),T()}),(e=>{400===e.status&&e.limit&&n(e.limit),a(e)}),201),L((e=>(0,l.without)(e,...s)))}),[c,a,n,t,T]),M=(0,w.useCallback)((async(e,t)=>{e=e.toLowerCase(),L((t=>[...t,e])),await tt((()=>async function(e){return await st({path:"yoast/v1/wincher/keyphrases/untrack",method:"DELETE",data:{keyphraseID:e}})}(t)),(t=>{c(t),i(e)}),(e=>{a(e)})),L((t=>(0,l.without)(t,e)))}),[c,i,a]),P=(0,w.useCallback)((async e=>{x(),await N(e)}),[x,N]),A=Ut(o),O=Ut(r),q=Ut(b),F=o&&b;(0,w.useEffect)((()=>{s&&F&&(o!==A||(0,l.difference)(r,O).length||b!==q)&&T()}),[s,o,A,r,O,T,F,b,q]),(0,w.useEffect)((()=>{if(s&&h&&null!==m){const e=r.filter((e=>!I(e)));e.length&&N(e),p()}}),[s,h,m,N,p,I,r]),(0,w.useEffect)((()=>{y&&!R.current&&(T(),R.current=!0)}),[y,T]),(0,w.useEffect)((()=>{if(s&&!(0,l.isEmpty)(m))return(0,l.filter)(m,(e=>(0,l.isEmpty)(e.updated_at))).length>0&&(j.current=setInterval((()=>{T()}),1e4)),()=>{clearInterval(j.current)}}),[s,m,T]);const $=s&&null===m,B=(0,w.useMemo)((()=>(0,l.isEmpty)(m)?[]:Object.values(m).filter((e=>{var t;return!(0,l.isEmpty)(null==e||null===(t=e.position)||void 0===t?void 0:t.history)})).map((e=>e.keyword))),[m]),D=(0,w.useMemo)((()=>v.length>0&&B.length>0&&B.every((e=>v.includes(e)))),[v,B]),W=(0,w.useCallback)((()=>{k(D?[]:B)}),[k,D,B]),U=(0,w.useMemo)((()=>(0,l.orderBy)(r,[e=>Object.values(m||{}).map((e=>e.keyword)).includes(e)],["desc"])),[r,m]);return r&&!(0,l.isEmpty)(r)&&(0,C.jsxs)(w.Fragment,{children:[(0,C.jsx)(Bt,{children:(0,C.jsxs)("table",{className:"yoast yoast-table",children:[(0,C.jsx)("thead",{children:(0,C.jsxs)("tr",{children:[(0,C.jsx)(Dt,{isDisabled:0===B.length,children:(0,C.jsx)(_.Checkbox,{id:"select-all",onChange:W,checked:D,label:""})}),(0,C.jsx)(Wt,{scope:"col",abbr:(0,d.__)("Keyphrase","wordpress-seo"),children:(0,d.__)("Keyphrase","wordpress-seo")}),(0,C.jsx)("th",{scope:"col",abbr:(0,d.__)("Position","wordpress-seo"),children:(0,d.__)("Position","wordpress-seo")}),(0,C.jsx)("th",{scope:"col",abbr:(0,d.__)("Position over time","wordpress-seo"),children:(0,d.__)("Position over time","wordpress-seo")}),(0,C.jsx)("th",{scope:"col",abbr:(0,d.__)("Last updated","wordpress-seo"),children:(0,d.__)("Last updated","wordpress-seo")}),(0,C.jsx)("th",{scope:"col",abbr:(0,d.__)("Tracking","wordpress-seo"),children:(0,d.__)("Tracking","wordpress-seo")})]})}),(0,C.jsx)("tbody",{children:U.map(((e,t)=>(0,C.jsx)(qt,{keyphrase:e,onTrackKeyphrase:P,onUntrackKeyphrase:M,rowData:I(e),isFocusKeyphrase:e===f.trim().toLowerCase(),websiteId:g,isDisabled:!s,isLoading:$||E.indexOf(e.toLowerCase())>=0,isSelected:v.includes(e),onSelectKeyphrases:k},`trackable-keyphrase-${t}`)))})]})}),(0,C.jsxs)("p",{style:{marginBottom:0,position:"relative"},children:[(0,C.jsx)(Ft,{href:wpseoAdminGlobalL10n["links.wincher.login"],children:(0,d.sprintf)(/* translators: %s expands to Wincher */
(0,d.__)("Get more insights over at %s","wordpress-seo"),"Wincher")}),(0,C.jsx)($t,{children:(0,d.__)("* focus keyphrase","wordpress-seo")})]})]})};Kt.propTypes={addTrackedKeyphrase:j().func.isRequired,isLoggedIn:j().bool,isNewlyAuthenticated:j().bool,keyphrases:j().array,newRequest:j().func.isRequired,removeTrackedKeyphrase:j().func.isRequired,setRequestFailed:j().func.isRequired,setKeyphraseLimitReached:j().func.isRequired,setRequestSucceeded:j().func.isRequired,setTrackedKeyphrases:j().func.isRequired,setHasTrackedAll:j().func.isRequired,trackAll:j().bool,trackedKeyphrases:j().object,websiteId:j().string,permalink:j().string.isRequired,focusKeyphrase:j().string,startAt:j().string,selectedKeyphrases:j().arrayOf(j().string).isRequired,onSelectKeyphrases:j().func.isRequired},Kt.defaultProps={isLoggedIn:!1,isNewlyAuthenticated:!1,keyphrases:[],trackAll:!1,websiteId:"",focusKeyphrase:""};const zt=Kt,Yt=(0,pe.compose)([(0,he.withSelect)((e=>{const{getWincherWebsiteId:t,getWincherTrackableKeyphrases:s,getWincherLoginStatus:r,getWincherPermalink:o,getFocusKeyphrase:i,isWincherNewlyAuthenticated:n,shouldWincherTrackAll:a}=e("yoast-seo/editor");return{focusKeyphrase:i(),keyphrases:s(),isLoggedIn:r(),trackAll:a(),websiteId:t(),isNewlyAuthenticated:n(),permalink:o()}})),(0,he.withDispatch)((e=>{const{setWincherNewRequest:t,setWincherRequestSucceeded:s,setWincherRequestFailed:r,setWincherSetKeyphraseLimitReached:o,setWincherTrackedKeyphrases:i,setWincherTrackingForKeyphrase:n,setWincherTrackAllKeyphrases:a,unsetWincherTrackingForKeyphrase:l}=e("yoast-seo/editor");return{newRequest:()=>{t()},setRequestSucceeded:e=>{s(e)},setRequestFailed:e=>{r(e)},setKeyphraseLimitReached:e=>{o(e)},addTrackedKeyphrase:e=>{n(e)},removeTrackedKeyphrase:e=>{l(e)},setTrackedKeyphrases:e=>{i(e)},setHasTrackedAll:()=>{a(!1)}}}))])(zt),Vt=(0,S.makeOutboundLink)(),Gt=(0,S.makeOutboundLink)(),Zt=()=>{const e=(0,d.sprintf)(/* translators: %1$s expands to a link to Wincher, %2$s expands to a link to the keyphrase tracking article on Yoast.com */
(0,d.__)("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,C.jsx)("p",{children:(0,Ve.Z)({mixedString:e,components:{wincherLink:(0,C.jsx)(Vt,{href:wpseoAdminGlobalL10n["links.wincher.website"],children:"Wincher"}),wincherReadMoreLink:(0,C.jsx)(Gt,{href:wpseoAdminL10n["shortlinks.wincher.seo_performance"],children:(0,d.__)("Read more about keyphrase tracking with Wincher","wordpress-seo")})}})})},Qt=()=>(0,C.jsx)(_.Alert,{type:"error",children:(0,d.__)("No keyphrase has been set. Please set a keyphrase first.","wordpress-seo")}),Xt=()=>(0,C.jsx)(_.Alert,{type:"info",children:(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 Jt{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 es=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,C.jsx)(_.Alert,{type:"error",className:e.className,children:(0,Ve.Z)({mixedString:t,components:{reconnectToWincher:(0,C.jsx)("a",{href:"#",onClick:t=>{t.preventDefault(),e.onReconnect()},children:(0,d.sprintf)(/* translators: %s : Expands to "Wincher". */
(0,d.__)("reconnect to %s","wordpress-seo"),"Wincher")})}})})};es.propTypes={onReconnect:j().func.isRequired,className:j().string},es.defaultProps={className:""};const ts=es,ss=()=>(0,C.jsx)(_.Alert,{type:"error",children:(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")}),rs=window.yoast["chart.js"],os="label";function is(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function ns(e,t){e.labels=t}function as(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:os;const r=[];e.datasets=t.map((t=>{const o=e.datasets.find((e=>e[s]===t[s]));return o&&t.data&&!r.includes(o)?(r.push(o),Object.assign(o,t),o):{...t}}))}function ls(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:os;const s={labels:[],datasets:[]};return ns(s,e.labels),as(s,e.datasets,t),s}function cs(e,t){const{height:s=150,width:r=300,redraw:o=!1,datasetIdKey:i,type:n,data:a,options:l,plugins:c=[],fallbackContent:d,updateMode:u,...p}=e,h=(0,ke.useRef)(null),m=(0,ke.useRef)(),y=()=>{h.current&&(m.current=new rs.Chart(h.current,{type:n,data:ls(a,i),options:l&&{...l},plugins:c}),is(t,m.current))},g=()=>{is(t,null),m.current&&(m.current.destroy(),m.current=null)};return(0,ke.useEffect)((()=>{!o&&m.current&&l&&function(e,t){const s=e.options;s&&t&&Object.assign(s,t)}(m.current,l)}),[o,l]),(0,ke.useEffect)((()=>{!o&&m.current&&ns(m.current.config.data,a.labels)}),[o,a.labels]),(0,ke.useEffect)((()=>{!o&&m.current&&a.datasets&&as(m.current.config.data,a.datasets,i)}),[o,a.datasets]),(0,ke.useEffect)((()=>{m.current&&(o?(g(),setTimeout(y)):m.current.update(u))}),[o,l,a.labels,a.datasets,u]),(0,ke.useEffect)((()=>{m.current&&(g(),setTimeout(y))}),[n]),(0,ke.useEffect)((()=>(y(),()=>g())),[]),ke.createElement("canvas",Object.assign({ref:h,role:"img",height:s,width:r},p),d)}const ds=(0,ke.forwardRef)(cs);function us(e,t){return rs.Chart.register(t),(0,ke.forwardRef)(((t,s)=>ke.createElement(ds,Object.assign({},t,{ref:s,type:e}))))}const ps=us("line",rs.LineController),hs={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"};rs._adapters._date.override("function"==typeof Ye()?{_id:"moment",formats:function(){return hs},parse:function(e,t){return"string"==typeof e&&"string"==typeof t?e=Ye()(e,t):e instanceof Ye()||(e=Ye()(e)),e.isValid()?e.valueOf():null},format:function(e,t){return Ye()(e).format(t)},add:function(e,t,s){return Ye()(e).add(t,s).valueOf()},diff:function(e,t,s){return Ye()(e).diff(Ye()(t),s)},startOf:function(e,t,s){return e=Ye()(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 Ye()(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 ms=["top","right","bottom","left"];function ys(e,t,s){const r={};s=s?"-"+s:"";for(let o=0;o<4;o++){const i=ms[o];r[i]=parseFloat(e[t+"-"+i+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){}}(),rs.Chart.register(rs.CategoryScale,rs.LineController,rs.LineElement,rs.PointElement,rs.LinearScale,rs.TimeScale,rs.Legend,rs.Tooltip);const gs=["#ff983b","#ffa3f7","#3798ff","#ff3b3b","#acce81","#b51751","#3949ab","#26c6da","#ccb800","#de66ff","#4db6ac","#ffab91","#45f5f1","#77f210","#90a4ae","#ffd54f","#006b5e","#8ec7d2","#b1887c","#cc9300"];function fs({datasets:e,isChartShown:t,keyphrases:s}){if(!t)return null;const r=(0,w.useMemo)((()=>Object.fromEntries([...s].sort().map(((e,t)=>[e,gs[t%gs.length]])))),[s]),o=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,C.jsx)(ps,{height:100,data:{datasets:o},options:{plugins:{legend:{display:!0,position:"bottom",labels:{color:"black",usePointStyle:!0,boxHeight:7,boxWidth:7},onClick:l.noop},tooltip:{enabled:!0,callbacks:{title:e=>Ye()(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}}}})}rs.Interaction.modes.xPoint=(e,t,s,r)=>{const o=function(e,t){if("native"in e)return e;const{canvas:s,currentDevicePixelRatio:r}=t,o=(h=s).ownerDocument.defaultView.getComputedStyle(h,null),i="border-box"===o.boxSizing,n=ys(o,"padding"),a=ys(o,"border","width"),{x:l,y:c,box:d}=function(e,t){const s=e.touches,r=s&&s.length?s[0]:e,{offsetX:o,offsetY:i}=r;let n,a,l=!1;if(((e,t,s)=>(e>0||t>0)&&(!s||!s.shadowRoot))(o,i,e.target))n=o,a=i;else{const e=t.getBoundingClientRect();n=r.clientX-e.left,a=r.clientY-e.top,l=!0}return{x:n,y:a,box:l}}(e,s),u=n.left+(d&&a.left),p=n.top+(d&&a.top);var h;let{width:m,height:y}=t;return i&&(m-=n.width+a.width,y-=n.height+a.height),{x:Math.round((l-u)/m*s.width/r),y:Math.round((c-p)/y*s.height/r)}}(t,e);let i=[];if(rs.Interaction.evaluateInteractionItems(e,"x",o,((e,t,s)=>{e.inXRange(o.x,r)&&i.push({element:e,datasetIndex:t,index:s})})),0===i.length)return i;const n=i.reduce(((e,t)=>Math.abs(o.x-e.element.x)<Math.abs(o.x-t.element.x)?e:t)).element.x;return i=i.filter((e=>e.element.x===n)),i.some((e=>Math.abs(e.element.y-o.y)<10))?i:[]},fs.propTypes={datasets:j().arrayOf(j().shape({label:j().string.isRequired,data:j().arrayOf(j().shape({datetime:j().string.isRequired,value:j().number.isRequired})).isRequired,selected:j().bool})).isRequired,isChartShown:j().bool.isRequired,keyphrases:j().array.isRequired};const xs=({response:e,onLogin:t})=>[401,403,404].includes(e.status)?(0,C.jsx)(ts,{onReconnect:t}):(0,C.jsx)(Xe,{});xs.propTypes={response:j().object.isRequired,onLogin:j().func.isRequired};const ws=({isSuccess:e,response:t,allKeyphrasesMissRanking:s,onLogin:r,keyphraseLimitReached:o,limit:i})=>o?(0,C.jsx)(Qe,{limit:i}):(0,l.isEmpty)(t)||e?s?(0,C.jsx)(gt,{}):null:(0,C.jsx)(xs,{response:t,onLogin:r});ws.propTypes={isSuccess:j().bool.isRequired,allKeyphrasesMissRanking:j().bool.isRequired,response:j().object,onLogin:j().func.isRequired,keyphraseLimitReached:j().bool.isRequired,limit:j().number.isRequired},ws.defaultProps={response:{}};let bs=null;const vs=async e=>{if(bs&&!bs.isClosed())return void bs.focus();const{url:t}=await async function(){return await st({path:"yoast/v1/wincher/authorization-url",method:"GET"})}();bs=new Jt(t,{success:{type:"wincher:oauth:success",callback:t=>(async(e,t)=>{const{onAuthentication:s,setRequestSucceeded:r,setRequestFailed:o,keyphrases:i,addTrackedKeyphrase:n,setKeyphraseLimitReached:a}=e;await tt((()=>async function(e){const{code:t,websiteId:s}=e;return await st({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(i)?i:[i]).map((e=>e.toLowerCase()));await tt((()=>rt(l)),(e=>{r(e),n(e.results)}),(e=>{400===e.status&&e.limit&&a(e.limit),o(e)}),201);const c=bs.getPopup();c&&c.close()}),(async e=>o(e)))})(e,t)},error:{type:"wincher:oauth:error",callback:()=>e.onAuthentication(!1,!1)}},{title:"Wincher_login",width:500,height:700}),bs.createPopup()},ks=e=>e.isLoggedIn?null:(0,C.jsx)("p",{children:(0,C.jsx)(_.NewButton,{onClick:e.onLogin,variant:"primary",children:(0,d.sprintf)(/* translators: %s expands to Wincher */
(0,d.__)("Connect with %s","wordpress-seo"),"Wincher")})});ks.propTypes={isLoggedIn:j().bool.isRequired,onLogin:j().func.isRequired};const js=v().div`
	p {
		margin: 1em 0;
	}
`,_s=v().div`
	${e=>e.isDisabled&&"\n\t\topacity: .5;\n\t\tpointer-events: none;\n\t"};
`,Ss=v().div`
	font-weight: var(--yoast-font-weight-bold);
	color: var(--yoast-color-label);
	font-size: var(--yoast-font-size-default);
`,Rs=v().div.attrs({className:"yoast-field-group"})`
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 14px;
`,Cs=v().div`
	margin: 8px 0;
`,Es=Ye().utc().startOf("day"),Ls=[{name:(0,d.__)("Last day","wordpress-seo"),value:Ye()(Es).subtract(1,"days").format(),defaultIndex:1},{name:(0,d.__)("Last week","wordpress-seo"),value:Ye()(Es).subtract(1,"week").format(),defaultIndex:2},{name:(0,d.__)("Last month","wordpress-seo"),value:Ye()(Es).subtract(1,"month").format(),defaultIndex:3},{name:(0,d.__)("Last year","wordpress-seo"),value:Ye()(Es).subtract(1,"year").format(),defaultIndex:0}],Is=e=>{const{onSelect:t,selected:s,options:r,isLoggedIn:o}=e;return o?r.length<1?null:(0,C.jsx)("select",{className:"components-select-control__input",id:"wincher-period-picker",value:(null==s?void 0:s.value)||r[0].value,onChange:t,children:r.map((e=>(0,C.jsx)("option",{value:e.value,children:e.name},e.name)))}):null};Is.propTypes={onSelect:j().func.isRequired,selected:j().object,options:j().array.isRequired,isLoggedIn:j().bool.isRequired};const Ts=e=>{const{trackedKeyphrases:t,isLoggedIn:s,keyphrases:r,shouldTrackAll:o,permalink:i,historyDaysLimit:n}=e;if(!i&&s)return(0,C.jsx)(ss,{});if(0===r.length)return(0,C.jsx)(Qt,{});const a=Ye()(Es).subtract(n,"days"),c=Ls.filter((e=>Ye()(e.value).isSameOrAfter(a))),u=(0,l.orderBy)(c,(e=>e.defaultIndex),"desc")[0],[p,h]=(0,w.useState)(u),[m,y]=(0,w.useState)([]),g=m.length>0,f=(0,pe.usePrevious)(t);(0,w.useEffect)((()=>{if(!(0,l.isEmpty)(t)&&(0,l.difference)(Object.keys(t),Object.keys(f||[])).length){const e=Object.values(t).map((e=>e.keyword));y(e)}}),[t,f]),(0,w.useEffect)((()=>{h(u)}),[null==u?void 0:u.name]);const x=(0,w.useCallback)((e=>{const t=Ls.find((t=>t.value===e.target.value));t&&h(t)}),[h]),b=(0,w.useMemo)((()=>(0,l.isEmpty)(m)||(0,l.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,l.isEmpty)(null===(t=e.position)||void 0===t?void 0:t.history)}}))),[m,t]);return(0,C.jsxs)(_s,{isDisabled:!s,children:[(0,C.jsx)("p",{children:(0,d.__)("You can enable / disable tracking the SEO performance for each keyphrase below.","wordpress-seo")}),s&&o&&(0,C.jsx)(Xt,{}),(0,C.jsx)(Rs,{children:(0,C.jsx)(Is,{selected:p,onSelect:x,options:c,isLoggedIn:s})}),(0,C.jsx)(Cs,{children:(0,C.jsx)(fs,{isChartShown:g,datasets:b,keyphrases:r})}),(0,C.jsx)(Yt,{startAt:null==p?void 0:p.value,selectedKeyphrases:m,onSelectKeyphrases:y,trackedKeyphrases:t})]})};function Ns(e){const{isNewlyAuthenticated:t,isLoggedIn:s}=e,r=(0,w.useCallback)((()=>{vs(e)}),[vs,e]),o=ct(s);return(0,C.jsxs)(js,{children:[t&&(0,C.jsx)(yt,{}),s&&(0,C.jsx)(mt,{trackingInfo:o}),(0,C.jsxs)(Ss,{children:[(0,d.__)("SEO performance","wordpress-seo"),(0,C.jsx)(_.HelpIcon,{linkTo:wpseoAdminL10n["shortlinks.wincher.seo_performance"]
/* translators: Hidden accessibility text. */,linkText:(0,d.__)("Learn more about the SEO performance feature.","wordpress-seo")})]}),(0,C.jsx)(Zt,{}),(0,C.jsx)(ks,{isLoggedIn:s,onLogin:r}),(0,C.jsx)(ws,{...e,onLogin:r}),(0,C.jsx)(Ts,{...e,historyDaysLimit:(null==o?void 0:o.historyDays)||31})]})}Ts.propTypes={trackedKeyphrases:j().object,keyphrases:j().array.isRequired,isLoggedIn:j().bool.isRequired,shouldTrackAll:j().bool.isRequired,permalink:j().string.isRequired,historyDaysLimit:j().number},Ns.propTypes={trackedKeyphrases:j().object,addTrackedKeyphrase:j().func.isRequired,isLoggedIn:j().bool,isNewlyAuthenticated:j().bool,keyphrases:j().array,response:j().object,shouldTrackAll:j().bool,permalink:j().string,historyDaysLimit:j().number},Ns.defaultProps={trackedKeyphrases:null,isLoggedIn:!1,isNewlyAuthenticated:!1,keyphrases:[],response:{},shouldTrackAll:!1,permalink:"",historyDaysLimit:0};const Ms=(0,pe.compose)([(0,he.withSelect)((e=>{const{isWincherNewlyAuthenticated:t,getWincherKeyphraseLimitReached:s,getWincherLimit:r,getWincherHistoryDaysLimit:o,getWincherLoginStatus:i,getWincherRequestIsSuccess:n,getWincherRequestResponse:a,getWincherTrackableKeyphrases:l,getWincherTrackedKeyphrases:c,getWincherAllKeyphrasesMissRanking:d,getWincherPermalink:u,shouldWincherAutomaticallyTrackAll:p}=e("yoast-seo/editor");return{keyphrases:l(),trackedKeyphrases:c(),allKeyphrasesMissRanking:d(),isLoggedIn:i(),isNewlyAuthenticated:t(),isSuccess:n(),keyphraseLimitReached:s(),limit:r(),response:a(),shouldTrackAll:p(),permalink:u(),historyDaysLimit:o()}})),(0,he.withDispatch)((e=>{const{setWincherWebsiteId:t,setWincherRequestSucceeded:s,setWincherRequestFailed:r,setWincherTrackingForKeyphrase:o,setWincherSetKeyphraseLimitReached:i,setWincherLoginStatus:n}=e("yoast-seo/editor");return{setRequestSucceeded:e=>{s(e)},setRequestFailed:e=>{r(e)},addTrackedKeyphrase:e=>{o(e)},setKeyphraseLimitReached:e=>{i(e)},onAuthentication:(e,s,r)=>{t(r),n(e,s)}}}))])(Ns);function Ps(e,t,s,r){return new Promise(((o,i)=>{jQuery.ajax({type:e,url:t,beforeSend:s?e=>{e.setRequestHeader("X-WP-Nonce",s)}:null,data:r,dataType:"json",success:o,error:i})}))}const As=window.wp.sanitize,Os="SNIPPET_EDITOR_UPDATE_REPLACEMENT_VARIABLE",qs="SNIPPET_EDITOR_UPDATE_REPLACEMENT_VARIABLES_BATCH";function Fs(e,t,s="",r=!1){const o="string"==typeof t?(0,S.decodeHTML)(t):t;return{type:Os,name:e,value:o,label:s,hidden:r}}function $s(e){return e.charAt(0).toUpperCase()+e.slice(1)}const{stripHTMLTags:Bs}=S.strings,Ds=["slug","content","contentImage","snippetPreviewImageURL"];function Ws(e,t){(0,l.forEach)(e,((e,s)=>{Ds.includes(s)||t.dispatch(Fs(s,e))}))}function Us(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 Hs(e){return $s(e=Us(e))}function Ks(e,t){return e.push({name:t.name,label:t.label||Hs(t.name),value:t.value}),e}function zs(e,t="_"){return e.replace(/\s/g,t)}function Ys(e){return{name:"cf_"+zs(e),label:$s(e+" (custom field)")}}function Vs(e){const t=zs(e);return{name:"ct_"+t,label:$s(e+" (custom taxonomy)"),descriptionName:"ct_desc_"+t,descriptionLabel:$s(e+" description (custom taxonomy)")}}function Gs(e,t){if(!e.custom_taxonomies)return e;const s={};return(0,l.forEach)(e.custom_taxonomies,((e,t)=>{const{name:r,label:o,descriptionName:i,descriptionLabel:n}=Vs(t),a="string"==typeof e.name?(0,S.decodeHTML)(e.name):e.name,l="string"==typeof e.description?(0,S.decodeHTML)(e.description):e.description;s[r]={value:a,label:o},s[i]={value:l,label:n}})),t.dispatch(function(e){return{type:qs,updatedVariables:e}}(s)),(0,l.omit)({...e},"custom_taxonomies")}function Zs(e,t){return e.custom_fields?((0,l.forEach)(e.custom_fields,((e,s)=>{const{name:r,label:o}=Ys(s);t.dispatch(Fs(r,e,o))})),(0,l.omit)({...e},"custom_fields")):e}function Qs(e,t=156){return(e=(e=(0,As.stripTags)(e)).trim()).length<=t||(e=e.substring(0,t),/\s/.test(e)&&(e=e.substring(0,e.lastIndexOf(" ")))),e}const Xs=function(e){const t=(0,l.get)(window,["YoastSEO","app","pluggable"],!1);if(!t||!(0,l.get)(window,["YoastSEO","app","pluggable","loaded"],!1))return function(e){const t=(0,l.get)(window,["YoastSEO","wp","replaceVarsPlugin","replaceVariables"],l.identity);return{url:e.url,title:Bs(t(e.title)),description:Bs(t(e.description)),filteredSEOTitle:e.filteredSEOTitle?Bs(t(e.filteredSEOTitle)):""}}(e);const s=t._applyModifications.bind(t);return{url:e.url,title:Bs(s("data_page_title",e.title)),description:Bs(s("data_meta_desc",e.description)),filteredSEOTitle:e.filteredSEOTitle?Bs(s("data_page_title",e.filteredSEOTitle)):""}};var Js="score-text",er="image yoast-logo svg",tr=jQuery;function sr(e,t,s=null){var r,o,i,n,a;if(null!==s)return(0,l.get)(s,t,"");const c=(0,he.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:c?(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!==(o=r.status)&&void 0!==o&&o[t]?`<a href="#${null===(i=p[e])||void 0===i?void 0:i.anchor}">${null===(n=p[e])||void 0===n?void 0:n.label}</a> <strong>${null===(a=p[e])||void 0===a?void 0:a.status[t]}</strong>`:""}j().string.isRequired;const rr=ke.forwardRef((function(e,t){return ke.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),ke.createElement("path",{fillRule:"evenodd",d:"M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z",clipRule:"evenodd"}))})),or=({learnMoreLink:e,thumbnail:t,wistiaEmbedPermission:s,upsellLink:r,upsellLabel:o,newToText:i,ctbId:n})=>{const{onClose:a,initialFocus:l}=(0,ve.useModalContext)(),c={a:(0,C.jsx)(jr,{href:e,className:"yst-inline-flex yst-items-center yst-gap-1 yst-no-underline yst-font-medium",variant:"primary"}),ArrowNarrowRightIcon:(0,C.jsx)(rr,{className:"yst-w-4 yst-h-4 rtl:yst-rotate-180"}),br:(0,C.jsx)("br",{})};return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)("div",{className:"yst-px-10 yst-pt-10 yst-introduction-gradient yst-text-center",children:[(0,C.jsxs)("div",{className:"yst-relative yst-w-full",children:[(0,C.jsx)(co,{videoId:"vun9z1dpfh",thumbnail:t,wistiaEmbedPermission:s}),(0,C.jsx)(ve.Badge,{className:"yst-absolute yst-end-4 yst-text-center yst-justify-center",variant:"info",style:{top:"-8px"},children:(0,d.__)("Beta","wordpress-seo")})]}),(0,C.jsx)("div",{className:"yst-mt-6 yst-text-xs yst-font-medium yst-flex yst-flex-col yst-items-center",children:(0,C.jsxs)("span",{className:"yst-introduction-modal-uppercase yst-flex yst-gap-2 yst-items-center",children:[(0,C.jsx)("span",{className:"yst-logo-icon"}),i]})})]}),(0,C.jsxs)("div",{className:"yst-px-10 yst-pb-4 yst-flex yst-flex-col yst-items-center",children:[(0,C.jsxs)("div",{className:"yst-mt-4 yst-mx-1.5 yst-text-center",children:[(0,C.jsx)("h3",{className:"yst-text-slate-900 yst-text-lg yst-font-medium",children:(0,d.sprintf)(/* translators: %s: Expands to "Yoast AI" */
(0,d.__)("Optimize your SEO content with %s","wordpress-seo"),"Yoast AI")}),(0,C.jsx)("div",{className:"yst-mt-2 yst-text-slate-600 yst-text-sm",children:Re((0,d.sprintf)(/* translators: %1$s is a break tag; %2$s and %3$s are anchor tags; %4$s is the arrow icon. */
(0,d.__)("Make content editing a breeze! Optimize your SEO content with quick, actionable suggestions at the click of a button.%1$s%2$sLearn more%3$s%4$s","wordpress-seo"),"<br/>","<a>","<ArrowNarrowRightIcon />","</a>"),c)})]}),(0,C.jsx)("div",{className:"yst-w-full yst-flex yst-mt-6",children:(0,C.jsxs)(ve.Button,{as:"a",className:"yst-grow",size:"extra-large",variant:"upsell",href:r,target:"_blank",ref:l,"data-action":"load-nfd-ctb","data-ctb-id":n,children:[(0,C.jsx)(Ne,{className:"yst--ms-1 yst-me-2 yst-h-5 yst-w-5"}),o,(0,C.jsx)("span",{className:"yst-sr-only",children:/* translators: Hidden accessibility text. */
(0,d.__)("(Opens in a new browser tab)","wordpress-seo")})]})}),(0,C.jsx)(ve.Button,{as:"a",className:"yst-mt-4",variant:"tertiary",onClick:a,children:(0,d.__)("Close","wordpress-seo")})]})]})};or.propTypes={learnMoreLink:j().string.isRequired,upsellLink:j().string.isRequired,thumbnail:j().shape({src:j().string.isRequired,width:j().string,height:j().string}).isRequired,wistiaEmbedPermission:j().shape({value:j().bool.isRequired,status:j().string.isRequired,set:j().func.isRequired}).isRequired,upsellLabel:j().string,newToText:j().string,ctbId:j().string},or.defaultProps={upsellLabel:(0,d.sprintf)(/* translators: %1$s expands to Yoast SEO Premium. */
(0,d.__)("Unlock with %1$s","wordpress-seo"),"Yoast SEO Premium"),newToText:"Yoast SEO Premium",ctbId:"f6a84663-465f-4cb5-8ba5-f7a6d72224b2"};const ir=({handleRefreshClick:e,supportLink:t})=>(0,C.jsxs)("div",{className:"yst-flex yst-gap-2",children:[(0,C.jsx)(ve.Button,{onClick:e,children:(0,d.__)("Refresh this page","wordpress-seo")}),(0,C.jsx)(ve.Button,{variant:"secondary",as:"a",href:t,target:"_blank",rel:"noopener",children:(0,d.__)("Contact support","wordpress-seo")})]});ir.propTypes={handleRefreshClick:j().func.isRequired,supportLink:j().string.isRequired};const nr=({handleRefreshClick:e,supportLink:t})=>(0,C.jsxs)("div",{className:"yst-grid yst-grid-cols-1 yst-gap-y-2",children:[(0,C.jsx)(ve.Button,{className:"yst-order-last",onClick:e,children:(0,d.__)("Refresh this page","wordpress-seo")}),(0,C.jsx)(ve.Button,{variant:"secondary",as:"a",href:t,target:"_blank",rel:"noopener",children:(0,d.__)("Contact support","wordpress-seo")})]});nr.propTypes={handleRefreshClick:j().func.isRequired,supportLink:j().string.isRequired};const ar=({error:e,children:t})=>(0,C.jsxs)("div",{role:"alert",className:"yst-max-w-screen-sm yst-p-8 yst-space-y-4",children:[(0,C.jsx)(ve.Title,{children:(0,d.__)("Something went wrong. An unexpected error occurred.","wordpress-seo")}),(0,C.jsx)("p",{children:(0,d.__)("We're very sorry, but it seems like the following error has interrupted our application:","wordpress-seo")}),(0,C.jsx)(ve.Alert,{variant:"error",children:(null==e?void 0:e.message)||(0,d.__)("Undefined error message.","wordpress-seo")}),(0,C.jsx)("p",{children:(0,d.__)("Unfortunately, this means that any unsaved changes in this section will be lost. You can try and refresh this page to resolve the problem. If this error still occurs, please get in touch with our support team, and we'll get you all the help you need!","wordpress-seo")}),t]});ar.propTypes={error:j().object.isRequired,children:j().node},ar.VerticalButtons=nr,ar.HorizontalButtons=ir;const lr={variant:{lg:{grid:"yst-grid lg:yst-grid-cols-3 lg:yst-gap-12",col1:"yst-col-span-1",col2:"lg:yst-mt-0 lg:yst-col-span-2"},xl:{grid:"yst-grid xl:yst-grid-cols-3 xl:yst-gap-12",col1:"yst-col-span-1",col2:"xl:yst-mt-0 xl:yst-col-span-2"},"2xl":{grid:"yst-grid 2xl:yst-grid-cols-3 2xl:yst-gap-12",col1:"yst-col-span-1",col2:"2xl:yst-mt-0 2xl:yst-col-span-2"}}},cr=({id:e,children:t,title:s,description:r=null,variant:o="2xl"})=>(0,C.jsxs)("section",{id:e,className:lr.variant[o].grid,children:[(0,C.jsx)("div",{className:lr.variant[o].col1,children:(0,C.jsxs)("div",{className:"yst-max-w-screen-sm",children:[(0,C.jsx)(ve.Title,{as:"h2",size:"4",children:s}),r&&(0,C.jsx)("p",{className:"yst-mt-2",children:r})]})}),(0,C.jsxs)("fieldset",{className:`yst-min-w-0 yst-mt-8 ${lr.variant[o].col2}`,children:[(0,C.jsx)("legend",{className:"yst-sr-only",children:s}),(0,C.jsx)("div",{className:"yst-space-y-8",children:t})]})]});var dr;function ur(){return ur=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},ur.apply(this,arguments)}cr.propTypes={id:j().string,children:j().node.isRequired,title:j().node.isRequired,description:j().node,variant:j().oneOf(Object.keys(lr.variant))};const pr=e=>ke.createElement("svg",ur({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 1000 1000"},e),dr||(dr=ke.createElement("path",{fill:"#fff",d:"M500 0C223.9 0 0 223.9 0 500s223.9 500 500 500 500-223.9 500-500S776.1 0 500 0Zm87.2 412.4c0-21.9 4.3-40.2 13.1-54.4s24-27.1 45.9-38.2l10.1-4.9c17.8-9 22.4-16.7 22.4-26 0-11.1-9.5-19.1-25-19.1-18.3 0-32.2 9.5-41.8 28.9l-24.7-24.8c5.4-11.6 14.1-20.9 25.8-28.1a70.8 70.8 0 0 1 38.9-11.1c17.8 0 33.3 4.6 45.9 14.2s19.4 22.7 19.4 39.4c0 26.6-15 42.9-43.1 57.3l-15.7 8c-16.8 8.5-25.1 16-27.4 29.4h85.4v35.4H587.2Zm-82.1 373.3c-157.8 0-285.7-127.9-285.7-285.7s127.9-285.7 285.7-285.7a286.4 286.4 0 0 1 55.9 5.5l-55.9 116.9c-90 0-163.3 73.3-163.3 163.3s73.3 163.3 163.3 163.3a162.8 162.8 0 0 0 106.4-39.6l61.8 107.2a283.9 283.9 0 0 1-168.2 54.8ZM705 704.1l-70.7-122.5H492.9l70.7-122.4H705l70.7 122.4Z"}))),hr=window.ReactDOM;var mr,yr,gr;(yr=mr||(mr={})).Pop="POP",yr.Push="PUSH",yr.Replace="REPLACE",function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(gr||(gr={})),new Set(["lazy","caseSensitive","path","id","index","children"]),Error;const fr=["post","put","patch","delete"],xr=(new Set(fr),["get",...fr]);new Set(xr),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred"),ke.Component,ke.startTransition,new Promise((()=>{})),ke.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(e){}var wr,br,vr,kr;new Map,ke.startTransition,hr.flushSync,ke.useId,"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,(kr=wr||(wr={})).UseScrollRestoration="useScrollRestoration",kr.UseSubmit="useSubmit",kr.UseSubmitFetcher="useSubmitFetcher",kr.UseFetcher="useFetcher",kr.useViewTransitionState="useViewTransitionState",(vr=br||(br={})).UseFetcher="useFetcher",vr.UseFetchers="useFetchers",vr.UseScrollRestoration="useScrollRestoration",j().string.isRequired,j().string;const jr=({href:e,children:t,...s})=>(0,C.jsxs)(ve.Link,{target:"_blank",rel:"noopener noreferrer",...s,href:e,children:[t,(0,C.jsx)("span",{className:"yst-sr-only",children:/* translators: Hidden accessibility text. */
(0,d.__)("(Opens in a new browser tab)","wordpress-seo")})]});jr.propTypes={href:j().string.isRequired,children:j().node},jr.defaultProps={children:null};const _r=ke.forwardRef((function(e,t){return ke.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),ke.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 8l4 4m0 0l-4 4m4-4H3"}))})),Sr=[(0,d.__)("AI tools included","wordpress-seo"),(0,d.sprintf)(/* translators: %1$s expands to "Yoast SEO academy". */
(0,d.__)("%1$s access","wordpress-seo"),"Yoast SEO academy"),(0,d.__)("24/7 support","wordpress-seo")],Rr=[(0,d.__)("Generate SEO optimized metadata in seconds with AI","wordpress-seo"),(0,d.__)("Make your articles visible, be seen in Google News","wordpress-seo"),(0,d.__)("Built to get found by search, AI, and real users","wordpress-seo"),(0,d.__)("Easy Local SEO. Show up in Google Maps results","wordpress-seo"),(0,d.__)("Internal links and redirect management, easy","wordpress-seo"),(0,d.__)("Access to friendly help when you need it, day or night","wordpress-seo")],Cr=(e=!1)=>e?Sr:Rr,Er=(e=!1)=>{if(e)return Sr;const t=[...Rr];return t[1]=(0,d.__)("Boost visibility for your products, from 10 or 10,000+","wordpress-seo"),t};var Lr,Ir,Tr;function Nr(){return Nr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Nr.apply(this,arguments)}const Mr=e=>ke.createElement("svg",Nr({xmlns:"http://www.w3.org/2000/svg",id:"star-rating-half_svg__Layer_1","data-name":"Layer 1",viewBox:"0 0 500 475.53"},e),Lr||(Lr=ke.createElement("defs",null,ke.createElement("style",null,".star-rating-half_svg__cls-1{fill:#fbbf24}"))),Ir||(Ir=ke.createElement("path",{d:"M250 392.04 98.15 471.87l29-169.09L4.3 183.03l169.77-24.67L250 4.52l75.93 153.84 169.77 24.67-122.85 119.75 29 169.09L250 392.04z",className:"star-rating-half_svg__cls-1"})),Tr||(Tr=ke.createElement("path",{d:"m250 9.04 73.67 149.27.93 1.88 2.08.3 164.72 23.94-119.19 116.19-1.51 1.47.36 2.07 28.14 164.06-147.34-77.46-1.86-1-1.86 1-147.34 77.46 28.14-164.06.36-2.07-1.51-1.47L8.6 184.43l164.72-23.9 2.08-.3.93-1.88L250 9.04m0-9-77.25 156.49L0 181.64l125 121.89-29.51 172L250 394.3l154.51 81.23-29.51-172 125-121.89-172.75-25.11L250 0Z",className:"star-rating-half_svg__cls-1"})),ke.createElement("path",{d:"m500 181.64-172.75-25.11L250 0v394.3l154.51 81.23L375 303.48l125-121.84z",style:{fill:"#f3f4f6"}}));function Pr(){return Pr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Pr.apply(this,arguments)}const Ar=e=>ke.createElement("svg",Pr({xmlns:"http://www.w3.org/2000/svg","data-name":"Layer 1",viewBox:"0 0 500 475.53"},e),ke.createElement("path",{d:"m250 0 77.25 156.53L500 181.64 375 303.48l29.51 172.05L250 394.3 95.49 475.53 125 303.48 0 181.64l172.75-25.11L250 0z",style:{fill:"#fbbf24"}}));var Or,qr,Fr;function $r(){return $r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},$r.apply(this,arguments)}const Br=e=>ke.createElement("svg",$r({xmlns:"http://www.w3.org/2000/svg",width:64,height:64,fill:"none"},e),Or||(Or=ke.createElement("g",{clipPath:"url(#yoast-premium-logo-new_svg__a)"},ke.createElement("path",{fill:"url(#yoast-premium-logo-new_svg__b)",d:"M64 64H10.24C4.586 64 0 59.414 0 53.76V10.24C0 4.586 4.586 0 10.24 0h43.52C59.414 0 64 4.586 64 10.24V64Z"}),ke.createElement("path",{fill:"#6C2548",d:"m56.016.125-36.06 63.75H64v-53.76c0-4.88-3.414-8.96-7.984-9.987",opacity:.35}),ke.createElement("path",{fill:"#fff",d:"M9.523 43.174v4.468c2.765-.116 4.928-1.024 6.759-2.88 1.83-1.856 3.507-4.864 5.107-9.332L33.242 3.686h-5.735L17.96 30.208l-4.736-14.874H7.975l6.963 17.895a7.352 7.352 0 0 1 0 5.35c-.704 1.818-1.971 3.955-5.415 4.595Z"}),ke.createElement("path",{fill:"#9FDA4F",d:"M53.274 5.11c-5.99-3.382-13.59-1.27-16.976 4.72-3.386 5.99-1.27 13.59 4.72 16.976 5.99 3.386 13.59 1.27 16.976-4.72 3.382-5.99 1.27-13.59-4.72-16.976Z"}),ke.createElement("path",{fill:"#77B227",d:"M53.274 5.11 41.018 26.806c5.99 3.386 13.59 1.27 16.976-4.72 3.382-5.99 1.27-13.59-4.72-16.976Z"}),ke.createElement("path",{fill:"#FEC228",d:"M37.731 32.608s-.012-.006-.019-.013c-.006 0-.01-.006-.016-.01a8.134 8.134 0 0 0-11.091 3.085 8.145 8.145 0 0 0 3.104 11.108 8.139 8.139 0 0 0 11.075-3.095 8.14 8.14 0 0 0-3.05-11.072"}),ke.createElement("path",{fill:"#F49A00",d:"m37.696 32.586-8.01 14.179a8.145 8.145 0 0 0 11.095-3.085 8.144 8.144 0 0 0-3.085-11.094Z"}),ke.createElement("path",{fill:"#FF4E47",d:"M28.454 57.61a4.89 4.89 0 0 0-2.477-4.256 4.863 4.863 0 0 0-2.4-.634c-2.69 0-4.892 2.18-4.892 4.883a4.882 4.882 0 0 0 4.883 4.893 4.882 4.882 0 0 0 4.893-4.883"}),ke.createElement("path",{fill:"#ED261F",d:"m25.971 53.35-4.806 8.51a4.882 4.882 0 0 0 6.656-1.854 4.882 4.882 0 0 0-1.853-6.656"}),ke.createElement("path",{fill:"#CD82AB",d:"M57.402 58.086H43.888v1.197h13.514v-1.197ZM53.75 53.366l-3.103-5.76v.004l-.004-.004-3.104 5.76-4.777-3.42 1.126 7.702h13.514l1.126-7.702-4.777 3.42Z"}))),qr||(qr=ke.createElement("path",{stroke:"#fff",d:"M10 .5h44a9.5 9.5 0 0 1 9.5 9.5v53.5H10A9.5 9.5 0 0 1 .5 54V10A9.5 9.5 0 0 1 10 .5Z"})),Fr||(Fr=ke.createElement("defs",null,ke.createElement("linearGradient",{id:"yoast-premium-logo-new_svg__b",x1:-2.912,x2:68.509,y1:25.843,y2:38.438,gradientUnits:"userSpaceOnUse"},ke.createElement("stop",{stopColor:"#5D237A"}),ke.createElement("stop",{offset:.08,stopColor:"#702175"}),ke.createElement("stop",{offset:.22,stopColor:"#872070"}),ke.createElement("stop",{offset:.36,stopColor:"#981E6C"}),ke.createElement("stop",{offset:.51,stopColor:"#A21E69"}),ke.createElement("stop",{offset:.7,stopColor:"#A61E69"})),ke.createElement("clipPath",{id:"yoast-premium-logo-new_svg__a"},ke.createElement("path",{fill:"#fff",d:"M0 10C0 4.477 4.477 0 10 0h44c5.523 0 10 4.477 10 10v54H10C4.477 64 0 59.523 0 54V10Z"})))));var Dr,Wr,Ur;function Hr(){return Hr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Hr.apply(this,arguments)}const Kr=e=>ke.createElement("svg",Hr({xmlns:"http://www.w3.org/2000/svg",width:64,height:64,fill:"none"},e),Dr||(Dr=ke.createElement("g",{clipPath:"url(#woo-seo-logo-new_svg__a)"},ke.createElement("path",{fill:"#0E1E65",d:"M64 64H10.24C4.586 64 0 59.414 0 53.76V10.24C0 4.586 4.586 0 10.24 0h43.52C59.414 0 64 4.586 64 10.24V64Z"}),ke.createElement("path",{fill:"#0075B3",d:"M56.016.253 19.956 64H64V10.24c0-4.88-3.414-8.96-7.984-9.987Z"}),ke.createElement("path",{fill:"#fff",d:"M9.523 43.174v4.468c2.765-.116 4.928-1.024 6.759-2.88 1.83-1.856 3.507-4.864 5.107-9.332L33.242 3.686h-5.735L17.96 30.208l-4.736-14.874H7.975l6.963 17.895a7.352 7.352 0 0 1 0 5.35c-.704 1.818-1.971 3.955-5.415 4.595Z"}),ke.createElement("path",{fill:"#9FDA4F",d:"M53.274 5.11c-5.99-3.382-13.59-1.27-16.976 4.72-3.386 5.99-1.27 13.59 4.72 16.976 5.99 3.386 13.59 1.27 16.976-4.72 3.382-5.99 1.27-13.59-4.72-16.976Z"}),ke.createElement("path",{fill:"#FEC228",d:"M37.731 32.608s-.012-.006-.019-.013c-.006 0-.01-.006-.016-.01a8.134 8.134 0 0 0-11.091 3.085 8.145 8.145 0 0 0 3.104 11.108 8.139 8.139 0 0 0 11.075-3.095 8.14 8.14 0 0 0-3.05-11.072"}),ke.createElement("path",{fill:"#FF4E47",d:"M28.454 57.61a4.89 4.89 0 0 0-2.477-4.256 4.863 4.863 0 0 0-2.4-.634c-2.69 0-4.892 2.18-4.892 4.883a4.882 4.882 0 0 0 4.883 4.893 4.882 4.882 0 0 0 4.893-4.883"}),ke.createElement("path",{fill:"#77B227",d:"M53.274 5.11 41.018 26.806c5.99 3.386 13.59 1.27 16.976-4.72 3.382-5.99 1.27-13.59-4.72-16.976Z"}),ke.createElement("path",{fill:"#F49A00",d:"m37.696 32.586-8.01 14.179a8.145 8.145 0 0 0 11.095-3.085 8.144 8.144 0 0 0-3.085-11.094Z"}),ke.createElement("path",{fill:"#ED261F",d:"m25.971 53.35-4.806 8.51a4.882 4.882 0 0 0 6.656-1.854 4.882 4.882 0 0 0-1.853-6.656"}),ke.createElement("path",{fill:"#A1CCE3",d:"M58.102 46.806a1.26 1.26 0 0 0-1.219.938l-.157.582a40.97 40.97 0 0 0-10.857 1.261c-.013 0-.023.007-.035.01a.503.503 0 0 0-.317.64 40.344 40.344 0 0 0 1.99 4.86c.083.173.26.282.455.282h7.542c.64 0 1.213.403 1.427 1.008h-10a.507.507 0 0 0 0 1.011h10.592a.507.507 0 0 0 .506-.505c0-1.149-.775-2.15-1.888-2.442L57.862 48a.25.25 0 0 1 .243-.186h.932a.507.507 0 0 0 0-1.01h-.931l-.004.002ZM57.018 59.92a1.008 1.008 0 1 1 0-2.016 1.008 1.008 0 0 1 0 2.016Zm-8.573 0a1.008 1.008 0 1 1 0-2.016 1.008 1.008 0 0 1 0 2.016Z"}))),Wr||(Wr=ke.createElement("path",{stroke:"#fff",d:"M10 .5h44a9.5 9.5 0 0 1 9.5 9.5v53.5H10A9.5 9.5 0 0 1 .5 54V10A9.5 9.5 0 0 1 10 .5Z"})),Ur||(Ur=ke.createElement("defs",null,ke.createElement("clipPath",{id:"woo-seo-logo-new_svg__a"},ke.createElement("path",{fill:"#fff",d:"M0 10C0 4.477 4.477 0 10 0h44c5.523 0 10 4.477 10 10v54H10C4.477 64 0 59.523 0 54V10Z"}))))),zr=ke.forwardRef((function(e,t){return ke.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),ke.createElement("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"}))})),Yr=({link:e,linkProps:t,isPromotionActive:s,isWooCommerceActive:r})=>{const o=r?Er:Cr,i=(0,w.useMemo)((()=>r?(0,d.__)("SEO that scales with your product catalog.","wordpress-seo"):(0,d.__)("Now with Local, News & Video SEO + 1 Google Docs seat!","wordpress-seo")),[r]);let n=(0,d.__)("Buy now","wordpress-seo");const a=Re(r?(0,d.sprintf)(/* translators: %1$s and %2$s expand to a span wrap to avoid linebreaks. %3$s expands to "Yoast SEO Premium". */
(0,d.__)("%1$s%2$s %3$s","wordpress-seo"),"<nowrap>","</nowrap>","Yoast WooCommerce SEO"):(0,d.sprintf)(/* translators: %1$s and %2$s expand to a span wrap to avoid linebreaks. %3$s expands to "Yoast SEO Premium". */
(0,d.__)("%1$s%2$s %3$s","wordpress-seo"),"<nowrap>","</nowrap>","Yoast SEO Premium"),{nowrap:(0,C.jsx)("span",{className:"yst-whitespace-nowrap"})}),l=s("black-friday-promotion");return l&&(n=(0,d.__)("Buy now for 30% off","wordpress-seo")),(0,C.jsxs)("div",{className:Ae()("yst-p-6 yst-rounded-lg yst-text-white  yst-shadow",r?"yst-bg-woo-dark":"yst-bg-primary-500"),children:[(0,C.jsx)("figure",{className:"yst-logo-square yst-w-16 yst-h-16 yst-mx-auto yst-overflow-hidden yst-relative yst-z-10 yst-mt-[-2.6rem]",children:r?(0,C.jsx)(Kr,{}):(0,C.jsx)(Br,{})}),l&&(0,C.jsx)("div",{className:"sidebar__sale_banner_container",children:(0,C.jsx)("div",{className:"sidebar__sale_banner",children:(0,C.jsx)("span",{className:"banner_text",children:(0,d.__)("BLACK FRIDAY | 30% OFF","wordpress-seo")})})}),(0,C.jsx)(ve.Title,{as:"h2",className:"yst-mt-6 yst-text-base yst-font-extrabold yst-text-white",children:a}),(0,C.jsx)("p",{className:"yst-mt-2 yst-font-medium",children:i}),(0,C.jsx)("ul",{className:"yst-ps-[1em] yst-list-outside yst-text-white yst-mt-2",children:o(!0).map(((e,t)=>(0,C.jsxs)("li",{className:"yst-flex yst-items-center yst-gap-2",children:[(0,C.jsx)(zr,{className:"yst-w-4 yst-h-4 yst-text-green-400"}),(0,C.jsx)("span",{children:e})]},`upsell-benefit-${t}`)))}),(0,C.jsxs)(ve.Button,{as:"a",variant:"upsell",href:e,target:"_blank",rel:"noopener",className:"yst-flex yst-justify-center yst-gap-2 yst-mt-4 focus:yst-ring-offset-primary-500",...t,children:[(0,C.jsx)("span",{children:n}),(0,C.jsx)(_r,{className:"yst-w-4 yst-h-4 yst-icon-rtl"})]}),(0,C.jsx)("p",{className:"yst-text-center yst-text-xs yst-mx-2 yst-font-light yst-leading-5 yst-italic yst-mt-2",children:(0,d.__)("30-day money back guarantee","wordpress-seo")}),(0,C.jsx)("hr",{className:"yst-border-t yst-border-primary-300 yst-my-4"}),(0,C.jsx)("a",{className:"yst-block yst-mt-4 yst-no-underline",href:"https://www.g2.com/products/yoast-yoast/reviews",target:"_blank",rel:"noopener noreferrer",children:(0,C.jsxs)("span",{className:"yst-flex yst-gap-2 yst-mt-2 yst-items-center",children:[(0,C.jsx)(pr,{className:"yst-w-5 yst-h-5"}),(0,C.jsxs)("span",{className:"yst-flex yst-gap-1",children:[(0,C.jsx)(Ar,{className:"yst-w-5 yst-h-5"}),(0,C.jsx)(Ar,{className:"yst-w-5 yst-h-5"}),(0,C.jsx)(Ar,{className:"yst-w-5 yst-h-5"}),(0,C.jsx)(Ar,{className:"yst-w-5 yst-h-5"}),(0,C.jsx)(Mr,{className:"yst-w-5 yst-h-5"})]}),(0,C.jsx)("span",{className:"yst-text-sm yst-font-semibold yst-text-white",children:"4.6 / 5"})]})})]})};var Vr;function Gr(){return Gr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Gr.apply(this,arguments)}Yr.propTypes={link:j().string.isRequired,linkProps:j().object,isPromotionActive:j().func},Yr.defaultProps={linkProps:{},isPromotionActive:l.noop};const Zr=e=>ke.createElement("svg",Gr({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 12"},e),Vr||(Vr=ke.createElement("path",{fill:"#CD82AB",d:"M10.989 6.74 7.885.98v.002L7.882.98 4.778 6.74 0 3.32l1.126 7.702H14.64l1.126-7.703L10.99 6.74Z"})));var Qr;function Xr(){return Xr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Xr.apply(this,arguments)}const Jr=e=>ke.createElement("svg",Xr({xmlns:"http://www.w3.org/2000/svg",width:14,height:14,fill:"none"},e),Qr||(Qr=ke.createElement("path",{fill:"#0075B3",d:"M12.613.445a1.26 1.26 0 0 0-1.22.937l-.156.583A40.97 40.97 0 0 0 .379 3.225c-.013 0-.022.007-.035.01a.503.503 0 0 0-.317.64 40.344 40.344 0 0 0 1.99 4.861c.084.173.26.282.455.282h7.542c.64 0 1.213.403 1.427 1.008h-10a.507.507 0 0 0 0 1.01h10.592a.507.507 0 0 0 .506-.505c0-1.149-.774-2.15-1.888-2.441l1.722-6.452a.25.25 0 0 1 .243-.185h.931a.507.507 0 0 0 0-1.011h-.931l-.003.003Zm-1.085 13.114a1.008 1.008 0 1 1 0-2.016 1.008 1.008 0 0 1 0 2.016Zm-8.573 0a1.008 1.008 0 1 1 0-2.016 1.008 1.008 0 0 1 0 2.016Z"}))),eo=({premiumLink:e,premiumUpsellConfig:t,isPromotionActive:s,isWooCommerceActive:r})=>{const o=s("black-friday-promotion"),i=r?Er:Cr;let n=r?(0,d.sprintf)(/* translators: %s expands to "Yoast WooCommerce SEO" */
(0,d.__)("Explore %s now!","wordpress-seo"),"Yoast WooCommerce SEO"):(0,d.sprintf)(/* translators: %s expands to "Yoast SEO" Premium */
(0,d.__)("Explore %s now!","wordpress-seo"),"Yoast SEO Premium");return o&&(n=(0,d.__)("Get 30% off now!","wordpress-seo")),(0,C.jsxs)(ve.Paper,{as:"div",className:"xl:yst-max-w-3xl",children:[o&&(0,C.jsxs)("div",{className:"yst-rounded-t-lg yst-h-9 yst-flex yst-justify-between yst-items-center yst-bg-black yst-text-amber-300 yst-px-4 yst-text-lg yst-border-b yst-border-amber-300 yst-border-solid yst-font-medium",children:[(0,C.jsx)("div",{children:(0,d.__)("30% OFF","wordpress-seo")}),(0,C.jsx)("div",{children:(0,d.__)("BLACK FRIDAY","wordpress-seo")})]}),(0,C.jsxs)("div",{className:"yst-p-6 yst-flex yst-flex-col",children:[(0,C.jsx)("div",{className:"yst-flex yst-items-center",children:r?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(ve.Title,{as:"h2",size:"4",className:"yst-text-xl "+(r?"yst-text-woo-light":"yst-text-primary-500 "),children:(0,d.sprintf)(/* translators: %s expands to "Yoast SEO" Premium */
(0,d.__)("Upgrade to %s","wordpress-seo"),"Yoast WooCommerce SEO")}),(0,C.jsx)(Jr,{className:"yst-ml-2 yst-w-4 yst-h-3"})]}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(ve.Title,{as:"h2",size:"4",className:"yst-text-xl "+(r?"yst-text-woo-light":"yst-text-primary-500 "),children:(0,d.sprintf)(/* translators: %s expands to "Yoast SEO" Premium */
(0,d.__)("Upgrade to %s","wordpress-seo"),"Yoast SEO Premium")}),(0,C.jsx)(Zr,{className:"yst-ml-2 yst-w-4 yst-h-3"})]})}),(0,C.jsx)("span",{className:"yst-font-medium yst-text-slate-500 yst-text-xs yst-leading-5 yst-uppercase yst-mt-2",children:(0,d.__)("Now includes Local, News & Video SEO + 1 Google Docs seat!","wordpress-seo")}),(0,C.jsx)("ul",{className:"yst-grid yst-grid-cols-1 sm:yst-grid-cols-2 yst-gap-x-6 yst-list-none yst-list-outside yst-text-slate-600 yst-mt-6",children:i().map(((e,t)=>(0,C.jsxs)("li",{children:[(0,C.jsx)("span",{className:"yst-mx-2",children:"•"}),e]},`upsell-benefit-${t}`)))}),(0,C.jsxs)(ve.Button,{as:"a",variant:"upsell",size:"extra-large",href:e,className:"yst-gap-2 yst-mt-4",target:"_blank",rel:"noopener",...t,children:[n,(0,C.jsx)(_r,{className:"yst-w-4 yst-h-4 yst-icon-rtl"})]})]})]})};eo.propTypes={premiumLink:j().string.isRequired,premiumUpsellConfig:j().object,isPromotionActive:j().func,isWooCommerceActive:j().bool.isRequired},eo.defaultProps={premiumUpsellConfig:{},isPromotionActive:l.noop},j().string.isRequired,j().object.isRequired,j().string.isRequired,j().func.isRequired,j().bool.isRequired;const to=ke.forwardRef((function(e,t){return ke.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),ke.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}))})),so=({isOpen:e,onClose:t=l.noop,onDiscard:s=l.noop,title:r,description:o,dismissLabel:i,discardLabel:n})=>{const a=(0,ve.useSvgAria)();return(0,C.jsx)(ve.Modal,{isOpen:e,onClose:t,children:(0,C.jsxs)(ve.Modal.Panel,{closeButtonScreenReaderText:(0,d.__)("Close","wordpress-seo"),children:[(0,C.jsxs)("div",{className:"sm:yst-flex sm:yst-items-start",children:[(0,C.jsx)("div",{className:"yst-mx-auto yst-flex-shrink-0 yst-flex yst-items-center yst-justify-center yst-h-12 yst-w-12 yst-rounded-full yst-bg-red-100 sm:yst-mx-0 sm:yst-h-10 sm:yst-w-10",children:(0,C.jsx)(to,{className:"yst-h-6 yst-w-6 yst-text-red-600",...a})}),(0,C.jsxs)("div",{className:"yst-mt-3 yst-text-center sm:yst-mt-0 sm:yst-ms-4 sm:yst-text-start",children:[(0,C.jsx)(ve.Modal.Title,{className:"yst-text-lg yst-leading-6 yst-font-medium yst-text-slate-900 yst-mb-3",children:r}),(0,C.jsx)(ve.Modal.Description,{className:"yst-text-sm yst-text-slate-500",children:o})]})]}),(0,C.jsxs)("div",{className:"yst-flex yst-flex-col sm:yst-flex-row-reverse yst-gap-3 yst-mt-6",children:[(0,C.jsx)(ve.Button,{type:"button",variant:"error",onClick:s,className:"yst-block",children:n}),(0,C.jsx)(ve.Button,{type:"button",variant:"secondary",onClick:t,className:"yst-block",children:i})]})]})})};so.propTypes={isOpen:j().bool.isRequired,onClose:j().func,onDiscard:j().func,title:j().string.isRequired,description:j().string.isRequired,dismissLabel:j().string.isRequired,discardLabel:j().string.isRequired};const ro=window.yoast.reactHelmet,oo="error",io="loading",no="showPlay",ao="askPermission",lo="isPlaying",co=({videoId:e,thumbnail:t,wistiaEmbedPermission:s})=>{const[r,o]=(0,w.useState)(s.value?lo:no),i=(0,w.useCallback)((()=>o(lo)),[o]),n=(0,w.useCallback)((()=>{s.value?i():o(ao)}),[s.value,i,o]),a=(0,w.useCallback)((()=>o(no)),[o]),l=(0,w.useCallback)((()=>{s.set(!0),i()}),[s.set,i]);return(0,C.jsxs)(C.Fragment,{children:[s.value&&(0,C.jsx)(ro.Helmet,{children:(0,C.jsx)("script",{src:"https://fast.wistia.com/assets/external/E-v1.js",async:!0})}),(0,C.jsxs)("div",{className:"yst-relative yst-w-full yst-h-0 yst-pt-[56.25%] yst-overflow-hidden yst-rounded-md yst-drop-shadow-md yst-bg-white",children:[r===no&&(0,C.jsx)("button",{type:"button",className:"yst-absolute yst-inset-0 yst-button yst-p-0 yst-border-none yst-bg-white yst-transition-opacity yst-duration-1000 yst-opacity-100",onClick:n,children:(0,C.jsx)("img",{className:"yst-w-full yst-h-auto",alt:"",loading:"lazy",decoding:"async",...t})}),r===ao&&(0,C.jsxs)("div",{className:"yst-absolute yst-inset-0 yst-flex yst-flex-col yst-items-center yst-justify-center yst-bg-white",children:[(0,C.jsxs)("p",{className:"yst-max-w-xs yst-mx-auto yst-text-center",children:[s.status===io&&(0,C.jsx)(ve.Spinner,{}),s.status!==io&&(0,d.sprintf)(/* translators: %1$s expands to Yoast SEO. %2$s expands to Wistia. */
(0,d.__)("To see this video, you need to allow %1$s to load embedded videos from %2$s.","wordpress-seo"),"Yoast SEO","Wistia")]}),(0,C.jsxs)("div",{className:"yst-flex yst-mt-6 yst-gap-x-4",children:[(0,C.jsx)(ve.Button,{type:"button",variant:"secondary",onClick:a,disabled:s.status===io,children:(0,d.__)("Deny","wordpress-seo")}),(0,C.jsx)(ve.Button,{type:"button",variant:"primary",onClick:l,disabled:s.status===io,children:(0,d.__)("Allow","wordpress-seo")})]})]}),s.value&&r===lo&&(0,C.jsxs)("div",{className:"yst-absolute yst-w-full yst-h-full yst-top-0 yst-right-0",children:[null===e&&(0,C.jsx)(ve.Spinner,{className:"yst-h-full yst-mx-auto"}),null!==e&&(0,C.jsx)("div",{className:`wistia_embed wistia_async_${e} videoFoam=true`})]})]})]})};var uo,po;function ho(){return ho=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},ho.apply(this,arguments)}co.propTypes={videoId:j().string.isRequired,thumbnail:j().shape({src:j().string.isRequired,width:j().string,height:j().string}).isRequired,wistiaEmbedPermission:j().shape({value:j().bool.isRequired,status:j().string.isRequired,set:j().func.isRequired}).isRequired},ke.forwardRef((function(e,t){return ke.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),ke.createElement("path",{fillRule:"evenodd",d:"M10.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L12.586 11H5a1 1 0 110-2h7.586l-2.293-2.293a1 1 0 010-1.414z",clipRule:"evenodd"}))})),j().bool.isRequired,j().func.isRequired,j().func,j().string;const mo=({onGiveConsent:e,learnMoreLink:t,privacyPolicyLink:s,termsOfServiceLink:r,imageLink:o})=>{const{onClose:i,initialFocus:n}=(0,ve.useModalContext)(),[a,l]=(0,ve.useToggleState)(!1),c=(0,w.useMemo)((()=>({src:o,width:"432",height:"244"})),[o]),u=Re((0,d.sprintf)(/* translators: %1$s and %2$s are a set of anchor tags and %3$s and %4$s are a set of anchor tags. */
(0,d.__)("I approve the %1$sTerms of Service%2$s & %3$sPrivacy Policy%4$s of the Yoast AI service. This includes consenting to the collection and use of data to improve user experience.","wordpress-seo"),"<a1>","</a1>","<a2>","</a2>"),{a1:(0,C.jsx)(jr,{href:r}),a2:(0,C.jsx)(jr,{href:s})}),[p,h]=(0,ve.useToggleState)(!1),m=(0,w.useCallback)((async()=>{h(),await e(),h()}),[e]);return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("div",{className:"yst-px-10 yst-pt-10 yst-introduction-gradient yst-text-center",children:(0,C.jsx)("div",{className:"yst-relative yst-w-full",children:(0,C.jsx)("img",{className:"yst-w-full yst-h-auto yst-rounded-md yst-drop-shadow-md",alt:"",loading:"lazy",decoding:"async",...c})})}),(0,C.jsxs)("div",{className:"yst-px-10 yst-pb-4 yst-flex yst-flex-col yst-items-center",children:[(0,C.jsxs)("div",{className:"yst-mt-4 yst-mx-1.5 yst-text-center",children:[(0,C.jsx)("h3",{className:"yst-text-slate-900 yst-text-lg yst-font-medium",children:(0,d.sprintf)(/* translators: %s expands to Yoast AI. */
(0,d.__)("Grant consent for %s","wordpress-seo"),"Yoast AI")}),(0,C.jsx)("div",{className:"yst-mt-2 yst-text-slate-600 yst-text-sm",children:Re((0,d.sprintf)(/* translators: %1$s is a break tag; %2$s and %3$s are anchor tag; %4$s is the arrow icon. */
(0,d.__)("Enable AI-powered SEO! Use all Yoast AI features to boost your efficiency. Just give us the green light. %1$s%2$sLearn more%3$s%4$s","wordpress-seo"),"<br/>","<a>","<ArrowNarrowRightIcon />","</a>"),{a:(0,C.jsx)(jr,{href:t,className:"yst-inline-flex yst-items-center yst-gap-1 yst-no-underline yst-font-medium",variant:"primary"}),ArrowNarrowRightIcon:(0,C.jsx)(rr,{className:"yst-w-4 yst-h-4 rtl:yst-rotate-180"}),br:(0,C.jsx)("br",{})})})]}),(0,C.jsx)("div",{className:"yst-flex yst-w-full yst-mt-6",children:(0,C.jsx)("hr",{className:"yst-w-full yst-text-gray-200"})}),(0,C.jsxs)("div",{className:"yst-flex yst-items-start yst-mt-4",children:[(0,C.jsx)("input",{type:"checkbox",id:"yst-ai-consent-checkbox",name:"yst-ai-consent-checkbox",checked:a,value:a?"true":"false",onChange:l,className:"yst-checkbox__input",ref:n}),(0,C.jsx)("label",{htmlFor:"yst-ai-consent-checkbox",className:"yst-label yst-checkbox__label yst-text-xs yst-font-normal yst-text-slate-500",children:u})]}),(0,C.jsx)("div",{className:"yst-w-full yst-flex yst-mt-4",children:(0,C.jsxs)(ve.Button,{as:"button",className:"yst-grow",size:"large",disabled:!a,onClick:m,children:[p&&(0,C.jsx)(ve.Spinner,{className:"yst-me-2"}),(0,d.__)("Grant consent","wordpress-seo")]})}),(0,C.jsx)(ve.Button,{as:"button",className:"yst-mt-4",variant:"tertiary",onClick:i,children:(0,d.__)("Close","wordpress-seo")})]})]})};mo.propTypes={onGiveConsent:j().func.isRequired,learnMoreLink:j().string.isRequired,privacyPolicyLink:j().string.isRequired,termsOfServiceLink:j().string.isRequired,imageLink:j().string.isRequired};ke.forwardRef((function(e,t){return ke.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),ke.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"}))})),window.yoast.aiFrontend;const yo="yoast-seo/ai-generator",go="yoast-seo/editor",fo="google",xo="social",wo="twitter",bo="title",vo="description",ko="post",jo="term",_o={post:"title",term:"term_title"},So=(0,l.mapValues)(_o,(e=>`%%${e}%%`)),Ro={mobile:"mobile",desktop:"desktop"},Co={idle:"idle",loading:"loading",success:"success",error:"error"},Eo="success",Lo="error",Io="abort";let To,No=!1;const Mo=["_formal","_informal","_ao90"],Po=e=>{for(const t of Mo)if(e.endsWith(t))return e.slice(0,-t.length);return e},Ao=async({endpoint:e,data:t})=>{let s;const r=1e3*(0,l.get)(window,"wpseoAiGenerator.requestTimeout",30);try{To&&To.abort(),To=new AbortController,No=!1,s=setTimeout((()=>{No=!0,To.abort()}),r);const o=await et()({path:e,method:"POST",data:t,parse:!1,signal:To.signal}),i=await o.json();return{status:Eo,payload:i}}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)return No?{status:Lo,payload:{message:"timeout",code:408}}:{status:Io};const{message:t,missingLicenses:s,errorIdentifier:r}=await(async e=>{try{const t=e.body.getReader(),{value:s}=await t.read(),r=new TextDecoder("utf-8").decode(s);return console.error(r),JSON.parse(r)}catch(e){return{message:"Unknown"}}})(e);return{status:Lo,payload:{message:t,code:e.status||500,missingLicenses:s,errorIdentifier:r}}}finally{clearTimeout(s)}},Oo="\\–\\-\\(\\)_\\[\\]’‘“”〝〞〟‟„\"'.?!:;,¿¡«»‹›—×+&۔؟،؛。。!‼?⁇⁉⁈‥…・ー、〃〄〆〇〈〉《》「」『』【】〒〓〔〕〖〗〘〙〚〛〜〝〞〟〠〶〼〽{}|~⦅⦆「」、[]・¥$%@&'()*/:;<>\\\<>";Oo.split(""),new RegExp("^["+Oo+"]+"),new RegExp("["+Oo+"]+$");new RegExp("["+Oo+"#$%&*+/=@^`{|}~ -¿–-⁊ -₠-⃀]","g");const qo=e=>{const t={...e};return""!==e.value||["title","excerpt","excerpt_only"].includes(e.name)||(t.value="%%"+e.name+"%%"),t.badge=`<badge>${e.label}</badge>`,t},Fo={editType:bo,previewType:fo,postType:"post",contentType:ko},$o=(0,w.createContext)(Fo),Bo=($o.Provider,()=>(0,w.useContext)($o)),Do=()=>(0,w.useContext)(n.LocationContext),Wo=e=>{const t=(0,w.useRef)(null);return(0,w.useCallback)((s=>{(0,l.attempt)((()=>t.current&&t.current.disconnect())),null!==s&&(t.current=new ResizeObserver((t=>{(0,l.forEach)(t,(t=>e(t)))})),t.current.observe(s))}),[e])},Uo=window.yoast.reduxJsToolkit,Ho=(0,Uo.createSlice)({name:"suggestions",initialState:{status:Co.loading,error:{code:200,message:""},entities:[],selected:""},reducers:{setLoading:e=>{e.status=Co.loading},setSuccess:(e,{payload:t})=>{e.status=Co.success,e.selected=t[0],e.entities.push(...t)},setError:(e,{payload:t})=>{e.status=Co.error,e.error=t},setSelected:(e,{payload:t})=>{e.selected=t}}}),Ko=e=>{switch(e){case xo:return"Facebook";case wo:return"Twitter";default:return"Google"}},zo=window.yoast.searchMetadataPreviews,Yo="usageCount",Vo="fetchUsageCount",Go=`${Vo}/success`,Zo={errorCode:null,errorIdentifier:null,errorMessage:null},Qo=(0,Uo.createSlice)({name:Yo,initialState:{status:"idle",count:0,limit:10,endpoint:"yoast/v1/ai_generator/get_usage",error:Zo},reducers:{addUsageCount:(e,{payload:t=1})=>{e.count+=t},setUsageCount:(e,{payload:t})=>{e.count=t},setUsageCountEndpoint:(e,{payload:t})=>{e.endpoint=t},setUsageCountLimit:(e,{payload:t})=>{e.limit=t}},extraReducers:e=>{e.addCase(`${Vo}/request`,(e=>{e.status=io,e.error=Zo})),e.addCase(Go,((e,{payload:t})=>{e.status="success",e.count=t.count,e.limit=t.limit,e.error=Zo})),e.addCase(`${Vo}/${oo}`,((e,{payload:t})=>{e.status="error",e.error={errorCode:502,...t}}))}}),Xo=(Qo.getInitialState,{selectUsageCountStatus:e=>(0,l.get)(e,[Yo,"status"],Qo.getInitialState()),selectUsageCount:e=>(0,l.get)(e,[Yo,"count"],Qo.getInitialState().count),selectUsageCountLimit:e=>(0,l.get)(e,[Yo,"limit"],Qo.getInitialState().limit),selectUsageCountEndpoint:e=>(0,l.get)(e,[Yo,"endpoint"],Qo.getInitialState().endpoint),selectUsageCountError:e=>(0,l.get)(e,[Yo,"error"],Qo.getInitialState().error)});Xo.selectUsageCountRemaining=(0,Uo.createSelector)([Xo.selectUsageCount,Xo.selectUsageCountLimit],((e,t)=>Math.max(t-e,0))),Xo.isUsageCountLimitReached=(0,Uo.createSelector)([Xo.selectUsageCount,Xo.selectUsageCountLimit,Xo.selectUsageCountError],((e,t,s)=>429===s.errorCode||e>=t)),Qo.actions,Qo.reducer;const Jo=()=>{const e=(0,he.useSelect)((e=>e(go).selectLink("https://yoa.st/ai-common-errors")),[]),t=(0,he.useSelect)((e=>e(go).selectAdminLink("?page=wpseo_page_support")),[]);return(0,C.jsxs)(ve.Alert,{variant:"error",children:[(0,C.jsx)("span",{className:"yst-block yst-font-medium",children:(0,d.__)("Something went wrong","wordpress-seo")}),(0,C.jsx)("p",{className:"yst-mt-2",children:Re((0,d.sprintf)(/* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */
(0,d.__)("Please try again later. If this issue persists, you can learn more about possible reasons for this error on our page about %1$scommon AI feature problems and errors%2$s. In case you need further help, please %3$scontact our support team%4$s.","wordpress-seo"),"<a1>","</a1>","<a2>","</a2>"),{a1:(0,C.jsx)(jr,{variant:"error",href:e}),a2:(0,C.jsx)(jr,{variant:"error",href:t})})})]})},ei=()=>{const e=(0,he.useSelect)((e=>e(go).selectLink("https://yoa.st/ai-common-errors")),[]),t=(0,he.useSelect)((e=>e(go).selectAdminLink("?page=wpseo_page_support")),[]);return(0,C.jsxs)(ve.Alert,{variant:"error",children:[(0,C.jsx)("span",{className:"yst-block yst-font-medium",children:(0,d.__)("Not enough content","wordpress-seo")}),(0,C.jsx)("p",{className:"yst-mt-2",children:Re((0,d.sprintf)(/* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */
(0,d.__)("Please add more content to ensure a valuable AI suggestion. Learn more on our page about %1$scommon AI feature problems and errors%2$s. In case you need further help, please %3$scontact our support team%4$s.","wordpress-seo"),"<a1>","</a1>","<a2>","</a2>"),{a1:(0,C.jsx)(jr,{variant:"error",href:e}),a2:(0,C.jsx)(jr,{variant:"error",href:t})})})]})},ti=()=>{const e=(0,he.useSelect)((e=>e(go).selectAdminLink("?page=wpseo_page_settings#/site-features#card-wpseo-keyword_analysis_active")),[]),t=(0,w.useCallback)((()=>{window.location.reload()}),[]),{onClose:s}=(0,ve.useModalContext)();return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(ve.Alert,{variant:"error",children:[(0,C.jsx)("span",{className:"yst-block yst-font-medium",children:(0,d.__)("SEO analysis required","wordpress-seo")}),(0,C.jsx)("p",{className:"yst-mt-2",children:Re((0,d.sprintf)(
/**
         * translators:
         * %1$s expands to Yoast SEO.
         * %2$s and %3$s expand to an opening and closing anchor tag, respectively, that links to the settings page.
         * %4$s expands to Yoast AI.
         */
(0,d.__)("%4$s requires the SEO analysis to be enabled. To enable it, please navigate to %2$sSite features%3$s in %1$s, turn on the SEO analysis, and click 'Save changes'. If it's disabled in your WordPress user profile, access your profile and enable it there. Please contact your administrator if you don't have access to these settings.","wordpress-seo"),"Yoast SEO","<a>","</a>","Yoast AI"),{a:(0,C.jsx)(jr,{variant:"error",href:e})})})]}),(0,C.jsxs)("div",{className:"yst-mt-6 yst-mb-1 yst-flex yst-space-x-3 rtl:yst-space-x-reverse yst-place-content-end",children:[(0,C.jsx)(ve.Button,{variant:"secondary",onClick:s,children:(0,d.__)("Close","wordpress-seo")}),(0,C.jsx)(ve.Button,{className:"yst-revoke-button",variant:"primary",onClick:t,children:(0,d.__)("Refresh page","wordpress-seo")})]})]})},si=()=>{const e=(0,he.useSelect)((e=>e(go).selectLink("https://yoa.st/ai-generator-rate-limit-help")),[]);return(0,C.jsxs)(ve.Alert,{variant:"error",children:[(0,C.jsx)("span",{className:"yst-block yst-font-medium",children:(0,d.__)("You've reached the Yoast AI rate limit","wordpress-seo")}),(0,C.jsx)("p",{className:"yst-mt-2",children:Re((0,d.sprintf)(/* translators: %1$s expands to an opening tag. %2$s expands to a closing tag. */
(0,d.__)("You might have reached your Yoast AI rate limit for a specific time frame or your sparks limit for this month. If you have reached your rate limit, please reduce the frequency of your requests to continue using Yoast AI features. Our %1$shelp article%2$s provides guidance on effectively planning and pacing your requests for an optimized workflow.","wordpress-seo"),"<a>","</a>"),{a:(0,C.jsx)(jr,{variant:"error",href:e})})})]})},ri=({invalidSubscriptions:e=[]})=>{const{newYoastWooLink:t,activateYoastWooLink:s,newPremiumLink:r,activatePremiumLink:o}=(0,he.useSelect)((e=>{const t=e(go);return{newYoastWooLink:t.selectLink("https://yoa.st/ai-generator-new-yoast-woocommerce"),activateYoastWooLink:t.selectLink("https://yoa.st/ai-generator-activate-yoast-woocommerce"),newPremiumLink:t.selectLink("https://yoa.st/ai-generator-new-premium"),activatePremiumLink:t.selectLink("https://yoa.st/ai-generator-activate-premium")}}),[]),{onClose:i}=(0,ve.useModalContext)(),n=(0,w.useCallback)((async()=>{try{await et()({path:"yoast/v1/ai_generator/bust_subscription_cache",method:"POST",parse:!1})}catch(e){console.error(e)}window.location.reload()}),[]);let a,l,c;return e.includes("Yoast WooCommerce SEO")?(a="Yoast WooCommerce SEO",l=s,c=t):e.includes("Yoast SEO Premium")&&(a="Yoast SEO Premium",l=o,c=r),(0,C.jsxs)(w.Fragment,{children:[(0,C.jsxs)(ve.Alert,{variant:"error",children:[(0,C.jsx)("span",{className:"yst-block yst-font-medium",children:(0,d.__)("Subscription required","wordpress-seo")}),(0,C.jsx)("p",{className:"yst-mt-2",children:Re((0,d.sprintf)(
/**
         * translators:
         * %1$s expands to Yoast SEO Premium or Yoast WooCommerce SEO.
         * %2$s expands to MyYoast.
         * %3$s and %4$s expand to an opening and closing anchor tag, respectively, to activate your subscription.
         * %5$s and %6$s expand to an opening and closing anchor tag, respectively, to get a new subscription.
         **/
(0,d.__)("To access this feature, you need an active %1$s subscription. Please %3$sactivate your subscription in %2$s%4$s or %5$sget a new %1$s subscription%6$s. Afterward, refresh this page. It may take up to 30 seconds for the feature to function correctly.","wordpress-seo"),a,"MyYoast","<Activate>","</Activate>","<New>","</New>"),{Activate:(0,C.jsx)(jr,{variant:"error",href:l}),New:(0,C.jsx)(jr,{variant:"error",href:c})})})]}),(0,C.jsxs)("div",{className:"yst-mt-6 yst-mb-1 yst-flex yst-space-x-3 rtl:yst-space-x-reverse yst-place-content-end",children:[(0,C.jsx)(ve.Button,{variant:"secondary",onClick:i,children:(0,d.__)("Close","wordpress-seo")}),(0,C.jsx)(ve.Button,{variant:"primary",onClick:n,children:(0,d.__)("Refresh page","wordpress-seo")})]})]})};ri.propTypes={invalidSubscriptions:j().arrayOf(j().string)};const oi=()=>{const e=(0,he.useSelect)((e=>e(go).selectLink("https://yoa.st/ai-common-errors")),[]),t=(0,he.useSelect)((e=>e(go).selectAdminLink("?page=wpseo_page_support")),[]);return(0,C.jsxs)(ve.Alert,{variant:"error",children:[(0,C.jsx)("span",{className:"yst-block yst-font-medium",children:(0,d.__)("Connection timeout","wordpress-seo")}),(0,C.jsx)("p",{className:"yst-mt-2",children:Re((0,d.sprintf)(/* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */
(0,d.__)("It seems that a connection timeout has occurred. Please check your internet connection and try again later. Learn more on our page about %1$scommon AI feature problems and errors%2$s. In case you need further help, please %3$scontact our support team%4$s.","wordpress-seo"),"<a1>","</a1>","<a2>","</a2>"),{a1:(0,C.jsx)(jr,{variant:"error",href:e}),a2:(0,C.jsx)(jr,{variant:"error",href:t})})})]})},ii=()=>{const e=(0,he.useSelect)((e=>e(go).selectAdminLink("?page=wpseo_page_support")),[]);return(0,C.jsxs)(ve.Alert,{variant:"error",children:[(0,C.jsx)("span",{className:"yst-block yst-font-medium",children:(0,d.__)("Usage policy violation","wordpress-seo")}),(0,C.jsx)("p",{className:"yst-mt-2",children:Re((0,d.sprintf)(
/* translators: %1$s, %2$s, %3$s, %4$s are anchor tags.
       * %5$s expands to OpenAI.
       */
(0,d.__)("Due to %5$s's strict ethical guidelines and %1$susage policies%2$s, we cannot generate suggestions for the content on this page. If you intend to use AI, kindly avoid the use of explicit, violent, copyrighted, or sexually explicit content. In case you need further help, please %3$scontact our support team%4$s.","wordpress-seo"),"<a1>","</a1>","<a2>","</a2>","OpenAI"),{a1:(0,C.jsx)(jr,{variant:"error",href:"https://openai.com/policies/usage-policies"}),a2:(0,C.jsx)(jr,{variant:"error",href:e})})})]})},ni=({errorMessage:e=""})=>{const t=(0,he.useSelect)((e=>e(go).selectAdminLink("?page=wpseo_page_support")),[]);return(0,C.jsxs)(ve.Alert,{variant:"error",children:[(0,C.jsx)("span",{className:"yst-block yst-font-medium",children:(0,d.__)("Something went wrong","wordpress-seo")}),(0,C.jsx)("p",{className:"yst-mt-2",children:(0,d.sprintf)(/* translators: %s is the error response of the request. */
(0,d.__)("The request came back with the following error: '%s'.","wordpress-seo"),e)}),(0,C.jsx)("p",{className:"yst-mt-2",children:Re((0,d.sprintf)(/* translators: %1$s expands to an opening tag. %2$s expands to a closing tag. */
(0,d.__)("Please try again later. If the issue persists, please %1$scontact our support team%2$s.","wordpress-seo"),"<a>","</a>"),{a:(0,C.jsx)(jr,{variant:"error",href:t})})})]})};ni.propTypes={errorMessage:j().string};const ai=()=>{const e=(0,he.useSelect)((e=>e(go).selectAdminLink("plugins.php")),[]);return(0,C.jsxs)(ve.Alert,{variant:"error",children:[(0,C.jsx)("span",{className:"yst-block yst-font-medium",children:(0,d.__)("Something went wrong","wordpress-seo")}),(0,C.jsx)("p",{className:"yst-mt-2",children:Re((0,d.sprintf)(/* translators: %1$s expands to Yoast SEO Premium. %2$s expands to an opening link tag. %3$s expands to a closing link tag. */
(0,d.__)("The version of %1$s is outdated. Please upgrade %1$s %2$shere%3$s!","wordpress-seo"),"Yoast SEO Premium","<a>","</a>"),{a:(0,C.jsx)(jr,{variant:"error",href:e})})})]})},li=()=>{const e=(0,he.useSelect)((e=>e(go).selectLink("https://yoa.st/ai-common-errors")),[]),t=(0,he.useSelect)((e=>e(go).selectAdminLink("?page=wpseo_page_support")),[]);return(0,C.jsxs)(ve.Alert,{variant:"error",children:[(0,C.jsx)("span",{className:"yst-block yst-font-medium",children:(0,d.__)("Yoast AI cannot reach your site","wordpress-seo")}),(0,C.jsx)("p",{className:"yst-mt-2",children:Re((0,d.sprintf)(/* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */
(0,d.__)("To use this feature, your site must be publicly accessible. This applies to both test sites and instances where your REST API is password-protected. Please ensure your site is accessible to the public and try again. Learn more on our page about %1$scommon AI feature problems and errors%2$s. In case you need further help, please %3$scontact our support team%4$s.","wordpress-seo"),"<a1>","</a1>","<a2>","</a2>"),{a1:(0,C.jsx)(jr,{variant:"error",href:e}),a2:(0,C.jsx)(jr,{variant:"error",href:t})})})]})},ci=({errorCode:e,errorIdentifier:t="",errorMessage:s=""})=>{switch(e){case 400:switch(t){case"SITE_UNREACHABLE":return(0,C.jsx)(li,{});case"WP_HTTP_REQUEST_ERROR":return(0,C.jsx)(ni,{errorMessage:s});default:return(0,C.jsx)(Jo,{})}case 429:return(0,C.jsx)(si,{});default:return(0,C.jsx)(Jo,{})}};ci.propTypes={errorCode:j().number.isRequired,errorIdentifier:j().string,errorMessage:j().string};const di=({currentSubscriptions:e,isSeoAnalysisActive:t=!0})=>{const{isPremium:s,usageCountStatus:r,usageCountError:o,isWooProductEntity:i,isWooSeoActive:n}=(0,he.useSelect)((e=>{const t=e(go);return{isPremium:t.getIsPremium(),usageCountStatus:e(yo).selectUsageCountStatus(),usageCountError:e(yo).selectUsageCountError(),isWooProductEntity:t.getIsWooProductEntity(),isWooSeoActive:t.getIsWooSeoActive()}}),[]),a=(0,w.useMemo)((()=>!e.wooCommerceSubscription&&i),[e.wooCommerceSubscription]),l=(0,w.useMemo)((()=>{const t=[];return!s&&!i||e.premiumSubscription||t.push("Yoast SEO Premium"),a&&n&&t.push("Yoast WooCommerce SEO"),t}),[s,e.premiumSubscription,a,n,i]);return l.length>0?(0,C.jsx)(ri,{invalidSubscriptions:l}):t?r===Co.error?(0,C.jsx)(ci,{...o}):void 0:(0,C.jsx)(ti,{})};di.propTypes={currentSubscriptions:j().object.isRequired,isSeoAnalysisActive:j().bool};const ui=({onStartGenerating:e})=>{const{termsOfServiceLink:t,privacyPolicyLink:s,learnMoreLink:r,imageLink:o,consentEndpoint:i}=(0,he.useSelect)((e=>({termsOfServiceLink:e(go).selectLink("https://yoa.st/ai-generator-terms-of-service"),privacyPolicyLink:e(go).selectLink("https://yoa.st/ai-generator-privacy-policy"),learnMoreLink:e(go).selectLink("https://yoa.st/ai-generator-learn-more"),imageLink:e(go).selectImageLink("ai-consent.png"),consentEndpoint:e(yo).selectAiGeneratorConsentEndpoint()})),[]),{storeAiGeneratorConsent:n}=(0,he.useDispatch)(yo),a=(0,w.useCallback)((async()=>{await n(!0,i),e()}),[n,e,i]);return(0,C.jsx)(mo,{termsOfServiceLink:t,privacyPolicyLink:s,learnMoreLink:r,imageLink:o,onGiveConsent:a})};ui.propTypes={onStartGenerating:j().func.isRequired};const pi=ke.forwardRef((function(e,t){return ke.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),ke.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"}))})),hi=/(?<start><\/badge>|^(?!<badge>))(?<wrap>[\s\S]+?)(?<end><badge>|$)/g,mi=({total:e,current:t,onNavigate:s,disabled:r=!1,...o})=>(0,C.jsxs)("div",{className:"yst-flex yst-justify-between yst-gap-x-2 yst-items-start",children:[(0,C.jsx)("p",{className:"yst-text-slate-500 yst-text-xxs yst-mt-1",children:(0,d.__)("Text generated by AI may be offensive or inaccurate.","wordpress-seo")}),e>1&&(0,C.jsx)(ve.Pagination,{className:"yst-shrink-0",current:t,total:e,onNavigate:s,disabled:r,variant:"text"
/* translators: Hidden accessibility text. */,screenReaderTextPrevious:(0,d.__)("Previous","wordpress-seo")
/* translators: Hidden accessibility text. */,screenReaderTextNext:(0,d.__)("Next","wordpress-seo"),...o})]}),yi=({height:e})=>{const[t,s]=(0,w.useState)(""),{onClose:r}=(0,ve.useModalContext)(),{editType:o,previewType:i,contentType:n}=Bo(),a=(()=>{const{editType:e,previewType:t}=Bo();let s="SEO";switch(t){case xo:s="social";break;case wo:s="X"}switch(e){case bo:return(0,d.sprintf)(/* translators: %s is the type of title. */
(0,d.__)("Generated %s titles","wordpress-seo"),s);case vo:return t===fo&&(s="meta"),(0,d.sprintf)(/* translators: %s is the type of description. */
(0,d.__)("Generated %s descriptions","wordpress-seo"),s)}})(),c=(()=>{const{editType:e,previewType:t}=Bo();let s="SEO";switch(t){case xo:s="social";break;case wo:s="X"}switch(e){case bo:return(0,d.sprintf)(/* translators: %s is the type of title. */
(0,d.__)("Apply %s title","wordpress-seo"),s);case vo:return t===fo&&(s="meta"),(0,d.sprintf)(/* translators: %s is the type of description. */
(0,d.__)("Apply %s description","wordpress-seo"),s)}})(),p=Do(),{suggestions:h,fetchSuggestions:m,setSelectedSuggestion:y}=(()=>{const[e,t]=(0,w.useReducer)(Ho.reducer,Ho.getInitialState()),{editType:s,previewType:r,postType:o,contentType:i}=Bo(),n=(0,he.useSelect)((e=>e(yo).selectPromptContent()),[]),{contentLocale:a,focusKeyphrase:l,isWooCommerceActive:c,isGutenberg:d,isElementor:p}=(0,he.useSelect)((e=>({contentLocale:e(go).getContentLocale(),focusKeyphrase:e(go).getFocusKeyphrase(),isWooCommerceActive:e(go).getIsWooCommerceActive(),isGutenberg:e(go).getIsBlockEditor(),isElementor:e(go).getIsElementorEditor()})),[]);let h,m=u.languageProcessing.helpers.processExactMatchRequest(l).keyphrase;m.length>191&&(m=m.slice(0,191)),h=p?"elementor":d?"gutenberg":"classic";const y=((e,t,s,r)=>{const o=e===vo?"meta-description":"seo-title";let i=((e,t)=>{if(e)switch(t){case"product":return"product-";case"product_cat":case"product_tag":return"product-taxonomy-"}return""})(t,s);return i&&t||r!==jo||(i="taxonomy-"),`${i}${o}`})(s,c,o,i);return{suggestions:e,fetchSuggestions:(0,w.useCallback)((async(e=!0)=>{t(Ho.actions.setLoading());const{status:s,payload:o}=await Ao({endpoint:"yoast/v1/ai_generator/get_suggestions/",canAbort:e,data:{type:y,prompt_content:n,focus_keyphrase:m,platform:Ko(r),language:Po(a).replace("_","-"),editor:h}});switch(s){case Io:break;case Lo:t(Ho.actions.setError(o));break;case Eo:t(Ho.actions.setSuccess(o))}return s}),[t]),setSelectedSuggestion:(0,w.useCallback)((e=>t(Ho.actions.setSelected(e))),[t])}})(),g=(()=>{const{previewType:e}=Bo();switch(e){case xo:return ki;case wo:return Cn;default:return gi}})(),{addAppliedSuggestion:f,addUsageCount:x}=(0,he.useDispatch)(yo),{isUsageCountLimitReached:b,isWooProductEntity:v,hasValidPremiumSubscription:k,hasValidWooSubscription:j}=(0,he.useSelect)((e=>{const t=e(yo),s=e(go);return{isUsageCountLimitReached:t.isUsageCountLimitReached(),isPremium:s.getIsPremium(),isWooProductEntity:s.getIsWooProductEntity(),isWooSeoActive:s.getIsWooSeoActive(),hasValidPremiumSubscription:t.selectPremiumSubscription(),hasValidWooSubscription:t.selectWooCommerceSubscription()}}),[]),_=(0,w.useMemo)((()=>h.status===Co.loading||!(j||!b||!v)||!(k||!b)),[k,b,h.status,v,j]),S=(0,ve.usePrevious)(e),R=h.status===Co.success?e:S,E=`calc(${0===R?"50%":R/2+"px"} - 40vh)`,[L,I]=(0,w.useState)(!1),T=(0,w.useCallback)((e=>{I(e.target.offsetHeight!==e.target.scrollHeight)}),[I]),N=Wo(T),M=(()=>{const{editType:e,previewType:t,contentType:s}=Bo(),r=(()=>{const{previewType:e}=Bo();return(0,w.useMemo)((()=>{switch(e){case fo:return()=>(0,he.select)(go).getSnippetEditorData().title;case xo:return(0,he.select)(go).getFacebookTitleOrFallback;case wo:return(0,he.select)(go).getTwitterTitleOrFallback;default:return(0,l.constant)("")}}),[e])})(),o=(0,he.useSelect)((s=>s(yo).selectAppliedSuggestionFor({editType:e,previewType:t})),[e,t]);return(0,w.useMemo)((()=>{let t=r();return e===vo?t:(o&&(t=t.replace(o,So[s])),((e,t)=>e.includes(So[t])?e:So[t])(t,s))}),[e,r])})(),P=(()=>{const e=(()=>{const{previewType:e}=Bo();return(0,w.useMemo)((()=>{switch(e){case fo:return()=>(0,he.select)(go).getSnippetEditorData().description;case xo:return(0,he.select)(go).getFacebookDescriptionOrFallback;case wo:return(0,he.select)(go).getTwitterDescriptionOrFallback;default:return(0,l.constant)("")}}),[e])})();return(0,w.useMemo)(e,[e])})(),A=(()=>{const e=(0,he.useSelect)((e=>e(go).getReplaceVars()),[]),t=(0,w.useMemo)((()=>e.map(qo)),[e]);return(0,w.useCallback)(((e,{key:s="value",overrides:r={},applyPluggable:o=!0,editType:i=bo,contentType:n=ko}={})=>{for(const o of t)e=e.replace(new RegExp("%%"+(0,l.escapeRegExp)(o.name)+"%%","g"),(0,l.get)(r,o.name,o[s]));return n===jo&&(e=e.replace(" Archives","")),o?((e,t=bo)=>{const s=Xs({title:"",description:"",[t]:u.languageProcessing.stripSpaces(e)});return(0,l.get)(s,t,e)})(e,i):e}),[t])})(),O=(0,w.useMemo)((()=>o===bo?{[_o[n]]:h.selected}:{}),[o,n,h.selected]),q=(0,w.useMemo)((()=>A(M,{overrides:O,contentType:n})),[A,M,o,n,h.selected]),F=(0,w.useMemo)((()=>A(M,{overrides:{...O,sep:"",sitename:""},contentType:n})),[A,M,o,n,h.selected]),$=(0,w.useMemo)((()=>o===vo?h.selected:A(P,{editType:vo})),[A,P,o,h.selected]),B=(0,w.useCallback)((e=>A(M,{overrides:{[_o[n]]:e},key:"badge",applyPluggable:!1,contentType:n})),[A,M,n]),{currentPage:D,setCurrentPage:W,isOnLastPage:U,totalPages:H,getItemsOnCurrentPage:K}=(({totalItems:e=0,perPage:t=5})=>{const[s,r]=(0,w.useState)(1),o=(0,w.useMemo)((()=>Math.ceil(e/t)),[e,t]),i=(0,w.useMemo)((()=>s*t),[s,t]),n=(0,w.useMemo)((()=>i-t),[i,t]),a=(0,w.useMemo)((()=>1===s),[s]),c=(0,w.useMemo)((()=>s===o),[s,o]),d=(0,w.useCallback)((()=>{s>1&&r(s-1)}),[s,r]),u=(0,w.useCallback)((()=>{s<o&&r(s+1)}),[s,r,o]),p=(0,w.useCallback)((e=>(0,l.slice)(e,n,i)),[n,i]);return{currentPage:s,setCurrentPage:r,totalPages:o,isOnFirstPage:a,isOnLastPage:c,previousPage:d,nextPage:u,firstOnPage:n,lastOnPage:i,getItemsOnCurrentPage:p}})({totalItems:h.status===Co.loading||h.status===Co.error?h.entities.length+5:h.entities.length,perPage:5}),z=(0,w.useMemo)((()=>(0,l.map)(K(h.entities),(e=>{let t=e;return o===bo&&(t=B(e),t=t.replace(hi,((e,t,s,r,o,i,{start:n,wrap:a,end:l})=>{const c=a.trim();return 0===c.length?`${n}${a}${l}`:`${n}<span>${c}</span>${l}`})),t=Re(t,{badge:(0,C.jsx)(ve.Badge,{className:"yst-me-2 last:yst-me-0",variant:"plain",children:" "}),span:(0,C.jsx)("span",{className:"yst-flex yst-items-center yst-me-2 last:yst-me-0"})})),{value:e,label:t}}))),[h.entities,K,o,B]),Y=(0,w.useMemo)((()=>h.status!==Co.error||h.status===Co.error&&!U),[h.status,U]),V=(0,w.useMemo)((()=>h.status===Co.loading&&U),[h.status,U]),G=(0,w.useMemo)((()=>h.status===Co.error&&U),[h.status,U]),Z=(0,w.useCallback)((()=>{_||(W(h.status===Co.error?H:H+1),m().then((e=>{e===Eo&&x()})))}),[m,h.status,H,W,y,b]),Q=(0,w.useCallback)((()=>s("")),[s]),X=(()=>{const{editType:e}=Bo();switch(e){case bo:return(()=>{const{previewType:e}=Bo(),{updateData:t,setFacebookPreviewTitle:s,setTwitterPreviewTitle:r}=(0,he.useDispatch)(go);return(0,w.useMemo)((()=>{switch(e){case fo:return e=>t({title:e});case xo:return s;case wo:return r;default:return l.noop}}),[e,t,s,r])})();case vo:return(()=>{const{previewType:e}=Bo(),{updateData:t,setFacebookPreviewDescription:s,setTwitterPreviewDescription:r}=(0,he.useDispatch)(go);return(0,w.useMemo)((()=>{switch(e){case fo:return e=>t({description:e});case xo:return s;case wo:return r;default:return l.noop}}),[e,t,s,r])})();default:return l.noop}})(),J=(0,w.useCallback)((()=>{const e=o===bo?M.replace(new RegExp(So[n]+"( Archives)?"),h.selected):h.selected;X(e),f({editType:o,previewType:i,suggestion:h.selected}),r()}),[X,o,i,h.selected,M,r,f]);return((e,t=[])=>{const s=(0,w.useRef)(!1);(0,w.useEffect)((()=>{s.current||(s.current=!0,e().finally((()=>{s.current=!1})))}),[e,t])})((()=>""===t?m().then((e=>{s(e),e===Eo&&x()})):Promise.resolve()),[t,x,m]),t===Lo||h.status===Co.error&&402===h.error.code?(0,C.jsx)("div",{className:"yst-flex yst-flex-col yst-space-y-6 yst-mt-6",children:(0,C.jsx)(xn,{errorCode:h.error.code,errorIdentifier:h.error.errorIdentifier,invalidSubscriptions:h.error.missingLicenses,showActions:!0,onRetry:Q,errorMessage:h.error.message})}):(0,C.jsxs)(w.Fragment,{children:[(0,C.jsxs)(ve.Modal.Container.Content,{ref:N,className:"yst-flex yst-flex-col yst-py-6 yst-space-y-2",children:[(0,C.jsx)(g,{title:q,description:$,status:h.status,titleForLength:F,showPreviewSkeleton:""===t,showLengthProgress:!V}),Y&&(V?(0,C.jsx)(jn,{idSuffix:p,suggestionClassNames:o===bo?[["yst-h-3 yst-w-9/12"],["yst-h-3 yst-w-7/12"],["yst-h-3 yst-w-10/12"],["yst-h-3 yst-w-11/12"],["yst-h-3 yst-w-8/12"]]:void 0}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)("div",{className:"yst-flex yst-space-y-4",children:[(0,C.jsx)(ve.Label,{as:"span",className:"yst-flex-grow yst-cursor-default yst-mt-auto",children:a}),(0,C.jsxs)(ve.Button,{variant:"secondary",size:"small",onClick:h.status===Co.loading?l.noop:Z,isLoading:h.status===Co.loading,disabled:_,children:[h.status!==Co.loading&&(0,C.jsx)(pi,{className:"yst--ms-1 yst-me-2 yst-h-4 yst-w-4 yst-text-gray-400"}),(0,d.__)("Generate 5 more","wordpress-seo")]})]}),(0,C.jsx)(vn,{idSuffix:p,suggestions:z,selected:h.selected,onChange:y}),(0,C.jsx)(mi,{current:D,total:H,onNavigate:W,disabled:h.status===Co.loading||G})]})),h.status===Co.error&&U&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("div",{className:"yst-mt-8"}),(0,C.jsx)(xn,{errorCode:h.error.code,errorIdentifier:h.error.errorIdentifier,invalidSubscriptions:h.error.missingLicenses,errorMessage:h.error.message}),(0,C.jsx)(mi,{current:D,total:H,onNavigate:W,disabled:h.status===Co.loading})]})]}),(0,C.jsxs)(ve.Modal.Container.Footer,{children:[L&&(0,C.jsx)("div",{className:"yst-absolute yst-inset-x-0 yst--mt-10 yst-me-[calc(2.5rem-1px)] yst-h-10 yst-pointer-events-none yst-bg-gradient-to-t yst-from-slate-50"}),(0,C.jsx)("hr",{className:"yst-mb-6 yst--mx-6"}),(0,C.jsxs)("div",{className:"sm:yst-flex sm:yst-justify-end sm:yst-space-x-2 sm:rtl:yst-space-x-reverse",children:[(0,C.jsx)("div",{className:"yst-hidden sm:yst-inline",children:(0,C.jsx)(ve.Button,{variant:"secondary",onClick:r,children:(0,d.__)("Close","wordpress-seo")})}),(0,C.jsx)("div",{className:"yst-block sm:yst-inline",children:(0,C.jsxs)(ve.Button,{className:"yst-w-full sm:yst-w-auto",variant:"primary",onClick:J,disabled:""===h.selected||h.status===Co.loading||G,children:[(0,C.jsx)(Te,{className:"yst--ms-1 yst-me-1 yst-h-4 yst-w-4 yst-text-white"}),c]})}),(0,C.jsx)("div",{className:"yst-mt-3 sm:yst-hidden",children:(0,C.jsx)(ve.Button,{variant:"secondary",onClick:r,className:"yst-w-full sm:yst-w-auto",children:(0,d.__)("Close","wordpress-seo")})})]})]}),(0,C.jsxs)(ve.Notifications,{className:"yst-mx-[calc(50%-50vw)] yst-transition-all",style:{marginTop:E},position:"bottom-left",children:[h.status!==Co.loading&&(0,C.jsx)(Pn,{className:"yst-mx-[calc(50%-50vw)] yst-transition-all"}),(h.status===Co.success||h.status===Co.loading)&&(0,C.jsx)(Rn,{})]})]})};yi.propTypes={height:j().number.isRequired};j().func.isRequired;const gi=({title:e,description:t,status:s,titleForLength:r,showPreviewSkeleton:o,showLengthProgress:i})=>{const n=(0,he.useSelect)((e=>e(go).getSnippetEditorMode()),[]),[a,l]=(0,w.useState)(n),{editType:c}=Bo(),u=Do(),p=(({editType:e,title:t,description:s})=>{const r=(0,he.useSelect)((e=>e(go).getDateFromSettings()),[]),o=(0,he.useSelect)((e=>e(go).getContentLocale()),[]),i=(0,he.useSelect)((e=>e(go).isCornerstoneContent()),[]),n=(0,he.useSelect)((e=>e(go).getIsTerm()),[]);return(0,w.useMemo)((()=>e===vo?(0,zo.getDescriptionProgress)(s,r,i,n,o):(0,zo.getTitleProgress)(t)),[e,t,s,r,i,n,o])})({editType:c,title:r,description:t});return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)("div",{className:"yst-mb-2 lg:yst-flex",children:[(0,C.jsx)(ve.Label,{as:"span",className:"yst-flex-grow yst-cursor-default",children:(0,d.__)("Google preview","wordpress-seo")}),(0,C.jsx)(vi,{mode:a,idSuffix:u,onChange:l,disabled:s===Co.loading})]}),o?(0,C.jsx)(wi,{}):(0,C.jsx)(xi,{mode:a,title:e,description:t}),(0,C.jsxs)("div",{className:"yst-pt-4",children:[(0,C.jsx)(ve.Label,{as:"span",className:"yst-flex-grow yst-cursor-default",children:c===bo?(0,d.__)("SEO title width","wordpress-seo"):(0,d.__)("Meta description length","wordpress-seo")}),(0,C.jsx)(bi,{className:"yst-mt-2",progress:i?p.actual:0,min:0,max:p.max,score:p.score})]})]})};gi.propTypes={title:j().string.isRequired,description:j().string.isRequired,status:j().oneOf(Object.keys(Co)).isRequired,titleForLength:j().string.isRequired,showPreviewSkeleton:j().bool.isRequired,showLengthProgress:j().bool.isRequired};const fi=/mobi/i,xi=({mode:e,title:t,description:s})=>{var r,o;const i=(0,he.useSelect)((e=>e(go).getBaseUrlFromSettings()),[]),n=(0,he.useSelect)((e=>e(go).getSnippetEditorData().slug||""),[]),a=(0,he.useSelect)((e=>e(go).getDateFromSettings()),[]),c=(0,he.useSelect)((e=>e(go).getFocusKeyphrase()),[]),d=(0,he.useSelect)((e=>e(go).getSnippetEditorPreviewImageUrl()),[]),u=(0,he.useSelect)((e=>e(go).getSiteIconUrlFromSettings()),[]),p=(0,he.useSelect)((e=>e(go).getShoppingData()),[]),h=(0,he.useSelect)((e=>e(go).getSnippetEditorWordsToHighlight()),[]),m=(0,he.useSelect)((e=>e(go).getSiteName()),[]),y=(0,he.useSelect)((e=>e(go).getContentLocale()),[]),g=(0,w.useMemo)((()=>i+n),[i,n]),f=(0,w.useMemo)((()=>{var e,t;return fi.test(null===(e=window)||void 0===e||null===(t=e.navigator)||void 0===t?void 0:t.userAgent)}),[null===(r=window)||void 0===r||null===(o=r.navigator)||void 0===o?void 0:o.userAgent]);return(0,C.jsx)("div",{className:`yst-bg-slate-200 yst--mx-6 ${e}${f?" yst-user-agent__mobile":""}`,children:(0,C.jsx)(zo.SnippetPreview,{title:t,description:s,mode:e,url:g,keyword:c,date:a,faviconSrc:u,mobileImageSrc:d,wordsToHighlight:h,siteName:m,locale:y,shoppingData:p,onMouseUp:l.noop})})};xi.propTypes={mode:j().oneOf(Object.keys(Ro)).isRequired,title:j().string.isRequired,description:j().string.isRequired};const wi=()=>(0,C.jsxs)("div",{className:"yst-max-w-[400px] yst-py-4 yst-px-3 yst-border yst-rounded-lg yst-w-full yst-mx-auto",children:[(0,C.jsxs)("div",{className:"yst-flex yst-gap-x-3",children:[(0,C.jsx)(ve.SkeletonLoader,{className:"yst-flex-shrink-0 yst-h-7 yst-w-7 yst-rounded-full"}),(0,C.jsxs)("div",{className:"yst-flex yst-flex-col yst-w-full yst-gap-y-1",children:[(0,C.jsx)(ve.SkeletonLoader,{className:"yst-h-3 yst-w-1/3"}),(0,C.jsx)(ve.SkeletonLoader,{className:"yst-h-2.5 yst-w-10/12"})]})]}),(0,C.jsx)(ve.SkeletonLoader,{className:"yst-h-4 yst-w-full yst-mt-6 yst-mb-4"}),(0,C.jsx)(ve.SkeletonLoader,{className:"yst-h-3 yst-w-full"}),(0,C.jsx)(ve.SkeletonLoader,{className:"yst-h-3 yst-w-10/12 yst-mt-2.5"})]}),bi=({className:e="",progress:t,max:s,score:r})=>{const o=(0,w.useMemo)((()=>(e=>e>=7?"yst-score-good":e>=5?"yst-score-ok":"yst-score-bad")(r)),[r]);return(0,C.jsx)(ve.ProgressBar,{className:Ae()("yst-length-progress-bar",o,e),progress:t,min:0,max:s})};bi.propTypes={className:j().string,progress:j().number.isRequired,max:j().number.isRequired,score:j().number.isRequired};const vi=({idSuffix:e,mode:t,onChange:s,disabled:r})=>{const o=(0,w.useCallback)((({target:e})=>e.checked&&s(e.value)),[s]);return(0,C.jsxs)(ve.RadioGroup,{id:`yst-ai-mode__${e}`,className:"yst-ai-mode yst-pt-2 lg:yst-pt-0",disabled:r,children:[(0,C.jsx)(ve.RadioGroup.Radio,{id:`yst-ai-mode__mobile__${e}`,name:`yst-ai-mode__${e}`,label:(0,d.__)("Mobile result","wordpress-seo"),value:Ro.mobile,checked:t===Ro.mobile,onChange:o,disabled:r}),(0,C.jsx)(ve.RadioGroup.Radio,{id:`yst-ai-mode__desktop__${e}`,name:`yst-ai-mode__${e}`,label:(0,d.__)("Desktop result","wordpress-seo"),value:Ro.desktop,checked:t===Ro.desktop,onChange:o,disabled:r})]})};vi.propTypes={idSuffix:j().string.isRequired,mode:j().oneOf(Object.keys(Ro)).isRequired,onChange:j().func.isRequired,disabled:j().bool.isRequired};const ki=({title:e,description:t,showPreviewSkeleton:s})=>(0,C.jsxs)("div",{children:[(0,C.jsx)("div",{className:"yst-flex yst-mb-6",children:(0,C.jsx)(ve.Label,{as:"span",className:"yst-flex-grow yst-cursor-default",children:(0,d.__)("Social preview","wordpress-seo")})}),s?(0,C.jsx)(gn,{}):(0,C.jsx)(yn,{title:e,description:t})]});ki.propTypes={title:j().string.isRequired,description:j().string.isRequired,showPreviewSkeleton:j().bool.isRequired};const ji=v().p`
	color: #606770;
	flex-shrink: 0;
	font-size: 12px;
	line-height: 16px;
	overflow: hidden;
	padding: 0;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
	margin: 0;
	position: ${e=>"landscape"===e.mode?"relative":"static"};
`,_i=e=>{const{siteUrl:t}=e;return(0,C.jsxs)(ke.Fragment,{children:[(0,C.jsx)("span",{className:"screen-reader-text",children:t}),(0,C.jsx)(ji,{"aria-hidden":"true",children:(0,C.jsx)("span",{children:t})})]})};_i.propTypes={siteUrl:j().string.isRequired};const Si=_i,Ri=v().img`
	&& {
		max-width: ${e=>e.width}px;
		height: ${e=>e.height}px;
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		max-width: none;
	}
`,Ci=v().img`
	&& {
		height: 100%;
		position: absolute;
		width: 100%;
		object-fit: cover;
	}
`,Ei=v().div`
	padding-bottom: ${e=>e.aspectRatio}%;
`,Li=({imageProps:e,width:t,height:s,imageMode:r="landscape"})=>"landscape"===r?(0,C.jsx)(Ei,{aspectRatio:e.aspectRatio,children:(0,C.jsx)(Ci,{src:e.src,alt:e.alt})}):(0,C.jsx)(Ri,{src:e.src,alt:e.alt,width:t,height:s,imageProperties:e});function Ii(e,t,s){return"landscape"===s?{widthRatio:t.width/e.landscapeWidth,heightRatio:t.height/e.landscapeHeight}:"portrait"===s?{widthRatio:t.width/e.portraitWidth,heightRatio:t.height/e.portraitHeight}:{widthRatio:t.width/e.squareWidth,heightRatio:t.height/e.squareHeight}}function Ti(e,t){return t.widthRatio<=t.heightRatio?{width:Math.round(e.width/t.widthRatio),height:Math.round(e.height/t.widthRatio)}:{width:Math.round(e.width/t.heightRatio),height:Math.round(e.height/t.heightRatio)}}async function Ni(e,t,s=!1){const r=await function(e){return new Promise(((t,s)=>{const r=new Image;r.onload=()=>{t({width:r.width,height:r.height})},r.onerror=s,r.src=e}))}(e);let o=s?"landscape":"square";"Facebook"===t&&(o=(0,X.determineFacebookImageMode)(r));const i=function(e){return"Twitter"===e?X.TWITTER_IMAGE_SIZES:X.FACEBOOK_IMAGE_SIZES}(t),n=function(e,t,s){return"square"===s&&t.width===t.height?{width:e.squareWidth,height:e.squareHeight}:Ti(t,Ii(e,t,s))}(i,r,o);return{mode:o,height:n.height,width:n.width}}async function Mi(e,t,s=!1){try{return{imageProperties:await Ni(e,t,s),status:"loaded"}}catch(e){return{imageProperties:null,status:"errored"}}}Li.propTypes={imageProps:j().shape({src:j().string.isRequired,alt:j().string.isRequired,aspectRatio:j().number.isRequired}).isRequired,width:j().number.isRequired,height:j().number.isRequired,imageMode:j().string};const Pi=v().div`
	position: relative;
	${e=>"landscape"===e.mode?`max-width: ${e.dimensions.width}`:`min-width: ${e.dimensions.width}; height: ${e.dimensions.height}`};
	overflow: hidden;
	background-color: ${R.colors.$color_white};
`,Ai=v().div`
	box-sizing: border-box;
	max-width: ${X.FACEBOOK_IMAGE_SIZES.landscapeWidth}px;
	height: ${X.FACEBOOK_IMAGE_SIZES.landscapeHeight}px;
	background-color: ${R.colors.$color_grey};
	border-style: dashed;
	border-width: 1px;
	// We're not using standard colors to increase contrast for accessibility.
	color: #006DAC;
	// We're not using standard colors to increase contrast for accessibility.
	background-color: #f1f1f1;
	display: flex;
	justify-content: center;
	align-items: center;
	text-decoration: underline;
	font-size: 14px;
	cursor: pointer;
`;class Oi extends ke.Component{constructor(e){super(e),this.state={imageProperties:null,status:"loading"},this.socialMedium="Facebook",this.handleFacebookImage=this.handleFacebookImage.bind(this),this.setState=this.setState.bind(this)}async handleFacebookImage(){try{const e=await Mi(this.props.src,this.socialMedium);this.setState(e),this.props.onImageLoaded(e.imageProperties.mode||"landscape")}catch(e){this.setState(e),this.props.onImageLoaded("landscape")}}componentDidUpdate(e){e.src!==this.props.src&&this.handleFacebookImage()}componentDidMount(){this.handleFacebookImage()}retrieveContainerDimensions(e){switch(e){case"square":return{height:X.FACEBOOK_IMAGE_SIZES.squareHeight+"px",width:X.FACEBOOK_IMAGE_SIZES.squareWidth+"px"};case"portrait":return{height:X.FACEBOOK_IMAGE_SIZES.portraitHeight+"px",width:X.FACEBOOK_IMAGE_SIZES.portraitWidth+"px"};case"landscape":return{height:X.FACEBOOK_IMAGE_SIZES.landscapeHeight+"px",width:X.FACEBOOK_IMAGE_SIZES.landscapeWidth+"px"}}}render(){const{imageProperties:e,status:t}=this.state;if("loading"===t||""===this.props.src||"errored"===t)return(0,C.jsx)(Ai,{onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,children:(0,d.__)("Select image","wordpress-seo")});const s=this.retrieveContainerDimensions(e.mode);return(0,C.jsx)(Pi,{mode:e.mode,dimensions:s,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,onClick:this.props.onImageClick,children:(0,C.jsx)(Li,{imageProps:{src:this.props.src,alt:this.props.alt,aspectRatio:X.FACEBOOK_IMAGE_SIZES.aspectRatio},width:e.width,height:e.height,imageMode:e.mode})})}}Oi.propTypes={src:j().string,alt:j().string,onImageLoaded:j().func,onImageClick:j().func,onMouseEnter:j().func,onMouseLeave:j().func},Oi.defaultProps={src:"",alt:"",onImageLoaded:l.noop,onImageClick:l.noop,onMouseEnter:l.noop,onMouseLeave:l.noop};const qi=Oi,Fi=v().span`
	line-height: ${20}px;
	min-height : ${20}px;
	color: #1d2129;
	font-weight: 600;
	overflow: hidden;
	font-size: 16px;
	margin: 3px 0 0;
	letter-spacing: normal;
	white-space: normal;
	flex-shrink: 0;
	cursor: pointer;
	display: -webkit-box;
	-webkit-line-clamp: ${e=>e.lineCount};
	-webkit-box-orient: vertical;
	overflow: hidden;
`,$i=v().p`
	line-height: ${16}px;
	min-height : ${16}px;
	color: #606770;
	font-size: 14px;
	padding: 0;
	text-overflow: ellipsis;
	margin: 3px 0 0 0;
	display: -webkit-box;
	cursor: pointer;
	-webkit-line-clamp: ${e=>e.lineCount};
	-webkit-box-orient: vertical;
	overflow: hidden;

	@media all and ( max-width: ${e=>e.maxWidth} ) {
		display: none;
	}
`,Bi=e=>{switch(e){case"landscape":return"527px";case"square":case"portrait":return"369px";default:return"476px"}},Di=v().div`
	box-sizing: border-box;
	display: flex;
	flex-direction: ${e=>"landscape"===e.mode?"column":"row"};
	background-color: #f2f3f5;
	max-width: 527px;
`,Wi=v().div`
	box-sizing: border-box;
	background-color: #f2f3f5;
	margin: 0;
	padding: 10px 12px;
	position: relative;
	border-bottom: ${e=>"landscape"===e.mode?"":"1px solid #dddfe2"};
	border-top: ${e=>"landscape"===e.mode?"":"1px solid #dddfe2"};
	border-right: ${e=>"landscape"===e.mode?"":"1px solid #dddfe2"};
	border: ${e=>"landscape"===e.mode?"1px solid #dddfe2":""};
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	justify-content: ${e=>"landscape"===e.mode?"flex-start":"center"};
	font-size: 12px;
	overflow: hidden;
`;class Ui extends ke.Component{constructor(e){super(e),this.state={imageMode:null,maxLineCount:0,descriptionLineCount:0},this.facebookTitleRef=je().createRef(),this.onImageLoaded=this.onImageLoaded.bind(this),this.onImageEnter=this.props.onMouseHover.bind(this,"image"),this.onTitleEnter=this.props.onMouseHover.bind(this,"title"),this.onDescriptionEnter=this.props.onMouseHover.bind(this,"description"),this.onLeave=this.props.onMouseHover.bind(this,""),this.onSelectTitle=this.props.onSelect.bind(this,"title"),this.onSelectDescription=this.props.onSelect.bind(this,"description")}onImageLoaded(e){this.setState({imageMode:e})}getTitleLineCount(){return this.facebookTitleRef.current.offsetHeight/20}maybeSetMaxLineCount(){const{imageMode:e,maxLineCount:t}=this.state,s="landscape"===e?2:5;s!==t&&this.setState({maxLineCount:s})}maybeSetDescriptionLineCount(){const{descriptionLineCount:e,maxLineCount:t,imageMode:s}=this.state,r=this.getTitleLineCount();let o=t-r;"portrait"===s&&(o=5===r?0:4),o!==e&&this.setState({descriptionLineCount:o})}componentDidUpdate(){this.maybeSetMaxLineCount(),this.maybeSetDescriptionLineCount()}render(){const{imageMode:e,maxLineCount:t,descriptionLineCount:s}=this.state;return(0,C.jsxs)(Di,{id:"facebookPreview",mode:e,children:[(0,C.jsx)(qi,{src:this.props.imageUrl||this.props.imageFallbackUrl,alt:this.props.alt,onImageLoaded:this.onImageLoaded,onImageClick:this.props.onImageClick,onMouseEnter:this.onImageEnter,onMouseLeave:this.onLeave}),(0,C.jsxs)(Wi,{mode:e,children:[(0,C.jsx)(Si,{siteUrl:this.props.siteUrl,mode:e}),(0,C.jsx)(Fi,{ref:this.facebookTitleRef,onMouseEnter:this.onTitleEnter,onMouseLeave:this.onLeave,onClick:this.onSelectTitle,lineCount:t,children:this.props.title}),s>0&&(0,C.jsx)($i,{maxWidth:Bi(e),onMouseEnter:this.onDescriptionEnter,onMouseLeave:this.onLeave,onClick:this.onSelectDescription,lineCount:s,children:this.props.description})]})]})}}Ui.propTypes={siteUrl:j().string.isRequired,title:j().string.isRequired,description:j().string,imageUrl:j().string,imageFallbackUrl:j().string,alt:j().string,onSelect:j().func,onImageClick:j().func,onMouseHover:j().func},Ui.defaultProps={description:"",alt:"",imageUrl:"",imageFallbackUrl:"",onSelect:()=>{},onImageClick:()=>{},onMouseHover:()=>{}};const Hi=Ui,Ki=v().div`
	text-transform: lowercase;
	color: rgb(83, 100, 113);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin: 0;
	fill: currentcolor;
	display: flex;
	flex-direction: row;
	align-items: flex-end;
`,zi=e=>(0,C.jsx)(Ki,{children:(0,C.jsx)("span",{children:e.siteUrl})});zi.propTypes={siteUrl:j().string.isRequired};const Yi=zi,Vi=(e,t=!0)=>e?`\n\t\t\tmax-width: ${X.TWITTER_IMAGE_SIZES.landscapeWidth}px;\n\t\t\t${t?"border-bottom: 1px solid #E1E8ED;":""}\n\t\t\tborder-radius: 14px 14px 0 0;\n\t\t\t`:`\n\t\twidth: ${X.TWITTER_IMAGE_SIZES.squareWidth}px;\n\t\t${t?"border-right: 1px solid #E1E8ED;":""}\n\t\tborder-radius: 14px 0 0 14px;\n\t\t`,Gi=v().div`
	position: relative;
	box-sizing: content-box;
	overflow: hidden;
	background-color: #e1e8ed;
	flex-shrink: 0;
	${e=>Vi(e.isLarge)}
`,Zi=v().div`
	display: flex;
	justify-content: center;
	align-items: center;
	box-sizing: border-box;
	max-width: 100%;
	margin: 0;
	padding: 1em;
	text-align: center;
	font-size: 1rem;
	${e=>Vi(e.isLarge,!1)}
`,Qi=v()(Zi)`
	${e=>e.isLarge&&`height: ${X.TWITTER_IMAGE_SIZES.landscapeHeight}px;`}
	border-top-left-radius: 14px;
	${e=>e.isLarge?"border-top-right-radius":"border-bottom-left-radius"}: 14px;
	border-style: dashed;
	border-width: 1px;
	// We're not using standard colors to increase contrast for accessibility.
	color: #006DAC;
	// We're not using standard colors to increase contrast for accessibility.
	background-color: #f1f1f1;
	text-decoration: underline;
	font-size: 14px;
	cursor: pointer;
`;class Xi extends je().Component{constructor(e){super(e),this.state={status:"loading"},this.socialMedium="Twitter",this.handleTwitterImage=this.handleTwitterImage.bind(this),this.setState=this.setState.bind(this)}async handleTwitterImage(){if(null===this.props.src)return;const e=await Mi(this.props.src,this.socialMedium,this.props.isLarge);this.setState(e)}componentDidUpdate(e){e.src!==this.props.src&&this.handleTwitterImage()}componentDidMount(){this.handleTwitterImage()}render(){const{status:e,imageProperties:t}=this.state;return"loading"===e||""===this.props.src||"errored"===e?(0,C.jsx)(Qi,{isLarge:this.props.isLarge,onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,children:(0,d.__)("Select image","wordpress-seo")}):(0,C.jsx)(Gi,{isLarge:this.props.isLarge,onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,children:(0,C.jsx)(Li,{imageProps:{src:this.props.src,alt:this.props.alt,aspectRatio:X.TWITTER_IMAGE_SIZES.aspectRatio},width:t.width,height:t.height,imageMode:t.mode})})}}Xi.propTypes={isLarge:j().bool.isRequired,src:j().string,alt:j().string,onImageClick:j().func,onMouseEnter:j().func,onMouseLeave:j().func},Xi.defaultProps={src:"",alt:"",onMouseEnter:l.noop,onImageClick:l.noop,onMouseLeave:l.noop};const Ji=v().div`
	display: flex;
	flex-direction: column;
	padding: 12px;
	justify-content: center;
	margin: 0;
	box-sizing: border-box;
	flex: auto;
	min-width: 0px;
	gap:2px;
	> * {
		line-height:20px;
		min-height:20px;
		font-size:15px;
    }
`,en=e=>(0,C.jsx)(Ji,{children:e.children});en.propTypes={children:j().array.isRequired};const tn=en,sn=v().p`
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin: 0;
	color: rgb(15, 20, 25);
	cursor: pointer;
`,rn=v().p`
	max-height: 55px;
	overflow: hidden;
	text-overflow: ellipsis;
	margin: 0;
	color: rgb(83, 100, 113);
	display: -webkit-box;
	cursor: pointer;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;

	@media all and ( max-width: ${X.TWITTER_IMAGE_SIZES.landscapeWidth}px ) {
		display: none;
	}
`,on=v().div`
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif;
	font-size: 15px;
	font-weight: 400;
	line-height: 20px;
	max-width: 507px;
	border: 1px solid #E1E8ED;
	box-sizing: border-box;
	border-radius: 14px;
	color: #292F33;
	background: #FFFFFF;
	text-overflow: ellipsis;
	display: flex;

	&:hover {
		background: #f5f8fa;
		border: 1px solid rgba(136,153,166,.5);
	}
`,nn=v()(on)`
	flex-direction: column;
	max-height: 370px;
`,an=v()(on)`
	flex-direction: row;
	height: 125px;
`;class ln extends ke.Component{constructor(e){super(e),this.onImageEnter=this.props.onMouseHover.bind(this,"image"),this.onTitleEnter=this.props.onMouseHover.bind(this,"title"),this.onDescriptionEnter=this.props.onMouseHover.bind(this,"description"),this.onLeave=this.props.onMouseHover.bind(this,""),this.onSelectTitle=this.props.onSelect.bind(this,"title"),this.onSelectDescription=this.props.onSelect.bind(this,"description")}render(){const{isLarge:e,imageUrl:t,imageFallbackUrl:s,alt:r,title:o,description:i,siteUrl:n}=this.props,a=e?nn:an;return(0,C.jsxs)(a,{id:"twitterPreview",children:[(0,C.jsx)(Xi,{src:t||s,alt:r,isLarge:e,onImageClick:this.props.onImageClick,onMouseEnter:this.onImageEnter,onMouseLeave:this.onLeave}),(0,C.jsxs)(tn,{children:[(0,C.jsx)(Yi,{siteUrl:n}),(0,C.jsx)(sn,{onMouseEnter:this.onTitleEnter,onMouseLeave:this.onLeave,onClick:this.onSelectTitle,children:o}),(0,C.jsx)(rn,{onMouseEnter:this.onDescriptionEnter,onMouseLeave:this.onLeave,onClick:this.onSelectDescription,children:i})]})]})}}ln.propTypes={siteUrl:j().string.isRequired,title:j().string.isRequired,description:j().string,isLarge:j().bool,imageUrl:j().string,imageFallbackUrl:j().string,alt:j().string,onSelect:j().func,onImageClick:j().func,onMouseHover:j().func},ln.defaultProps={description:"",alt:"",imageUrl:"",imageFallbackUrl:"",onSelect:()=>{},onImageClick:()=>{},onMouseHover:()=>{},isLarge:!0};const cn=ln,dn=window.yoast.replacementVariableEditor;class un extends ke.Component{constructor(e){super(e),this.state={activeField:"",hoveredField:""},this.SocialPreview="Social"===e.socialMediumName?Hi:cn,this.setHoveredField=this.setHoveredField.bind(this),this.setActiveField=this.setActiveField.bind(this),this.setEditorRef=this.setEditorRef.bind(this),this.setEditorFocus=this.setEditorFocus.bind(this)}setHoveredField(e){e!==this.state.hoveredField&&this.setState({hoveredField:e})}setActiveField(e){e!==this.state.activeField&&this.setState({activeField:e},(()=>this.setEditorFocus(e)))}setEditorFocus(e){switch(e){case"title":this.titleEditorRef.focus();break;case"description":this.descriptionEditorRef.focus()}}setEditorRef(e,t){switch(e){case"title":this.titleEditorRef=t;break;case"description":this.descriptionEditorRef=t}}render(){const{onDescriptionChange:e,onTitleChange:t,onSelectImageClick:s,onRemoveImageClick:r,socialMediumName:o,imageWarnings:i,siteUrl:n,description:a,descriptionInputPlaceholder:l,descriptionPreviewFallback:c,imageUrl:d,imageFallbackUrl:u,alt:p,title:h,titleInputPlaceholder:m,titlePreviewFallback:y,replacementVariables:g,recommendedReplacementVariables:f,applyReplacementVariables:x,onReplacementVariableSearchChange:w,isPremium:b,isLarge:v,socialPreviewLabel:k,idSuffix:j,activeMetaTabId:S}=this.props,R=x({title:h||y,description:a||c});return(0,C.jsxs)(je().Fragment,{children:[k&&(0,C.jsx)(_.SimulatedLabel,{children:k}),(0,C.jsx)(this.SocialPreview,{onMouseHover:this.setHoveredField,onSelect:this.setActiveField,onImageClick:s,siteUrl:n,title:R.title,description:R.description,imageUrl:d,imageFallbackUrl:u,alt:p,isLarge:v,activeMetaTabId:S}),(0,C.jsx)(X.SocialMetadataPreviewForm,{onDescriptionChange:e,socialMediumName:o,title:h,titleInputPlaceholder:m,onRemoveImageClick:r,imageSelected:!!d,imageUrl:d,imageFallbackUrl:u,onTitleChange:t,onSelectImageClick:s,description:a,descriptionInputPlaceholder:l,imageWarnings:i,replacementVariables:g,recommendedReplacementVariables:f,onReplacementVariableSearchChange:w,onMouseHover:this.setHoveredField,hoveredField:this.state.hoveredField,onSelect:this.setActiveField,activeField:this.state.activeField,isPremium:b,setEditorRef:this.setEditorRef,idSuffix:j})]})}}un.propTypes={title:j().string.isRequired,onTitleChange:j().func.isRequired,description:j().string.isRequired,onDescriptionChange:j().func.isRequired,imageUrl:j().string.isRequired,imageFallbackUrl:j().string.isRequired,onSelectImageClick:j().func.isRequired,onRemoveImageClick:j().func.isRequired,socialMediumName:j().string.isRequired,alt:j().string,isPremium:j().bool,imageWarnings:j().array,isLarge:j().bool,siteUrl:j().string,descriptionInputPlaceholder:j().string,titleInputPlaceholder:j().string,descriptionPreviewFallback:j().string,titlePreviewFallback:j().string,replacementVariables:dn.replacementVariablesShape,recommendedReplacementVariables:dn.recommendedReplacementVariablesShape,applyReplacementVariables:j().func,onReplacementVariableSearchChange:j().func,socialPreviewLabel:j().string,idSuffix:j().string,activeMetaTabId:j().string},un.defaultProps={imageWarnings:[],recommendedReplacementVariables:[],replacementVariables:[],isPremium:!1,isLarge:!0,siteUrl:"",descriptionInputPlaceholder:"",titleInputPlaceholder:"",descriptionPreviewFallback:"",titlePreviewFallback:"",alt:"",applyReplacementVariables:e=>e,onReplacementVariableSearchChange:null,socialPreviewLabel:"",idSuffix:"",activeMetaTabId:""};const pn={},hn=(e,t,{log:s=console.warn}={})=>{pn[e]||(pn[e]=!0,s(t))},mn=(e,t=l.noop)=>{const s={};for(const r in e)Object.hasOwn(e,r)&&Object.defineProperty(s,r,{set:s=>{e[r]=s,t("set",r,s)},get:()=>(t("get",r),e[r])});return s};mn({squareWidth:125,squareHeight:125,landscapeWidth:506,landscapeHeight:265,aspectRatio:50.2},((e,t)=>hn(`@yoast/social-metadata-previews/TWITTER_IMAGE_SIZES/${e}/${t}`,`[@yoast/social-metadata-previews] "TWITTER_IMAGE_SIZES.${t}" is deprecated and will be removed in the future, please use this from @yoast/social-metadata-forms instead.`))),mn({squareWidth:158,squareHeight:158,landscapeWidth:527,landscapeHeight:273,portraitWidth:158,portraitHeight:237,aspectRatio:52.2,largeThreshold:{width:446,height:233}},((e,t)=>hn(`@yoast/social-metadata-previews/FACEBOOK_IMAGE_SIZES/${e}/${t}`,`[@yoast/social-metadata-previews] "FACEBOOK_IMAGE_SIZES.${t}" is deprecated and will be removed in the future, please use this from @yoast/social-metadata-forms instead.`)));const yn=({title:e,description:t})=>{const s=(0,he.useSelect)((e=>e(go).getSiteUrl()),[]),r=(0,he.useSelect)((e=>e(go).getFacebookImageUrl()),[]),o=(0,he.useSelect)((e=>e(go).getEditorDataImageFallback()),[]),i=(0,he.useSelect)((e=>e(go).getFacebookAltText()),[]);return(0,C.jsx)("div",{className:"yst-bg-slate-200 yst-p-2 yst--mx-6 yst-mx-auto",children:(0,C.jsx)(Hi,{title:e,description:t,siteUrl:s,imageUrl:r,imageFallbackUrl:o,alt:i,onSelect:l.noop,onImageClick:l.noop,onMouseHover:l.noop})})};yn.propTypes={title:j().string.isRequired,description:j().string.isRequired};const gn=()=>(0,C.jsxs)("div",{className:"yst-flex yst-flex-col yst-w-[527px] yst-border yst-mx-auto",children:[(0,C.jsx)(ve.SkeletonLoader,{className:"yst-h-[273px] yst-w-full yst-rounded-none yst-border yst-border-dashed"}),(0,C.jsxs)("div",{className:"yst-w-full yst-p-4 yst-space-y-1",children:[(0,C.jsx)(ve.SkeletonLoader,{className:"yst-h-3 yst-w-1/3"}),(0,C.jsx)(ve.SkeletonLoader,{className:"yst-h-5 yst-w-10/12"}),(0,C.jsx)(ve.SkeletonLoader,{className:"yst-h-3 yst-w-full"})]})]}),fn=({children:e,onRetry:t})=>{const{onClose:s}=(0,ve.useModalContext)();return(0,C.jsxs)(w.Fragment,{children:[e,(0,C.jsxs)("div",{className:"yst-mt-6 yst-mb-1 yst-flex yst-space-x-3 rtl:yst-space-x-reverse yst-place-content-end",children:[(0,C.jsx)(ve.Button,{variant:"secondary",onClick:s,children:(0,d.__)("Close","wordpress-seo")}),(0,C.jsx)(ve.Button,{variant:"primary",onClick:t,children:(0,d.__)("Try again","wordpress-seo")})]})]})};fn.propTypes={children:j().node.isRequired,onRetry:j().func.isRequired};const xn=({errorCode:e,errorIdentifier:t,invalidSubscriptions:s=[],showActions:r=!1,onRetry:o=l.noop,errorMessage:i=""})=>{switch(e){case 400:switch(t){case"AI_CONTENT_FILTER":return(0,C.jsx)(ii,{});case"NOT_ENOUGH_CONTENT":return(0,C.jsx)(ei,{});case"SITE_UNREACHABLE":return(0,C.jsx)(li,{});case"WP_HTTP_REQUEST_ERROR":return r?(0,C.jsx)(fn,{onRetry:o,children:(0,C.jsx)(ni,{errorMessage:i})}):(0,C.jsx)(ni,{errorMessage:i});default:return r?(0,C.jsx)(fn,{onRetry:o,children:(0,C.jsx)(Jo,{})}):(0,C.jsx)(Jo,{})}case 402:return(0,C.jsx)(ri,{invalidSubscriptions:s});case 408:return r?(0,C.jsx)(fn,{onRetry:o,children:(0,C.jsx)(oi,{})}):(0,C.jsx)(oi,{});case 429:return"USAGE_LIMIT_REACHED"===t?(0,C.jsx)(ri,{invalidSubscriptions:s}):(0,C.jsx)(si,{});case 410:return(0,C.jsx)(ai,{});default:return r?(0,C.jsx)(fn,{onRetry:o,children:(0,C.jsx)(Jo,{})}):(0,C.jsx)(Jo,{})}};xn.propTypes={errorCode:j().number.isRequired,errorIdentifier:j().string.isRequired,invalidSubscriptions:j().array,showActions:j().bool,onRetry:j().func,errorMessage:j().string};const wn=j().shape({value:j().string.isRequired,label:j().node.isRequired}),bn=({id:e,name:t,suggestion:s,isChecked:r,onChange:o})=>{const i=(0,w.useCallback)((()=>o(s.value)),[s,o]);return(0,C.jsxs)("label",{htmlFor:e,className:Ae()("yst-flex yst-p-4 yst-items-center yst-border first:yst-rounded-t-md last:yst-rounded-b-md",r&&"yst-z-10 yst-border-primary-500"),children:[(0,C.jsx)("input",{type:"radio",id:e,name:t,className:"yst-radio__input",value:s.value,checked:r,onChange:i}),(0,C.jsx)("div",{className:Ae()("yst-label yst-radio__label yst-flex yst-flex-wrap yst-items-center",!r&&"yst-text-slate-600"),children:s.label})]})};bn.propTypes={id:j().string.isRequired,name:j().string.isRequired,suggestion:wn.isRequired,isChecked:j().bool.isRequired,onChange:j().func.isRequired};const vn=({idSuffix:e,suggestions:t,selected:s,onChange:r})=>(0,C.jsx)("div",{children:(0,C.jsx)(ve.RadioGroup,{className:"yst-suggestions-radio-group yst-flex yst-flex-col",id:`yst-ai-suggestions-radio-group__${e}`,children:t.map(((t,o)=>(0,C.jsx)(bn,{id:`yst-ai-suggestions-radio-${e}__${o}`,name:`ai-suggestion__${e}`,isChecked:t.value===s,onChange:r,suggestion:t},`yst-ai-suggestions-radio-${e}__${o}`)))})});vn.propTypes={idSuffix:j().string.isRequired,suggestions:j().arrayOf(wn).isRequired,selected:j().string.isRequired,onChange:j().func.isRequired};const kn=[["yst-h-3 yst-w-full","yst-mt-2.5 yst-h-3 yst-w-9/12"],["yst-h-3 yst-w-full","yst-mt-2.5 yst-h-3 yst-w-7/12"],["yst-h-3 yst-w-full","yst-mt-2.5 yst-h-3 yst-w-10/12"],["yst-h-3 yst-w-full","yst-mt-2.5 yst-h-3 yst-w-11/12"],["yst-h-3 yst-w-full","yst-mt-2.5 yst-h-3 yst-w-8/12"]],jn=({suggestionClassNames:e=kn})=>(0,C.jsx)("div",{className:"yst-flex yst-flex-col yst--space-y-[1px]",children:e.map(((e,t)=>(0,C.jsxs)("div",{className:"yst-flex yst-p-4 yst-gap-x-3 yst-items-center yst-border first:yst-rounded-t-md last:yst-rounded-b-md",children:[(0,C.jsx)("input",{type:"radio",disabled:!0,className:"yst-my-0.5"}),(0,C.jsx)("div",{className:"yst-flex yst-flex-col yst-w-full",children:e.map(((e,s)=>(0,C.jsx)(ve.SkeletonLoader,{className:e},`yst-ai-suggestion-radio-skeleton-${t}__${s}`)))})]},`yst-ai-suggestion-radio-skeleton__${t}`)))});jn.propTypes={suggestionClassNames:j().arrayOf(j().arrayOf(j().string))};const Sn="ai_generator_tip_notification",Rn=()=>{const e=(0,he.useSelect)((e=>e(go).isAlertDismissed(Sn)),[]),t=(0,he.useSelect)((e=>e(go).getEditorDataContent()),[]),s=(0,he.useSelect)((e=>e(go).getIsWooProductEntity()),[]),[r,,,o]=(0,ve.useToggleState)(!1),{editType:i,contentType:n}=Bo(),{dismissAlert:a}=(0,he.useDispatch)(go),l=(0,w.useCallback)((()=>{a(Sn)}),[a]),c=(0,w.useMemo)((()=>i===vo?(0,d.__)("%1$sTip%2$s: Improve the accuracy of your generated AI descriptions by writing more content in your page.","wordpress-seo"):(0,d.__)("%1$sTip%2$s: Improve the accuracy of your generated AI titles by writing more content in your page.","wordpress-seo")
/* translators: %1$s and %2$s expand to opening and closing of a span in order to emphasise the word. */),[i]),u=(0,w.useMemo)((()=>((e,t)=>e||t===jo?150:300)(s,n)),[n,s]);return e||r||t.length>u?null:(0,C.jsxs)(ve.Notifications.Notification,{id:"ai-generator-content-tip",variant:"info",dismissScreenReaderLabel:(0,d.__)("Dismiss","wordpress-seo"),children:[Re((0,d.sprintf)(c,"<span>","</span>"),{span:(0,C.jsx)("span",{className:"yst-font-medium yst-text-slate-800"})}),(0,C.jsxs)("div",{className:"yst-flex yst-mt-3 yst--ms-3 yst-gap-1",children:[(0,C.jsx)(ve.Button,{type:"button",variant:"tertiary",onClick:l,children:(0,d.__)("Don’t show again","wordpress-seo")}),(0,C.jsx)(ve.Button,{type:"button",variant:"tertiary",className:"yst-text-slate-800",onClick:o,children:(0,d.__)("Dismiss","wordpress-seo")})]})]})},Cn=({title:e,description:t,showPreviewSkeleton:s})=>(0,C.jsxs)("div",{children:[(0,C.jsx)("div",{className:"yst-flex yst-mb-6",children:(0,C.jsx)(ve.Label,{as:"span",className:"yst-flex-grow yst-cursor-default",children:(0,d.__)("X preview","wordpress-seo")})}),s?(0,C.jsx)(Ln,{}):(0,C.jsx)(En,{title:e,description:t})]});Cn.propTypes={title:j().string.isRequired,description:j().string.isRequired,showPreviewSkeleton:j().bool.isRequired};const En=({title:e,description:t})=>{const s=(0,he.useSelect)((e=>e(go).getSiteUrl()),[]),r=(0,he.useSelect)((e=>e(go).getTwitterImageUrl()),[]),o=(0,he.useSelect)((e=>e(go).getFacebookImageUrl()),[]),i=(0,he.useSelect)((e=>e(go).getEditorDataImageFallback()),[]),n=(0,he.useSelect)((e=>e(go).getTwitterImageType()),[]),a=(0,he.useSelect)((e=>e(go).getTwitterAltText()),[]);return(0,C.jsx)("div",{className:"yst-bg-slate-200 yst-p-2 yst--mx-6",children:(0,C.jsx)(cn,{title:e,description:t,siteUrl:s,imageUrl:r,imageFallbackUrl:o||i,isLarge:"summary"!==n,alt:a,onSelect:l.noop,onImageClick:l.noop,onMouseHover:l.noop})})};En.propTypes={title:j().string.isRequired,description:j().string.isRequired};const Ln=()=>(0,C.jsxs)("div",{className:"yst-flex yst-flex-col yst-max-h-[370px] yst-w-[507px] yst-border yst-rounded-t-[14px] yst-overflow-hidden yst-mx-auto",children:[(0,C.jsx)(ve.SkeletonLoader,{className:"yst-h-[265px] yst-w-full yst-rounded-none yst-border yst-border-dashed"}),(0,C.jsxs)("div",{className:"yst-w-full yst-p-4 yst-space-y-1",children:[(0,C.jsx)(ve.SkeletonLoader,{className:"yst-h-3 yst-w-1/3"}),(0,C.jsx)(ve.SkeletonLoader,{className:"yst-h-5 yst-w-10/12"}),(0,C.jsx)(ve.SkeletonLoader,{className:"yst-h-3 yst-w-full"})]})]}),In="yst-mt-1 yst-mb-3",Tn="yst-flex yst-justify-end yst--me-8 yst-gap-3 yst--ms-2",Nn=({onClose:e})=>(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("p",{className:In,children:(0,d.__)("As long as this is a beta feature, you get unlimited sparks.","wordpress-seo")}),(0,C.jsx)("div",{className:Tn,children:(0,C.jsx)(ve.Button,{type:"button",variant:"primary",size:"small",onClick:e,children:(0,d.__)("Got it!","wordpress-seo")})})]}),Mn=({onClose:e,upsellLink:t,isWooProductEntity:s=!1,ctbId:r="f6a84663-465f-4cb5-8ba5-f7a6d72224b2"})=>{const o=(0,ve.useSvgAria)();return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("p",{className:In,children:(0,d.sprintf)(/* translators: %s expands to Yoast SEO Premium or Yoast WooCommerce SEO. */
(0,d.__)("Keep the momentum going, unlock unlimited sparks with %s!","wordpress-seo"),s?"Yoast WooCommerce SEO":"Yoast SEO Premium")}),(0,C.jsxs)("div",{className:Tn,children:[(0,C.jsx)(ve.Button,{type:"button",variant:"tertiary",size:"small",onClick:e,children:(0,d.__)("Close","wordpress-seo")}),(0,C.jsxs)(ve.Button,{as:"a",size:"small",variant:"upsell",href:t,target:"_blank",rel:"noopener noreferrer","data-action":"load-nfd-ctb","data-ctb-id":r,children:[(0,C.jsx)(Ne,{className:"yst-w-4 yst-h-4 yst--ms-1 yst-me-2 yst-shrink-0",...o}),(0,d.sprintf)(/* translators: %1$s expands to Yoast SEO Premium or Yoast WooCommerce SEO. */
(0,d.__)("Unlock with %1$s","wordpress-seo"),s?"Yoast WooCommerce SEO":"Yoast SEO Premium"),(0,C.jsx)("span",{className:"yst-sr-only",children:/* translators: Hidden accessibility text. */
(0,d.__)("(Opens in a new browser tab)","wordpress-seo")})]})]})]})},Pn=({className:e=""})=>{const{isUsageCountLimitReached:t,usageCount:s,usageCountLimit:r,premiumUpsellLink:o,wooUpsellLink:i,isWooProductEntity:n,hasValidPremiumSubscription:a,hasValidWooSubscription:l}=(0,he.useSelect)((e=>{const t=e(yo),s=e(go);return{isUsageCountLimitReached:t.isUsageCountLimitReached(),usageCount:t.selectUsageCount(),usageCountLimit:t.selectUsageCountLimit(),premiumUpsellLink:s.selectLink("https://yoa.st/ai-toast-out-of-free-sparks"),wooUpsellLink:s.selectLink("https://yoa.st/ai-toast-out-of-free-sparks-woo"),isWooProductEntity:s.getIsWooProductEntity(),hasValidPremiumSubscription:t.selectPremiumSubscription(),hasValidWooSubscription:t.selectWooCommerceSubscription()}}),[]),c=(0,w.useMemo)((()=>a&&!n||n&&l&&a),[a,n,l]),[u,,p,,h]=(0,ve.useToggleState)(s===r);(0,w.useEffect)((()=>{p(c&&s===r||!c&&t)}),[s,r,c,t]);const m=(0,w.useMemo)((()=>n?i:o),[n,i,o]),y=(0,w.useMemo)((()=>n&&!l),[n,l]);return u&&(0,C.jsx)(ve.Notifications.Notification,{id:"ai-sparks-limit",className:e,variant:"info",dismissScreenReaderLabel:(0,d.__)("Close","wordpress-seo"),title:c?(0,d.sprintf)(/* translators: %s is the number of the sparks. */
(0,d._n)("You've used %s spark this month.","You've used %s sparks this month.",r,"wordpress-seo"),r):(0,d.__)("You're out of free sparks!","wordpress-seo"),size:c?"default":"large",children:c?(0,C.jsx)(Nn,{onClose:h}):(0,C.jsx)(Mn,{onClose:h,upsellLink:m,isWooUpsell:y})})};window.yoast=window.yoast||{},window.yoast.editorModules={analysis:{getL10nObject:c,getContentLocale:function(){const e=c();return(0,l.get)(e,"contentLocale","en_US")},getIndicatorForScore:function(e){return(0,l.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:""}}}(u.interpreters.scoreToRating(e))},constants:e,refreshAnalysis:t},aiGenerator:{components:{Introduction:ui,SuggestionError:xn,SparksLimitNotification:Pn,FeatureError:di},helpers:{removesLocaleVariantSuffixes:Po,fetchSuggestions:Ao}},components:{HelpLink:Y,TopLevelProviders:ue,higherorder:{withYoastSidebarPriority:e=>{const t=t=>{const{renderPriority:s,...r}=t;return(0,C.jsx)(e,{...r})};return t.propTypes={renderPriority:j().number},t}},contentAnalysis:{KeywordInput:W,mapResults:r},contexts:{location:{LocationContext:n.LocationContext,LocationProvider:n.LocationProvider,LocationConsumer:n.LocationConsumer}},SidebarItem:ce,SidebarCollapsible:ae,MetaboxCollapsible:e=>(0,C.jsx)(V,{hasPadding:!0,hasSeparator:!0,...e}),Modal:Q,portals:{Portal:se,ImageSelectPortal:re,ScoreIconPortal:ie},FieldsetLayout:cr,UnsavedChangesModal:so,YoastLogo:e=>ke.createElement("svg",ho({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",className:"yoast-logo_svg__w-40",viewBox:"0 0 842 224"},e),uo||(uo=ke.createElement("path",{fill:"#a61e69",d:"M166.55 54.09c-38.69 0-54.17 25.97-54.17 54.88s15.25 56.02 54.17 56.02 54.07-27.19 54-54.26c-.09-32.97-16.77-56.65-54-56.65Zm-23.44 56.52c.94-38.69 30.66-38.65 40.59-24.79 9.05 12.63 10.9 55.81-17.14 55.5-12.92-.14-23.06-8.87-23.44-30.71Zm337.25 27.55V82.11h20.04V57.78h-20.04V28.39h-30.95v29.39h-15.7v24.33h15.7v52.87c0 30.05 20.95 47.91 43.06 51.61l9.24-24.88c-12.89-1.63-21.23-11.27-21.35-23.54Zm-156.15-8.87V87.16c0-1.54-.1-2.98-.25-4.39-2.68-34.04-51.02-33.97-88.46-20.9l10.82 21.78c24.38-11.58 38.97-8.59 44.07-2.89.13.15.26.29.38.45.01.02.03.04.04.06 2.6 3.51 1.98 9.05 1.98 13.41-31.86 0-65.77 4.23-65.77 39.17 0 26.56 33.28 43.65 68.06 18.33l5.16 12.45h29.81c-2.66-14.62-5.85-27.14-5.85-35.34Zm-31.18-.23c-24.51 27.43-46.96 1.61-23.97-9.65 6.77-2.31 15.95-2.41 23.97-2.41v12.06Zm78.75-44.17c0-10.38 16.61-15.23 42.82-3.27l9.06-22.01c-35.27-10.66-83.44-11.62-83.75 25.28-.15 17.68 11.19 27.19 27.52 33.26 11.31 4.2 27.64 6.38 27.59 15.39-.06 11.77-25.38 13.57-48.42-2.26l-9.31 23.87c31.43 15.64 89.87 16.08 89.56-23.12-.31-38.76-55.08-32.11-55.08-47.14ZM99.3 1 54.44 125.61 32.95 58.32H1l35.78 91.89a33.49 33.49 0 0 1 0 24.33c-4 10.25-10.65 19.03-26.87 21.21v27.24c31.58 0 48.65-19.41 63.88-61.96L133.48 1H99.3ZM598.64 139.05c0 8.17-2.96 14.58-8.87 19.23-5.91 4.65-14.07 6.98-24.47 6.98s-18.92-1.61-25.54-4.84v-14.2c4.19 1.97 8.65 3.52 13.37 4.65 4.72 1.13 9.11 1.7 13.18 1.7 5.95 0 10.35-1.13 13.18-3.39 2.83-2.26 4.25-5.3 4.25-9.11 0-3.43-1.3-6.35-3.9-8.74-2.6-2.39-7.97-5.22-16.1-8.48-8.39-3.39-14.3-7.27-17.74-11.63-3.44-4.36-5.16-9.59-5.16-15.71 0-7.67 2.72-13.7 8.18-18.1 5.45-4.4 12.77-6.6 21.95-6.6s17.57 1.93 26.29 5.78l-4.78 12.26c-8.18-3.43-15.47-5.15-21.89-5.15-4.87 0-8.55 1.06-11.07 3.17-2.52 2.12-3.77 4.91-3.77 8.39 0 2.39.5 4.43 1.51 6.13s2.66 3.3 4.97 4.81c2.3 1.51 6.46 3.5 12.45 5.97 6.75 2.81 11.7 5.43 14.85 7.86 3.15 2.43 5.45 5.18 6.92 8.23 1.46 3.06 2.2 6.66 2.2 10.81Zm68.53 24.96h-52.02V72.12h52.02v12.7h-36.99v25.01h34.66v12.57h-34.66v28.85h36.99v12.76Zm100.24-46.07c0 14.96-3.74 26.59-11.23 34.88-7.49 8.3-18.08 12.44-31.8 12.44s-24.54-4.12-31.99-12.35c-7.44-8.23-11.17-19.93-11.17-35.1s3.74-26.82 11.23-34.95c7.49-8.13 18.17-12.19 32.05-12.19s24.24 4.13 31.7 12.38c7.47 8.26 11.2 19.88 11.2 34.88Zm-70.2 0c0 11.31 2.29 19.89 6.86 25.74 4.57 5.85 11.35 8.77 20.32 8.77s15.67-2.89 20.22-8.67c4.55-5.78 6.82-14.39 6.82-25.83s-2.25-19.82-6.76-25.64-11.23-8.74-20.16-8.74-15.82 2.91-20.41 8.74c-4.59 5.82-6.89 14.37-6.89 25.64Z"})),po||(po=ke.createElement("path",{fill:"#77b227",d:"m790.45 165.35 36.05-94.96H840l-36.02 94.96h-13.53z"}))),SidebarLayout:({contentClassName:e="",children:t})=>(0,C.jsx)("div",{className:"yst-flex yst-gap-6 xl:yst-flex-row yst-flex-col relative",children:(0,C.jsx)("div",{className:Ae()("yst-@container yst-flex yst-flex-grow yst-flex-col",e),children:t})}),ErrorFallback:ar},containers:{EditorModal:xe,PersistentDismissableAlert:we,Results:De,SEMrushRelatedKeyphrases:Ke,WincherSEOPerformance:Ms},helpers:{ajaxHelper:o,createInterpolateElement:Re,createWatcher:(e,t)=>{let s=e();return()=>{const r=e();(0,l.isEqual)(r,s)||(s=r,t((0,l.clone)(r)))}},isBlockEditor:function(){return window.wpseoScriptData&&"1"===window.wpseoScriptData.isBlockEditor},i18n:{setTextdomainL10n:function(e,t="wpseoYoastJSL10n"){const s=(0,l.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)}},replacementVariableHelpers:i,publishBox:{updateScore:function(e,t,s=null){var r=tr("#"+e+"-score"),o=er+" "+t;r.children(".image").attr("class",o);var i=sr(e,t,s);r.children("."+Js).html(i)},createScoresInPublishBox:function(e,t,s=null){const r=tr("<div />",{class:"misc-pub-section yoast yoast-seo-score "+e+"-score",id:e+"-score"}),o=tr("<span />",{class:Js,html:sr(e,t,s)}),i=tr("<span>").attr("class",er+" na");r.append(i).append(o),tr("#yoast-seo-publishbox-section").append(r)},scrollToCollapsible:function(e){const t=tr("#wpadminbar"),s=tr(e);if(!t||!s)return;const r="fixed"===t.css("position")?t.height():0;tr([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"),o=e.className||"na";t.attr("class","yst-traffic-light "+o),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