(()=>{var e={4530:(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 a=typeof s;if("string"===a||"number"===a)e.push(s);else if(Array.isArray(s)){if(s.length){var n=o.apply(null,s);n&&e.push(n)}}else if("object"===a){if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]")){e.push(s.toString());continue}for(var i in s)r.call(s,i)&&s[i]&&e.push(i)}}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(s=function(){return o}.apply(t,[]))||(e.exports=s)}()}},t={};function s(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,s),a.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),(()=>{"use strict";const e=window.React;var t=s.n(e);const r=window.wp.i18n,o=window.wp.components,a=window.yoast.componentsNew,n=window.yoast.helpers,i=window.yoast.propTypes;var l=s.n(i);const c=window.wp.element,d=window.yoast.styledComponents;var u=s.n(d);const p=u().div`
	display: flex;
	margin-top: 8px;
`;class m extends c.Component{render(){return(0,e.createElement)(p,null,(0,e.createElement)(a.Toggle,{id:this.props.id,labelText:(0,r.__)("Mark as cornerstone content","wordpress-seo"),isEnabled:this.props.isEnabled,onSetToggleState:this.props.onToggle,onToggleDisabled:this.props.onToggleDisabled}))}}m.propTypes={id:l().string,isEnabled:l().bool,onToggle:l().func,onToggleDisabled:l().func},m.defaultProps={id:"cornerstone-toggle",isEnabled:!0,onToggle:()=>{},onToggleDisabled:()=>{}};const g=m,h=u()(a.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);
	}

`,y=t=>(0,e.createElement)(h,{hasPadding:!0,hasSeparator:!0,...t}),w=t=>{const[s,r]=(0,c.useState)(!1),{prefixIcon:o}=t;return(0,e.createElement)("div",{className:"yoast components-panel__body "+(s?"is-opened":"")},(0,e.createElement)("h2",{className:"components-panel__body-title"},(0,e.createElement)("button",{onClick:function(){r(!s)},className:"components-button components-panel__body-toggle",type:"button",id:t.buttonId},(0,e.createElement)("span",{className:"yoast-icon-span",style:{fill:`${o&&o.color||""}`}},o&&(0,e.createElement)(a.SvgIcon,{icon:o.icon,color:o.color,size:o.size})),(0,e.createElement)("span",{className:"yoast-title-container"},(0,e.createElement)("div",{className:"yoast-title"},t.title),(0,e.createElement)("div",{className:"yoast-subtitle"},t.subTitle)),t.hasBetaBadgeLabel&&(0,e.createElement)(a.BetaBadge,null),(0,e.createElement)("span",{className:"yoast-chevron","aria-hidden":"true"}))),s&&t.children)},f=w;w.propTypes={title:l().string.isRequired,children:l().oneOfType([l().node,l().arrayOf(l().node)]).isRequired,prefixIcon:l().object,subTitle:l().string,hasBetaBadgeLabel:l().bool,buttonId:l().string},w.defaultProps={prefixIcon:null,subTitle:"",hasBetaBadgeLabel:!1,buttonId:null};const b=(0,n.makeOutboundLink)();function E({isCornerstone:t,onChange:s,learnMoreUrl:i,location:l}){const c="metabox"===l?y:f;return(0,e.createElement)(c,{id:(0,n.join)(["yoast-cornerstone-collapsible",l]),title:(0,r.__)("Cornerstone content","wordpress-seo")},(0,e.createElement)(a.HelpText,null,(0,r.__)("Cornerstone content should be the most important and extensive articles on your site.","wordpress-seo")+" ",(0,e.createElement)(b,{href:i},(0,r.__)("Learn more about Cornerstone Content.","wordpress-seo"))),(0,e.createElement)(g,{id:(0,n.join)(["yoast-cornerstone",l]),isEnabled:t,onToggle:s}),(0,e.createElement)(o.Slot,{name:"YoastAfterCornerstoneToggle"}))}E.propTypes={isCornerstone:l().bool,onChange:l().func,learnMoreUrl:l().string.isRequired,location:l().string},E.defaultProps={isCornerstone:!0,onChange:()=>{},location:""};const v=window.wp.compose,k=window.wp.data,x=window.yoast.externals.contexts,_=window.wp.url,S=window.wp.apiFetch;var C=s.n(S);const R=window.yoast.relatedKeyphraseSuggestions;class L extends c.Component{constructor(e){super(e),this.onModalOpen=this.onModalOpen.bind(this),this.onLinkClick=this.onLinkClick.bind(this),this.listenToMessages=this.listenToMessages.bind(this)}onModalOpen(){const{keyphrase:e,onOpenWithNoKeyphrase:t,onOpen:s,location:r,newRequest:o,countryCode:a}=this.props;e.trim()?(s(r),o(a,e)):t()}onLinkClick(e){if(e.preventDefault(),!this.props.keyphrase.trim())return void this.props.onOpenWithNoKeyphrase();const t=e.target.href,s=["top="+(window.top.outerHeight/2+window.top.screenY-285),"left="+(window.top.outerWidth/2+window.top.screenX-170),"width=340","height=570","resizable=1","scrollbars=1","status=0"];this.popup&&!this.popup.closed||(this.popup=window.open(t,"SEMrush_login",s.join(","))),this.popup&&this.popup.focus(),window.addEventListener("message",this.listenToMessages,!1)}async listenToMessages(e){const{data:t,source:s,origin:r}=e;"https://oauth.semrush.com"===r&&this.popup===s&&("semrush:oauth:success"===t.type&&(this.popup.close(),window.removeEventListener("message",this.listenToMessages,!1),await this.performAuthenticationRequest(t)),"semrush:oauth:denied"===t.type&&(this.popup.close(),window.removeEventListener("message",this.listenToMessages,!1),this.props.onAuthentication(!1)))}async performAuthenticationRequest(e){try{const t=new URL(e.url).searchParams.get("code"),s=await C()({path:"yoast/v1/semrush/authenticate",method:"POST",data:{code:t}});200===s.status?(this.props.onAuthentication(!0),this.onModalOpen(),this.popup.close()):console.error(s.error)}catch(e){console.error(e.message)}}render(){const{keyphrase:t,location:s,whichModalOpen:n,isLoggedIn:i,onClose:l,countryCode:d,learnMoreLink:u}=this.props,p=new URL("https://www.semrush.com/analytics/keywordoverview/");return p.searchParams.append("q",t),p.searchParams.append("db",d),(0,e.createElement)(c.Fragment,null,i&&(0,e.createElement)("div",{className:"yoast"},(0,e.createElement)(a.NewButton,{variant:"secondary",id:`yoast-get-related-keyphrases-${s}`,onClick:this.onModalOpen},(0,r.__)("Get related keyphrases","wordpress-seo"))),(0,e.createElement)(R.Modal,{isOpen:Boolean(t)&&n===s,onClose:l,insightsLink:p.toString(),learnMoreLink:u},(0,e.createElement)(o.Slot,{name:"YoastRelatedKeyphrases"})),!i&&(0,e.createElement)("div",{className:"yoast"},(0,e.createElement)(a.ButtonStyledLink,{variant:"secondary",id:`yoast-get-related-keyphrases-${s}`,href:"https://oauth.semrush.com/oauth2/authorize?ref=1513012826&client_id=yoast&redirect_uri=https%3A%2F%2Foauth.semrush.com%2Foauth2%2Fyoast%2Fsuccess&response_type=code&scope=user.id",onClick:this.onLinkClick},(0,r.__)("Get related keyphrases","wordpress-seo"),(0,e.createElement)("span",{className:"screen-reader-text"},/* translators: Hidden accessibility text. */
(0,r.__)("(Opens in a new browser tab)","wordpress-seo")))))}}L.propTypes={keyphrase:l().string,location:l().string,whichModalOpen:l().oneOf(["none","metabox","sidebar"]),isLoggedIn:l().bool,onOpen:l().func.isRequired,onOpenWithNoKeyphrase:l().func.isRequired,onClose:l().func.isRequired,onAuthentication:l().func.isRequired,countryCode:l().string,learnMoreLink:l().string,newRequest:l().func.isRequired},L.defaultProps={keyphrase:"",location:"",whichModalOpen:"none",isLoggedIn:!1,countryCode:"en_US",learnMoreLink:""};const I=L,N=(0,v.compose)([(0,k.withSelect)((e=>{const{getSEMrushModalOpen:t,getSEMrushLoginStatus:s,getSEMrushSelectedCountry:r,getPreference:o,selectLinkParams:a,getFocusKeyphrase:n}=e("yoast-seo/editor");return{whichModalOpen:t(),isLoggedIn:s(),countryCode:r(),isRtl:o("isRtl",!1),learnMoreLink:(0,_.addQueryArgs)("https://yoa.st/3-v",a()),keyphrase:n()}})),(0,k.withDispatch)((e=>{const{setSEMrushNoKeyphraseMessage:t,setSEMrushOpenModal:s,setSEMrushDismissModal:r,setSEMrushLoginStatus:o,setSEMrushNewRequest:a}=e("yoast-seo/editor");return{onOpenWithNoKeyphrase:()=>{t()},onOpen:e=>{s(e)},onClose:()=>{r()},onAuthentication:e=>{o(e)},newRequest:(e,t)=>{a(e,t)}}}))])(I),T=window.yoast.styleGuide,M=(0,n.makeOutboundLink)(u().a`
	display: inline-block;
	position: relative;
	outline: none;
	text-decoration: none;
	border-radius: 100%;
	width: 24px;
	height: 24px;
	margin: -4px 0;
	vertical-align: middle;

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

	&::before {
		position: absolute;
		top: 0;
		left: 0;
		padding: 2px;
		content: "\f223";
	}
`),P=window.lodash,A=T.colors.$color_bad,$=T.colors.$palette_error_background,O=T.colors.$color_grey_text_light,F=T.colors.$palette_error_text,B=u().div`
	display: flex;
	flex-direction: column;
`,q=u().label`
	font-size: var(--yoast-font-size-default);
	font-weight: var(--yoast-font-weight-bold);
	${(0,n.getDirectionalStyle)("margin-right: 4px","margin-left: 4px")};
`,U=u().span`
	margin-bottom: 0.5em;
`,W=u()(a.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: ${A} !important;
		background-color: ${$} !important;

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

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

		${D} {
			${(0,n.getDirectionalStyle)("margin-left: -32px","margin-right: -32px")};
		}
	}
`;class Y extends c.Component{constructor(e){super(e),this.handleChange=this.handleChange.bind(this)}handleChange(e){this.props.onChange(e.target.value)}renderLabel(){const{id:t,label:s,helpLink:r}=this.props;return(0,e.createElement)(U,null,(0,e.createElement)(q,{htmlFor:t},s),r)}renderErrorMessages(){const t=[...this.props.errorMessages];return!(0,P.isEmpty)(t)&&(0,e.createElement)(z,null,t.map(((t,s)=>(0,e.createElement)(H,{key:s},(0,e.createElement)("span",{role:"alert"},t)))))}render(){const{id:t,showLabel:s,keyword:r,onRemoveKeyword:o,onBlurKeyword:a,onFocusKeyword:n,hasError:i}=this.props,l=!s,c=o!==P.noop;return(0,e.createElement)(B,null,s&&this.renderLabel(),i&&this.renderErrorMessages(),(0,e.createElement)(j,{className:c?"has-remove-keyword-button":null},(0,e.createElement)(W,{"aria-label":l?this.props.label:null,type:"text",id:t,className:i?"has-error":null,onChange:this.handleChange,onFocus:n,onBlur:a,value:r,autoComplete:"off"}),c&&(0,e.createElement)(D,{onClick:o,focusBoxShadowColor:"#084A67"},(0,e.createElement)(K,{size:"18px",icon:"times-circle",color:O}))))}}Y.propTypes={id:l().string.isRequired,showLabel:l().bool,keyword:l().string,onChange:l().func.isRequired,onRemoveKeyword:l().func,onBlurKeyword:l().func,onFocusKeyword:l().func,label:l().string.isRequired,helpLink:l().node,hasError:l().bool,errorMessages:l().arrayOf(l().string)},Y.defaultProps={showLabel:!0,keyword:"",onRemoveKeyword:P.noop,onBlurKeyword:P.noop,onFocusKeyword:P.noop,helpLink:null,hasError:!1,errorMessages:[]};const G=Y,V=u().div`
	padding: 16px;
	/* Necessary to compensate negative top margin of the collapsible after the keyword input. */
	border-bottom: 1px solid transparent;
`;class Z extends c.Component{constructor(e){super(e),this.validate=this.validate.bind(this)}static renderHelpLink(){return(0,e.createElement)(M,{href:wpseoAdminL10n["shortlinks.focus_keyword_info"],className:"dashicons"},(0,e.createElement)("span",{className:"screen-reader-text"},/* translators: Hidden accessibility text. */
(0,r.__)("Help on choosing the perfect focus keyphrase","wordpress-seo")))}validate(){const e=[...this.props.errors];return 0===this.props.keyword.trim().length&&this.props.displayNoKeyphraseMessage&&e.push((0,r.__)("Please enter a focus keyphrase first to get related keyphrases","wordpress-seo")),0===this.props.keyword.trim().length&&this.props.displayNoKeyphrasForTrackingMessage&&e.push((0,r.__)("Please enter a focus keyphrase first to track keyphrase performance","wordpress-seo")),this.props.keyword.includes(",")&&e.push((0,r.__)("Are you trying to use multiple keyphrases? You should add them separately below.","wordpress-seo")),this.props.keyword.length>191&&e.push((0,r.__)("Your keyphrase is too long. It can be a maximum of 191 characters.","wordpress-seo")),e}render(){const t=this.validate();return(0,e.createElement)(x.LocationConsumer,null,(s=>(0,e.createElement)("div",{style:"sidebar"===s?{borderBottom:"1px solid #f0f0f0"}:{}},(0,e.createElement)(V,{location:s},(0,e.createElement)(G,{id:`focus-keyword-input-${s}`,onChange:this.props.onFocusKeywordChange,keyword:this.props.keyword,label:(0,r.__)("Focus keyphrase","wordpress-seo"),helpLink:Z.renderHelpLink(),onBlurKeyword:this.props.onBlurKeyword,onFocusKeyword:this.props.onFocusKeyword,hasError:t.length>0,errorMessages:t}),this.props.isSEMrushIntegrationActive&&(0,e.createElement)(N,{location:s,keyphrase:this.props.keyword})),(0,e.createElement)(o.Slot,{name:`YoastAfterKeywordInput${s.charAt(0).toUpperCase()+s.slice(1)}`}))))}}Z.propTypes={keyword:l().string,onFocusKeywordChange:l().func.isRequired,onFocusKeyword:l().func.isRequired,onBlurKeyword:l().func.isRequired,isSEMrushIntegrationActive:l().bool,displayNoKeyphraseMessage:l().bool,displayNoKeyphrasForTrackingMessage:l().bool,errors:l().arrayOf(l().string)},Z.defaultProps={keyword:"",isSEMrushIntegrationActive:!1,displayNoKeyphraseMessage:!1,displayNoKeyphrasForTrackingMessage:!1,errors:[]};const Q=(0,v.compose)([(0,k.withSelect)((e=>{const{getFocusKeyphrase:t,getSEMrushNoKeyphraseMessage:s,hasWincherNoKeyphrase:r,getFocusKeyphraseErrors:o}=e("yoast-seo/editor");return{keyword:t(),displayNoKeyphraseMessage:s(),displayNoKeyphrasForTrackingMessage:r(),errors:o()}})),(0,k.withDispatch)((e=>{const{setFocusKeyword:t,setMarkerPauseStatus:s}=e("yoast-seo/editor");return{onFocusKeywordChange:t,onFocusKeyword:()=>s(!0),onBlurKeyword:()=>s(!1)}}))])(Z);function J(e){return J="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},J(e)}function X(e,t,s){return r=function(e,t){if("object"!=J(e)||!e)return e;var s=e[Symbol.toPrimitive];if(void 0!==s){var r=s.call(e,"string");if("object"!=J(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==J(r)?r:String(r))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e;var r}const ee=window.yoast.analysis;function te(e,t=""){const s=e.getIdentifier(),r={score:e.score,rating:ee.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 se(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 re(e){switch(e){case"loading":return{icon:"loading-spinner",color:T.colors.$color_green_medium_light};case"not-set":return{icon:"seo-score-none",color:T.colors.$color_score_icon};case"noindex":return{icon:"seo-score-none",color:T.colors.$color_noindex};case"good":return{icon:"seo-score-good",color:T.colors.$color_green_medium};case"ok":return{icon:"seo-score-ok",color:T.colors.$color_ok};default:return{icon:"seo-score-bad",color:T.colors.$color_red}}}function oe(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=se(te(o,t),s))}return s}function ae({target:e,children:t}){let s=e;return"string"==typeof e&&(s=document.getElementById(e)),s?(0,c.createPortal)(t,s):null}ae.propTypes={target:l().oneOfType([l().string,l().object]).isRequired,children:l().node.isRequired};const ne=({target:t,scoreIndicator:s})=>(0,e.createElement)(ae,{target:t},(0,e.createElement)(a.SvgIcon,{...re(s)}));ne.propTypes={target:l().string.isRequired,scoreIndicator:l().string.isRequired};const ie=ne,le=window.yoast.analysisReport,ce=window.yoast.uiLibrary,de=e.forwardRef((function(t,s){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:s},t),e.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"}))})),ue=window.wp.hooks,pe=(u().div`
	min-width: 600px;

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

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

		@media screen and ( max-width: 680px ) {
			width: 80px;
			height: 80px;
		}
	}
`,"yoast yoast-gutenberg-modal"),ge=t=>{const{title:s,className:r,showYoastIcon:a,additionalClassName:n,...i}=t,l=a?(0,e.createElement)("span",{className:"yoast-icon"}):null;return(0,e.createElement)(o.Modal,{title:s,className:`${r} ${n}`,icon:l,...i},t.children)};ge.propTypes={title:l().string,className:l().string,showYoastIcon:l().bool,children:l().oneOfType([l().node,l().arrayOf(l().node)]),additionalClassName:l().string},ge.defaultProps={title:"Yoast SEO",className:me,showYoastIcon:!0,children:null,additionalClassName:""};const he=ge,ye=()=>[(0,r.sprintf)(/* translators: %1$s expands to a strong opening tag, %2$s expands to a strong closing tag. */
(0,r.__)("%1$sAI%2$s: Better SEO titles and meta descriptions, faster.","wordpress-seo"),"<strong>","</strong>"),(0,r.sprintf)(/* translators: %1$s expands to a strong opening tag, %2$s expands to a strong closing tag. */
(0,r.__)("%1$sMultiple keywords%2$s: Rank higher for more searches.","wordpress-seo"),"<strong>","</strong>"),(0,r.sprintf)(/* translators: %1$s expands to a strong opening tag, %2$s expands to a strong closing tag. */
(0,r.__)("%1$sSuper fast%2$s internal linking suggestions.","wordpress-seo"),"<strong>","</strong>"),(0,r.sprintf)(/* translators: %1$s expands to a strong opening tag, %2$s expands to a strong closing tag. */
(0,r.__)("%1$sNo more broken links%2$s: Automatic redirect manager.","wordpress-seo"),"<strong>","</strong>"),(0,r.sprintf)(/* translators: %1$s expands to a strong opening tag, %2$s expands to a strong closing tag. */
(0,r.__)("%1$sAppealing social previews%2$s people actually want to click on.","wordpress-seo"),"<strong>","</strong>"),(0,r.sprintf)(/* translators: %1$s expands to a strong opening tag, %2$s expands to a strong closing tag. */
(0,r.__)("%1$s24/7 support%2$s: Also on evenings and weekends.","wordpress-seo"),"<strong>","</strong>")],we=(e,t)=>{try{return(0,c.createInterpolateElement)(e,t)}catch(t){return console.error("Error in translation for:",e,t),e}},fe=u().div`
  padding: 25px 32px 32px;
  color: #303030;
`,be=u().ul`
  margin: 0;
  padding: 0;

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

    &::marker {
      font-size: 1.5rem;
    }
  }
`,Ee=u().span`
  display: block;
  margin-top: 4px;
`,ve=u().h2`
  margin-top: 0;
  margin-bottom: 0.25rem;
  color: #303030;
  font-size: 0.8125rem;
  font-weight: 600;
`,ke=u().p`
  display: block;
  margin: 0.25rem 0 1rem 0 !important;
  max-width: 420px;
`,xe=u().hr`
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  border-top: 0;
  border-bottom: 1px solid #E2E8F0;
`,_e=u().div`
  text-align: center;
`,Se=u().a`
  width: 100%;
`,Ce=(0,n.makeOutboundLink)(Se);class Re extends c.Component{constructor(e){super(e)}createBenefitsList(t){return t.length>0&&(0,e.createElement)(be,{role:"list"},t.map(((t,s)=>(0,e.createElement)("li",{key:`upsell-benefit-${s}`},we(t,{strong:(0,e.createElement)("strong",null)})))))}render(){const t=(0,k.select)("yoast-seo/editor").isPromotionActive("black-friday-2024-promotion");return(0,e.createElement)(c.Fragment,null,t&&(0,e.createElement)("div",{className:"yst-flex  yst-items-center yst-text-lg yst-content-between yst-bg-black yst-text-amber-300 yst-h-9 yst-border-amber-300 yst-border-y yst-border-x-0 yst-border-solid yst-px-6"},(0,e.createElement)("div",{className:"yst-mx-auto"},(0,r.__)("30% OFF - BLACK FRIDAY","wordpress-seo"))),(0,e.createElement)(fe,null,(0,e.createElement)(ve,null,this.props.title),(0,e.createElement)(ke,null,this.props.description),(0,e.createElement)(_e,null,(0,e.createElement)(Ce,{...this.props.upsellButton},this.props.upsellButtonText,this.props.upsellButtonHasCaret&&(0,e.createElement)("span",{"aria-hidden":"true",className:"yoast-button-upsell__caret"})),(0,e.createElement)(Ee,{id:this.props.upsellButton["aria-describedby"]},this.props.upsellButtonLabel)),(0,e.createElement)(xe,null),(0,e.createElement)(ve,null,this.props.benefitsTitle),this.createBenefitsList(this.props.benefits)))}}Re.propTypes={title:l().node,benefits:l().array,benefitsTitle:l().node,description:l().node,upsellButton:l().object,upsellButtonText:l().string.isRequired,upsellButtonLabel:l().string,upsellButtonHasCaret:l().bool},Re.defaultProps={title:null,description:null,benefits:[],benefitsTitle:null,upsellButton:{href:"",className:"button button-primary"},upsellButtonLabel:"",upsellButtonHasCaret:!0};const Le=Re,Ie=(0,r.__)("Check your text on even more SEO criteria and get an enhanced keyphrase analysis, making it easier to optimize your content.","wordpress-seo"),Ne=t=>{const{locationContext:s}=(0,x.useRootContext)(),o=(0,_.addQueryArgs)(wpseoAdminL10n[t.buyLink],{context:s});return(0,e.createElement)(Le,{title:(0,r.__)("Get more help with writing content that ranks","wordpress-seo"),description:t.description,benefitsTitle:(0,r.sprintf)(/* translators: %s expands to 'Yoast SEO Premium'. */
(0,r.__)("%s also gives you:","wordpress-seo"),"Yoast SEO Premium"),benefits:ye(),upsellButtonText:(0,r.sprintf)(/* translators: %s expands to 'Yoast SEO Premium'. */
(0,r.__)("Unlock with %s","wordpress-seo"),"Yoast SEO Premium"),upsellButton:{href:o,className:"yoast-button-upsell",rel:null,"data-ctb-id":"f6a84663-465f-4cb5-8ba5-f7a6d72224b2","data-action":"load-nfd-ctb"},upsellButtonLabel:(0,r.__)("1 year of premium support and updates included!","wordpress-seo")})};Ne.propTypes={buyLink:l().string.isRequired,description:l().string},Ne.defaultProps={description:Ie};const Te=Ne;class Me extends c.Component{constructor(e){super(e);const t=this.props.results;this.state={mappedResults:{}},null!==t&&(this.state={mappedResults:oe(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:oe(this.props.results,this.props.keywordKey)})}createMarkButton({ariaLabel:t,id:s,className:r,status:o,onClick:n,isPressed:i}){return(0,e.createElement)(c.Fragment,null,(0,e.createElement)(a.IconButtonToggle,{marksButtonStatus:o,className:r,onClick:n,id:s,icon:"eye",pressed:i,ariaLabel:t}),this.props.shouldUpsellHighlighting&&(0,e.createElement)("div",{className:"yst-root"},(0,e.createElement)(ce.Badge,{className:"yst-absolute yst-px-[3px] yst-py-[3px] yst--end-[6.5px] yst--top-[6.5px]",size:"small",variant:"upsell"},(0,e.createElement)(de,{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,P.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,ue.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 ee.Paper("",{}),[])}renderHighlightingUpsell(t,s){const o=(0,r.__)("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 t&&(0,e.createElement)(he,{title:(0,r.__)("Unlock Premium SEO analysis","wordpress-seo"),onRequestClose:s,additionalClassName:"",className:`${me} yoast-gutenberg-modal__box yoast-gutenberg-modal__no-padding`,id:"yoast-premium-seo-analysis-highlighting-modal",shouldCloseOnClickOutside:!0},(0,e.createElement)(pe,null,(0,e.createElement)(Te,{buyLink:this.props.highlightingUpsellLink,description:o})))}render(){const{mappedResults:t}=this.state,{errorsResults:s,improvementsResults:o,goodResults:a,considerationsResults:n,problemsResults:i}=t,{upsellResults:l,resultCategoryLabels:d}=this.props,u={errors:(0,r.__)("Errors","wordpress-seo"),problems:(0,r.__)("Problems","wordpress-seo"),improvements:(0,r.__)("Improvements","wordpress-seo"),considerations:(0,r.__)("Considerations","wordpress-seo"),goodResults:(0,r.__)("Good results","wordpress-seo")},p=Object.assign(u,d);let m=this.props.marksButtonStatus;return"enabled"===m&&this.props.shortcodesForParsing.length>0&&(m="disabled"),(0,e.createElement)(c.Fragment,null,(0,e.createElement)(le.ContentAnalysis,{errorsResults:s,problemsResults:i,upsellResults:l,improvementsResults:o,considerationsResults:n,goodResults:a,activeMarker:this.props.activeMarker,onMarkButtonClick:this.handleMarkButtonClick,onEditButtonClick:this.handleEditButtonClick,marksButtonClassName:this.props.marksButtonClassName,editButtonClassName:this.props.editButtonClassName,marksButtonStatus:m,headingLevel:3,keywordKey:this.props.keywordKey,isPremium:this.props.isPremium,resultCategoryLabels:p,onResultChange:this.handleResultsChange,shouldUpsellHighlighting:this.props.shouldUpsellHighlighting,renderAIOptimizeButton:this.props.renderAIOptimizeButton,renderHighlightingUpsell:this.renderHighlightingUpsell,markButtonFactory:this.createMarkButton}))}}Me.propTypes={results:l().array,upsellResults:l().array,marksButtonClassName:l().string,editButtonClassName:l().string,marksButtonStatus:l().oneOf(["enabled","disabled","hidden"]),setActiveMarker:l().func.isRequired,setMarkerPauseStatus:l().func.isRequired,setActiveAIFixesButton:l().func.isRequired,activeMarker:l().string,activeAIFixesButton:l().string,keywordKey:l().string,location:l().string,isPremium:l().bool,resultCategoryLabels:l().shape({errors:l().string,problems:l().string,improvements:l().string,considerations:l().string,goodResults:l().string}),shortcodesForParsing:l().array,shouldUpsellHighlighting:l().bool,highlightingUpsellLink:l().string,renderAIOptimizeButton:l().func},Me.defaultProps={results:null,upsellResults:[],marksButtonStatus:"enabled",marksButtonClassName:"",editButtonClassName:"",activeMarker:null,activeAIFixesButton:null,keywordKey:"",location:"",isPremium:!1,resultCategoryLabels:{},shortcodesForParsing:[],shouldUpsellHighlighting:!1,highlightingUpsellLink:"",renderAIOptimizeButton:()=>{}};const Pe=Me,Ae=(0,v.compose)([(0,k.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,k.withDispatch)((e=>{const{setActiveMarker:t,setMarkerPauseStatus:s,setActiveAIFixesButton:r}=e("yoast-seo/editor");return{setActiveMarker:t,setMarkerPauseStatus:s,setActiveAIFixesButton:r}}))])(Pe);function $e(e){return(0,P.isNil)(e)||(e/=10),function(e){switch(e){case"feedback":return{className:"na",screenReaderText:(0,r.__)("Not available","wordpress-seo"),screenReaderReadabilityText:(0,r.__)("Not available","wordpress-seo"),screenReaderInclusiveLanguageText:(0,r.__)("Not available","wordpress-seo")};case"bad":return{className:"bad",screenReaderText:(0,r.__)("Needs improvement","wordpress-seo"),screenReaderReadabilityText:(0,r.__)("Needs improvement","wordpress-seo"),screenReaderInclusiveLanguageText:(0,r.__)("Needs improvement","wordpress-seo")};case"ok":return{className:"ok",screenReaderText:(0,r.__)("OK SEO score","wordpress-seo"),screenReaderReadabilityText:(0,r.__)("OK","wordpress-seo"),screenReaderInclusiveLanguageText:(0,r.__)("Potentially non-inclusive","wordpress-seo")};case"good":return{className:"good",screenReaderText:(0,r.__)("Good SEO score","wordpress-seo"),screenReaderReadabilityText:(0,r.__)("Good","wordpress-seo"),screenReaderInclusiveLanguageText:(0,r.__)("Good","wordpress-seo")};default:return{className:"loading",screenReaderText:"",screenReaderReadabilityText:"",screenReaderInclusiveLanguageText:""}}}(ee.interpreters.scoreToRating(e))}function Oe({target:t,children:s}){return(0,e.createElement)(ae,{target:t},s)}function Fe(){return(0,P.get)(window,"wpseoScriptData.metabox",{intl:{},isRtl:!1})}Oe.propTypes={target:l().string.isRequired,children:l().node.isRequired};const Be="yoast-seo/ai-generator",qe="yoast-seo/editor",Ue="google",We="social",ze="twitter",He="title",De="description",Ke="post",je="term",Ye={post:"title",term:"term_title"},Ge=(0,P.mapValues)(Ye,(e=>`%%${e}%%`)),Ve={mobile:"mobile",desktop:"desktop"},Ze={idle:"idle",loading:"loading",success:"success",error:"error"},Qe="success",Je="error",Xe="abort";window.wp.sanitize;const{stripHTMLTags:et}=n.strings;let tt,st=!1;const rt=["_formal","_informal","_ao90"],ot=e=>{for(const t of rt)if(e.endsWith(t))return e.slice(0,-t.length);return e},at="\\–\\-\\(\\)_\\[\\]’‘“”〝〞〟‟„\"'.?!:;,¿¡«»‹›—×+&۔؟،؛。｡！‼？⁇⁉⁈‥…・ー、〃〄〆〇〈〉《》「」『』【】〒〓〔〕〖〗〘〙〚〛〜〝〞〟〠〶〼〽｛｝｜～｟｠｢｣､［］･￥＄％＠＆＇（）＊／：；＜＞＼\\<>";at.split(""),new RegExp("^["+at+"]+"),new RegExp("["+at+"]+$");new RegExp("["+at+"#$%&*+/=@^`{|}~ -¿–-⁊ -⁯₠-⃀]","g");const nt=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},it=()=>{const e=(0,k.useSelect)((e=>e(qe).getReplaceVars()),[]),t=(0,c.useMemo)((()=>e.map(nt)),[e]);return(0,c.useCallback)(((e,{key:s="value",overrides:r={},applyPluggable:o=!0,editType:a=He,contentType:n=Ke}={})=>{for(const o of t)e=e.replace(new RegExp("%%"+(0,P.escapeRegExp)(o.name)+"%%","g"),(0,P.get)(r,o.name,o[s]));return n===je&&(e=e.replace(" Archives","")),o?((e,t=He)=>{const s=function(e){const t=(0,P.get)(window,["YoastSEO","app","pluggable"],!1);if(!t||!(0,P.get)(window,["YoastSEO","app","pluggable","loaded"],!1))return function(e){const t=(0,P.get)(window,["YoastSEO","wp","replaceVarsPlugin","replaceVariables"],P.identity);return{url:e.url,title:et(t(e.title)),description:et(t(e.description)),filteredSEOTitle:e.filteredSEOTitle?et(t(e.filteredSEOTitle)):""}}(e);const s=t._applyModifications.bind(t);return{url:e.url,title:et(s("data_page_title",e.title)),description:et(s("data_meta_desc",e.description)),filteredSEOTitle:e.filteredSEOTitle?et(s("data_page_title",e.filteredSEOTitle)):""}}({title:"",description:"",[t]:ee.languageProcessing.stripSpaces(e)});return(0,P.get)(s,t,e)})(e,a):e}),[t])},lt={editType:He,previewType:Ue,postType:"post",contentType:Ke},ct=(0,c.createContext)(lt),dt=(ct.Provider,()=>(0,c.useContext)(ct)),ut=()=>(0,c.useContext)(x.LocationContext),pt=e=>{const t=(0,c.useRef)(null);return(0,c.useCallback)((s=>{(0,P.attempt)((()=>t.current&&t.current.disconnect())),null!==s&&(t.current=new ResizeObserver((t=>{(0,P.forEach)(t,(t=>e(t)))})),t.current.observe(s))}),[e])},mt=(e.forwardRef((function(t,s){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:s},t),e.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,"error"),gt="loading",ht="showPlay",yt="askPermission",wt="isPlaying",ft=window.yoast.reduxJsToolkit,bt="usageCount",Et="fetchUsageCount",vt=`${Et}/success`,kt={errorCode:null,errorIdentifier:null,errorMessage:null},xt=(0,ft.createSlice)({name:bt,initialState:{status:"idle",count:0,limit:10,endpoint:"yoast/v1/ai_generator/get_usage",error:kt},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(`${Et}/request`,(e=>{e.status=gt,e.error=kt})),e.addCase(vt,((e,{payload:t})=>{e.status="success",e.count=t.count,e.limit=t.limit,e.error=kt})),e.addCase(`${Et}/${mt}`,((e,{payload:t})=>{e.status="error",e.error={errorCode:502,...t}}))}}),_t=(xt.getInitialState,{selectUsageCountStatus:e=>(0,P.get)(e,[bt,"status"],xt.getInitialState()),selectUsageCount:e=>(0,P.get)(e,[bt,"count"],xt.getInitialState().count),selectUsageCountLimit:e=>(0,P.get)(e,[bt,"limit"],xt.getInitialState().limit),selectUsageCountEndpoint:e=>(0,P.get)(e,[bt,"endpoint"],xt.getInitialState().endpoint),selectUsageCountError:e=>(0,P.get)(e,[bt,"error"],xt.getInitialState().error)});_t.selectUsageCountRemaining=(0,ft.createSelector)([_t.selectUsageCount,_t.selectUsageCountLimit],((e,t)=>Math.max(t-e,0))),_t.isUsageCountLimitReached=(0,ft.createSelector)([_t.selectUsageCount,_t.selectUsageCountLimit,_t.selectUsageCountError],((e,t,s)=>429===s.errorCode||e>=t)),xt.actions,xt.reducer;l().string.isRequired;const St=e.forwardRef((function(t,s){return e.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:s},t),e.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"}))})),Ct=e.forwardRef((function(t,s){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:s},t),e.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"}))})),Rt=({learnMoreLink:t,thumbnail:s,wistiaEmbedPermission:o,upsellLink:a,upsellLabel:n,newToText:i,ctbId:l})=>{const{onClose:c,initialFocus:d}=(0,ce.useModalContext)(),u={a:(0,e.createElement)(Dt,{href:t,className:"yst-inline-flex yst-items-center yst-gap-1 yst-no-underline yst-font-medium",variant:"primary"}),ArrowNarrowRightIcon:(0,e.createElement)(Ct,{className:"yst-w-4 yst-h-4 rtl:yst-rotate-180"}),br:(0,e.createElement)("br",null)};return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"yst-px-10 yst-pt-10 yst-introduction-gradient yst-text-center"},(0,e.createElement)("div",{className:"yst-relative yst-w-full"},(0,e.createElement)(ms,{videoId:"vun9z1dpfh",thumbnail:s,wistiaEmbedPermission:o}),(0,e.createElement)(ce.Badge,{className:"yst-absolute yst-end-4 yst-text-center yst-justify-center",variant:"info",style:{top:"-8px"}},(0,r.__)("Beta","wordpress-seo"))),(0,e.createElement)("div",{className:"yst-mt-6 yst-text-xs yst-font-medium yst-flex yst-flex-col yst-items-center"},(0,e.createElement)("span",{className:"yst-introduction-modal-uppercase yst-flex yst-gap-2 yst-items-center"},(0,e.createElement)("span",{className:"yst-logo-icon"}),i))),(0,e.createElement)("div",{className:"yst-px-10 yst-pb-4 yst-flex yst-flex-col yst-items-center"},(0,e.createElement)("div",{className:"yst-mt-4 yst-mx-1.5 yst-text-center"},(0,e.createElement)("h3",{className:"yst-text-slate-900 yst-text-lg yst-font-medium"},(0,r.sprintf)(/* translators: %s: Expands to "Yoast AI" */
(0,r.__)("Optimize your SEO content with %s","wordpress-seo"),"Yoast AI")),(0,e.createElement)("div",{className:"yst-mt-2 yst-text-slate-600 yst-text-sm"},we((0,r.sprintf)(/* translators: %1$s is a break tag; %2$s and %3$s are anchor tags; %4$s is the arrow icon. */
(0,r.__)("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>"),u))),(0,e.createElement)("div",{className:"yst-w-full yst-flex yst-mt-6"},(0,e.createElement)(ce.Button,{as:"a",className:"yst-grow",size:"extra-large",variant:"upsell",href:a,target:"_blank",ref:d,"data-action":"load-nfd-ctb","data-ctb-id":l},(0,e.createElement)(St,{className:"yst--ms-1 yst-me-2 yst-h-5 yst-w-5"}),n,(0,e.createElement)("span",{className:"yst-sr-only"},/* translators: Hidden accessibility text. */
(0,r.__)("(Opens in a new browser tab)","wordpress-seo")))),(0,e.createElement)(ce.Button,{as:"a",className:"yst-mt-4",variant:"tertiary",onClick:c},(0,r.__)("Close","wordpress-seo"))))};Rt.propTypes={learnMoreLink:l().string.isRequired,upsellLink:l().string.isRequired,thumbnail:l().shape({src:l().string.isRequired,width:l().string,height:l().string}).isRequired,wistiaEmbedPermission:l().shape({value:l().bool.isRequired,status:l().string.isRequired,set:l().func.isRequired}).isRequired,upsellLabel:l().string,newToText:l().string,ctbId:l().string},Rt.defaultProps={upsellLabel:(0,r.sprintf)(/* translators: %1$s expands to Yoast SEO Premium. */
(0,r.__)("Unlock with %1$s","wordpress-seo"),"Yoast SEO Premium"),newToText:"Yoast SEO Premium",ctbId:"f6a84663-465f-4cb5-8ba5-f7a6d72224b2"};const Lt=({handleRefreshClick:t,supportLink:s})=>(0,e.createElement)("div",{className:"yst-flex yst-gap-2"},(0,e.createElement)(ce.Button,{onClick:t},(0,r.__)("Refresh this page","wordpress-seo")),(0,e.createElement)(ce.Button,{variant:"secondary",as:"a",href:s,target:"_blank",rel:"noopener"},(0,r.__)("Contact support","wordpress-seo")));Lt.propTypes={handleRefreshClick:l().func.isRequired,supportLink:l().string.isRequired};const It=({handleRefreshClick:t,supportLink:s})=>(0,e.createElement)("div",{className:"yst-grid yst-grid-cols-1 yst-gap-y-2"},(0,e.createElement)(ce.Button,{className:"yst-order-last",onClick:t},(0,r.__)("Refresh this page","wordpress-seo")),(0,e.createElement)(ce.Button,{variant:"secondary",as:"a",href:s,target:"_blank",rel:"noopener"},(0,r.__)("Contact support","wordpress-seo")));It.propTypes={handleRefreshClick:l().func.isRequired,supportLink:l().string.isRequired};const Nt=({error:t,children:s})=>(0,e.createElement)("div",{role:"alert",className:"yst-max-w-screen-sm yst-p-8 yst-space-y-4"},(0,e.createElement)(ce.Title,null,(0,r.__)("Something went wrong. An unexpected error occurred.","wordpress-seo")),(0,e.createElement)("p",null,(0,r.__)("We're very sorry, but it seems like the following error has interrupted our application:","wordpress-seo")),(0,e.createElement)(ce.Alert,{variant:"error"},(null==t?void 0:t.message)||(0,r.__)("Undefined error message.","wordpress-seo")),(0,e.createElement)("p",null,(0,r.__)("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")),s);Nt.propTypes={error:l().object.isRequired,children:l().node},Nt.VerticalButtons=It,Nt.HorizontalButtons=Lt;var Tt;function Mt(){return Mt=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},Mt.apply(this,arguments)}l().string,l().node.isRequired,l().node.isRequired,l().node,l().oneOf(Object.keys({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"}}));const Pt=t=>e.createElement("svg",Mt({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 1000 1000"},t),Tt||(Tt=e.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"}))),At=window.ReactDOM;var $t,Ot,Ft;(Ot=$t||($t={})).Pop="POP",Ot.Push="PUSH",Ot.Replace="REPLACE",function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(Ft||(Ft={})),new Set(["lazy","caseSensitive","path","id","index","children"]),Error;const Bt=["post","put","patch","delete"],qt=(new Set(Bt),["get",...Bt]);new Set(qt),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred"),e.Component,e.startTransition,new Promise((()=>{})),e.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(e){}var Ut,Wt,zt,Ht;new Map,e.startTransition,At.flushSync,e.useId,"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,(Ht=Ut||(Ut={})).UseScrollRestoration="useScrollRestoration",Ht.UseSubmit="useSubmit",Ht.UseSubmitFetcher="useSubmitFetcher",Ht.UseFetcher="useFetcher",Ht.useViewTransitionState="useViewTransitionState",(zt=Wt||(Wt={})).UseFetcher="useFetcher",zt.UseFetchers="useFetchers",zt.UseScrollRestoration="useScrollRestoration",l().string.isRequired,l().string;const Dt=({href:t,children:s,...o})=>(0,e.createElement)(ce.Link,{target:"_blank",rel:"noopener noreferrer",...o,href:t},s,(0,e.createElement)("span",{className:"yst-sr-only"},/* translators: Hidden accessibility text. */
(0,r.__)("(Opens in a new browser tab)","wordpress-seo")));Dt.propTypes={href:l().string.isRequired,children:l().node},Dt.defaultProps={children:null};const Kt=e.forwardRef((function(t,s){return e.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:s},t),e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 8l4 4m0 0l-4 4m4-4H3"}))}));var jt,Yt,Gt;function Vt(){return Vt=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},Vt.apply(this,arguments)}const Zt=t=>e.createElement("svg",Vt({xmlns:"http://www.w3.org/2000/svg",id:"star-rating-half_svg__Layer_1","data-name":"Layer 1",viewBox:"0 0 500 475.53"},t),jt||(jt=e.createElement("defs",null,e.createElement("style",null,".star-rating-half_svg__cls-1{fill:#fbbf24}"))),Yt||(Yt=e.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"})),Gt||(Gt=e.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"})),e.createElement("path",{d:"m500 181.64-172.75-25.11L250 0v394.3l154.51 81.23L375 303.48l125-121.84z",style:{fill:"#f3f4f6"}}));function Qt(){return Qt=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},Qt.apply(this,arguments)}const Jt=t=>e.createElement("svg",Qt({xmlns:"http://www.w3.org/2000/svg","data-name":"Layer 1",viewBox:"0 0 500 475.53"},t),e.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 Xt,es,ts,ss,rs,os,as,ns,is;function ls(){return ls=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},ls.apply(this,arguments)}const cs=t=>e.createElement("svg",ls({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 500 500"},t),Xt||(Xt=e.createElement("path",{fill:"#a4286a",d:"M80 0h340a80 80 0 0 1 80 80v420H80a80 80 0 0 1-80-80V80A80 80 0 0 1 80 0z"})),es||(es=e.createElement("path",{fill:"#6c2548",d:"M437.61 2 155.89 500H500V80a80 80 0 0 0-62.39-78z"})),ts||(ts=e.createElement("path",{fill:"#fff",d:"M74.4 337.3v34.9c21.6-.9 38.5-8 52.8-22.5s27.4-38 39.9-72.9l92.6-248h-44.8L140.3 236l-37-116.2h-41l54.4 139.8a57.54 57.54 0 0 1 0 41.8c-5.5 14.2-15.4 30.9-42.3 35.9z"})),ss||(ss=e.createElement("circle",{cx:368.33,cy:124.68,r:97.34,fill:"#9fda4f",transform:"rotate(-45 368.335 124.68)"})),rs||(rs=e.createElement("path",{fill:"#77b227",d:"m416.2 39.93-95.74 169.51A97.34 97.34 0 1 0 416.2 39.93z"})),os||(os=e.createElement("path",{fill:"#fec228",d:"m294.78 254.75-.15-.08-.13-.07a63.6 63.6 0 0 0-62.56 110.76h.13a63.6 63.6 0 0 0 62.71-110.67z"})),as||(as=e.createElement("path",{fill:"#f49a00",d:"m294.5 254.59-62.56 110.76a63.6 63.6 0 1 0 62.56-110.76z"})),ns||(ns=e.createElement("path",{fill:"#ff4e47",d:"M222.31 450.07A38.16 38.16 0 0 0 203 416.83a38.18 38.18 0 1 0 19.41 33.27z"})),is||(is=e.createElement("path",{fill:"#ed261f",d:"m202.9 416.8-37.54 66.48a38.17 38.17 0 0 0 37.54-66.48z"}))),ds=({link:t,linkProps:s,isPromotionActive:o})=>{let a=(0,c.useMemo)((()=>(0,r.__)("Use AI to generate titles and meta descriptions, automatically redirect deleted pages, get 24/7 support, and much, much more!","wordpress-seo")),[]),n=we((0,r.sprintf)(/* translators: %1$s and %2$s expand to a span wrap to avoid linebreaks. %3$s expands to "Yoast SEO Premium". */
(0,r.__)("%1$sGet%2$s %3$s","wordpress-seo"),"<nowrap>","</nowrap>","Yoast SEO Premium"),{nowrap:(0,e.createElement)("span",{className:"yst-whitespace-nowrap"})});const i=o("black-friday-2024-promotion");return i&&(a=(0,c.useMemo)((()=>(0,r.__)("If you were thinking about upgrading, now's the time! 30% OFF ends 3rd Dec 11am (CET)","wordpress-seo")),[]),n=we((0,r.sprintf)(/* translators: %1$s and %2$s expand to a span wrap to avoid linebreaks. %3$s expands to "Yoast SEO Premium". */
(0,r.__)("%1$sBuy%2$s %3$s","wordpress-seo"),"<nowrap>","</nowrap>","Yoast SEO Premium"),{nowrap:(0,e.createElement)("span",{className:"yst-whitespace-nowrap"})})),(0,e.createElement)("div",{className:"yst-p-6 yst-rounded-lg yst-text-white yst-bg-primary-500 yst-shadow"},(0,e.createElement)("figure",{className:"yst-logo-square yst-w-16 yst-h-16 yst-mx-auto yst-overflow-hidden yst-border yst-border-white yst-rounded-xl yst-rounded-br-none yst-relative yst-z-10 yst-mt-[-2.6rem]"},(0,e.createElement)(cs,null)),i&&(0,e.createElement)("div",{className:"sidebar__sale_banner_container"},(0,e.createElement)("div",{className:"sidebar__sale_banner"},(0,e.createElement)("span",{className:"banner_text"},(0,r.__)("30% OFF - BLACK FRIDAY","wordpress-seo")))),(0,e.createElement)(ce.Title,{as:"h2",className:"yst-mt-6 yst-text-base yst-font-extrabold yst-text-white"},n),(0,e.createElement)("p",{className:"yst-mt-2"},a),(0,e.createElement)(ce.Button,{as:"a",variant:"upsell",href:t,target:"_blank",rel:"noopener",className:"yst-flex yst-justify-center yst-gap-2 yst-mt-4 focus:yst-ring-offset-primary-500",...s},(0,e.createElement)("span",null,i?(0,r.__)("Buy now","wordpress-seo"):n),(0,e.createElement)(Kt,{className:"yst-w-4 yst-h-4 yst-icon-rtl"})),(0,e.createElement)("p",{className:"yst-text-center yst-text-xs yst-mx-2 yst-font-light yst-leading-5 yst-mt-2"},(0,r.__)("30-day money back guarantee.","wordpress-seo")),(0,e.createElement)("hr",{className:"yst-border-t yst-border-primary-300 yst-my-4"}),(0,e.createElement)("a",{className:"yst-block yst-mt-4 yst-no-underline",href:"https://www.g2.com/products/yoast-yoast/reviews",target:"_blank",rel:"noopener noreferrer"},(0,e.createElement)("span",{className:"yst-font-medium yst-text-white hover:yst-underline"},(0,r.__)("Read reviews from real users","wordpress-seo")),(0,e.createElement)("span",{className:"yst-flex yst-gap-2 yst-mt-2 yst-items-center"},(0,e.createElement)(Pt,{className:"yst-w-5 yst-h-5"}),(0,e.createElement)("span",{className:"yst-flex yst-gap-1"},(0,e.createElement)(Jt,{className:"yst-w-5 yst-h-5"}),(0,e.createElement)(Jt,{className:"yst-w-5 yst-h-5"}),(0,e.createElement)(Jt,{className:"yst-w-5 yst-h-5"}),(0,e.createElement)(Jt,{className:"yst-w-5 yst-h-5"}),(0,e.createElement)(Zt,{className:"yst-w-5 yst-h-5"})),(0,e.createElement)("span",{className:"yst-text-sm yst-font-semibold yst-text-white"},"4.6 / 5"))))};ds.propTypes={link:l().string.isRequired,linkProps:l().object,isPromotionActive:l().func},ds.defaultProps={linkProps:{},isPromotionActive:P.noop};const us=({premiumLink:t,premiumUpsellConfig:s,isPromotionActive:o})=>{const a=o("black-friday-2024-promotion");return(0,e.createElement)(ce.Paper,{as:"div",className:"xl:yst-max-w-3xl"},a&&(0,e.createElement)("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-semibold"},(0,e.createElement)("div",null,(0,r.__)("30% OFF","wordpress-seo")),(0,e.createElement)("div",null,(0,r.__)("BLACK FRIDAY","wordpress-seo"))),(0,e.createElement)("div",{className:"yst-p-6 yst-flex yst-flex-col"},(0,e.createElement)(ce.Title,{as:"h2",size:"4",className:"yst-text-xl yst-text-primary-500"},(0,r.sprintf)(/* translators: %s expands to "Yoast SEO" Premium */
(0,r.__)("Upgrade to %s","wordpress-seo"),"Yoast SEO Premium")),(0,e.createElement)("ul",{className:"yst-grid yst-grid-cols-1 sm:yst-grid-cols-2 yst-gap-x-6 yst-list-disc yst-ps-[1em] yst-list-outside yst-text-slate-800 yst-mt-6"},ye().map(((t,s)=>(0,e.createElement)("li",{key:`upsell-benefit-${s}`},we(t,{strong:(0,e.createElement)("span",{className:"yst-font-semibold"})}))))),(0,e.createElement)(ce.Button,{as:"a",variant:"upsell",size:"extra-large",href:t,className:"yst-gap-2 yst-mt-4",target:"_blank",rel:"noopener",...s},a?(0,r.__)("Claim your 30% off now!","wordpress-seo"):(0,r.sprintf)(/* translators: %s expands to "Yoast SEO" Premium */
(0,r.__)("Explore %s now!","wordpress-seo"),"Yoast SEO Premium"),(0,e.createElement)(Kt,{className:"yst-w-4 yst-h-4 yst-icon-rtl"}))))};us.propTypes={premiumLink:l().string.isRequired,premiumUpsellConfig:l().object,isPromotionActive:l().func},us.defaultProps={premiumUpsellConfig:{},isPromotionActive:P.noop},l().string.isRequired,l().object.isRequired,l().string.isRequired,l().func.isRequired,e.forwardRef((function(t,s){return e.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:s},t),e.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"}))})),l().bool.isRequired,l().func,l().func,l().string.isRequired,l().string.isRequired,l().string.isRequired,l().string.isRequired;const ps=window.yoast.reactHelmet,ms=({videoId:t,thumbnail:s,wistiaEmbedPermission:o})=>{const[a,n]=(0,c.useState)(o.value?wt:ht),i=(0,c.useCallback)((()=>n(wt)),[n]),l=(0,c.useCallback)((()=>{o.value?i():n(yt)}),[o.value,i,n]),d=(0,c.useCallback)((()=>n(ht)),[n]),u=(0,c.useCallback)((()=>{o.set(!0),i()}),[o.set,i]);return(0,e.createElement)(e.Fragment,null,o.value&&(0,e.createElement)(ps.Helmet,null,(0,e.createElement)("script",{src:"https://fast.wistia.com/assets/external/E-v1.js",async:!0})),(0,e.createElement)("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"},a===ht&&(0,e.createElement)("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:l},(0,e.createElement)("img",{className:"yst-w-full yst-h-auto",alt:"",loading:"lazy",decoding:"async",...s})),a===yt&&(0,e.createElement)("div",{className:"yst-absolute yst-inset-0 yst-flex yst-flex-col yst-items-center yst-justify-center yst-bg-white"},(0,e.createElement)("p",{className:"yst-max-w-xs yst-mx-auto yst-text-center"},o.status===gt&&(0,e.createElement)(ce.Spinner,null),o.status!==gt&&(0,r.sprintf)(/* translators: %1$s expands to Yoast SEO. %2$s expands to Wistia. */
(0,r.__)("To see this video, you need to allow %1$s to load embedded videos from %2$s.","wordpress-seo"),"Yoast SEO","Wistia")),(0,e.createElement)("div",{className:"yst-flex yst-mt-6 yst-gap-x-4"},(0,e.createElement)(ce.Button,{type:"button",variant:"secondary",onClick:d,disabled:o.status===gt},(0,r.__)("Deny","wordpress-seo")),(0,e.createElement)(ce.Button,{type:"button",variant:"primary",onClick:u,disabled:o.status===gt},(0,r.__)("Allow","wordpress-seo")))),o.value&&a===wt&&(0,e.createElement)("div",{className:"yst-absolute yst-w-full yst-h-full yst-top-0 yst-right-0"},null===t&&(0,e.createElement)(ce.Spinner,{className:"yst-h-full yst-mx-auto"}),null!==t&&(0,e.createElement)("div",{className:`wistia_embed wistia_async_${t} videoFoam=true`}))))};ms.propTypes={videoId:l().string.isRequired,thumbnail:l().shape({src:l().string.isRequired,width:l().string,height:l().string}).isRequired,wistiaEmbedPermission:l().shape({value:l().bool.isRequired,status:l().string.isRequired,set:l().func.isRequired}).isRequired},e.forwardRef((function(t,s){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:s},t),e.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"}))})),l().bool.isRequired,l().func.isRequired,l().func,l().string;const gs=({onGiveConsent:t,learnMoreLink:s,privacyPolicyLink:o,termsOfServiceLink:a,imageLink:n})=>{const{onClose:i,initialFocus:l}=(0,ce.useModalContext)(),[d,u]=(0,ce.useToggleState)(!1),p=(0,c.useMemo)((()=>({src:n,width:"432",height:"244"})),[n]),m=we((0,r.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,r.__)("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,e.createElement)(Dt,{href:a}),a2:(0,e.createElement)(Dt,{href:o})}),[g,h]=(0,ce.useToggleState)(!1),y=(0,c.useCallback)((async()=>{h(),await t(),h()}),[t]);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"yst-px-10 yst-pt-10 yst-introduction-gradient yst-text-center"},(0,e.createElement)("div",{className:"yst-relative yst-w-full"},(0,e.createElement)("img",{className:"yst-w-full yst-h-auto yst-rounded-md yst-drop-shadow-md",alt:"",loading:"lazy",decoding:"async",...p}))),(0,e.createElement)("div",{className:"yst-px-10 yst-pb-4 yst-flex yst-flex-col yst-items-center"},(0,e.createElement)("div",{className:"yst-mt-4 yst-mx-1.5 yst-text-center"},(0,e.createElement)("h3",{className:"yst-text-slate-900 yst-text-lg yst-font-medium"},(0,r.sprintf)(/* translators: %s expands to Yoast AI. */
(0,r.__)("Grant consent for %s","wordpress-seo"),"Yoast AI")),(0,e.createElement)("div",{className:"yst-mt-2 yst-text-slate-600 yst-text-sm"},we((0,r.sprintf)(/* translators: %1$s is a break tag; %2$s and %3$s are anchor tag; %4$s is the arrow icon. */
(0,r.__)("Enable AI-powered SEO! Use all AI Generate and Optimize 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,e.createElement)(Dt,{href:s,className:"yst-inline-flex yst-items-center yst-gap-1 yst-no-underline yst-font-medium",variant:"primary"}),ArrowNarrowRightIcon:(0,e.createElement)(Ct,{className:"yst-w-4 yst-h-4 rtl:yst-rotate-180"}),br:(0,e.createElement)("br",null)}))),(0,e.createElement)("div",{className:"yst-flex yst-w-full yst-mt-6"},(0,e.createElement)("hr",{className:"yst-w-full yst-text-gray-200"})),(0,e.createElement)("div",{className:"yst-flex yst-items-start yst-mt-4"},(0,e.createElement)("input",{type:"checkbox",id:"yst-ai-consent-checkbox",name:"yst-ai-consent-checkbox",checked:d,value:d?"true":"false",onChange:u,className:"yst-checkbox__input",ref:l}),(0,e.createElement)("label",{htmlFor:"yst-ai-consent-checkbox",className:"yst-label yst-checkbox__label yst-text-xs yst-font-normal yst-text-slate-500"},m)),(0,e.createElement)("div",{className:"yst-w-full yst-flex yst-mt-4"},(0,e.createElement)(ce.Button,{as:"button",className:"yst-grow",size:"large",disabled:!d,onClick:y},g&&(0,e.createElement)(ce.Spinner,{className:"yst-me-2"}),(0,r.__)("Grant consent","wordpress-seo"))),(0,e.createElement)(ce.Button,{as:"button",className:"yst-mt-4",variant:"tertiary",onClick:i},(0,r.__)("Close","wordpress-seo"))))};gs.propTypes={onGiveConsent:l().func.isRequired,learnMoreLink:l().string.isRequired,privacyPolicyLink:l().string.isRequired,termsOfServiceLink:l().string.isRequired,imageLink:l().string.isRequired};const hs=()=>{const t=(0,k.useSelect)((e=>e(qe).selectLink("https://yoa.st/ai-common-errors")),[]),s=(0,k.useSelect)((e=>e(qe).selectAdminLink("?page=wpseo_page_support")),[]);return(0,e.createElement)(ce.Alert,{variant:"error"},(0,e.createElement)("span",{className:"yst-block yst-font-medium"},(0,r.__)("Something went wrong","wordpress-seo")),(0,e.createElement)("p",{className:"yst-mt-2"},we((0,r.sprintf)(/* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */
(0,r.__)("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,e.createElement)(Dt,{variant:"error",href:t}),a2:(0,e.createElement)(Dt,{variant:"error",href:s})})))},ys=()=>{const t=(0,k.useSelect)((e=>e(qe).selectLink("https://yoa.st/ai-common-errors")),[]),s=(0,k.useSelect)((e=>e(qe).selectAdminLink("?page=wpseo_page_support")),[]);return(0,e.createElement)(ce.Alert,{variant:"error"},(0,e.createElement)("span",{className:"yst-block yst-font-medium"},(0,r.__)("Not enough content","wordpress-seo")),(0,e.createElement)("p",{className:"yst-mt-2"},we((0,r.sprintf)(/* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */
(0,r.__)("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,e.createElement)(Dt,{variant:"error",href:t}),a2:(0,e.createElement)(Dt,{variant:"error",href:s})})))},ws=()=>{const t=(0,k.useSelect)((e=>e(qe).selectAdminLink("?page=wpseo_page_settings#/site-features#card-wpseo-keyword_analysis_active")),[]),s=(0,c.useCallback)((()=>{window.location.reload()}),[]),{onClose:o}=(0,ce.useModalContext)();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(ce.Alert,{variant:"error"},(0,e.createElement)("span",{className:"yst-block yst-font-medium"},(0,r.__)("SEO analysis required","wordpress-seo")),(0,e.createElement)("p",{className:"yst-mt-2"},we((0,r.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,r.__)("%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,e.createElement)(Dt,{variant:"error",href:t})}))),(0,e.createElement)("div",{className:"yst-mt-6 yst-mb-1 yst-flex yst-space-x-3 rtl:yst-space-x-reverse yst-place-content-end"},(0,e.createElement)(ce.Button,{variant:"secondary",onClick:o},(0,r.__)("Close","wordpress-seo")),(0,e.createElement)(ce.Button,{className:"yst-revoke-button",variant:"primary",onClick:s},(0,r.__)("Refresh page","wordpress-seo"))))},fs=()=>{const t=(0,k.useSelect)((e=>e(qe).selectLink("https://yoa.st/ai-generator-rate-limit-help")),[]);return(0,e.createElement)(ce.Alert,{variant:"error"},(0,e.createElement)("span",{className:"yst-block yst-font-medium"},(0,r.__)("You've reached the Yoast AI rate limit","wordpress-seo")),(0,e.createElement)("p",{className:"yst-mt-2"},we((0,r.sprintf)(/* translators: %1$s expands to an opening tag. %2$s expands to a closing tag. */
(0,r.__)("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,e.createElement)(Dt,{variant:"error",href:t})})))},bs=({invalidSubscriptions:t=[]})=>{const s=(0,k.useSelect)((e=>e(qe).selectLink("https://yoa.st/ai-generator-activate-premium")),[]),o=(0,k.useSelect)((e=>e(qe).selectLink("https://yoa.st/ai-generator-new-premium")),[]),a=(0,k.useSelect)((e=>e(qe).selectLink("https://yoa.st/ai-generator-activate-yoast-woocommerce")),[]),n=(0,k.useSelect)((e=>e(qe).selectLink("https://yoa.st/ai-generator-new-yoast-woocommerce")),[]),i=(0,k.useSelect)((e=>e(qe).selectLink("https://yoa.st/ai-generator-activate-woocommerce-premium-bundle")),[]),l=(0,k.useSelect)((e=>e(qe).selectLink("https://yoa.st/ai-generator-new-woocommerce-premium-bundle")),[]),{onClose:d}=(0,ce.useModalContext)(),u=(0,c.useCallback)((async()=>{try{await C()({path:"yoast/v1/ai_generator/bust_subscription_cache",method:"POST",parse:!1})}catch(e){console.error(e)}window.location.reload()}),[]);let p,m,g;1===t.length&&(p=t[0],m="Yoast SEO Premium"===p?s:a,g="Yoast SEO Premium"===p?o:n);const h=we((0,r.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,r.__)("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"),p,"MyYoast","<Activate>","</Activate>","<New>","</New>"),{Activate:(0,e.createElement)(Dt,{variant:"error",href:m}),New:(0,e.createElement)(Dt,{variant:"error",href:g})}),y=we((0,r.sprintf)(
/**
   * translators:
   * %1$s expands to MyYoast.
   * %2$s expands to Yoast SEO Premium.
   * %3$s expands to Yoast WooCommerce SEO.
   * %4$s expands to Yoast WooCommerce SEO Premium bundle.
   * %5$s and %6$s expand to an opening and closing anchor tag, respectively, to activate your subscription.
   * %7$s and %8$s expand to an opening and closing anchor tag, respectively, to get a new subscription.
   **/
(0,r.__)("To access this feature, you need active %2$s and %3$s subscriptions. Please %5$sactivate your subscriptions in %1$s%6$s or %7$sget a new %4$s%8$s. Afterward, refresh this page. It may take up to 30 seconds for the feature to function correctly.","wordpress-seo"),"MyYoast","Yoast SEO Premium","Yoast WooCommerce SEO","Yoast WooCommerce SEO Premium bundle","<Activate>","</Activate>","<New>","</New>"),{Activate:(0,e.createElement)(Dt,{variant:"error",href:i}),New:(0,e.createElement)(Dt,{variant:"error",href:l})});return(0,e.createElement)(c.Fragment,null,(0,e.createElement)(ce.Alert,{variant:"error"},(0,e.createElement)("span",{className:"yst-block yst-font-medium"},(0,r.__)("Subscription required","wordpress-seo")),(0,e.createElement)("p",{className:"yst-mt-2"},1===t.length&&h,t.length>1&&y)),(0,e.createElement)("div",{className:"yst-mt-6 yst-mb-1 yst-flex yst-space-x-3 rtl:yst-space-x-reverse yst-place-content-end"},(0,e.createElement)(ce.Button,{variant:"secondary",onClick:d},(0,r.__)("Close","wordpress-seo")),(0,e.createElement)(ce.Button,{variant:"primary",onClick:u},(0,r.__)("Refresh page","wordpress-seo"))))};bs.propTypes={invalidSubscriptions:l().array};const Es=()=>{const t=(0,k.useSelect)((e=>e(qe).selectLink("https://yoa.st/ai-common-errors")),[]),s=(0,k.useSelect)((e=>e(qe).selectAdminLink("?page=wpseo_page_support")),[]);return(0,e.createElement)(ce.Alert,{variant:"error"},(0,e.createElement)("span",{className:"yst-block yst-font-medium"},(0,r.__)("Connection timeout","wordpress-seo")),(0,e.createElement)("p",{className:"yst-mt-2"},we((0,r.sprintf)(/* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */
(0,r.__)("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,e.createElement)(Dt,{variant:"error",href:t}),a2:(0,e.createElement)(Dt,{variant:"error",href:s})})))},vs=()=>{const t=(0,k.useSelect)((e=>e(qe).selectAdminLink("?page=wpseo_page_support")),[]);return(0,e.createElement)(ce.Alert,{variant:"error"},(0,e.createElement)("span",{className:"yst-block yst-font-medium"},(0,r.__)("Usage policy violation","wordpress-seo")),(0,e.createElement)("p",{className:"yst-mt-2"},we((0,r.sprintf)(
/* translators: %1$s, %2$s, %3$s, %4$s are anchor tags.
   * %5$s expands to OpenAI.
   */
(0,r.__)("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,e.createElement)(Dt,{variant:"error",href:"https://openai.com/policies/usage-policies"}),a2:(0,e.createElement)(Dt,{variant:"error",href:t})})))},ks=({errorMessage:t=""})=>{const s=(0,k.useSelect)((e=>e(qe).selectAdminLink("?page=wpseo_page_support")),[]);return(0,e.createElement)(ce.Alert,{variant:"error"},(0,e.createElement)("span",{className:"yst-block yst-font-medium"},(0,r.__)("Something went wrong","wordpress-seo")),(0,e.createElement)("p",{className:"yst-mt-2"},(0,r.sprintf)(/* translators: %s is the error response of the request. */
(0,r.__)("The request came back with the following error: '%s'.","wordpress-seo"),t)),(0,e.createElement)("p",{className:"yst-mt-2"},we((0,r.sprintf)(/* translators: %1$s expands to an opening tag. %2$s expands to a closing tag. */
(0,r.__)("Please try again later. If the issue persists, please %1$scontact our support team%2$s.","wordpress-seo"),"<a>","</a>"),{a:(0,e.createElement)(Dt,{variant:"error",href:s})})))};ks.propTypes={errorMessage:l().string};const xs=()=>{const t=(0,k.useSelect)((e=>e(qe).selectAdminLink("plugins.php")),[]);return(0,e.createElement)(ce.Alert,{variant:"error"},(0,e.createElement)("span",{className:"yst-block yst-font-medium"},(0,r.__)("Something went wrong","wordpress-seo")),(0,e.createElement)("p",{className:"yst-mt-2"},we((0,r.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,r.__)("The version of %1$s is outdated. Please upgrade %1$s %2$shere%3$s!","wordpress-seo"),"Yoast SEO Premium","<a>","</a>"),{a:(0,e.createElement)(Dt,{variant:"error",href:t})})))},_s=()=>{const t=(0,k.useSelect)((e=>e(qe).selectLink("https://yoa.st/ai-common-errors")),[]),s=(0,k.useSelect)((e=>e(qe).selectAdminLink("?page=wpseo_page_support")),[]);return(0,e.createElement)(ce.Alert,{variant:"error"},(0,e.createElement)("span",{className:"yst-block yst-font-medium"},(0,r.__)("Yoast AI cannot reach your site","wordpress-seo")),(0,e.createElement)("p",{className:"yst-mt-2"},we((0,r.sprintf)(/* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */
(0,r.__)("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,e.createElement)(Dt,{variant:"error",href:t}),a2:(0,e.createElement)(Dt,{variant:"error",href:s})})))},Ss=({errorCode:t,errorIdentifier:s="",errorMessage:r=""})=>{switch(t){case 400:switch(s){case"SITE_UNREACHABLE":return(0,e.createElement)(_s,null);case"WP_HTTP_REQUEST_ERROR":return(0,e.createElement)(ks,{errorMessage:r});default:return(0,e.createElement)(hs,null)}case 429:return(0,e.createElement)(fs,null);default:return(0,e.createElement)(hs,null)}};Ss.propTypes={errorCode:l().number.isRequired,errorIdentifier:l().string,errorMessage:l().string};const Cs=({currentSubscriptions:t,isSeoAnalysisActive:s=!0})=>{const{isPremium:r,usageCountStatus:o,usageCountError:a,isWooProductEntity:n,isWooSeoActive:i}=(0,k.useSelect)((e=>{const t=e(qe);return{isPremium:t.getIsPremium(),usageCountStatus:e(Be).selectUsageCountStatus(),usageCountError:e(Be).selectUsageCountError(),isWooProductEntity:t.getIsWooProductEntity(),isWooSeoActive:t.getIsWooSeoActive()}}),[]),l=(0,c.useMemo)((()=>!t.wooCommerceSubscription&&n),[t.wooCommerceSubscription]),d=(0,c.useMemo)((()=>{const e=[];return!r&&!n||t.premiumSubscription||e.push("Yoast SEO Premium"),l&&i&&e.push("Yoast WooCommerce SEO"),e}),[r,t.premiumSubscription,l,i,n]);return d.length>0?(0,e.createElement)(bs,{invalidSubscriptions:d}):s?o===Ze.error?(0,e.createElement)(Ss,{...a}):void 0:(0,e.createElement)(ws,null)};Cs.propTypes={currentSubscriptions:l().object.isRequired,isSeoAnalysisActive:l().bool};const Rs=({onStartGenerating:t})=>{const{termsOfServiceLink:s,privacyPolicyLink:r,learnMoreLink:o,imageLink:a,consentEndpoint:n}=(0,k.useSelect)((e=>({termsOfServiceLink:e(qe).selectLink("https://yoa.st/ai-generator-terms-of-service"),privacyPolicyLink:e(qe).selectLink("https://yoa.st/ai-generator-privacy-policy"),learnMoreLink:e(qe).selectLink("https://yoa.st/ai-generator-learn-more"),imageLink:e(qe).selectImageLink("ai-consent.png"),consentEndpoint:e(Be).selectAiGeneratorConsentEndpoint()})),[]),{storeAiGeneratorConsent:i}=(0,k.useDispatch)(Be),l=(0,c.useCallback)((async()=>{await i(!0,n),t()}),[i,t,n]);return(0,e.createElement)(gs,{termsOfServiceLink:s,privacyPolicyLink:r,learnMoreLink:o,imageLink:a,onGiveConsent:l})};Rs.propTypes={onStartGenerating:l().func.isRequired};const Ls=e.forwardRef((function(t,s){return e.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:s},t),e.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"}))})),Is=e.forwardRef((function(t,s){return e.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:s},t),e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"}))})),Ns=/(?<start><\/badge>|^(?!<badge>))(?<wrap>[\s\S]+?)(?<end><badge>|$)/g,Ts=({total:t,current:s,onNavigate:o,disabled:a=!1,...n})=>(0,e.createElement)("div",{className:"yst-flex yst-justify-between yst-gap-x-2 yst-items-start"},(0,e.createElement)("p",{className:"yst-text-slate-500 yst-text-xxs yst-mt-1"},(0,r.__)("Text generated by AI may be offensive or inaccurate.","wordpress-seo")),t>1&&(0,e.createElement)(ce.Pagination,{className:"yst-shrink-0",current:s,total:t,onNavigate:o,disabled:a,variant:"text"
/* translators: Hidden accessibility text. */,screenReaderTextPrevious:(0,r.__)("Previous","wordpress-seo")
/* translators: Hidden accessibility text. */,screenReaderTextNext:(0,r.__)("Next","wordpress-seo"),...n})),Ms=({height:t})=>{const[s,o]=(0,c.useState)(""),{onClose:a}=(0,ce.useModalContext)(),{editType:n,previewType:i,contentType:l}=dt(),d=(()=>{const{editType:e,previewType:t}=dt();let s="SEO";switch(t){case We:s="social";break;case ze:s="X"}switch(e){case He:return(0,r.sprintf)(/* translators: %s is the type of title. */
(0,r.__)("Generated %s titles","wordpress-seo"),s);case De:return t===Ue&&(s="meta"),(0,r.sprintf)(/* translators: %s is the type of description. */
(0,r.__)("Generated %s descriptions","wordpress-seo"),s)}})(),u=(()=>{const{editType:e,previewType:t}=dt();let s="SEO";switch(t){case We:s="social";break;case ze:s="X"}switch(e){case He:return(0,r.sprintf)(/* translators: %s is the type of title. */
(0,r.__)("Apply %s title","wordpress-seo"),s);case De:return t===Ue&&(s="meta"),(0,r.sprintf)(/* translators: %s is the type of description. */
(0,r.__)("Apply %s description","wordpress-seo"),s)}})(),p=ut(),{suggestions:m,fetchSuggestions:g,setSelectedSuggestion:h}=oo(),y=eo(),{addAppliedSuggestion:w,addUsageCount:f}=(0,k.useDispatch)(Be),{isUsageCountLimitReached:b,isWooProductEntity:E,hasValidPremiumSubscription:v,hasValidWooSubscription:x}=(0,k.useSelect)((e=>{const t=e(Be),s=e(qe);return{isUsageCountLimitReached:t.isUsageCountLimitReached(),isPremium:s.getIsPremium(),isWooProductEntity:s.getIsWooProductEntity(),isWooSeoActive:s.getIsWooSeoActive(),hasValidPremiumSubscription:t.selectPremiumSubscription(),hasValidWooSubscription:t.selectWooCommerceSubscription()}}),[]),_=(0,c.useMemo)((()=>m.status===Ze.loading||!(x||!b||!E)||!(v||!b)),[v,b,m.status,E,x]),S=(0,ce.usePrevious)(t),C=m.status===Ze.success?t:S,R=`calc(${0===C?"50%":C/2+"px"} - 40vh)`,[L,I]=(0,c.useState)(!1),N=(0,c.useCallback)((e=>{I(e.target.offsetHeight!==e.target.scrollHeight)}),[I]),T=pt(N),M=no(),A=(()=>{const e=(()=>{const{previewType:e}=dt();return(0,c.useMemo)((()=>{switch(e){case Ue:return()=>(0,k.select)(qe).getSnippetEditorData().description;case We:return(0,k.select)(qe).getFacebookDescriptionOrFallback;case ze:return(0,k.select)(qe).getTwitterDescriptionOrFallback;default:return(0,P.constant)("")}}),[e])})();return(0,c.useMemo)(e,[e])})(),$=it(),O=(0,c.useMemo)((()=>n===He?{[Ye[l]]:m.selected}:{}),[n,l,m.selected]),F=(0,c.useMemo)((()=>$(M,{overrides:O,contentType:l})),[$,M,n,l,m.selected]),B=(0,c.useMemo)((()=>$(M,{overrides:{...O,sep:"",sitename:""},contentType:l})),[$,M,n,l,m.selected]),q=(0,c.useMemo)((()=>n===De?m.selected:$(A,{editType:De})),[$,A,n,m.selected]),U=(0,c.useCallback)((e=>$(M,{overrides:{[Ye[l]]:e},key:"badge",applyPluggable:!1,contentType:l})),[$,M,l]),{currentPage:W,setCurrentPage:z,isOnLastPage:H,totalPages:D,getItemsOnCurrentPage:K}=(({totalItems:e=0,perPage:t=5})=>{const[s,r]=(0,c.useState)(1),o=(0,c.useMemo)((()=>Math.ceil(e/t)),[e,t]),a=(0,c.useMemo)((()=>s*t),[s,t]),n=(0,c.useMemo)((()=>a-t),[a,t]),i=(0,c.useMemo)((()=>1===s),[s]),l=(0,c.useMemo)((()=>s===o),[s,o]),d=(0,c.useCallback)((()=>{s>1&&r(s-1)}),[s,r]),u=(0,c.useCallback)((()=>{s<o&&r(s+1)}),[s,r,o]),p=(0,c.useCallback)((e=>(0,P.slice)(e,n,a)),[n,a]);return{currentPage:s,setCurrentPage:r,totalPages:o,isOnFirstPage:i,isOnLastPage:l,previousPage:d,nextPage:u,firstOnPage:n,lastOnPage:a,getItemsOnCurrentPage:p}})({totalItems:m.status===Ze.loading||m.status===Ze.error?m.entities.length+5:m.entities.length,perPage:5}),j=(0,c.useMemo)((()=>(0,P.map)(K(m.entities),(t=>{let s=t;return n===He&&(s=U(t),s=s.replace(Ns,((e,t,s,r,o,a,{start:n,wrap:i,end:l})=>{const c=i.trim();return 0===c.length?`${n}${i}${l}`:`${n}<span>${c}</span>${l}`})),s=we(s,{badge:(0,e.createElement)(ce.Badge,{className:"yst-me-2 last:yst-me-0",variant:"plain"}," "),span:(0,e.createElement)("span",{className:"yst-flex yst-items-center yst-me-2 last:yst-me-0"})})),{value:t,label:s}}))),[m.entities,K,n,U]),Y=(0,c.useMemo)((()=>m.status!==Ze.error||m.status===Ze.error&&!H),[m.status,H]),G=(0,c.useMemo)((()=>m.status===Ze.loading&&H),[m.status,H]),V=(0,c.useMemo)((()=>m.status===Ze.error&&H),[m.status,H]),Z=(0,c.useCallback)((()=>{_||(z(m.status===Ze.error?D:D+1),g().then((e=>{e===Qe&&f()})))}),[g,m.status,D,z,h,b]),Q=(0,c.useCallback)((()=>o("")),[o]),J=to(),X=(0,c.useCallback)((()=>{const e=n===He?M.replace(new RegExp(Ge[l]+"( Archives)?"),m.selected):m.selected;J(e),w({editType:n,previewType:i,suggestion:m.selected}),a()}),[J,n,i,m.selected,M,a,w]);return((e,t=[])=>{const s=(0,c.useRef)(!1);(0,c.useEffect)((()=>{s.current||(s.current=!0,e().finally((()=>{s.current=!1})))}),[e,t])})((()=>""===s?g().then((e=>{o(e),e===Qe&&f()})):Promise.resolve()),[s,f,g]),s===Je||m.status===Ze.error&&402===m.error.code?(0,e.createElement)("div",{className:"yst-flex yst-flex-col yst-space-y-6 yst-mt-6"},(0,e.createElement)(Br,{errorCode:m.error.code,errorIdentifier:m.error.errorIdentifier,invalidSubscriptions:m.error.missingLicenses,showActions:!0,onRetry:Q,errorMessage:m.error.message})):(0,e.createElement)(c.Fragment,null,(0,e.createElement)(ce.Modal.Container.Content,{ref:T,className:"yst-flex yst-flex-col yst-py-6 yst-space-y-2"},(0,e.createElement)(y,{title:F,description:q,status:m.status,titleForLength:B,showPreviewSkeleton:""===s,showLengthProgress:!G}),Y&&(G?(0,e.createElement)(Hr,{idSuffix:p,suggestionClassNames:n===He?[["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,e.createElement)(c.Fragment,null,(0,e.createElement)("div",{className:"yst-flex yst-space-y-4"},(0,e.createElement)(ce.Label,{as:"span",className:"yst-flex-grow yst-cursor-default yst-mt-auto"},d),(0,e.createElement)(ce.Button,{variant:"secondary",size:"small",onClick:m.status===Ze.loading?P.noop:Z,isLoading:m.status===Ze.loading,disabled:_},m.status!==Ze.loading&&(0,e.createElement)(Ls,{className:"yst--ms-1 yst-me-2 yst-h-4 yst-w-4 yst-text-gray-400"}),(0,r.__)("Generate 5 more","wordpress-seo"))),(0,e.createElement)(Wr,{idSuffix:p,suggestions:j,selected:m.selected,onChange:h}),(0,e.createElement)(Ts,{current:W,total:D,onNavigate:z,disabled:m.status===Ze.loading||V}))),m.status===Ze.error&&H&&(0,e.createElement)(c.Fragment,null,(0,e.createElement)("div",{className:"yst-mt-8"}),(0,e.createElement)(Br,{errorCode:m.error.code,errorIdentifier:m.error.errorIdentifier,invalidSubscriptions:m.error.missingLicenses,errorMessage:m.error.message}),(0,e.createElement)(Ts,{current:W,total:D,onNavigate:z,disabled:m.status===Ze.loading}))),(0,e.createElement)(ce.Modal.Container.Footer,null,L&&(0,e.createElement)("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,e.createElement)("hr",{className:"yst-mb-6 yst--mx-6"}),(0,e.createElement)("div",{className:"sm:yst-flex sm:yst-justify-end sm:yst-space-x-2 sm:rtl:yst-space-x-reverse"},(0,e.createElement)("div",{className:"yst-hidden sm:yst-inline"},(0,e.createElement)(ce.Button,{variant:"secondary",onClick:a},(0,r.__)("Close","wordpress-seo"))),(0,e.createElement)("div",{className:"yst-block sm:yst-inline"},(0,e.createElement)(ce.Button,{className:"yst-w-full sm:yst-w-auto",variant:"primary",onClick:X,disabled:""===m.selected||m.status===Ze.loading||V},(0,e.createElement)(Is,{className:"yst--ms-1 yst-me-1 yst-h-4 yst-w-4 yst-text-white"}),u)),(0,e.createElement)("div",{className:"yst-mt-3 sm:yst-hidden"},(0,e.createElement)(ce.Button,{variant:"secondary",onClick:a,className:"yst-w-full sm:yst-w-auto"},(0,r.__)("Close","wordpress-seo"))))),(0,e.createElement)(ce.Notifications,{className:"yst-mx-[calc(50%-50vw)] yst-transition-all",style:{marginTop:R},position:"bottom-left"},m.status!==Ze.loading&&(0,e.createElement)(Xr,{className:"yst-mx-[calc(50%-50vw)] yst-transition-all"}),(m.status===Ze.success||m.status===Ze.loading)&&(0,e.createElement)(Kr,null)))};Ms.propTypes={height:l().number.isRequired};var Ps=s(4530),As=s.n(Ps);l().func.isRequired;const $s=({title:t,description:s,status:o,titleForLength:a,showPreviewSkeleton:n,showLengthProgress:i})=>{const l=(0,k.useSelect)((e=>e(qe).getSnippetEditorMode()),[]),[d,u]=(0,c.useState)(l),{editType:p}=dt(),m=ut(),g=ao({editType:p,title:a,description:s});return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"yst-mb-2 lg:yst-flex"},(0,e.createElement)(ce.Label,{as:"span",className:"yst-flex-grow yst-cursor-default"},(0,r.__)("Google preview","wordpress-seo")),(0,e.createElement)(Ws,{mode:d,idSuffix:m,onChange:u,disabled:o===Ze.loading})),n?(0,e.createElement)(qs,null):(0,e.createElement)(Bs,{mode:d,title:t,description:s}),(0,e.createElement)("div",{className:"yst-pt-4"},(0,e.createElement)(ce.Label,{as:"span",className:"yst-flex-grow yst-cursor-default"},p===He?(0,r.__)("SEO title width","wordpress-seo"):(0,r.__)("Meta description length","wordpress-seo")),(0,e.createElement)(Us,{className:"yst-mt-2",progress:i?g.actual:0,min:0,max:g.max,score:g.score})))};$s.propTypes={title:l().string.isRequired,description:l().string.isRequired,status:l().oneOf(Object.keys(Ze)).isRequired,titleForLength:l().string.isRequired,showPreviewSkeleton:l().bool.isRequired,showLengthProgress:l().bool.isRequired};const Os=window.yoast.searchMetadataPreviews,Fs=/mobi/i,Bs=({mode:t,title:s,description:r})=>{var o,a;const n=(0,k.useSelect)((e=>e(qe).getBaseUrlFromSettings()),[]),i=(0,k.useSelect)((e=>e(qe).getSnippetEditorData().slug||""),[]),l=(0,k.useSelect)((e=>e(qe).getDateFromSettings()),[]),d=(0,k.useSelect)((e=>e(qe).getFocusKeyphrase()),[]),u=(0,k.useSelect)((e=>e(qe).getSnippetEditorPreviewImageUrl()),[]),p=(0,k.useSelect)((e=>e(qe).getSiteIconUrlFromSettings()),[]),m=(0,k.useSelect)((e=>e(qe).getShoppingData()),[]),g=(0,k.useSelect)((e=>e(qe).getSnippetEditorWordsToHighlight()),[]),h=(0,k.useSelect)((e=>e(qe).getSiteName()),[]),y=(0,k.useSelect)((e=>e(qe).getContentLocale()),[]),w=(0,c.useMemo)((()=>n+i),[n,i]),f=(0,c.useMemo)((()=>{var e,t;return Fs.test(null===(e=window)||void 0===e||null===(t=e.navigator)||void 0===t?void 0:t.userAgent)}),[null===(o=window)||void 0===o||null===(a=o.navigator)||void 0===a?void 0:a.userAgent]);return(0,e.createElement)("div",{className:`yst-bg-slate-200 yst--mx-6 ${t}${f?" yst-user-agent__mobile":""}`},(0,e.createElement)(Os.SnippetPreview,{title:s,description:r,mode:t,url:w,keyword:d,date:l,faviconSrc:p,mobileImageSrc:u,wordsToHighlight:g,siteName:h,locale:y,shoppingData:m,onMouseUp:P.noop}))};Bs.propTypes={mode:l().oneOf(Object.keys(Ve)).isRequired,title:l().string.isRequired,description:l().string.isRequired};const qs=()=>(0,e.createElement)("div",{className:"yst-max-w-[400px] yst-py-4 yst-px-3 yst-border yst-rounded-lg yst-w-full yst-mx-auto"},(0,e.createElement)("div",{className:"yst-flex yst-gap-x-3"},(0,e.createElement)(ce.SkeletonLoader,{className:"yst-flex-shrink-0 yst-h-7 yst-w-7 yst-rounded-full"}),(0,e.createElement)("div",{className:"yst-flex yst-flex-col yst-w-full yst-gap-y-1"},(0,e.createElement)(ce.SkeletonLoader,{className:"yst-h-3 yst-w-1/3"}),(0,e.createElement)(ce.SkeletonLoader,{className:"yst-h-2.5 yst-w-10/12"}))),(0,e.createElement)(ce.SkeletonLoader,{className:"yst-h-4 yst-w-full yst-mt-6 yst-mb-4"}),(0,e.createElement)(ce.SkeletonLoader,{className:"yst-h-3 yst-w-full"}),(0,e.createElement)(ce.SkeletonLoader,{className:"yst-h-3 yst-w-10/12 yst-mt-2.5"})),Us=({className:t="",progress:s,max:r,score:o})=>{const a=(0,c.useMemo)((()=>(e=>e>=7?"yst-score-good":e>=5?"yst-score-ok":"yst-score-bad")(o)),[o]);return(0,e.createElement)(ce.ProgressBar,{className:As()("yst-length-progress-bar",a,t),progress:s,min:0,max:r})};Us.propTypes={className:l().string,progress:l().number.isRequired,max:l().number.isRequired,score:l().number.isRequired};const Ws=({idSuffix:t,mode:s,onChange:o,disabled:a})=>{const n=(0,c.useCallback)((({target:e})=>e.checked&&o(e.value)),[o]);return(0,e.createElement)(ce.RadioGroup,{id:`yst-ai-mode__${t}`,className:"yst-ai-mode yst-pt-2 lg:yst-pt-0",disabled:a},(0,e.createElement)(ce.RadioGroup.Radio,{id:`yst-ai-mode__mobile__${t}`,name:`yst-ai-mode__${t}`,label:(0,r.__)("Mobile result","wordpress-seo"),value:Ve.mobile,checked:s===Ve.mobile,onChange:n,disabled:a}),(0,e.createElement)(ce.RadioGroup.Radio,{id:`yst-ai-mode__desktop__${t}`,name:`yst-ai-mode__${t}`,label:(0,r.__)("Desktop result","wordpress-seo"),value:Ve.desktop,checked:s===Ve.desktop,onChange:n,disabled:a}))};Ws.propTypes={idSuffix:l().string.isRequired,mode:l().oneOf(Object.keys(Ve)).isRequired,onChange:l().func.isRequired,disabled:l().bool.isRequired};const zs=({title:t,description:s,showPreviewSkeleton:o})=>(0,e.createElement)("div",null,(0,e.createElement)("div",{className:"yst-flex yst-mb-6"},(0,e.createElement)(ce.Label,{as:"span",className:"yst-flex-grow yst-cursor-default"},(0,r.__)("Social preview","wordpress-seo"))),o?(0,e.createElement)(Or,null):(0,e.createElement)($r,{title:t,description:s}));zs.propTypes={title:l().string.isRequired,description:l().string.isRequired,showPreviewSkeleton:l().bool.isRequired};const Hs=u().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"};
`,Ds=t=>{const{siteUrl:s}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",{className:"screen-reader-text"},s),(0,e.createElement)(Hs,{"aria-hidden":"true"},(0,e.createElement)("span",null,s)))};Ds.propTypes={siteUrl:l().string.isRequired};const Ks=Ds,js=window.yoast.socialMetadataForms,Ys=u().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;
	}
`,Gs=u().img`
	&& {
		height: 100%;
		position: absolute;
		width: 100%;
		object-fit: cover;
	}
`,Vs=u().div`
	padding-bottom: ${e=>e.aspectRatio}%;
`,Zs=({imageProps:t,width:s,height:r,imageMode:o="landscape"})=>"landscape"===o?(0,e.createElement)(Vs,{aspectRatio:t.aspectRatio},(0,e.createElement)(Gs,{src:t.src,alt:t.alt})):(0,e.createElement)(Ys,{src:t.src,alt:t.alt,width:s,height:r,imageProperties:t});function Qs(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 Js(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 Xs(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,js.determineFacebookImageMode)(r));const a=function(e){return"Twitter"===e?js.TWITTER_IMAGE_SIZES:js.FACEBOOK_IMAGE_SIZES}(t),n=function(e,t,s){return"square"===s&&t.width===t.height?{width:e.squareWidth,height:e.squareHeight}:Js(t,Qs(e,t,s))}(a,r,o);return{mode:o,height:n.height,width:n.width}}async function er(e,t,s=!1){try{return{imageProperties:await Xs(e,t,s),status:"loaded"}}catch(e){return{imageProperties:null,status:"errored"}}}Zs.propTypes={imageProps:l().shape({src:l().string.isRequired,alt:l().string.isRequired,aspectRatio:l().number.isRequired}).isRequired,width:l().number.isRequired,height:l().number.isRequired,imageMode:l().string};const tr=u().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: ${T.colors.$color_white};
`,sr=u().div`
	box-sizing: border-box;
	max-width: ${js.FACEBOOK_IMAGE_SIZES.landscapeWidth}px;
	height: ${js.FACEBOOK_IMAGE_SIZES.landscapeHeight}px;
	background-color: ${T.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 rr extends e.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 er(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:js.FACEBOOK_IMAGE_SIZES.squareHeight+"px",width:js.FACEBOOK_IMAGE_SIZES.squareWidth+"px"};case"portrait":return{height:js.FACEBOOK_IMAGE_SIZES.portraitHeight+"px",width:js.FACEBOOK_IMAGE_SIZES.portraitWidth+"px"};case"landscape":return{height:js.FACEBOOK_IMAGE_SIZES.landscapeHeight+"px",width:js.FACEBOOK_IMAGE_SIZES.landscapeWidth+"px"}}}render(){const{imageProperties:t,status:s}=this.state;if("loading"===s||""===this.props.src||"errored"===s)return(0,e.createElement)(sr,{onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave},(0,r.__)("Select image","wordpress-seo"));const o=this.retrieveContainerDimensions(t.mode);return(0,e.createElement)(tr,{mode:t.mode,dimensions:o,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,onClick:this.props.onImageClick},(0,e.createElement)(Zs,{imageProps:{src:this.props.src,alt:this.props.alt,aspectRatio:js.FACEBOOK_IMAGE_SIZES.aspectRatio},width:t.width,height:t.height,imageMode:t.mode}))}}rr.propTypes={src:l().string,alt:l().string,onImageLoaded:l().func,onImageClick:l().func,onMouseEnter:l().func,onMouseLeave:l().func},rr.defaultProps={src:"",alt:"",onImageLoaded:P.noop,onImageClick:P.noop,onMouseEnter:P.noop,onMouseLeave:P.noop};const or=rr,ar=u().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;
`,nr=u().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;
	}
`,ir=e=>{switch(e){case"landscape":return"527px";case"square":case"portrait":return"369px";default:return"476px"}},lr=u().div`
	box-sizing: border-box;
	display: flex;
	flex-direction: ${e=>"landscape"===e.mode?"column":"row"};
	background-color: #f2f3f5;
	max-width: 527px;
`,cr=u().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 dr extends e.Component{constructor(e){super(e),this.state={imageMode:null,maxLineCount:0,descriptionLineCount:0},this.facebookTitleRef=t().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:t,maxLineCount:s,descriptionLineCount:r}=this.state;return(0,e.createElement)(lr,{id:"facebookPreview",mode:t},(0,e.createElement)(or,{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,e.createElement)(cr,{mode:t},(0,e.createElement)(Ks,{siteUrl:this.props.siteUrl,mode:t}),(0,e.createElement)(ar,{ref:this.facebookTitleRef,onMouseEnter:this.onTitleEnter,onMouseLeave:this.onLeave,onClick:this.onSelectTitle,lineCount:s},this.props.title),r>0&&(0,e.createElement)(nr,{maxWidth:ir(t),onMouseEnter:this.onDescriptionEnter,onMouseLeave:this.onLeave,onClick:this.onSelectDescription,lineCount:r},this.props.description)))}}dr.propTypes={siteUrl:l().string.isRequired,title:l().string.isRequired,description:l().string,imageUrl:l().string,imageFallbackUrl:l().string,alt:l().string,onSelect:l().func,onImageClick:l().func,onMouseHover:l().func},dr.defaultProps={description:"",alt:"",imageUrl:"",imageFallbackUrl:"",onSelect:()=>{},onImageClick:()=>{},onMouseHover:()=>{}};const ur=dr,pr=u().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;
`,mr=t=>(0,e.createElement)(pr,null,(0,e.createElement)("span",null,t.siteUrl));mr.propTypes={siteUrl:l().string.isRequired};const gr=mr,hr=(e,t=!0)=>e?`\n\t\t\tmax-width: ${js.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: ${js.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`,yr=u().div`
	position: relative;
	box-sizing: content-box;
	overflow: hidden;
	background-color: #e1e8ed;
	flex-shrink: 0;
	${e=>hr(e.isLarge)}
`,wr=u().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=>hr(e.isLarge,!1)}
`,fr=u()(wr)`
	${e=>e.isLarge&&`height: ${js.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 br extends t().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 er(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:t,imageProperties:s}=this.state;return"loading"===t||""===this.props.src||"errored"===t?(0,e.createElement)(fr,{isLarge:this.props.isLarge,onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave},(0,r.__)("Select image","wordpress-seo")):(0,e.createElement)(yr,{isLarge:this.props.isLarge,onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave},(0,e.createElement)(Zs,{imageProps:{src:this.props.src,alt:this.props.alt,aspectRatio:js.TWITTER_IMAGE_SIZES.aspectRatio},width:s.width,height:s.height,imageMode:s.mode}))}}br.propTypes={isLarge:l().bool.isRequired,src:l().string,alt:l().string,onImageClick:l().func,onMouseEnter:l().func,onMouseLeave:l().func},br.defaultProps={src:"",alt:"",onMouseEnter:P.noop,onImageClick:P.noop,onMouseLeave:P.noop};const Er=u().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;
    }
`,vr=t=>(0,e.createElement)(Er,null,t.children);vr.propTypes={children:l().array.isRequired};const kr=vr,xr=u().p`
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin: 0;
	color: rgb(15, 20, 25);
	cursor: pointer;
`,_r=u().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: ${js.TWITTER_IMAGE_SIZES.landscapeWidth}px ) {
		display: none;
	}
`,Sr=u().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);
	}
`,Cr=u()(Sr)`
	flex-direction: column;
	max-height: 370px;
`,Rr=u()(Sr)`
	flex-direction: row;
	height: 125px;
`;class Lr extends e.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:t,imageUrl:s,imageFallbackUrl:r,alt:o,title:a,description:n,siteUrl:i}=this.props,l=t?Cr:Rr;return(0,e.createElement)(l,{id:"twitterPreview"},(0,e.createElement)(br,{src:s||r,alt:o,isLarge:t,onImageClick:this.props.onImageClick,onMouseEnter:this.onImageEnter,onMouseLeave:this.onLeave}),(0,e.createElement)(kr,null,(0,e.createElement)(gr,{siteUrl:i}),(0,e.createElement)(xr,{onMouseEnter:this.onTitleEnter,onMouseLeave:this.onLeave,onClick:this.onSelectTitle},a),(0,e.createElement)(_r,{onMouseEnter:this.onDescriptionEnter,onMouseLeave:this.onLeave,onClick:this.onSelectDescription},n)))}}Lr.propTypes={siteUrl:l().string.isRequired,title:l().string.isRequired,description:l().string,isLarge:l().bool,imageUrl:l().string,imageFallbackUrl:l().string,alt:l().string,onSelect:l().func,onImageClick:l().func,onMouseHover:l().func},Lr.defaultProps={description:"",alt:"",imageUrl:"",imageFallbackUrl:"",onSelect:()=>{},onImageClick:()=>{},onMouseHover:()=>{},isLarge:!0};const Ir=Lr,Nr=window.yoast.replacementVariableEditor;class Tr extends e.Component{constructor(e){super(e),this.state={activeField:"",hoveredField:""},this.SocialPreview="Social"===e.socialMediumName?ur:Ir,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:s,onTitleChange:r,onSelectImageClick:o,onRemoveImageClick:n,socialMediumName:i,imageWarnings:l,siteUrl:c,description:d,descriptionInputPlaceholder:u,descriptionPreviewFallback:p,imageUrl:m,imageFallbackUrl:g,alt:h,title:y,titleInputPlaceholder:w,titlePreviewFallback:f,replacementVariables:b,recommendedReplacementVariables:E,applyReplacementVariables:v,onReplacementVariableSearchChange:k,isPremium:x,isLarge:_,socialPreviewLabel:S,idSuffix:C,activeMetaTabId:R}=this.props,L=v({title:y||f,description:d||p});return(0,e.createElement)(t().Fragment,null,S&&(0,e.createElement)(a.SimulatedLabel,null,S),(0,e.createElement)(this.SocialPreview,{onMouseHover:this.setHoveredField,onSelect:this.setActiveField,onImageClick:o,siteUrl:c,title:L.title,description:L.description,imageUrl:m,imageFallbackUrl:g,alt:h,isLarge:_,activeMetaTabId:R}),(0,e.createElement)(js.SocialMetadataPreviewForm,{onDescriptionChange:s,socialMediumName:i,title:y,titleInputPlaceholder:w,onRemoveImageClick:n,imageSelected:!!m,imageUrl:m,imageFallbackUrl:g,onTitleChange:r,onSelectImageClick:o,description:d,descriptionInputPlaceholder:u,imageWarnings:l,replacementVariables:b,recommendedReplacementVariables:E,onReplacementVariableSearchChange:k,onMouseHover:this.setHoveredField,hoveredField:this.state.hoveredField,onSelect:this.setActiveField,activeField:this.state.activeField,isPremium:x,setEditorRef:this.setEditorRef,idSuffix:C}))}}Tr.propTypes={title:l().string.isRequired,onTitleChange:l().func.isRequired,description:l().string.isRequired,onDescriptionChange:l().func.isRequired,imageUrl:l().string.isRequired,imageFallbackUrl:l().string.isRequired,onSelectImageClick:l().func.isRequired,onRemoveImageClick:l().func.isRequired,socialMediumName:l().string.isRequired,alt:l().string,isPremium:l().bool,imageWarnings:l().array,isLarge:l().bool,siteUrl:l().string,descriptionInputPlaceholder:l().string,titleInputPlaceholder:l().string,descriptionPreviewFallback:l().string,titlePreviewFallback:l().string,replacementVariables:Nr.replacementVariablesShape,recommendedReplacementVariables:Nr.recommendedReplacementVariablesShape,applyReplacementVariables:l().func,onReplacementVariableSearchChange:l().func,socialPreviewLabel:l().string,idSuffix:l().string,activeMetaTabId:l().string},Tr.defaultProps={imageWarnings:[],recommendedReplacementVariables:[],replacementVariables:[],isPremium:!1,isLarge:!0,siteUrl:"",descriptionInputPlaceholder:"",titleInputPlaceholder:"",descriptionPreviewFallback:"",titlePreviewFallback:"",alt:"",applyReplacementVariables:e=>e,onReplacementVariableSearchChange:null,socialPreviewLabel:"",idSuffix:"",activeMetaTabId:""};const Mr={},Pr=(e,t,{log:s=console.warn}={})=>{Mr[e]||(Mr[e]=!0,s(t))},Ar=(e,t=P.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};Ar({squareWidth:125,squareHeight:125,landscapeWidth:506,landscapeHeight:265,aspectRatio:50.2},((e,t)=>Pr(`@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.`))),Ar({squareWidth:158,squareHeight:158,landscapeWidth:527,landscapeHeight:273,portraitWidth:158,portraitHeight:237,aspectRatio:52.2,largeThreshold:{width:446,height:233}},((e,t)=>Pr(`@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 $r=({title:t,description:s})=>{const r=(0,k.useSelect)((e=>e(qe).getSiteUrl()),[]),o=(0,k.useSelect)((e=>e(qe).getFacebookImageUrl()),[]),a=(0,k.useSelect)((e=>e(qe).getEditorDataImageFallback()),[]),n=(0,k.useSelect)((e=>e(qe).getFacebookAltText()),[]);return(0,e.createElement)("div",{className:"yst-bg-slate-200 yst-p-2 yst--mx-6 yst-mx-auto"},(0,e.createElement)(ur,{title:t,description:s,siteUrl:r,imageUrl:o,imageFallbackUrl:a,alt:n,onSelect:P.noop,onImageClick:P.noop,onMouseHover:P.noop}))};$r.propTypes={title:l().string.isRequired,description:l().string.isRequired};const Or=()=>(0,e.createElement)("div",{className:"yst-flex yst-flex-col yst-w-[527px] yst-border yst-mx-auto"},(0,e.createElement)(ce.SkeletonLoader,{className:"yst-h-[273px] yst-w-full yst-rounded-none yst-border yst-border-dashed"}),(0,e.createElement)("div",{className:"yst-w-full yst-p-4 yst-space-y-1"},(0,e.createElement)(ce.SkeletonLoader,{className:"yst-h-3 yst-w-1/3"}),(0,e.createElement)(ce.SkeletonLoader,{className:"yst-h-5 yst-w-10/12"}),(0,e.createElement)(ce.SkeletonLoader,{className:"yst-h-3 yst-w-full"}))),Fr=({children:t,onRetry:s})=>{const{onClose:o}=(0,ce.useModalContext)();return(0,e.createElement)(c.Fragment,null,t,(0,e.createElement)("div",{className:"yst-mt-6 yst-mb-1 yst-flex yst-space-x-3 rtl:yst-space-x-reverse yst-place-content-end"},(0,e.createElement)(ce.Button,{variant:"secondary",onClick:o},(0,r.__)("Close","wordpress-seo")),(0,e.createElement)(ce.Button,{variant:"primary",onClick:s},(0,r.__)("Try again","wordpress-seo"))))};Fr.propTypes={children:l().node.isRequired,onRetry:l().func.isRequired};const Br=({errorCode:t,errorIdentifier:s,invalidSubscriptions:r=[],showActions:o=!1,onRetry:a=P.noop,errorMessage:n=""})=>{switch(t){case 400:switch(s){case"AI_CONTENT_FILTER":return(0,e.createElement)(vs,null);case"NOT_ENOUGH_CONTENT":return(0,e.createElement)(ys,null);case"SITE_UNREACHABLE":return(0,e.createElement)(_s,null);case"WP_HTTP_REQUEST_ERROR":return o?(0,e.createElement)(Fr,{onRetry:a},(0,e.createElement)(ks,{errorMessage:n})):(0,e.createElement)(ks,{errorMessage:n});default:return o?(0,e.createElement)(Fr,{onRetry:a},(0,e.createElement)(hs,null)):(0,e.createElement)(hs,null)}case 402:return(0,e.createElement)(bs,{invalidSubscriptions:r});case 408:return o?(0,e.createElement)(Fr,{onRetry:a},(0,e.createElement)(Es,null)):(0,e.createElement)(Es,null);case 429:return(0,e.createElement)(fs,null);case 410:return(0,e.createElement)(xs,null);default:return o?(0,e.createElement)(Fr,{onRetry:a},(0,e.createElement)(hs,null)):(0,e.createElement)(hs,null)}};Br.propTypes={errorCode:l().number.isRequired,errorIdentifier:l().string.isRequired,invalidSubscriptions:l().array,showActions:l().bool,onRetry:l().func,errorMessage:l().string};const qr=l().shape({value:l().string.isRequired,label:l().node.isRequired}),Ur=({id:t,name:s,suggestion:r,isChecked:o,onChange:a})=>{const n=(0,c.useCallback)((()=>a(r.value)),[r,a]);return(0,e.createElement)("label",{htmlFor:t,className:As()("yst-flex yst-p-4 yst-items-center yst-border first:yst-rounded-t-md last:yst-rounded-b-md",o&&"yst-z-10 yst-border-primary-500")},(0,e.createElement)("input",{type:"radio",id:t,name:s,className:"yst-radio__input",value:r.value,checked:o,onChange:n}),(0,e.createElement)("div",{className:As()("yst-label yst-radio__label yst-flex yst-flex-wrap yst-items-center",!o&&"yst-text-slate-600")},r.label))};Ur.propTypes={id:l().string.isRequired,name:l().string.isRequired,suggestion:qr.isRequired,isChecked:l().bool.isRequired,onChange:l().func.isRequired};const Wr=({idSuffix:t,suggestions:s,selected:r,onChange:o})=>(0,e.createElement)("div",null,(0,e.createElement)(ce.RadioGroup,{className:"yst-suggestions-radio-group yst-flex yst-flex-col",id:`yst-ai-suggestions-radio-group__${t}`},s.map(((s,a)=>(0,e.createElement)(Ur,{key:`yst-ai-suggestions-radio-${t}__${a}`,id:`yst-ai-suggestions-radio-${t}__${a}`,name:`ai-suggestion__${t}`,isChecked:s.value===r,onChange:o,suggestion:s})))));Wr.propTypes={idSuffix:l().string.isRequired,suggestions:l().arrayOf(qr).isRequired,selected:l().string.isRequired,onChange:l().func.isRequired};const zr=[["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"]],Hr=({suggestionClassNames:t=zr})=>(0,e.createElement)("div",{className:"yst-flex yst-flex-col yst--space-y-[1px]"},t.map(((t,s)=>(0,e.createElement)("div",{key:`yst-ai-suggestion-radio-skeleton__${s}`,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"},(0,e.createElement)("input",{type:"radio",disabled:!0,className:"yst-my-0.5"}),(0,e.createElement)("div",{className:"yst-flex yst-flex-col yst-w-full"},t.map(((t,r)=>(0,e.createElement)(ce.SkeletonLoader,{key:`yst-ai-suggestion-radio-skeleton-${s}__${r}`,className:t}))))))));Hr.propTypes={suggestionClassNames:l().arrayOf(l().arrayOf(l().string))};const Dr="ai_generator_tip_notification",Kr=()=>{const t=(0,k.useSelect)((e=>e(qe).isAlertDismissed(Dr)),[]),s=(0,k.useSelect)((e=>e(qe).getEditorDataContent()),[]),o=(0,k.useSelect)((e=>e(qe).getIsWooProductEntity()),[]),[a,,,n]=(0,ce.useToggleState)(!1),{editType:i,contentType:l}=dt(),{dismissAlert:d}=(0,k.useDispatch)(qe),u=(0,c.useCallback)((()=>{d(Dr)}),[d]),p=(0,c.useMemo)((()=>i===De?(0,r.__)("%1$sTip%2$s: Improve the accuracy of your generated AI descriptions by writing more content in your page.","wordpress-seo"):(0,r.__)("%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]),m=(0,c.useMemo)((()=>((e,t)=>e||t===je?150:300)(o,l)),[l,o]);return t||a||s.length>m?null:(0,e.createElement)(ce.Notifications.Notification,{id:"ai-generator-content-tip",variant:"info",dismissScreenReaderLabel:(0,r.__)("Dismiss","wordpress-seo")},we((0,r.sprintf)(p,"<span>","</span>"),{span:(0,e.createElement)("span",{className:"yst-font-medium yst-text-slate-800"})}),(0,e.createElement)("div",{className:"yst-flex yst-mt-3 yst--ms-3 yst-gap-1"},(0,e.createElement)(ce.Button,{type:"button",variant:"tertiary",onClick:u},(0,r.__)("Don’t show again","wordpress-seo")),(0,e.createElement)(ce.Button,{type:"button",variant:"tertiary",className:"yst-text-slate-800",onClick:n},(0,r.__)("Dismiss","wordpress-seo"))))},jr=({title:t,description:s,showPreviewSkeleton:o})=>(0,e.createElement)("div",null,(0,e.createElement)("div",{className:"yst-flex yst-mb-6"},(0,e.createElement)(ce.Label,{as:"span",className:"yst-flex-grow yst-cursor-default"},(0,r.__)("X preview","wordpress-seo"))),o?(0,e.createElement)(Gr,null):(0,e.createElement)(Yr,{title:t,description:s}));jr.propTypes={title:l().string.isRequired,description:l().string.isRequired,showPreviewSkeleton:l().bool.isRequired};const Yr=({title:t,description:s})=>{const r=(0,k.useSelect)((e=>e(qe).getSiteUrl()),[]),o=(0,k.useSelect)((e=>e(qe).getTwitterImageUrl()),[]),a=(0,k.useSelect)((e=>e(qe).getFacebookImageUrl()),[]),n=(0,k.useSelect)((e=>e(qe).getEditorDataImageFallback()),[]),i=(0,k.useSelect)((e=>e(qe).getTwitterImageType()),[]),l=(0,k.useSelect)((e=>e(qe).getTwitterAltText()),[]);return(0,e.createElement)("div",{className:"yst-bg-slate-200 yst-p-2 yst--mx-6"},(0,e.createElement)(Ir,{title:t,description:s,siteUrl:r,imageUrl:o,imageFallbackUrl:a||n,isLarge:"summary"!==i,alt:l,onSelect:P.noop,onImageClick:P.noop,onMouseHover:P.noop}))};Yr.propTypes={title:l().string.isRequired,description:l().string.isRequired};const Gr=()=>(0,e.createElement)("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"},(0,e.createElement)(ce.SkeletonLoader,{className:"yst-h-[265px] yst-w-full yst-rounded-none yst-border yst-border-dashed"}),(0,e.createElement)("div",{className:"yst-w-full yst-p-4 yst-space-y-1"},(0,e.createElement)(ce.SkeletonLoader,{className:"yst-h-3 yst-w-1/3"}),(0,e.createElement)(ce.SkeletonLoader,{className:"yst-h-5 yst-w-10/12"}),(0,e.createElement)(ce.SkeletonLoader,{className:"yst-h-3 yst-w-full"}))),Vr="yst-mt-1 yst-mb-3",Zr="yst-flex yst-justify-end yst--me-8 yst-gap-3 yst--ms-2",Qr=({onClose:t})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",{className:Vr},(0,r.__)("As long as this is a beta feature, you get unlimited sparks.","wordpress-seo")),(0,e.createElement)("div",{className:Zr},(0,e.createElement)(ce.Button,{type:"button",variant:"primary",size:"small",onClick:t},(0,r.__)("Got it!","wordpress-seo")))),Jr=({onClose:t,upsellLink:s,isWooProductEntity:o=!1,ctbId:a="f6a84663-465f-4cb5-8ba5-f7a6d72224b2"})=>{const n=(0,ce.useSvgAria)();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",{className:Vr},(0,r.sprintf)(/* translators: %s expands to Yoast SEO Premium or Yoast WooCommerce SEO. */
(0,r.__)("Keep the momentum going, unlock unlimited sparks with %s!","wordpress-seo"),o?"Yoast WooCommerce SEO":"Yoast SEO Premium")),(0,e.createElement)("div",{className:Zr},(0,e.createElement)(ce.Button,{type:"button",variant:"tertiary",size:"small",onClick:t},(0,r.__)("Close","wordpress-seo")),(0,e.createElement)(ce.Button,{as:"a",size:"small",variant:"upsell",href:s,target:"_blank",rel:"noopener noreferrer","data-action":"load-nfd-ctb","data-ctb-id":a},(0,e.createElement)(St,{className:"yst-w-4 yst-h-4 yst--ms-1 yst-me-2 yst-shrink-0",...n}),(0,r.sprintf)(/* translators: %1$s expands to Yoast SEO Premium or Yoast WooCommerce SEO. */
(0,r.__)("Unlock with %1$s","wordpress-seo"),o?"Yoast WooCommerce SEO":"Yoast SEO Premium"),(0,e.createElement)("span",{className:"yst-sr-only"},/* translators: Hidden accessibility text. */
(0,r.__)("(Opens in a new browser tab)","wordpress-seo")))))},Xr=({className:t=""})=>{const{isUsageCountLimitReached:s,usageCount:o,usageCountLimit:a,premiumUpsellLink:n,wooUpsellLink:i,isWooProductEntity:l,hasValidPremiumSubscription:d,hasValidWooSubscription:u}=(0,k.useSelect)((e=>{const t=e(Be),s=e(qe);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()}}),[]),p=(0,c.useMemo)((()=>d&&!l||l&&u&&d),[d,l,u]),[m,,g,,h]=(0,ce.useToggleState)(o===a);(0,c.useEffect)((()=>{g(p&&o===a||!p&&s)}),[o,a,p,s]);const y=(0,c.useMemo)((()=>l?i:n),[l,i,n]),w=(0,c.useMemo)((()=>l&&!u),[l,u]);return m&&(0,e.createElement)(ce.Notifications.Notification,{id:"ai-sparks-limit",className:t,variant:"info",dismissScreenReaderLabel:(0,r.__)("Close","wordpress-seo"),title:p?(0,r.sprintf)(/* translators: %s is the number of the sparks. */
(0,r._n)("You've used %s spark this month.","You've used %s sparks this month.",a,"wordpress-seo"),a):(0,r.__)("You're out of free sparks!","wordpress-seo"),size:p?"default":"large"},p?(0,e.createElement)(Qr,{onClose:h}):(0,e.createElement)(Jr,{onClose:h,upsellLink:y,isWooUpsell:w}))},eo=()=>{const{previewType:e}=dt();switch(e){case We:return zs;case ze:return jr;default:return $s}},to=()=>{const{editType:e}=dt();switch(e){case He:return(()=>{const{previewType:e}=dt(),{updateData:t,setFacebookPreviewTitle:s,setTwitterPreviewTitle:r}=(0,k.useDispatch)(qe);return(0,c.useMemo)((()=>{switch(e){case Ue:return e=>t({title:e});case We:return s;case ze:return r;default:return P.noop}}),[e,t,s,r])})();case De:return(()=>{const{previewType:e}=dt(),{updateData:t,setFacebookPreviewDescription:s,setTwitterPreviewDescription:r}=(0,k.useDispatch)(qe);return(0,c.useMemo)((()=>{switch(e){case Ue:return e=>t({description:e});case We:return s;case ze:return r;default:return P.noop}}),[e,t,s,r])})();default:return P.noop}},so=(0,ft.createSlice)({name:"suggestions",initialState:{status:Ze.loading,error:{code:200,message:""},entities:[],selected:""},reducers:{setLoading:e=>{e.status=Ze.loading},setSuccess:(e,{payload:t})=>{e.status=Ze.success,e.selected=t[0],e.entities.push(...t)},setError:(e,{payload:t})=>{e.status=Ze.error,e.error=t},setSelected:(e,{payload:t})=>{e.selected=t}}}),ro=e=>{switch(e){case We:return"Facebook";case ze:return"Twitter";default:return"Google"}},oo=()=>{const[e,t]=(0,c.useReducer)(so.reducer,so.getInitialState()),{editType:s,previewType:r,postType:o,contentType:a}=dt(),n=(0,k.useSelect)((e=>e(Be).selectPromptContent()),[]),{contentLocale:i,focusKeyphrase:l,isWooCommerceActive:d,isGutenberg:u,isElementor:p}=(0,k.useSelect)((e=>({contentLocale:e(qe).getContentLocale(),focusKeyphrase:e(qe).getFocusKeyphrase(),isWooCommerceActive:e(qe).getIsWooCommerceActive(),isGutenberg:e(qe).getIsBlockEditor(),isElementor:e(qe).getIsElementorEditor()})),[]);let m,g=ee.languageProcessing.helpers.processExactMatchRequest(l).keyphrase;g.length>191&&(g=g.slice(0,191)),m=p?"elementor":u?"gutenberg":"classic";const h=((e,t,s,r)=>{const o=e===De?"meta-description":"seo-title";let a=((e,t)=>{if(e)switch(t){case"product":return"product-";case"product_cat":case"product_tag":return"product-taxonomy-"}return""})(t,s);return a&&t||r!==je||(a="taxonomy-"),`${a}${o}`})(s,d,o,a);return{suggestions:e,fetchSuggestions:(0,c.useCallback)((async(e=!0)=>{t(so.actions.setLoading());const{status:s,payload:o}=await(async({endpoint:e,data:t})=>{let s;const r=1e3*(0,P.get)(window,"wpseoAiGenerator.requestTimeout",30);try{tt&&tt.abort(),tt=new AbortController,st=!1,s=setTimeout((()=>{st=!0,tt.abort()}),r);const o=await C()({path:e,method:"POST",data:t,parse:!1,signal:tt.signal}),a=await o.json();return{status:Qe,payload:a}}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)return st?{status:Je,payload:{message:"timeout",code:408}}:{status:Xe};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:Je,payload:{message:t,code:e.status||500,missingLicenses:s,errorIdentifier:r}}}finally{clearTimeout(s)}})({endpoint:"yoast/v1/ai_generator/get_suggestions/",canAbort:e,data:{type:h,prompt_content:n,focus_keyphrase:g,platform:ro(r),language:ot(i).replace("_","-"),editor:m}});switch(s){case Xe:break;case Je:t(so.actions.setError(o));break;case Qe:t(so.actions.setSuccess(o))}return s}),[t]),setSelectedSuggestion:(0,c.useCallback)((e=>t(so.actions.setSelected(e))),[t])}},ao=({editType:e,title:t,description:s})=>{const r=(0,k.useSelect)((e=>e(qe).getDateFromSettings()),[]),o=(0,k.useSelect)((e=>e(qe).getContentLocale()),[]),a=(0,k.useSelect)((e=>e(qe).isCornerstoneContent()),[]),n=(0,k.useSelect)((e=>e(qe).getIsTerm()),[]);return(0,c.useMemo)((()=>e===De?(0,Os.getDescriptionProgress)(s,r,a,n,o):(0,Os.getTitleProgress)(t)),[e,t,s,r,a,n,o])},no=()=>{const{editType:e,previewType:t,contentType:s}=dt(),r=(()=>{const{previewType:e}=dt();return(0,c.useMemo)((()=>{switch(e){case Ue:return()=>(0,k.select)(qe).getSnippetEditorData().title;case We:return(0,k.select)(qe).getFacebookTitleOrFallback;case ze:return(0,k.select)(qe).getTwitterTitleOrFallback;default:return(0,P.constant)("")}}),[e])})(),o=(0,k.useSelect)((s=>s(Be).selectAppliedSuggestionFor({editType:e,previewType:t})),[e,t]);return(0,c.useMemo)((()=>{let t=r();return e===De?t:(o&&(t=t.replace(o,Ge[s])),((e,t)=>e.includes(Ge[t])?e:Ge[t])(t,s))}),[e,r])},io=e=>{const{isWooProductEntity:t,isProductPost:s,hasValidWooSubscription:o}=(0,k.useSelect)((e=>{const t=e(qe),s=e(Be);return{isWooProductEntity:t.getIsWooProductEntity(),isProductPost:t.getIsProduct(),hasValidWooSubscription:s.selectWooCommerceSubscription()}}),[]);return(0,c.useMemo)((()=>{const a={upsellLink:e.premium,upsellLabel:(0,r.sprintf)(/* translators: %1$s expands to Yoast SEO Premium. */
(0,r.__)("Unlock with %1$s","wordpress-seo"),"Yoast SEO Premium"),newToText:"Yoast SEO Premium",ctbId:"f6a84663-465f-4cb5-8ba5-f7a6d72224b2",title:(0,r.__)("Use AI to generate your titles & descriptions!","wordpress-seo")};return t&&(s&&(a.title=(0,r.__)("Generate product titles & descriptions with AI!","wordpress-seo")),o||(a.newToText="Yoast WooCommerce SEO",a.upsellLabel=(0,r.sprintf)(/* translators: %1$s expands to Yoast WooCommerce SEO. */
(0,r.__)("Unlock with %1$s","wordpress-seo"),"Yoast WooCommerce SEO"),a.upsellLink=e.woo,a.ctbId="5b32250e-e6f0-44ae-ad74-3cefc8e427f9")),a}),[t,s,e.premium,e.woo])},lo=()=>{const{premiumUpsellLink:t,wooUpsellLink:s,learnMoreLink:r,imageLink:o,wistiaEmbedPermissionValue:a,wistiaEmbedPermissionStatus:n}=(0,k.useSelect)((e=>{const t=e(qe);return{premiumUpsellLink:t.selectLink("https://yoa.st/ai-fix-assessments-upsell"),wooUpsellLink:t.selectLink("https://yoa.st/ai-fix-assessments-upsell-woo-seo"),learnMoreLink:t.selectLink("https://yoa.st/ai-fix-assessments-upsell-learn-more"),imageLink:t.selectImageLink("ai-fix-assessments-thumbnail.png"),wistiaEmbedPermissionValue:t.selectWistiaEmbedPermissionValue(),wistiaEmbedPermissionStatus:t.selectWistiaEmbedPermissionStatus()}}),[]),i=io({premium:t,woo:s}),l=(0,c.useMemo)((()=>({src:o,width:"432",height:"244"})),[o]),{setWistiaEmbedPermission:d}=(0,k.useDispatch)(qe),u=(0,c.useMemo)((()=>({value:a,status:n,set:d})),[a,n,d]);return(0,e.createElement)(Rt,{learnMoreLink:r,thumbnail:l,wistiaEmbedPermission:u,...i})},co=e=>{let t=[...e];return e.forEach((e=>{e.innerBlocks&&e.innerBlocks.length>0&&(t=[...t,...co(e.innerBlocks)])})),t};P.noop,P.noop,P.noop,window.yoast.externals.redux;const uo=({id:t,isPremium:s})=>{const o=t+"AIFixes",[n,,,i,l]=(0,ce.useToggleState)(!1),{activeMarker:d,activeAIButtonId:u,editorType:p,isWooSeoUpsellPost:m}=(0,k.useSelect)((e=>({activeMarker:e("yoast-seo/editor").getActiveMarker(),activeAIButtonId:e("yoast-seo/editor").getActiveAIFixesButton(),editorType:e("yoast-seo/editor").getEditorType(),isWooSeoUpsellPost:e("yoast-seo/editor").getIsWooSeoUpsell()})),[]),g=(()=>{const e=(0,k.useSelect)((e=>e("yoast-seo/editor").getEditorType()),[]);return"blockEditor"===e?(0,k.useSelect)((e=>e("core/edit-post").getEditorMode()),[]):"classicEditor"===e?function(){const e=document.getElementById("wp-content-wrap");return!!e&&e.classList.contains("html-active")}()?"text":"visual":""})(),h=!s||m,{setActiveAIFixesButton:y,setActiveMarker:w,setMarkerPauseStatus:f,setMarkerStatus:b}=(0,k.useDispatch)("yoast-seo/editor"),E=(0,c.useRef)(null),[v,x]=(0,c.useState)(""),_=(0,r.__)("Optimize with AI","wordpress-seo"),S=(0,r.__)("Please switch to the visual editor to optimize with AI.","wordpress-seo"),C=u===o,{isEnabled:R,ariaLabel:L}=(0,k.useSelect)((e=>{if(null!==u&&!C)return{isEnabled:!1,ariaLabel:null};const t=e("yoast-seo/editor").getDisabledAIFixesButtons();if(Object.keys(t).includes(o))return{isEnabled:!1,ariaLabel:t[o]};if("visual"!==g)return{isEnabled:!1,ariaLabel:S};if("blockEditor"===p){const t=co(e("core/block-editor").getBlocks()).every((t=>"visual"===e("core/block-editor").getBlockMode(t.clientId)));return{isEnabled:t,ariaLabel:t?_:S}}return{isEnabled:!0,ariaLabel:_}}),[C,u,g]),I=()=>{d&&(w(null),f(!1),window.YoastSEO.analysis.applyMarks(new ee.Paper("",{}),[])),o===u?(y(null),b("enabled")):(y(o),b("disabled")),x("")},N=(0,c.useCallback)((()=>{h?i():((0,ue.doAction)("yoast.ai.fixAssessments",o),I())}),[I,i]),T=(0,c.useCallback)((()=>{L&&x("yoast-tooltip yoast-tooltip-multiline "+(R?"yoast-tooltip-w":"yoast-tooltip-nw"))}),[R,L]),M=(0,c.useCallback)((()=>{x("")}),[]);return(0,e.createElement)(a.IconAIFixesButton,{onClick:N,ariaLabel:L,onPointerEnter:T,onPointerLeave:M,id:o,className:`ai-button ${v}`,pressed:C,disabled:!R},h&&(0,e.createElement)(de,{className:"yst-fixes-button__lock-icon yst-text-amber-900"}),(0,e.createElement)(a.SparklesIcon,{pressed:C}),n&&(0,e.createElement)(ce.Modal,{className:"yst-introduction-modal",isOpen:n,onClose:l,initialFocus:E},(0,e.createElement)(ce.Modal.Panel,{className:"yst-max-w-lg yst-p-0 yst-rounded-3xl yst-introduction-modal-panel"},(0,e.createElement)(lo,{onClose:l,focusElementRef:E}))))};uo.propTypes={id:l().string.isRequired,isPremium:l().bool},uo.defaultProps={isPremium:!1};const po=uo,mo=(e,t,s)=>{const r=document.body.classList.contains("elementor-editor-active"),o=!t&&!r,a="classicEditor"===(0,k.select)("yoast-seo/editor").getEditorType();return e&&o&&!s&&!a},go=u().span`
	font-size: 1em;
	font-weight: bold;
	margin: 0 0 8px;
	display: block;
`,ho=u().div`
	padding: 16px;
`,yo=u()(M)`
	margin: -8px 0 -4px 4px;
`;class wo extends c.Component{constructor(...t){super(...t),X(this,"renderAIOptimizeButton",((t,s)=>{const{isElementor:r,isAiFeatureEnabled:o,isTerm:a}=this.props,n=Fe().isPremium;if(!n||o)return mo(t,r,a)&&(0,e.createElement)(po,{id:s,isPremium:n})}))}renderResults(t){return(0,e.createElement)(c.Fragment,null,(0,e.createElement)(go,null,(0,r.__)("Analysis results","wordpress-seo"),(0,e.createElement)(yo,{href:wpseoAdminL10n["shortlinks.readability_analysis_info"],className:"dashicons"},(0,e.createElement)("span",{className:"screen-reader-text"},/* translators: Hidden accessibility text. */
(0,r.__)("Learn more about the readability analysis","wordpress-seo")))),(0,e.createElement)(Ae,{results:this.props.results,upsellResults:t,marksButtonClassName:"yoast-tooltip yoast-tooltip-w",marksButtonStatus:this.props.marksButtonStatus,highlightingUpsellLink:"shortlinks.upsell.sidebar.highlighting_readability_analysis",shouldUpsellHighlighting:this.props.shouldUpsellHighlighting,renderAIOptimizeButton:this.renderAIOptimizeButton}))}getUpsellResults(e,t){let s=wpseoAdminL10n["shortlinks.upsell.metabox.word_complexity"];return"sidebar"===e&&(s=wpseoAdminL10n["shortlinks.upsell.sidebar.word_complexity"]),s=(0,_.addQueryArgs)(s,{context:t}),function(){const e=ee.helpers.getLanguagesWithWordComplexity(),t=window.wpseoScriptData.metabox.contentLocale,s=ee.languageProcessing.getLanguage(t);return e.includes(s)}()?[{score:0,rating:"upsell",hasMarks:!1,id:"wordComplexity",text:(0,r.sprintf)(
/* Translators: %1$s is a span tag that adds styling to 'Word complexity', %2$s is a closing span tag.
       %3$s is an anchor tag with a link to yoast.com, %4$s is a closing anchor tag.*/
(0,r.__)("%1$sWord complexity%2$s: Is your vocabulary suited for a larger audience? %3$sYoast SEO Premium will tell you!%4$s","wordpress-seo"),"<span style='text-decoration: underline'>","</span>",`<a href="${s}" data-action="load-nfd-ctb" data-ctb-id="f6a84663-465f-4cb5-8ba5-f7a6d72224b2" target="_blank">`,"</a>"),markerId:"wordComplexity"}]:[]}render(){const t=$e(this.props.overallScore);return(0,P.isNil)(this.props.overallScore)&&(t.className="loading"),(0,e.createElement)(x.LocationConsumer,null,(s=>(0,e.createElement)(x.RootContext.Consumer,null,(({locationContext:o})=>{let a=[];return this.props.shouldUpsell&&(a=this.getUpsellResults(s,o)),"sidebar"===s?(0,e.createElement)(f,{title:(0,r.__)("Readability analysis","wordpress-seo"),titleScreenReaderText:t.screenReaderReadabilityText,prefixIcon:re(t.className),prefixIconCollapsed:re(t.className),id:`yoast-readability-analysis-collapsible-${s}`},this.renderResults(a)):"metabox"===s?(0,e.createElement)(Oe,{target:"wpseo-metabox-readability-root"},(0,e.createElement)(ho,null,(0,e.createElement)(ie,{target:"wpseo-readability-score-icon",scoreIndicator:t.className}),this.renderResults(a))):void 0}))))}}wo.propTypes={results:l().array.isRequired,marksButtonStatus:l().string.isRequired,overallScore:l().number,shouldUpsell:l().bool,shouldUpsellHighlighting:l().bool,isAiFeatureEnabled:l().bool,isElementor:l().bool,isTerm:l().bool},wo.defaultProps={overallScore:null,shouldUpsell:!1,shouldUpsellHighlighting:!1,isAiFeatureEnabled:!1,isElementor:!1,isTerm:!1};const fo=(0,k.withSelect)((e=>{const{getReadabilityResults:t,getMarkButtonStatus:s,getIsElementorEditor:r,getIsAiFeatureEnabled:o,getIsTerm:a}=e("yoast-seo/editor");return{...t(),marksButtonStatus:s(),isElementor:r(),isAiFeatureEnabled:o(),isTerm:a()}}))(wo),bo=u().p`
	color: ${T.colors.$color_upsell_text};
	margin: 0;
	padding-right: 8px;
`,Eo=u().div`
	font-size: 1em;
	display: flex;
	flex-direction: ${e=>"horizontal"===e.alignment?"row":"column"};
	${(0,n.getDirectionalStyle)("border-left","border-right")}: 4px solid ${T.colors.$color_pink_dark};
	margin: 16px 0;
	padding: 0 0 0 8px;
	max-width: 600px;

	> ${bo} {
		margin-bottom: ${e=>"vertical"===e.alignment&&"16px"};
	}
`,vo=u()(a.SvgIcon)`
	margin: ${(0,n.getDirectionalStyle)("0 0 0 4px","0 4px 0 0")};
	transform: ${(0,n.getDirectionalStyle)("rotate(0deg)","rotate(180deg)")};
`,ko=(0,n.makeOutboundLink)(a.UpsellLinkButton),xo=t=>{const{alignment:s,url:o}=t;return(0,e.createElement)(Eo,{alignment:s},(0,e.createElement)(bo,null,(0,r.sprintf)(/* translators: %s expands to Yoast SEO Premium */
(0,r.__)("%s looks at more than just your main keyword. It analyzes different word forms, plurals, and past tenses. This helps your website perform even better in searches!","wordpress-seo"),"Yoast SEO Premium")),(0,e.createElement)("div",null,(0,e.createElement)(ko,{href:o,className:"UpsellLinkButton","data-action":"load-nfd-ctb","data-ctb-id":"f6a84663-465f-4cb5-8ba5-f7a6d72224b2"},(0,r.sprintf)(/* translators: %s expands to Premium */
(0,r.__)("Go %s!","wordpress-seo"),"Premium"),(0,e.createElement)(vo,{icon:"arrow-right",size:"8px",color:T.colors.$color_black}))))};xo.propTypes={alignment:l().oneOf(["horizontal","vertical"]),url:l().string.isRequired},xo.defaultProps={alignment:"vertical"};const _o=xo,So=t=>(0,e.createElement)(Le,{title:(0,r.__)("Write more natural and engaging content","wordpress-seo"),description:(0,r.sprintf)(/* translators: %s expands to "Yoast SEO Premium" */
(0,r.__)("Synonyms help users understand your copy better. It’s easier to read for both users and Google. In %s, you can add synonyms for your focus keyphrase, and we’ll help you optimize for them.","wordpress-seo"),"Yoast SEO Premium"),benefitsTitle:(0,r.sprintf)(/* translators: %s expands to 'Yoast SEO Premium'. */
(0,r.__)("%s also gives you:","wordpress-seo"),"Yoast SEO Premium"),benefits:ye(),upsellButtonText:(0,r.sprintf)(/* translators: %s expands to 'Yoast SEO Premium'. */
(0,r.__)("Unlock with %s","wordpress-seo"),"Yoast SEO Premium"),upsellButton:{href:t.buyLink,className:"yoast-button-upsell",rel:null,"data-ctb-id":"f6a84663-465f-4cb5-8ba5-f7a6d72224b2","data-action":"load-nfd-ctb"},upsellButtonLabel:(0,r.__)("1 year free support and updates included!","wordpress-seo")});So.propTypes={buyLink:l().string.isRequired};const Co=So,Ro=t=>(0,e.createElement)(Le,{title:(0,r.__)("Reach a wider audience","wordpress-seo"),description:(0,r.__)("Get help optimizing for up to 5 related keyphrases. This helps you reach a wider audience and get more traffic.","wordpress-seo"),benefitsTitle:(0,r.sprintf)(/* translators: %s expands to 'Yoast SEO Premium'. */
(0,r.__)("%s also gives you:","wordpress-seo"),"Yoast SEO Premium"),benefits:ye(),upsellButtonText:(0,r.sprintf)(/* translators: %s expands to 'Yoast SEO Premium'. */
(0,r.__)("Unlock with %s","wordpress-seo"),"Yoast SEO Premium"),upsellButton:{href:t.buyLink,className:"yoast-button-upsell",rel:null,"data-ctb-id":"f6a84663-465f-4cb5-8ba5-f7a6d72224b2","data-action":"load-nfd-ctb"},upsellButtonLabel:(0,r.__)("1 year free support and updates included!","wordpress-seo")});Ro.propTypes={buyLink:l().string.isRequired};const Lo=Ro,Io=u().button`
	// Increase specificity to override WP rules.
	&& {
		display: flex;
		align-items: center;
	}

	.yoast-svg-icon {
		margin: 1px 7px 0 0;
		fill: currentColor;
	}
`,No={open:(0,r.__)("Open","wordpress-seo"),heading:"",closeIconButton:(0,r.__)("Close","wordpress-seo"),closeButton:""},To=t=>{const[s,r]=(0,c.useState)(!1),o=Object.assign({},No,t.labels),n=(0,c.useCallback)((()=>r(!1)),[]),i=(0,c.useCallback)((()=>r(!0)),[]);return(0,e.createElement)(c.Fragment,null,(0,e.createElement)(Io,{type:"button",onClick:i,className:`${t.classes.openButton} yoast-modal__button-open`},t.openButtonIcon&&(0,e.createElement)(a.SvgIcon,{icon:t.openButtonIcon,size:"13px"}),o.open),s&&(0,e.createElement)(he,{onRequestClose:n,className:t.className,title:o.heading},t.children))};To.propTypes={openButtonIcon:l().string,labels:l().shape({open:l().string,modalAriaLabel:l().string.isRequired,heading:l().string,closeIconButton:l().string,closeButton:l().string}).isRequired,classes:l().shape({openButton:l().string,closeIconButton:l().string,closeButton:l().string}),className:l().string,children:l().any.isRequired},To.defaultProps={className:me,openButtonIcon:"",classes:{}};const Mo=To;function Po({location:t}){return(0,e.createElement)(o.Slot,{name:`yoast-synonyms-${t}`})}Po.propTypes={location:l().string.isRequired};const Ao=u().span`
	font-size: 1em;
	font-weight: bold;
	margin: 1.5em 0 1em;
	display: block;
`;class $o extends c.Component{constructor(...t){super(...t),X(this,"renderAIOptimizeButton",((t,s)=>{const{isElementor:r,isAiFeatureEnabled:o,isPremium:a,isTerm:n}=this.props;if(!a||o)return mo(t,r,n)&&(0,e.createElement)(po,{id:s,isPremium:a})}))}renderSynonymsUpsell(t,s){const o={className:`${me} yoast-gutenberg-modal__box yoast-gutenberg-modal__no-padding`,classes:{openButton:"wpseo-keyword-synonyms button-link"},labels:{open:"+ "+(0,r.__)("Add synonyms","wordpress-seo"),modalAriaLabel:(0,r.__)("Add synonyms","wordpress-seo"),heading:(0,r.__)("Add synonyms","wordpress-seo")}},a=wpseoAdminL10n["sidebar"===t.toLowerCase()?"shortlinks.upsell.sidebar.focus_keyword_synonyms_button":"shortlinks.upsell.metabox.focus_keyword_synonyms_button"];return(0,e.createElement)(Mo,{...o},(0,e.createElement)(pe,null,(0,e.createElement)(Co,{buyLink:(0,_.addQueryArgs)(a,{context:s})})))}renderMultipleKeywordsUpsell(t,s){const o={className:`${me} yoast-gutenberg-modal__box yoast-gutenberg-modal__no-padding`,classes:{openButton:"wpseo-multiple-keywords button-link"},labels:{open:"+ "+(0,r.__)("Add related keyphrase","wordpress-seo"),modalAriaLabel:(0,r.__)("Add related keyphrases","wordpress-seo"),heading:(0,r.__)("Add related keyphrases","wordpress-seo")}},a=wpseoAdminL10n["sidebar"===t.toLowerCase()?"shortlinks.upsell.sidebar.focus_keyword_additional_button":"shortlinks.upsell.metabox.focus_keyword_additional_button"];return(0,e.createElement)(Mo,{...o},(0,e.createElement)(pe,null,(0,e.createElement)(Lo,{buyLink:(0,_.addQueryArgs)(a,{context:s})})))}renderWordFormsUpsell(t,s){let r="sidebar"===t?wpseoAdminL10n["shortlinks.upsell.sidebar.morphology_upsell_sidebar"]:wpseoAdminL10n["shortlinks.upsell.sidebar.morphology_upsell_metabox"];return r=(0,_.addQueryArgs)(r,{context:s}),(0,e.createElement)(_o,{url:r,alignment:"sidebar"===t?"vertical":"horizontal"})}renderTabIcon(t,s){return"metabox"!==t?null:(0,e.createElement)(ie,{target:"wpseo-seo-score-icon",scoreIndicator:s})}getUpsellResults(e,t){let s=wpseoAdminL10n["shortlinks.upsell.metabox.keyphrase_distribution"];return"sidebar"===e&&(s=wpseoAdminL10n["shortlinks.upsell.sidebar.keyphrase_distribution"]),s=(0,_.addQueryArgs)(s,{context:t}),[{score:0,rating:"upsell",hasMarks:!1,hasJumps:!1,id:"keyphraseDistribution",text:(0,r.sprintf)(
/* Translators: %1$s is a span tag that adds styling to 'Keyphrase distribution', %2$s is a closing span tag.
     %3%s is an anchor tag with a link to yoast.com, %4$s is a closing anchor tag.*/
(0,r.__)("%1$sKeyphrase distribution%2$s: Have you evenly distributed your focus keyphrase throughout the whole text? %3$sYoast SEO Premium will tell you!%4$s","wordpress-seo"),"<span style='text-decoration: underline'>","</span>",`<a href="${s}" data-action="load-nfd-ctb" data-ctb-id="f6a84663-465f-4cb5-8ba5-f7a6d72224b2" target="_blank">`,"</a>"),markerId:"keyphraseDistribution"}]}render(){const t=$e(this.props.overallScore),{isPremium:s}=this.props;return"loading"!==t.className&&""===this.props.keyword&&(t.className="na",t.screenReaderReadabilityText=(0,r.__)("Enter a focus keyphrase to calculate the SEO score","wordpress-seo")),(0,e.createElement)(x.LocationConsumer,null,(o=>(0,e.createElement)(x.RootContext.Consumer,null,(({locationContext:a})=>{const n="metabox"===o?y:f;let i=[];return this.props.shouldUpsell&&(i=this.getUpsellResults(o,a)),(0,e.createElement)(c.Fragment,null,(0,e.createElement)(n,{title:s?(0,r.__)("Premium SEO analysis","wordpress-seo"):(0,r.__)("SEO analysis","wordpress-seo"),titleScreenReaderText:t.screenReaderReadabilityText,prefixIcon:re(t.className),prefixIconCollapsed:re(t.className),subTitle:this.props.keyword,id:`yoast-seo-analysis-collapsible-${o}`},(0,e.createElement)(Po,{location:o}),this.props.shouldUpsell&&(0,e.createElement)(c.Fragment,null,this.renderSynonymsUpsell(o,a),this.renderMultipleKeywordsUpsell(o,a)),this.props.shouldUpsellWordFormRecognition&&this.renderWordFormsUpsell(o,a),(0,e.createElement)(Ao,null,(0,r.__)("Analysis results","wordpress-seo")),(0,e.createElement)(Ae,{results:this.props.results,upsellResults:i,marksButtonClassName:"yoast-tooltip yoast-tooltip-w",editButtonClassName:"yoast-tooltip yoast-tooltip-w",marksButtonStatus:this.props.marksButtonStatus,location:o,shouldUpsellHighlighting:this.props.shouldUpsellHighlighting,highlightingUpsellLink:"shortlinks.upsell.sidebar.highlighting_seo_analysis",renderAIOptimizeButton:this.renderAIOptimizeButton})),this.renderTabIcon(o,t.className))}))))}}$o.propTypes={results:l().array,marksButtonStatus:l().string,keyword:l().string,shouldUpsell:l().bool,shouldUpsellWordFormRecognition:l().bool,overallScore:l().number,shouldUpsellHighlighting:l().bool,isElementor:l().bool,isAiFeatureEnabled:l().bool,isPremium:l().bool,isTerm:l().bool},$o.defaultProps={results:[],marksButtonStatus:null,keyword:"",shouldUpsell:!1,shouldUpsellWordFormRecognition:!1,overallScore:null,shouldUpsellHighlighting:!1,isElementor:!1,isAiFeatureEnabled:!1,isPremium:!1,isTerm:!1};const Oo=(0,k.withSelect)(((e,t)=>{const{getFocusKeyphrase:s,getMarksButtonStatus:r,getResultsForKeyword:o,getIsElementorEditor:a,getIsPremium:n,getIsAiFeatureEnabled:i,getIsTerm:l}=e("yoast-seo/editor"),c=s();return{...o(c),marksButtonStatus:t.hideMarksButtons?"disabled":r(),keyword:c,isElementor:a(),isPremium:n(),isAiFeatureEnabled:i(),isTerm:l()}}))($o);function Fo(){const e=Fe();return(0,P.get)(e,"multilingualPluginActive",!1)}const Bo=u().span`
	font-size: 1em;
	font-weight: bold;
	margin: 0 0 8px;
	display: block;
`,qo=u().div`
	padding: 16px;
`,Uo=u()(M)`
	margin: -8px 0 -4px 4px;
`,Wo=u().p`
	min-height: 24px;
	margin: 12px 0 0 0;
	padding: 0;
	display: flex;
	align-items: flex-start;
`,zo=u()(a.SvgIcon)`
	margin: 3px 11px 0 0; // icon 13 + 11 right margin = 24 for the 8px grid.
`,Ho=t=>{const s=wpseoAdminL10n["shortlinks.inclusive_language_analysis_info"];function o(){return(0,e.createElement)(c.Fragment,null,(0,e.createElement)(Bo,null,(0,r.__)("Analysis results","wordpress-seo"),(0,e.createElement)(Uo,{href:s,className:"dashicons"},(0,e.createElement)("span",{className:"screen-reader-text"},/* translators: Hidden accessibility text. */
(0,r.__)("Learn more about the inclusive language analysis","wordpress-seo")))),(0,e.createElement)(Ae,{results:t.results,marksButtonClassName:"yoast-tooltip yoast-tooltip-w",marksButtonStatus:t.marksButtonStatus,resultCategoryLabels:{problems:(0,r.__)("Non-inclusive","wordpress-seo"),improvements:(0,r.__)("Potentially non-inclusive","wordpress-seo")},highlightingUpsellLink:"shortlinks.upsell.sidebar.highlighting_inclusive_analysis",shouldUpsellHighlighting:t.shouldUpsellHighlighting}))}const n=we((0,r.sprintf)(/* Translators: %1$s expands to a link on yoast.com, %2$s expands to the anchor end tag. */
(0,r.__)("%1$sInclusive language%2$s: We haven't detected any potentially non-inclusive phrases. Great work!","wordpress-seo"),"<a>","</a>"),{a:(0,e.createElement)("a",{href:s,target:"_blank",rel:"noreferrer"})});function i(){const t=(0,r.__)("We noticed that you are using a multilingual plugin. Please be aware that this analysis feedback is intended only for texts written in English.","wordpress-seo");return(0,e.createElement)(a.Alert,{type:"info"},t)}function l(){return(0,e.createElement)(c.Fragment,null,(0,e.createElement)(Bo,null,(0,r.__)("Analysis results","wordpress-seo"),(0,e.createElement)(Uo,{href:s,className:"dashicons"},(0,e.createElement)("span",{className:"screen-reader-text"},/* translators: Hidden accessibility text. */
(0,r.__)("Learn more about the inclusive language analysis","wordpress-seo")))),(0,e.createElement)(Wo,null,(0,e.createElement)(zo,{icon:"circle",color:"#7ad03a",size:"13px"}),(0,e.createElement)("span",null,n)))}const d=$e(t.overallScore);return(0,P.isNil)(t.overallScore)&&(d.className="loading"),(0,e.createElement)(x.LocationConsumer,null,(s=>{return"sidebar"===s?(a=t.results,n=d,(0,e.createElement)(f,{title:(0,r.__)("Inclusive language","wordpress-seo"),titleScreenReaderText:n.screenReaderInclusiveLanguageText,prefixIcon:re(n.className),prefixIconCollapsed:re(n.className),id:"yoast-inclusive-language-analysis-collapsible-sidebar"},Fo()?i():null,a.length>=1?o():l())):"metabox"===s?function(t,s){return(0,e.createElement)(ae,{target:"wpseo-metabox-inclusive-language-root"},(0,e.createElement)(qo,null,(0,e.createElement)(ie,{target:"wpseo-inclusive-language-score-icon",scoreIndicator:s.className}),Fo()?i():null,t.length>=1?o():l()))}(t.results,d):void 0;var a,n}))};Ho.propTypes={results:l().array,marksButtonStatus:l().oneOf(["enabled","disabled","hidden"]).isRequired,overallScore:l().number,shouldUpsellHighlighting:l().bool},Ho.defaultProps={results:[],overallScore:null,shouldUpsellHighlighting:!1};const Do=(0,k.withSelect)((e=>{const{getInclusiveLanguageResults:t,getMarkButtonStatus:s}=e("yoast-seo/editor");return{...t(),marksButtonStatus:s()}}))(Ho);window.yoast=window.yoast||{},window.yoast.externals=window.yoast.externals||{},window.yoast.externals.components={CollapsibleCornerstone:E,KeywordInput:Q,ReadabilityAnalysis:fo,SeoAnalysis:Oo,InclusiveLanguageAnalysis:Do}})()})();