????JFIF??x?x????'
Server IP : 104.21.32.1 / Your IP : 216.73.216.191 Web Server : LiteSpeed System : Linux premium151.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : tempvsty ( 647) PHP Version : 8.0.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/./././././tempvsty/peekmysite.com/wp-content/plugins/wordpress-seo/js/dist/ |
Upload File : |
(()=>{var e={4184:(e,t)=>{var s;!function(){"use strict";var i={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var s=arguments[t];if(s){var o=typeof s;if("string"===o||"number"===o)e.push(s);else if(Array.isArray(s)){if(s.length){var n=r.apply(null,s);n&&e.push(n)}}else if("object"===o){if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]")){e.push(s.toString());continue}for(var a in s)i.call(s,a)&&s[a]&&e.push(a)}}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(s=function(){return r}.apply(t,[]))||(e.exports=s)}()},6746:(e,t,s)=>{"use strict";var i="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},r=a(s(9196)),o=a(s(9156)),n=a(s(6743));function a(e){return e&&e.__esModule?e:{default:e}}var l=void 0;function c(e,t){var s,n,a,d,p,u,h,m,g=[],y={};for(u=0;u<e.length;u++)if("string"!==(p=e[u]).type){if(!t.hasOwnProperty(p.value)||void 0===t[p.value])throw new Error("Invalid interpolation, missing component node: `"+p.value+"`");if("object"!==i(t[p.value]))throw new Error("Invalid interpolation, component node must be a ReactElement or null: `"+p.value+"`","\n> "+l);if("componentClose"===p.type)throw new Error("Missing opening component token: `"+p.value+"`");if("componentOpen"===p.type){s=t[p.value],a=u;break}g.push(t[p.value])}else g.push(p.value);return s&&(d=function(e,t){var s,i,r=t[e],o=0;for(i=e+1;i<t.length;i++)if((s=t[i]).value===r.value){if("componentOpen"===s.type){o++;continue}if("componentClose"===s.type){if(0===o)return i;o--}}throw new Error("Missing closing component token `"+r.value+"`")}(a,e),h=c(e.slice(a+1,d),t),n=r.default.cloneElement(s,{},h),g.push(n),d<e.length-1&&(m=c(e.slice(d+1),t),g=g.concat(m))),1===g.length?g[0]:(g.forEach((function(e,t){e&&(y["interpolation-child-"+t]=e)})),(0,o.default)(y))}t.Z=function(e){var t=e.mixedString,s=e.components,r=e.throwErrors;if(l=t,!s)return t;if("object"!==(void 0===s?"undefined":i(s))){if(r)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var o=(0,n.default)(t);try{return c(o,s)}catch(e){if(r)throw new Error("Interpolation Error: unable to process `"+t+"` because of error `"+e.message+"`");return t}}},6743:e=>{"use strict";function t(e){return e.match(/^\{\{\//)?{type:"componentClose",value:e.replace(/\W/g,"")}:e.match(/\/\}\}$/)?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.match(/^\{\{/)?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}e.exports=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(t)}},9156:(e,t,s)=>{"use strict";var i=s(9196),r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,o=s(7942),n=s(9179),a=s(397),l=".",c=":",d="function"==typeof Symbol&&Symbol.iterator,p="@@iterator";function u(e,t){return e&&"object"==typeof e&&null!=e.key?(s=e.key,i={"=":"=0",":":"=2"},"$"+(""+s).replace(/[=:]/g,(function(e){return i[e]}))):t.toString(36);var s,i}function h(e,t,s,i){var o,a=typeof e;if("undefined"!==a&&"boolean"!==a||(e=null),null===e||"string"===a||"number"===a||"object"===a&&e.$$typeof===r)return s(i,e,""===t?l+u(e,0):t),1;var m=0,g=""===t?l:t+c;if(Array.isArray(e))for(var y=0;y<e.length;y++)m+=h(o=e[y],g+u(o,y),s,i);else{var f=function(e){var t=e&&(d&&e[d]||e[p]);if("function"==typeof t)return t}(e);if(f)for(var w,x=f.call(e),b=0;!(w=x.next()).done;)m+=h(o=w.value,g+u(o,b++),s,i);else if("object"===a){var v=""+e;n(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===v?"object with keys {"+Object.keys(e).join(", ")+"}":v,"")}}return m}var m=/\/+/g;function g(e){return(""+e).replace(m,"$&/")}var y,f,w=x,x=function(e){var t=this;if(t.instancePool.length){var s=t.instancePool.pop();return t.call(s,e),s}return new t(e)};function b(e,t,s,i){this.result=e,this.keyPrefix=t,this.func=s,this.context=i,this.count=0}function v(e,t,s){var r,n,a=e.result,l=e.keyPrefix,c=e.func,d=e.context,p=c.call(d,t,e.count++);Array.isArray(p)?_(p,a,s,o.thatReturnsArgument):null!=p&&(i.isValidElement(p)&&(r=p,n=l+(!p.key||t&&t.key===p.key?"":g(p.key)+"/")+s,p=i.cloneElement(r,{key:n},void 0!==r.props?r.props.children:void 0)),a.push(p))}function _(e,t,s,i,r){var o="";null!=s&&(o=g(s)+"/");var n=b.getPooled(t,o,i,r);!function(e,t,s){null==e||h(e,"",t,s)}(e,v,n),b.release(n)}b.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},y=function(e,t,s,i){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,s,i),o}return new r(e,t,s,i)},(f=b).instancePool=[],f.getPooled=y||w,f.poolSize||(f.poolSize=10),f.release=function(e){var t=this;n(e instanceof t,"Trying to release an instance into a pool of a different type."),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},e.exports=function(e){if("object"!=typeof e||!e||Array.isArray(e))return a(!1,"React.addons.createFragment only accepts a single object. Got: %s",e),e;if(i.isValidElement(e))return a(!1,"React.addons.createFragment does not accept a ReactElement without a wrapper object."),e;n(1!==e.nodeType,"React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.");var t=[];for(var s in e)_(e[s],t,s,o.thatReturnsArgument);return t}},7942:e=>{"use strict";function t(e){return function(){return e}}var s=function(){};s.thatReturns=t,s.thatReturnsFalse=t(!1),s.thatReturnsTrue=t(!0),s.thatReturnsNull=t(null),s.thatReturnsThis=function(){return this},s.thatReturnsArgument=function(e){return e},e.exports=s},9179:e=>{"use strict";e.exports=function(e,t,s,i,r,o,n,a){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[s,i,r,o,n,a],d=0;(l=new Error(t.replace(/%s/g,(function(){return c[d++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},397:(e,t,s)=>{"use strict";var i=s(7942);e.exports=i},9196:e=>{"use strict";e.exports=window.React}},t={};function s(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,s),o.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.element,t=window.wp.components,i=window.yoast.propTypes;var r=s.n(i);const o=window.lodash,n=window.yoast.styledComponents;var a=s.n(n);const l=window.yoast.externals.contexts,c=window.ReactJSXRuntime,d=({theme:e,location:t,children:s})=>(0,c.jsx)(l.LocationProvider,{value:t,children:(0,c.jsx)(n.ThemeProvider,{theme:e,children:s})});d.propTypes={theme:r().object.isRequired,location:r().oneOf(["sidebar","metabox","modal"]).isRequired,children:r().element.isRequired};const p=d,u=window.yoast.uiLibrary,h=window.wp.data;const m=window.wp.i18n,g=(t,s)=>{try{return(0,e.createInterpolateElement)(t,s)}catch(e){return console.error("Error in translation for:",t,e),t}};r().string.isRequired;var y=s(9196),f=s.n(y);const w=y.forwardRef((function(e,t){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),y.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"}))})),x=y.forwardRef((function(e,t){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),y.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"}))})),b=({learnMoreLink:e,thumbnail:t,wistiaEmbedPermission:s,upsellLink:i,upsellLabel:r,newToText:o,ctbId:n})=>{const{onClose:a,initialFocus:l}=(0,u.useModalContext)(),d={a:(0,c.jsx)(q,{href:e,className:"yst-inline-flex yst-items-center yst-gap-1 yst-no-underline yst-font-medium",variant:"primary"}),ArrowNarrowRightIcon:(0,c.jsx)(x,{className:"yst-w-4 yst-h-4 rtl:yst-rotate-180"}),br:(0,c.jsx)("br",{})};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:"yst-px-10 yst-pt-10 yst-introduction-gradient yst-text-center",children:[(0,c.jsxs)("div",{className:"yst-relative yst-w-full",children:[(0,c.jsx)(_e,{videoId:"vun9z1dpfh",thumbnail:t,wistiaEmbedPermission:s}),(0,c.jsx)(u.Badge,{className:"yst-absolute yst-end-4 yst-text-center yst-justify-center",variant:"info",style:{top:"-8px"},children:(0,m.__)("Beta","wordpress-seo")})]}),(0,c.jsx)("div",{className:"yst-mt-6 yst-text-xs yst-font-medium yst-flex yst-flex-col yst-items-center",children:(0,c.jsxs)("span",{className:"yst-introduction-modal-uppercase yst-flex yst-gap-2 yst-items-center",children:[(0,c.jsx)("span",{className:"yst-logo-icon"}),o]})})]}),(0,c.jsxs)("div",{className:"yst-px-10 yst-pb-4 yst-flex yst-flex-col yst-items-center",children:[(0,c.jsxs)("div",{className:"yst-mt-4 yst-mx-1.5 yst-text-center",children:[(0,c.jsx)("h3",{className:"yst-text-slate-900 yst-text-lg yst-font-medium",children:(0,m.sprintf)(/* translators: %s: Expands to "Yoast AI" */ (0,m.__)("Optimize your SEO content with %s","wordpress-seo"),"Yoast AI")}),(0,c.jsx)("div",{className:"yst-mt-2 yst-text-slate-600 yst-text-sm",children:g((0,m.sprintf)(/* translators: %1$s is a break tag; %2$s and %3$s are anchor tags; %4$s is the arrow icon. */ (0,m.__)("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,c.jsx)("div",{className:"yst-w-full yst-flex yst-mt-6",children:(0,c.jsxs)(u.Button,{as:"a",className:"yst-grow",size:"extra-large",variant:"upsell",href:i,target:"_blank",ref:l,"data-action":"load-nfd-ctb","data-ctb-id":n,children:[(0,c.jsx)(w,{className:"yst--ms-1 yst-me-2 yst-h-5 yst-w-5"}),r,(0,c.jsx)("span",{className:"yst-sr-only",children:/* translators: Hidden accessibility text. */ (0,m.__)("(Opens in a new browser tab)","wordpress-seo")})]})}),(0,c.jsx)(u.Button,{as:"a",className:"yst-mt-4",variant:"tertiary",onClick:a,children:(0,m.__)("Close","wordpress-seo")})]})]})};b.propTypes={learnMoreLink:r().string.isRequired,upsellLink:r().string.isRequired,thumbnail:r().shape({src:r().string.isRequired,width:r().string,height:r().string}).isRequired,wistiaEmbedPermission:r().shape({value:r().bool.isRequired,status:r().string.isRequired,set:r().func.isRequired}).isRequired,upsellLabel:r().string,newToText:r().string,ctbId:r().string},b.defaultProps={upsellLabel:(0,m.sprintf)(/* translators: %1$s expands to Yoast SEO Premium. */ (0,m.__)("Unlock with %1$s","wordpress-seo"),"Yoast SEO Premium"),newToText:"Yoast SEO Premium",ctbId:"f6a84663-465f-4cb5-8ba5-f7a6d72224b2"};const v=({handleRefreshClick:e,supportLink:t})=>(0,c.jsxs)("div",{className:"yst-flex yst-gap-2",children:[(0,c.jsx)(u.Button,{onClick:e,children:(0,m.__)("Refresh this page","wordpress-seo")}),(0,c.jsx)(u.Button,{variant:"secondary",as:"a",href:t,target:"_blank",rel:"noopener",children:(0,m.__)("Contact support","wordpress-seo")})]});v.propTypes={handleRefreshClick:r().func.isRequired,supportLink:r().string.isRequired};const _=({handleRefreshClick:e,supportLink:t})=>(0,c.jsxs)("div",{className:"yst-grid yst-grid-cols-1 yst-gap-y-2",children:[(0,c.jsx)(u.Button,{className:"yst-order-last",onClick:e,children:(0,m.__)("Refresh this page","wordpress-seo")}),(0,c.jsx)(u.Button,{variant:"secondary",as:"a",href:t,target:"_blank",rel:"noopener",children:(0,m.__)("Contact support","wordpress-seo")})]});_.propTypes={handleRefreshClick:r().func.isRequired,supportLink:r().string.isRequired};const k=({error:e,children:t})=>(0,c.jsxs)("div",{role:"alert",className:"yst-max-w-screen-sm yst-p-8 yst-space-y-4",children:[(0,c.jsx)(u.Title,{children:(0,m.__)("Something went wrong. An unexpected error occurred.","wordpress-seo")}),(0,c.jsx)("p",{children:(0,m.__)("We're very sorry, but it seems like the following error has interrupted our application:","wordpress-seo")}),(0,c.jsx)(u.Alert,{variant:"error",children:(null==e?void 0:e.message)||(0,m.__)("Undefined error message.","wordpress-seo")}),(0,c.jsx)("p",{children:(0,m.__)("Unfortunately, this means that any unsaved changes in this section will be lost. You can try and refresh this page to resolve the problem. If this error still occurs, please get in touch with our support team, and we'll get you all the help you need!","wordpress-seo")}),t]});k.propTypes={error:r().object.isRequired,children:r().node},k.VerticalButtons=_,k.HorizontalButtons=v;var j;function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},T.apply(this,arguments)}r().string,r().node.isRequired,r().node.isRequired,r().node,r().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 E=e=>y.createElement("svg",T({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 1000 1000"},e),j||(j=y.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"}))),S=window.ReactDOM;var R,C,I;(C=R||(R={})).Pop="POP",C.Push="PUSH",C.Replace="REPLACE",function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(I||(I={})),new Set(["lazy","caseSensitive","path","id","index","children"]),Error;const L=["post","put","patch","delete"],P=(new Set(L),["get",...L]);new Set(P),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred"),y.Component,y.startTransition,new Promise((()=>{})),y.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(e){}var A,F,M,N;new Map,y.startTransition,S.flushSync,y.useId,"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,(N=A||(A={})).UseScrollRestoration="useScrollRestoration",N.UseSubmit="useSubmit",N.UseSubmitFetcher="useSubmitFetcher",N.UseFetcher="useFetcher",N.useViewTransitionState="useViewTransitionState",(M=F||(F={})).UseFetcher="useFetcher",M.UseFetchers="useFetchers",M.UseScrollRestoration="useScrollRestoration",r().string.isRequired,r().string;const q=({href:e,children:t,...s})=>(0,c.jsxs)(u.Link,{target:"_blank",rel:"noopener noreferrer",...s,href:e,children:[t,(0,c.jsx)("span",{className:"yst-sr-only",children:/* translators: Hidden accessibility text. */ (0,m.__)("(Opens in a new browser tab)","wordpress-seo")})]});q.propTypes={href:r().string.isRequired,children:r().node},q.defaultProps={children:null};const O=y.forwardRef((function(e,t){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 8l4 4m0 0l-4 4m4-4H3"}))})),D=[(0,m.__)("AI tools included","wordpress-seo"),(0,m.sprintf)(/* translators: %1$s expands to "Yoast SEO academy". */ (0,m.__)("%1$s access","wordpress-seo"),"Yoast SEO academy"),(0,m.__)("24/7 support","wordpress-seo")],$=[(0,m.__)("Generate SEO optimized metadata in seconds with AI","wordpress-seo"),(0,m.__)("Make your articles visible, be seen in Google News","wordpress-seo"),(0,m.__)("Built to get found by search, AI, and real users","wordpress-seo"),(0,m.__)("Easy Local SEO. Show up in Google Maps results","wordpress-seo"),(0,m.__)("Internal links and redirect management, easy","wordpress-seo"),(0,m.__)("Access to friendly help when you need it, day or night","wordpress-seo")],U=(e=!1)=>e?D:$,W=(e=!1)=>{if(e)return D;const t=[...$];return t[1]=(0,m.__)("Boost visibility for your products, from 10 or 10,000+","wordpress-seo"),t};var B,H,K;function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},z.apply(this,arguments)}const Y=e=>y.createElement("svg",z({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),B||(B=y.createElement("defs",null,y.createElement("style",null,".star-rating-half_svg__cls-1{fill:#fbbf24}"))),H||(H=y.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"})),K||(K=y.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"})),y.createElement("path",{d:"m500 181.64-172.75-25.11L250 0v394.3l154.51 81.23L375 303.48l125-121.84z",style:{fill:"#f3f4f6"}}));function V(){return V=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},V.apply(this,arguments)}const Z=e=>y.createElement("svg",V({xmlns:"http://www.w3.org/2000/svg","data-name":"Layer 1",viewBox:"0 0 500 475.53"},e),y.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 G,X,Q;function J(){return J=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},J.apply(this,arguments)}const ee=e=>y.createElement("svg",J({xmlns:"http://www.w3.org/2000/svg",width:64,height:64,fill:"none"},e),G||(G=y.createElement("g",{clipPath:"url(#yoast-premium-logo-new_svg__a)"},y.createElement("path",{fill:"url(#yoast-premium-logo-new_svg__b)",d:"M64 64H10.24C4.586 64 0 59.414 0 53.76V10.24C0 4.586 4.586 0 10.24 0h43.52C59.414 0 64 4.586 64 10.24V64Z"}),y.createElement("path",{fill:"#6C2548",d:"m56.016.125-36.06 63.75H64v-53.76c0-4.88-3.414-8.96-7.984-9.987",opacity:.35}),y.createElement("path",{fill:"#fff",d:"M9.523 43.174v4.468c2.765-.116 4.928-1.024 6.759-2.88 1.83-1.856 3.507-4.864 5.107-9.332L33.242 3.686h-5.735L17.96 30.208l-4.736-14.874H7.975l6.963 17.895a7.352 7.352 0 0 1 0 5.35c-.704 1.818-1.971 3.955-5.415 4.595Z"}),y.createElement("path",{fill:"#9FDA4F",d:"M53.274 5.11c-5.99-3.382-13.59-1.27-16.976 4.72-3.386 5.99-1.27 13.59 4.72 16.976 5.99 3.386 13.59 1.27 16.976-4.72 3.382-5.99 1.27-13.59-4.72-16.976Z"}),y.createElement("path",{fill:"#77B227",d:"M53.274 5.11 41.018 26.806c5.99 3.386 13.59 1.27 16.976-4.72 3.382-5.99 1.27-13.59-4.72-16.976Z"}),y.createElement("path",{fill:"#FEC228",d:"M37.731 32.608s-.012-.006-.019-.013c-.006 0-.01-.006-.016-.01a8.134 8.134 0 0 0-11.091 3.085 8.145 8.145 0 0 0 3.104 11.108 8.139 8.139 0 0 0 11.075-3.095 8.14 8.14 0 0 0-3.05-11.072"}),y.createElement("path",{fill:"#F49A00",d:"m37.696 32.586-8.01 14.179a8.145 8.145 0 0 0 11.095-3.085 8.144 8.144 0 0 0-3.085-11.094Z"}),y.createElement("path",{fill:"#FF4E47",d:"M28.454 57.61a4.89 4.89 0 0 0-2.477-4.256 4.863 4.863 0 0 0-2.4-.634c-2.69 0-4.892 2.18-4.892 4.883a4.882 4.882 0 0 0 4.883 4.893 4.882 4.882 0 0 0 4.893-4.883"}),y.createElement("path",{fill:"#ED261F",d:"m25.971 53.35-4.806 8.51a4.882 4.882 0 0 0 6.656-1.854 4.882 4.882 0 0 0-1.853-6.656"}),y.createElement("path",{fill:"#CD82AB",d:"M57.402 58.086H43.888v1.197h13.514v-1.197ZM53.75 53.366l-3.103-5.76v.004l-.004-.004-3.104 5.76-4.777-3.42 1.126 7.702h13.514l1.126-7.702-4.777 3.42Z"}))),X||(X=y.createElement("path",{stroke:"#fff",d:"M10 .5h44a9.5 9.5 0 0 1 9.5 9.5v53.5H10A9.5 9.5 0 0 1 .5 54V10A9.5 9.5 0 0 1 10 .5Z"})),Q||(Q=y.createElement("defs",null,y.createElement("linearGradient",{id:"yoast-premium-logo-new_svg__b",x1:-2.912,x2:68.509,y1:25.843,y2:38.438,gradientUnits:"userSpaceOnUse"},y.createElement("stop",{stopColor:"#5D237A"}),y.createElement("stop",{offset:.08,stopColor:"#702175"}),y.createElement("stop",{offset:.22,stopColor:"#872070"}),y.createElement("stop",{offset:.36,stopColor:"#981E6C"}),y.createElement("stop",{offset:.51,stopColor:"#A21E69"}),y.createElement("stop",{offset:.7,stopColor:"#A61E69"})),y.createElement("clipPath",{id:"yoast-premium-logo-new_svg__a"},y.createElement("path",{fill:"#fff",d:"M0 10C0 4.477 4.477 0 10 0h44c5.523 0 10 4.477 10 10v54H10C4.477 64 0 59.523 0 54V10Z"})))));var te,se,ie;function re(){return re=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},re.apply(this,arguments)}const oe=e=>y.createElement("svg",re({xmlns:"http://www.w3.org/2000/svg",width:64,height:64,fill:"none"},e),te||(te=y.createElement("g",{clipPath:"url(#woo-seo-logo-new_svg__a)"},y.createElement("path",{fill:"#0E1E65",d:"M64 64H10.24C4.586 64 0 59.414 0 53.76V10.24C0 4.586 4.586 0 10.24 0h43.52C59.414 0 64 4.586 64 10.24V64Z"}),y.createElement("path",{fill:"#0075B3",d:"M56.016.253 19.956 64H64V10.24c0-4.88-3.414-8.96-7.984-9.987Z"}),y.createElement("path",{fill:"#fff",d:"M9.523 43.174v4.468c2.765-.116 4.928-1.024 6.759-2.88 1.83-1.856 3.507-4.864 5.107-9.332L33.242 3.686h-5.735L17.96 30.208l-4.736-14.874H7.975l6.963 17.895a7.352 7.352 0 0 1 0 5.35c-.704 1.818-1.971 3.955-5.415 4.595Z"}),y.createElement("path",{fill:"#9FDA4F",d:"M53.274 5.11c-5.99-3.382-13.59-1.27-16.976 4.72-3.386 5.99-1.27 13.59 4.72 16.976 5.99 3.386 13.59 1.27 16.976-4.72 3.382-5.99 1.27-13.59-4.72-16.976Z"}),y.createElement("path",{fill:"#FEC228",d:"M37.731 32.608s-.012-.006-.019-.013c-.006 0-.01-.006-.016-.01a8.134 8.134 0 0 0-11.091 3.085 8.145 8.145 0 0 0 3.104 11.108 8.139 8.139 0 0 0 11.075-3.095 8.14 8.14 0 0 0-3.05-11.072"}),y.createElement("path",{fill:"#FF4E47",d:"M28.454 57.61a4.89 4.89 0 0 0-2.477-4.256 4.863 4.863 0 0 0-2.4-.634c-2.69 0-4.892 2.18-4.892 4.883a4.882 4.882 0 0 0 4.883 4.893 4.882 4.882 0 0 0 4.893-4.883"}),y.createElement("path",{fill:"#77B227",d:"M53.274 5.11 41.018 26.806c5.99 3.386 13.59 1.27 16.976-4.72 3.382-5.99 1.27-13.59-4.72-16.976Z"}),y.createElement("path",{fill:"#F49A00",d:"m37.696 32.586-8.01 14.179a8.145 8.145 0 0 0 11.095-3.085 8.144 8.144 0 0 0-3.085-11.094Z"}),y.createElement("path",{fill:"#ED261F",d:"m25.971 53.35-4.806 8.51a4.882 4.882 0 0 0 6.656-1.854 4.882 4.882 0 0 0-1.853-6.656"}),y.createElement("path",{fill:"#A1CCE3",d:"M58.102 46.806a1.26 1.26 0 0 0-1.219.938l-.157.582a40.97 40.97 0 0 0-10.857 1.261c-.013 0-.023.007-.035.01a.503.503 0 0 0-.317.64 40.344 40.344 0 0 0 1.99 4.86c.083.173.26.282.455.282h7.542c.64 0 1.213.403 1.427 1.008h-10a.507.507 0 0 0 0 1.011h10.592a.507.507 0 0 0 .506-.505c0-1.149-.775-2.15-1.888-2.442L57.862 48a.25.25 0 0 1 .243-.186h.932a.507.507 0 0 0 0-1.01h-.931l-.004.002ZM57.018 59.92a1.008 1.008 0 1 1 0-2.016 1.008 1.008 0 0 1 0 2.016Zm-8.573 0a1.008 1.008 0 1 1 0-2.016 1.008 1.008 0 0 1 0 2.016Z"}))),se||(se=y.createElement("path",{stroke:"#fff",d:"M10 .5h44a9.5 9.5 0 0 1 9.5 9.5v53.5H10A9.5 9.5 0 0 1 .5 54V10A9.5 9.5 0 0 1 10 .5Z"})),ie||(ie=y.createElement("defs",null,y.createElement("clipPath",{id:"woo-seo-logo-new_svg__a"},y.createElement("path",{fill:"#fff",d:"M0 10C0 4.477 4.477 0 10 0h44c5.523 0 10 4.477 10 10v54H10C4.477 64 0 59.523 0 54V10Z"}))))),ne=y.forwardRef((function(e,t){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),y.createElement("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"}))}));var ae=s(4184),le=s.n(ae);const ce=({link:t,linkProps:s,isPromotionActive:i,isWooCommerceActive:r})=>{const o=r?W:U,n=(0,e.useMemo)((()=>r?(0,m.__)("SEO that scales with your product catalog.","wordpress-seo"):(0,m.__)("Now with Local, News & Video SEO + 1 Google Docs seat!","wordpress-seo")),[r]);let a=(0,m.__)("Buy now","wordpress-seo");const l=g(r?(0,m.sprintf)(/* translators: %1$s and %2$s expand to a span wrap to avoid linebreaks. %3$s expands to "Yoast SEO Premium". */ (0,m.__)("%1$s%2$s %3$s","wordpress-seo"),"<nowrap>","</nowrap>","Yoast WooCommerce SEO"):(0,m.sprintf)(/* translators: %1$s and %2$s expand to a span wrap to avoid linebreaks. %3$s expands to "Yoast SEO Premium". */ (0,m.__)("%1$s%2$s %3$s","wordpress-seo"),"<nowrap>","</nowrap>","Yoast SEO Premium"),{nowrap:(0,c.jsx)("span",{className:"yst-whitespace-nowrap"})}),d=i("black-friday-promotion");return d&&(a=(0,m.__)("Buy now for 30% off","wordpress-seo")),(0,c.jsxs)("div",{className:le()("yst-p-6 yst-rounded-lg yst-text-white yst-shadow",r?"yst-bg-woo-dark":"yst-bg-primary-500"),children:[(0,c.jsx)("figure",{className:"yst-logo-square yst-w-16 yst-h-16 yst-mx-auto yst-overflow-hidden yst-relative yst-z-10 yst-mt-[-2.6rem]",children:r?(0,c.jsx)(oe,{}):(0,c.jsx)(ee,{})}),d&&(0,c.jsx)("div",{className:"sidebar__sale_banner_container",children:(0,c.jsx)("div",{className:"sidebar__sale_banner",children:(0,c.jsx)("span",{className:"banner_text",children:(0,m.__)("BLACK FRIDAY | 30% OFF","wordpress-seo")})})}),(0,c.jsx)(u.Title,{as:"h2",className:"yst-mt-6 yst-text-base yst-font-extrabold yst-text-white",children:l}),(0,c.jsx)("p",{className:"yst-mt-2 yst-font-medium",children:n}),(0,c.jsx)("ul",{className:"yst-ps-[1em] yst-list-outside yst-text-white yst-mt-2",children:o(!0).map(((e,t)=>(0,c.jsxs)("li",{className:"yst-flex yst-items-center yst-gap-2",children:[(0,c.jsx)(ne,{className:"yst-w-4 yst-h-4 yst-text-green-400"}),(0,c.jsx)("span",{children:e})]},`upsell-benefit-${t}`)))}),(0,c.jsxs)(u.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,children:[(0,c.jsx)("span",{children:a}),(0,c.jsx)(O,{className:"yst-w-4 yst-h-4 yst-icon-rtl"})]}),(0,c.jsx)("p",{className:"yst-text-center yst-text-xs yst-mx-2 yst-font-light yst-leading-5 yst-italic yst-mt-2",children:(0,m.__)("30-day money back guarantee","wordpress-seo")}),(0,c.jsx)("hr",{className:"yst-border-t yst-border-primary-300 yst-my-4"}),(0,c.jsx)("a",{className:"yst-block yst-mt-4 yst-no-underline",href:"https://www.g2.com/products/yoast-yoast/reviews",target:"_blank",rel:"noopener noreferrer",children:(0,c.jsxs)("span",{className:"yst-flex yst-gap-2 yst-mt-2 yst-items-center",children:[(0,c.jsx)(E,{className:"yst-w-5 yst-h-5"}),(0,c.jsxs)("span",{className:"yst-flex yst-gap-1",children:[(0,c.jsx)(Z,{className:"yst-w-5 yst-h-5"}),(0,c.jsx)(Z,{className:"yst-w-5 yst-h-5"}),(0,c.jsx)(Z,{className:"yst-w-5 yst-h-5"}),(0,c.jsx)(Z,{className:"yst-w-5 yst-h-5"}),(0,c.jsx)(Y,{className:"yst-w-5 yst-h-5"})]}),(0,c.jsx)("span",{className:"yst-text-sm yst-font-semibold yst-text-white",children:"4.6 / 5"})]})})]})};var de;function pe(){return pe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},pe.apply(this,arguments)}ce.propTypes={link:r().string.isRequired,linkProps:r().object,isPromotionActive:r().func},ce.defaultProps={linkProps:{},isPromotionActive:o.noop};const ue=e=>y.createElement("svg",pe({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 12"},e),de||(de=y.createElement("path",{fill:"#CD82AB",d:"M10.989 6.74 7.885.98v.002L7.882.98 4.778 6.74 0 3.32l1.126 7.702H14.64l1.126-7.703L10.99 6.74Z"})));var he;function me(){return me=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},me.apply(this,arguments)}const ge=e=>y.createElement("svg",me({xmlns:"http://www.w3.org/2000/svg",width:14,height:14,fill:"none"},e),he||(he=y.createElement("path",{fill:"#0075B3",d:"M12.613.445a1.26 1.26 0 0 0-1.22.937l-.156.583A40.97 40.97 0 0 0 .379 3.225c-.013 0-.022.007-.035.01a.503.503 0 0 0-.317.64 40.344 40.344 0 0 0 1.99 4.861c.084.173.26.282.455.282h7.542c.64 0 1.213.403 1.427 1.008h-10a.507.507 0 0 0 0 1.01h10.592a.507.507 0 0 0 .506-.505c0-1.149-.774-2.15-1.888-2.441l1.722-6.452a.25.25 0 0 1 .243-.185h.931a.507.507 0 0 0 0-1.011h-.931l-.003.003Zm-1.085 13.114a1.008 1.008 0 1 1 0-2.016 1.008 1.008 0 0 1 0 2.016Zm-8.573 0a1.008 1.008 0 1 1 0-2.016 1.008 1.008 0 0 1 0 2.016Z"}))),ye=({premiumLink:e,premiumUpsellConfig:t,isPromotionActive:s,isWooCommerceActive:i})=>{const r=s("black-friday-promotion"),o=i?W:U;let n=i?(0,m.sprintf)(/* translators: %s expands to "Yoast WooCommerce SEO" */ (0,m.__)("Explore %s now!","wordpress-seo"),"Yoast WooCommerce SEO"):(0,m.sprintf)(/* translators: %s expands to "Yoast SEO" Premium */ (0,m.__)("Explore %s now!","wordpress-seo"),"Yoast SEO Premium");return r&&(n=(0,m.__)("Get 30% off now!","wordpress-seo")),(0,c.jsxs)(u.Paper,{as:"div",className:"xl:yst-max-w-3xl",children:[r&&(0,c.jsxs)("div",{className:"yst-rounded-t-lg yst-h-9 yst-flex yst-justify-between yst-items-center yst-bg-black yst-text-amber-300 yst-px-4 yst-text-lg yst-border-b yst-border-amber-300 yst-border-solid yst-font-medium",children:[(0,c.jsx)("div",{children:(0,m.__)("30% OFF","wordpress-seo")}),(0,c.jsx)("div",{children:(0,m.__)("BLACK FRIDAY","wordpress-seo")})]}),(0,c.jsxs)("div",{className:"yst-p-6 yst-flex yst-flex-col",children:[(0,c.jsx)("div",{className:"yst-flex yst-items-center",children:i?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(u.Title,{as:"h2",size:"4",className:"yst-text-xl "+(i?"yst-text-woo-light":"yst-text-primary-500 "),children:(0,m.sprintf)(/* translators: %s expands to "Yoast SEO" Premium */ (0,m.__)("Upgrade to %s","wordpress-seo"),"Yoast WooCommerce SEO")}),(0,c.jsx)(ge,{className:"yst-ml-2 yst-w-4 yst-h-3"})]}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(u.Title,{as:"h2",size:"4",className:"yst-text-xl "+(i?"yst-text-woo-light":"yst-text-primary-500 "),children:(0,m.sprintf)(/* translators: %s expands to "Yoast SEO" Premium */ (0,m.__)("Upgrade to %s","wordpress-seo"),"Yoast SEO Premium")}),(0,c.jsx)(ue,{className:"yst-ml-2 yst-w-4 yst-h-3"})]})}),(0,c.jsx)("span",{className:"yst-font-medium yst-text-slate-500 yst-text-xs yst-leading-5 yst-uppercase yst-mt-2",children:(0,m.__)("Now includes Local, News & Video SEO + 1 Google Docs seat!","wordpress-seo")}),(0,c.jsx)("ul",{className:"yst-grid yst-grid-cols-1 sm:yst-grid-cols-2 yst-gap-x-6 yst-list-none yst-list-outside yst-text-slate-600 yst-mt-6",children:o().map(((e,t)=>(0,c.jsxs)("li",{children:[(0,c.jsx)("span",{className:"yst-mx-2",children:"•"}),e]},`upsell-benefit-${t}`)))}),(0,c.jsxs)(u.Button,{as:"a",variant:"upsell",size:"extra-large",href:e,className:"yst-gap-2 yst-mt-4",target:"_blank",rel:"noopener",...t,children:[n,(0,c.jsx)(O,{className:"yst-w-4 yst-h-4 yst-icon-rtl"})]})]})]})};ye.propTypes={premiumLink:r().string.isRequired,premiumUpsellConfig:r().object,isPromotionActive:r().func,isWooCommerceActive:r().bool.isRequired},ye.defaultProps={premiumUpsellConfig:{},isPromotionActive:o.noop},r().string.isRequired,r().object.isRequired,r().string.isRequired,r().func.isRequired,r().bool.isRequired,y.forwardRef((function(e,t){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),y.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"}))})),r().bool.isRequired,r().func,r().func,r().string.isRequired,r().string.isRequired,r().string.isRequired,r().string.isRequired;const fe=window.yoast.reactHelmet,we="loading",xe="showPlay",be="askPermission",ve="isPlaying",_e=({videoId:t,thumbnail:s,wistiaEmbedPermission:i})=>{const[r,o]=(0,e.useState)(i.value?ve:xe),n=(0,e.useCallback)((()=>o(ve)),[o]),a=(0,e.useCallback)((()=>{i.value?n():o(be)}),[i.value,n,o]),l=(0,e.useCallback)((()=>o(xe)),[o]),d=(0,e.useCallback)((()=>{i.set(!0),n()}),[i.set,n]);return(0,c.jsxs)(c.Fragment,{children:[i.value&&(0,c.jsx)(fe.Helmet,{children:(0,c.jsx)("script",{src:"https://fast.wistia.com/assets/external/E-v1.js",async:!0})}),(0,c.jsxs)("div",{className:"yst-relative yst-w-full yst-h-0 yst-pt-[56.25%] yst-overflow-hidden yst-rounded-md yst-drop-shadow-md yst-bg-white",children:[r===xe&&(0,c.jsx)("button",{type:"button",className:"yst-absolute yst-inset-0 yst-button yst-p-0 yst-border-none yst-bg-white yst-transition-opacity yst-duration-1000 yst-opacity-100",onClick:a,children:(0,c.jsx)("img",{className:"yst-w-full yst-h-auto",alt:"",loading:"lazy",decoding:"async",...s})}),r===be&&(0,c.jsxs)("div",{className:"yst-absolute yst-inset-0 yst-flex yst-flex-col yst-items-center yst-justify-center yst-bg-white",children:[(0,c.jsxs)("p",{className:"yst-max-w-xs yst-mx-auto yst-text-center",children:[i.status===we&&(0,c.jsx)(u.Spinner,{}),i.status!==we&&(0,m.sprintf)(/* translators: %1$s expands to Yoast SEO. %2$s expands to Wistia. */ (0,m.__)("To see this video, you need to allow %1$s to load embedded videos from %2$s.","wordpress-seo"),"Yoast SEO","Wistia")]}),(0,c.jsxs)("div",{className:"yst-flex yst-mt-6 yst-gap-x-4",children:[(0,c.jsx)(u.Button,{type:"button",variant:"secondary",onClick:l,disabled:i.status===we,children:(0,m.__)("Deny","wordpress-seo")}),(0,c.jsx)(u.Button,{type:"button",variant:"primary",onClick:d,disabled:i.status===we,children:(0,m.__)("Allow","wordpress-seo")})]})]}),i.value&&r===ve&&(0,c.jsxs)("div",{className:"yst-absolute yst-w-full yst-h-full yst-top-0 yst-right-0",children:[null===t&&(0,c.jsx)(u.Spinner,{className:"yst-h-full yst-mx-auto"}),null!==t&&(0,c.jsx)("div",{className:`wistia_embed wistia_async_${t} videoFoam=true`})]})]})]})};_e.propTypes={videoId:r().string.isRequired,thumbnail:r().shape({src:r().string.isRequired,width:r().string,height:r().string}).isRequired,wistiaEmbedPermission:r().shape({value:r().bool.isRequired,status:r().string.isRequired,set:r().func.isRequired}).isRequired},y.forwardRef((function(e,t){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),y.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"}))})),r().bool.isRequired,r().func.isRequired,r().func,r().string,r().func.isRequired,r().string.isRequired,r().string.isRequired,r().string.isRequired,r().string.isRequired;const ke=window.yoast.componentsNew,je=window.yoast.styleGuide,Te=window.yoast.analysis;function Ee(e){switch(e){case"loading":return{icon:"loading-spinner",color:je.colors.$color_green_medium_light};case"not-set":return{icon:"seo-score-none",color:je.colors.$color_score_icon};case"noindex":return{icon:"seo-score-none",color:je.colors.$color_noindex};case"good":return{icon:"seo-score-good",color:je.colors.$color_green_medium};case"ok":return{icon:"seo-score-ok",color:je.colors.$color_ok};default:return{icon:"seo-score-bad",color:je.colors.$color_red}}}function Se({target:t,children:s}){let i=t;return"string"==typeof t&&(i=document.getElementById(t)),i?(0,e.createPortal)(s,i):null}Se.propTypes={target:r().oneOfType([r().string,r().object]).isRequired,children:r().node.isRequired};const Re=({target:e,scoreIndicator:t})=>(0,c.jsx)(Se,{target:e,children:(0,c.jsx)(ke.SvgIcon,{...Ee(t)})});Re.propTypes={target:r().string.isRequired,scoreIndicator:r().string.isRequired};const Ce=Re,Ie=({error:t})=>{const s=(0,e.useCallback)((()=>{var e,t;return null===(e=window)||void 0===e||null===(t=e.location)||void 0===t?void 0:t.reload()}),[]),i=(0,h.useSelect)((e=>e("yoast-seo/editor").selectLink("https://yoa.st/metabox-error-support")),[]),r=(0,h.useSelect)((e=>e("yoast-seo/editor").getPreference("isRtl",!1)),[]);return(0,e.useEffect)((()=>{document.querySelectorAll('[id^="wpseo-meta-tab-"]').forEach((e=>{!function(e){const t=document.querySelector(`#${e}`);null!==t&&(t.style.opacity="0.5",t.style.pointerEvents="none",t.setAttribute("aria-disabled","true"),t.classList.contains("yoast-active-tab")&&t.classList.remove("yoast-active-tab"))}(e.id)}))}),[]),(0,c.jsx)(u.Root,{context:{isRtl:r},children:(0,c.jsxs)(k,{error:t,children:[(0,c.jsx)(k.HorizontalButtons,{supportLink:i,handleRefreshClick:s}),(0,c.jsx)(Ce,{target:"wpseo-seo-score-icon",scoreIndicator:"not-set"}),(0,c.jsx)(Ce,{target:"wpseo-readability-score-icon",scoreIndicator:"not-set"}),(0,c.jsx)(Ce,{target:"wpseo-inclusive-language-score-icon",scoreIndicator:"not-set"})]})})};function Le({theme:e}){return(0,c.jsx)(p,{theme:e,location:"metabox",children:(0,c.jsx)(u.ErrorBoundary,{FallbackComponent:Ie,children:(0,c.jsx)(t.Slot,{name:"YoastMetabox",children:e=>{return void 0===(t=e).length?t:(0,o.flatten)(t).sort(((e,t)=>void 0===e.props.renderPriority?1:e.props.renderPriority-t.props.renderPriority));var t}})})})}Ie.propTypes={error:r().object.isRequired};const Pe=window.wp.compose,Ae=y.forwardRef((function(e,t){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),y.createElement("path",{d:"M2 11a1 1 0 011-1h2a1 1 0 011 1v5a1 1 0 01-1 1H3a1 1 0 01-1-1v-5zM8 7a1 1 0 011-1h2a1 1 0 011 1v9a1 1 0 01-1 1H9a1 1 0 01-1-1V7zM14 4a1 1 0 011-1h2a1 1 0 011 1v12a1 1 0 01-1 1h-2a1 1 0 01-1-1V4z"}))})),Fe=({className:e,...t})=>(0,c.jsx)("span",{className:le()("yst-grow yst-overflow-hidden yst-overflow-ellipsis yst-whitespace-nowrap yst-font-wp","yst-text-[#555] yst-text-base yst-leading-[normal] yst-subpixel-antialiased yst-text-start",e),...t});Fe.displayName="MetaboxButton.Text",Fe.propTypes={className:r().string},Fe.defaultProps={className:""};const Me=({className:e,...t})=>(0,c.jsx)("button",{type:"button",className:le()("yst-flex yst-items-center yst-w-full yst-pt-4 yst-pb-4 yst-pe-4 yst-ps-6 yst-space-x-2 rtl:yst-space-x-reverse","yst-border-t yst-border-t-[rgb(0,0,0,0.2)] yst-rounded-none yst-transition-all hover:yst-bg-[#f0f0f0]","focus:yst-outline focus:yst-outline-[1px] focus:yst-outline-[color:#0066cd] focus:-yst-outline-offset-1 focus:yst-shadow-[0_0_3px_rgba(8,74,103,0.8)]",e),...t});Me.propTypes={className:r().string},Me.defaultProps={className:""},Me.Text=Fe;const Ne=window.yoast.helpers,qe=a().div` min-width: 600px; @media screen and ( max-width: 680px ) { min-width: 0; width: 86vw; } `,Oe=(a().div` @media screen and ( min-width: 600px ) { max-width: 420px; } `,a()(ke.Icon)` float: ${(0,Ne.getDirectionalStyle)("right","left")}; margin: ${(0,Ne.getDirectionalStyle)("0 0 16px 16px","0 16px 16px 0")}; && { width: 150px; height: 150px; @media screen and ( max-width: 680px ) { width: 80px; height: 80px; } } `,e=>{const{title:s,className:i,showYoastIcon:r,additionalClassName:o,...n}=e,a=r?(0,c.jsx)("span",{className:"yoast-icon"}):null;return(0,c.jsx)(t.Modal,{title:s,className:`${i} ${o}`,icon:a,...n,children:e.children})});Oe.propTypes={title:r().string,className:r().string,showYoastIcon:r().bool,children:r().oneOfType([r().node,r().arrayOf(r().node)]),additionalClassName:r().string},Oe.defaultProps={title:"Yoast SEO",className:"yoast yoast-gutenberg-modal",showYoastIcon:!0,children:null,additionalClassName:""};const De=Oe;var $e,Ue;function We(){return We=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},We.apply(this,arguments)}const Be=e=>y.createElement("svg",We({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 425 456.27"},e),$e||($e=y.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"})),Ue||(Ue=y.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"}))),He=e=>(0,c.jsx)("div",{className:"yoast components-panel__body",children:(0,c.jsx)("h2",{className:"components-panel__body-title",children:(0,c.jsxs)("button",{id:e.id,onClick:e.onClick,className:"components-button components-panel__body-toggle",type:"button",children:[e.prefixIcon&&(0,c.jsx)("span",{className:"yoast-icon-span",style:{fill:`${e.prefixIcon&&e.prefixIcon.color||""}`},children:(0,c.jsx)(ke.SvgIcon,{size:e.prefixIcon.size,icon:e.prefixIcon.icon})}),(0,c.jsxs)("span",{className:"yoast-title-container",children:[(0,c.jsx)("div",{className:"yoast-title",children:e.title}),(0,c.jsx)("div",{className:"yoast-subtitle",children:e.subTitle})]}),e.children,e.suffixIcon&&(0,c.jsx)(ke.SvgIcon,{size:e.suffixIcon.size,icon:e.suffixIcon.icon}),e.SuffixHeroIcon]})})}),Ke=He;He.propTypes={onClick:r().func.isRequired,title:r().string.isRequired,id:r().string,subTitle:r().string,suffixIcon:r().object,SuffixHeroIcon:r().object,prefixIcon:r().object,children:r().node},He.defaultProps={id:"",suffixIcon:null,SuffixHeroIcon:null,prefixIcon:null,subTitle:"",children:null};const ze=window.moment;var Ye=s.n(ze),Ve=s(6746);const Ze=(0,Ne.makeOutboundLink)(),Ge=e=>{const t=(0,m.sprintf)(/* translators: %1$d expands to the amount of allowed keyphrases on a free account, %2$s expands to a link to Wincher plans. */ (0,m.__)("You've reached the maximum amount of %1$d keyphrases you can add to your Wincher account. If you wish to add more keyphrases, please %2$s.","wordpress-seo"),e.limit,"{{updateWincherPlanLink/}}");return(0,c.jsx)(ke.Alert,{type:"error",children:(0,Ve.Z)({mixedString:t,components:{updateWincherPlanLink:(0,c.jsx)(Ze,{href:wpseoAdminGlobalL10n["links.wincher.pricing"],children:(0,m.sprintf)(/* translators: %s : Expands to "Wincher". */ (0,m.__)("upgrade your %s plan","wordpress-seo"),"Wincher")})}})})};Ge.propTypes={limit:r().number},Ge.defaultProps={limit:10};const Xe=Ge,Qe=()=>(0,c.jsx)(ke.Alert,{type:"error",children:(0,m.__)("Something went wrong while tracking the ranking position(s) of your page. Please try again later.","wordpress-seo")}),Je=window.wp.apiFetch;var et=s.n(Je);async function tt(e,t,s,i=200){try{const r=await e();return!!r&&(r.status===i?t(r):s(r))}catch(e){console.error(e.message)}}async function st(e){try{return await et()(e)}catch(e){return e.error&&e.status?e:e instanceof Response&&await e.json()}}async function it(e){return(0,o.isArray)(e)||(e=[e]),await st({path:"yoast/v1/wincher/keyphrases/track",method:"POST",data:{keyphrases:e}})}const rt=a().p` color: ${je.colors.$color_pink_dark}; font-size: 14px; font-weight: 700; margin: 13px 0 10px; `,ot=a()(ke.SvgIcon)` margin-right: 5px; vertical-align: middle; `,nt=a().button` position: absolute; top: 9px; right: 9px; border: none; background: none; cursor: pointer; `,at=a().p` font-size: 13px; font-weight: 500; margin: 10px 0 13px; `,lt=a().div` position: relative; background: ${e=>e.isTitleShortened?"#F5F7F7":"transparent"}; border: 1px solid #C7C7C7; border-left: 4px solid${je.colors.$color_pink_dark}; padding: 0 16px; margin-bottom: 1.5em; `,ct=t=>{const[s,i]=(0,e.useState)(null);return(0,e.useEffect)((()=>{t&&!s&&async function(){return await st({path:"yoast/v1/wincher/account/limit",method:"GET"})}().then((e=>i(e)))}),[s]),s};ct.propTypes={limit:r().bool.isRequired};const dt=({limit:e,usage:t,isTitleShortened:s,isFreeAccount:i})=>{const r=(0,m.sprintf)( /* Translators: %1$s expands to the number of used keywords. * %2$s expands to the account keywords limit. */ (0,m.__)("Your are tracking %1$s out of %2$s keyphrases included in your free account.","wordpress-seo"),t,e),o=(0,m.sprintf)( /* Translators: %1$s expands to the number of used keywords. * %2$s expands to the account keywords limit. */ (0,m.__)("Your are tracking %1$s out of %2$s keyphrases included in your account.","wordpress-seo"),t,e),n=i?r:o,a=(0,m.sprintf)( /* Translators: %1$s expands to the number of used keywords. * %2$s expands to the account keywords limit. */ (0,m.__)("Keyphrases tracked: %1$s/%2$s","wordpress-seo"),t,e),l=s?a:n;return(0,c.jsxs)(rt,{children:[s&&(0,c.jsx)(ot,{icon:"exclamation-triangle",color:je.colors.$color_pink_dark,size:"14px"}),l]})};dt.propTypes={limit:r().number.isRequired,usage:r().number.isRequired,isTitleShortened:r().bool,isFreeAccount:r().bool};const pt=(0,Ne.makeOutboundLink)(),ut=({discount:e,months:t})=>{const s=(0,c.jsx)(pt,{href:wpseoAdminGlobalL10n["links.wincher.upgrade"],style:{fontWeight:600},children:(0,m.sprintf)(/* Translators: %s : Expands to "Wincher". */ (0,m.__)("Click here to upgrade your %s plan","wordpress-seo"),"Wincher")});if(!e||!t)return(0,c.jsx)(at,{children:s});const i=100*e,r=(0,m.sprintf)( /* Translators: %1$s expands to upgrade account link. * %2$s expands to the upgrade discount value. * %3$s expands to the upgrade discount duration e.g. 2 months. */ (0,m.__)("%1$s and get an exclusive %2$s discount for %3$s month(s).","wordpress-seo"),"{{wincherAccountUpgradeLink/}}",i+"%",t);return(0,c.jsx)(at,{children:(0,Ve.Z)({mixedString:r,components:{wincherAccountUpgradeLink:s}})})};ut.propTypes={discount:r().number,months:r().number};const ht=({onClose:t,isTitleShortened:s,trackingInfo:i})=>{const r=(()=>{const[t,s]=(0,e.useState)(null);return(0,e.useEffect)((()=>{t||async function(){return await st({path:"yoast/v1/wincher/account/upgrade-campaign",method:"GET"})}().then((e=>s(e)))}),[t]),t})();if(null===i)return null;const{limit:o,usage:n}=i;if(!(o&&n/o>=.8))return null;const a=Boolean(null==r?void 0:r.discount);return(0,c.jsxs)(lt,{isTitleShortened:s,children:[t&&(0,c.jsx)(nt,{type:"button","aria-label":(0,m.__)("Close the upgrade callout","wordpress-seo"),onClick:t,children:(0,c.jsx)(ke.SvgIcon,{icon:"times-circle",color:je.colors.$color_pink_dark,size:"14px"})}),(0,c.jsx)(dt,{...i,isTitleShortened:s,isFreeAccount:a}),(0,c.jsx)(ut,{discount:null==r?void 0:r.discount,months:null==r?void 0:r.months})]})};ht.propTypes={onClose:r().func,isTitleShortened:r().bool,trackingInfo:r().object};const mt=ht,gt=()=>(0,c.jsx)(ke.Alert,{type:"success",children:(0,m.sprintf)(/* translators: %s: Expands to "Wincher". */ (0,m.__)("You have successfully connected to %s! You can now track the SEO performance for the keyphrase(s) of this page.","wordpress-seo"),"Wincher")}),yt=()=>(0,c.jsx)(ke.Alert,{type:"info",children:(0,m.sprintf)(/* translators: %s: Expands to "Wincher". */ (0,m.__)("%s is currently tracking the ranking position(s) of your page. This may take a few minutes. Please wait or check back later.","wordpress-seo"),"Wincher")}),ft=({data:e,mapChartDataToTableData:t,dataTableCaption:s,dataTableHeaderLabels:i,isDataTableVisuallyHidden:r})=>e.length!==i.length?(0,c.jsx)("p",{children:(0,m.__)("The number of headers and header labels don't match.","wordpress-seo")}):(0,c.jsx)("div",{className:r?"screen-reader-text":null,children:(0,c.jsxs)("table",{children:[(0,c.jsx)("caption",{children:s}),(0,c.jsx)("thead",{children:(0,c.jsx)("tr",{children:i.map(((e,t)=>(0,c.jsx)("th",{children:e},t)))})}),(0,c.jsx)("tbody",{children:(0,c.jsx)("tr",{children:e.map(((e,s)=>(0,c.jsx)("td",{children:t(e.y)},s)))})})]})});ft.propTypes={data:r().arrayOf(r().shape({x:r().number,y:r().number})).isRequired,mapChartDataToTableData:r().func,dataTableCaption:r().string.isRequired,dataTableHeaderLabels:r().array.isRequired,isDataTableVisuallyHidden:r().bool},ft.defaultProps={mapChartDataToTableData:null,isDataTableVisuallyHidden:!0};const wt=ft,xt=({data:t,width:s,height:i,fillColor:r,strokeColor:o,strokeWidth:n,className:a,mapChartDataToTableData:l,dataTableCaption:d,dataTableHeaderLabels:p,isDataTableVisuallyHidden:u})=>{const h=Math.max(1,Math.max(...t.map((e=>e.x)))),m=Math.max(1,Math.max(...t.map((e=>e.y)))),g=i-n,y=t.map((e=>`${e.x/h*s},${g-e.y/m*g+n}`)).join(" "),f=`0,${g+n} `+y+` ${s},${g+n}`;return(0,c.jsxs)(e.Fragment,{children:[(0,c.jsxs)("svg",{width:s,height:i,viewBox:`0 0 ${s} ${i}`,className:a,role:"img","aria-hidden":"true",focusable:"false",children:[(0,c.jsx)("polygon",{fill:r,points:f}),(0,c.jsx)("polyline",{fill:"none",stroke:o,strokeWidth:n,strokeLinejoin:"round",strokeLinecap:"round",points:y})]}),l&&(0,c.jsx)(wt,{data:t,mapChartDataToTableData:l,dataTableCaption:d,dataTableHeaderLabels:p,isDataTableVisuallyHidden:u})]})};xt.propTypes={data:r().arrayOf(r().shape({x:r().number,y:r().number})).isRequired,width:r().number.isRequired,height:r().number.isRequired,fillColor:r().string,strokeColor:r().string,strokeWidth:r().number,className:r().string,mapChartDataToTableData:r().func,dataTableCaption:r().string.isRequired,dataTableHeaderLabels:r().array.isRequired,isDataTableVisuallyHidden:r().bool},xt.defaultProps={fillColor:null,strokeColor:"#000000",strokeWidth:1,className:"",mapChartDataToTableData:null,isDataTableVisuallyHidden:!0};const bt=xt,vt=()=>(0,c.jsxs)("p",{className:"yoast-wincher-seo-performance-modal__loading-message",children:[(0,m.__)("Tracking the ranking position…","wordpress-seo")," ",(0,c.jsx)(ke.SvgIcon,{icon:"loading-spinner"})]}),_t=a()(ke.SvgIcon)` margin-left: 2px; flex-shrink: 0; rotate: ${e=>e.isImproving?"-90deg":"90deg"}; `,kt=a().span` color: ${e=>e.isImproving?"#69AB56":"#DC3332"}; font-size: 13px; font-weight: 600; line-height: 20px; margin-right: 2px; margin-left: 12px; `,jt=a().td` padding-right: 0 !important; & > div { margin: 0px; } `,Tt=a().td` padding-left: 2px !important; `,Et=a().td.attrs({className:"yoast-table--nopadding"})` & > div { justify-content: center; } `,St=a().div` display: flex; align-items: center; & > a { box-sizing: border-box; } `,Rt=a().button` background: none; color: inherit; border: none; padding: 0; font: inherit; cursor: pointer; outline: inherit; display: flex; align-items: center; `,Ct=a().tr` background-color: ${e=>e.isEnabled?"#FFFFFF":"#F9F9F9"} !important; `;function It(e){return Math.round(100*e)}function Lt({chartData:e}){if((0,o.isEmpty)(e)||(0,o.isEmpty)(e.position))return"?";const t=function(e){return Array.from({length:e.position.history.length},((e,t)=>t+1)).map((e=>(0,m.sprintf)((0,m._n)("%d day","%d days",e,"wordpress-seo"),e)))}(e),s=e.position.history.map(((e,t)=>({x:t,y:101-e.value})));return(0,c.jsx)(bt,{width:66,height:24,data:s,strokeWidth:1.8,strokeColor:"#498afc",fillColor:"#ade3fc",mapChartDataToTableData:It,dataTableCaption:(0,m.__)("Keyphrase position in the last 90 days on a scale from 0 to 100.","wordpress-seo"),dataTableHeaderLabels:t})}function Pt({keyphrase:e,isEnabled:t,toggleAction:s,isLoading:i}){return i?(0,c.jsx)(ke.SvgIcon,{icon:"loading-spinner"}):(0,c.jsx)(ke.Toggle,{id:`toggle-keyphrase-tracking-${e}`,className:"wincher-toggle",isEnabled:t,onSetToggleState:s,showToggleStateLabel:!1})}function At(e){return!e||!e.position||e.position.value>100?"> 100":e.position.value}Lt.propTypes={chartData:r().object},Lt.defaultProps={chartData:{}};const Ft=e=>Ye()(e).fromNow(),Mt=({rowData:t})=>{var s;if(null==t||null===(s=t.position)||void 0===s||!s.change)return(0,c.jsx)(Lt,{chartData:t});const i=t.position.change<0;return(0,c.jsxs)(e.Fragment,{children:[(0,c.jsx)(Lt,{chartData:t}),(0,c.jsx)(kt,{isImproving:i,children:Math.abs(t.position.change)}),(0,c.jsx)(_t,{icon:"caret-right",color:i?"#69AB56":"#DC3332",size:"14px",isImproving:i})]})};function Nt(t){const{rowData:s,websiteId:i,keyphrase:r,onSelectKeyphrases:n}=t,a=(0,e.useCallback)((()=>{n([r])}),[n,r]),l=!(0,o.isEmpty)(s),d=s&&s.updated_at&&Ye()(s.updated_at)>=Ye()().subtract(7,"days"),p=s?`https://app.wincher.com/websites/${i}/keywords?serp=${s.id}&utm_medium=plugin&utm_source=yoast&referer=yoast&partner=yoast`:null;return l?d?(0,c.jsxs)(e.Fragment,{children:[(0,c.jsx)("td",{children:(0,c.jsxs)(St,{children:[At(s),(0,c.jsx)(ke.ButtonStyledLink,{variant:"secondary",href:p,style:{height:28,marginLeft:12},rel:"noopener",target:"_blank",children:(0,m.__)("View","wordpress-seo")})]})}),(0,c.jsx)("td",{className:"yoast-table--nopadding",children:(0,c.jsx)(Rt,{type:"button",onClick:a,children:(0,c.jsx)(Mt,{rowData:s})})}),(0,c.jsx)("td",{children:Ft(s.updated_at)})]}):(0,c.jsx)("td",{className:"yoast-table--nopadding",colSpan:"3",children:(0,c.jsx)(vt,{})}):(0,c.jsx)("td",{className:"yoast-table--nopadding",colSpan:"3",children:(0,c.jsx)("i",{children:(0,m.__)("Activate tracking to show the ranking position","wordpress-seo")})})}function qt(t){var s;const{keyphrase:i,rowData:r,onTrackKeyphrase:n,onUntrackKeyphrase:a,isFocusKeyphrase:l,isDisabled:d,isLoading:p,isSelected:u,onSelectKeyphrases:h}=t,m=!(0,o.isEmpty)(r),g=!(0,o.isEmpty)(null==r||null===(s=r.position)||void 0===s?void 0:s.history),y=(0,e.useCallback)((()=>{d||(m?a(i,r.id):n(i))}),[i,n,a,m,r,d]),f=(0,e.useCallback)((()=>{h((e=>u?e.filter((e=>e!==i)):e.concat(i)))}),[h,u,i]);return(0,c.jsxs)(Ct,{isEnabled:m,children:[(0,c.jsx)(jt,{children:g&&(0,c.jsx)(ke.Checkbox,{id:"select-"+i,onChange:f,checked:u,label:""})}),(0,c.jsxs)(Tt,{children:[i,l&&(0,c.jsx)("span",{children:"*"})]}),Nt(t),(0,c.jsx)(Et,{children:Pt({keyphrase:i,isEnabled:m,toggleAction:y,isLoading:p})})]})}Mt.propTypes={rowData:r().object},qt.propTypes={rowData:r().object,keyphrase:r().string.isRequired,onTrackKeyphrase:r().func,onUntrackKeyphrase:r().func,isFocusKeyphrase:r().bool,isDisabled:r().bool,isLoading:r().bool,websiteId:r().string,isSelected:r().bool.isRequired,onSelectKeyphrases:r().func.isRequired},qt.defaultProps={rowData:{},onTrackKeyphrase:()=>{},onUntrackKeyphrase:()=>{},isFocusKeyphrase:!1,isDisabled:!1,isLoading:!1,websiteId:""};const Ot=(0,Ne.makeOutboundLink)(),Dt=a().span` display: block; font-style: italic; @media (min-width: 782px) { display: inline; position: absolute; ${(0,Ne.getDirectionalStyle)("right","left")}: 8px; } `,$t=a().div` width: 100%; overflow-y: auto; `,Ut=a().th` pointer-events: ${e=>e.isDisabled?"none":"initial"}; padding-right: 0 !important; & > div { margin: 0px; } `,Wt=a().th` padding-left: 2px !important; `,Bt=t=>{const s=(0,e.useRef)();return(0,e.useEffect)((()=>{s.current=t})),s.current},Ht=(0,o.debounce)((async function(e=null,t=null,s=null,i){return await st({path:"yoast/v1/wincher/keyphrases",method:"POST",data:{keyphrases:e,permalink:s,startAt:t},signal:i})}),500,{leading:!0}),Kt=t=>{const{addTrackedKeyphrase:s,isLoggedIn:i,keyphrases:r,permalink:n,removeTrackedKeyphrase:a,setKeyphraseLimitReached:l,setRequestFailed:d,setRequestSucceeded:p,setTrackedKeyphrases:u,setHasTrackedAll:h,trackAll:g,trackedKeyphrases:y,isNewlyAuthenticated:f,websiteId:w,focusKeyphrase:x,newRequest:b,startAt:v,selectedKeyphrases:_,onSelectKeyphrases:k}=t,j=(0,e.useRef)(),T=(0,e.useRef)(),E=(0,e.useRef)(!1),[S,R]=(0,e.useState)([]),C=(0,e.useCallback)((e=>{const t=e.toLowerCase();return y&&!(0,o.isEmpty)(y)&&y.hasOwnProperty(t)?y[t]:null}),[y]),I=(0,e.useMemo)((()=>async()=>{await tt((()=>(T.current&&T.current.abort(),T.current="undefined"==typeof AbortController?null:new AbortController,Ht(r,v,n,T.current.signal))),(e=>{p(e),u(e.results)}),(e=>{d(e)}))}),[p,d,u,r,n,v]),L=(0,e.useCallback)((async e=>{const t=(Array.isArray(e)?e:[e]).map((e=>e.toLowerCase()));R((e=>[...e,...t])),await tt((()=>it(t)),(e=>{p(e),s(e.results),I()}),(e=>{400===e.status&&e.limit&&l(e.limit),d(e)}),201),R((e=>(0,o.without)(e,...t)))}),[p,d,l,s,I]),P=(0,e.useCallback)((async(e,t)=>{e=e.toLowerCase(),R((t=>[...t,e])),await tt((()=>async function(e){return await st({path:"yoast/v1/wincher/keyphrases/untrack",method:"DELETE",data:{keyphraseID:e}})}(t)),(t=>{p(t),a(e)}),(e=>{d(e)})),R((t=>(0,o.without)(t,e)))}),[p,a,d]),A=(0,e.useCallback)((async e=>{b(),await L(e)}),[b,L]),F=Bt(n),M=Bt(r),N=Bt(v),q=n&&v;(0,e.useEffect)((()=>{i&&q&&(n!==F||(0,o.difference)(r,M).length||v!==N)&&I()}),[i,n,F,r,M,I,q,v,N]),(0,e.useEffect)((()=>{if(i&&g&&null!==y){const e=r.filter((e=>!C(e)));e.length&&L(e),h()}}),[i,g,y,L,h,C,r]),(0,e.useEffect)((()=>{f&&!E.current&&(I(),E.current=!0)}),[f,I]),(0,e.useEffect)((()=>{if(i&&!(0,o.isEmpty)(y))return(0,o.filter)(y,(e=>(0,o.isEmpty)(e.updated_at))).length>0&&(j.current=setInterval((()=>{I()}),1e4)),()=>{clearInterval(j.current)}}),[i,y,I]);const O=i&&null===y,D=(0,e.useMemo)((()=>(0,o.isEmpty)(y)?[]:Object.values(y).filter((e=>{var t;return!(0,o.isEmpty)(null==e||null===(t=e.position)||void 0===t?void 0:t.history)})).map((e=>e.keyword))),[y]),$=(0,e.useMemo)((()=>_.length>0&&D.length>0&&D.every((e=>_.includes(e)))),[_,D]),U=(0,e.useCallback)((()=>{k($?[]:D)}),[k,$,D]),W=(0,e.useMemo)((()=>(0,o.orderBy)(r,[e=>Object.values(y||{}).map((e=>e.keyword)).includes(e)],["desc"])),[r,y]);return r&&!(0,o.isEmpty)(r)&&(0,c.jsxs)(e.Fragment,{children:[(0,c.jsx)($t,{children:(0,c.jsxs)("table",{className:"yoast yoast-table",children:[(0,c.jsx)("thead",{children:(0,c.jsxs)("tr",{children:[(0,c.jsx)(Ut,{isDisabled:0===D.length,children:(0,c.jsx)(ke.Checkbox,{id:"select-all",onChange:U,checked:$,label:""})}),(0,c.jsx)(Wt,{scope:"col",abbr:(0,m.__)("Keyphrase","wordpress-seo"),children:(0,m.__)("Keyphrase","wordpress-seo")}),(0,c.jsx)("th",{scope:"col",abbr:(0,m.__)("Position","wordpress-seo"),children:(0,m.__)("Position","wordpress-seo")}),(0,c.jsx)("th",{scope:"col",abbr:(0,m.__)("Position over time","wordpress-seo"),children:(0,m.__)("Position over time","wordpress-seo")}),(0,c.jsx)("th",{scope:"col",abbr:(0,m.__)("Last updated","wordpress-seo"),children:(0,m.__)("Last updated","wordpress-seo")}),(0,c.jsx)("th",{scope:"col",abbr:(0,m.__)("Tracking","wordpress-seo"),children:(0,m.__)("Tracking","wordpress-seo")})]})}),(0,c.jsx)("tbody",{children:W.map(((e,t)=>(0,c.jsx)(qt,{keyphrase:e,onTrackKeyphrase:A,onUntrackKeyphrase:P,rowData:C(e),isFocusKeyphrase:e===x.trim().toLowerCase(),websiteId:w,isDisabled:!i,isLoading:O||S.indexOf(e.toLowerCase())>=0,isSelected:_.includes(e),onSelectKeyphrases:k},`trackable-keyphrase-${t}`)))})]})}),(0,c.jsxs)("p",{style:{marginBottom:0,position:"relative"},children:[(0,c.jsx)(Ot,{href:wpseoAdminGlobalL10n["links.wincher.login"],children:(0,m.sprintf)(/* translators: %s expands to Wincher */ (0,m.__)("Get more insights over at %s","wordpress-seo"),"Wincher")}),(0,c.jsx)(Dt,{children:(0,m.__)("* focus keyphrase","wordpress-seo")})]})]})};Kt.propTypes={addTrackedKeyphrase:r().func.isRequired,isLoggedIn:r().bool,isNewlyAuthenticated:r().bool,keyphrases:r().array,newRequest:r().func.isRequired,removeTrackedKeyphrase:r().func.isRequired,setRequestFailed:r().func.isRequired,setKeyphraseLimitReached:r().func.isRequired,setRequestSucceeded:r().func.isRequired,setTrackedKeyphrases:r().func.isRequired,setHasTrackedAll:r().func.isRequired,trackAll:r().bool,trackedKeyphrases:r().object,websiteId:r().string,permalink:r().string.isRequired,focusKeyphrase:r().string,startAt:r().string,selectedKeyphrases:r().arrayOf(r().string).isRequired,onSelectKeyphrases:r().func.isRequired},Kt.defaultProps={isLoggedIn:!1,isNewlyAuthenticated:!1,keyphrases:[],trackAll:!1,websiteId:"",focusKeyphrase:""};const zt=Kt,Yt=(0,Pe.compose)([(0,h.withSelect)((e=>{const{getWincherWebsiteId:t,getWincherTrackableKeyphrases:s,getWincherLoginStatus:i,getWincherPermalink:r,getFocusKeyphrase:o,isWincherNewlyAuthenticated:n,shouldWincherTrackAll:a}=e("yoast-seo/editor");return{focusKeyphrase:o(),keyphrases:s(),isLoggedIn:i(),trackAll:a(),websiteId:t(),isNewlyAuthenticated:n(),permalink:r()}})),(0,h.withDispatch)((e=>{const{setWincherNewRequest:t,setWincherRequestSucceeded:s,setWincherRequestFailed:i,setWincherSetKeyphraseLimitReached:r,setWincherTrackedKeyphrases:o,setWincherTrackingForKeyphrase:n,setWincherTrackAllKeyphrases:a,unsetWincherTrackingForKeyphrase:l}=e("yoast-seo/editor");return{newRequest:()=>{t()},setRequestSucceeded:e=>{s(e)},setRequestFailed:e=>{i(e)},setKeyphraseLimitReached:e=>{r(e)},addTrackedKeyphrase:e=>{n(e)},removeTrackedKeyphrase:e=>{l(e)},setTrackedKeyphrases:e=>{o(e)},setHasTrackedAll:()=>{a(!1)}}}))])(zt),Vt=(0,Ne.makeOutboundLink)(),Zt=(0,Ne.makeOutboundLink)(),Gt=()=>{const e=(0,m.sprintf)(/* translators: %1$s expands to a link to Wincher, %2$s expands to a link to the keyphrase tracking article on Yoast.com */ (0,m.__)("With %1$s you can track the ranking position of your page in the search results based on your keyphrase(s). %2$s","wordpress-seo"),"{{wincherLink/}}","{{wincherReadMoreLink/}}");return(0,c.jsx)("p",{children:(0,Ve.Z)({mixedString:e,components:{wincherLink:(0,c.jsx)(Vt,{href:wpseoAdminGlobalL10n["links.wincher.website"],children:"Wincher"}),wincherReadMoreLink:(0,c.jsx)(Zt,{href:wpseoAdminL10n["shortlinks.wincher.seo_performance"],children:(0,m.__)("Read more about keyphrase tracking with Wincher","wordpress-seo")})}})})},Xt=()=>(0,c.jsx)(ke.Alert,{type:"error",children:(0,m.__)("No keyphrase has been set. Please set a keyphrase first.","wordpress-seo")}),Qt=()=>(0,c.jsx)(ke.Alert,{type:"info",children:(0,m.sprintf)(/* translators: %s: Expands to "Wincher". */ (0,m.__)("Automatic tracking of keyphrases is enabled. Your keyphrase(s) will automatically be tracked by %s when you publish your post.","wordpress-seo"),"Wincher")});class Jt{constructor(e,t={},s={}){this.url=e,this.origin=new URL(e).origin,this.eventHandlers=Object.assign({success:{type:"",callback:()=>{}},error:{type:"",callback:()=>{}}},t),this.options=Object.assign({height:570,width:340,title:""},s),this.popup=null,this.createPopup=this.createPopup.bind(this),this.messageHandler=this.messageHandler.bind(this),this.getPopup=this.getPopup.bind(this)}createPopup(){const{height:e,width:t,title:s}=this.options,i=["top="+(window.top.outerHeight/2+window.top.screenY-e/2),"left="+(window.top.outerWidth/2+window.top.screenX-t/2),"width="+t,"height="+e,"resizable=1","scrollbars=1","status=0"];this.popup&&!this.popup.closed||(this.popup=window.open(this.url,s,i.join(","))),this.popup&&this.popup.focus(),window.addEventListener("message",this.messageHandler,!1)}async messageHandler(e){const{data:t,source:s,origin:i}=e;i===this.origin&&this.popup===s&&(t.type===this.eventHandlers.success.type&&(this.popup.close(),window.removeEventListener("message",this.messageHandler,!1),await this.eventHandlers.success.callback(t)),t.type===this.eventHandlers.error.type&&(this.popup.close(),window.removeEventListener("message",this.messageHandler,!1),await this.eventHandlers.error.callback(t)))}getPopup(){return this.popup}isClosed(){return!this.popup||this.popup.closed}focus(){this.isClosed()||this.popup.focus()}}const es=e=>{const t=(0,m.sprintf)(/* translators: %s expands to a link to open the Wincher login popup. */ (0,m.__)("It seems like something went wrong when retrieving your website's data. Please %s and try again.","wordpress-seo"),"{{reconnectToWincher/}}","Wincher");return(0,c.jsx)(ke.Alert,{type:"error",className:e.className,children:(0,Ve.Z)({mixedString:t,components:{reconnectToWincher:(0,c.jsx)("a",{href:"#",onClick:t=>{t.preventDefault(),e.onReconnect()},children:(0,m.sprintf)(/* translators: %s : Expands to "Wincher". */ (0,m.__)("reconnect to %s","wordpress-seo"),"Wincher")})}})})};es.propTypes={onReconnect:r().func.isRequired,className:r().string},es.defaultProps={className:""};const ts=es,ss=()=>(0,c.jsx)(ke.Alert,{type:"error",children:(0,m.__)("Before you can track your SEO performance make sure to set either the post’s title and save it as a draft or manually set the post’s slug.","wordpress-seo")}),is=window.yoast["chart.js"],rs="label";function os(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function ns(e,t){e.labels=t}function as(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:rs;const i=[];e.datasets=t.map((t=>{const r=e.datasets.find((e=>e[s]===t[s]));return r&&t.data&&!i.includes(r)?(i.push(r),Object.assign(r,t),r):{...t}}))}function ls(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rs;const s={labels:[],datasets:[]};return ns(s,e.labels),as(s,e.datasets,t),s}function cs(e,t){const{height:s=150,width:i=300,redraw:r=!1,datasetIdKey:o,type:n,data:a,options:l,plugins:c=[],fallbackContent:d,updateMode:p,...u}=e,h=(0,y.useRef)(null),m=(0,y.useRef)(),g=()=>{h.current&&(m.current=new is.Chart(h.current,{type:n,data:ls(a,o),options:l&&{...l},plugins:c}),os(t,m.current))},f=()=>{os(t,null),m.current&&(m.current.destroy(),m.current=null)};return(0,y.useEffect)((()=>{!r&&m.current&&l&&function(e,t){const s=e.options;s&&t&&Object.assign(s,t)}(m.current,l)}),[r,l]),(0,y.useEffect)((()=>{!r&&m.current&&ns(m.current.config.data,a.labels)}),[r,a.labels]),(0,y.useEffect)((()=>{!r&&m.current&&a.datasets&&as(m.current.config.data,a.datasets,o)}),[r,a.datasets]),(0,y.useEffect)((()=>{m.current&&(r?(f(),setTimeout(g)):m.current.update(p))}),[r,l,a.labels,a.datasets,p]),(0,y.useEffect)((()=>{m.current&&(f(),setTimeout(g))}),[n]),(0,y.useEffect)((()=>(g(),()=>f())),[]),y.createElement("canvas",Object.assign({ref:h,role:"img",height:s,width:i},u),d)}const ds=(0,y.forwardRef)(cs);function ps(e,t){return is.Chart.register(t),(0,y.forwardRef)(((t,s)=>y.createElement(ds,Object.assign({},t,{ref:s,type:e}))))}const us=ps("line",is.LineController),hs={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};is._adapters._date.override("function"==typeof Ye()?{_id:"moment",formats:function(){return hs},parse:function(e,t){return"string"==typeof e&&"string"==typeof t?e=Ye()(e,t):e instanceof Ye()||(e=Ye()(e)),e.isValid()?e.valueOf():null},format:function(e,t){return Ye()(e).format(t)},add:function(e,t,s){return Ye()(e).add(t,s).valueOf()},diff:function(e,t,s){return Ye()(e).diff(Ye()(t),s)},startOf:function(e,t,s){return e=Ye()(e),"isoWeek"===t?(s=Math.trunc(Math.min(Math.max(0,s),6)),e.isoWeekday(s).startOf("day").valueOf()):e.startOf(t).valueOf()},endOf:function(e,t){return Ye()(e).endOf(t).valueOf()}}:{}),Math.PI,Number.POSITIVE_INFINITY,Math.log10,Math.sign,"undefined"==typeof window||window.requestAnimationFrame,new Map,Object.create(null),Object.create(null),Number.EPSILON;const ms=["top","right","bottom","left"];function gs(e,t,s){const i={};s=s?"-"+s:"";for(let r=0;r<4;r++){const o=ms[r];i[o]=parseFloat(e[t+"-"+o+s])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}!function(){let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}}(),is.Chart.register(is.CategoryScale,is.LineController,is.LineElement,is.PointElement,is.LinearScale,is.TimeScale,is.Legend,is.Tooltip);const ys=["#ff983b","#ffa3f7","#3798ff","#ff3b3b","#acce81","#b51751","#3949ab","#26c6da","#ccb800","#de66ff","#4db6ac","#ffab91","#45f5f1","#77f210","#90a4ae","#ffd54f","#006b5e","#8ec7d2","#b1887c","#cc9300"];function fs({datasets:t,isChartShown:s,keyphrases:i}){if(!s)return null;const r=(0,e.useMemo)((()=>Object.fromEntries([...i].sort().map(((e,t)=>[e,ys[t%ys.length]])))),[i]),n=t.map((e=>{const t=r[e.label];return{...e,data:e.data.map((({datetime:e,value:t})=>({x:e,y:t}))),lineTension:0,pointRadius:1,pointHoverRadius:4,borderWidth:2,pointHitRadius:6,backgroundColor:t,borderColor:t}})).filter((e=>!1!==e.selected));return(0,c.jsx)(us,{height:100,data:{datasets:n},options:{plugins:{legend:{display:!0,position:"bottom",labels:{color:"black",usePointStyle:!0,boxHeight:7,boxWidth:7},onClick:o.noop},tooltip:{enabled:!0,callbacks:{title:e=>Ye()(e[0].raw.x).utc().format("YYYY-MM-DD")},titleAlign:"center",mode:"xPoint",position:"nearest",usePointStyle:!0,boxHeight:7,boxWidth:7,boxPadding:2}},scales:{x:{bounds:"ticks",type:"time",time:{unit:"day",minUnit:"day"},grid:{display:!1},ticks:{autoSkipPadding:50,maxRotation:0,color:"black"}},y:{bounds:"ticks",offset:!0,reverse:!0,ticks:{precision:0,color:"black"},max:101}}}})}is.Interaction.modes.xPoint=(e,t,s,i)=>{const r=function(e,t){if("native"in e)return e;const{canvas:s,currentDevicePixelRatio:i}=t,r=(h=s).ownerDocument.defaultView.getComputedStyle(h,null),o="border-box"===r.boxSizing,n=gs(r,"padding"),a=gs(r,"border","width"),{x:l,y:c,box:d}=function(e,t){const s=e.touches,i=s&&s.length?s[0]:e,{offsetX:r,offsetY:o}=i;let n,a,l=!1;if(((e,t,s)=>(e>0||t>0)&&(!s||!s.shadowRoot))(r,o,e.target))n=r,a=o;else{const e=t.getBoundingClientRect();n=i.clientX-e.left,a=i.clientY-e.top,l=!0}return{x:n,y:a,box:l}}(e,s),p=n.left+(d&&a.left),u=n.top+(d&&a.top);var h;let{width:m,height:g}=t;return o&&(m-=n.width+a.width,g-=n.height+a.height),{x:Math.round((l-p)/m*s.width/i),y:Math.round((c-u)/g*s.height/i)}}(t,e);let o=[];if(is.Interaction.evaluateInteractionItems(e,"x",r,((e,t,s)=>{e.inXRange(r.x,i)&&o.push({element:e,datasetIndex:t,index:s})})),0===o.length)return o;const n=o.reduce(((e,t)=>Math.abs(r.x-e.element.x)<Math.abs(r.x-t.element.x)?e:t)).element.x;return o=o.filter((e=>e.element.x===n)),o.some((e=>Math.abs(e.element.y-r.y)<10))?o:[]},fs.propTypes={datasets:r().arrayOf(r().shape({label:r().string.isRequired,data:r().arrayOf(r().shape({datetime:r().string.isRequired,value:r().number.isRequired})).isRequired,selected:r().bool})).isRequired,isChartShown:r().bool.isRequired,keyphrases:r().array.isRequired};const ws=({response:e,onLogin:t})=>[401,403,404].includes(e.status)?(0,c.jsx)(ts,{onReconnect:t}):(0,c.jsx)(Qe,{});ws.propTypes={response:r().object.isRequired,onLogin:r().func.isRequired};const xs=({isSuccess:e,response:t,allKeyphrasesMissRanking:s,onLogin:i,keyphraseLimitReached:r,limit:n})=>r?(0,c.jsx)(Xe,{limit:n}):(0,o.isEmpty)(t)||e?s?(0,c.jsx)(yt,{}):null:(0,c.jsx)(ws,{response:t,onLogin:i});xs.propTypes={isSuccess:r().bool.isRequired,allKeyphrasesMissRanking:r().bool.isRequired,response:r().object,onLogin:r().func.isRequired,keyphraseLimitReached:r().bool.isRequired,limit:r().number.isRequired},xs.defaultProps={response:{}};let bs=null;const vs=async e=>{if(bs&&!bs.isClosed())return void bs.focus();const{url:t}=await async function(){return await st({path:"yoast/v1/wincher/authorization-url",method:"GET"})}();bs=new Jt(t,{success:{type:"wincher:oauth:success",callback:t=>(async(e,t)=>{const{onAuthentication:s,setRequestSucceeded:i,setRequestFailed:r,keyphrases:o,addTrackedKeyphrase:n,setKeyphraseLimitReached:a}=e;await tt((()=>async function(e){const{code:t,websiteId:s}=e;return await st({path:"yoast/v1/wincher/authenticate",method:"POST",data:{code:t,websiteId:s}})}(t)),(async e=>{s(!0,!0,t.websiteId.toString()),i(e);const l=(Array.isArray(o)?o:[o]).map((e=>e.toLowerCase()));await tt((()=>it(l)),(e=>{i(e),n(e.results)}),(e=>{400===e.status&&e.limit&&a(e.limit),r(e)}),201);const c=bs.getPopup();c&&c.close()}),(async e=>r(e)))})(e,t)},error:{type:"wincher:oauth:error",callback:()=>e.onAuthentication(!1,!1)}},{title:"Wincher_login",width:500,height:700}),bs.createPopup()},_s=e=>e.isLoggedIn?null:(0,c.jsx)("p",{children:(0,c.jsx)(ke.NewButton,{onClick:e.onLogin,variant:"primary",children:(0,m.sprintf)(/* translators: %s expands to Wincher */ (0,m.__)("Connect with %s","wordpress-seo"),"Wincher")})});_s.propTypes={isLoggedIn:r().bool.isRequired,onLogin:r().func.isRequired};const ks=a().div` p { margin: 1em 0; } `,js=a().div` ${e=>e.isDisabled&&"\n\t\topacity: .5;\n\t\tpointer-events: none;\n\t"}; `,Ts=a().div` font-weight: var(--yoast-font-weight-bold); color: var(--yoast-color-label); font-size: var(--yoast-font-size-default); `,Es=a().div.attrs({className:"yoast-field-group"})` display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; `,Ss=a().div` margin: 8px 0; `,Rs=Ye().utc().startOf("day"),Cs=[{name:(0,m.__)("Last day","wordpress-seo"),value:Ye()(Rs).subtract(1,"days").format(),defaultIndex:1},{name:(0,m.__)("Last week","wordpress-seo"),value:Ye()(Rs).subtract(1,"week").format(),defaultIndex:2},{name:(0,m.__)("Last month","wordpress-seo"),value:Ye()(Rs).subtract(1,"month").format(),defaultIndex:3},{name:(0,m.__)("Last year","wordpress-seo"),value:Ye()(Rs).subtract(1,"year").format(),defaultIndex:0}],Is=e=>{const{onSelect:t,selected:s,options:i,isLoggedIn:r}=e;return r?i.length<1?null:(0,c.jsx)("select",{className:"components-select-control__input",id:"wincher-period-picker",value:(null==s?void 0:s.value)||i[0].value,onChange:t,children:i.map((e=>(0,c.jsx)("option",{value:e.value,children:e.name},e.name)))}):null};Is.propTypes={onSelect:r().func.isRequired,selected:r().object,options:r().array.isRequired,isLoggedIn:r().bool.isRequired};const Ls=t=>{const{trackedKeyphrases:s,isLoggedIn:i,keyphrases:r,shouldTrackAll:n,permalink:a,historyDaysLimit:l}=t;if(!a&&i)return(0,c.jsx)(ss,{});if(0===r.length)return(0,c.jsx)(Xt,{});const d=Ye()(Rs).subtract(l,"days"),p=Cs.filter((e=>Ye()(e.value).isSameOrAfter(d))),u=(0,o.orderBy)(p,(e=>e.defaultIndex),"desc")[0],[h,g]=(0,e.useState)(u),[y,f]=(0,e.useState)([]),w=y.length>0,x=(0,Pe.usePrevious)(s);(0,e.useEffect)((()=>{if(!(0,o.isEmpty)(s)&&(0,o.difference)(Object.keys(s),Object.keys(x||[])).length){const e=Object.values(s).map((e=>e.keyword));f(e)}}),[s,x]),(0,e.useEffect)((()=>{g(u)}),[null==u?void 0:u.name]);const b=(0,e.useCallback)((e=>{const t=Cs.find((t=>t.value===e.target.value));t&&g(t)}),[g]),v=(0,e.useMemo)((()=>(0,o.isEmpty)(y)||(0,o.isEmpty)(s)?[]:Object.values(s).filter((e=>{var t;return!(null==e||null===(t=e.position)||void 0===t||!t.history)})).map((e=>{var t;return{label:e.keyword,data:e.position.history,selected:y.includes(e.keyword)&&!(0,o.isEmpty)(null===(t=e.position)||void 0===t?void 0:t.history)}}))),[y,s]);return(0,c.jsxs)(js,{isDisabled:!i,children:[(0,c.jsx)("p",{children:(0,m.__)("You can enable / disable tracking the SEO performance for each keyphrase below.","wordpress-seo")}),i&&n&&(0,c.jsx)(Qt,{}),(0,c.jsx)(Es,{children:(0,c.jsx)(Is,{selected:h,onSelect:b,options:p,isLoggedIn:i})}),(0,c.jsx)(Ss,{children:(0,c.jsx)(fs,{isChartShown:w,datasets:v,keyphrases:r})}),(0,c.jsx)(Yt,{startAt:null==h?void 0:h.value,selectedKeyphrases:y,onSelectKeyphrases:f,trackedKeyphrases:s})]})};function Ps(t){const{isNewlyAuthenticated:s,isLoggedIn:i}=t,r=(0,e.useCallback)((()=>{vs(t)}),[vs,t]),o=ct(i);return(0,c.jsxs)(ks,{children:[s&&(0,c.jsx)(gt,{}),i&&(0,c.jsx)(mt,{trackingInfo:o}),(0,c.jsxs)(Ts,{children:[(0,m.__)("SEO performance","wordpress-seo"),(0,c.jsx)(ke.HelpIcon,{linkTo:wpseoAdminL10n["shortlinks.wincher.seo_performance"] /* translators: Hidden accessibility text. */,linkText:(0,m.__)("Learn more about the SEO performance feature.","wordpress-seo")})]}),(0,c.jsx)(Gt,{}),(0,c.jsx)(_s,{isLoggedIn:i,onLogin:r}),(0,c.jsx)(xs,{...t,onLogin:r}),(0,c.jsx)(Ls,{...t,historyDaysLimit:(null==o?void 0:o.historyDays)||31})]})}Ls.propTypes={trackedKeyphrases:r().object,keyphrases:r().array.isRequired,isLoggedIn:r().bool.isRequired,shouldTrackAll:r().bool.isRequired,permalink:r().string.isRequired,historyDaysLimit:r().number},Ps.propTypes={trackedKeyphrases:r().object,addTrackedKeyphrase:r().func.isRequired,isLoggedIn:r().bool,isNewlyAuthenticated:r().bool,keyphrases:r().array,response:r().object,shouldTrackAll:r().bool,permalink:r().string,historyDaysLimit:r().number},Ps.defaultProps={trackedKeyphrases:null,isLoggedIn:!1,isNewlyAuthenticated:!1,keyphrases:[],response:{},shouldTrackAll:!1,permalink:"",historyDaysLimit:0};const As=(0,Pe.compose)([(0,h.withSelect)((e=>{const{isWincherNewlyAuthenticated:t,getWincherKeyphraseLimitReached:s,getWincherLimit:i,getWincherHistoryDaysLimit:r,getWincherLoginStatus:o,getWincherRequestIsSuccess:n,getWincherRequestResponse:a,getWincherTrackableKeyphrases:l,getWincherTrackedKeyphrases:c,getWincherAllKeyphrasesMissRanking:d,getWincherPermalink:p,shouldWincherAutomaticallyTrackAll:u}=e("yoast-seo/editor");return{keyphrases:l(),trackedKeyphrases:c(),allKeyphrasesMissRanking:d(),isLoggedIn:o(),isNewlyAuthenticated:t(),isSuccess:n(),keyphraseLimitReached:s(),limit:i(),response:a(),shouldTrackAll:u(),permalink:p(),historyDaysLimit:r()}})),(0,h.withDispatch)((e=>{const{setWincherWebsiteId:t,setWincherRequestSucceeded:s,setWincherRequestFailed:i,setWincherTrackingForKeyphrase:r,setWincherSetKeyphraseLimitReached:o,setWincherLoginStatus:n}=e("yoast-seo/editor");return{setRequestSucceeded:e=>{s(e)},setRequestFailed:e=>{i(e)},addTrackedKeyphrase:e=>{r(e)},setKeyphraseLimitReached:e=>{o(e)},onAuthentication:(e,s,i)=>{t(i),n(e,s)}}}))])(Ps),Fs=a()(Ae)` width: 18px; height: 18px; margin: 3px; `;function Ms(e){const{keyphrases:t,onNoKeyphraseSet:s,onOpen:i,location:r}=e;if(!t.length){let e=document.querySelector("#focus-keyword-input-metabox");return e||(e=document.querySelector("#focus-keyword-input-sidebar")),e.focus(),void s()}i(r)}function Ns(t){const{location:s,whichModalOpen:i,shouldCloseOnClickOutside:r}=t,o=(0,e.useCallback)((()=>{Ms(t)}),[Ms,t]),n=(0,m.__)("Track SEO performance","wordpress-seo"),a=((e=null)=>(0,y.useMemo)((()=>{const t={role:"img","aria-hidden":"true"};return null!==e&&(t.focusable=e?"true":"false"),t}),[e]))();return(0,c.jsxs)(e.Fragment,{children:[i===s&&(0,c.jsx)(De,{title:n,onRequestClose:t.onClose,icon:(0,c.jsx)(Be,{}),additionalClassName:"yoast-wincher-seo-performance-modal yoast-gutenberg-modal__no-padding",shouldCloseOnClickOutside:r,children:(0,c.jsx)(qe,{className:"yoast-gutenberg-modal__content yoast-wincher-seo-performance-modal__content",children:(0,c.jsx)(As,{})})}),"sidebar"===s&&(0,c.jsx)(Ke,{id:`wincher-open-button-${s}`,title:n,SuffixHeroIcon:(0,c.jsx)(Fs,{className:"yst-text-slate-500",...a}),onClick:o}),"metabox"===s&&(0,c.jsx)("div",{className:"yst-root",children:(0,c.jsxs)(Me,{id:`wincher-open-button-${s}`,onClick:o,children:[(0,c.jsx)(Me.Text,{children:n}),(0,c.jsx)(Ae,{className:"yst-h-5 yst-w-5 yst-text-slate-500",...a})]})})]})}Ns.propTypes={location:r().string,whichModalOpen:r().oneOf(["none","metabox","sidebar","postpublish"]),shouldCloseOnClickOutside:r().bool,keyphrases:r().array.isRequired,onNoKeyphraseSet:r().func.isRequired,onOpen:r().func.isRequired,onClose:r().func.isRequired},Ns.defaultProps={location:"",whichModalOpen:"none",shouldCloseOnClickOutside:!0};const qs=(0,Pe.compose)([(0,h.withSelect)((e=>{const{getWincherModalOpen:t,getWincherTrackableKeyphrases:s}=e("yoast-seo/editor");return{keyphrases:s(),whichModalOpen:t()}})),(0,h.withDispatch)((e=>{const{setWincherOpenModal:t,setWincherDismissModal:s,setWincherNoKeyphrase:i}=e("yoast-seo/editor");return{onOpen:e=>{t(e)},onClose:()=>{s()},onNoKeyphraseSet:()=>{i()}}}))])(Ns),Os=window.yoast.externals.components;function Ds(){return(0,Pe.createHigherOrderComponent)((function(t){return(0,Pe.pure)((function(s){const i=(0,e.useContext)(l.LocationContext);return(0,e.createElement)(t,{...s,location:i})}))}),"withLocation")}const $s=(0,Pe.compose)([(0,h.withSelect)((e=>{const{isCornerstoneContent:t}=e("yoast-seo/editor");return{isCornerstone:t(),learnMoreUrl:wpseoAdminL10n["shortlinks.cornerstone_content_info"]}})),(0,h.withDispatch)((e=>{const{toggleCornerstoneContent:t}=e("yoast-seo/editor");return{onChange:t}})),Ds()])(Os.CollapsibleCornerstone),Us=window.yoast.searchMetadataPreviews,Ws=a()(ke.StyledSection)` &${ke.StyledSectionBase} { padding: 0; & ${ke.StyledHeading} { ${(0,Ne.getDirectionalStyle)("padding-left","padding-right")}: 20px; margin-left: ${(0,Ne.getDirectionalStyle)("0","20px")}; } } `,Bs=({children:e,title:t,icon:s,hasPaperStyle:i,shoppingData:r})=>(0,c.jsx)(Ws,{headingLevel:3,headingText:t,headingIcon:s,headingIconColor:"#555",hasPaperStyle:i,shoppingData:r,children:e});Bs.propTypes={children:r().element,title:r().string,icon:r().string,hasPaperStyle:r().bool,shoppingData:r().object},Bs.defaultProps={hasPaperStyle:!0,shoppingData:null};const Hs=Bs,Ks=window.wp.sanitize,zs="SNIPPET_EDITOR_UPDATE_REPLACEMENT_VARIABLE";function Ys(e,t,s="",i=!1){const r="string"==typeof t?(0,Ne.decodeHTML)(t):t;return{type:zs,name:e,value:r,label:s,hidden:i}}function Vs(e){return e.charAt(0).toUpperCase()+e.slice(1)}const{stripHTMLTags:Zs}=Ne.strings,Gs=["slug","content","contentImage","snippetPreviewImageURL"];function Xs(e,t="_"){return e.replace(/\s/g,t)}const Qs=(0,o.memoize)(((e,t)=>0===e?o.noop:(0,o.debounce)((s=>t(s,e)),500))),Js=({link:e,text:t})=>(0,c.jsxs)(u.Root,{children:[(0,c.jsx)("p",{children:t}),(0,c.jsxs)(u.Button,{href:e,as:"a",className:"yst-gap-2 yst-mb-5 yst-mt-2",variant:"upsell",target:"_blank",rel:"noopener",children:[(0,c.jsx)(w,{className:"yst-w-4 yst-h-4 yst--ms-1 yst-shrink-0"}),(0,m.sprintf)(/* translators: %1$s expands to Yoast WooCommerce SEO. */ (0,m.__)("Unlock with %1$s","wordpress-seo"),"Yoast WooCommerce SEO")]})]});Js.propTypes={link:r().string.isRequired,text:r().string.isRequired};const ei=Js,ti=function(e,t){let s=0;return t.shortenedBaseUrl&&"string"==typeof t.shortenedBaseUrl&&(s=t.shortenedBaseUrl.length),e.url=e.url.replace(/\s+/g,"-"),"-"===e.url[e.url.length-1]&&(e.url=e.url.slice(0,-1)),"-"===e.url[s]&&(e.url=e.url.slice(0,s)+e.url.slice(s+1)),function(e){const t=(0,o.get)(window,["YoastSEO","app","pluggable"],!1);if(!t||!(0,o.get)(window,["YoastSEO","app","pluggable","loaded"],!1))return function(e){const t=(0,o.get)(window,["YoastSEO","wp","replaceVarsPlugin","replaceVariables"],o.identity);return{url:e.url,title:Zs(t(e.title)),description:Zs(t(e.description)),filteredSEOTitle:e.filteredSEOTitle?Zs(t(e.filteredSEOTitle)):""}}(e);const s=t._applyModifications.bind(t);return{url:e.url,title:Zs(s("data_page_title",e.title)),description:Zs(s("data_meta_desc",e.description)),filteredSEOTitle:e.filteredSEOTitle?Zs(s("data_page_title",e.filteredSEOTitle)):""}}(e)},si=(0,Pe.compose)([(0,h.withSelect)((function(e){const{getBaseUrlFromSettings:t,getDateFromSettings:s,getFocusKeyphrase:i,getRecommendedReplaceVars:r,getReplaceVars:o,getShoppingData:n,getSiteIconUrlFromSettings:a,getSnippetEditorData:l,getSnippetEditorMode:c,getSnippetEditorPreviewImageUrl:d,getSnippetEditorWordsToHighlight:p,isCornerstoneContent:u,getIsTerm:h,getContentLocale:m,getSiteName:g}=e("yoast-seo/editor"),y=o();return y.forEach((e=>{""!==e.value||["title","excerpt","excerpt_only"].includes(e.name)||(e.value="%%"+e.name+"%%")})),{baseUrl:t(),data:l(),date:s(),faviconSrc:a(),keyword:i(),mobileImageSrc:d(),mode:c(),recommendedReplacementVariables:r(),replacementVariables:y,shoppingData:n(),wordsToHighlight:p(),isCornerstone:u(),isTaxonomy:h(),locale:m(),siteName:g()}})),(0,h.withDispatch)((function(e,t,{select:s}){const{updateData:i,switchMode:r,updateAnalysisData:o,findCustomFields:n}=e("yoast-seo/editor"),a=e("core/editor"),l=s("yoast-seo/editor").getPostId();return{onChange:(e,t)=>{switch(e){case"mode":r(t);break;case"slug":i({slug:t}),a&&a.editPost({slug:t});break;default:i({[e]:t})}},onChangeAnalysisData:o,onReplacementVariableSearchChange:Qs(l,n)}}))])((e=>{const t=(0,h.useSelect)((e=>e("yoast-seo/editor").selectLink("https://yoa.st/product-google-preview-metabox")),[]),s=(0,h.useSelect)((e=>e("yoast-seo/editor").getIsWooSeoUpsell()),[]),i=(0,m.__)("Want an enhanced Google preview of how your WooCommerce products look in the search results?","wordpress-seo");return(0,c.jsx)(l.LocationConsumer,{children:r=>(0,c.jsx)(Hs,{icon:"eye",hasPaperStyle:e.hasPaperStyle,children:(0,c.jsxs)(c.Fragment,{children:[s&&(0,c.jsx)(ei,{link:t,text:i}),(0,c.jsx)(Us.SnippetEditor,{...e,descriptionPlaceholder:(0,m.__)("Please provide a meta description by editing the snippet below.","wordpress-seo"),mapEditorDataToPreview:ti,showCloseButton:!1,idSuffix:r})]})})})})),ii=(0,h.withSelect)((e=>{const{getWarningMessage:t}=e("yoast-seo/editor");return{message:t()}}))(ke.Warning),ri=window.yoast.featureFlag,oi=a()(ke.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); } `,ni=e=>(0,c.jsx)(oi,{hasPadding:!0,hasSeparator:!0,...e}),ai=()=>{const t=(0,h.useSelect)((e=>e("yoast-seo/editor").getEstimatedReadingTime()),[]),s=(0,e.useMemo)((()=>(0,o.get)(window,"wpseoAdminL10n.shortlinks-insights-estimated_reading_time","")),[]);return(0,c.jsx)(ke.InsightsCard,{amount:t,unit:(0,m._n)("minute","minutes",t,"wordpress-seo"),title:(0,m.__)("Reading time","wordpress-seo"),linkTo:s /* translators: Hidden accessibility text. */,linkText:(0,m.__)("Learn more about reading time","wordpress-seo")})},li=(0,Ne.makeOutboundLink)();function ci(e,t){return-1===e?(0,m.__)("Your text should be slightly longer to calculate your Flesch reading ease score.","wordpress-seo"):(0,m.sprintf)( /* Translators: %1$s expands to the numeric Flesch reading ease score, %2$s expands to the easiness of reading (e.g. 'easy' or 'very difficult') */ (0,m.__)("The copy scores %1$s in the test, which is considered %2$s to read.","wordpress-seo"),e,function(e){switch(e){case Te.DIFFICULTY.NO_DATA:return(0,m.__)("no data","wordpress-seo");case Te.DIFFICULTY.VERY_EASY:return(0,m.__)("very easy","wordpress-seo");case Te.DIFFICULTY.EASY:return(0,m.__)("easy","wordpress-seo");case Te.DIFFICULTY.FAIRLY_EASY:return(0,m.__)("fairly easy","wordpress-seo");case Te.DIFFICULTY.OKAY:return(0,m.__)("okay","wordpress-seo");case Te.DIFFICULTY.FAIRLY_DIFFICULT:return(0,m.__)("fairly difficult","wordpress-seo");case Te.DIFFICULTY.DIFFICULT:return(0,m.__)("difficult","wordpress-seo");case Te.DIFFICULTY.VERY_DIFFICULT:return(0,m.__)("very difficult","wordpress-seo")}}(t))}const di=()=>{let t=(0,h.useSelect)((e=>e("yoast-seo/editor").getFleschReadingEaseScore()),[]);const s=(0,e.useMemo)((()=>(0,o.get)(window,"wpseoAdminL10n.shortlinks-insights-flesch_reading_ease","")),[]),i=(0,h.useSelect)((e=>e("yoast-seo/editor").getFleschReadingEaseDifficulty()),[t]),r=(0,e.useMemo)((()=>{const e=(0,o.get)(window,"wpseoAdminL10n.shortlinks-insights-flesch_reading_ease_article","");return function(e,t,s){const i=function(e){switch(e){case Te.DIFFICULTY.FAIRLY_DIFFICULT:case Te.DIFFICULTY.DIFFICULT:case Te.DIFFICULTY.VERY_DIFFICULT:return(0,m.__)("Try to make shorter sentences, using less difficult words to improve readability","wordpress-seo");case Te.DIFFICULTY.NO_DATA:return(0,m.__)("Continue writing to get insight into the readability of your text!","wordpress-seo");default:return(0,m.__)("Good job!","wordpress-seo")}}(t);return(0,c.jsxs)("span",{children:[ci(e,t)," ",t>=Te.DIFFICULTY.FAIRLY_DIFFICULT?(0,c.jsx)(li,{href:s,children:i+"."}):i]})}(t,i,e)}),[t,i]);return-1===t&&(t="?"),(0,c.jsx)(ke.InsightsCard,{amount:t,unit:(0,m.__)("out of 100","wordpress-seo"),title:(0,m.__)("Flesch reading ease","wordpress-seo"),linkTo:s /* translators: Hidden accessibility text. */,linkText:(0,m.__)("Learn more about Flesch reading ease","wordpress-seo"),description:r})},pi=({data:t,itemScreenReaderText:s,className:i,...r})=>{const n=(0,e.useMemo)((()=>{var e,s;return null!==(e=null===(s=(0,o.maxBy)(t,"number"))||void 0===s?void 0:s.number)&&void 0!==e?e:0}),[t]);return(0,c.jsx)("ul",{className:le()("yoast-data-model",i),...r,children:t.map((({name:e,number:t})=>(0,c.jsxs)("li",{style:{"--yoast-width":t/n*100+"%"},children:[e,(0,c.jsx)("span",{children:t}),s&&(0,c.jsx)("span",{className:"screen-reader-text",children:(0,m.sprintf)(s,t)})]},`${e}_dataItem`)))})};pi.propTypes={data:r().arrayOf(r().shape({name:r().string.isRequired,number:r().number.isRequired})),itemScreenReaderText:r().string,className:r().string},pi.defaultProps={data:[],itemScreenReaderText:"",className:""};const ui=pi,hi=window.wp.url,mi=(0,Ne.makeOutboundLink)(),gi=({location:t})=>{const s=(0,h.useSelect)((e=>{var t,s;return null===(t=null===(s=e("yoast-seo-premium/editor"))||void 0===s?void 0:s.getPreference("isProminentWordsAvailable",!1))||void 0===t||t}),[]),i=(0,h.useSelect)((e=>e("yoast-seo/editor").getPreference("shouldUpsell",!1)),[]),r=(0,e.useMemo)((()=>(0,o.get)(window,`wpseoAdminL10n.shortlinks-insights-upsell-${t}-prominent_words`,"")),[t]),n=(0,e.useMemo)((()=>{const e=(0,o.get)(window,"wpseoAdminL10n.shortlinks-insights-keyword_research_link","");return g((0,m.sprintf)( // translators: %1$s and %2$s are replaced by opening and closing <a> tags. (0,m.__)("Read our %1$sultimate guide to keyword research%2$s to learn more about keyword research and keyword strategy.","wordpress-seo"),"<a>","</a>"),{a:(0,c.jsx)(mi,{href:e})})}),[]),a=(0,e.useMemo)((()=>g((0,m.sprintf)( // translators: %1$s expands to a starting `b` tag, %1$s expands to a closing `b` tag and %3$s expands to `Yoast SEO Premium`. (0,m.__)("With %1$s%3$s%2$s, this section will show you which words occur most often in your text. By checking these prominent words against your intended keyword(s), you'll know how to edit your text to be more focused.","wordpress-seo"),"<b>","</b>","Yoast SEO Premium"),{b:(0,c.jsx)("b",{})})),[]),d=(0,h.useSelect)((e=>{var t,s;return null!==(t=null===(s=e("yoast-seo-premium/editor"))||void 0===s?void 0:s.getProminentWords())&&void 0!==t?t:[]}),[]),p=(0,e.useMemo)((()=>{const e=(0,m.sprintf)( // translators: %1$s expands to Yoast SEO Premium. (0,m.__)("Get %s to enjoy the benefits of prominent words","wordpress-seo"),"Yoast SEO Premium").split(/\s+/);return e.map(((t,s)=>({name:t,number:e.length-s})))}),[]),u=(0,e.useMemo)((()=>i?p:d.map((({word:e,occurrence:t})=>({name:e,number:t})))),[d,p]);if(!s)return null;const{locationContext:y}=(0,l.useRootContext)();return(0,c.jsxs)("div",{className:"yoast-prominent-words",children:[(0,c.jsx)("div",{className:"yoast-field-group__title",children:(0,c.jsx)("b",{children:(0,m.__)("Prominent words","wordpress-seo")})}),!i&&(0,c.jsx)("p",{children:0===u.length?(0,m.__)("Once you add a bit more copy, we'll give you a list of words that occur the most in the content. These give an indication of what your content focuses on.","wordpress-seo"):(0,m.__)("The following words occur the most in the content. These give an indication of what your content focuses on. If the words differ a lot from your topic, you might want to rewrite your content accordingly.","wordpress-seo")}),i&&(0,c.jsx)("p",{children:a}),i&&(0,c.jsxs)(mi,{href:(0,hi.addQueryArgs)(r,{context:y}),"data-action":"load-nfd-ctb","data-ctb-id":"f6a84663-465f-4cb5-8ba5-f7a6d72224b2",className:"yoast-button yoast-button-upsell",children:[(0,m.sprintf)( // translators: %s expands to `Premium` (part of add-on name). (0,m.__)("Unlock with %s","wordpress-seo"),"Premium"),(0,c.jsx)("span",{"aria-hidden":"true",className:"yoast-button-upsell__caret"})]}),(0,c.jsx)("p",{children:n}),(0,c.jsx)(ui,{data:u,itemScreenReaderText:/* translators: Hidden accessibility text; %d expands to the number of occurrences. */ (0,m.__)("%d occurrences","wordpress-seo"),"aria-label":(0,m.__)("Prominent words","wordpress-seo"),className:i?"yoast-data-model--upsell":null})]})};gi.propTypes={location:r().string.isRequired};const yi=gi,fi=()=>{const t=(0,h.useSelect)((e=>e("yoast-seo/editor").getTextLength()),[]),s=(0,e.useMemo)((()=>(0,o.get)(window,"wpseoAdminL10n.shortlinks-insights-word_count","")),[]);let i=(0,m._n)("word","words",t.count,"wordpress-seo"),r=(0,m.__)("Word count","wordpress-seo"),n=(0,m.__)("Learn more about word count","wordpress-seo");return"character"===t.unit&&(i=(0,m._n)("character","characters",t.count,"wordpress-seo"),r=(0,m.__)("Character count","wordpress-seo"), /* translators: Hidden accessibility text. */ n=(0,m.__)("Learn more about character count","wordpress-seo")),(0,c.jsx)(ke.InsightsCard,{amount:t.count,unit:i,title:r,linkTo:s,linkText:n})},wi=(0,Ne.makeOutboundLink)(),xi=({location:t})=>{const s=(0,e.useMemo)((()=>(0,o.get)(window,`wpseoAdminL10n.shortlinks-insights-upsell-${t}-text_formality`,"")),[t]),i=(0,e.useMemo)((()=>g((0,m.sprintf)( // Translators: %1$s expands to a starting `b` tag, %2$s expands to a closing `b` tag and %3$s expands to `Yoast SEO Premium`. (0,m.__)("%1$s%3$s%2$s will help you assess the formality level of your text.","wordpress-seo"),"<b>","</b>","Yoast SEO Premium"),{b:(0,c.jsx)("b",{})})),[]);return(0,c.jsx)(e.Fragment,{children:(0,c.jsxs)("div",{children:[(0,c.jsx)("p",{children:i}),(0,c.jsxs)(wi,{href:s,className:"yoast-button yoast-button-upsell",children:[(0,m.sprintf)( // Translators: %s expands to `Premium` (part of add-on name). (0,m.__)("Unlock with %s","wordpress-seo"),"Premium"),(0,c.jsx)("span",{"aria-hidden":"true",className:"yoast-button-upsell__caret"})]})]})})};xi.propTypes={location:r().string.isRequired};const bi=xi;function vi(){return(0,o.get)(window,"wpseoScriptData.metabox",{intl:{},isRtl:!1})}const _i=({location:e,name:s})=>{const i=(0,h.useSelect)((e=>e("yoast-seo/editor").isFormalitySupported()),[]),r=vi().isPremium,n=r?(0,o.get)(window,"wpseoAdminL10n.shortlinks-insights-text_formality_info_premium",""):(0,o.get)(window,"wpseoAdminL10n.shortlinks-insights-text_formality_info_free",""),a=(0,m.__)("Read more about text formality.","wordpress-seo");return i?(0,c.jsxs)("div",{className:"yoast-text-formality",children:[(0,c.jsxs)("div",{className:"yoast-field-group__title",children:[(0,c.jsx)("b",{children:(0,m.__)("Text formality","wordpress-seo")}),(0,c.jsx)(ke.HelpIcon,{linkTo:n,linkText:a})]}),r?(0,c.jsx)(t.Slot,{name:s}):(0,c.jsx)(bi,{location:e})]}):null};_i.propTypes={location:r().string.isRequired,name:r().string.isRequired};const ki=_i,ji=({location:e})=>{const t=(0,h.useSelect)((e=>e("yoast-seo/editor").isFleschReadingEaseAvailable()),[]);return(0,c.jsxs)(ni,{title:(0,m.__)("Insights","wordpress-seo"),id:`yoast-insights-collapsible-${e}`,className:"yoast-insights",children:[(0,c.jsx)(yi,{location:e}),(0,c.jsxs)("div",{children:[t&&(0,c.jsx)("div",{className:"yoast-insights-row",children:(0,c.jsx)(di,{})}),(0,c.jsxs)("div",{className:"yoast-insights-row yoast-insights-row--columns",children:[(0,c.jsx)(ai,{}),(0,c.jsx)(fi,{})]}),(0,ri.isFeatureEnabled)("TEXT_FORMALITY")&&(0,c.jsx)(ki,{location:e,name:"YoastTextFormalityMetabox"})]})]})};ji.propTypes={location:r().string},ji.defaultProps={location:"metabox"};const Ti=ji,Ei=y.forwardRef((function(e,t){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),y.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"}))})),Si=y.forwardRef((function(e,t){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"}))})),Ri=y.forwardRef((function(e,t){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),y.createElement("path",{d:"M3 1a1 1 0 000 2h1.22l.305 1.222a.997.997 0 00.01.042l1.358 5.43-.893.892C3.74 11.846 4.632 14 6.414 14H15a1 1 0 000-2H6.414l1-1H14a1 1 0 00.894-.553l3-6A1 1 0 0017 3H6.28l-.31-1.243A1 1 0 005 1H3zM16 16.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM6.5 18a1.5 1.5 0 100-3 1.5 1.5 0 000 3z"}))})),Ci="yoast-seo/editor",Ii=({isOpen:e,onClose:t,id:s,upsellLink:i,title:r="",description:o="",benefits:n=[],note:a="",ctbId:l="",modalTitle:d})=>{const p=(0,h.select)(Ci).isPromotionActive("black-friday-promotion"),g=(0,h.select)(Ci).getIsWooCommerceActive();return(0,c.jsx)(u.Modal,{isOpen:e,onClose:t,id:s,children:(0,c.jsx)(u.Modal.Panel,{className:"yst-max-w-[26.25rem] yst-p-0",hasCloseButton:!1,children:(0,c.jsxs)(u.Modal.Container,{children:[(0,c.jsxs)(u.Modal.Container.Header,{className:"yst-p-6 yst-border-b-slate-200 yst-border-b yst-flex yst-justify-start yst-gap-4 yst-items-center",children:[g?(0,c.jsx)(Ri,{className:"yst-text-woo-light yst-w-6 yst-h-6 yst-scale-x-[-1]"}):(0,c.jsx)(Be,{className:"yst-fill-primary-500 yst-w-5 yst-h-5"}),(0,c.jsx)(u.Modal.Title,{as:"h3",className:le()(g?"yst-text-woo-light":"yst-text-primary-500","yst-text-xl"),children:d}),(0,c.jsx)(u.Modal.CloseButton,{className:"yst-top-2",onClick:t,screenReaderText:(0,m.__)("Close modal","wordpress-seo")})]}),(0,c.jsxs)(u.Modal.Container.Content,{className:"yst-p-0",children:[p&&(0,c.jsx)("div",{className:"yst-flex yst-font-semibold yst-items-center yst-text-lg yst-content-between yst-bg-black yst-text-amber-300 yst-h-9 yst-border-amber-300 yst-border-y yst-border-x-0 yst-border-solid yst-px-6",children:(0,c.jsx)("div",{className:"yst-mx-auto",children:(0,m.__)("BLACK FRIDAY | 30% OFF","wordpress-seo")})}),(0,c.jsxs)("div",{className:"yst-py-6 yst-px-12",children:[(0,c.jsx)(u.Title,{as:"h3",className:"yst-mb-1 yst-leading-5 yst-text-sm yst-font-normal",children:r}),(0,c.jsx)("p",{className:"yst-mb-2",children:o}),n.length>0&&(0,c.jsx)("ul",{className:"yst-my-2",children:n.map(((e,t)=>(0,c.jsxs)("li",{className:"yst-flex yst-gap-1 yst-mb-2",children:[(0,c.jsx)(Si,{className:"yst-w-5 yst-h-5 yst--ms-1 yst-shrink-0 yst-inline yst-text-green-600"}),(0,c.jsx)("p",{className:"yst-text-slate-600",children:e})]},`${s}-upsell-benefit-${t}`)))}),(0,c.jsxs)("div",{className:"yst-text-center",children:[(0,c.jsxs)(u.Button,{as:"a",variant:"upsell",className:"yst-my-2 yst-gap-1.5",href:i,target:"_blank","data-action":"load-nfd-ctb","data-ctb-id":l,children:[(0,c.jsx)(w,{className:"yst-w-4 yst-h-4 yst--ms-1 yst-shrink-0"}),(0,m.sprintf)(/* translators: %s expands to 'Yoast SEO Premium' or 'Yoast Woocommerce SEO'. */ (0,m.__)("Explore %s","wordpress-seo"),g?"Yoast WooCommerce SEO":"Yoast SEO Premium"),(0,c.jsx)("span",{className:"yst-sr-only",children:(0,m.__)("Opens in a new tab","wordpress-seo")})]}),(0,c.jsx)("div",{children:a})]})]})]})]})})})},Li=()=>{const[e,,,t,s]=(0,u.useToggleState)(!1),{locationContext:i}=(0,l.useRootContext)(),r=(0,u.useSvgAria)(),o=i.includes("sidebar"),n=i.includes("metabox"),a=o?"sidebar":"metabox",d=wpseoAdminL10n[o?"shortlinks.upsell.sidebar.internal_linking_suggestions":"shortlinks.upsell.metabox.internal_linking_suggestions"];return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Ii,{isOpen:e,onClose:s,id:`yoast-internal-linking-suggestions-upsell-${a}`,upsellLink:(0,hi.addQueryArgs)(d,{context:i}),modalTitle:(0,m.__)("Get internal linking suggestions","wordpress-seo"),title:(0,m.__)("Connect related content without the guesswork","wordpress-seo"),description:g((0,m.sprintf)(/* translators: %s expands to be tag. */ (0,m.__)("Optimize for up to 5 keyphrases to shape your content around different themes, audiences, and angles. %sScans your content to:","wordpress-seo"),"<br />"),{br:(0,c.jsx)("br",{})}),benefits:[(0,m.__)("Suggest internal links based on your content’s main topics","wordpress-seo"),(0,m.__)("Build relevant internal links faster","wordpress-seo"),(0,m.__)("Strengthen your site’s structure","wordpress-seo"),(0,m.__)("Keep visitors exploring longer","wordpress-seo")],note:(0,m.__)("Upgrade to link your content with ease","wordpress-seo"),ctbId:"f6a84663-465f-4cb5-8ba5-f7a6d72224b2"}),o&&(0,c.jsx)(Ke,{id:"yoast-internal-linking-suggestions-sidebar-modal-open-button",title:(0,m.__)("Internal linking suggestions","wordpress-seo"),onClick:t,children:(0,c.jsx)("div",{className:"yst-root",children:(0,c.jsx)(u.Badge,{size:"small",variant:"upsell",children:(0,c.jsx)(Ei,{className:"yst-w-2.5 yst-h-2.5 yst-shrink-0",...r})})})}),n&&(0,c.jsx)("div",{className:"yst-root",children:(0,c.jsxs)(Me,{id:"yoast-internal-linking-suggestions-metabox-modal-open-button",onClick:t,children:[(0,c.jsx)(Me.Text,{children:(0,m.__)("Internal linking suggestions","wordpress-seo")}),(0,c.jsxs)(u.Badge,{size:"small",variant:"upsell",children:[(0,c.jsx)(Ei,{className:"yst-w-2.5 yst-h-2.5 yst-me-1 yst-shrink-0",...r}),(0,c.jsx)("span",{children:"Premium"})]})]})})]})},Pi=({children:e})=>(0,c.jsx)("div",{children:e});Pi.propTypes={renderPriority:r().number.isRequired,children:r().node.isRequired};const Ai=Pi,Fi=({noIndex:t,onNoIndexChange:s,editorContext:i,isPrivateBlog:r})=>{const o=(e=>{const t=(0,m.__)("No","wordpress-seo"),s=(0,m.__)("Yes","wordpress-seo"),i=e.noIndex?t:s;return window.wpseoScriptData.isPost?[{name:(0,m.sprintf)(/* translators: %1$s translates to "yes" or "no", %2$s translates to the content type label in plural form */ (0,m.__)("%1$s (current default for %2$s)","wordpress-seo"),i,e.postTypeNamePlural),value:"0"},{name:t,value:"1"},{name:s,value:"2"}]:[{name:(0,m.sprintf)(/* translators: %1$s translates to "yes" or "no", %2$s translates to the content type label in plural form */ (0,m.__)("%1$s (current default for %2$s)","wordpress-seo"),i,e.postTypeNamePlural),value:"default"},{name:s,value:"index"},{name:t,value:"noindex"}]})(i);return(0,c.jsx)(l.LocationConsumer,{children:i=>(0,c.jsxs)(e.Fragment,{children:[r&&(0,c.jsx)(ke.Alert,{type:"warning",children:(0,m.__)("Even though you can set the meta robots setting here, the entire site is set to noindex in the sitewide privacy settings, so these settings won't have an effect.","wordpress-seo")}),(0,c.jsx)(ke.Select,{label:(0,m.__)("Allow search engines to show this content in search results?","wordpress-seo"),onChange:s,id:(0,Ne.join)(["yoast-meta-robots-noindex",i]),options:o,selected:t,linkTo:wpseoAdminL10n["shortlinks.advanced.allow_search_engines"] /* translators: Hidden accessibility text. */,linkText:(0,m.__)("Learn more about the no-index setting on our help page.","wordpress-seo")})]})})};Fi.propTypes={noIndex:r().string.isRequired,onNoIndexChange:r().func.isRequired,editorContext:r().object.isRequired,isPrivateBlog:r().bool},Fi.defaultProps={isPrivateBlog:!1};const Mi=({noFollow:e,onNoFollowChange:t})=>(0,c.jsx)(l.LocationConsumer,{children:s=>{const i=(0,Ne.join)(["yoast-meta-robots-nofollow",s]);return(0,c.jsx)(ke.RadioButtonGroup,{id:i,options:[{value:"0",label:"Yes"},{value:"1",label:"No"}],label:(0,m.__)("Should search engines follow links on this content?","wordpress-seo"),groupName:i,onChange:t,selected:e,linkTo:wpseoAdminL10n["shortlinks.advanced.follow_links"] /* translators: Hidden accessibility text. */,linkText:(0,m.__)("Learn more about the no-follow setting on our help page.","wordpress-seo")})}});Mi.propTypes={noFollow:r().string.isRequired,onNoFollowChange:r().func.isRequired};const Ni=({advanced:e,onAdvancedChange:t})=>(0,c.jsx)(l.LocationConsumer,{children:s=>{const i=(0,Ne.join)(["yoast-meta-robots-advanced",s]),r=`${i}-input`;return(0,c.jsx)(ke.MultiSelect,{label:(0,m.__)("Meta robots advanced","wordpress-seo"),onChange:t,id:i,inputId:r,options:[{name:(0,m.__)("No Image Index","wordpress-seo"),value:"noimageindex"},{name:(0,m.__)("No Archive","wordpress-seo"),value:"noarchive"},{name:(0,m.__)("No Snippet","wordpress-seo"),value:"nosnippet"}],selected:e,linkTo:wpseoAdminL10n["shortlinks.advanced.meta_robots"] /* translators: Hidden accessibility text. */,linkText:(0,m.__)("Learn more about advanced meta robots settings on our help page.","wordpress-seo")})}});Ni.propTypes={advanced:r().array.isRequired,onAdvancedChange:r().func.isRequired};const qi=({breadcrumbsTitle:e,onBreadcrumbsTitleChange:t})=>(0,c.jsx)(l.LocationConsumer,{children:s=>(0,c.jsx)(ke.TextInput,{label:(0,m.__)("Breadcrumbs Title","wordpress-seo"),id:(0,Ne.join)(["yoast-breadcrumbs-title",s]),onChange:t,value:e,linkTo:wpseoAdminL10n["shortlinks.advanced.breadcrumbs_title"] /* translators: Hidden accessibility text. */,linkText:(0,m.__)("Learn more about the breadcrumbs title setting on our help page.","wordpress-seo")})});qi.propTypes={breadcrumbsTitle:r().string.isRequired,onBreadcrumbsTitleChange:r().func.isRequired};const Oi=({canonical:e,onCanonicalChange:t})=>(0,c.jsx)(l.LocationConsumer,{children:s=>(0,c.jsx)(ke.TextInput,{label:(0,m.__)("Canonical URL","wordpress-seo"),id:(0,Ne.join)(["yoast-canonical",s]),onChange:t,value:e,linkTo:"https://yoa.st/canonical-url" /* translators: Hidden accessibility text. */,linkText:(0,m.__)("Learn more about canonical URLs on our help page.","wordpress-seo")})});Oi.propTypes={canonical:r().string.isRequired,onCanonicalChange:r().func.isRequired};const Di=t=>{const{noIndex:s,noFollow:i,advanced:r,breadcrumbsTitle:o,canonical:n,onNoIndexChange:a,onNoFollowChange:l,onAdvancedChange:d,onBreadcrumbsTitleChange:p,onCanonicalChange:u,onLoad:h,isLoading:m,editorContext:g,isBreadcrumbsDisabled:y,isPrivateBlog:f}=t;(0,e.useEffect)((()=>{setTimeout((()=>{m&&h()}))}));const w={noIndex:s,onNoIndexChange:a,editorContext:g,isPrivateBlog:f},x={noFollow:i,onNoFollowChange:l},b={advanced:r,onAdvancedChange:d},v={breadcrumbsTitle:o,onBreadcrumbsTitleChange:p},_={canonical:n,onCanonicalChange:u};return m?null:(0,c.jsxs)(e.Fragment,{children:[(0,c.jsx)(Fi,{...w}),g.isPost&&(0,c.jsx)(Mi,{...x}),g.isPost&&(0,c.jsx)(Ni,{...b}),!y&&(0,c.jsx)(qi,{...v}),(0,c.jsx)(Oi,{..._})]})};Di.propTypes={noIndex:r().string.isRequired,canonical:r().string.isRequired,onNoIndexChange:r().func.isRequired,onCanonicalChange:r().func.isRequired,onLoad:r().func.isRequired,isLoading:r().bool.isRequired,editorContext:r().object.isRequired,isBreadcrumbsDisabled:r().bool.isRequired,isPrivateBlog:r().bool,advanced:r().array,onAdvancedChange:r().func,noFollow:r().string,onNoFollowChange:r().func,breadcrumbsTitle:r().string,onBreadcrumbsTitleChange:r().func},Di.defaultProps={advanced:[],onAdvancedChange:()=>{},noFollow:"",onNoFollowChange:()=>{},breadcrumbsTitle:"",onBreadcrumbsTitleChange:()=>{},isPrivateBlog:!1};const $i=Di,Ui=(0,Pe.compose)([(0,h.withSelect)((e=>{const{getNoIndex:t,getNoFollow:s,getAdvanced:i,getBreadcrumbsTitle:r,getCanonical:o,getIsLoading:n,getEditorContext:a,getPreferences:l}=e("yoast-seo/editor"),{isBreadcrumbsDisabled:c,isPrivateBlog:d}=l();return{noIndex:t(),noFollow:s(),advanced:i(),breadcrumbsTitle:r(),canonical:o(),isLoading:n(),editorContext:a(),isBreadcrumbsDisabled:c,isPrivateBlog:d}})),(0,h.withDispatch)((e=>{const{setNoIndex:t,setNoFollow:s,setAdvanced:i,setBreadcrumbsTitle:r,setCanonical:o,loadAdvancedSettingsData:n}=e("yoast-seo/editor");return{onNoIndexChange:t,onNoFollowChange:s,onAdvancedChange:i,onBreadcrumbsTitleChange:r,onCanonicalChange:o,onLoad:n}}))])($i),Wi=a().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"}; `,Bi=e=>{const{siteUrl:t}=e;return(0,c.jsxs)(y.Fragment,{children:[(0,c.jsx)("span",{className:"screen-reader-text",children:t}),(0,c.jsx)(Wi,{"aria-hidden":"true",children:(0,c.jsx)("span",{children:t})})]})};Bi.propTypes={siteUrl:r().string.isRequired};const Hi=Bi,Ki=window.yoast.socialMetadataForms,zi=a().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; } `,Yi=a().img` && { height: 100%; position: absolute; width: 100%; object-fit: cover; } `,Vi=a().div` padding-bottom: ${e=>e.aspectRatio}%; `,Zi=({imageProps:e,width:t,height:s,imageMode:i="landscape"})=>"landscape"===i?(0,c.jsx)(Vi,{aspectRatio:e.aspectRatio,children:(0,c.jsx)(Yi,{src:e.src,alt:e.alt})}):(0,c.jsx)(zi,{src:e.src,alt:e.alt,width:t,height:s,imageProperties:e});function Gi(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 Xi(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 Qi(e,t,s=!1){const i=await function(e){return new Promise(((t,s)=>{const i=new Image;i.onload=()=>{t({width:i.width,height:i.height})},i.onerror=s,i.src=e}))}(e);let r=s?"landscape":"square";"Facebook"===t&&(r=(0,Ki.determineFacebookImageMode)(i));const o=function(e){return"Twitter"===e?Ki.TWITTER_IMAGE_SIZES:Ki.FACEBOOK_IMAGE_SIZES}(t),n=function(e,t,s){return"square"===s&&t.width===t.height?{width:e.squareWidth,height:e.squareHeight}:Xi(t,Gi(e,t,s))}(o,i,r);return{mode:r,height:n.height,width:n.width}}async function Ji(e,t,s=!1){try{return{imageProperties:await Qi(e,t,s),status:"loaded"}}catch(e){return{imageProperties:null,status:"errored"}}}Zi.propTypes={imageProps:r().shape({src:r().string.isRequired,alt:r().string.isRequired,aspectRatio:r().number.isRequired}).isRequired,width:r().number.isRequired,height:r().number.isRequired,imageMode:r().string};const er=a().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: ${je.colors.$color_white}; `,tr=a().div` box-sizing: border-box; max-width: ${Ki.FACEBOOK_IMAGE_SIZES.landscapeWidth}px; height: ${Ki.FACEBOOK_IMAGE_SIZES.landscapeHeight}px; background-color: ${je.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 sr extends y.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 Ji(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:Ki.FACEBOOK_IMAGE_SIZES.squareHeight+"px",width:Ki.FACEBOOK_IMAGE_SIZES.squareWidth+"px"};case"portrait":return{height:Ki.FACEBOOK_IMAGE_SIZES.portraitHeight+"px",width:Ki.FACEBOOK_IMAGE_SIZES.portraitWidth+"px"};case"landscape":return{height:Ki.FACEBOOK_IMAGE_SIZES.landscapeHeight+"px",width:Ki.FACEBOOK_IMAGE_SIZES.landscapeWidth+"px"}}}render(){const{imageProperties:e,status:t}=this.state;if("loading"===t||""===this.props.src||"errored"===t)return(0,c.jsx)(tr,{onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,children:(0,m.__)("Select image","wordpress-seo")});const s=this.retrieveContainerDimensions(e.mode);return(0,c.jsx)(er,{mode:e.mode,dimensions:s,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,onClick:this.props.onImageClick,children:(0,c.jsx)(Zi,{imageProps:{src:this.props.src,alt:this.props.alt,aspectRatio:Ki.FACEBOOK_IMAGE_SIZES.aspectRatio},width:e.width,height:e.height,imageMode:e.mode})})}}sr.propTypes={src:r().string,alt:r().string,onImageLoaded:r().func,onImageClick:r().func,onMouseEnter:r().func,onMouseLeave:r().func},sr.defaultProps={src:"",alt:"",onImageLoaded:o.noop,onImageClick:o.noop,onMouseEnter:o.noop,onMouseLeave:o.noop};const ir=sr,rr=a().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; `,or=a().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; } `,nr=e=>{switch(e){case"landscape":return"527px";case"square":case"portrait":return"369px";default:return"476px"}},ar=a().div` box-sizing: border-box; display: flex; flex-direction: ${e=>"landscape"===e.mode?"column":"row"}; background-color: #f2f3f5; max-width: 527px; `,lr=a().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 cr extends y.Component{constructor(e){super(e),this.state={imageMode:null,maxLineCount:0,descriptionLineCount:0},this.facebookTitleRef=f().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,i=this.getTitleLineCount();let r=t-i;"portrait"===s&&(r=5===i?0:4),r!==e&&this.setState({descriptionLineCount:r})}componentDidUpdate(){this.maybeSetMaxLineCount(),this.maybeSetDescriptionLineCount()}render(){const{imageMode:e,maxLineCount:t,descriptionLineCount:s}=this.state;return(0,c.jsxs)(ar,{id:"facebookPreview",mode:e,children:[(0,c.jsx)(ir,{src:this.props.imageUrl||this.props.imageFallbackUrl,alt:this.props.alt,onImageLoaded:this.onImageLoaded,onImageClick:this.props.onImageClick,onMouseEnter:this.onImageEnter,onMouseLeave:this.onLeave}),(0,c.jsxs)(lr,{mode:e,children:[(0,c.jsx)(Hi,{siteUrl:this.props.siteUrl,mode:e}),(0,c.jsx)(rr,{ref:this.facebookTitleRef,onMouseEnter:this.onTitleEnter,onMouseLeave:this.onLeave,onClick:this.onSelectTitle,lineCount:t,children:this.props.title}),s>0&&(0,c.jsx)(or,{maxWidth:nr(e),onMouseEnter:this.onDescriptionEnter,onMouseLeave:this.onLeave,onClick:this.onSelectDescription,lineCount:s,children:this.props.description})]})]})}}cr.propTypes={siteUrl:r().string.isRequired,title:r().string.isRequired,description:r().string,imageUrl:r().string,imageFallbackUrl:r().string,alt:r().string,onSelect:r().func,onImageClick:r().func,onMouseHover:r().func},cr.defaultProps={description:"",alt:"",imageUrl:"",imageFallbackUrl:"",onSelect:()=>{},onImageClick:()=>{},onMouseHover:()=>{}};const dr=cr,pr=a().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; `,ur=e=>(0,c.jsx)(pr,{children:(0,c.jsx)("span",{children:e.siteUrl})});ur.propTypes={siteUrl:r().string.isRequired};const hr=ur,mr=(e,t=!0)=>e?`\n\t\t\tmax-width: ${Ki.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: ${Ki.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`,gr=a().div` position: relative; box-sizing: content-box; overflow: hidden; background-color: #e1e8ed; flex-shrink: 0; ${e=>mr(e.isLarge)} `,yr=a().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=>mr(e.isLarge,!1)} `,fr=a()(yr)` ${e=>e.isLarge&&`height: ${Ki.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 wr extends f().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 Ji(this.props.src,this.socialMedium,this.props.isLarge);this.setState(e)}componentDidUpdate(e){e.src!==this.props.src&&this.handleTwitterImage()}componentDidMount(){this.handleTwitterImage()}render(){const{status:e,imageProperties:t}=this.state;return"loading"===e||""===this.props.src||"errored"===e?(0,c.jsx)(fr,{isLarge:this.props.isLarge,onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,children:(0,m.__)("Select image","wordpress-seo")}):(0,c.jsx)(gr,{isLarge:this.props.isLarge,onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,children:(0,c.jsx)(Zi,{imageProps:{src:this.props.src,alt:this.props.alt,aspectRatio:Ki.TWITTER_IMAGE_SIZES.aspectRatio},width:t.width,height:t.height,imageMode:t.mode})})}}wr.propTypes={isLarge:r().bool.isRequired,src:r().string,alt:r().string,onImageClick:r().func,onMouseEnter:r().func,onMouseLeave:r().func},wr.defaultProps={src:"",alt:"",onMouseEnter:o.noop,onImageClick:o.noop,onMouseLeave:o.noop};const xr=a().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; } `,br=e=>(0,c.jsx)(xr,{children:e.children});br.propTypes={children:r().array.isRequired};const vr=br,_r=a().p` white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; color: rgb(15, 20, 25); cursor: pointer; `,kr=a().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: ${Ki.TWITTER_IMAGE_SIZES.landscapeWidth}px ) { display: none; } `,jr=a().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); } `,Tr=a()(jr)` flex-direction: column; max-height: 370px; `,Er=a()(jr)` flex-direction: row; height: 125px; `;class Sr extends y.Component{constructor(e){super(e),this.onImageEnter=this.props.onMouseHover.bind(this,"image"),this.onTitleEnter=this.props.onMouseHover.bind(this,"title"),this.onDescriptionEnter=this.props.onMouseHover.bind(this,"description"),this.onLeave=this.props.onMouseHover.bind(this,""),this.onSelectTitle=this.props.onSelect.bind(this,"title"),this.onSelectDescription=this.props.onSelect.bind(this,"description")}render(){const{isLarge:e,imageUrl:t,imageFallbackUrl:s,alt:i,title:r,description:o,siteUrl:n}=this.props,a=e?Tr:Er;return(0,c.jsxs)(a,{id:"twitterPreview",children:[(0,c.jsx)(wr,{src:t||s,alt:i,isLarge:e,onImageClick:this.props.onImageClick,onMouseEnter:this.onImageEnter,onMouseLeave:this.onLeave}),(0,c.jsxs)(vr,{children:[(0,c.jsx)(hr,{siteUrl:n}),(0,c.jsx)(_r,{onMouseEnter:this.onTitleEnter,onMouseLeave:this.onLeave,onClick:this.onSelectTitle,children:r}),(0,c.jsx)(kr,{onMouseEnter:this.onDescriptionEnter,onMouseLeave:this.onLeave,onClick:this.onSelectDescription,children:o})]})]})}}Sr.propTypes={siteUrl:r().string.isRequired,title:r().string.isRequired,description:r().string,isLarge:r().bool,imageUrl:r().string,imageFallbackUrl:r().string,alt:r().string,onSelect:r().func,onImageClick:r().func,onMouseHover:r().func},Sr.defaultProps={description:"",alt:"",imageUrl:"",imageFallbackUrl:"",onSelect:()=>{},onImageClick:()=>{},onMouseHover:()=>{},isLarge:!0};const Rr=Sr,Cr=window.yoast.replacementVariableEditor;class Ir extends y.Component{constructor(e){super(e),this.state={activeField:"",hoveredField:""},this.SocialPreview="Social"===e.socialMediumName?dr:Rr,this.setHoveredField=this.setHoveredField.bind(this),this.setActiveField=this.setActiveField.bind(this),this.setEditorRef=this.setEditorRef.bind(this),this.setEditorFocus=this.setEditorFocus.bind(this)}setHoveredField(e){e!==this.state.hoveredField&&this.setState({hoveredField:e})}setActiveField(e){e!==this.state.activeField&&this.setState({activeField:e},(()=>this.setEditorFocus(e)))}setEditorFocus(e){switch(e){case"title":this.titleEditorRef.focus();break;case"description":this.descriptionEditorRef.focus()}}setEditorRef(e,t){switch(e){case"title":this.titleEditorRef=t;break;case"description":this.descriptionEditorRef=t}}render(){const{onDescriptionChange:e,onTitleChange:t,onSelectImageClick:s,onRemoveImageClick:i,socialMediumName:r,imageWarnings:o,siteUrl:n,description:a,descriptionInputPlaceholder:l,descriptionPreviewFallback:d,imageUrl:p,imageFallbackUrl:u,alt:h,title:m,titleInputPlaceholder:g,titlePreviewFallback:y,replacementVariables:w,recommendedReplacementVariables:x,applyReplacementVariables:b,onReplacementVariableSearchChange:v,isPremium:_,isLarge:k,socialPreviewLabel:j,idSuffix:T,activeMetaTabId:E}=this.props,S=b({title:m||y,description:a||d});return(0,c.jsxs)(f().Fragment,{children:[j&&(0,c.jsx)(ke.SimulatedLabel,{children:j}),(0,c.jsx)(this.SocialPreview,{onMouseHover:this.setHoveredField,onSelect:this.setActiveField,onImageClick:s,siteUrl:n,title:S.title,description:S.description,imageUrl:p,imageFallbackUrl:u,alt:h,isLarge:k,activeMetaTabId:E}),(0,c.jsx)(Ki.SocialMetadataPreviewForm,{onDescriptionChange:e,socialMediumName:r,title:m,titleInputPlaceholder:g,onRemoveImageClick:i,imageSelected:!!p,imageUrl:p,imageFallbackUrl:u,onTitleChange:t,onSelectImageClick:s,description:a,descriptionInputPlaceholder:l,imageWarnings:o,replacementVariables:w,recommendedReplacementVariables:x,onReplacementVariableSearchChange:v,onMouseHover:this.setHoveredField,hoveredField:this.state.hoveredField,onSelect:this.setActiveField,activeField:this.state.activeField,isPremium:_,setEditorRef:this.setEditorRef,idSuffix:T})]})}}Ir.propTypes={title:r().string.isRequired,onTitleChange:r().func.isRequired,description:r().string.isRequired,onDescriptionChange:r().func.isRequired,imageUrl:r().string.isRequired,imageFallbackUrl:r().string.isRequired,onSelectImageClick:r().func.isRequired,onRemoveImageClick:r().func.isRequired,socialMediumName:r().string.isRequired,alt:r().string,isPremium:r().bool,imageWarnings:r().array,isLarge:r().bool,siteUrl:r().string,descriptionInputPlaceholder:r().string,titleInputPlaceholder:r().string,descriptionPreviewFallback:r().string,titlePreviewFallback:r().string,replacementVariables:Cr.replacementVariablesShape,recommendedReplacementVariables:Cr.recommendedReplacementVariablesShape,applyReplacementVariables:r().func,onReplacementVariableSearchChange:r().func,socialPreviewLabel:r().string,idSuffix:r().string,activeMetaTabId:r().string},Ir.defaultProps={imageWarnings:[],recommendedReplacementVariables:[],replacementVariables:[],isPremium:!1,isLarge:!0,siteUrl:"",descriptionInputPlaceholder:"",titleInputPlaceholder:"",descriptionPreviewFallback:"",titlePreviewFallback:"",alt:"",applyReplacementVariables:e=>e,onReplacementVariableSearchChange:null,socialPreviewLabel:"",idSuffix:"",activeMetaTabId:""};const Lr={},Pr=(e,t,{log:s=console.warn}={})=>{Lr[e]||(Lr[e]=!0,s(t))},Ar=(e,t=o.noop)=>{const s={};for(const i in e)Object.hasOwn(e,i)&&Object.defineProperty(s,i,{set:s=>{e[i]=s,t("set",i,s)},get:()=>(t("get",i),e[i])});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 Fr=a().div` max-width: calc(527px + 1.5rem); `,Mr=e=>{const t="X"===e.socialMediumName?(0,m.__)("X share preview","wordpress-seo"):(0,m.__)("Social share preview","wordpress-seo"),{locationContext:s}=(0,u.useRootContext)();return(0,c.jsx)(u.Root,{children:(0,c.jsx)(Fr,{children:(0,c.jsx)(u.FeatureUpsell,{shouldUpsell:!0,variant:"card",cardLink:(0,hi.addQueryArgs)(wpseoAdminL10n["shortlinks.upsell.social_preview."+e.socialMediumName.toLowerCase()],{context:s}),cardText:(0,m.sprintf)(/* translators: %1$s expands to Yoast SEO Premium. */ (0,m.__)("Unlock with %1$s","wordpress-seo"),"Yoast SEO Premium"),"data-action":"load-nfd-ctb","data-ctb-id":"f6a84663-465f-4cb5-8ba5-f7a6d72224b2",children:(0,c.jsxs)("div",{className:"yst-grayscale yst-opacity-50",children:[(0,c.jsx)(u.Label,{children:t}),(0,c.jsx)(dr,{title:"",description:"",siteUrl:"",imageUrl:"",imageFallbackUrl:"",alt:"",onSelect:o.noop,onImageClick:o.noop,onMouseHover:o.noop})]})})})})};Mr.propTypes={socialMediumName:r().oneOf(["Social","Twitter","X"]).isRequired};const Nr=Mr;class qr extends e.Component{constructor(e){super(e),this.state={activeField:"",hoveredField:""},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:t,onTitleChange:s,onSelectImageClick:i,onRemoveImageClick:r,socialMediumName:o,imageWarnings:n,description:a,descriptionInputPlaceholder:l,imageUrl:d,imageFallbackUrl:p,alt:u,title:h,titleInputPlaceholder:m,replacementVariables:g,recommendedReplacementVariables:y,onReplacementVariableSearchChange:f,isPremium:w,location:x}=this.props;return(0,c.jsxs)(e.Fragment,{children:[(0,c.jsx)(Nr,{socialMediumName:o}),(0,c.jsx)(Ki.SocialMetadataPreviewForm,{onDescriptionChange:t,socialMediumName:o,title:h,titleInputPlaceholder:m,onRemoveImageClick:r,imageSelected:!!d,imageUrl:d,imageFallbackUrl:p,imageAltText:u,onTitleChange:s,onSelectImageClick:i,description:a,descriptionInputPlaceholder:l,imageWarnings:n,replacementVariables:g,recommendedReplacementVariables:y,onReplacementVariableSearchChange:f,onMouseHover:this.setHoveredField,hoveredField:this.state.hoveredField,onSelect:this.setActiveField,activeField:this.state.activeField,isPremium:w,setEditorRef:this.setEditorRef,idSuffix:x})]})}}qr.propTypes={title:r().string.isRequired,onTitleChange:r().func.isRequired,description:r().string.isRequired,onDescriptionChange:r().func.isRequired,imageUrl:r().string.isRequired,imageFallbackUrl:r().string,onSelectImageClick:r().func.isRequired,onRemoveImageClick:r().func.isRequired,socialMediumName:r().string.isRequired,isPremium:r().bool,imageWarnings:r().array,descriptionInputPlaceholder:r().string,titleInputPlaceholder:r().string,replacementVariables:Cr.replacementVariablesShape,recommendedReplacementVariables:Cr.recommendedReplacementVariablesShape,onReplacementVariableSearchChange:r().func,location:r().string,alt:r().string},qr.defaultProps={imageWarnings:[],imageFallbackUrl:"",recommendedReplacementVariables:[],replacementVariables:[],isPremium:!1,descriptionInputPlaceholder:"",titleInputPlaceholder:"",onReplacementVariableSearchChange:null,location:"",alt:""};const Or=qr,Dr=(t,s,i)=>{const[r,o]=(0,e.useState)(!1),n=(0,m.sprintf)( /* Translators: %1$s expands to the jpg format, %2$s expands to the png format, %3$s expands to the webp format, %4$s expands to the gif format. */ (0,m.__)("No image was found that we can automatically set as your social image. Please use %1$s, %2$s, %3$s or %4$s formats to ensure it displays correctly on social media.","wordpress-seo"),"JPG","PNG","WEBP","GIF");return(0,e.useEffect)((()=>{o(""===s&&t.toLowerCase().endsWith(".avif"))}),[t,s]),r?[n]:i},$r=s=>{const[i,r]=(0,e.useState)(""),o=Dr(s.imageFallbackUrl,s.imageUrl,s.imageWarnings),n=(0,e.useCallback)((e=>{r(e.detail.metaTabId)}),[r]);(0,e.useEffect)((()=>(setTimeout(s.onLoad),window.addEventListener("YoastSEO:metaTabChange",n),()=>{window.removeEventListener("YoastSEO:metaTabChange",n)})),[]);const a={...s,activeMetaTabId:i,imageWarnings:o};return s.isPremium?(0,c.jsx)(t.Slot,{name:`YoastFacebookPremium${s.location.charAt(0).toUpperCase()+s.location.slice(1)}`,fillProps:a}):(0,c.jsx)(Or,{...a})};$r.propTypes={isPremium:r().bool.isRequired,onLoad:r().func.isRequired,location:r().string.isRequired,imageFallbackUrl:r().string,imageUrl:r().string,imageWarnings:r().array},$r.defaultProps={imageFallbackUrl:"",imageUrl:"",imageWarnings:[]};const Ur=$r;function Wr(e){(function(e){const t=window.wp.media();return t.on("select",(()=>{const s=t.state().get("selection").first();var i;e({type:(i=s.attributes).subtype,width:i.width,height:i.height,url:i.url,id:i.id,sizes:i.sizes,alt:i.alt||i.title||i.name})})),t})(e).open()}const Br=()=>{Wr((e=>(0,h.dispatch)("yoast-seo/editor").setFacebookPreviewImage((e=>{const{width:t,height:s}=e,i=(0,Ki.determineFacebookImageMode)({width:t,height:s}),r=Ki.FACEBOOK_IMAGE_SIZES[i+"Width"],o=Ki.FACEBOOK_IMAGE_SIZES[i+"Height"],n=Object.values(e.sizes).find((e=>e.width>=r&&e.height>=o));return{url:n?n.url:e.url,id:e.id,warnings:(0,Ne.validateFacebookImage)(e),alt:e.alt||""}})(e))))},Hr=(0,Pe.compose)([(0,h.withSelect)((e=>{const{getFacebookDescription:t,getDescription:s,getFacebookTitle:i,getSeoTitle:r,getFacebookImageUrl:o,getImageFallback:n,getFacebookWarnings:a,getRecommendedReplaceVars:l,getReplaceVars:c,getSiteUrl:d,getSeoTitleTemplate:p,getSeoTitleTemplateNoFallback:u,getSocialTitleTemplate:h,getSeoDescriptionTemplate:m,getSocialDescriptionTemplate:g,getReplacedExcerpt:y,getFacebookAltText:f}=e("yoast-seo/editor");return{imageUrl:o(),imageFallbackUrl:n(),recommendedReplacementVariables:l(),replacementVariables:c(),description:t(),descriptionPreviewFallback:g()||s()||m()||y()||"",title:i(),titlePreviewFallback:h()||r()||u()||p()||"",imageWarnings:a(),siteUrl:d(),isPremium:!!vi().isPremium,titleInputPlaceholder:"",descriptionInputPlaceholder:"",socialMediumName:"Social",alt:f()}})),(0,h.withDispatch)(((e,t,{select:s})=>{const{setFacebookPreviewTitle:i,setFacebookPreviewDescription:r,clearFacebookPreviewImage:o,loadFacebookPreviewData:n,findCustomFields:a}=e("yoast-seo/editor"),l=s("yoast-seo/editor").getPostId();return{onSelectImageClick:Br,onRemoveImageClick:o,onDescriptionChange:r,onTitleChange:i,onLoad:n,onReplacementVariableSearchChange:Qs(l,a)}})),Ds()])(Ur),Kr=s=>{const i=Dr(s.imageFallbackUrl,s.imageUrl,s.imageWarnings);(0,e.useEffect)((()=>{setTimeout(s.onLoad)}),[]);const r={...s,imageWarnings:i};return s.isPremium?(0,c.jsx)(t.Slot,{name:`YoastTwitterPremium${s.location.charAt(0).toUpperCase()+s.location.slice(1)}`,fillProps:r}):(0,c.jsx)(Or,{...r})};Kr.propTypes={isPremium:r().bool.isRequired,onLoad:r().func.isRequired,location:r().string.isRequired,imageFallbackUrl:r().string,imageUrl:r().string,imageWarnings:r().array},Kr.defaultProps={imageFallbackUrl:"",imageUrl:"",imageWarnings:[]};const zr=Kr,Yr=()=>{Wr((e=>(0,h.dispatch)("yoast-seo/editor").setTwitterPreviewImage((e=>{const t="summary"!==(0,o.get)(window,"wpseoScriptData.metabox.twitterCardType")?"landscape":"square",s=Ki.TWITTER_IMAGE_SIZES[t+"Width"],i=Ki.TWITTER_IMAGE_SIZES[t+"Height"],r=Object.values(e.sizes).find((e=>e.width>=s&&e.height>=i));return{url:r?r.url:e.url,id:e.id,warnings:(0,Ne.validateTwitterImage)(e),alt:e.alt||""}})(e))))},Vr=(0,Pe.compose)([(0,h.withSelect)((e=>{const{getTwitterDescription:t,getTwitterTitle:s,getTwitterImageUrl:i,getFacebookImageUrl:r,getFacebookTitle:o,getFacebookDescription:n,getDescription:a,getSeoTitle:l,getTwitterWarnings:c,getTwitterImageType:d,getImageFallback:p,getRecommendedReplaceVars:u,getReplaceVars:h,getSiteUrl:m,getSeoTitleTemplate:g,getSeoTitleTemplateNoFallback:y,getSocialTitleTemplate:f,getSeoDescriptionTemplate:w,getSocialDescriptionTemplate:x,getReplacedExcerpt:b,getTwitterAltText:v}=e("yoast-seo/editor");return{imageUrl:i(),imageFallbackUrl:r()||p(),recommendedReplacementVariables:u(),replacementVariables:h(),description:t(),descriptionPreviewFallback:x()||n()||a()||w()||b()||"",title:s(),titlePreviewFallback:f()||o()||l()||y()||g()||"",imageWarnings:c(),siteUrl:m(),isPremium:!!vi().isPremium,isLarge:"summary"!==d(),titleInputPlaceholder:"",descriptionInputPlaceholder:"",socialMediumName:"X",alt:v()}})),(0,h.withDispatch)(((e,t,{select:s})=>{const{setTwitterPreviewTitle:i,setTwitterPreviewDescription:r,clearTwitterPreviewImage:o,loadTwitterPreviewData:n,findCustomFields:a}=e("yoast-seo/editor"),l=s("yoast-seo/editor").getPostId();return{onSelectImageClick:Yr,onRemoveImageClick:o,onDescriptionChange:r,onTitleChange:i,onLoad:n,onReplacementVariableSearchChange:Qs(l,a)}})),Ds()])(zr),Zr=a().legend` margin: 16px 0; padding: 0; color: ${je.colors.$color_headings}; font-size: 12px; font-weight: 300; `,Gr=a().legend` margin: 0 0 16px; padding: 0; color: ${je.colors.$color_headings}; font-size: 12px; font-weight: 300; `,Xr=a().div` padding: 16px; `,Qr=({useOpenGraphData:t,useTwitterData:s})=>(0,c.jsxs)(e.Fragment,{children:[s&&t&&(0,c.jsxs)(e.Fragment,{children:[(0,c.jsxs)(ni,{hasSeparator:!1 /* translators: Social media appearance refers to a preview of how a page will be represented on social media. */,title:(0,m.__)("Social media appearance","wordpress-seo"),initialIsOpen:!0,children:[(0,c.jsx)(Gr,{children:(0,m.__)("Determine how your post should look on social media like Facebook, X, Instagram, WhatsApp, Threads, LinkedIn, Slack, and more.","wordpress-seo")}),(0,c.jsx)(Hr,{}),(0,c.jsx)(Zr,{children:(0,m.__)("To customize the appearance of your post specifically for X, please fill out the 'X appearance' settings below. If you leave these settings untouched, the 'Social media appearance' settings mentioned above will also be applied for sharing on X.","wordpress-seo")})]}),(0,c.jsx)(ni,{title:(0,m.__)("X appearance","wordpress-seo"),hasSeparator:!0,initialIsOpen:!1,children:(0,c.jsx)(Vr,{})})]}),t&&!s&&(0,c.jsxs)(Xr,{children:[(0,c.jsx)(Gr,{children:(0,m.__)("Determine how your post should look on social media like Facebook, X, Instagram, WhatsApp, Threads, LinkedIn, Slack, and more.","wordpress-seo")}),(0,c.jsx)(Hr,{})]}),!t&&s&&(0,c.jsxs)(Xr,{children:[(0,c.jsx)(Gr,{children:(0,m.__)("To customize the appearance of your post specifically for X, please fill out the 'X appearance' settings below.","wordpress-seo")}),(0,c.jsx)(Vr,{})]})]});Qr.propTypes={useOpenGraphData:r().bool.isRequired,useTwitterData:r().bool.isRequired};const Jr=Qr,eo=(0,h.withSelect)((e=>{const{getPreferences:t}=e("yoast-seo/editor"),{useOpenGraphData:s,useTwitterData:i}=t();return{useOpenGraphData:s,useTwitterData:i}}))(Jr);function to({target:e}){return(0,c.jsx)(Se,{target:e,children:(0,c.jsx)(eo,{})})}to.propTypes={target:r().string.isRequired};const so=(0,Ne.makeOutboundLink)(),io=a().div` padding: 16px; `,ro="yoast-seo/editor";function oo({location:e,show:t}){return t?(0,c.jsxs)(ke.Alert,{type:"info",children:[(0,m.sprintf)(/* translators: %s Expands to "Yoast News SEO" */ (0,m.__)("Are you working on a news article? %s helps you optimize your site for Google News.","wordpress-seo"),"Yoast News SEO")+" ",(0,c.jsx)(so,{href:window.wpseoAdminL10n[`shortlinks.upsell.${e}.news`],children:(0,m.sprintf)(/* translators: %s: Expands to "Yoast News SEO". */ (0,m.__)("Buy %s now!","wordpress-seo"),"Yoast News SEO")})]}):null}oo.propTypes={show:r().bool.isRequired,location:r().string.isRequired};const no=(e,t,s)=>{const i=(0,h.useSelect)((e=>e(ro).getIsProduct()),[]),r=(0,h.useSelect)((e=>e(ro).getIsWooSeoActive()),[]),o=i&&r?{name:(0,m.__)("Item Page","wordpress-seo"),value:"ItemPage"}:e.find((e=>e.value===t));return[{name:(0,m.sprintf)(/* translators: %1$s expands to the plural name of the current post type, %2$s expands to the current site wide default. */ (0,m.__)("Default for %1$s (%2$s)","wordpress-seo"),s,o?o.name:""),value:""},...e]},ao=e=>(0,m.sprintf)(/* translators: %1$s expands to the plural name of the current post type, %2$s and %3$s expand to a link to the Settings page */ (0,m.__)("You can change the default type for %1$s under Content types in the %2$sSettings%3$s.","wordpress-seo"),e,"{{link}}","{{/link}}");r().string.isRequired,r().string.isRequired,r().string.isRequired;const lo=t=>{const s=no(t.pageTypeOptions,t.defaultPageType,t.postTypeName),i=no(t.articleTypeOptions,t.defaultArticleType,t.postTypeName),r=(0,h.useSelect)((e=>e(ro).selectLink("https://yoa.st/product-schema-metabox")),[]),o=(0,h.useSelect)((e=>e(ro).getIsWooSeoUpsell()),[]),[n,a]=(0,e.useState)(t.schemaArticleTypeSelected),l=(0,m.__)("Want your products stand out in search results with rich results like price, reviews and more?","wordpress-seo"),d=(0,h.useSelect)((e=>e(ro).getIsProduct()),[]),p=(0,h.useSelect)((e=>e(ro).getIsWooSeoActive()),[]),u=(0,h.useSelect)((e=>e(ro).selectAdminLink("?page=wpseo_page_settings")),[]),g=d&&p,y=(0,e.useCallback)(((e,t)=>{a(t)}),[n]);return(0,e.useEffect)((()=>{y(null,t.schemaArticleTypeSelected)}),[t.schemaArticleTypeSelected]),(0,c.jsxs)(e.Fragment,{children:[(0,c.jsx)(ke.FieldGroup,{label:(0,m.__)("What type of page or content is this?","wordpress-seo"),linkTo:t.additionalHelpTextLink /* translators: Hidden accessibility text. */,linkText:(0,m.__)("Learn more about page or content types","wordpress-seo")}),o&&(0,c.jsx)(ei,{link:r,text:l}),(0,c.jsx)(ke.Select,{id:(0,Ne.join)(["yoast-schema-page-type",t.location]),options:s,label:(0,m.__)("Page type","wordpress-seo"),onChange:t.schemaPageTypeChange,selected:g?"ItemPage":t.schemaPageTypeSelected,disabled:g}),t.showArticleTypeInput&&(0,c.jsx)(ke.Select,{id:(0,Ne.join)(["yoast-schema-article-type",t.location]),options:i,label:(0,m.__)("Article type","wordpress-seo"),onChange:t.schemaArticleTypeChange,selected:t.schemaArticleTypeSelected,onOptionFocus:y}),(0,c.jsx)(oo,{location:t.location,show:!t.isNewsEnabled&&(x=n,b=t.defaultArticleType,"NewsArticle"===x||""===x&&"NewsArticle"===b)}),t.displayFooter&&!g&&(0,c.jsx)("p",{children:(f=t.postTypeName,w=u,(0,Ve.Z)({mixedString:ao(f),components:{link:(0,c.jsx)("a",{href:w,target:"_blank",rel:"noreferrer"})}}))}),g&&(0,c.jsx)("p",{children:(0,m.sprintf)(/* translators: %1$s expands to Yoast WooCommerce SEO. */ (0,m.__)("You have %1$s activated on your site, automatically setting the Page type for your products to 'Item Page'. As a result, the Page type selection is disabled.","wordpress-seo"),"Yoast WooCommerce SEO")})]});var f,w,x,b},co=r().arrayOf(r().shape({name:r().string,value:r().string}));lo.propTypes={schemaPageTypeChange:r().func,schemaPageTypeSelected:r().string,pageTypeOptions:co.isRequired,schemaArticleTypeChange:r().func,schemaArticleTypeSelected:r().string,articleTypeOptions:co.isRequired,showArticleTypeInput:r().bool.isRequired,additionalHelpTextLink:r().string.isRequired,helpTextLink:r().string.isRequired,helpTextTitle:r().string.isRequired,helpTextDescription:r().string.isRequired,postTypeName:r().string.isRequired,displayFooter:r().bool,defaultPageType:r().string.isRequired,defaultArticleType:r().string.isRequired,location:r().string.isRequired,isNewsEnabled:r().bool},lo.defaultProps={schemaPageTypeChange:()=>{},schemaPageTypeSelected:null,schemaArticleTypeChange:()=>{},schemaArticleTypeSelected:null,displayFooter:!1,isNewsEnabled:!1};const po=t=>t.isMetabox?(0,e.createPortal)((0,c.jsx)(io,{children:(0,c.jsx)(lo,{...t})}),document.getElementById("wpseo-meta-section-schema")):(0,c.jsx)(lo,{...t});po.propTypes={showArticleTypeInput:r().bool,articleTypeLabel:r().string,additionalHelpTextLink:r().string,pageTypeLabel:r().string.isRequired,helpTextLink:r().string.isRequired,helpTextTitle:r().string.isRequired,helpTextDescription:r().string.isRequired,isMetabox:r().bool.isRequired,postTypeName:r().string.isRequired,displayFooter:r().bool,loadSchemaArticleData:r().func.isRequired,loadSchemaPageData:r().func.isRequired,location:r().string.isRequired},po.defaultProps={showArticleTypeInput:!1,articleTypeLabel:"",additionalHelpTextLink:"",displayFooter:!1};const uo=po;class ho{static get articleTypeInput(){return document.getElementById("yoast_wpseo_schema_article_type")}static get defaultArticleType(){return ho.articleTypeInput.getAttribute("data-default")}static get articleType(){return ho.articleTypeInput.value}static set articleType(e){ho.articleTypeInput.value=e}static get pageTypeInput(){return document.getElementById("yoast_wpseo_schema_page_type")}static get defaultPageType(){return ho.pageTypeInput.getAttribute("data-default")}static get pageType(){return ho.pageTypeInput.value}static set pageType(e){ho.pageTypeInput.value=e}}const mo=t=>{const s=null!==ho.articleTypeInput;(0,e.useEffect)((()=>{t.loadSchemaPageData(),s&&t.loadSchemaArticleData()}),[]);const{pageTypeOptions:i,articleTypeOptions:r}=window.wpseoScriptData.metabox.schema,o={articleTypeLabel:(0,m.__)("Article type","wordpress-seo"),pageTypeLabel:(0,m.__)("Page type","wordpress-seo"),postTypeName:window.wpseoAdminL10n.postTypeNamePlural,helpTextTitle:(0,m.__)("Yoast SEO automatically describes your pages using schema.org","wordpress-seo"),helpTextDescription:(0,m.__)("This helps search engines understand your website and your content. You can change some of your settings for this page below.","wordpress-seo"),showArticleTypeInput:s,pageTypeOptions:i,articleTypeOptions:r},n={...t,...o,...(a=t.location,"metabox"===a?{helpTextLink:wpseoAdminL10n["shortlinks.metabox.schema.explanation"],additionalHelpTextLink:wpseoAdminL10n["shortlinks.metabox.schema.page_type"],isMetabox:!0}:{helpTextLink:wpseoAdminL10n["shortlinks.sidebar.schema.explanation"],additionalHelpTextLink:wpseoAdminL10n["shortlinks.sidebar.schema.page_type"],isMetabox:!1})};var a;return(0,c.jsx)(uo,{...n})};mo.propTypes={displayFooter:r().bool.isRequired,schemaPageTypeSelected:r().string.isRequired,schemaArticleTypeSelected:r().string.isRequired,defaultArticleType:r().string.isRequired,defaultPageType:r().string.isRequired,loadSchemaPageData:r().func.isRequired,loadSchemaArticleData:r().func.isRequired,schemaPageTypeChange:r().func.isRequired,schemaArticleTypeChange:r().func.isRequired,location:r().string.isRequired};const go=(0,Pe.compose)([(0,h.withSelect)((e=>{const{getPreferences:t,getPageType:s,getDefaultPageType:i,getArticleType:r,getDefaultArticleType:o}=e("yoast-seo/editor"),{displaySchemaSettingsFooter:n,isNewsEnabled:a}=t();return{displayFooter:n,isNewsEnabled:a,schemaPageTypeSelected:s(),schemaArticleTypeSelected:r(),defaultArticleType:o(),defaultPageType:i()}})),(0,h.withDispatch)((e=>{const{setPageType:t,setArticleType:s,getSchemaPageData:i,getSchemaArticleData:r}=e("yoast-seo/editor");return{loadSchemaPageData:i,loadSchemaArticleData:r,schemaPageTypeChange:t,schemaArticleTypeChange:s}})),Ds()])(mo),yo=window.yoast.relatedKeyphraseSuggestions;function fo(e){const{requestLimitReached:t,isSuccess:s,response:i,requestHasData:r,relatedKeyphrases:n}=e;return t?"requestLimitReached":!s&&function(e){return"invalid_json"===(null==e?void 0:e.code)||"fetch_error"===(null==e?void 0:e.code)||!(0,o.isEmpty)(e)&&"error"in e}(i)?"requestFailed":r?function(e){return e&&e.length>=4}(n)?"maxRelatedKeyphrases":null:"requestEmpty"}function wo(t){var s,i;const{keyphrase:r="",relatedKeyphrases:o=[],renderAction:n=null,requestLimitReached:a=!1,countryCode:l="us",setCountry:d,newRequest:p,response:h={},isRtl:m=!1,userLocale:g="en_US",isPending:y=!1,isPremium:f=!1,semrushUpsellLink:w="",premiumUpsellLink:x=""}=t,[b,v]=(0,e.useState)(l),_=(0,e.useCallback)((async()=>{p(l,r),v(l)}),[l,r,p]);return(0,c.jsxs)(u.Root,{context:{isRtl:m},children:[!a&&!f&&(0,c.jsx)(yo.PremiumUpsell,{url:x,className:"yst-mb-4"}),!a&&(0,c.jsx)(yo.CountrySelector,{countryCode:l,activeCountryCode:b,onChange:d,onClick:_,className:"yst-mb-4",userLocale:g.split("_")[0]}),!y&&(0,c.jsx)(yo.UserMessage,{variant:fo(t),upsellLink:w}),(0,c.jsx)(yo.KeyphrasesTable,{relatedKeyphrases:o,columnNames:null==h||null===(s=h.results)||void 0===s?void 0:s.columnNames,data:null==h||null===(i=h.results)||void 0===i?void 0:i.rows,isPending:y,renderButton:n,className:"yst-mt-4"})]})}wo.propTypes={keyphrase:r().string,relatedKeyphrases:r().array,renderAction:r().func,requestLimitReached:r().bool,countryCode:r().string.isRequired,setCountry:r().func.isRequired,newRequest:r().func.isRequired,response:r().object,isRtl:r().bool,userLocale:r().string,isPending:r().bool,isPremium:r().bool,semrushUpsellLink:r().string,premiumUpsellLink:r().string};const xo=(0,Pe.compose)([(0,h.withSelect)((e=>{const{getFocusKeyphrase:t,getSEMrushSelectedCountry:s,getSEMrushRequestLimitReached:i,getSEMrushRequestResponse:r,getSEMrushRequestIsSuccess:o,getSEMrushIsRequestPending:n,getSEMrushRequestHasData:a,getSEMrushRequestKeyphrase:l,getPreference:c,getIsPremium:d,selectLinkParams:p}=e("yoast-seo/editor");return{keyphrase:t(),countryCode:s(),requestLimitReached:i(),response:r(),isSuccess:o(),isPending:n(),requestHasData:a(),lastRequestKeyphrase:l(),isRtl:c("isRtl",!1),userLocale:c("userLocale","en_US"),isPremium:d(),semrushUpsellLink:(0,hi.addQueryArgs)("https://yoa.st/semrush-prices",p()),premiumUpsellLink:(0,hi.addQueryArgs)("https://yoa.st/413",p())}})),(0,h.withDispatch)((e=>{const{setSEMrushChangeCountry:t,setSEMrushNewRequest:s}=e("yoast-seo/editor");return{setCountry:e=>{t(e)},newRequest:(e,t)=>{s(e,t)}}}))])(wo),bo=({isOpen:e,closeModal:t,id:s,upsellLink:i})=>{const{locationContext:r}=(0,l.useRootContext)(),o=(0,hi.addQueryArgs)(wpseoAdminL10n[i],{context:r}),n=[g((0,m.sprintf)(/* translators: %1$s and %2$s are opening and closing span tags. */ (0,m.__)("%1$sKeyphrase distribution:%2$s See if your keywords are spread evenly so search engines understand your topic","wordpress-seo"),"<span>","</span>"),{span:(0,c.jsx)("span",{className:"yst-font-semibold"})}),g((0,m.sprintf)(/* translators: %1$s and %2$s are opening and closing span tags. */ (0,m.__)("%1$sTitle check:%2$s Instantly spot missing titles and fix them for better click-through rates","wordpress-seo"),"<span>","</span>"),{span:(0,c.jsx)("span",{className:"yst-font-semibold"})}),g((0,m.sprintf)(/* translators: %1$s and %2$s are opening and closing span tags. */ (0,m.__)("%1$sSynonyms:%2$s Include synonyms of your keyphrase for a more natural flow and smarter suggestions","wordpress-seo"),"<span>","</span>"),{span:(0,c.jsx)("span",{className:"yst-font-semibold"})})];return(0,c.jsx)(Ii,{isOpen:e,onClose:t,id:s,title:(0,m.__)("Get deeper keyphrase insights and stronger headlines","wordpress-seo"),upsellLink:o,benefits:n,note:(0,m.__)("Upgrade to optimize with precision","wordpress-seo"),ctbId:"f6a84663-465f-4cb5-8ba5-f7a6d72224b2",modalTitle:(0,m.sprintf)(/* translators: %1$s is for Premium SEO analysis. */ (0,m.__)("Unlock %1$s","wordpress-seo"),"Premium SEO analysis")})};bo.propTypes={isOpen:r().bool.isRequired,closeModal:r().func.isRequired,id:r().string.isRequired,upsellLink:r().string.isRequired};const vo=({location:t="sidebar"})=>{const s=(0,u.useSvgAria)(),[i,,,r,o]=(0,u.useToggleState)(!1),n=`shortlinks.upsell.${t}.premium_seo_analysis_button`;return(0,c.jsxs)(e.Fragment,{children:[(0,c.jsx)(bo,{isOpen:i,closeModal:o,id:"yoast-premium-seo-analysis-modal",upsellLink:n}),"sidebar"===t&&(0,c.jsx)(Ke,{id:"yoast-premium-seo-analysis-modal-open-button",title:(0,m.__)("Premium SEO analysis","wordpress-seo"),prefixIcon:{icon:"seo-score-none",color:je.colors.$color_grey},onClick:r,children:(0,c.jsx)("div",{className:"yst-root",children:(0,c.jsx)(u.Badge,{size:"small",variant:"upsell",children:(0,c.jsx)(Ei,{className:"yst-w-2.5 yst-h-2.5 yst-shrink-0",...s})})})}),"metabox"===t&&(0,c.jsx)("div",{className:"yst-root",children:(0,c.jsxs)(Me,{id:"yoast-premium-seo-analysis-metabox-modal-open-button",onClick:r,children:[(0,c.jsx)(ke.SvgIcon,{icon:"seo-score-none",color:je.colors.$color_grey}),(0,c.jsx)(Me.Text,{children:(0,m.__)("Premium SEO analysis","wordpress-seo")}),(0,c.jsxs)(u.Badge,{size:"small",variant:"upsell",children:[(0,c.jsx)(Ei,{className:"yst-w-2.5 yst-h-2.5 yst-me-1 yst-shrink-0",...s}),(0,c.jsx)("span",{children:"Premium"})]})]})})]})};vo.propTypes={location:r().string};const _o=vo,ko=({isOpen:e,closeModal:t,id:s,upsellLink:i})=>(0,c.jsx)(Ii,{isOpen:e,onClose:t,id:s,upsellLink:i,title:(0,m.__)("Cover more search intent with related keyphrases","wordpress-seo"),description:(0,m.__)("Optimize for up to 5 keyphrases to shape your content around different themes, audiences, and angles - helping it get discovered by a wider audience.","wordpress-seo"),note:(0,m.__)("Fine-tune your content for every audience","wordpress-seo"),modalTitle:(0,m.__)("Target multiple keyphrases","wordpress-seo"),ctbId:"f6a84663-465f-4cb5-8ba5-f7a6d72224b2"}),jo=()=>{const[t,,,s,i]=(0,u.useToggleState)(!1),r=(0,e.useContext)(l.LocationContext),{locationContext:o}=(0,l.useRootContext)(),n=(0,u.useSvgAria)(),a=wpseoAdminL10n["sidebar"===r.toLowerCase()?"shortlinks.upsell.sidebar.additional_button":"shortlinks.upsell.metabox.additional_button"];return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(ko,{isOpen:t,closeModal:i,upsellLink:(0,hi.addQueryArgs)(a,{context:o}),id:`yoast-additional-keyphrases-modal-${r}`}),"sidebar"===r&&(0,c.jsx)(Ke,{id:"yoast-additional-keyphrase-modal-open-button",title:(0,m.__)("Add related keyphrase","wordpress-seo"),prefixIcon:{icon:"plus",color:je.colors.$color_grey_medium_dark},onClick:s,children:(0,c.jsx)("div",{className:"yst-root",children:(0,c.jsx)(u.Badge,{size:"small",variant:"upsell",children:(0,c.jsx)(Ei,{className:"yst-w-2.5 yst-h-2.5 yst-shrink-0",...n})})})}),"metabox"===r&&(0,c.jsx)("div",{className:"yst-root",children:(0,c.jsxs)(Me,{id:"yoast-additional-keyphrase-metabox-modal-open-button",onClick:s,children:[(0,c.jsx)(ke.SvgIcon,{icon:"plus",color:je.colors.$color_grey_medium_dark}),(0,c.jsx)(Me.Text,{children:(0,m.__)("Add related keyphrase","wordpress-seo")}),(0,c.jsxs)(u.Badge,{size:"small",variant:"upsell",children:[(0,c.jsx)(Ei,{className:"yst-w-2.5 yst-h-2.5 yst-me-1 yst-shrink-0",...n}),(0,c.jsx)("span",{children:"Premium"})]})]})})]})};var To,Eo,So,Ro,Co,Io,Lo,Po,Ao,Fo,Mo,No,qo,Oo,Do,$o,Uo,Wo,Bo,Ho,Ko,zo,Yo,Vo,Zo,Go,Xo,Qo,Jo,en,tn,sn,rn,on,nn,an,ln,cn,dn,pn,un,hn,mn,gn,yn,fn,wn;function xn(){return xn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},xn.apply(this,arguments)}const bn=e=>y.createElement("svg",xn({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 448 360"},e),To||(To=y.createElement("circle",{cx:226,cy:211,r:149,fill:"#f0ecf0"})),Eo||(Eo=y.createElement("path",{fill:"#fbd2a6",d:"M173.53 189.38s-35.47-5.3-41.78-11c-9.39-24.93-29.61-48-35.47-66.21-.71-2.24 3.72-11.39 3.53-15.41s-5.34-11.64-5.23-14-.09-15.27-.09-15.27l-4.75-.72s-5.13 6.07-3.56 9.87c-1.73-4.19 4.3 7.93.5 9.35 0 0-6-5.94-11.76-8.27s-19.57-3.65-19.57-3.65L43.19 73l-4.42.6L31 69.7l-2.85 5.12 7.53 5.29L40.86 92l17.19 10.2 10.2 10.56 9.86 3.56s26.49 79.67 45 92c17 11.33 37.23 15.92 37.23 15.92z"})),So||(So=y.createElement("path",{fill:"#a4286a",d:"M270.52 345.13c2.76-14.59 15.94-35.73 30.24-54.58 16.22-21.39 14-79.66-33.19-91.46-17.3-4.32-52.25-1-59.85-3.41C186.54 189 170 187 168 190.17c-5 10.51-7.73 27.81-5.51 36.26 1.18 4.73 3.54 5.91 20.49 13.4-5.12 15-16.35 26.3-22.86 37s7.88 27.2 7.1 33.51c-.48 3.8-4.26 21.13-7.18 34.25a149.47 149.47 0 0 0 110.3 8.66 25.66 25.66 0 0 1 .18-8.12z"})),Ro||(Ro=y.createElement("path",{fill:"#9a5815",d:"M206.76 66.43c-5 14.4-1.42 25.67-3.93 40.74-10 60.34-24.08 43.92-31.44 93.6 7.24-14.19 14.32-15.82 20.63-23.11-.83 3.09-10.25 13.75-8.05 34.81 9.85-8.51 6.35-8.75 11.86-8.54.36 3.25 3.53 3.22-3.59 10.53 2.52.69 17.42-14.32 20.16-12.66s0 5.72-6 7.76c2.15 2.2 30.47-3.87 43.81-14.71 4.93-4 10-13.16 13.38-18.2 7.17-10.62 12.38-24.77 17.71-36.6 8.94-19.87 15.09-39.34 16.11-61.31.53-10.44-3.41-18.44-4.41-28.86-2.57-27.8-67.63-37.26-86.24 16.55z"})),Co||(Co=y.createElement("path",{fill:"#efb17c",d:"M277.74 179.06c.62-.79 1.24-1.59 1.84-2.39-.85 2.59-1.52 3.73-1.84 2.39z"})),Io||(Io=y.createElement("path",{fill:"#fbd2a6",d:"M216.1 206.72c3.69-5.42 8.28-3.35 15.57-8.28 3.76-3.06 1.57-9.46 1.77-11.82 18.25 4.56 37.38-1.18 49.07-16 .62 5.16-2.77 22.27-.2 27 4.73 8.67 13.4 18.92 13.4 18.92-35.47-2.76-63.45 39-89.86 44.54 5.52-28.74-2.36-35.84 10.25-54.36z"})),Lo||(Lo=y.createElement("path",{fill:"#f6b488",d:"m235.21 167.9 53.21-25.23s-3.65 24-6.5 32.72c-64.05 62.66-46.47-7.33-46.71-7.49z"})),Po||(Po=y.createElement("path",{fill:"#fbd2a6",d:"M226.86 50.64C215 59.31 206.37 93.21 204 95.57c-19.46 19.47-3.59 41.39-3.94 51.24-.2 5.52-4.14 25.42 5.72 29.36 22.22 8.89 60-3.48 67.19-12.61 13.28-16.75 40.89-94.78 17.74-108.19-7.92-4.58-42.78-20.18-63.85-4.73z"})),Ao||(Ao=y.createElement("path",{fill:"#e5766c",d:"M243.69 143.66c-10.7-6.16-8.56-6.73-19.76-12.71-3.86-2.07-3.94.64-6.32 0-2.91-.79-1.39-2.74-5.37-3.48-6.52-1.21-3.67 3.63-3.15 6 1.32 6.15-8.17 17.3 3.26 21.42 12.65 4.55 21.38-9.41 31.34-11.23z"})),Fo||(Fo=y.createElement("path",{fill:"#fff",d:"M240.68 143.9c-11.49-5.53-11.65-8.17-24.64-11.69-8.6-2.32-5.53 1-5.69 4.42-.2 4.16-1.26 9.87 4.9 12.66 9 4.09 18.16-6.02 25.43-5.39zm.7-40.9c-.16 1.26-.06 4.9 5.46 8.25 11.43-4.73 16.36-2.56 17-3.33 1.48-1.76-2-8.87-7.88-9.85-5.58-.94-14.14 1.24-14.58 4.93z"})),Mo||(Mo=y.createElement("path",{fill:"#000001",d:"M263.53 108.19c-4.32-4.33-6.85-6.24-12.26-8.21-2.77-1-6.18.18-8.65 1.67a3.65 3.65 0 0 0-1.24 1.23h-.12a3.73 3.73 0 0 1 1-1.52 12.53 12.53 0 0 1 11.93-3c4.73 1 9.43 4.63 9.42 9.82z"})),No||(No=y.createElement("circle",{cx:254.13,cy:104.05,r:4.19,fill:"#000001"})),qo||(qo=y.createElement("path",{fill:"#fff",d:"M225.26 99.22c-.29 1-6.6 3.45-10.92 1.48-1.15-3.24-5-6.43-5.25-6.71-.5-2.86 5.55-8 10.06-6.3a10.21 10.21 0 0 1 6.11 11.53z"})),Oo||(Oo=y.createElement("path",{fill:"#000001",d:"M209.29 94.21c-.19-2.34 1.84-4.1 3.65-5.2 7-3.87 13.18 3 12.43 10h-.12c-.14-4-2.38-8.44-6.47-9.11a3.19 3.19 0 0 0-2.42.31c-1.37.85-2.38 2-3.89 2.56-1 .45-1.92.42-3 1.4h-.22z"})),Do||(Do=y.createElement("circle",{cx:219.55,cy:95.28,r:4,fill:"#000001"})),$o||($o=y.createElement("path",{fill:"#efb17c",d:"M218.66 120.27a27.32 27.32 0 0 0 4.54 3.45c-2.29-.72-4.28-.69-6.32-2.27-2.53-2-3.39-5.16-.73-7.72 10.24-9.82 12.56-13.82 14.77-24.42-1 12.37-6 17.77-10.63 23.18-2.53 2.97-4.68 5.06-1.63 7.78z"})),Uo||(Uo=y.createElement("path",{fill:"#a57c52",d:"M231.22 69.91c-.67-3.41-8.78-2.83-11.06-1.93-3.48 1.39-6.08 5.22-7.13 8.53 2.9-4.3 6.74-8.12 12.46-6 1.16.42 3.18 2.35 4.48 1.85s1.03-2.2 1.25-2.45zm32.16 8.56c-2.75-1.66-12.24-5.08-12.18.82 2.56.24 5-.19 7.64.95 11.22 4.76 12.77 17.61 12.85 17.86.2-.53.1 1.26.23.7-.02.2.95-12.12-8.54-20.33z"})),Wo||(Wo=y.createElement("path",{fill:"#fbd2a6",d:"M53.43 250.73c6.29 0-.6-.17 7.34 0 1.89.05-2.38-.7 0-.69 4.54-4.2 12.48-.74 20.6-2.45 4.55.35 3.93 1.35 5.59 4.19 4.89 8.38 4.78 14.21 14 19.56 16.42 8.38 66 12.92 88.49 18.86 5.52.83 42.64-20.15 61-23.75 6.51 10.74 11.46 28.68 8.39 34.93-6.54 13.3-57.07 25.4-75.91 25.15C156.47 326.18 94 294 92.2 293c-.94-.57.7-.7-7.68 0s-10.15.72-17.47-1.4c-3-.87-4.61-1.33-6.33-3.54-2 .22-3.39.2-4.78-1-3.15-2.74-4.84-6.61-2.73-10.06h-.12c-3.35-2.48-6.54-7.69-3.08-11.72 1-1.18 6.06-1.94 7.77-2.28-1.58-.29-6.37.19-7.49-.72-3.06-2.5-4.96-11.55 3.14-11.55z"})),Bo||(Bo=y.createElement("path",{fill:"#a4286a",d:"M303.22 237.52c-9.87-11.88-41.59 8.19-47.8 12.34s-14.89 17.95-14.89 17.95c6 9.43 8.36 31 5.65 46.34l30.51-3s18-15.62 22.59-28.7 6.3-42.54 6.3-42.54"})),Ho||(Ho=y.createElement("path",{fill:"#cb9833",d:"M278.63 31.67c-6.08 0-22.91 4.07-22.93 12.91 0 11 47.9 38.38 16.14 85.85 10.21-.79 10.79-8.12 14.92-14.93-3.66 77-49.38 93.58-40.51 142.25 7.68-25.81 20.3-11.62 38.13-33.84 3.45 4.88 9 18.28-9.46 33.78 50-31.26 57.31-56.6 51.92-95C319.93 113.53 348.7 42 278.63 31.67z"})),Ko||(Ko=y.createElement("path",{fill:"#fbd2a6",d:"M283.64 126.83c-2.42 9.67-8 15.76-1.48 16.46A21.26 21.26 0 0 0 302 132.6c5.17-8.52 3.93-16.44-2.46-18s-13.48 2.56-15.9 12.23z"})),zo||(zo=y.createElement("path",{fill:"#efb17c",d:"M38 73.45c1.92 2 4.25 9.21 6.32 10.91 2.25 1.85 5.71 2.12 8.1 4.45 3.66-2 6-8.72 10-9.31-2.59 1.31-4.42 3.5-6.93 4.88-1.42.8-3 1.31-4.38 2.25-2.16-1.46-4.27-1.77-6.26-3.38-2.52-2.02-5.31-8-6.85-9.8z"})),Yo||(Yo=y.createElement("path",{fill:"#efb17c",d:"M39 74.4c4.83 1.1 12.52 6.44 15.89 10-3.22-1.34-14.73-6.15-15.89-10zm.62-1.5c6.71-.79 18 1.54 23.29 5.9-3.85-.2-5.42-1.48-9-2.94-4.08-1.69-8.83-2.03-14.29-2.96zm46.43 14.58c-3.72-1.32-10.52-1.13-13.22 3.52 2-1.16 1.84-2.11 4.18-1.72-3.81-4.15 8.16-.74 11.6-.24m-2.78 13.15c.56-3.29-8-7.81-10.58-9.17-6.25-3.29-12.16 1.36-19.33-4.53 5.94 6.1 14.23 2.5 19.55 5.76 3.06 1.88 8.65 6.09 9.35 9.38-.23-.4 1.29-1.44 1.01-1.44z"})),Vo||(Vo=y.createElement("circle",{cx:38.13,cy:30.03,r:3.14,fill:"#b89ac8"})),Zo||(Zo=y.createElement("circle",{cx:60.26,cy:39.96,r:3.14,fill:"#e31e0c"})),Go||(Go=y.createElement("circle",{cx:50.29,cy:25.63,r:3.14,fill:"#3baa45"})),Xo||(Xo=y.createElement("circle",{cx:22.19,cy:19.21,r:3.14,fill:"#2ca9e1"})),Qo||(Qo=y.createElement("circle",{cx:22.19,cy:30.03,r:3.14,fill:"#e31e0c"})),Jo||(Jo=y.createElement("circle",{cx:26.86,cy:8.28,r:3.14,fill:"#3baa45"})),en||(en=y.createElement("circle",{cx:49.32,cy:39.99,r:3.14,fill:"#e31e0c"})),tn||(tn=y.createElement("circle",{cx:63.86,cy:59.52,r:3.14,fill:"#f8ad39"})),sn||(sn=y.createElement("circle",{cx:50.88,cy:50.72,r:3.14,fill:"#3baa45"})),rn||(rn=y.createElement("circle",{cx:63.47,cy:76.17,r:3.14,fill:"#e31e0c"})),on||(on=y.createElement("circle",{cx:38.34,cy:14.83,r:3.14,fill:"#2ca9e1"})),nn||(nn=y.createElement("circle",{cx:44.44,cy:5.92,r:3.14,fill:"#f8ad39"})),an||(an=y.createElement("circle",{cx:57.42,cy:10.24,r:3.14,fill:"#e31e0c"})),ln||(ln=y.createElement("circle",{cx:66.81,cy:12.4,r:3.14,fill:"#2ca9e1"})),cn||(cn=y.createElement("circle",{cx:77.95,cy:5.14,r:3.14,fill:"#b89ac8"})),dn||(dn=y.createElement("circle",{cx:77.95,cy:30.34,r:3.14,fill:"#e31e0c"})),pn||(pn=y.createElement("circle",{cx:80.97,cy:16.55,r:3.14,fill:"#f8ad39"})),un||(un=y.createElement("circle",{cx:62.96,cy:27.27,r:3.14,fill:"#3baa45"})),hn||(hn=y.createElement("circle",{cx:75.36,cy:48.67,r:3.14,fill:"#2ca9e1"})),mn||(mn=y.createElement("circle",{cx:76.11,cy:65.31,r:3.14,fill:"#3baa45"})),gn||(gn=y.createElement("path",{fill:"#71b026",d:"M78.58 178.43C54.36 167.26 32 198.93 5 198.93c19.56 20.49 63.53 1.52 69 15.5 1.48-14.01 4.11-30.9 4.58-36z"})),yn||(yn=y.createElement("path",{fill:"#074a67",d:"M67.75 251.08c0-4.65 10.13-72.65 10.13-72.65h2.8l-9.09 72.3z"})),fn||(fn=y.createElement("ellipse",{cx:255.38,cy:103.18,fill:"#fff",rx:1.84,ry:1.77})),wn||(wn=y.createElement("ellipse",{cx:221.24,cy:94.75,fill:"#fff",rx:1.84,ry:1.77}))),vn=(0,Pe.compose)([(0,h.withSelect)(((e,t)=>{const{isAlertDismissed:s}=e(t.store||"yoast-seo/editor");return{isAlertDismissed:s(t.alertKey)}})),(0,h.withDispatch)(((e,t)=>{const{dismissAlert:s}=e(t.store||"yoast-seo/editor");return{onDismissed:()=>s(t.alertKey)}}))]),kn=({children:e,id:t,hasIcon:s=!0,title:i,image:r=null,isAlertDismissed:o,onDismissed:n})=>o?null:(0,c.jsxs)("div",{id:t,className:"notice-yoast yoast is-dismissible yoast-webinar-dashboard yoast-general-page-notices",children:[(0,c.jsxs)("div",{className:"notice-yoast__container",children:[(0,c.jsxs)("div",{children:[(0,c.jsxs)("div",{className:"notice-yoast__header",children:[s&&(0,c.jsx)("span",{className:"yoast-icon"}),(0,c.jsx)("h2",{className:"notice-yoast__header-heading yoast-notice-migrated-header",children:i})]}),(0,c.jsx)("div",{className:"notice-yoast-content",children:(0,c.jsx)("p",{children:e})})]}),r&&(0,c.jsx)(r,{height:"60"})]}),(0,c.jsx)("button",{type:"button",className:"notice-dismiss",onClick:n,children:(0,c.jsx)("span",{className:"screen-reader-text",children:/* translators: Hidden accessibility text. */ (0,m.__)("Dismiss this notice.","wordpress-seo")})})]});kn.propTypes={children:r().node.isRequired,id:r().string.isRequired,hasIcon:r().bool,title:r().any.isRequired,image:r().elementType,isAlertDismissed:r().bool.isRequired,onDismissed:r().func.isRequired};const jn=vn(kn),Tn=({store:e="yoast-seo/editor",image:t=null,title:s,promoId:i,alertKey:r,children:o,...n})=>(0,h.select)(e).isPromotionActive(i)&&(0,c.jsx)(jn,{alertKey:r,store:e,id:r,title:s,image:t,...n,children:o});Tn.propTypes={store:r().string,image:r().elementType,title:r().any.isRequired,promoId:r().string.isRequired,alertKey:r().string.isRequired,children:r().node};const En=y.forwardRef((function(e,t){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),y.createElement("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"}))})),Sn=({store:t="yoast-seo/editor",location:s="sidebar"})=>{const i="black-friday-promotion",r=(0,h.useSelect)((e=>e(t).getIsPremium()),[t]),o=(0,h.useSelect)((e=>e(t).selectLinkParams()),[t]),n=(0,h.useSelect)((e=>e(t).isPromotionActive(i)),[t]),a=(0,h.useSelect)((e=>e(t).getIsWooCommerceActive()),[t]),l=(0,h.useSelect)((e=>e(t).isAlertDismissed(i)),[t]),d=(0,h.useSelect)((e=>e(t).getIsElementorEditor()),[t]),p=(0,e.useCallback)((()=>{(0,h.dispatch)(t).dismissAlert(i)}),[t,i]),g=(0,hi.addQueryArgs)("https://yoa.st/black-friday-sale",o),y=(0,u.useSvgAria)();return r||!n||l?null:(0,c.jsx)("div",{className:"yst-root",children:(0,c.jsxs)("div",{className:le()("sidebar"!==s||d?"yst-mx-4":"yst-mx-0","yst-border yst-rounded-lg yst-p-4 yst-max-w-md yst-mt-6 yst-relative yst-shadow-sm",a?"yst-border-woo-light":"yst-border-primary-200"),children:[(0,c.jsxs)(u.Badge,{size:"small",className:"yst-text-[10px] yst-bg-black yst-text-amber-300 yst-absolute yst--top-2",children:[(0,m.__)("BLACK FRIDAY","wordpress-seo")," "]}),(0,c.jsxs)("button",{className:"yst-absolute yst-top-4 yst-end-4",onClick:p,children:[(0,c.jsx)(En,{className:"yst-w-4 yst-text-slate-400 yst-shrink-0 yst--mt-0.5"}),(0,c.jsx)("div",{className:"yst-sr-only",children:(0,m.__)("Dismiss","wordpress-seo")})]}),(0,c.jsxs)("div",{className:le()("sidebar"===s?"":"yst-flex yst-justify-between yst-gap-3"),children:[(0,c.jsxs)("div",{className:a?"yst-text-woo-light":"yst-text-primary-500",children:[(0,c.jsx)("div",{className:"yst-text-2xl yst-font-bold",children:(0,m.__)("30% OFF","wordpress-seo")}),(0,c.jsx)("div",{className:"yst-flex yst-gap-2 yst-font-semibold yst-text-tiny",children:a?(0,c.jsxs)(c.Fragment,{children:["Yoast WooCommerce SEO ",(0,c.jsx)(Ri,{className:"yst-w-4 yst-scale-x-[-1]",...y})]}):(0,c.jsxs)(c.Fragment,{children:[" Yoast SEO Premium ",(0,c.jsx)(ue,{className:"yst-w-4",...y})]})})]}),(0,c.jsx)("div",{className:"yst-flex yst-items-end",children:(0,c.jsxs)(u.Button,{as:"a",className:le()("sidebar"===s?"yst-w-full":"yst-w-[140px]","yst-flex yst-gap-1 yst-w-[140px] yst-h-7 yst-mt-4"),variant:"upsell",href:g,target:"_blank",rel:"noreferrer",children:[(0,m.__)("Buy now!","wordpress-seo"),(0,c.jsx)(x,{className:"yst-w-4 rtl:yst-rotate-180",...y})]})})]})]})})};Sn.propTypes={store:r().string,location:r().oneOf(["sidebar","metabox"])};const Rn=e=>t=>!(()=>{var e,t;const s=(0,h.select)("yoast-seo/editor").getIsPremium(),i=(0,h.select)("yoast-seo/editor").getWarningMessage();return(s&&null!==(e=null===(t=(0,h.select)("yoast-seo-premium/editor"))||void 0===t?void 0:t.getMetaboxWarning())&&void 0!==e?e:[]).length>0||i.length>0})()&&(0,c.jsx)(e,{...t}),Cn=Rn((()=>{const e=(0,h.useSelect)((e=>e("yoast-seo/editor").selectLinkParams()),[]),t=(0,m.sprintf)(/* translators: %1$s expands to 'WooCommerce'. */ (0,m.__)("Is your %1$s store ready for Black Friday?","wordpress-seo"),"WooCommerce");return(0,c.jsxs)(Tn,{id:"black-friday-2023-product-editor-checklist",alertKey:"black-friday-2023-product-editor-checklist",promoId:"black-friday-2023-checklist",store:"yoast-seo/editor",title:t,image:bn,children:[g((0,m.sprintf)(/* translators: %1$s expands to a 'strong' start tag, %2$s to a 'strong' end tag. */ (0,m.__)("The Yoast %1$sultimate Black Friday checklist%2$s helps you prepare in time, so you can boost your results during this sale.","wordpress-seo"),"<strong>","</strong>"),{strong:(0,c.jsx)("strong",{})})," ",(0,c.jsx)("a",{href:(0,hi.addQueryArgs)("https://yoa.st/black-friday-checklist",e),target:"_blank",rel:"noreferrer",children:(0,m.__)("Get the checklist and start optimizing now!","wordpress-seo")})]})})),In=Rn(Sn);function Ln({settings:s}){const{isTerm:i,isProduct:r,isWooCommerceActive:o}=(0,h.useSelect)((e=>({isTerm:e("yoast-seo/editor").getIsTerm(),isProduct:e("yoast-seo/editor").getIsProduct(),isWooCommerceActive:e("yoast-seo/editor").getIsWooCommerceActive()})),[]),n=r&&o;return window.wpseoScriptData&&"1"===window.wpseoScriptData.isBlockEditor&&(()=>{const{editorMode:t,activeAIButtonId:s}=(0,h.useSelect)((e=>({editorMode:e("core/edit-post").getEditorMode(),activeAIButtonId:e("yoast-seo/editor").getActiveAIFixesButton()})),[]),{setMarkerStatus:i}=(0,h.useDispatch)("yoast-seo/editor");(0,e.useEffect)((()=>(i("visual"===t&&s||"text"===t?"disabled":"enabled"),()=>{i("disabled")})),[t,s])})(),(0,c.jsx)(c.Fragment,{children:(0,c.jsxs)(t.Fill,{name:"YoastMetabox",children:[(0,c.jsx)(Ai,{renderPriority:1,children:(0,c.jsx)(ii,{})},"warning"),(0,c.jsxs)(Ai,{renderPriority:2,children:[n&&(0,c.jsx)(Cn,{}),(0,c.jsx)(In,{location:"metabox"})]},"time-constrained-notification"),s.isKeywordAnalysisActive&&(0,c.jsxs)(Ai,{renderPriority:8,children:[(0,c.jsx)(Os.KeywordInput,{isSEMrushIntegrationActive:s.isSEMrushIntegrationActive}),!window.wpseoScriptData.metabox.isPremium&&(0,c.jsx)(t.Fill,{name:"YoastRelatedKeyphrases",children:(0,c.jsx)(xo,{})})]},"keyword-input"),(0,c.jsx)(Ai,{renderPriority:9,children:(0,c.jsx)(ni,{id:"yoast-snippet-editor-metabox",title:(0,m.__)("Search appearance","wordpress-seo"),initialIsOpen:!0,children:(0,c.jsx)(si,{hasPaperStyle:!1})})},"search-appearance"),s.isContentAnalysisActive&&(0,c.jsx)(Ai,{renderPriority:10,children:(0,c.jsx)(Os.ReadabilityAnalysis,{shouldUpsell:s.shouldUpsell})},"readability-analysis"),s.isKeywordAnalysisActive&&(0,c.jsx)(Ai,{renderPriority:20,children:(0,c.jsxs)(e.Fragment,{children:[(0,c.jsx)(Os.SeoAnalysis,{shouldUpsell:s.shouldUpsell,shouldUpsellWordFormRecognition:s.isWordFormRecognitionActive}),s.shouldUpsell&&(0,c.jsx)(_o,{location:"metabox"})]})},"seo-analysis"),s.isInclusiveLanguageAnalysisActive&&(0,c.jsx)(Ai,{renderPriority:21,children:(0,c.jsx)(Os.InclusiveLanguageAnalysis,{})},"inclusive-language-analysis"),s.isKeywordAnalysisActive&&(0,c.jsx)(Ai,{renderPriority:22,children:s.shouldUpsell&&(0,c.jsx)(jo,{})},"additional-keywords-upsell"),s.isKeywordAnalysisActive&&s.isWincherIntegrationActive&&(0,c.jsx)(Ai,{renderPriority:23,children:(0,c.jsx)(qs,{location:"metabox"})},"wincher-seo-performance"),s.shouldUpsell&&!i&&(0,c.jsx)(Ai,{renderPriority:25,children:(0,c.jsx)(Li,{})},"internal-linking-suggestions-upsell"),s.isCornerstoneActive&&(0,c.jsx)(Ai,{renderPriority:30,children:(0,c.jsx)($s,{})},"cornerstone"),s.displayAdvancedTab&&(0,c.jsx)(Ai,{renderPriority:40,children:(0,c.jsx)(ni,{id:"collapsible-advanced-settings",title:(0,m.__)("Advanced","wordpress-seo"),children:(0,c.jsx)(Ui,{})})},"advanced"),s.displaySchemaSettings&&(0,c.jsx)(Ai,{renderPriority:50,children:(0,c.jsx)(go,{})},"schema"),(0,c.jsx)(Ai,{renderPriority:-1,children:(0,c.jsx)(to,{target:"wpseo-section-social"})},"social"),s.isInsightsEnabled&&(0,c.jsx)(Ai,{renderPriority:52,children:(0,c.jsx)(Ti,{location:"metabox"})},"insights")]})})}Ln.propTypes={settings:r().object.isRequired};const Pn=(0,Pe.compose)([(0,h.withSelect)(((e,t)=>{const{getPreferences:s}=e("yoast-seo/editor");return{settings:s(),store:t.store}}))])(Ln);function An({target:e,store:t,theme:s}){return(0,c.jsxs)(Se,{target:e,children:[(0,c.jsx)(Le,{store:t,theme:s}),(0,c.jsx)(Pn,{store:t,theme:s})]})}An.propTypes={target:r().string.isRequired,store:r().object,theme:r().object};const Fn=[];let Mn=null;class Nn extends e.Component{constructor(e){super(e),this.state={registeredComponents:[...Fn]}}registerComponent(e,t){this.setState((s=>({...s,registeredComponents:[...s.registeredComponents,{key:e,Component:t}]})))}render(){return this.state.registeredComponents.map((({Component:e,key:t})=>(0,c.jsx)(e,{},t)))}}function qn(e,t){null===Mn||null===Mn.current?Fn.push({key:e,Component:t}):Mn.current.registerComponent(e,t)}const On=window.yoast.externals.redux,Dn=window.jQuery;var $n=s.n(Dn);function Un(e){let t="";var s;return t=!1===function(e){if("undefined"==typeof tinyMCE||void 0===tinyMCE.editors||0===tinyMCE.editors.length)return!1;const t=tinyMCE.get(e);return null!==t&&!t.isHidden()}(e)||0==(s=e,null!==document.getElementById(s+"_ifr"))?function(e){return document.getElementById(e)&&document.getElementById(e).value||""}(e):tinyMCE.get(e).getContent(),t}o.noop,o.noop,o.noop;const{removeMarks:Wn}=Te.markers,{updateReplacementVariable:Bn,updateData:Hn,hideReplacementVariables:Kn,setContentImage:zn,setEditorDataContent:Yn,setEditorDataTitle:Vn,setEditorDataExcerpt:Zn,setEditorDataImageUrl:Gn,setEditorDataSlug:Xn}=On.actions;window.yoast=window.yoast||{},window.yoast.initEditorIntegration=function(s){window.YoastSEO=window.YoastSEO||{},window.YoastSEO._registerReactComponent=qn,function(s){const i=vi();Mn=(0,e.createRef)();const r={isRtl:i.isRtl};(0,e.createRoot)(document.getElementById("wpseo-metabox-root")).render((0,c.jsxs)(t.SlotFillProvider,{children:[(0,c.jsx)(l.Root,{context:{locationContext:"classic-metabox"},children:(0,c.jsx)(An,{target:"wpseo-metabox-root",store:s,theme:r})}),(0,c.jsx)(Nn,{ref:Mn})]}))}(s)},window.yoast.EditorData=class{constructor(e,t,s="content"){this._refresh=e,this._store=t,this._tinyMceId=s,this._previousData={},this._previousEditorData={},this.updateReplacementData=this.updateReplacementData.bind(this),this.refreshYoastSEO=this.refreshYoastSEO.bind(this)}initialize(e,t=[]){const s=this.getInitialData(e);var i,r;i=s,r=this._store,(0,o.forEach)(i,((e,t)=>{Gs.includes(t)||r.dispatch(Ys(t,e))})),this._store.dispatch(Kn(t)),this._previousEditorData.content=s.content,this._store.dispatch(Yn(s.content)),this._previousEditorData.contentImage=s.contentImage,this._store.dispatch(zn(s.contentImage)),this.setImageInSnippetPreview(s.snippetPreviewImageURL||s.contentImage),this._previousEditorData.slug=s.slug,this._store.dispatch(Xn(s.slug)),this.updateReplacementData({target:{value:s.title}},"title"),this.updateReplacementData({target:{value:s.excerpt}},"excerpt"),this.updateReplacementData({target:{value:s.excerpt_only}},"excerpt_only"),this.subscribeToElements(),this.subscribeToStore(),this.subscribeToSnippetPreviewImage(),this.subscribeToTinyMceEditor(),this.subscribeToSlug()}subscribeToTinyMceEditor(){const e=e=>{if((0,o.isString)(e)||(e=this.getContent()),this._previousEditorData.content===e)return;if(this._previousEditorData.content=e,this._store.dispatch(Yn(e)),this.featuredImageIsSet)return;const t=this.getContentImage(e);this._previousEditorData.contentImage!==t&&(this._previousEditorData.contentImage=t,this._store.dispatch(zn(t)),this.setImageInSnippetPreview(t))};$n()(document).on("tinymce-editor-init",((t,s)=>{s.id===this._tinyMceId&&(e(this.getContent()),["input","change","cut","paste"].forEach((t=>s.on(t,(0,o.debounce)(e,1e3)))))}));const t=document.getElementById("attachment_content");t&&(e(t.value),t.addEventListener("input",(t=>e(t.target.value))))}subscribeToSlug(){const e=e=>{this._previousEditorData.slug!==e&&(this._previousEditorData.slug=e,this._store.dispatch(Xn(e)),this._store.dispatch(Hn({slug:e})))},t=document.getElementById("slug");t&&t.addEventListener("input",(t=>e(t.target.value)));const s=document.getElementById("post_name");s&&s.addEventListener("input",(t=>e(t.target.value)));const i=document.getElementById("edit-slug-buttons");i&&new MutationObserver(((t,s)=>t.forEach((t=>{t.addedNodes.forEach((t=>{var i,r;if(null==t||null===(i=t.classList)||void 0===i||!i.contains("edit-slug"))return;const o=null===(r=document.getElementById("editable-post-name-full"))||void 0===r?void 0:r.innerText;o&&(e(o),s.disconnect(),this.subscribeToSlug())}))})))).observe(i,{childList:!0})}subscribeToSnippetPreviewImage(){if((0,o.isUndefined)(wp.media)||(0,o.isUndefined)(wp.media.featuredImage))return;$n()("#postimagediv").on("click","#remove-post-thumbnail",(()=>{this.featuredImageIsSet=!1,this.setImageInSnippetPreview(this.getContentImage(this.getContent()))}));const e=wp.media.featuredImage.frame();var t,s,i;e.on("select",(()=>{const t=e.state().get("selection").first().attributes.url;t&&(this.featuredImageIsSet=!0,this.setImageInSnippetPreview(t))})),t=this._tinyMceId,s=["init"],i=()=>{const e=this.getContentImage(this.getContent()),t=this.getFeaturedImage()||e||"";this._store.dispatch(zn(e)),this.setImageInSnippetPreview(t)},"undefined"!=typeof tinyMCE&&"function"==typeof tinyMCE.on&&tinyMCE.on("addEditor",(function(e){const r=e.editor;r.id===t&&(0,o.forEach)(s,(function(e){r.on(e,i)}))}))}getFeaturedImage(){const e=$n()("#set-post-thumbnail img").attr("src");return e?(this.featuredImageIsSet=!0,e):(this.featuredImageIsSet=!1,null)}setImageInSnippetPreview(e){this._store.dispatch(Gn(e)),this._store.dispatch(Hn({snippetPreviewImageURL:e}))}getContentImage(e){if(this.featuredImageIsSet)return"";const t=Te.languageProcessing.imageInText(e);if(0===t.length)return"";const s=$n().parseHTML(t.join(""));for(const e of s)if(e.src)return e.src;return""}getTitle(){const e=document.getElementById("title")||document.getElementById("name");return e&&e.value||""}getExcerpt(e=!0){const t=document.getElementById("excerpt"),s=t&&t.value||"",i="ja"===function(){const e=vi();return(0,o.get)(e,"contentLocale","en_US")}()?80:156;return""!==s||!1===e?s:function(e,t=156){return(e=(e=(0,Ks.stripTags)(e)).trim()).length<=t||(e=e.substring(0,t),/\s/.test(e)&&(e=e.substring(0,e.lastIndexOf(" ")))),e}(this.getContent(),i)}getSlug(){let e="";const t=document.getElementById("new-post-slug")||document.getElementById("slug");return t?e=t.value:null!==document.getElementById("editable-post-name-full")&&(e=document.getElementById("editable-post-name-full").textContent),e}getContent(){return Wn(Un(this._tinyMceId))}subscribeToElements(){this.subscribeToInputElement("title","title"),this.subscribeToInputElement("excerpt","excerpt"),this.subscribeToInputElement("excerpt","excerpt_only")}subscribeToInputElement(e,t){const s=document.getElementById(e);s&&s.addEventListener("input",(e=>{this.updateReplacementData(e,t)}))}updateReplacementData(e,t){let s=e.target.value;if("excerpt"===t&&""===s&&(s=this.getExcerpt()),this._previousEditorData[t]!==s){switch(this._previousEditorData[t]=s,t){case"title":this._store.dispatch(Vn(s));break;case"excerpt":this._store.dispatch(Zn(s))}this._store.dispatch(Bn(t,s))}}isShallowEqual(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e)if(e.hasOwnProperty(s)&&(!(s in t)||e[s]!==t[s]))return!1;return!0}refreshYoastSEO(){const e=this.getData();!this.isShallowEqual(this._previousData,e)&&(this.handleEditorChange(e),this._previousData=e,window.YoastSEO&&window.YoastSEO.app&&window.YoastSEO.app.refresh())}handleEditorChange(e){this._previousData.excerpt!==e.excerpt&&(this._store.dispatch(Bn("excerpt",e.excerpt)),this._store.dispatch(Bn("excerpt_only",e.excerpt_only))),this._previousData.snippetPreviewImageURL!==e.snippetPreviewImageURL&&this.setImageInSnippetPreview(e.snippetPreviewImageURL),this._previousData.slug!==e.slug&&this._store.dispatch(Xn(e.slug)),this._previousData.title!==e.title&&this._store.dispatch(Vn(e.title))}subscribeToStore(){this.subscriber=(0,o.debounce)(this.refreshYoastSEO,500),this._store.subscribe(this.subscriber)}getInitialData(e){e=function(e,t){if(!e.custom_taxonomies)return e;const s={};return(0,o.forEach)(e.custom_taxonomies,((e,t)=>{const{name:i,label:r,descriptionName:o,descriptionLabel:n}=function(e){const t=Xs(e);return{name:"ct_"+t,label:Vs(e+" (custom taxonomy)"),descriptionName:"ct_desc_"+t,descriptionLabel:Vs(e+" description (custom taxonomy)")}}(t),a="string"==typeof e.name?(0,Ne.decodeHTML)(e.name):e.name,l="string"==typeof e.description?(0,Ne.decodeHTML)(e.description):e.description;s[i]={value:a,label:r},s[o]={value:l,label:n}})),t.dispatch(function(e){return{type:"SNIPPET_EDITOR_UPDATE_REPLACEMENT_VARIABLES_BATCH",updatedVariables:e}}(s)),(0,o.omit)({...e},"custom_taxonomies")}(e=function(e,t){return e.custom_fields?((0,o.forEach)(e.custom_fields,((e,s)=>{const{name:i,label:r}=function(e){return{name:"cf_"+Xs(e),label:Vs(e+" (custom field)")}}(s);t.dispatch(Ys(i,e,r))})),(0,o.omit)({...e},"custom_fields")):e}(e,this._store),this._store);const t=this.getContent(),s=this.getFeaturedImage();return{...e,title:this.getTitle(),excerpt:this.getExcerpt(),excerpt_only:this.getExcerpt(!1),slug:this.getSlug(),content:t,snippetPreviewImageURL:s,contentImage:this.getContentImage(t)}}getData(){return{...this._store.getState().snippetEditor.data,title:this.getTitle(),content:this.getContent(),excerpt:this.getExcerpt(),excerpt_only:this.getExcerpt(!1)}}}})()})();