File "externals-components.js"

Full Path: /home/rrterraplen/public_html/wp-content-20241221212636/plugins/wordpress-seo/js/dist/externals-components.js
File size: 76.23 KB
MIME-type: text/plain
Charset: utf-8

(()=>{"use strict";var e={n:t=>{var s=t&&t.__esModule?()=>t.default:()=>t;return e.d(s,{a:s}),s},d:(t,s)=>{for(var r in s)e.o(s,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:s[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.React,s=window.wp.i18n,r=window.wp.components,o=window.yoast.componentsNew,n=window.yoast.helpers,a=window.yoast.propTypes;var l=e.n(a);const i=window.wp.element,c=window.yoast.styledComponents;var d=e.n(c);const p=d().div`
	display: flex;
	margin-top: 8px;
`;class u extends i.Component{render(){return(0,t.createElement)(p,null,(0,t.createElement)(o.Toggle,{id:this.props.id,labelText:(0,s.__)("Mark as cornerstone content","wordpress-seo"),isEnabled:this.props.isEnabled,onSetToggleState:this.props.onToggle,onToggleDisabled:this.props.onToggleDisabled}))}}u.propTypes={id:l().string,isEnabled:l().bool,onToggle:l().func,onToggleDisabled:l().func},u.defaultProps={id:"cornerstone-toggle",isEnabled:!0,onToggle:()=>{},onToggleDisabled:()=>{}};const m=u,h=d()(o.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=e=>(0,t.createElement)(h,{hasPadding:!0,hasSeparator:!0,...e}),g=e=>{const[s,r]=(0,i.useState)(!1),{prefixIcon:n}=e;return(0,t.createElement)("div",{className:"yoast components-panel__body "+(s?"is-opened":"")},(0,t.createElement)("h2",{className:"components-panel__body-title"},(0,t.createElement)("button",{onClick:function(){r(!s)},className:"components-button components-panel__body-toggle",type:"button",id:e.buttonId},(0,t.createElement)("span",{className:"yoast-icon-span",style:{fill:`${n&&n.color||""}`}},n&&(0,t.createElement)(o.SvgIcon,{icon:n.icon,color:n.color,size:n.size})),(0,t.createElement)("span",{className:"yoast-title-container"},(0,t.createElement)("div",{className:"yoast-title"},e.title),(0,t.createElement)("div",{className:"yoast-subtitle"},e.subTitle)),e.hasBetaBadgeLabel&&(0,t.createElement)(o.BetaBadge,null),(0,t.createElement)("span",{className:"yoast-chevron","aria-hidden":"true"}))),s&&e.children)},w=g;g.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},g.defaultProps={prefixIcon:null,subTitle:"",hasBetaBadgeLabel:!1,buttonId:null};const b=(0,n.makeOutboundLink)();function f({isCornerstone:e,onChange:a,learnMoreUrl:l,location:i}){const c="metabox"===i?y:w;return(0,t.createElement)(c,{id:(0,n.join)(["yoast-cornerstone-collapsible",i]),title:(0,s.__)("Cornerstone content","wordpress-seo")},(0,t.createElement)(o.HelpText,null,(0,s.__)("Cornerstone content should be the most important and extensive articles on your site.","wordpress-seo")+" ",(0,t.createElement)(b,{href:l},(0,s.__)("Learn more about Cornerstone Content.","wordpress-seo"))),(0,t.createElement)(m,{id:(0,n.join)(["yoast-cornerstone",i]),isEnabled:e,onToggle:a}),(0,t.createElement)(r.Slot,{name:"YoastAfterCornerstoneToggle"}))}f.propTypes={isCornerstone:l().bool,onChange:l().func,learnMoreUrl:l().string.isRequired,location:l().string},f.defaultProps={isCornerstone:!0,onChange:()=>{},location:""};const E=window.wp.compose,k=window.wp.data,x=window.yoast.externals.contexts,_=window.wp.apiFetch;var v=e.n(_);const R=d().div`
	min-width: 600px;

	@media screen and ( max-width: 680px ) {
		min-width: 0;
		width: 86vw;
	}
`,N=d().div`
	@media screen and ( min-width: 600px ) {
		max-width: 420px;
	}
`,C=(d()(o.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"),B=e=>{const{title:s,className:o,showYoastIcon:n,additionalClassName:a,...l}=e,i=n?(0,t.createElement)("span",{className:"yoast-icon"}):null;return(0,t.createElement)(r.Modal,{title:s,className:`${o} ${a}`,icon:i,...l},e.children)};B.propTypes={title:l().string,className:l().string,showYoastIcon:l().bool,children:l().oneOfType([l().node,l().arrayOf(l().node)]),additionalClassName:l().string},B.defaultProps={title:"Yoast SEO",className:C,showYoastIcon:!0,children:null,additionalClassName:""};const S=B;var L,A;function P(){return P=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},P.apply(this,arguments)}const I=e=>t.createElement("svg",P({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 425 456.27"},e),L||(L=t.createElement("path",{d:"M73 405.26a66.79 66.79 0 0 1-6.54-1.7 64.75 64.75 0 0 1-6.28-2.31c-1-.42-2-.89-3-1.37-1.49-.72-3-1.56-4.77-2.56-1.5-.88-2.71-1.64-3.83-2.39-.9-.61-1.8-1.26-2.68-1.92a70.154 70.154 0 0 1-5.08-4.19 69.21 69.21 0 0 1-8.4-9.17c-.92-1.2-1.68-2.25-2.35-3.24a70.747 70.747 0 0 1-3.44-5.64 68.29 68.29 0 0 1-8.29-32.55V142.13a68.26 68.26 0 0 1 8.29-32.55c1-1.92 2.21-3.82 3.44-5.64s2.55-3.58 4-5.27a69.26 69.26 0 0 1 14.49-13.25C50.37 84.19 52.27 83 54.2 82A67.59 67.59 0 0 1 73 75.09a68.75 68.75 0 0 1 13.75-1.39h169.66L263 55.39H86.75A86.84 86.84 0 0 0 0 142.13v196.09A86.84 86.84 0 0 0 86.75 425h11.32v-18.35H86.75A68.75 68.75 0 0 1 73 405.26zM368.55 60.85l-1.41-.53-6.41 17.18 1.41.53a68.06 68.06 0 0 1 8.66 4c1.93 1 3.82 2.2 5.65 3.43A69.19 69.19 0 0 1 391 98.67c1.4 1.68 2.72 3.46 3.95 5.27s2.39 3.72 3.44 5.64a68.29 68.29 0 0 1 8.29 32.55v264.52H233.55l-.44.76c-3.07 5.37-6.26 10.48-9.49 15.19L222 425h203V142.13a87.2 87.2 0 0 0-56.45-81.28z"})),A||(A=t.createElement("path",{stroke:"#000",strokeMiterlimit:10,strokeWidth:3.81,d:"M119.8 408.28v46c28.49-1.12 50.73-10.6 69.61-29.58 19.45-19.55 36.17-50 52.61-96L363.94 1.9H305l-98.25 272.89-48.86-153h-54l71.7 184.18a75.67 75.67 0 0 1 0 55.12c-7.3 18.68-20.25 40.66-55.79 47.19z"})));class O extends i.Component{constructor(e){super(e),this.onModalOpen=this.onModalOpen.bind(this),this.onLinkClick=this.onLinkClick.bind(this),this.listenToMessages=this.listenToMessages.bind(this)}onModalOpen(){this.props.keyphrase.trim()?this.props.onOpen(this.props.location):this.props.onOpenWithNoKeyphrase()}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 v()({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:e,location:n,whichModalOpen:a,isLoggedIn:l,shouldCloseOnClickOutside:c,onClose:d}=this.props;return(0,t.createElement)(i.Fragment,null,l&&(0,t.createElement)("div",{className:"yoast"},(0,t.createElement)(o.NewButton,{variant:"secondary",id:`yoast-get-related-keyphrases-${n}`,onClick:this.onModalOpen},(0,s.__)("Get related keyphrases","wordpress-seo"))),e&&a===n&&(0,t.createElement)(S,{title:(0,s.__)("Related keyphrases","wordpress-seo"),onRequestClose:d,icon:(0,t.createElement)(I,null),additionalClassName:"yoast-related-keyphrases-modal",shouldCloseOnClickOutside:c},(0,t.createElement)(R,{className:"yoast-gutenberg-modal__content yoast-related-keyphrases-modal__content"},(0,t.createElement)(r.Slot,{name:"YoastRelatedKeyphrases"}))),!l&&(0,t.createElement)("div",{className:"yoast"},(0,t.createElement)(o.ButtonStyledLink,{variant:"secondary",id:`yoast-get-related-keyphrases-${n}`,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,s.__)("Get related keyphrases","wordpress-seo"),(0,t.createElement)("span",{className:"screen-reader-text"},/* translators: Hidden accessibility text. */
(0,s.__)("(Opens in a new browser tab)","wordpress-seo")))))}}O.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,shouldCloseOnClickOutside:l().bool},O.defaultProps={keyphrase:"",location:"",whichModalOpen:"none",isLoggedIn:!1,shouldCloseOnClickOutside:!0};const M=O,T=(0,E.compose)([(0,k.withSelect)((e=>{const{getSEMrushModalOpen:t,getSEMrushLoginStatus:s,getIsElementorEditor:r}=e("yoast-seo/editor");return{whichModalOpen:t(),isLoggedIn:s(),shouldCloseOnClickOutside:!r()}})),(0,k.withDispatch)((e=>{const{setSEMrushNoKeyphraseMessage:t,setSEMrushOpenModal:s,setSEMrushDismissModal:r,setSEMrushLoginStatus:o}=e("yoast-seo/editor");return{onOpenWithNoKeyphrase:()=>{t()},onOpen:e=>{s(e)},onClose:()=>{r()},onAuthentication:e=>{o(e)}}}))])(M),F=window.yoast.styleGuide,$=(0,n.makeOutboundLink)(d().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: ${F.colors.$color_help_text};
	
	&:hover,
	&:focus {
		color: ${F.colors.$color_snippet_focus};	
	}
	
	// Overwrite the default blue active color for links.
	&:active {
		color: ${F.colors.$color_help_text};	
	}

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

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

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

		${Q} {
			${(0,n.getDirectionalStyle)("margin-left: -32px","margin-right: -32px")};
		}
	}
`;class X extends i.Component{constructor(e){super(e),this.handleChange=this.handleChange.bind(this)}handleChange(e){this.props.onChange(e.target.value)}renderLabel(){const{id:e,label:s,helpLink:r}=this.props;return(0,t.createElement)(Y,null,(0,t.createElement)(D,{htmlFor:e},s),r)}renderErrorMessages(){const e=[...this.props.errorMessages];return!(0,q.isEmpty)(e)&&(0,t.createElement)(G,null,e.map(((e,s)=>(0,t.createElement)(V,{key:s},(0,t.createElement)("span",{role:"alert"},e)))))}render(){const{id:e,showLabel:s,keyword:r,onRemoveKeyword:o,onBlurKeyword:n,onFocusKeyword:a,hasError:l}=this.props,i=!s,c=o!==q.noop;return(0,t.createElement)(j,null,s&&this.renderLabel(),l&&this.renderErrorMessages(),(0,t.createElement)(J,{className:c?"has-remove-keyword-button":null},(0,t.createElement)(W,{"aria-label":i?this.props.label:null,type:"text",id:e,className:l?"has-error":null,onChange:this.handleChange,onFocus:a,onBlur:n,value:r,autoComplete:"off"}),c&&(0,t.createElement)(Q,{onClick:o,focusBoxShadowColor:"#084A67"},(0,t.createElement)(Z,{size:"18px",icon:"times-circle",color:z}))))}}X.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)},X.defaultProps={showLabel:!0,keyword:"",onRemoveKeyword:q.noop,onBlurKeyword:q.noop,onFocusKeyword:q.noop,helpLink:null,hasError:!1,errorMessages:[]};const ee=X,te=d().div`
	padding: 16px;
	/* Necessary to compensate negative top margin of the collapsible after the keyword input. */
	border-bottom: 1px solid transparent;
`;class se extends i.Component{constructor(e){super(e),this.validate=this.validate.bind(this)}static renderHelpLink(){return(0,t.createElement)($,{href:wpseoAdminL10n["shortlinks.focus_keyword_info"],className:"dashicons"},(0,t.createElement)("span",{className:"screen-reader-text"},/* translators: Hidden accessibility text. */
(0,s.__)("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,s.__)("Please enter a focus keyphrase first to get related keyphrases","wordpress-seo")),0===this.props.keyword.trim().length&&this.props.displayNoKeyphrasForTrackingMessage&&e.push((0,s.__)("Please enter a focus keyphrase first to track keyphrase performance","wordpress-seo")),this.props.keyword.includes(",")&&e.push((0,s.__)("Are you trying to use multiple keyphrases? You should add them separately below.","wordpress-seo")),this.props.keyword.length>191&&e.push((0,s.__)("Your keyphrase is too long. It can be a maximum of 191 characters.","wordpress-seo")),e}render(){const e=this.validate();return(0,t.createElement)(x.LocationConsumer,null,(o=>(0,t.createElement)("div",{style:"sidebar"===o?{borderBottom:"1px solid #f0f0f0"}:{}},(0,t.createElement)(te,{location:o},(0,t.createElement)(ee,{id:`focus-keyword-input-${o}`,onChange:this.props.onFocusKeywordChange,keyword:this.props.keyword,label:(0,s.__)("Focus keyphrase","wordpress-seo"),helpLink:se.renderHelpLink(),onBlurKeyword:this.props.onBlurKeyword,onFocusKeyword:this.props.onFocusKeyword,hasError:e.length>0,errorMessages:e}),this.props.isSEMrushIntegrationActive&&(0,t.createElement)(T,{location:o,keyphrase:this.props.keyword})),(0,t.createElement)(r.Slot,{name:`YoastAfterKeywordInput${o.charAt(0).toUpperCase()+o.slice(1)}`}))))}}se.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)},se.defaultProps={keyword:"",isSEMrushIntegrationActive:!1,displayNoKeyphraseMessage:!1,displayNoKeyphrasForTrackingMessage:!1,errors:[]};const re=(0,E.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)}}))])(se);function oe(e){return oe="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},oe(e)}function ne(e,t,s){return r=function(e,t){if("object"!=oe(e)||!e)return e;var s=e[Symbol.toPrimitive];if(void 0!==s){var r=s.call(e,"string");if("object"!=oe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==oe(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 ae=window.yoast.analysis;function le(e,t=""){const s=e.getIdentifier(),r={score:e.score,rating:ae.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 ie(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 ce(e){switch(e){case"loading":return{icon:"loading-spinner",color:F.colors.$color_green_medium_light};case"not-set":return{icon:"seo-score-none",color:F.colors.$color_score_icon};case"noindex":return{icon:"seo-score-none",color:F.colors.$color_noindex};case"good":return{icon:"seo-score-good",color:F.colors.$color_green_medium};case"ok":return{icon:"seo-score-ok",color:F.colors.$color_ok};default:return{icon:"seo-score-bad",color:F.colors.$color_red}}}function de(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=ie(le(o,t),s))}return s}function pe({target:e,children:t}){let s=e;return"string"==typeof e&&(s=document.getElementById(e)),s?(0,i.createPortal)(t,s):null}pe.propTypes={target:l().oneOfType([l().string,l().object]).isRequired,children:l().node.isRequired};const ue=({target:e,scoreIndicator:s})=>(0,t.createElement)(pe,{target:e},(0,t.createElement)(o.SvgIcon,{...ce(s)}));ue.propTypes={target:l().string.isRequired,scoreIndicator:l().string.isRequired};const me=ue,he=window.yoast.analysisReport,ye=window.yoast.uiLibrary,ge=t.forwardRef((function(e,s){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:s},e),t.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"}))})),we=window.wp.hooks,be=window.wp.url,fe=()=>[(0,s.sprintf)(/* translators: %1$s expands to a strong opening tag, %2$s expands to a strong closing tag. */
(0,s.__)("%1$sAI%2$s: Better SEO titles and meta descriptions, faster.","wordpress-seo"),"<strong>","</strong>"),(0,s.sprintf)(/* translators: %1$s expands to a strong opening tag, %2$s expands to a strong closing tag. */
(0,s.__)("%1$sMultiple keywords%2$s: Rank higher for more searches.","wordpress-seo"),"<strong>","</strong>"),(0,s.sprintf)(/* translators: %1$s expands to a strong opening tag, %2$s expands to a strong closing tag. */
(0,s.__)("%1$sSuper fast%2$s internal linking suggestions.","wordpress-seo"),"<strong>","</strong>"),(0,s.sprintf)(/* translators: %1$s expands to a strong opening tag, %2$s expands to a strong closing tag. */
(0,s.__)("%1$sNo more broken links%2$s: Automatic redirect manager.","wordpress-seo"),"<strong>","</strong>"),(0,s.sprintf)(/* translators: %1$s expands to a strong opening tag, %2$s expands to a strong closing tag. */
(0,s.__)("%1$sAppealing social previews%2$s people actually want to click on.","wordpress-seo"),"<strong>","</strong>"),(0,s.sprintf)(/* translators: %1$s expands to a strong opening tag, %2$s expands to a strong closing tag. */
(0,s.__)("%1$s24/7 support%2$s: Also on evenings and weekends.","wordpress-seo"),"<strong>","</strong>")],Ee=d().div`
  padding: 25px 32px 32px;
  color: #303030;
`,ke=d().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;
    }
  }
`,xe=d().span`
  display: block;
  margin-top: 4px;
`,_e=d().h2`
  margin-top: 0;
  margin-bottom: 0.25rem;
  color: #303030;
  font-size: 0.8125rem;
  font-weight: 600;
`,ve=d().p`
  display: block;
  margin: 0.25rem 0 1rem 0 !important;
  max-width: 420px;
`,Re=d().hr`
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  border-top: 0;
  border-bottom: 1px solid #E2E8F0;
`,Ne=d().div`
  text-align: center;
`,Ce=d().a`
  width: 100%;
`,Be=(0,n.makeOutboundLink)(Ce);class Se extends i.Component{constructor(e){super(e),this.state={defaultPrice:"99"}}createBenefitsList(e){return e.length>0&&(0,t.createElement)(ke,{role:"list"},e.map(((e,s)=>(0,t.createElement)("li",{key:`upsell-benefit-${s}`},(0,i.createInterpolateElement)(e,{strong:(0,t.createElement)("strong",null)})))))}render(){const e=(0,k.select)("yoast-seo/editor").isPromotionActive("black-friday-2024-promotion"),{defaultPrice:r}=this.state,o=e?"69.30":null,n=o||r;return(0,t.createElement)(i.Fragment,null,e&&(0,t.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,t.createElement)("div",{className:"yst-mx-auto"},(0,s.__)("30% OFF - BLACK FRIDAY","wordpress-seo"))),(0,t.createElement)(Ee,null,(0,t.createElement)(_e,null,this.props.title),(0,t.createElement)(ve,null,this.props.description),(0,t.createElement)(Ne,null,(0,t.createElement)(Be,{...this.props.upsellButton},this.props.upsellButtonText,this.props.upsellButtonHasCaret&&(0,t.createElement)("span",{"aria-hidden":"true",className:"yoast-button-upsell__caret"})),(0,t.createElement)("div",{className:"yst-text-slate-600 yst-my-4"},o&&(0,t.createElement)(i.Fragment,null,(0,t.createElement)("span",{className:"yst-text-slate-500 yst-line-through"},r)," "),(0,t.createElement)("span",{className:"yst-text-slate-900 yst-text-2xl yst-font-bold"},n)," ",(0,s.__)("$ USD / € EUR / £ GBP per year (ex. VAT)","wordpress-seo")),(0,t.createElement)(xe,{id:this.props.upsellButton["aria-describedby"]},this.props.upsellButtonLabel)),(0,t.createElement)(Re,null),(0,t.createElement)(_e,null,this.props.benefitsTitle),this.createBenefitsList(this.props.benefits)))}}Se.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},Se.defaultProps={title:null,description:null,benefits:[],benefitsTitle:null,upsellButton:{href:"",className:"button button-primary"},upsellButtonLabel:"",upsellButtonHasCaret:!0};const Le=Se,Ae=(0,s.__)("Check your text on even more SEO criteria and get an enhanced keyphrase analysis, making it easier to optimize your content.","wordpress-seo"),Pe=e=>{const{locationContext:r}=(0,x.useRootContext)(),o=(0,be.addQueryArgs)(wpseoAdminL10n[e.buyLink],{context:r});return(0,t.createElement)(Le,{title:(0,s.__)("Get more help with writing content that ranks","wordpress-seo"),description:e.description,benefitsTitle:/* translators: %s expands to 'Yoast SEO Premium'. */
(0,s.sprintf)("%s also gives you:","Yoast SEO Premium"),benefits:fe(),upsellButtonText:(0,s.sprintf)(/* translators: %s expands to 'Yoast SEO Premium'. */
(0,s.__)("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,s.__)("1 year of premium support and updates included!","wordpress-seo")})};Pe.propTypes={buyLink:l().string.isRequired,description:l().string},Pe.defaultProps={description:Ae};const Ie=Pe;class Oe extends i.Component{constructor(e){super(e);const t=this.props.results;this.state={mappedResults:{}},null!==t&&(this.state={mappedResults:de(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:de(this.props.results,this.props.keywordKey)})}createMarkButton({ariaLabel:e,id:s,className:r,status:n,onClick:a,isPressed:l}){return(0,t.createElement)(i.Fragment,null,(0,t.createElement)(o.IconButtonToggle,{marksButtonStatus:n,className:r,onClick:a,id:s,icon:"eye",pressed:l,ariaLabel:e}),this.props.shouldUpsellHighlighting&&(0,t.createElement)("div",{className:"yst-root"},(0,t.createElement)(ye.Badge,{className:"yst-absolute yst-px-[3px] yst-py-[3px] yst--right-[6.5px] yst--top-[6.5px]",size:"small",variant:"upsell"},(0,t.createElement)(ge,{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,q.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,we.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 ae.Paper("",{}),[])}renderHighlightingUpsell(e,r){const o=(0,s.__)("Highlight areas of improvement in your text, no more searching for a needle in a haystack, straight to optimizing! Now also in Elementor!","wordpress-seo");return e&&(0,t.createElement)(S,{title:(0,s.__)("Unlock Premium SEO analysis","wordpress-seo"),onRequestClose:r,additionalClassName:"",className:`${C} yoast-gutenberg-modal__box yoast-gutenberg-modal__no-padding`,id:"yoast-premium-seo-analysis-highlighting-modal",shouldCloseOnClickOutside:!0},(0,t.createElement)(N,null,(0,t.createElement)(Ie,{buyLink:this.props.highlightingUpsellLink,description:o})))}render(){const{mappedResults:e}=this.state,{errorsResults:r,improvementsResults:o,goodResults:n,considerationsResults:a,problemsResults:l}=e,{upsellResults:c,resultCategoryLabels:d}=this.props,p={errors:(0,s.__)("Errors","wordpress-seo"),problems:(0,s.__)("Problems","wordpress-seo"),improvements:(0,s.__)("Improvements","wordpress-seo"),considerations:(0,s.__)("Considerations","wordpress-seo"),goodResults:(0,s.__)("Good results","wordpress-seo")},u=Object.assign(p,d);let m=this.props.marksButtonStatus;return"enabled"===m&&this.props.shortcodesForParsing.length>0&&(m="disabled"),(0,t.createElement)(i.Fragment,null,(0,t.createElement)(he.ContentAnalysis,{errorsResults:r,problemsResults:l,upsellResults:c,improvementsResults:o,considerationsResults:a,goodResults:n,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:u,onResultChange:this.handleResultsChange,shouldUpsellHighlighting:this.props.shouldUpsellHighlighting,renderAIFixesButton:this.props.renderAIFixesButton,renderHighlightingUpsell:this.renderHighlightingUpsell,markButtonFactory:this.createMarkButton}))}}Oe.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,renderAIFixesButton:l().func},Oe.defaultProps={results:null,upsellResults:[],marksButtonStatus:"enabled",marksButtonClassName:"",editButtonClassName:"",activeMarker:null,activeAIFixesButton:null,keywordKey:"",location:"",isPremium:!1,resultCategoryLabels:{},shortcodesForParsing:[],shouldUpsellHighlighting:!1,highlightingUpsellLink:"",renderAIFixesButton:()=>{}};const Me=Oe,Te=(0,E.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}}))])(Me);function Fe(e){return(0,q.isNil)(e)||(e/=10),function(e){switch(e){case"feedback":return{className:"na",screenReaderText:(0,s.__)("Not available","wordpress-seo"),screenReaderReadabilityText:(0,s.__)("Not available","wordpress-seo"),screenReaderInclusiveLanguageText:(0,s.__)("Not available","wordpress-seo")};case"bad":return{className:"bad",screenReaderText:(0,s.__)("Needs improvement","wordpress-seo"),screenReaderReadabilityText:(0,s.__)("Needs improvement","wordpress-seo"),screenReaderInclusiveLanguageText:(0,s.__)("Needs improvement","wordpress-seo")};case"ok":return{className:"ok",screenReaderText:(0,s.__)("OK SEO score","wordpress-seo"),screenReaderReadabilityText:(0,s.__)("OK","wordpress-seo"),screenReaderInclusiveLanguageText:(0,s.__)("Potentially non-inclusive","wordpress-seo")};case"good":return{className:"good",screenReaderText:(0,s.__)("Good SEO score","wordpress-seo"),screenReaderReadabilityText:(0,s.__)("Good","wordpress-seo"),screenReaderInclusiveLanguageText:(0,s.__)("Good","wordpress-seo")};default:return{className:"loading",screenReaderText:"",screenReaderReadabilityText:"",screenReaderInclusiveLanguageText:""}}}(ae.interpreters.scoreToRating(e))}function $e({target:e,children:s}){return(0,t.createElement)(pe,{target:e},s)}function qe(){return(0,q.get)(window,"wpseoScriptData.metabox",{intl:{},isRtl:!1})}function Ue(){return window.wpseoScriptData&&"1"===window.wpseoScriptData.isBlockEditor}$e.propTypes={target:l().string.isRequired,children:l().node.isRequired};l().string.isRequired;const Ke=t.forwardRef((function(e,s){return t.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},e),t.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"}))})),ze=t.forwardRef((function(e,s){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:s},e),t.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"}))})),He=({learnMoreLink:e,thumbnail:r,wistiaEmbedPermission:o,upsellLink:n,isProductCopy:a,title:l,upsellLabel:c,newToText:d,bundleNote:p})=>{const{onClose:u,initialFocus:m}=(0,ye.useModalContext)(),h={a:(0,t.createElement)(lt,{href:e,className:"yst-inline-flex yst-items-center yst-gap-1 yst-no-underline yst-font-medium",variant:"primary"}),ArrowNarrowRightIcon:(0,t.createElement)(ze,{className:"yst-w-4 yst-h-4 rtl:yst-rotate-180"})};return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",{className:"yst-px-10 yst-pt-10 yst-introduction-gradient yst-text-center"},(0,t.createElement)("div",{className:"yst-relative yst-w-full"},(0,t.createElement)(Ot,{videoId:"vmrahpfjxp",thumbnail:r,wistiaEmbedPermission:o}),(0,t.createElement)(ye.Badge,{className:"yst-absolute yst-top-0 yst-right-2 yst-mt-2 yst-ml-2",variant:"info"},"Beta")),(0,t.createElement)("div",{className:"yst-mt-6 yst-text-xs yst-font-medium yst-flex yst-flex-col yst-items-center"},(0,t.createElement)("span",{className:"yst-introduction-modal-uppercase yst-flex yst-gap-2 yst-items-center"},(0,t.createElement)("span",{className:"yst-logo-icon"}),d))),(0,t.createElement)("div",{className:"yst-px-10 yst-pb-4 yst-flex yst-flex-col yst-items-center"},(0,t.createElement)("div",{className:"yst-mt-4 yst-mx-1.5 yst-text-center"},(0,t.createElement)("h3",{className:"yst-text-slate-900 yst-text-lg yst-font-medium"},l),(0,t.createElement)("div",{className:"yst-mt-2 yst-text-slate-600 yst-text-sm"},a?(0,i.createInterpolateElement)((0,s.sprintf)(/* translators: %1$s and %2$s are anchor tags; %3$s is the arrow icon. */
(0,s.__)("Let AI do some of the thinking for you and help you save time. Get high-quality suggestions for product titles and meta descriptions to make your content rank high and look good on social media. %1$sLearn more%2$s%3$s","wordpress-seo"),"<a>","<ArrowNarrowRightIcon />","</a>"),h):(0,i.createInterpolateElement)((0,s.sprintf)(/* translators: %1$s and %2$s are anchor tags; %3$s is the arrow icon. */
(0,s.__)("Let AI do some of the thinking for you and help you save time. Get high-quality suggestions for titles and meta descriptions to make your content rank high and look good on social media. %1$sLearn more%2$s%3$s","wordpress-seo"),"<a>","<ArrowNarrowRightIcon />","</a>"),h))),(0,t.createElement)("div",{className:"yst-w-full yst-flex yst-mt-10"},(0,t.createElement)(ye.Button,{as:"a",className:"yst-grow",size:"extra-large",variant:"upsell",href:n,target:"_blank",ref:m},(0,t.createElement)(Ke,{className:"yst--ml-1 yst-mr-2 yst-h-5 yst-w-5"}),c,(0,t.createElement)("span",{className:"yst-sr-only"},/* translators: Hidden accessibility text. */
(0,s.__)("(Opens in a new browser tab)","wordpress-seo")))),p,(0,t.createElement)(ye.Button,{as:"a",className:"yst-mt-4",variant:"tertiary",onClick:u},(0,s.__)("Close","wordpress-seo"))))};He.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,title:l().string,upsellLabel:l().string,newToText:l().string,isProductCopy:l().bool,bundleNote:l().oneOfType([l().string,l().element])},He.defaultProps={title:(0,s.__)("Use AI to write your titles & meta descriptions!","wordpress-seo"),upsellLabel:(0,s.sprintf)(/* translators: %1$s expands to Yoast SEO Premium. */
(0,s.__)("Unlock with %1$s","wordpress-seo"),"Yoast SEO Premium"),newToText:"Yoast SEO Premium",isProductCopy:!1,bundleNote:""};const je=({learnMoreLink:e,thumbnail:r,wistiaEmbedPermission:o,upsellLink:n,upsellLabel:a})=>{const{onClose:l,initialFocus:c}=(0,ye.useModalContext)(),d={a:(0,t.createElement)(lt,{href:e,className:"yst-inline-flex yst-items-center yst-gap-1 yst-no-underline yst-font-medium",variant:"primary"}),ArrowNarrowRightIcon:(0,t.createElement)(ze,{className:"yst-w-4 yst-h-4 rtl:yst-rotate-180"}),br:(0,t.createElement)("br",null)};return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",{className:"yst-px-10 yst-pt-10 yst-introduction-gradient yst-text-center"},(0,t.createElement)("div",{className:"yst-relative yst-w-full"},(0,t.createElement)(Ot,{videoId:"vun9z1dpfh",thumbnail:r,wistiaEmbedPermission:o}),(0,t.createElement)(ye.Badge,{className:"yst-absolute yst-right-0 yst-mr-4 yst-text-center yst-justify-center",variant:"info",style:{top:"-8px"}},(0,s.__)("Beta","wordpress-seo-premium"))),(0,t.createElement)("div",{className:"yst-mt-6 yst-text-xs yst-font-medium yst-flex yst-flex-col yst-items-center"},(0,t.createElement)("span",{className:"yst-introduction-modal-uppercase yst-flex yst-gap-2 yst-items-center"},(0,t.createElement)("span",{className:"yst-logo-icon"}),"Yoast SEO Premium"))),(0,t.createElement)("div",{className:"yst-px-10 yst-pb-4 yst-flex yst-flex-col yst-items-center"},(0,t.createElement)("div",{className:"yst-mt-4 yst-mx-1.5 yst-text-center"},(0,t.createElement)("h3",{className:"yst-text-slate-900 yst-text-lg yst-font-medium"},(0,s.sprintf)(/* translators: %s: Expands to "Yoast AI" */
(0,s.__)("Optimize your SEO content with %s","wordpress-seo"),"Yoast AI")),(0,t.createElement)("div",{className:"yst-mt-2 yst-text-slate-600 yst-text-sm"},(0,i.createInterpolateElement)((0,s.sprintf)(/* translators: %1$s is a break tag; %2$s and %3$s are anchor tags; %4$s is the arrow icon. */
(0,s.__)("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>"),d))),(0,t.createElement)("div",{className:"yst-w-full yst-flex yst-mt-6"},(0,t.createElement)(ye.Button,{as:"a",className:"yst-grow",size:"extra-large",variant:"upsell",href:n,target:"_blank",ref:c},(0,t.createElement)(Ke,{className:"yst--ml-1 yst-mr-2 yst-h-5 yst-w-5"}),a,(0,t.createElement)("span",{className:"yst-sr-only"},/* translators: Hidden accessibility text. */
(0,s.__)("(Opens in a new browser tab)","wordpress-seo")))),(0,t.createElement)(ye.Button,{as:"a",className:"yst-mt-4",variant:"tertiary",onClick:l},(0,s.__)("Close","wordpress-seo"))))};je.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},je.defaultProps={upsellLabel:(0,s.sprintf)(/* translators: %1$s expands to Yoast SEO Premium. */
(0,s.__)("Unlock with %1$s","wordpress-seo"),"Yoast SEO Premium")};const De=({handleRefreshClick:e,supportLink:r})=>(0,t.createElement)("div",{className:"yst-flex yst-gap-2"},(0,t.createElement)(ye.Button,{onClick:e},(0,s.__)("Refresh this page","wordpress-seo")),(0,t.createElement)(ye.Button,{variant:"secondary",as:"a",href:r,target:"_blank",rel:"noopener"},(0,s.__)("Contact support","wordpress-seo")));De.propTypes={handleRefreshClick:l().func.isRequired,supportLink:l().string.isRequired};const Ye=({handleRefreshClick:e,supportLink:r})=>(0,t.createElement)("div",{className:"yst-grid yst-grid-cols-1 yst-gap-y-2"},(0,t.createElement)(ye.Button,{className:"yst-order-last",onClick:e},(0,s.__)("Refresh this page","wordpress-seo")),(0,t.createElement)(ye.Button,{variant:"secondary",as:"a",href:r,target:"_blank",rel:"noopener"},(0,s.__)("Contact support","wordpress-seo")));Ye.propTypes={handleRefreshClick:l().func.isRequired,supportLink:l().string.isRequired};const We=({error:e,children:r})=>(0,t.createElement)("div",{role:"alert",className:"yst-max-w-screen-sm yst-p-8 yst-space-y-4"},(0,t.createElement)(ye.Title,null,(0,s.__)("Something went wrong. An unexpected error occurred.","wordpress-seo")),(0,t.createElement)("p",null,(0,s.__)("We're very sorry, but it seems like the following error has interrupted our application:","wordpress-seo")),(0,t.createElement)(ye.Alert,{variant:"error"},(null==e?void 0:e.message)||(0,s.__)("Undefined error message.","wordpress-seo")),(0,t.createElement)("p",null,(0,s.__)("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")),r);We.propTypes={error:l().object.isRequired,children:l().node},We.VerticalButtons=Ye,We.HorizontalButtons=De;var Ge;function Ve(){return Ve=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},Ve.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 Qe=e=>t.createElement("svg",Ve({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 1000 1000"},e),Ge||(Ge=t.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"}))),Ze=window.ReactDOM;var Je,Xe,et;(Xe=Je||(Je={})).Pop="POP",Xe.Push="PUSH",Xe.Replace="REPLACE",function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(et||(et={})),new Set(["lazy","caseSensitive","path","id","index","children"]),Error;const tt=["post","put","patch","delete"],st=(new Set(tt),["get",...tt]);new Set(st),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred"),t.Component,t.startTransition,new Promise((()=>{})),t.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(e){}var rt,ot,nt,at;new Map,t.startTransition,Ze.flushSync,t.useId,"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,(at=rt||(rt={})).UseScrollRestoration="useScrollRestoration",at.UseSubmit="useSubmit",at.UseSubmitFetcher="useSubmitFetcher",at.UseFetcher="useFetcher",at.useViewTransitionState="useViewTransitionState",(nt=ot||(ot={})).UseFetcher="useFetcher",nt.UseFetchers="useFetchers",nt.UseScrollRestoration="useScrollRestoration",l().string.isRequired,l().string;const lt=({href:e,children:r,...o})=>(0,t.createElement)(ye.Link,{target:"_blank",rel:"noopener noreferrer",...o,href:e},r,(0,t.createElement)("span",{className:"yst-sr-only"},/* translators: Hidden accessibility text. */
(0,s.__)("(Opens in a new browser tab)","wordpress-seo")));lt.propTypes={href:l().string.isRequired,children:l().node},lt.defaultProps={children:null};const it=t.forwardRef((function(e,s){return t.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},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 8l4 4m0 0l-4 4m4-4H3"}))}));var ct,dt,pt;function ut(){return ut=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},ut.apply(this,arguments)}const mt=e=>t.createElement("svg",ut({xmlns:"http://www.w3.org/2000/svg",id:"star-rating-half_svg__Layer_1","data-name":"Layer 1",viewBox:"0 0 500 475.53"},e),ct||(ct=t.createElement("defs",null,t.createElement("style",null,".star-rating-half_svg__cls-1{fill:#fbbf24}"))),dt||(dt=t.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"})),pt||(pt=t.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"})),t.createElement("path",{d:"m500 181.64-172.75-25.11L250 0v394.3l154.51 81.23L375 303.48l125-121.84z",style:{fill:"#f3f4f6"}}));function ht(){return ht=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},ht.apply(this,arguments)}const yt=e=>t.createElement("svg",ht({xmlns:"http://www.w3.org/2000/svg","data-name":"Layer 1",viewBox:"0 0 500 475.53"},e),t.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 gt,wt,bt,ft,Et,kt,xt,_t,vt;function Rt(){return Rt=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},Rt.apply(this,arguments)}const Nt=e=>t.createElement("svg",Rt({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 500 500"},e),gt||(gt=t.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"})),wt||(wt=t.createElement("path",{fill:"#6c2548",d:"M437.61 2 155.89 500H500V80a80 80 0 0 0-62.39-78z"})),bt||(bt=t.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"})),ft||(ft=t.createElement("circle",{cx:368.33,cy:124.68,r:97.34,fill:"#9fda4f",transform:"rotate(-45 368.335 124.68)"})),Et||(Et=t.createElement("path",{fill:"#77b227",d:"m416.2 39.93-95.74 169.51A97.34 97.34 0 1 0 416.2 39.93z"})),kt||(kt=t.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"})),xt||(xt=t.createElement("path",{fill:"#f49a00",d:"m294.5 254.59-62.56 110.76a63.6 63.6 0 1 0 62.56-110.76z"})),_t||(_t=t.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"})),vt||(vt=t.createElement("path",{fill:"#ed261f",d:"m202.9 416.8-37.54 66.48a38.17 38.17 0 0 0 37.54-66.48z"}))),Ct=({link:e,linkProps:r,isPromotionActive:o})=>{let n=(0,i.useMemo)((()=>(0,s.__)("Use AI to generate titles and meta descriptions, automatically redirect deleted pages, get 24/7 support, and much, much more!","wordpress-seo")),[]),a=(0,i.createInterpolateElement)((0,s.sprintf)(/* translators: %1$s and %2$s expand to a span wrap to avoid linebreaks. %3$s expands to "Yoast SEO Premium". */
(0,s.__)("%1$sGet%2$s %3$s","wordpress-seo"),"<nowrap>","</nowrap>","Yoast SEO Premium"),{nowrap:(0,t.createElement)("span",{className:"yst-whitespace-nowrap"})});const l=o("black-friday-2024-promotion");return l&&(n=(0,i.useMemo)((()=>(0,s.__)("If you were thinking about upgrading, now's the time! 30% OFF ends 3rd Dec 11am (CET)","wordpress-seo")),[]),a=(0,i.createInterpolateElement)((0,s.sprintf)(/* translators: %1$s and %2$s expand to a span wrap to avoid linebreaks. %3$s expands to "Yoast SEO Premium". */
(0,s.__)("%1$sBuy%2$s %3$s","wordpress-seo"),"<nowrap>","</nowrap>","Yoast SEO Premium"),{nowrap:(0,t.createElement)("span",{className:"yst-whitespace-nowrap"})})),(0,t.createElement)("div",{className:"yst-p-6 yst-rounded-lg yst-text-white yst-bg-primary-500 yst-shadow"},(0,t.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,t.createElement)(Nt,null)),l&&(0,t.createElement)("div",{className:"sidebar__sale_banner_container"},(0,t.createElement)("div",{className:"sidebar__sale_banner"},(0,t.createElement)("span",{className:"banner_text"},(0,s.__)("30% OFF - BLACK FRIDAY","wordpress-seo")))),(0,t.createElement)(ye.Title,{as:"h2",className:"yst-mt-6 yst-text-base yst-font-extrabold yst-text-white"},a),(0,t.createElement)("p",{className:"yst-mt-2"},n),(0,t.createElement)(ye.Button,{as:"a",variant:"upsell",href:e,target:"_blank",rel:"noopener",className:"yst-flex yst-justify-center yst-gap-2 yst-mt-4 focus:yst-ring-offset-primary-500",...r},(0,t.createElement)("span",null,l?(0,s.__)("Buy now","wordpress-seo"):a),(0,t.createElement)(it,{className:"yst-w-4 yst-h-4 yst-icon-rtl"})),(0,t.createElement)("p",{className:"yst-text-center yst-text-xs yst-mx-2 yst-font-light yst-leading-5 yst-mt-2"},!l&&(0,t.createElement)(t.Fragment,null,(0,s.__)("Only $/€/£99 per year (ex VAT)","wordpress-seo"),(0,t.createElement)("br",null)),(0,s.__)("30-day money back guarantee.","wordpress-seo")),(0,t.createElement)("hr",{className:"yst-border-t yst-border-primary-300 yst-my-4"}),(0,t.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,t.createElement)("span",{className:"yst-font-medium yst-text-white hover:yst-underline"},(0,s.__)("Read reviews from real users","wordpress-seo")),(0,t.createElement)("span",{className:"yst-flex yst-gap-2 yst-mt-2 yst-items-center"},(0,t.createElement)(Qe,{className:"yst-w-5 yst-h-5"}),(0,t.createElement)("span",{className:"yst-flex yst-gap-1"},(0,t.createElement)(yt,{className:"yst-w-5 yst-h-5"}),(0,t.createElement)(yt,{className:"yst-w-5 yst-h-5"}),(0,t.createElement)(yt,{className:"yst-w-5 yst-h-5"}),(0,t.createElement)(yt,{className:"yst-w-5 yst-h-5"}),(0,t.createElement)(mt,{className:"yst-w-5 yst-h-5"})),(0,t.createElement)("span",{className:"yst-text-sm yst-font-semibold yst-text-white"},"4.6 / 5"))))};Ct.propTypes={link:l().string.isRequired,linkProps:l().object,isPromotionActive:l().func},Ct.defaultProps={linkProps:{},isPromotionActive:q.noop};const Bt=({premiumLink:e,premiumUpsellConfig:r,isPromotionActive:o})=>{const n=o("black-friday-2024-promotion");return(0,t.createElement)(ye.Paper,{as:"div",className:"xl:yst-max-w-3xl"},n&&(0,t.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,t.createElement)("div",null,(0,s.__)("30% OFF","wordpress-seo")),(0,t.createElement)("div",null,(0,s.__)("BLACK FRIDAY","wordpress-seo"))),(0,t.createElement)("div",{className:"yst-p-6 yst-flex yst-flex-col"},(0,t.createElement)(ye.Title,{as:"h2",size:"4",className:"yst-text-xl yst-text-primary-500"},(0,s.sprintf)(/* translators: %s expands to "Yoast SEO" Premium */
(0,s.__)("Upgrade to %s","wordpress-seo"),"Yoast SEO Premium")),(0,t.createElement)("ul",{className:"yst-grid yst-grid-cols-1 sm:yst-grid-cols-2 yst-gap-x-6 yst-list-disc yst-pl-[1em] yst-list-outside yst-text-slate-800 yst-mt-6"},fe().map(((e,s)=>(0,t.createElement)("li",{key:`upsell-benefit-${s}`},(0,i.createInterpolateElement)(e,{strong:(0,t.createElement)("span",{className:"yst-font-semibold"})}))))),(0,t.createElement)(ye.Button,{as:"a",variant:"upsell",size:"extra-large",href:e,className:"yst-gap-2 yst-mt-4",target:"_blank",rel:"noopener",...r},n?(0,s.__)("Claim your 30% off now!","wordpress-seo"):(0,s.sprintf)(/* translators: %s expands to "Yoast SEO" Premium */
(0,s.__)("Explore %s now!","wordpress-seo"),"Yoast SEO Premium"),(0,t.createElement)(it,{className:"yst-w-4 yst-h-4 yst-icon-rtl"}))))};Bt.propTypes={premiumLink:l().string.isRequired,premiumUpsellConfig:l().object,isPromotionActive:l().func},Bt.defaultProps={premiumUpsellConfig:{},isPromotionActive:q.noop},l().string.isRequired,l().object.isRequired,l().string.isRequired,l().func.isRequired,t.forwardRef((function(e,s){return t.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},e),t.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 St=window.yoast.reactHelmet,Lt="loading",At="showPlay",Pt="askPermission",It="isPlaying",Ot=({videoId:e,thumbnail:r,wistiaEmbedPermission:o})=>{const[n,a]=(0,i.useState)(o.value?It:At),l=(0,i.useCallback)((()=>a(It)),[a]),c=(0,i.useCallback)((()=>{o.value?l():a(Pt)}),[o.value,l,a]),d=(0,i.useCallback)((()=>a(At)),[a]),p=(0,i.useCallback)((()=>{o.set(!0),l()}),[o.set,l]);return(0,t.createElement)(t.Fragment,null,o.value&&(0,t.createElement)(St.Helmet,null,(0,t.createElement)("script",{src:"https://fast.wistia.com/assets/external/E-v1.js",async:!0})),(0,t.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"},n===At&&(0,t.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:c},(0,t.createElement)("img",{className:"yst-w-full yst-h-auto",alt:"",loading:"lazy",decoding:"async",...r})),n===Pt&&(0,t.createElement)("div",{className:"yst-absolute yst-inset-0 yst-flex yst-flex-col yst-items-center yst-justify-center yst-bg-white"},(0,t.createElement)("p",{className:"yst-max-w-xs yst-mx-auto yst-text-center"},o.status===Lt&&(0,t.createElement)(ye.Spinner,null),o.status!==Lt&&(0,s.sprintf)(/* translators: %1$s expands to Yoast SEO. %2$s expands to Wistia. */
(0,s.__)("To see this video, you need to allow %1$s to load embedded videos from %2$s.","wordpress-seo"),"Yoast SEO","Wistia")),(0,t.createElement)("div",{className:"yst-flex yst-mt-6 yst-gap-x-4"},(0,t.createElement)(ye.Button,{type:"button",variant:"secondary",onClick:d,disabled:o.status===Lt},(0,s.__)("Deny","wordpress-seo")),(0,t.createElement)(ye.Button,{type:"button",variant:"primary",onClick:p,disabled:o.status===Lt},(0,s.__)("Allow","wordpress-seo")))),o.value&&n===It&&(0,t.createElement)("div",{className:"yst-absolute yst-w-full yst-h-full yst-top-0 yst-left-0"},null===e&&(0,t.createElement)(ye.Spinner,{className:"yst-h-full yst-mx-auto"}),null!==e&&(0,t.createElement)("div",{className:`wistia_embed wistia_async_${e} videoFoam=true`}))))};Ot.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};const Mt="yoast-seo/editor",Tt=()=>{const e=(0,k.useSelect)((e=>e(Mt).selectLink("https://yoa.st/ai-fix-assessments-upsell-learn-more")),[]),r={upsellLink:(0,k.useSelect)((e=>e(Mt).selectLink("https://yoa.st/ai-fix-assessments-upsell")),[]),title:(0,s.__)("Fix assessments with AI!","wordpress-seo"),upsellLabel:(0,s.sprintf)(/* translators: %1$s expands to Yoast SEO Premium. */
(0,s.__)("Unlock with %1$s","wordpress-seo"),"Yoast SEO Premium")},o=(0,k.useSelect)((e=>e(Mt).selectImageLink("ai-fix-assessments-thumbnail.png")),[]),n=(0,i.useMemo)((()=>({src:o,width:"432",height:"244"})),[o]),a=(0,k.useSelect)((e=>e(Mt).selectWistiaEmbedPermissionValue()),[]),l=(0,k.useSelect)((e=>e(Mt).selectWistiaEmbedPermissionStatus()),[]),{setWistiaEmbedPermission:c}=(0,k.useDispatch)(Mt),d=(0,i.useMemo)((()=>({value:a,status:l,set:c})),[a,l,c]);return(0,t.createElement)(je,{learnMoreLink:e,thumbnail:n,wistiaEmbedPermission:d,...r})},Ft=e=>{let t=[...e];return e.forEach((e=>{e.innerBlocks&&e.innerBlocks.length>0&&(t=[...t,...Ft(e.innerBlocks)])})),t},$t=({id:e,isPremium:r})=>{const n=e+"AIFixes",[a,,,l,c]=(0,ye.useToggleState)(!1),d=(0,k.useSelect)((e=>e("yoast-seo/editor").getActiveAIFixesButton()),[]),p=(0,k.useSelect)((e=>e("yoast-seo/editor").getActiveMarker()),[]),{setActiveAIFixesButton:u,setActiveMarker:m,setMarkerPauseStatus:h,setMarkerStatus:y}=(0,k.useDispatch)("yoast-seo/editor"),g=(0,i.useRef)(null),[w,b]=(0,i.useState)(""),f=(0,s.__)("Optimize with AI","wordpress-seo"),E=(0,s.__)("Please switch to the visual editor to optimize with AI.","wordpress-seo"),x=d===n,_=(0,k.useSelect)((e=>e("core/edit-post").getEditorMode()),[]),{isEnabled:v,ariaLabel:R}=(0,k.useSelect)((e=>{if(null!==d&&!x)return{isEnabled:!1,ariaLabel:null};const t=e("yoast-seo/editor").getDisabledAIFixesButtons();if(Object.keys(t).includes(n))return{isEnabled:!1,ariaLabel:t[n]};if("visual"!==_)return{isEnabled:!1,ariaLabel:E};const s=Ft(e("core/block-editor").getBlocks()).every((t=>"visual"===e("core/block-editor").getBlockMode(t.clientId)));return{isEnabled:s,ariaLabel:s?f:E}}),[x,d,_]);(0,i.useEffect)((()=>(y("visual"!==_||d?"disabled":"enabled"),()=>{y("disabled")})),[_,d,y]);const N=()=>{p&&(m(null),h(!1),window.YoastSEO.analysis.applyMarks(new ae.Paper("",{}),[])),n===d?(u(null),y("enabled")):(u(n),y("disabled")),b("")},C=(0,i.useCallback)((()=>{r?((0,we.doAction)("yoast.ai.fixAssessments",n),N()):l()}),[N,l]),B=(0,i.useCallback)((()=>{R&&b("yoast-tooltip yoast-tooltip-multiline "+(v?"yoast-tooltip-w":"yoast-tooltip-nw"))}),[v,R]),S=(0,i.useCallback)((()=>{b("")}),[]);return(0,t.createElement)(o.IconAIFixesButton,{onClick:C,ariaLabel:R,onPointerEnter:B,onPointerLeave:S,id:n,className:`ai-button ${w}`,pressed:x,disabled:!v},!r&&(0,t.createElement)(ge,{className:"yst-fixes-button__lock-icon yst-text-amber-900"}),(0,t.createElement)(o.SparklesIcon,{pressed:x}),a&&(0,t.createElement)(ye.Modal,{className:"yst-introduction-modal",isOpen:a,onClose:c,initialFocus:g},(0,t.createElement)(ye.Modal.Panel,{className:"yst-max-w-lg yst-p-0 yst-rounded-3xl yst-introduction-modal-panel"},(0,t.createElement)(Tt,{onClose:c,focusElementRef:g}))))};$t.propTypes={id:l().string.isRequired,isPremium:l().bool},$t.defaultProps={isPremium:!1};const qt=$t,Ut=d().span`
	font-size: 1em;
	font-weight: bold;
	margin: 0 0 8px;
	display: block;
`,Kt=d().div`
	padding: 16px;
`,zt=d()($)`
	margin: -8px 0 -4px 4px;
`;class Ht extends i.Component{constructor(...e){super(...e),ne(this,"renderAIFixesButton",((e,s)=>{const{isElementor:r,isAiFeatureEnabled:o}=this.props,n=qe().isPremium;if(n&&!o)return;const a=document.body.classList.contains("elementor-editor-active"),l=!r&&!a;return e&&Ue()&&l&&(0,t.createElement)(qt,{id:s,isPremium:n})}))}renderResults(e){return(0,t.createElement)(i.Fragment,null,(0,t.createElement)(Ut,null,(0,s.__)("Analysis results","wordpress-seo"),(0,t.createElement)(zt,{href:wpseoAdminL10n["shortlinks.readability_analysis_info"],className:"dashicons"},(0,t.createElement)("span",{className:"screen-reader-text"},/* translators: Hidden accessibility text. */
(0,s.__)("Learn more about the readability analysis","wordpress-seo")))),(0,t.createElement)(Te,{results:this.props.results,upsellResults:e,marksButtonClassName:"yoast-tooltip yoast-tooltip-w",marksButtonStatus:this.props.marksButtonStatus,highlightingUpsellLink:"shortlinks.upsell.sidebar.highlighting_readability_analysis",shouldUpsellHighlighting:this.props.shouldUpsellHighlighting,renderAIFixesButton:this.renderAIFixesButton}))}getUpsellResults(e,t){let r=wpseoAdminL10n["shortlinks.upsell.metabox.word_complexity"];return"sidebar"===e&&(r=wpseoAdminL10n["shortlinks.upsell.sidebar.word_complexity"]),r=(0,be.addQueryArgs)(r,{context:t}),function(){const e=ae.helpers.getLanguagesWithWordComplexity(),t=window.wpseoScriptData.metabox.contentLocale,s=ae.languageProcessing.getLanguage(t);return e.includes(s)}()?[{score:0,rating:"upsell",hasMarks:!1,id:"wordComplexity",text:(0,s.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,s.__)("%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="${r}" data-action="load-nfd-ctb" data-ctb-id="f6a84663-465f-4cb5-8ba5-f7a6d72224b2" target="_blank">`,"</a>"),markerId:"wordComplexity"}]:[]}render(){const e=Fe(this.props.overallScore);return(0,q.isNil)(this.props.overallScore)&&(e.className="loading"),(0,t.createElement)(x.LocationConsumer,null,(r=>(0,t.createElement)(x.RootContext.Consumer,null,(({locationContext:o})=>{let n=[];return this.props.shouldUpsell&&(n=this.getUpsellResults(r,o)),"sidebar"===r?(0,t.createElement)(w,{title:(0,s.__)("Readability analysis","wordpress-seo"),titleScreenReaderText:e.screenReaderReadabilityText,prefixIcon:ce(e.className),prefixIconCollapsed:ce(e.className),id:`yoast-readability-analysis-collapsible-${r}`},this.renderResults(n)):"metabox"===r?(0,t.createElement)($e,{target:"wpseo-metabox-readability-root"},(0,t.createElement)(Kt,null,(0,t.createElement)(me,{target:"wpseo-readability-score-icon",scoreIndicator:e.className}),this.renderResults(n))):void 0}))))}}Ht.propTypes={results:l().array.isRequired,marksButtonStatus:l().string.isRequired,overallScore:l().number,shouldUpsell:l().bool,shouldUpsellHighlighting:l().bool,isAiFeatureEnabled:l().bool,isElementor:l().bool},Ht.defaultProps={overallScore:null,shouldUpsell:!1,shouldUpsellHighlighting:!1,isAiFeatureEnabled:!1};const jt=(0,k.withSelect)((e=>{const{getReadabilityResults:t,getMarkButtonStatus:s,getIsElementorEditor:r,getPreference:o}=e("yoast-seo/editor");return{...t(),marksButtonStatus:s(),isElementor:r(),isAiFeatureEnabled:o("isAiFeatureActive",!1)}}))(Ht),Dt=d().p`
	color: ${F.colors.$color_upsell_text};
	margin: 0;
	padding-right: 8px;
`,Yt=d().div`
	font-size: 1em;
	display: flex;
	flex-direction: ${e=>"horizontal"===e.alignment?"row":"column"};
	${(0,n.getDirectionalStyle)("border-left","border-right")}: 4px solid ${F.colors.$color_pink_dark};
	margin: 16px 0;
	padding: 0 0 0 8px;
	max-width: 600px;

	> ${Dt} {
		margin-bottom: ${e=>"vertical"===e.alignment&&"16px"};
	}
`,Wt=d()(o.SvgIcon)`
	margin: ${(0,n.getDirectionalStyle)("0 0 0 4px","0 4px 0 0")};
	transform: ${(0,n.getDirectionalStyle)("rotate(0deg)","rotate(180deg)")};
`,Gt=(0,n.makeOutboundLink)(o.UpsellLinkButton),Vt=e=>{const{alignment:r,url:o}=e;return(0,t.createElement)(Yt,{alignment:r},(0,t.createElement)(Dt,null,(0,s.sprintf)(/* translators: %s expands to Yoast SEO Premium */
(0,s.__)("%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,t.createElement)("div",null,(0,t.createElement)(Gt,{href:o,className:"UpsellLinkButton","data-action":"load-nfd-ctb","data-ctb-id":"f6a84663-465f-4cb5-8ba5-f7a6d72224b2"},(0,s.sprintf)(/* translators: %s expands to Premium */
(0,s.__)("Go %s!","wordpress-seo"),"Premium"),(0,t.createElement)(Wt,{icon:"arrow-right",size:"8px",color:F.colors.$color_black}))))};Vt.propTypes={alignment:l().oneOf(["horizontal","vertical"]),url:l().string.isRequired},Vt.defaultProps={alignment:"vertical"};const Qt=Vt,Zt=e=>(0,t.createElement)(Le,{title:(0,s.__)("Write more natural and engaging content","wordpress-seo"),description:(0,s.sprintf)(/* translators: %s expands to "Yoast SEO Premium" */
(0,s.__)("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:/* translators: %s expands to 'Yoast SEO Premium'. */
(0,s.sprintf)("%s also gives you:","Yoast SEO Premium"),benefits:fe(),upsellButtonText:(0,s.sprintf)(/* translators: %s expands to 'Yoast SEO Premium'. */
(0,s.__)("Unlock with %s","wordpress-seo"),"Yoast SEO Premium"),upsellButton:{href:e.buyLink,className:"yoast-button-upsell",rel:null,"data-ctb-id":"f6a84663-465f-4cb5-8ba5-f7a6d72224b2","data-action":"load-nfd-ctb"},upsellButtonLabel:(0,s.__)("1 year free support and updates included!","wordpress-seo")});Zt.propTypes={buyLink:l().string.isRequired};const Jt=Zt,Xt=e=>(0,t.createElement)(Le,{title:(0,s.__)("Reach a wider audience","wordpress-seo"),description:(0,s.__)("Get help optimizing for up to 5 related keyphrases. This helps you reach a wider audience and get more traffic.","wordpress-seo"),benefitsTitle:/* translators: %s expands to 'Yoast SEO Premium'. */
(0,s.sprintf)("%s also gives you:","Yoast SEO Premium"),benefits:fe(),upsellButtonText:(0,s.sprintf)(/* translators: %s expands to 'Yoast SEO Premium'. */
(0,s.__)("Unlock with %s","wordpress-seo"),"Yoast SEO Premium"),upsellButton:{href:e.buyLink,className:"yoast-button-upsell",rel:null,"data-ctb-id":"f6a84663-465f-4cb5-8ba5-f7a6d72224b2","data-action":"load-nfd-ctb"},upsellButtonLabel:(0,s.__)("1 year free support and updates included!","wordpress-seo")});Xt.propTypes={buyLink:l().string.isRequired};const es=Xt,ts=d().button`
	// Increase specificity to override WP rules.
	&& {
		display: flex;
		align-items: center;
	}

	.yoast-svg-icon {
		margin: 1px 7px 0 0;
		fill: currentColor;
	}
`,ss={open:(0,s.__)("Open","wordpress-seo"),heading:"",closeIconButton:(0,s.__)("Close","wordpress-seo"),closeButton:""},rs=e=>{const[s,r]=(0,i.useState)(!1),n=Object.assign({},ss,e.labels),a=(0,i.useCallback)((()=>r(!1)),[]),l=(0,i.useCallback)((()=>r(!0)),[]);return(0,t.createElement)(i.Fragment,null,(0,t.createElement)(ts,{type:"button",onClick:l,className:`${e.classes.openButton} yoast-modal__button-open`},e.openButtonIcon&&(0,t.createElement)(o.SvgIcon,{icon:e.openButtonIcon,size:"13px"}),n.open),s&&(0,t.createElement)(S,{onRequestClose:a,className:e.className,title:n.heading},e.children))};rs.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},rs.defaultProps={className:C,openButtonIcon:"",classes:{}};const os=rs;function ns({location:e}){return(0,t.createElement)(r.Slot,{name:`yoast-synonyms-${e}`})}ns.propTypes={location:l().string.isRequired};const as=d().span`
	font-size: 1em;
	font-weight: bold;
	margin: 1.5em 0 1em;
	display: block;
`;class ls extends i.Component{constructor(...e){super(...e),ne(this,"renderAIFixesButton",((e,s)=>{const{isElementor:r,isAiFeatureEnabled:o}=this.props,n=qe().isPremium;if(n&&!o)return;const a=document.body.classList.contains("elementor-editor-active"),l=!r&&!a;return e&&Ue()&&l&&(0,t.createElement)(qt,{id:s,isPremium:n})}))}renderSynonymsUpsell(e,r){const o={className:`${C} yoast-gutenberg-modal__box yoast-gutenberg-modal__no-padding`,classes:{openButton:"wpseo-keyword-synonyms button-link"},labels:{open:"+ "+(0,s.__)("Add synonyms","wordpress-seo"),modalAriaLabel:(0,s.__)("Add synonyms","wordpress-seo"),heading:(0,s.__)("Add synonyms","wordpress-seo")}},n=wpseoAdminL10n["sidebar"===e.toLowerCase()?"shortlinks.upsell.sidebar.focus_keyword_synonyms_button":"shortlinks.upsell.metabox.focus_keyword_synonyms_button"];return(0,t.createElement)(os,{...o},(0,t.createElement)(N,null,(0,t.createElement)(Jt,{buyLink:(0,be.addQueryArgs)(n,{context:r})})))}renderMultipleKeywordsUpsell(e,r){const o={className:`${C} yoast-gutenberg-modal__box yoast-gutenberg-modal__no-padding`,classes:{openButton:"wpseo-multiple-keywords button-link"},labels:{open:"+ "+(0,s.__)("Add related keyphrase","wordpress-seo"),modalAriaLabel:(0,s.__)("Add related keyphrases","wordpress-seo"),heading:(0,s.__)("Add related keyphrases","wordpress-seo")}},n=wpseoAdminL10n["sidebar"===e.toLowerCase()?"shortlinks.upsell.sidebar.focus_keyword_additional_button":"shortlinks.upsell.metabox.focus_keyword_additional_button"];return(0,t.createElement)(os,{...o},(0,t.createElement)(N,null,(0,t.createElement)(es,{buyLink:(0,be.addQueryArgs)(n,{context:r})})))}renderWordFormsUpsell(e,s){let r="sidebar"===e?wpseoAdminL10n["shortlinks.upsell.sidebar.morphology_upsell_sidebar"]:wpseoAdminL10n["shortlinks.upsell.sidebar.morphology_upsell_metabox"];return r=(0,be.addQueryArgs)(r,{context:s}),(0,t.createElement)(Qt,{url:r,alignment:"sidebar"===e?"vertical":"horizontal"})}renderTabIcon(e,s){return"metabox"!==e?null:(0,t.createElement)(me,{target:"wpseo-seo-score-icon",scoreIndicator:s})}getUpsellResults(e,t){let r=wpseoAdminL10n["shortlinks.upsell.metabox.keyphrase_distribution"];return"sidebar"===e&&(r=wpseoAdminL10n["shortlinks.upsell.sidebar.keyphrase_distribution"]),r=(0,be.addQueryArgs)(r,{context:t}),[{score:0,rating:"upsell",hasMarks:!1,hasJumps:!1,id:"keyphraseDistribution",text:(0,s.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,s.__)("%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="${r}" data-action="load-nfd-ctb" data-ctb-id="f6a84663-465f-4cb5-8ba5-f7a6d72224b2" target="_blank">`,"</a>"),markerId:"keyphraseDistribution"}]}render(){const e=Fe(this.props.overallScore),r=qe().isPremium;return"loading"!==e.className&&""===this.props.keyword&&(e.className="na",e.screenReaderReadabilityText=(0,s.__)("Enter a focus keyphrase to calculate the SEO score","wordpress-seo")),(0,t.createElement)(x.LocationConsumer,null,(o=>(0,t.createElement)(x.RootContext.Consumer,null,(({locationContext:n})=>{const a="metabox"===o?y:w;let l=[];return this.props.shouldUpsell&&(l=this.getUpsellResults(o,n)),(0,t.createElement)(i.Fragment,null,(0,t.createElement)(a,{title:r?(0,s.__)("Premium SEO analysis","wordpress-seo"):(0,s.__)("SEO analysis","wordpress-seo"),titleScreenReaderText:e.screenReaderReadabilityText,prefixIcon:ce(e.className),prefixIconCollapsed:ce(e.className),subTitle:this.props.keyword,id:`yoast-seo-analysis-collapsible-${o}`},(0,t.createElement)(ns,{location:o}),this.props.shouldUpsell&&(0,t.createElement)(i.Fragment,null,this.renderSynonymsUpsell(o,n),this.renderMultipleKeywordsUpsell(o,n)),this.props.shouldUpsellWordFormRecognition&&this.renderWordFormsUpsell(o,n),(0,t.createElement)(as,null,(0,s.__)("Analysis results","wordpress-seo")),(0,t.createElement)(Te,{results:this.props.results,upsellResults:l,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",renderAIFixesButton:this.renderAIFixesButton})),this.renderTabIcon(o,e.className))}))))}}ls.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},ls.defaultProps={results:[],marksButtonStatus:null,keyword:"",shouldUpsell:!1,shouldUpsellWordFormRecognition:!1,overallScore:null,shouldUpsellHighlighting:!1,isElementor:!1,isAiFeatureEnabled:!1};const is=(0,k.withSelect)(((e,t)=>{const{getFocusKeyphrase:s,getMarksButtonStatus:r,getResultsForKeyword:o,getIsElementorEditor:n,getPreference:a}=e("yoast-seo/editor"),l=s();return{...o(l),marksButtonStatus:t.hideMarksButtons?"disabled":r(),keyword:l,isElementor:n(),isAiFeatureEnabled:a("isAiFeatureActive",!1)}}))(ls);function cs(){const e=qe();return(0,q.get)(e,"multilingualPluginActive",!1)}const ds=d().span`
	font-size: 1em;
	font-weight: bold;
	margin: 0 0 8px;
	display: block;
`,ps=d().div`
	padding: 16px;
`,us=d()($)`
	margin: -8px 0 -4px 4px;
`,ms=d().p`
	min-height: 24px;
	margin: 12px 0 0 0;
	padding: 0;
	display: flex;
	align-items: flex-start;
`,hs=d()(o.SvgIcon)`
	margin: 3px 11px 0 0; // icon 13 + 11 right margin = 24 for the 8px grid.
`,ys=e=>{const r=wpseoAdminL10n["shortlinks.inclusive_language_analysis_info"];function n(){return(0,t.createElement)(i.Fragment,null,(0,t.createElement)(ds,null,(0,s.__)("Analysis results","wordpress-seo"),(0,t.createElement)(us,{href:r,className:"dashicons"},(0,t.createElement)("span",{className:"screen-reader-text"},/* translators: Hidden accessibility text. */
(0,s.__)("Learn more about the inclusive language analysis","wordpress-seo")))),(0,t.createElement)(Te,{results:e.results,marksButtonClassName:"yoast-tooltip yoast-tooltip-w",marksButtonStatus:e.marksButtonStatus,resultCategoryLabels:{problems:(0,s.__)("Non-inclusive","wordpress-seo"),improvements:(0,s.__)("Potentially non-inclusive","wordpress-seo")},highlightingUpsellLink:"shortlinks.upsell.sidebar.highlighting_inclusive_analysis",shouldUpsellHighlighting:e.shouldUpsellHighlighting}))}const a=(0,i.createInterpolateElement)((0,s.sprintf)(/* Translators: %1$s expands to a link on yoast.com, %2$s expands to the anchor end tag. */
(0,s.__)("%1$sInclusive language%2$s: We haven't detected any potentially non-inclusive phrases. Great work!","wordpress-seo"),"<a>","</a>"),{a:(0,t.createElement)("a",{href:r,target:"_blank",rel:"noreferrer"})});function l(){const e=(0,s.__)("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,t.createElement)(o.Alert,{type:"info"},e)}function c(){return(0,t.createElement)(i.Fragment,null,(0,t.createElement)(ds,null,(0,s.__)("Analysis results","wordpress-seo"),(0,t.createElement)(us,{href:r,className:"dashicons"},(0,t.createElement)("span",{className:"screen-reader-text"},/* translators: Hidden accessibility text. */
(0,s.__)("Learn more about the inclusive language analysis","wordpress-seo")))),(0,t.createElement)(ms,null,(0,t.createElement)(hs,{icon:"circle",color:"#7ad03a",size:"13px"}),(0,t.createElement)("span",null,a)))}const d=Fe(e.overallScore);return(0,q.isNil)(e.overallScore)&&(d.className="loading"),(0,t.createElement)(x.LocationConsumer,null,(r=>{return"sidebar"===r?(o=e.results,a=d,(0,t.createElement)(w,{title:(0,s.__)("Inclusive language","wordpress-seo"),titleScreenReaderText:a.screenReaderInclusiveLanguageText,prefixIcon:ce(a.className),prefixIconCollapsed:ce(a.className),id:"yoast-inclusive-language-analysis-collapsible-sidebar"},cs()?l():null,o.length>=1?n():c())):"metabox"===r?function(e,s){return(0,t.createElement)(pe,{target:"wpseo-metabox-inclusive-language-root"},(0,t.createElement)(ps,null,(0,t.createElement)(me,{target:"wpseo-inclusive-language-score-icon",scoreIndicator:s.className}),cs()?l():null,e.length>=1?n():c()))}(e.results,d):void 0;var o,a}))};ys.propTypes={results:l().array,marksButtonStatus:l().oneOf(["enabled","disabled","hidden"]).isRequired,overallScore:l().number,shouldUpsellHighlighting:l().bool},ys.defaultProps={results:[],overallScore:null,shouldUpsellHighlighting:!1};const gs=(0,k.withSelect)((e=>{const{getInclusiveLanguageResults:t,getMarkButtonStatus:s}=e("yoast-seo/editor");return{...t(),marksButtonStatus:s()}}))(ys);window.yoast=window.yoast||{},window.yoast.externals=window.yoast.externals||{},window.yoast.externals.components={CollapsibleCornerstone:f,KeywordInput:re,ReadabilityAnalysis:jt,SeoAnalysis:is,InclusiveLanguageAnalysis:gs}})();