📁 File Manager Pro
v10.0.3 | PHP: 8.1.34
Server: LiteSpeed
2026-06-28 15:10:30
📂
/ (Root)
/
home
/
apkbfjox
/
casinos.com.pk
/
wp-content
/
plugins
/
wordpress-seo
/
js
/
dist
📍 /home/apkbfjox/casinos.com.pk/wp-content/plugins/wordpress-seo/js/dist
🔄 Refresh
✏️
Editing: classic-editor.js
Writable
(()=>{var e={465(e,t,s){const i=s(1609),o=i.forwardRef(function(e,t){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),i.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"}))});e.exports=o},818(e,t,s){const i=s(1609),o=i.forwardRef(function(e,t){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),i.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"}))});e.exports=o},998(e,t,s){const i=s(1609),o=i.forwardRef(function(e,t){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),i.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"}))});e.exports=o},1609(e){"use strict";e.exports=window.React},2485(e,t){var s;!function(){"use strict";var i={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var s=arguments[t];if(s){var r=typeof s;if("string"===r||"number"===r)e.push(s);else if(Array.isArray(s)){if(s.length){var n=o.apply(null,s);n&&e.push(n)}}else if("object"===r){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?(o.default=o,e.exports=o):void 0===(s=function(){return o}.apply(t,[]))||(e.exports=s)}()},2514(e,t,s){const i=s(1609),o=i.forwardRef(function(e,t){return i.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),i.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"}))});e.exports=o},3473(e,t,s){const i=s(1609),o=i.forwardRef(function(e,t){return i.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),i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 8l4 4m0 0l-4 4m4-4H3"}))});e.exports=o},5074(e,t,s){const i=s(1609),o=i.forwardRef(function(e,t){return i.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),i.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"}))});e.exports=o},5547(e,t,s){const i=s(1609),o=i.forwardRef(function(e,t){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),i.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"}))});e.exports=o},5687(e,t,s){const i=s(1609),o=i.forwardRef(function(e,t){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),i.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"}))});e.exports=o},6702(e,t,s){const i=s(1609),o=i.forwardRef(function(e,t){return i.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),i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))});e.exports=o},7656(e,t,s){const i=s(1609),o=i.forwardRef(function(e,t){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),i.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"}))});e.exports=o},8738(e,t,s){const i=s(1609),o=i.forwardRef(function(e,t){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),i.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"}))});e.exports=o}},t={};function s(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={exports:{}};return e[i](r,r.exports,s),r.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 o=s.n(i);const r=window.yoast.uiLibrary,n=window.lodash,a=window.wp.data;s(6702);const l=window.wp.i18n,c=(t,s)=>{try{return(0,e.createInterpolateElement)(t,s)}catch(e){return console.error("Error in translation for:",t,e),t}},d=window.ReactJSXRuntime;o().string.isRequired;var p=s(2514),u=s.n(p),h=s(818),m=s.n(h);o().string.isRequired,o().string.isRequired,o().shape({src:o().string.isRequired,width:o().string,height:o().string}).isRequired,o().shape({value:o().bool.isRequired,status:o().string.isRequired,set:o().func.isRequired}).isRequired,o().string,o().string,o().string;const g=({handleRefreshClick:e,supportLink:t})=>(0,d.jsxs)("div",{className:"yst-flex yst-gap-2",children:[(0,d.jsx)(r.Button,{onClick:e,children:(0,l.__)("Refresh this page","wordpress-seo")}),(0,d.jsx)(r.Button,{variant:"secondary",as:"a",href:t,target:"_blank",rel:"noopener",children:(0,l.__)("Contact support","wordpress-seo")})]});g.propTypes={handleRefreshClick:o().func.isRequired,supportLink:o().string.isRequired};const y=({handleRefreshClick:e,supportLink:t})=>(0,d.jsxs)("div",{className:"yst-grid yst-grid-cols-1 yst-gap-y-2",children:[(0,d.jsx)(r.Button,{className:"yst-order-last",onClick:e,children:(0,l.__)("Refresh this page","wordpress-seo")}),(0,d.jsx)(r.Button,{variant:"secondary",as:"a",href:t,target:"_blank",rel:"noopener",children:(0,l.__)("Contact support","wordpress-seo")})]});y.propTypes={handleRefreshClick:o().func.isRequired,supportLink:o().string.isRequired};const w=({error:e,children:t=null})=>(0,d.jsxs)("div",{role:"alert",className:"yst-max-w-screen-sm yst-p-8 yst-space-y-4",children:[(0,d.jsx)(r.Title,{children:(0,l.__)("Something went wrong. An unexpected error occurred.","wordpress-seo")}),(0,d.jsx)("p",{children:(0,l.__)("We're very sorry, but it seems like the following error has interrupted our application:","wordpress-seo")}),(0,d.jsx)(r.Alert,{variant:"error",children:(null==e?void 0:e.message)||(0,l.__)("Undefined error message.","wordpress-seo")}),(0,d.jsx)("p",{children:(0,l.__)("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]});w.propTypes={error:o().object.isRequired,children:o().node},w.VerticalButtons=y,w.HorizontalButtons=g;o().string,o().node.isRequired,o().node.isRequired,o().node,o().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"}}));var f=s(1609),x=s.n(f);const b=window.ReactDOM;var v,k,_;(k=v||(v={})).Pop="POP",k.Push="PUSH",k.Replace="REPLACE",function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(_||(_={})),new Set(["lazy","caseSensitive","path","id","index","children"]),Error;const T=["post","put","patch","delete"],R=(new Set(T),["get",...T]);new Set(R),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred"),f.Component,f.startTransition,new Promise(()=>{}),f.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(e){}var j,S,I,C;new Map,f.startTransition,b.flushSync,f.useId,"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,(C=j||(j={})).UseScrollRestoration="useScrollRestoration",C.UseSubmit="useSubmit",C.UseSubmitFetcher="useSubmitFetcher",C.UseFetcher="useFetcher",C.useViewTransitionState="useViewTransitionState",(I=S||(S={})).UseFetcher="useFetcher",I.UseFetchers="useFetchers",I.UseScrollRestoration="useScrollRestoration",o().string.isRequired,o().string;const E=({href:e,children:t=null,...s})=>(0,d.jsxs)(r.Link,{target:"_blank",rel:"noopener noreferrer",...s,href:e,children:[t,(0,d.jsx)("span",{className:"yst-sr-only",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */ (0,l.__)("(Opens in a new browser tab)","wordpress-seo")})]});E.propTypes={href:o().string.isRequired,children:o().node};var L=s(8738),A=s.n(L);(0,l.__)("Create optimized SEO titles & meta descriptions in seconds","wordpress-seo"),(0,l.__)("Apply AI suggestions to improve content in 1 click","wordpress-seo"),(0,l.__)("Manage redirects with ease and without extra plugins","wordpress-seo"),(0,l.__)("Optimize pages for multiple keywords with guidance","wordpress-seo"),(0,l.__)("Add product details to help your listings stand out","wordpress-seo"),(0,l.__)("Make sure search engines show the right version of your product page","wordpress-seo"),(0,l.__)("Create optimized SEO titles & meta descriptions with AI","wordpress-seo"),(0,l.__)("Receive clear SEO and readability guidance to optimize your products","wordpress-seo"),(0,l.__)("Generate SEO optimized metadata in seconds with AI","wordpress-seo"),(0,l.__)("Make your articles visible, be seen in Google News","wordpress-seo"),(0,l.__)("Built to get found by search, AI, and real users","wordpress-seo"),(0,l.__)("Easy Local SEO. Show up in Google Maps results","wordpress-seo"),(0,l.__)("Internal links and redirect management, easy","wordpress-seo"),(0,l.__)("Access to friendly help when you need it, day or night","wordpress-seo");var F=s(2485),q=s.n(F);var P;function M(){return M=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)({}).hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},M.apply(null,arguments)}o().string.isRequired,o().object.isRequired,o().func.isRequired,o().bool.isRequired,s(3473);const D=e=>f.createElement("svg",M({xmlns:"http://www.w3.org/2000/svg",fill:"none","aria-hidden":"true",viewBox:"0 0 16 12"},e),P||(P=f.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"})));o().string.isRequired,o().object,o().func.isRequired,o().bool.isRequired,o().string.isRequired,o().object.isRequired,o().string.isRequired,o().func.isRequired,o().bool.isRequired,s(5074),o().bool.isRequired,o().func,o().func,o().string.isRequired,o().string.isRequired,o().string.isRequired,o().string.isRequired;window.yoast.reactHelmet;o().string.isRequired,o().shape({src:o().string.isRequired,width:o().string,height:o().string}).isRequired,o().shape({value:o().bool.isRequired,status:o().string.isRequired,set:o().func.isRequired}).isRequired,o().bool,s(5687),o().bool.isRequired,o().func.isRequired,o().func,o().string;o().func.isRequired,o().string.isRequired,o().string.isRequired,o().string.isRequired,o().string.isRequired,o().string.isRequired,o().func.isRequired,o().string.isRequired,o().shape({termsOfService:o().string,privacyPolicy:o().string,learnMore:o().string});const O=window.yoast.componentsNew,N=window.yoast.styleGuide,U=window.yoast.analysis;function W(e){switch(e){case"loading":return{icon:"loading-spinner",color:N.colors.$color_green_medium_light};case"not-set":return{icon:"seo-score-none",color:N.colors.$color_score_icon};case"noindex":return{icon:"seo-score-none",color:N.colors.$color_noindex};case"good":return{icon:"seo-score-good",color:N.colors.$color_green_medium};case"ok":return{icon:"seo-score-ok",color:N.colors.$color_ok};default:return{icon:"seo-score-bad",color:N.colors.$color_red}}}function $({target:t,children:s}){let i=t;return"string"==typeof t&&(i=document.getElementById(t)),i?(0,e.createPortal)(s,i):null}$.propTypes={target:o().oneOfType([o().string,o().object]).isRequired,children:o().node.isRequired};const B=({target:e,scoreIndicator:t})=>(0,d.jsx)($,{target:e,children:(0,d.jsx)(O.SvgIcon,{...W(t)})});B.propTypes={target:o().string.isRequired,scoreIndicator:o().string.isRequired};const H=B,K=({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,a.useSelect)(e=>e("yoast-seo/editor").selectLink("https://yoa.st/metabox-error-support"),[]),o=(0,a.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,d.jsx)(r.Root,{context:{isRtl:o},children:(0,d.jsxs)(w,{error:t,children:[(0,d.jsx)(w.HorizontalButtons,{supportLink:i,handleRefreshClick:s}),(0,d.jsx)(H,{target:"wpseo-seo-score-icon",scoreIndicator:"not-set"}),(0,d.jsx)(H,{target:"wpseo-readability-score-icon",scoreIndicator:"not-set"}),(0,d.jsx)(H,{target:"wpseo-inclusive-language-score-icon",scoreIndicator:"not-set"})]})})};K.propTypes={error:o().object.isRequired};const Y=window.yoast.externals.contexts,z=window.yoast.styledComponents;var V=s.n(z);const G=({theme:e,location:t,children:s})=>(0,d.jsx)(Y.LocationProvider,{value:t,children:(0,d.jsx)(z.ThemeProvider,{theme:e,children:s})});G.propTypes={theme:o().object.isRequired,location:o().oneOf(["sidebar","metabox","modal"]).isRequired,children:o().node.isRequired};const Z=G;function X({theme:e}){return(0,d.jsx)(Z,{theme:e,location:"metabox",children:(0,d.jsx)(r.ErrorBoundary,{FallbackComponent:K,children:(0,d.jsx)(t.Slot,{name:"YoastMetabox",children:e=>{return void 0===(t=e).length?t:(0,n.flatten)(t).sort((e,t)=>void 0===e.props.renderPriority?1:e.props.renderPriority-t.props.renderPriority);var t}})})})}const Q=window.wp.compose;var J=s(5547),ee=s.n(J);const te=({className:e="",...t})=>(0,d.jsx)("span",{className:q()("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});te.displayName="MetaboxButton.Text",te.propTypes={className:o().string};const se=({className:e="",...t})=>(0,d.jsx)("button",{type:"button",className:q()("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});se.propTypes={className:o().string},se.Text=te;const ie=window.yoast.helpers,oe=V().div` min-width: 600px; @media screen and ( max-width: 680px ) { min-width: 0; width: 86vw; } `,re=(V().div` @media screen and ( min-width: 600px ) { max-width: 420px; } `,V()(O.Icon)` float: ${(0,ie.getDirectionalStyle)("right","left")}; margin: ${(0,ie.getDirectionalStyle)("0 0 16px 16px","0 16px 16px 0")}; && { width: 150px; height: 150px; @media screen and ( max-width: 680px ) { width: 80px; height: 80px; } } `,({title:e="Yoast SEO",className:s="yoast yoast-gutenberg-modal",showYoastIcon:i=!0,children:o=null,additionalClassName:r="",...n})=>{const a=i?(0,d.jsx)("span",{className:"yoast-icon"}):null;return(0,d.jsx)(t.Modal,{title:e,className:`${s} ${r}`,icon:a,...n,children:o})});re.propTypes={title:o().string,className:o().string,showYoastIcon:o().bool,children:o().oneOfType([o().node,o().arrayOf(o().node)]),additionalClassName:o().string};const ne=re;var ae,le;function ce(){return ce=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)({}).hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},ce.apply(null,arguments)}const de=e=>f.createElement("svg",ce({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 425 456.27"},e),ae||(ae=f.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"})),le||(le=f.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"}))),pe=({onClick:e,title:t,id:s="",subTitle:i="",suffixIcon:o=null,SuffixHeroIcon:r=null,prefixIcon:n=null,children:a=null})=>(0,d.jsx)("div",{className:"yoast components-panel__body",children:(0,d.jsx)("h2",{className:"components-panel__body-title",children:(0,d.jsxs)("button",{id:s,onClick:e,className:"components-button components-panel__body-toggle",type:"button",children:[n&&(0,d.jsx)("span",{className:"yoast-icon-span",style:{fill:`${n&&n.color||""}`},children:(0,d.jsx)(O.SvgIcon,{size:n.size,icon:n.icon})}),(0,d.jsxs)("span",{className:"yoast-title-container",children:[(0,d.jsx)("div",{className:"yoast-title",children:t}),(0,d.jsx)("div",{className:"yoast-subtitle",children:i})]}),a,o&&(0,d.jsx)(O.SvgIcon,{size:o.size,icon:o.icon}),r]})})}),ue=pe;pe.propTypes={onClick:o().func.isRequired,title:o().string.isRequired,id:o().string,subTitle:o().string,suffixIcon:o().object,SuffixHeroIcon:o().element,prefixIcon:o().object,children:o().node};const he=window.moment;var me=s.n(he);const ge=window.wp.apiFetch;var ye=s.n(ge);async function we(e,t,s,i=200){try{const o=await e();return!!o&&(o.status===i?t(o):s(o))}catch(e){console.error(e.message)}}async function fe(e){try{return await ye()(e)}catch(e){return e.error&&e.status?e:e instanceof Response&&await e.json()}}async function xe(e){return(0,n.isArray)(e)||(e=[e]),await fe({path:"yoast/v1/wincher/keyphrases/track",method:"POST",data:{keyphrases:e}})}const be=({data:e,mapChartDataToTableData:t=null,dataTableCaption:s,dataTableHeaderLabels:i,isDataTableVisuallyHidden:o=!0})=>e.length!==i.length?(0,d.jsx)("p",{children:(0,l.__)("The number of headers and header labels don't match.","wordpress-seo")}):(0,d.jsx)("div",{className:o?"screen-reader-text":null,children:(0,d.jsxs)("table",{children:[(0,d.jsx)("caption",{children:s}),(0,d.jsx)("thead",{children:(0,d.jsx)("tr",{children:i.map((e,t)=>(0,d.jsx)("th",{children:e},t))})}),(0,d.jsx)("tbody",{children:(0,d.jsx)("tr",{children:e.map((e,s)=>(0,d.jsx)("td",{children:t(e.y)},s))})})]})});be.propTypes={data:o().arrayOf(o().shape({x:o().number,y:o().number})).isRequired,mapChartDataToTableData:o().func,dataTableCaption:o().string.isRequired,dataTableHeaderLabels:o().array.isRequired,isDataTableVisuallyHidden:o().bool};const ve=be,ke=({data:t,width:s,height:i,fillColor:o=null,strokeColor:r="#000000",strokeWidth:n=1,className:a="",mapChartDataToTableData:l=null,dataTableCaption:c,dataTableHeaderLabels:p,isDataTableVisuallyHidden:u=!0})=>{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(" "),w=`0,${g+n} `+y+` ${s},${g+n}`;return(0,d.jsxs)(e.Fragment,{children:[(0,d.jsxs)("svg",{width:s,height:i,viewBox:`0 0 ${s} ${i}`,className:a,role:"img","aria-hidden":"true",focusable:"false",children:[(0,d.jsx)("polygon",{fill:o,points:w}),(0,d.jsx)("polyline",{fill:"none",stroke:r,strokeWidth:n,strokeLinejoin:"round",strokeLinecap:"round",points:y})]}),l&&(0,d.jsx)(ve,{data:t,mapChartDataToTableData:l,dataTableCaption:c,dataTableHeaderLabels:p,isDataTableVisuallyHidden:u})]})};ke.propTypes={data:o().arrayOf(o().shape({x:o().number,y:o().number})).isRequired,width:o().number.isRequired,height:o().number.isRequired,fillColor:o().string,strokeColor:o().string,strokeWidth:o().number,className:o().string,mapChartDataToTableData:o().func,dataTableCaption:o().string.isRequired,dataTableHeaderLabels:o().array.isRequired,isDataTableVisuallyHidden:o().bool};const _e=ke,Te=()=>(0,d.jsxs)("p",{className:"yoast-wincher-seo-performance-modal__loading-message",children:[(0,l.__)("Tracking the ranking position…","wordpress-seo")," ",(0,d.jsx)(O.SvgIcon,{icon:"loading-spinner"})]}),Re=V()(O.SvgIcon)` margin-left: 2px; flex-shrink: 0; rotate: ${e=>e.isImproving?"-90deg":"90deg"}; `,je=V().span` color: ${e=>e.isImproving?"#69AB56":"#DC3332"}; font-size: 13px; font-weight: 600; line-height: 20px; margin-right: 2px; margin-left: 12px; `,Se=V().td` padding-right: 0 !important; & > div { margin: 0px; } `,Ie=V().td` padding-left: 2px !important; `,Ce=V().td.attrs({className:"yoast-table--nopadding"})` & > div { justify-content: center; } `,Ee=V().div` display: flex; align-items: center; & > a { box-sizing: border-box; } `,Le=V().button` background: none; color: inherit; border: none; padding: 0; font: inherit; cursor: pointer; outline: inherit; display: flex; align-items: center; `,Ae=V().tr` background-color: ${e=>e.isEnabled?"#FFFFFF":"#F9F9F9"} !important; `;function Fe(e){return Math.round(100*e)}function qe({chartData:e={}}){if((0,n.isEmpty)(e)||(0,n.isEmpty)(e.position))return"?";const t=function(e){return Array.from({length:e.position.history.length},(e,t)=>t+1).map(e=>(0,l.sprintf)((0,l._n)("%d day","%d days",e,"wordpress-seo"),e))}(e),s=e.position.history.map((e,t)=>({x:t,y:31-e.value}));return(0,d.jsx)(_e,{width:66,height:24,data:s,strokeWidth:1.8,strokeColor:"#498afc",fillColor:"#ade3fc",mapChartDataToTableData:Fe,dataTableCaption:(0,l.__)("Keyphrase position in the last 90 days on a scale from 0 to 30.","wordpress-seo"),dataTableHeaderLabels:t})}function Pe({keyphrase:e,isEnabled:t,toggleAction:s,isLoading:i}){return i?(0,d.jsx)(O.SvgIcon,{icon:"loading-spinner"}):(0,d.jsx)(O.Toggle,{id:`toggle-keyphrase-tracking-${e}`,className:"wincher-toggle",isEnabled:t,onSetToggleState:s,showToggleStateLabel:!1})}function Me(e){return!e||!e.position||e.position.value>30?"> 30":e.position.value}qe.propTypes={chartData:o().object};const De=({rowData:t={}})=>{var s;if(null==t||null===(s=t.position)||void 0===s||!s.change)return(0,d.jsx)(qe,{chartData:t});const i=t.position.change<0;return(0,d.jsxs)(e.Fragment,{children:[(0,d.jsx)(qe,{chartData:t}),(0,d.jsx)(je,{isImproving:i,children:Math.abs(t.position.change)}),(0,d.jsx)(Re,{icon:"caret-right",color:i?"#69AB56":"#DC3332",size:"14px",isImproving:i})]})};function Oe({rowData:t,websiteId:s,keyphrase:i,onSelectKeyphrases:o}){const r=(0,e.useCallback)(()=>{o([i])},[o,i]),a=!(0,n.isEmpty)(t),c=t&&t.updated_at&&me()(t.updated_at)>=me()().subtract(7,"days"),p=t?`https://app.wincher.com/websites/${s}/keywords?serp=${t.id}&utm_medium=plugin&utm_source=yoast&referer=yoast&partner=yoast`:null;return a?c?(0,d.jsxs)(e.Fragment,{children:[(0,d.jsx)("td",{children:(0,d.jsxs)(Ee,{children:[Me(t),(0,d.jsx)(O.ButtonStyledLink,{variant:"secondary",href:p,style:{height:28,marginLeft:12},rel:"noopener",target:"_blank",children:(0,l.__)("View","wordpress-seo")})]})}),(0,d.jsx)("td",{className:"yoast-table--nopadding",children:(0,d.jsx)(Le,{type:"button",onClick:r,children:(0,d.jsx)(De,{rowData:t})})}),(0,d.jsx)("td",{children:(u=t.updated_at,me()(u).fromNow())})]}):(0,d.jsx)("td",{className:"yoast-table--nopadding",colSpan:"3",children:(0,d.jsx)(Te,{})}):(0,d.jsx)("td",{className:"yoast-table--nopadding",colSpan:"3",children:(0,d.jsx)("i",{children:(0,l.__)("Activate tracking to show the ranking position","wordpress-seo")})});var u}function Ne({keyphrase:t,rowData:s={},onTrackKeyphrase:i=n.noop,onUntrackKeyphrase:o=n.noop,isFocusKeyphrase:r=!1,isDisabled:a=!1,isLoading:l=!1,websiteId:c="",isSelected:p,onSelectKeyphrases:u}){var h;const m=!(0,n.isEmpty)(s),g=!(0,n.isEmpty)(null==s||null===(h=s.position)||void 0===h?void 0:h.history),y=(0,e.useCallback)(()=>{a||(m?o(t,s.id):i(t))},[t,i,o,m,s,a]),w=(0,e.useCallback)(()=>{u(e=>p?e.filter(e=>e!==t):e.concat(t))},[u,p,t]);return(0,d.jsxs)(Ae,{isEnabled:m,children:[(0,d.jsx)(Se,{children:g&&(0,d.jsx)(O.Checkbox,{id:"select-"+t,onChange:w,checked:p,label:""})}),(0,d.jsxs)(Ie,{children:[t,r&&(0,d.jsx)("span",{children:"*"})]}),Oe({rowData:s,websiteId:c,keyphrase:t,onSelectKeyphrases:u}),(0,d.jsx)(Ce,{children:Pe({keyphrase:t,isEnabled:m,toggleAction:y,isLoading:l})})]})}De.propTypes={rowData:o().object},Ne.propTypes={rowData:o().object,keyphrase:o().string.isRequired,onTrackKeyphrase:o().func,onUntrackKeyphrase:o().func,isFocusKeyphrase:o().bool,isDisabled:o().bool,isLoading:o().bool,websiteId:o().string,isSelected:o().bool.isRequired,onSelectKeyphrases:o().func.isRequired};const Ue=(0,ie.makeOutboundLink)(),We=V().span` display: block; font-style: italic; @media (min-width: 782px) { display: inline; position: absolute; ${(0,ie.getDirectionalStyle)("right","left")}: 8px; } `,$e=V().div` width: 100%; overflow-y: auto; `,Be=V().th` pointer-events: ${e=>e.isDisabled?"none":"initial"}; padding-right: 0 !important; & > div { margin: 0px; } `,He=V().th` padding-left: 2px !important; `,Ke=t=>{const s=(0,e.useRef)();return(0,e.useEffect)(()=>{s.current=t}),s.current},Ye=({addTrackedKeyphrase:t,isLoggedIn:s=!1,isNewlyAuthenticated:i=!1,keyphrases:o=[],newRequest:r,removeTrackedKeyphrase:a,setRequestFailed:c,setKeyphraseLimitReached:p,setRequestSucceeded:u,setTrackedKeyphrases:h,setHasTrackedAll:m,trackAll:g=!1,trackedKeyphrases:y=null,websiteId:w="",permalink:f,focusKeyphrase:x="",startAt:b=null,selectedKeyphrases:v,onSelectKeyphrases:k})=>{const _=(0,e.useRef)(),T=(0,e.useRef)(),R=(0,e.useRef)(!1),[j,S]=(0,e.useState)([]),I=(0,e.useCallback)(e=>{const t=e.toLowerCase();return y&&!(0,n.isEmpty)(y)&&Object.prototype.hasOwnProperty.call(y,t)?y[t]:null},[y]),C=(0,e.useMemo)(()=>async()=>{await we(()=>{var e;return T.current&&T.current.abort(),T.current="undefined"==typeof AbortController?null:new AbortController,async function(e=null,t=null,s=null,i){return await fe({path:"yoast/v1/wincher/keyphrases",method:"POST",data:{keyphrases:e,permalink:s,startAt:t},signal:i})}(o,b,f,null===(e=T.current)||void 0===e?void 0:e.signal)},e=>{u(e),h(e.results)},e=>{c(e)})},[u,c,h,o,f,b]),E=(0,e.useCallback)(async e=>{const s=(Array.isArray(e)?e:[e]).map(e=>e.toLowerCase());S(e=>[...e,...s]),await we(()=>xe(s),e=>{u(e),t(e.results),C()},e=>{400===e.status&&e.limit&&p(e.limit),c(e)},201),S(e=>(0,n.without)(e,...s))},[u,c,p,t,C]),L=(0,e.useCallback)(async(e,t)=>{e=e.toLowerCase(),S(t=>[...t,e]),await we(()=>async function(e){return await fe({path:"yoast/v1/wincher/keyphrases/untrack",method:"DELETE",data:{keyphraseID:e}})}(t),t=>{u(t),a(e)},e=>{c(e)}),S(t=>(0,n.without)(t,e))},[u,a,c]),A=(0,e.useCallback)(async e=>{r(),await E(e)},[r,E]),F=Ke(f),q=Ke(o),P=Ke(b),M=f&&b;(0,e.useEffect)(()=>{s&&M&&(f!==F||(0,n.difference)(o,q).length||b!==P)&&C()},[s,f,F,o,q,C,M,b,P]),(0,e.useEffect)(()=>{if(s&&g&&null!==y){const e=o.filter(e=>!I(e));e.length&&E(e),m()}},[s,g,y,E,m,I,o]),(0,e.useEffect)(()=>{i&&!R.current&&(C(),R.current=!0)},[i,C]),(0,e.useEffect)(()=>{if(s&&!(0,n.isEmpty)(y))return(0,n.filter)(y,e=>(0,n.isEmpty)(e.updated_at)).length>0&&(_.current=setInterval(()=>{C()},1e4)),()=>{clearInterval(_.current)}},[s,y,C]);const D=s&&null===y,N=(0,e.useMemo)(()=>(0,n.isEmpty)(y)?[]:Object.values(y).filter(e=>{var t;return!(0,n.isEmpty)(null==e||null===(t=e.position)||void 0===t?void 0:t.history)}).map(e=>e.keyword),[y]),U=(0,e.useMemo)(()=>v.length>0&&N.length>0&&N.every(e=>v.includes(e)),[v,N]),W=(0,e.useCallback)(()=>{k(U?[]:N)},[k,U,N]),$=(0,e.useMemo)(()=>(0,n.orderBy)(o,[e=>Object.values(y||{}).map(e=>e.keyword).includes(e)],["desc"]),[o,y]);return o&&!(0,n.isEmpty)(o)&&(0,d.jsxs)(e.Fragment,{children:[(0,d.jsx)($e,{children:(0,d.jsxs)("table",{className:"yoast yoast-table",children:[(0,d.jsx)("thead",{children:(0,d.jsxs)("tr",{children:[(0,d.jsx)(Be,{isDisabled:0===N.length,children:(0,d.jsx)(O.Checkbox,{id:"select-all",onChange:W,checked:U,label:""})}),(0,d.jsx)(He,{scope:"col",abbr:(0,l.__)("Keyphrase","wordpress-seo"),children:(0,l.__)("Keyphrase","wordpress-seo")}),(0,d.jsx)("th",{scope:"col",abbr:(0,l.__)("Position","wordpress-seo"),children:(0,l.__)("Position","wordpress-seo")}),(0,d.jsx)("th",{scope:"col",abbr:(0,l.__)("Position over time","wordpress-seo"),children:(0,l.__)("Position over time","wordpress-seo")}),(0,d.jsx)("th",{scope:"col",abbr:(0,l.__)("Last updated","wordpress-seo"),children:(0,l.__)("Last updated","wordpress-seo")}),(0,d.jsx)("th",{scope:"col",abbr:(0,l.__)("Tracking","wordpress-seo"),children:(0,l.__)("Tracking","wordpress-seo")})]})}),(0,d.jsx)("tbody",{children:$.map((e,t)=>(0,d.jsx)(Ne,{keyphrase:e,onTrackKeyphrase:A,onUntrackKeyphrase:L,rowData:I(e),isFocusKeyphrase:e===x.trim().toLowerCase(),websiteId:w,isDisabled:!s,isLoading:D||j.indexOf(e.toLowerCase())>=0,isSelected:v.includes(e),onSelectKeyphrases:k},`trackable-keyphrase-${t}`))})]})}),(0,d.jsxs)("p",{style:{marginBottom:0,position:"relative"},children:[(0,d.jsx)(Ue,{href:wpseoAdminGlobalL10n["links.wincher.login"],children:(0,l.sprintf)(/* translators: %s expands to Wincher */ /* translators: %s expands to Wincher */ (0,l.__)("Get more insights over at %s","wordpress-seo"),"Wincher")}),(0,d.jsx)(We,{children:(0,l.__)("* focus keyphrase","wordpress-seo")})]})]})};Ye.propTypes={addTrackedKeyphrase:o().func.isRequired,isLoggedIn:o().bool,isNewlyAuthenticated:o().bool,keyphrases:o().array,newRequest:o().func.isRequired,removeTrackedKeyphrase:o().func.isRequired,setRequestFailed:o().func.isRequired,setKeyphraseLimitReached:o().func.isRequired,setRequestSucceeded:o().func.isRequired,setTrackedKeyphrases:o().func.isRequired,setHasTrackedAll:o().func.isRequired,trackAll:o().bool,trackedKeyphrases:o().object,websiteId:o().string,permalink:o().string.isRequired,focusKeyphrase:o().string,startAt:o().string,selectedKeyphrases:o().arrayOf(o().string).isRequired,onSelectKeyphrases:o().func.isRequired};const ze=Ye,Ve=(0,Q.compose)([(0,a.withSelect)(e=>{const{getWincherWebsiteId:t,getWincherTrackableKeyphrases:s,getWincherLoginStatus:i,getWincherPermalink:o,getFocusKeyphrase:r,isWincherNewlyAuthenticated:n,shouldWincherTrackAll:a}=e("yoast-seo/editor");return{focusKeyphrase:r(),keyphrases:s(),isLoggedIn:i(),trackAll:a(),websiteId:t(),isNewlyAuthenticated:n(),permalink:o()}}),(0,a.withDispatch)(e=>{const{setWincherNewRequest:t,setWincherRequestSucceeded:s,setWincherRequestFailed:i,setWincherSetKeyphraseLimitReached:o,setWincherTrackedKeyphrases:r,setWincherTrackingForKeyphrase:n,setWincherTrackAllKeyphrases:a,unsetWincherTrackingForKeyphrase:l}=e("yoast-seo/editor");return{newRequest:()=>{t()},setRequestSucceeded:e=>{s(e)},setRequestFailed:e=>{i(e)},setKeyphraseLimitReached:e=>{o(e)},addTrackedKeyphrase:e=>{n(e)},removeTrackedKeyphrase:e=>{l(e)},setTrackedKeyphrases:e=>{r(e)},setHasTrackedAll:()=>{a(!1)}}})])(ze);class Ge{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 Ze=()=>(0,d.jsx)(O.Alert,{type:"info",children:(0,l.sprintf)(/* translators: %s: Expands to "Wincher". */ /* translators: %s: Expands to "Wincher". */ (0,l.__)("Automatic tracking of keyphrases is enabled. Your keyphrase(s) will automatically be tracked by %s when you publish your post.","wordpress-seo"),"Wincher")}),Xe=()=>(0,d.jsx)(O.Alert,{type:"success",children:(0,l.sprintf)(/* translators: %s: Expands to "Wincher". */ /* translators: %s: Expands to "Wincher". */ (0,l.__)("You have successfully connected to %s! You can now track the SEO performance for the keyphrase(s) of this page.","wordpress-seo"),"Wincher")}),Qe=()=>(0,d.jsx)(O.Alert,{type:"info",children:(0,l.sprintf)(/* translators: %s: Expands to "Wincher". */ /* translators: %s: Expands to "Wincher". */ (0,l.__)("%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")}),Je=(0,ie.makeOutboundLink)(),et=(0,ie.makeOutboundLink)(),tt=()=>{const e=(0,l.sprintf)(/* translators: %1$s expands to a link to Wincher, %2$s expands to a link to the keyphrase tracking article on Yoast.com */ /* translators: %1$s expands to a link to Wincher, %2$s expands to a link to the keyphrase tracking article on Yoast.com */ (0,l.__)("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,d.jsx)("p",{children:c(e,{wincherLink:(0,d.jsx)(Je,{href:wpseoAdminGlobalL10n["links.wincher.website"],children:"Wincher"}),wincherReadMoreLink:(0,d.jsx)(et,{href:wpseoAdminL10n["shortlinks.wincher.seo_performance"],children:(0,l.__)("Read more about keyphrase tracking with Wincher","wordpress-seo")})})})},st=(0,ie.makeOutboundLink)(),it=({limit:e=10})=>{const t=(0,l.sprintf)(/* translators: %1$d expands to the amount of allowed keyphrases on a free account, %2$s expands to a link to Wincher plans. */ /* translators: %1$d expands to the amount of allowed keyphrases on a free account, %2$s expands to a link to Wincher plans. */ (0,l.__)("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,"<UpdateWincherPlanLink/>");return(0,d.jsx)(O.Alert,{type:"error",children:c(t,{UpdateWincherPlanLink:(0,d.jsx)(st,{href:wpseoAdminGlobalL10n["links.wincher.pricing"],children:(0,l.sprintf)(/* translators: %s : Expands to "Wincher". */ /* translators: %s : Expands to "Wincher". */ (0,l.__)("upgrade your %s plan","wordpress-seo"),"Wincher")})})})};it.propTypes={limit:o().number};const ot=it,rt=()=>(0,d.jsx)(O.Alert,{type:"error",children:(0,l.__)("No keyphrase has been set. Please set a keyphrase first.","wordpress-seo")}),nt=()=>(0,d.jsx)(O.Alert,{type:"error",children:(0,l.__)("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")}),at=({onReconnect:e,className:t=""})=>{const s=(0,l.sprintf)(/* translators: %s expands to a link to open the Wincher login popup. */ /* translators: %s expands to a link to open the Wincher login popup. */ (0,l.__)("It seems like something went wrong when retrieving your website's data. Please %s and try again.","wordpress-seo"),"<reconnectToWincher/>","Wincher");return(0,d.jsx)(O.Alert,{type:"error",className:t,children:c(s,{reconnectToWincher:(0,d.jsx)("a",{href:"#",onClick:t=>{t.preventDefault(),e()},children:(0,l.sprintf)(/* translators: %s : Expands to "Wincher". */ /* translators: %s : Expands to "Wincher". */ (0,l.__)("reconnect to %s","wordpress-seo"),"Wincher")})})})};at.propTypes={onReconnect:o().func.isRequired,className:o().string};const lt=at,ct=()=>(0,d.jsx)(O.Alert,{type:"error",children:(0,l.__)("Something went wrong while tracking the ranking position(s) of your page. Please try again later.","wordpress-seo")}),dt=V().p` color: ${N.colors.$color_pink_dark}; font-size: 14px; font-weight: 700; margin: 13px 0 10px; `,pt=V()(O.SvgIcon)` margin-right: 5px; vertical-align: middle; `,ut=V().button` position: absolute; top: 9px; right: 9px; border: none; background: none; cursor: pointer; `,ht=V().p` font-size: 13px; font-weight: 500; margin: 10px 0 13px; `,mt=V().div` position: relative; background: ${e=>e.isTitleShortened?"#f5f7f7":"transparent"}; border: 1px solid #c7c7c7; border-left: 4px solid${N.colors.$color_pink_dark}; padding: 0 16px; margin-bottom: 1.5em; `,gt=({limit:e,usage:t,isTitleShortened:s=!1,isFreeAccount:i=!1})=>{const o=(0,l.sprintf)( /* Translators: %1$s expands to the number of used keywords. * %2$s expands to the account keywords limit. */ /* Translators: %1$s expands to the number of used keywords. * %2$s expands to the account keywords limit. */ (0,l.__)("Your are tracking %1$s out of %2$s keyphrases included in your free account.","wordpress-seo"),t,e),r=(0,l.sprintf)( /* Translators: %1$s expands to the number of used keywords. * %2$s expands to the account keywords limit. */ /* Translators: %1$s expands to the number of used keywords. * %2$s expands to the account keywords limit. */ (0,l.__)("Your are tracking %1$s out of %2$s keyphrases included in your account.","wordpress-seo"),t,e),n=i?o:r,a=(0,l.sprintf)( /* Translators: %1$s expands to the number of used keywords. * %2$s expands to the account keywords limit. */ /* Translators: %1$s expands to the number of used keywords. * %2$s expands to the account keywords limit. */ (0,l.__)("Keyphrases tracked: %1$s/%2$s","wordpress-seo"),t,e),c=s?a:n;return(0,d.jsxs)(dt,{children:[s&&(0,d.jsx)(pt,{icon:"exclamation-triangle",color:N.colors.$color_pink_dark,size:"14px"}),c]})};gt.propTypes={limit:o().number.isRequired,usage:o().number.isRequired,isTitleShortened:o().bool,isFreeAccount:o().bool};const yt=(0,ie.makeOutboundLink)(),wt=({discount:e,months:t})=>{const s=(0,d.jsx)(yt,{href:wpseoAdminGlobalL10n["links.wincher.upgrade"],style:{fontWeight:600},children:(0,l.sprintf)(/* Translators: %s : Expands to "Wincher". */ /* Translators: %s : Expands to "Wincher". */ (0,l.__)("Click here to upgrade your %s plan","wordpress-seo"),"Wincher")});if(!e||!t)return(0,d.jsx)(ht,{children:s});const i=100*e,o=(0,l.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. */ /* 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,l.__)("%1$s and get an exclusive %2$s discount for %3$s month(s).","wordpress-seo"),"<wincherAccountUpgradeLink/>",i+"%",t);return(0,d.jsx)(ht,{children:c(o,{wincherAccountUpgradeLink:s})})};wt.propTypes={discount:o().number,months:o().number};const ft=({onClose:t=null,isTitleShortened:s=!1,trackingInfo:i=null})=>{const o=(()=>{const[t,s]=(0,e.useState)(null);return(0,e.useEffect)(()=>{t||async function(){return await fe({path:"yoast/v1/wincher/account/upgrade-campaign",method:"GET"})}().then(e=>s(e))},[t]),t})();if(null===i)return null;const{limit:r,usage:n}=i;if(!(r&&n/r>=.8))return null;const a=Boolean(null==o?void 0:o.discount);return(0,d.jsxs)(mt,{isTitleShortened:s,children:[t&&(0,d.jsx)(ut,{type:"button","aria-label":(0,l.__)("Close the upgrade callout","wordpress-seo"),onClick:t,children:(0,d.jsx)(O.SvgIcon,{icon:"times-circle",color:N.colors.$color_pink_dark,size:"14px"})}),(0,d.jsx)(gt,{...i,isTitleShortened:s,isFreeAccount:a}),(0,d.jsx)(wt,{discount:null==o?void 0:o.discount,months:null==o?void 0:o.months})]})};ft.propTypes={onClose:o().func,isTitleShortened:o().bool,trackingInfo:o().object};const xt=ft,bt=window.yoast["chart.js"],vt="label";function kt(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function _t(e,t){e.labels=t}function Tt(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:vt;const i=[];e.datasets=t.map(t=>{const o=e.datasets.find(e=>e[s]===t[s]);return o&&t.data&&!i.includes(o)?(i.push(o),Object.assign(o,t),o):{...t}})}function Rt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vt;const s={labels:[],datasets:[]};return _t(s,e.labels),Tt(s,e.datasets,t),s}function jt(e,t){const{height:s=150,width:i=300,redraw:o=!1,datasetIdKey:r,type:n,data:a,options:l,plugins:c=[],fallbackContent:d,updateMode:p,...u}=e,h=(0,f.useRef)(null),m=(0,f.useRef)(),g=()=>{h.current&&(m.current=new bt.Chart(h.current,{type:n,data:Rt(a,r),options:l&&{...l},plugins:c}),kt(t,m.current))},y=()=>{kt(t,null),m.current&&(m.current.destroy(),m.current=null)};return(0,f.useEffect)(()=>{!o&&m.current&&l&&function(e,t){const s=e.options;s&&t&&Object.assign(s,t)}(m.current,l)},[o,l]),(0,f.useEffect)(()=>{!o&&m.current&&_t(m.current.config.data,a.labels)},[o,a.labels]),(0,f.useEffect)(()=>{!o&&m.current&&a.datasets&&Tt(m.current.config.data,a.datasets,r)},[o,a.datasets]),(0,f.useEffect)(()=>{m.current&&(o?(y(),setTimeout(g)):m.current.update(p))},[o,l,a.labels,a.datasets,p]),(0,f.useEffect)(()=>{m.current&&(y(),setTimeout(g))},[n]),(0,f.useEffect)(()=>(g(),()=>y()),[]),f.createElement("canvas",Object.assign({ref:h,role:"img",height:s,width:i},u),d)}const St=(0,f.forwardRef)(jt);function It(e,t){return bt.Chart.register(t),(0,f.forwardRef)((t,s)=>f.createElement(St,Object.assign({},t,{ref:s,type:e})))}const Ct=It("line",bt.LineController),Et={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"};bt._adapters._date.override("function"==typeof me()?{_id:"moment",formats:function(){return Et},parse:function(e,t){return"string"==typeof e&&"string"==typeof t?e=me()(e,t):e instanceof me()||(e=me()(e)),e.isValid()?e.valueOf():null},format:function(e,t){return me()(e).format(t)},add:function(e,t,s){return me()(e).add(t,s).valueOf()},diff:function(e,t,s){return me()(e).diff(me()(t),s)},startOf:function(e,t,s){return e=me()(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 me()(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 Lt=["top","right","bottom","left"];function At(e,t,s){const i={};s=s?"-"+s:"";for(let o=0;o<4;o++){const r=Lt[o];i[r]=parseFloat(e[t+"-"+r+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){}}(),bt.Chart.register(bt.CategoryScale,bt.LineController,bt.LineElement,bt.PointElement,bt.LinearScale,bt.TimeScale,bt.Legend,bt.Tooltip);const Ft=["#ff983b","#ffa3f7","#3798ff","#ff3b3b","#acce81","#b51751","#3949ab","#26c6da","#ccb800","#de66ff","#4db6ac","#ffab91","#45f5f1","#77f210","#90a4ae","#ffd54f","#006b5e","#8ec7d2","#b1887c","#cc9300"];function qt({datasets:t,isChartShown:s,keyphrases:i}){if(!s)return null;const o=(0,e.useMemo)(()=>Object.fromEntries([...i].sort().map((e,t)=>[e,Ft[t%Ft.length]])),[i]),r=t.map(e=>{const t=o[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,d.jsx)(Ct,{height:100,data:{datasets:r},options:{plugins:{legend:{display:!0,position:"bottom",labels:{color:"black",usePointStyle:!0,boxHeight:7,boxWidth:7},onClick:n.noop},tooltip:{enabled:!0,callbacks:{title:e=>me()(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:31}}}})}bt.Interaction.modes.xPoint=(e,t,s,i)=>{const o=function(e,t){if("native"in e)return e;const{canvas:s,currentDevicePixelRatio:i}=t,o=(h=s).ownerDocument.defaultView.getComputedStyle(h,null),r="border-box"===o.boxSizing,n=At(o,"padding"),a=At(o,"border","width"),{x:l,y:c,box:d}=function(e,t){const s=e.touches,i=s&&s.length?s[0]:e,{offsetX:o,offsetY:r}=i;let n,a,l=!1;if(((e,t,s)=>(e>0||t>0)&&(!s||!s.shadowRoot))(o,r,e.target))n=o,a=r;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 r&&(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 r=[];if(bt.Interaction.evaluateInteractionItems(e,"x",o,(e,t,s)=>{e.inXRange(o.x,i)&&r.push({element:e,datasetIndex:t,index:s})}),0===r.length)return r;const n=r.reduce((e,t)=>Math.abs(o.x-e.element.x)<Math.abs(o.x-t.element.x)?e:t).element.x;return r=r.filter(e=>e.element.x===n),r.some(e=>Math.abs(e.element.y-o.y)<10)?r:[]},qt.propTypes={datasets:o().arrayOf(o().shape({label:o().string.isRequired,data:o().arrayOf(o().shape({datetime:o().string.isRequired,value:o().number.isRequired})).isRequired,selected:o().bool})).isRequired,isChartShown:o().bool.isRequired,keyphrases:o().array.isRequired};const Pt=({response:e,onLogin:t})=>[401,403,404].includes(e.status)?(0,d.jsx)(lt,{onReconnect:t}):(0,d.jsx)(ct,{});Pt.propTypes={response:o().object.isRequired,onLogin:o().func.isRequired};const Mt=({isSuccess:e,response:t={},allKeyphrasesMissRanking:s,onLogin:i,keyphraseLimitReached:o,limit:r})=>o?(0,d.jsx)(ot,{limit:r}):(0,n.isEmpty)(t)||e?s?(0,d.jsx)(Qe,{}):null:(0,d.jsx)(Pt,{response:t,onLogin:i});Mt.propTypes={isSuccess:o().bool.isRequired,allKeyphrasesMissRanking:o().bool.isRequired,response:o().object,onLogin:o().func.isRequired,keyphraseLimitReached:o().bool.isRequired,limit:o().number.isRequired};let Dt=null;const Ot=async({onAuthentication:e,setRequestSucceeded:t,setRequestFailed:s,keyphrases:i,addTrackedKeyphrase:o,setKeyphraseLimitReached:r})=>{if(Dt&&!Dt.isClosed())return void Dt.focus();const{url:n}=await async function(){return await fe({path:"yoast/v1/wincher/authorization-url",method:"GET"})}();Dt=new Ge(n,{success:{type:"wincher:oauth:success",callback:n=>(async({onAuthentication:e,setRequestSucceeded:t,setRequestFailed:s,keyphrases:i,addTrackedKeyphrase:o,setKeyphraseLimitReached:r},n)=>{await we(()=>async function(e){const{code:t,websiteId:s}=e;return await fe({path:"yoast/v1/wincher/authenticate",method:"POST",data:{code:t,websiteId:s}})}(n),async a=>{e(!0,!0,n.websiteId.toString()),t(a);const l=(Array.isArray(i)?i:[i]).map(e=>e.toLowerCase());await we(()=>xe(l),e=>{t(e),o(e.results)},e=>{400===e.status&&e.limit&&r(e.limit),s(e)},201);const c=Dt.getPopup();c&&c.close()},async e=>s(e))})({onAuthentication:e,setRequestSucceeded:t,setRequestFailed:s,keyphrases:i,addTrackedKeyphrase:o,setKeyphraseLimitReached:r},n)},error:{type:"wincher:oauth:error",callback:()=>e(!1,!1)}},{title:"Wincher_login",width:500,height:700}),Dt.createPopup()},Nt=e=>e.isLoggedIn?null:(0,d.jsx)("p",{children:(0,d.jsx)(O.NewButton,{onClick:e.onLogin,variant:"primary",children:(0,l.sprintf)(/* translators: %s expands to Wincher */ /* translators: %s expands to Wincher */ (0,l.__)("Connect with %s","wordpress-seo"),"Wincher")})});Nt.propTypes={isLoggedIn:o().bool.isRequired,onLogin:o().func.isRequired};const Ut=V().div` p { margin: 1em 0; } `,Wt=V().div` ${e=>e.isDisabled&&"\n\t\topacity: .5;\n\t\tpointer-events: none;\n\t"}; `,$t=V().div` font-weight: var(--yoast-font-weight-bold); color: var(--yoast-color-label); font-size: var(--yoast-font-size-default); `,Bt=V().div.attrs({className:"yoast-field-group"})` display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; `,Ht=V().div` margin: 8px 0; `,Kt=me().utc().startOf("day"),Yt=[{name:(0,l.__)("Last day","wordpress-seo"),value:me()(Kt).subtract(1,"days").format(),defaultIndex:1},{name:(0,l.__)("Last week","wordpress-seo"),value:me()(Kt).subtract(1,"week").format(),defaultIndex:2},{name:(0,l.__)("Last month","wordpress-seo"),value:me()(Kt).subtract(1,"month").format(),defaultIndex:3},{name:(0,l.__)("Last year","wordpress-seo"),value:me()(Kt).subtract(1,"year").format(),defaultIndex:0}],zt=({onSelect:e,selected:t=null,options:s,isLoggedIn:i})=>i?s.length<1?null:(0,d.jsx)("select",{className:"components-select-control__input",id:"wincher-period-picker",value:(null==t?void 0:t.value)||s[0].value,onChange:e,children:s.map(e=>(0,d.jsx)("option",{value:e.value,children:e.name},e.name))}):null;zt.propTypes={onSelect:o().func.isRequired,selected:o().object,options:o().array.isRequired,isLoggedIn:o().bool.isRequired};const Vt=({trackedKeyphrases:t=null,isLoggedIn:s,keyphrases:i,shouldTrackAll:o,permalink:r,historyDaysLimit:a=0})=>{if(!r&&s)return(0,d.jsx)(nt,{});if(0===i.length)return(0,d.jsx)(rt,{});const c=me()(Kt).subtract(a,"days"),p=Yt.filter(e=>me()(e.value).isSameOrAfter(c)),u=(0,n.orderBy)(p,e=>e.defaultIndex,"desc")[0],[h,m]=(0,e.useState)(u),[g,y]=(0,e.useState)([]),w=g.length>0,f=(0,Q.usePrevious)(t);(0,e.useEffect)(()=>{if(!(0,n.isEmpty)(t)&&(0,n.difference)(Object.keys(t),Object.keys(f||[])).length){const e=Object.values(t).map(e=>e.keyword);y(e)}},[t,f]),(0,e.useEffect)(()=>{m(u)},[null==u?void 0:u.name]);const x=(0,e.useCallback)(e=>{const t=Yt.find(t=>t.value===e.target.value);t&&m(t)},[m]),b=(0,e.useMemo)(()=>(0,n.isEmpty)(g)||(0,n.isEmpty)(t)?[]:Object.values(t).filter(e=>{var t;return!(null==e||null===(t=e.position)||void 0===t||!t.history)}).map(e=>{var t;return{label:e.keyword,data:e.position.history,selected:g.includes(e.keyword)&&!(0,n.isEmpty)(null===(t=e.position)||void 0===t?void 0:t.history)}}),[g,t]);return(0,d.jsxs)(Wt,{isDisabled:!s,children:[(0,d.jsx)("p",{children:(0,l.__)("You can enable / disable tracking the SEO performance for each keyphrase below.","wordpress-seo")}),s&&o&&(0,d.jsx)(Ze,{}),(0,d.jsx)(Bt,{children:(0,d.jsx)(zt,{selected:h,onSelect:x,options:p,isLoggedIn:s})}),(0,d.jsx)(Ht,{children:(0,d.jsx)(qt,{isChartShown:w,datasets:b,keyphrases:i})}),(0,d.jsx)(Ve,{startAt:null==h?void 0:h.value,selectedKeyphrases:g,onSelectKeyphrases:y,trackedKeyphrases:t})]})};function Gt({trackedKeyphrases:t=null,addTrackedKeyphrase:s,isLoggedIn:i=!1,isNewlyAuthenticated:o=!1,keyphrases:r=[],response:n={},shouldTrackAll:a=!1,permalink:c="",allKeyphrasesMissRanking:p,isSuccess:u,keyphraseLimitReached:h,limit:m,setRequestSucceeded:g,setRequestFailed:y,setKeyphraseLimitReached:w,onAuthentication:f}){const x=(0,e.useCallback)(()=>{Ot({onAuthentication:f,setRequestSucceeded:g,setRequestFailed:y,keyphrases:r,addTrackedKeyphrase:s,setKeyphraseLimitReached:w})},[Ot,f,g,y,r,s,w]),b=(t=>{const[s,i]=(0,e.useState)(null);return(0,e.useEffect)(()=>{t&&!s&&async function(){return await fe({path:"yoast/v1/wincher/account/limit",method:"GET"})}().then(e=>i(e))},[s]),s})(i);return(0,d.jsxs)(Ut,{children:[o&&(0,d.jsx)(Xe,{}),i&&(0,d.jsx)(xt,{trackingInfo:b}),(0,d.jsxs)($t,{children:[(0,l.__)("SEO performance","wordpress-seo"),(0,d.jsx)(O.HelpIcon,{linkTo:wpseoAdminL10n["shortlinks.wincher.seo_performance"] /* translators: Hidden accessibility text. */,linkText:(0,l.__)("Learn more about the SEO performance feature.","wordpress-seo")})]}),(0,d.jsx)(tt,{}),(0,d.jsx)(Nt,{isLoggedIn:i,onLogin:x}),(0,d.jsx)(Mt,{isSuccess:u,response:n,allKeyphrasesMissRanking:p,keyphraseLimitReached:h,limit:m,onLogin:x}),(0,d.jsx)(Vt,{trackedKeyphrases:t,isLoggedIn:i,keyphrases:r,shouldTrackAll:a,permalink:c,historyDaysLimit:(null==b?void 0:b.historyDays)||31})]})}Vt.propTypes={trackedKeyphrases:o().object,keyphrases:o().array.isRequired,isLoggedIn:o().bool.isRequired,shouldTrackAll:o().bool.isRequired,permalink:o().string.isRequired,historyDaysLimit:o().number},Gt.propTypes={trackedKeyphrases:o().object,addTrackedKeyphrase:o().func.isRequired,isLoggedIn:o().bool,isNewlyAuthenticated:o().bool,keyphrases:o().array,response:o().object,shouldTrackAll:o().bool,permalink:o().string,allKeyphrasesMissRanking:o().bool.isRequired,isSuccess:o().bool.isRequired,keyphraseLimitReached:o().bool.isRequired,limit:o().number.isRequired,setRequestSucceeded:o().func.isRequired,setRequestFailed:o().func.isRequired,setKeyphraseLimitReached:o().func.isRequired,onAuthentication:o().func.isRequired};const Zt=(0,Q.compose)([(0,a.withSelect)(e=>{const{isWincherNewlyAuthenticated:t,getWincherKeyphraseLimitReached:s,getWincherLimit:i,getWincherLoginStatus:o,getWincherRequestIsSuccess:r,getWincherRequestResponse:n,getWincherTrackableKeyphrases:a,getWincherTrackedKeyphrases:l,getWincherAllKeyphrasesMissRanking:c,getWincherPermalink:d,shouldWincherAutomaticallyTrackAll:p}=e("yoast-seo/editor");return{keyphrases:a(),trackedKeyphrases:l(),allKeyphrasesMissRanking:c(),isLoggedIn:o(),isNewlyAuthenticated:t(),isSuccess:r(),keyphraseLimitReached:s(),limit:i(),response:n(),shouldTrackAll:p(),permalink:d()}}),(0,a.withDispatch)(e=>{const{setWincherWebsiteId:t,setWincherRequestSucceeded:s,setWincherRequestFailed:i,setWincherTrackingForKeyphrase:o,setWincherSetKeyphraseLimitReached:r,setWincherLoginStatus:n}=e("yoast-seo/editor");return{setRequestSucceeded:e=>{s(e)},setRequestFailed:e=>{i(e)},addTrackedKeyphrase:e=>{o(e)},setKeyphraseLimitReached:e=>{r(e)},onAuthentication:(e,s,i)=>{t(i),n(e,s)}}})])(Gt),Xt=V()(ee())` width: 18px; height: 18px; margin: 3px; `;function Qt({keyphrases:e,onNoKeyphraseSet:t,onOpen:s,location:i}){if(!e.length){let e=document.querySelector("#focus-keyword-input-metabox");return e||(e=document.querySelector("#focus-keyword-input-sidebar")),e.focus(),void t()}s(i)}function Jt({location:t="",whichModalOpen:s="none",shouldCloseOnClickOutside:i=!0,keyphrases:o,onNoKeyphraseSet:r,onOpen:n,onClose:a}){const c=(0,e.useCallback)(()=>{Qt({keyphrases:o,onNoKeyphraseSet:r,onOpen:n,location:t})},[Qt,o,r,n,t]),p=(0,l.__)("Track SEO performance","wordpress-seo"),u=((e=null)=>(0,f.useMemo)(()=>{const t={role:"img","aria-hidden":"true"};return null!==e&&(t.focusable=e?"true":"false"),t},[e]))();return(0,d.jsxs)(e.Fragment,{children:[s===t&&(0,d.jsx)(ne,{title:p,onRequestClose:a,icon:(0,d.jsx)(de,{}),additionalClassName:"yoast-wincher-seo-performance-modal yoast-gutenberg-modal__no-padding",shouldCloseOnClickOutside:i,children:(0,d.jsx)(oe,{className:"yoast-gutenberg-modal__content yoast-wincher-seo-performance-modal__content",children:(0,d.jsx)(Zt,{})})}),"sidebar"===t&&(0,d.jsx)(ue,{id:`wincher-open-button-${t}`,title:p,SuffixHeroIcon:(0,d.jsx)(Xt,{className:"yst-text-slate-500",...u}),onClick:c}),"metabox"===t&&(0,d.jsx)("div",{className:"yst-root",children:(0,d.jsxs)(se,{id:`wincher-open-button-${t}`,onClick:c,children:[(0,d.jsx)(se.Text,{children:p}),(0,d.jsx)(ee(),{className:"yst-h-5 yst-w-5 yst-text-slate-500",...u})]})})]})}Jt.propTypes={location:o().string,whichModalOpen:o().oneOf(["none","metabox","sidebar","postpublish"]),shouldCloseOnClickOutside:o().bool,keyphrases:o().array.isRequired,onNoKeyphraseSet:o().func.isRequired,onOpen:o().func.isRequired,onClose:o().func.isRequired};const es=(0,Q.compose)([(0,a.withSelect)(e=>{const{getWincherModalOpen:t,getWincherTrackableKeyphrases:s}=e("yoast-seo/editor");return{keyphrases:s(),whichModalOpen:t()}}),(0,a.withDispatch)(e=>{const{setWincherOpenModal:t,setWincherDismissModal:s,setWincherNoKeyphrase:i}=e("yoast-seo/editor");return{onOpen:e=>{t(e)},onClose:()=>{s()},onNoKeyphraseSet:()=>{i()}}})])(Jt),ts=window.yoast.externals.components;function ss(){return(0,Q.createHigherOrderComponent)(function(t){return(0,Q.pure)(function(s){const i=(0,e.useContext)(Y.LocationContext);return(0,e.createElement)(t,{...s,location:i})})},"withLocation")}const is=(0,Q.compose)([(0,a.withSelect)(e=>{const{isCornerstoneContent:t}=e("yoast-seo/editor");return{isCornerstone:t(),learnMoreUrl:wpseoAdminL10n["shortlinks.cornerstone_content_info"]}}),(0,a.withDispatch)(e=>{const{toggleCornerstoneContent:t}=e("yoast-seo/editor");return{onChange:t}}),ss()])(ts.CollapsibleCornerstone),os=window.yoast.searchMetadataPreviews,rs=V()(O.StyledSection)` &${O.StyledSectionBase} { padding: 0; & ${O.StyledHeading} { ${(0,ie.getDirectionalStyle)("padding-left","padding-right")}: 20px; margin-left: ${(0,ie.getDirectionalStyle)("0","20px")}; } } `,ns=({children:e=null,title:t="",icon:s="",hasPaperStyle:i=!0,shoppingData:o=null})=>(0,d.jsx)(rs,{headingLevel:3,headingText:t,headingIcon:s,headingIconColor:"#555",hasPaperStyle:i,shoppingData:o,children:e});ns.propTypes={children:o().element,title:o().string,icon:o().string,hasPaperStyle:o().bool,shoppingData:o().object};const as=ns,ls=window.wp.sanitize;function cs(e,t,s="",i=!1){return{type:"SNIPPET_EDITOR_UPDATE_REPLACEMENT_VARIABLE",name:e,value:"string"==typeof t?(0,ie.decodeHTML)(t):t,label:s,hidden:i}}function ds(e){return e.charAt(0).toUpperCase()+e.slice(1)}const{stripHTMLTags:ps}=ie.strings,us=["slug","content","contentImage","snippetPreviewImageURL"];function hs(e,t="_"){return e.replace(/\s/g,t)}const ms=(0,n.memoize)((e,t)=>0===e?n.noop:(0,n.debounce)(s=>t(s,e),500)),gs=({link:e,text:t})=>(0,d.jsxs)(r.Root,{children:[(0,d.jsx)("p",{children:t}),(0,d.jsxs)(r.Button,{href:e,as:"a",className:"yst-gap-2 yst-mb-5 yst-mt-2",variant:"upsell",target:"_blank",rel:"noopener",children:[(0,d.jsx)(u(),{className:"yst-w-4 yst-h-4 yst--ms-1 yst-shrink-0"}),(0,l.sprintf)(/* translators: %1$s expands to Yoast WooCommerce SEO. */ /* translators: %1$s expands to Yoast WooCommerce SEO. */ (0,l.__)("Unlock with %1$s","wordpress-seo"),"Yoast WooCommerce SEO")]})]});gs.propTypes={link:o().string.isRequired,text:o().string.isRequired};const ys=gs,ws=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,n.get)(window,["YoastSEO","app","pluggable"],!1);if(!t||!(0,n.get)(window,["YoastSEO","app","pluggable","loaded"],!1))return function(e){const t=(0,n.get)(window,["YoastSEO","wp","replaceVarsPlugin","replaceVariables"],n.identity);return{url:e.url,title:ps(t(e.title)),description:ps(t(e.description)),filteredSEOTitle:e.filteredSEOTitle?ps(t(e.filteredSEOTitle)):""}}(e);const s=t._applyModifications.bind(t);return{url:e.url,title:ps(s("data_page_title",e.title)),description:ps(s("data_meta_desc",e.description)),filteredSEOTitle:e.filteredSEOTitle?ps(s("data_page_title",e.filteredSEOTitle)):""}}(e)},fs=(0,Q.compose)([(0,a.withSelect)(function(e){const{getBaseUrlFromSettings:t,getDateFromSettings:s,getFocusKeyphrase:i,getRecommendedReplaceVars:o,getReplaceVars:r,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=r();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:o(),replacementVariables:y,shoppingData:n(),wordsToHighlight:p(),isCornerstone:u(),isTaxonomy:h(),locale:m(),siteName:g()}}),(0,a.withDispatch)(function(e,t,{select:s}){const{updateData:i,switchMode:o,updateAnalysisData:r,findCustomFields:n}=e("yoast-seo/editor"),a=e("core/editor"),l=s("yoast-seo/editor").getPostId();return{onChange:(e,t)=>{switch(e){case"mode":o(t);break;case"slug":i({slug:t}),a&&a.editPost({slug:t});break;default:i({[e]:t})}},onChangeAnalysisData:r,onReplacementVariableSearchChange:ms(l,n)}})])(e=>{const t=(0,a.useSelect)(e=>e("yoast-seo/editor").selectLink("https://yoa.st/product-google-preview-metabox"),[]),s=(0,a.useSelect)(e=>e("yoast-seo/editor").getIsWooSeoUpsell(),[]),i=(0,l.__)("Want an enhanced Google preview of how your WooCommerce products look in the search results?","wordpress-seo");return(0,d.jsx)(Y.LocationConsumer,{children:o=>(0,d.jsx)(as,{icon:"eye",hasPaperStyle:e.hasPaperStyle,children:(0,d.jsxs)(d.Fragment,{children:[s&&(0,d.jsx)(ys,{link:t,text:i}),(0,d.jsx)(os.SnippetEditor,{...e,descriptionPlaceholder:(0,l.__)("Please provide a meta description by editing the snippet below.","wordpress-seo"),mapEditorDataToPreview:ws,showCloseButton:!1,idSuffix:o})]})})})}),xs=(0,a.withSelect)(e=>{const{getWarningMessage:t}=e("yoast-seo/editor");return{message:t()}})(O.Warning),bs=window.yoast.featureFlag,vs=V()(O.Collapsible)` h2 > button { padding-left: 24px; padding-top: 16px; &:hover { background-color: #f0f0f0; } } div[class^="collapsible_content"] { padding: 24px 0; margin: 0 24px; border-top: 1px solid rgba(0,0,0,0.2); } `,ks=({initialIsOpen:e,id:t,...s})=>(0,d.jsx)(vs,{hasPadding:!0,hasSeparator:!0,initialIsOpen:e,id:t,...s}),_s=()=>{const t=(0,a.useSelect)(e=>e("yoast-seo/editor").getEstimatedReadingTime(),[]),s=(0,e.useMemo)(()=>(0,n.get)(window,"wpseoAdminL10n.shortlinks-insights-estimated_reading_time",""),[]);return(0,d.jsx)(O.InsightsCard,{amount:t,unit:(0,l._n)("minute","minutes",t,"wordpress-seo"),title:(0,l.__)("Reading time","wordpress-seo"),linkTo:s /* translators: Hidden accessibility text. */,linkText:(0,l.__)("Learn more about reading time","wordpress-seo")})},Ts=(0,ie.makeOutboundLink)();function Rs(e,t){return-1===e?(0,l.__)("Your text should be slightly longer to calculate your Flesch reading ease score.","wordpress-seo"):(0,l.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') */ /* 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,l.__)("The copy scores %1$s in the test, which is considered %2$s to read.","wordpress-seo"),e,function(e){switch(e){case U.DIFFICULTY.NO_DATA:return(0,l.__)("no data","wordpress-seo");case U.DIFFICULTY.VERY_EASY:return(0,l.__)("very easy","wordpress-seo");case U.DIFFICULTY.EASY:return(0,l.__)("easy","wordpress-seo");case U.DIFFICULTY.FAIRLY_EASY:return(0,l.__)("fairly easy","wordpress-seo");case U.DIFFICULTY.OKAY:return(0,l.__)("okay","wordpress-seo");case U.DIFFICULTY.FAIRLY_DIFFICULT:return(0,l.__)("fairly difficult","wordpress-seo");case U.DIFFICULTY.DIFFICULT:return(0,l.__)("difficult","wordpress-seo");case U.DIFFICULTY.VERY_DIFFICULT:return(0,l.__)("very difficult","wordpress-seo")}}(t))}const js=()=>{let t=(0,a.useSelect)(e=>e("yoast-seo/editor").getFleschReadingEaseScore(),[]);const s=(0,e.useMemo)(()=>(0,n.get)(window,"wpseoAdminL10n.shortlinks-insights-flesch_reading_ease",""),[]),i=(0,a.useSelect)(e=>e("yoast-seo/editor").getFleschReadingEaseDifficulty(),[t]),o=(0,e.useMemo)(()=>{const e=(0,n.get)(window,"wpseoAdminL10n.shortlinks-insights-flesch_reading_ease_article","");return function(e,t,s){const i=function(e){switch(e){case U.DIFFICULTY.FAIRLY_DIFFICULT:case U.DIFFICULTY.DIFFICULT:case U.DIFFICULTY.VERY_DIFFICULT:return(0,l.__)("Try to make shorter sentences, using less difficult words to improve readability","wordpress-seo");case U.DIFFICULTY.NO_DATA:return(0,l.__)("Continue writing to get insight into the readability of your text!","wordpress-seo");default:return(0,l.__)("Good job!","wordpress-seo")}}(t);return(0,d.jsxs)("span",{children:[Rs(e,t)," ",t>=U.DIFFICULTY.FAIRLY_DIFFICULT?(0,d.jsx)(Ts,{href:s,children:i+"."}):i]})}(t,i,e)},[t,i]);return-1===t&&(t="?"),(0,d.jsx)(O.InsightsCard,{amount:t,unit:(0,l.__)("out of 100","wordpress-seo"),title:(0,l.__)("Flesch reading ease","wordpress-seo"),linkTo:s /* translators: Hidden accessibility text. */,linkText:(0,l.__)("Learn more about Flesch reading ease","wordpress-seo"),description:o})},Ss=({data:t=[],itemScreenReaderText:s="",className:i="",...o})=>{const r=(0,e.useMemo)(()=>{var e,s;return null!==(e=null===(s=(0,n.maxBy)(t,"number"))||void 0===s?void 0:s.number)&&void 0!==e?e:0},[t]);return(0,d.jsx)("ul",{className:q()("yoast-data-model",i),...o,children:t.map(({name:e,number:t})=>(0,d.jsxs)("li",{style:{"--yoast-width":t/r*100+"%"},children:[e,(0,d.jsx)("span",{children:t}),s&&(0,d.jsx)("span",{className:"screen-reader-text",children:(0,l.sprintf)(s,t)})]},`${e}_dataItem`))})};Ss.propTypes={data:o().arrayOf(o().shape({name:o().string.isRequired,number:o().number.isRequired})),itemScreenReaderText:o().string,className:o().string};const Is=Ss,Cs=window.wp.url,Es=(0,ie.makeOutboundLink)(),Ls=({location:t})=>{const s=(0,a.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,a.useSelect)(e=>e("yoast-seo/editor").getPreference("shouldUpsell",!1),[]),o=(0,e.useMemo)(()=>(0,n.get)(window,`wpseoAdminL10n.shortlinks-insights-upsell-${t}-prominent_words`,""),[t]),r=(0,e.useMemo)(()=>{const e=(0,n.get)(window,"wpseoAdminL10n.shortlinks-insights-keyword_research_link","");return c((0,l.sprintf)( // translators: %1$s and %2$s are replaced by opening and closing <a> tags. // translators: %1$s and %2$s are replaced by opening and closing <a> tags. (0,l.__)("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,d.jsx)(Es,{href:e})})},[]),p=(0,e.useMemo)(()=>c((0,l.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`. // 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,l.__)("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,d.jsx)("b",{})}),[]),u=(0,a.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:[]},[]),h=(0,e.useMemo)(()=>{const e=(0,l.sprintf)( // translators: %1$s expands to Yoast SEO Premium. // translators: %1$s expands to Yoast SEO Premium. (0,l.__)("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}))},[]),m=(0,e.useMemo)(()=>i?h:u.map(({word:e,occurrence:t})=>({name:e,number:t})),[u,h]);if(!s)return null;const{locationContext:g}=(0,Y.useRootContext)();return(0,d.jsxs)("div",{className:"yoast-prominent-words",children:[(0,d.jsx)("div",{className:"yoast-field-group__title",children:(0,d.jsx)("b",{children:(0,l.__)("Prominent words","wordpress-seo")})}),!i&&(0,d.jsx)("p",{children:0===m.length?(0,l.__)("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,l.__)("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,d.jsx)("p",{children:p}),i&&(0,d.jsxs)(Es,{href:(0,Cs.addQueryArgs)(o,{context:g}),"data-action":"load-nfd-ctb","data-ctb-id":"f6a84663-465f-4cb5-8ba5-f7a6d72224b2",className:"yoast-button yoast-button-upsell",children:[(0,l.sprintf)( // translators: %s expands to `Premium` (part of add-on name). // translators: %s expands to `Premium` (part of add-on name). (0,l.__)("Unlock with %s","wordpress-seo"),"Premium"),(0,d.jsx)("span",{"aria-hidden":"true",className:"yoast-button-upsell__caret"})]}),(0,d.jsx)("p",{children:r}),(0,d.jsx)(Is,{data:m,itemScreenReaderText:/* translators: Hidden accessibility text; %d expands to the number of occurrences. */ /* translators: Hidden accessibility text; %d expands to the number of occurrences. */ (0,l.__)("%d occurrences","wordpress-seo"),"aria-label":(0,l.__)("Prominent words","wordpress-seo"),className:i?"yoast-data-model--upsell":null})]})};Ls.propTypes={location:o().string.isRequired};const As=Ls,Fs=()=>{const t=(0,a.useSelect)(e=>e("yoast-seo/editor").getTextLength(),[]),s=(0,e.useMemo)(()=>(0,n.get)(window,"wpseoAdminL10n.shortlinks-insights-word_count",""),[]);let i=(0,l._n)("word","words",t.count,"wordpress-seo"),o=(0,l.__)("Word count","wordpress-seo"),r=(0,l.__)("Learn more about word count","wordpress-seo");return"character"===t.unit&&(i=(0,l._n)("character","characters",t.count,"wordpress-seo"),o=(0,l.__)("Character count","wordpress-seo"), /* translators: Hidden accessibility text. */ r=(0,l.__)("Learn more about character count","wordpress-seo")),(0,d.jsx)(O.InsightsCard,{amount:t.count,unit:i,title:o,linkTo:s,linkText:r})},qs=(0,ie.makeOutboundLink)(),Ps=({location:t})=>{const s=(0,e.useMemo)(()=>(0,n.get)(window,`wpseoAdminL10n.shortlinks-insights-upsell-${t}-text_formality`,""),[t]),i=(0,e.useMemo)(()=>c((0,l.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`. // 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,l.__)("%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,d.jsx)("b",{})}),[]);return(0,d.jsx)(e.Fragment,{children:(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{children:i}),(0,d.jsxs)(qs,{href:s,className:"yoast-button yoast-button-upsell",children:[(0,l.sprintf)( // Translators: %s expands to `Premium` (part of add-on name). // Translators: %s expands to `Premium` (part of add-on name). (0,l.__)("Unlock with %s","wordpress-seo"),"Premium"),(0,d.jsx)("span",{"aria-hidden":"true",className:"yoast-button-upsell__caret"})]})]})})};Ps.propTypes={location:o().string.isRequired};const Ms=Ps;function Ds(){return(0,n.get)(window,"wpseoScriptData.metabox",{intl:{},isRtl:!1})}const Os=({location:e,name:s})=>{const i=(0,a.useSelect)(e=>e("yoast-seo/editor").isFormalitySupported(),[]),o=Ds().isPremium,r=o?(0,n.get)(window,"wpseoAdminL10n.shortlinks-insights-text_formality_info_premium",""):(0,n.get)(window,"wpseoAdminL10n.shortlinks-insights-text_formality_info_free",""),c=(0,l.__)("Read more about text formality.","wordpress-seo");return i?(0,d.jsxs)("div",{className:"yoast-text-formality",children:[(0,d.jsxs)("div",{className:"yoast-field-group__title",children:[(0,d.jsx)("b",{children:(0,l.__)("Text formality","wordpress-seo")}),(0,d.jsx)(O.HelpIcon,{linkTo:r,linkText:c})]}),o?(0,d.jsx)(t.Slot,{name:s}):(0,d.jsx)(Ms,{location:e})]}):null};Os.propTypes={location:o().string.isRequired,name:o().string.isRequired};const Ns=Os,Us=({location:e="metabox"})=>{const t=(0,a.useSelect)(e=>e("yoast-seo/editor").isFleschReadingEaseAvailable(),[]);return(0,d.jsxs)(ks,{title:(0,l.__)("Insights","wordpress-seo"),id:`yoast-insights-collapsible-${e}`,className:"yoast-insights",children:[(0,d.jsx)(As,{location:e}),(0,d.jsxs)("div",{children:[t&&(0,d.jsx)("div",{className:"yoast-insights-row",children:(0,d.jsx)(js,{})}),(0,d.jsxs)("div",{className:"yoast-insights-row yoast-insights-row--columns",children:[(0,d.jsx)(_s,{}),(0,d.jsx)(Fs,{})]}),(0,bs.isFeatureEnabled)("TEXT_FORMALITY")&&(0,d.jsx)(Ns,{location:e,name:"YoastTextFormalityMetabox"})]})]})};Us.propTypes={location:o().string};const Ws=Us;var $s=s(465),Bs=s.n($s),Hs=s(7656),Ks=s.n(Hs);const Ys=({isOpen:t,onClose:s,id:i,upsellLink:o,title:n="",description:c="",benefits:p=[],note:h="",ctbId:m="",modalTitle:g})=>{const{isBlackFriday:y,isWooCommerceActive:w,isProductEntity:f,isWooSEOActive:x}=(0,a.useSelect)(e=>{const t=e("yoast-seo/editor");return{isProductEntity:t.getIsProductEntity(),isWooCommerceActive:t.getIsWooCommerceActive(),isBlackFriday:t.isPromotionActive("black-friday-promotion"),isWooSEOActive:t.getIsWooSeoActive()}},[]),b=(0,e.useMemo)(()=>w&&f,[w,f]),v=(0,e.useRef)(null);return(0,d.jsx)(r.Modal,{isOpen:t,onClose:s,id:i,initialFocus:v,children:(0,d.jsx)(r.Modal.Panel,{className:"yst-max-w-md yst-p-0",hasCloseButton:!1,children:(0,d.jsxs)(r.Modal.Container,{children:[(0,d.jsxs)(r.Modal.Container.Header,{className:"yst-p-6 yst-border-b-slate-200 yst-border-b yst-flex yst-justify-start yst-gap-3 yst-items-center",children:[b?(0,d.jsx)(Ks(),{className:"yst-text-woo-light yst-w-6 yst-h-6 yst-scale-x-[-1]"}):(0,d.jsx)(de,{className:"yst-fill-primary-500 yst-w-5 yst-h-5"}),(0,d.jsx)(r.Modal.Title,{as:"h3",className:q()(b?"yst-text-woo-light":"yst-text-primary-500","yst-text-base yst-font-normal"),children:g}),(0,d.jsx)(r.Modal.CloseButton,{className:"yst-top-2",onClick:s,screenReaderText:(0,l.__)("Close modal","wordpress-seo")})]}),(0,d.jsxs)(r.Modal.Container.Content,{className:"yst-p-0",children:[y&&(0,d.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,d.jsx)("div",{className:"yst-mx-auto",children:(0,l.__)("BLACK FRIDAY | 30% OFF","wordpress-seo")})}),(0,d.jsxs)("div",{className:"yst-py-6 yst-px-12",children:[(0,d.jsx)(r.Title,{as:"h3",className:"yst-mb-1 yst-leading-5 yst-text-sm yst-font-medium yst-text-slate-800",children:n}),(0,d.jsx)("p",{className:"yst-mb-2",children:c}),Array.isArray(p)&&p.length>0&&(0,d.jsx)("ul",{className:"yst-my-2",children:p.map((e,t)=>(0,d.jsxs)("li",{className:"yst-flex yst-gap-1 yst-mb-2",children:[(0,d.jsx)(A(),{className:"yst-mr-1 yst-text-green-500 yst-w-[19.5px] yst-h-[19.5px] yst-flex-shrink-0"}),(0,d.jsx)("p",{className:"yst-text-slate-600",children:e})]},`${i}-upsell-benefit-${t}`))}),"function"==typeof p&&p(),(0,d.jsxs)("div",{className:"yst-text-center",children:[(0,d.jsxs)(r.Button,{as:"a",variant:"upsell",className:"yst-my-2 yst-gap-1.5 yst-w-full",href:o,target:"_blank","data-action":"load-nfd-ctb","data-ctb-id":m,ref:v,children:[(0,d.jsx)(u(),{className:"yst-w-4 yst-h-4 yst--ms-1 yst-shrink-0"}),(0,l.sprintf)(/* translators: %s expands to 'Yoast SEO Premium' or 'Yoast Woocommerce SEO'. */ /* translators: %s expands to 'Yoast SEO Premium' or 'Yoast Woocommerce SEO'. */ (0,l.__)("Explore %s","wordpress-seo"),b&&!x?"Yoast WooCommerce SEO":"Yoast SEO Premium"),(0,d.jsx)("span",{className:"yst-sr-only",children:(0,l.__)("Opens in a new tab","wordpress-seo")})]}),(0,d.jsx)("div",{className:"yst-italic yst-text-slate-500 yst-mt-1",children:h})]})]})]})]})})})},zs=()=>{const[e,,,t,s]=(0,r.useToggleState)(!1),{locationContext:i}=(0,Y.useRootContext)(),o=(0,r.useSvgAria)(),n=i.includes("sidebar"),a=i.includes("metabox"),p=n?"sidebar":"metabox",u=wpseoAdminL10n[n?"shortlinks.upsell.sidebar.internal_linking_suggestions":"shortlinks.upsell.metabox.internal_linking_suggestions"];return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Ys,{isOpen:e,onClose:s,id:`yoast-internal-linking-suggestions-upsell-${p}`,upsellLink:(0,Cs.addQueryArgs)(u,{context:i}),modalTitle:(0,l.__)("Add smarter internal links with Premium","wordpress-seo"),title:(0,l.__)("Connect related content without the guesswork","wordpress-seo"),description:c((0,l.sprintf)(/* translators: %s expands to be tag. */ /* translators: %s expands to be tag. */ (0,l.__)("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,d.jsx)("br",{})}),benefits:[(0,l.__)("Suggest internal links based on your content’s main topics","wordpress-seo"),(0,l.__)("Build relevant internal links faster","wordpress-seo"),(0,l.__)("Strengthen your site’s structure","wordpress-seo"),(0,l.__)("Keep visitors exploring longer","wordpress-seo")],note:(0,l.__)("Upgrade to link your content with ease","wordpress-seo"),ctbId:"f6a84663-465f-4cb5-8ba5-f7a6d72224b2"}),n&&(0,d.jsx)(ue,{id:"yoast-internal-linking-suggestions-sidebar-modal-open-button",title:(0,l.__)("Internal linking suggestions","wordpress-seo"),onClick:t,children:(0,d.jsx)("div",{className:"yst-root",children:(0,d.jsx)(r.Badge,{size:"small",variant:"upsell",children:(0,d.jsx)(Bs(),{className:"yst-w-2.5 yst-h-2.5 yst-shrink-0",...o})})})}),a&&(0,d.jsx)("div",{className:"yst-root",children:(0,d.jsxs)(se,{id:"yoast-internal-linking-suggestions-metabox-modal-open-button",onClick:t,children:[(0,d.jsx)(se.Text,{children:(0,l.__)("Internal linking suggestions","wordpress-seo")}),(0,d.jsxs)(r.Badge,{size:"small",variant:"upsell",children:[(0,d.jsx)(Bs(),{className:"yst-w-2.5 yst-h-2.5 yst-me-1 yst-shrink-0",...o}),(0,d.jsx)("span",{children:"Premium"})]})]})})]})},Vs=({children:e})=>(0,d.jsx)("div",{children:e});Vs.propTypes={renderPriority:o().number.isRequired,children:o().node.isRequired};const Gs=Vs,Zs=({noIndex:t,onNoIndexChange:s,editorContext:i,isPrivateBlog:o=!1})=>{const r=(e=>{const t=(0,l.__)("No","wordpress-seo"),s=(0,l.__)("Yes","wordpress-seo"),i=e.noIndex?t:s;return window.wpseoScriptData.isPost?[{name:(0,l.sprintf)(/* translators: %1$s translates to "yes" or "no", %2$s translates to the content type label in plural form */ /* translators: %1$s translates to "yes" or "no", %2$s translates to the content type label in plural form */ (0,l.__)("%1$s (current default for %2$s)","wordpress-seo"),i,e.postTypeNamePlural),value:"0"},{name:t,value:"1"},{name:s,value:"2"}]:[{name:(0,l.sprintf)(/* translators: %1$s translates to "yes" or "no", %2$s translates to the content type label in plural form */ /* translators: %1$s translates to "yes" or "no", %2$s translates to the content type label in plural form */ (0,l.__)("%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,d.jsx)(Y.LocationConsumer,{children:i=>(0,d.jsxs)(e.Fragment,{children:[o&&(0,d.jsx)(O.Alert,{type:"warning",children:(0,l.__)("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,d.jsx)(O.Select,{label:(0,l.__)("Allow search engines to show this content in search results?","wordpress-seo"),onChange:s,id:(0,ie.join)(["yoast-meta-robots-noindex",i]),options:r,selected:t,linkTo:wpseoAdminL10n["shortlinks.advanced.allow_search_engines"] /* translators: Hidden accessibility text. */,linkText:(0,l.__)("Learn more about the no-index setting on our help page.","wordpress-seo")})]})})};Zs.propTypes={noIndex:o().string.isRequired,onNoIndexChange:o().func.isRequired,editorContext:o().object.isRequired,isPrivateBlog:o().bool};const Xs=({noFollow:e,onNoFollowChange:t})=>(0,d.jsx)(Y.LocationConsumer,{children:s=>{const i=(0,ie.join)(["yoast-meta-robots-nofollow",s]);return(0,d.jsx)(O.RadioButtonGroup,{id:i,options:[{value:"0",label:"Yes"},{value:"1",label:"No"}],label:(0,l.__)("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,l.__)("Learn more about the no-follow setting on our help page.","wordpress-seo")})}});Xs.propTypes={noFollow:o().string.isRequired,onNoFollowChange:o().func.isRequired};const Qs=({advanced:e,onAdvancedChange:t})=>(0,d.jsx)(Y.LocationConsumer,{children:s=>{const i=(0,ie.join)(["yoast-meta-robots-advanced",s]),o=`${i}-input`;return(0,d.jsx)(O.MultiSelect,{label:(0,l.__)("Meta robots advanced","wordpress-seo"),onChange:t,id:i,inputId:o,options:[{name:(0,l.__)("No Image Index","wordpress-seo"),value:"noimageindex"},{name:(0,l.__)("No Archive","wordpress-seo"),value:"noarchive"},{name:(0,l.__)("No Snippet","wordpress-seo"),value:"nosnippet"}],selected:e,linkTo:wpseoAdminL10n["shortlinks.advanced.meta_robots"] /* translators: Hidden accessibility text. */,linkText:(0,l.__)("Learn more about advanced meta robots settings on our help page.","wordpress-seo")})}});Qs.propTypes={advanced:o().array.isRequired,onAdvancedChange:o().func.isRequired};const Js=({breadcrumbsTitle:e,onBreadcrumbsTitleChange:t})=>(0,d.jsx)(Y.LocationConsumer,{children:s=>(0,d.jsx)(O.TextInput,{label:(0,l.__)("Breadcrumbs Title","wordpress-seo"),id:(0,ie.join)(["yoast-breadcrumbs-title",s]),onChange:t,value:e,linkTo:wpseoAdminL10n["shortlinks.advanced.breadcrumbs_title"] /* translators: Hidden accessibility text. */,linkText:(0,l.__)("Learn more about the breadcrumbs title setting on our help page.","wordpress-seo")})});Js.propTypes={breadcrumbsTitle:o().string.isRequired,onBreadcrumbsTitleChange:o().func.isRequired};const ei=({canonical:e,onCanonicalChange:t})=>(0,d.jsx)(Y.LocationConsumer,{children:s=>(0,d.jsx)(O.TextInput,{label:(0,l.__)("Canonical URL","wordpress-seo"),id:(0,ie.join)(["yoast-canonical",s]),onChange:t,value:e,linkTo:"https://yoa.st/canonical-url" /* translators: Hidden accessibility text. */,linkText:(0,l.__)("Learn more about canonical URLs on our help page.","wordpress-seo")})});ei.propTypes={canonical:o().string.isRequired,onCanonicalChange:o().func.isRequired};const ti=({noIndex:t,canonical:s,onNoIndexChange:i,onCanonicalChange:o,onLoad:r,isLoading:a,editorContext:l,isBreadcrumbsDisabled:c,advanced:p=[],onAdvancedChange:u=n.noop,noFollow:h="",onNoFollowChange:m=n.noop,breadcrumbsTitle:g="",onBreadcrumbsTitleChange:y=n.noop,isPrivateBlog:w=!1})=>{(0,e.useEffect)(()=>{setTimeout(()=>{a&&r()})});const f={noIndex:t,onNoIndexChange:i,editorContext:l,isPrivateBlog:w},x={noFollow:h,onNoFollowChange:m},b={advanced:p,onAdvancedChange:u},v={breadcrumbsTitle:g,onBreadcrumbsTitleChange:y},k={canonical:s,onCanonicalChange:o};return a?null:(0,d.jsxs)(e.Fragment,{children:[(0,d.jsx)(Zs,{...f}),l.isPost&&(0,d.jsx)(Xs,{...x}),l.isPost&&(0,d.jsx)(Qs,{...b}),!c&&(0,d.jsx)(Js,{...v}),(0,d.jsx)(ei,{...k})]})};ti.propTypes={noIndex:o().string.isRequired,canonical:o().string.isRequired,onNoIndexChange:o().func.isRequired,onCanonicalChange:o().func.isRequired,onLoad:o().func.isRequired,isLoading:o().bool.isRequired,editorContext:o().object.isRequired,isBreadcrumbsDisabled:o().bool.isRequired,isPrivateBlog:o().bool,advanced:o().array,onAdvancedChange:o().func,noFollow:o().string,onNoFollowChange:o().func,breadcrumbsTitle:o().string,onBreadcrumbsTitleChange:o().func};const si=ti,ii=(0,Q.compose)([(0,a.withSelect)(e=>{const{getNoIndex:t,getNoFollow:s,getAdvanced:i,getBreadcrumbsTitle:o,getCanonical:r,getIsLoading:n,getEditorContext:a,getPreferences:l}=e("yoast-seo/editor"),{isBreadcrumbsDisabled:c,isPrivateBlog:d}=l();return{noIndex:t(),noFollow:s(),advanced:i(),breadcrumbsTitle:o(),canonical:r(),isLoading:n(),editorContext:a(),isBreadcrumbsDisabled:c,isPrivateBlog:d}}),(0,a.withDispatch)(e=>{const{setNoIndex:t,setNoFollow:s,setAdvanced:i,setBreadcrumbsTitle:o,setCanonical:r,loadAdvancedSettingsData:n}=e("yoast-seo/editor");return{onNoIndexChange:t,onNoFollowChange:s,onAdvancedChange:i,onBreadcrumbsTitleChange:o,onCanonicalChange:r,onLoad:n}})])(si),oi=V().p` color: #606770; flex-shrink: 0; font-size: 12px; line-height: 16px; overflow: hidden; padding: 0; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; margin: 0; position: ${e=>"landscape"===e.mode?"relative":"static"}; `,ri=e=>{const{siteUrl:t}=e;return(0,d.jsxs)(f.Fragment,{children:[(0,d.jsx)("span",{className:"screen-reader-text",children:t}),(0,d.jsx)(oi,{"aria-hidden":"true",children:(0,d.jsx)("span",{children:t})})]})};ri.propTypes={siteUrl:o().string.isRequired};const ni=ri,ai=window.yoast.socialMetadataForms,li=V().img` && { max-width: ${e=>e.width}px; height: ${e=>e.height}px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); max-width: none; } `,ci=V().img` && { height: 100%; position: absolute; width: 100%; object-fit: cover; } `,di=V().div` padding-bottom: ${e=>e.aspectRatio}%; `,pi=({imageProps:e,width:t,height:s,imageMode:i="landscape"})=>"landscape"===i?(0,d.jsx)(di,{aspectRatio:e.aspectRatio,children:(0,d.jsx)(ci,{src:e.src,alt:e.alt})}):(0,d.jsx)(li,{src:e.src,alt:e.alt,width:t,height:s,imageProperties:e});function ui(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 hi(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 mi(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 o=s?"landscape":"square";"Facebook"===t&&(o=(0,ai.determineFacebookImageMode)(i));const r=function(e){return"Twitter"===e?ai.TWITTER_IMAGE_SIZES:ai.FACEBOOK_IMAGE_SIZES}(t),n=function(e,t,s){return"square"===s&&t.width===t.height?{width:e.squareWidth,height:e.squareHeight}:hi(t,ui(e,t,s))}(r,i,o);return{mode:o,height:n.height,width:n.width}}async function gi(e,t,s=!1){try{return{imageProperties:await mi(e,t,s),status:"loaded"}}catch(e){return{imageProperties:null,status:"errored"}}}pi.propTypes={imageProps:o().shape({src:o().string.isRequired,alt:o().string.isRequired,aspectRatio:o().number.isRequired}).isRequired,width:o().number.isRequired,height:o().number.isRequired,imageMode:o().string};const yi=V().div` position: relative; ${e=>"landscape"===e.mode?`max-width: ${e.dimensions.width}`:`min-width: ${e.dimensions.width}; height: ${e.dimensions.height}`}; overflow: hidden; background-color: ${N.colors.$color_white}; `,wi=V().div` box-sizing: border-box; max-width: ${ai.FACEBOOK_IMAGE_SIZES.landscapeWidth}px; height: ${ai.FACEBOOK_IMAGE_SIZES.landscapeHeight}px; background-color: ${N.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 fi extends f.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 gi(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:ai.FACEBOOK_IMAGE_SIZES.squareHeight+"px",width:ai.FACEBOOK_IMAGE_SIZES.squareWidth+"px"};case"portrait":return{height:ai.FACEBOOK_IMAGE_SIZES.portraitHeight+"px",width:ai.FACEBOOK_IMAGE_SIZES.portraitWidth+"px"};case"landscape":return{height:ai.FACEBOOK_IMAGE_SIZES.landscapeHeight+"px",width:ai.FACEBOOK_IMAGE_SIZES.landscapeWidth+"px"}}}render(){const{imageProperties:e,status:t}=this.state;if("loading"===t||""===this.props.src||"errored"===t)return(0,d.jsx)(wi,{onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,children:(0,l.__)("Select image","wordpress-seo")});const s=this.retrieveContainerDimensions(e.mode);return(0,d.jsx)(yi,{mode:e.mode,dimensions:s,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,onClick:this.props.onImageClick,children:(0,d.jsx)(pi,{imageProps:{src:this.props.src,alt:this.props.alt,aspectRatio:ai.FACEBOOK_IMAGE_SIZES.aspectRatio},width:e.width,height:e.height,imageMode:e.mode})})}}fi.propTypes={src:o().string,alt:o().string,onImageLoaded:o().func,onImageClick:o().func,onMouseEnter:o().func,onMouseLeave:o().func},fi.defaultProps={src:"",alt:"",onImageLoaded:n.noop,onImageClick:n.noop,onMouseEnter:n.noop,onMouseLeave:n.noop};const xi=fi,bi=V().span` line-height: ${20}px; min-height : ${20}px; color: #1d2129; font-weight: 600; overflow: hidden; font-size: 16px; margin: 3px 0 0; letter-spacing: normal; white-space: normal; flex-shrink: 0; cursor: pointer; display: -webkit-box; -webkit-line-clamp: ${e=>e.lineCount}; -webkit-box-orient: vertical; overflow: hidden; `,vi=V().p` line-height: ${16}px; min-height : ${16}px; color: #606770; font-size: 14px; padding: 0; text-overflow: ellipsis; margin: 3px 0 0 0; display: -webkit-box; cursor: pointer; -webkit-line-clamp: ${e=>e.lineCount}; -webkit-box-orient: vertical; overflow: hidden; @media all and ( max-width: ${e=>e.maxWidth} ) { display: none; } `,ki=e=>{switch(e){case"landscape":return"527px";case"square":case"portrait":return"369px";default:return"476px"}},_i=V().div` box-sizing: border-box; display: flex; flex-direction: ${e=>"landscape"===e.mode?"column":"row"}; background-color: #f2f3f5; max-width: 527px; `,Ti=V().div` box-sizing: border-box; background-color: #f2f3f5; margin: 0; padding: 10px 12px; position: relative; border-bottom: ${e=>"landscape"===e.mode?"":"1px solid #dddfe2"}; border-top: ${e=>"landscape"===e.mode?"":"1px solid #dddfe2"}; border-right: ${e=>"landscape"===e.mode?"":"1px solid #dddfe2"}; border: ${e=>"landscape"===e.mode?"1px solid #dddfe2":""}; display: flex; flex-direction: column; flex-grow: 1; justify-content: ${e=>"landscape"===e.mode?"flex-start":"center"}; font-size: 12px; overflow: hidden; `;class Ri extends f.Component{constructor(e){super(e),this.state={imageMode:null,maxLineCount:0,descriptionLineCount:0},this.facebookTitleRef=x().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 o=t-i;"portrait"===s&&(o=5===i?0:4),o!==e&&this.setState({descriptionLineCount:o})}componentDidUpdate(){this.maybeSetMaxLineCount(),this.maybeSetDescriptionLineCount()}render(){const{imageMode:e,maxLineCount:t,descriptionLineCount:s}=this.state;return(0,d.jsxs)(_i,{id:"facebookPreview",mode:e,children:[(0,d.jsx)(xi,{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,d.jsxs)(Ti,{mode:e,children:[(0,d.jsx)(ni,{siteUrl:this.props.siteUrl,mode:e}),(0,d.jsx)(bi,{ref:this.facebookTitleRef,onMouseEnter:this.onTitleEnter,onMouseLeave:this.onLeave,onClick:this.onSelectTitle,lineCount:t,children:this.props.title}),s>0&&(0,d.jsx)(vi,{maxWidth:ki(e),onMouseEnter:this.onDescriptionEnter,onMouseLeave:this.onLeave,onClick:this.onSelectDescription,lineCount:s,children:this.props.description})]})]})}}Ri.propTypes={siteUrl:o().string.isRequired,title:o().string.isRequired,description:o().string,imageUrl:o().string,imageFallbackUrl:o().string,alt:o().string,onSelect:o().func,onImageClick:o().func,onMouseHover:o().func},Ri.defaultProps={description:"",alt:"",imageUrl:"",imageFallbackUrl:"",onSelect:()=>{},onImageClick:()=>{},onMouseHover:()=>{}};const ji=Ri,Si=V().div` text-transform: lowercase; color: rgb(83, 100, 113); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; fill: currentcolor; display: flex; flex-direction: row; align-items: flex-end; `,Ii=e=>(0,d.jsx)(Si,{children:(0,d.jsx)("span",{children:e.siteUrl})});Ii.propTypes={siteUrl:o().string.isRequired};const Ci=Ii,Ei=(e,t=!0)=>e?`\n\t\t\tmax-width: ${ai.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: ${ai.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`,Li=V().div` position: relative; box-sizing: content-box; overflow: hidden; background-color: #e1e8ed; flex-shrink: 0; ${e=>Ei(e.isLarge)} `,Ai=V().div` display: flex; justify-content: center; align-items: center; box-sizing: border-box; max-width: 100%; margin: 0; padding: 1em; text-align: center; font-size: 1rem; ${e=>Ei(e.isLarge,!1)} `,Fi=V()(Ai)` ${e=>e.isLarge&&`height: ${ai.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 qi extends x().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 gi(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,d.jsx)(Fi,{isLarge:this.props.isLarge,onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,children:(0,l.__)("Select image","wordpress-seo")}):(0,d.jsx)(Li,{isLarge:this.props.isLarge,onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,children:(0,d.jsx)(pi,{imageProps:{src:this.props.src,alt:this.props.alt,aspectRatio:ai.TWITTER_IMAGE_SIZES.aspectRatio},width:t.width,height:t.height,imageMode:t.mode})})}}qi.propTypes={isLarge:o().bool.isRequired,src:o().string,alt:o().string,onImageClick:o().func,onMouseEnter:o().func,onMouseLeave:o().func},qi.defaultProps={src:"",alt:"",onMouseEnter:n.noop,onImageClick:n.noop,onMouseLeave:n.noop};const Pi=V().div` display: flex; flex-direction: column; padding: 12px; justify-content: center; margin: 0; box-sizing: border-box; flex: auto; min-width: 0px; gap:2px; > * { line-height:20px; min-height:20px; font-size:15px; } `,Mi=e=>(0,d.jsx)(Pi,{children:e.children});Mi.propTypes={children:o().array.isRequired};const Di=Mi,Oi=V().p` white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; color: rgb(15, 20, 25); cursor: pointer; `,Ni=V().p` max-height: 55px; overflow: hidden; text-overflow: ellipsis; margin: 0; color: rgb(83, 100, 113); display: -webkit-box; cursor: pointer; -webkit-line-clamp: 2; -webkit-box-orient: vertical; @media all and ( max-width: ${ai.TWITTER_IMAGE_SIZES.landscapeWidth}px ) { display: none; } `,Ui=V().div` font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif; font-size: 15px; font-weight: 400; line-height: 20px; max-width: 507px; border: 1px solid #E1E8ED; box-sizing: border-box; border-radius: 14px; color: #292F33; background: #FFFFFF; text-overflow: ellipsis; display: flex; &:hover { background: #f5f8fa; border: 1px solid rgba(136,153,166,.5); } `,Wi=V()(Ui)` flex-direction: column; max-height: 370px; `,$i=V()(Ui)` flex-direction: row; height: 125px; `;class Bi extends f.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:o,description:r,siteUrl:n}=this.props,a=e?Wi:$i;return(0,d.jsxs)(a,{id:"twitterPreview",children:[(0,d.jsx)(qi,{src:t||s,alt:i,isLarge:e,onImageClick:this.props.onImageClick,onMouseEnter:this.onImageEnter,onMouseLeave:this.onLeave}),(0,d.jsxs)(Di,{children:[(0,d.jsx)(Ci,{siteUrl:n}),(0,d.jsx)(Oi,{onMouseEnter:this.onTitleEnter,onMouseLeave:this.onLeave,onClick:this.onSelectTitle,children:o}),(0,d.jsx)(Ni,{onMouseEnter:this.onDescriptionEnter,onMouseLeave:this.onLeave,onClick:this.onSelectDescription,children:r})]})]})}}Bi.propTypes={siteUrl:o().string.isRequired,title:o().string.isRequired,description:o().string,isLarge:o().bool,imageUrl:o().string,imageFallbackUrl:o().string,alt:o().string,onSelect:o().func,onImageClick:o().func,onMouseHover:o().func},Bi.defaultProps={description:"",alt:"",imageUrl:"",imageFallbackUrl:"",onSelect:()=>{},onImageClick:()=>{},onMouseHover:()=>{},isLarge:!0};const Hi=Bi,Ki=window.yoast.replacementVariableEditor;class Yi extends f.Component{constructor(e){super(e),this.state={activeField:"",hoveredField:""},this.SocialPreview="Social"===e.socialMediumName?ji:Hi,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:o,imageWarnings:r,siteUrl:n,description:a,descriptionInputPlaceholder:l,descriptionPreviewFallback:c,imageUrl:p,imageFallbackUrl:u,alt:h,title:m,titleInputPlaceholder:g,titlePreviewFallback:y,replacementVariables:w,recommendedReplacementVariables:f,applyReplacementVariables:b,onReplacementVariableSearchChange:v,isPremium:k,isLarge:_,socialPreviewLabel:T,idSuffix:R,activeMetaTabId:j}=this.props,S=b({title:m||y,description:a||c});return(0,d.jsxs)(x().Fragment,{children:[T&&(0,d.jsx)(O.SimulatedLabel,{children:T}),(0,d.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:_,activeMetaTabId:j}),(0,d.jsx)(ai.SocialMetadataPreviewForm,{onDescriptionChange:e,socialMediumName:o,title:m,titleInputPlaceholder:g,onRemoveImageClick:i,imageSelected:!!p,imageUrl:p,imageFallbackUrl:u,onTitleChange:t,onSelectImageClick:s,description:a,descriptionInputPlaceholder:l,imageWarnings:r,replacementVariables:w,recommendedReplacementVariables:f,onReplacementVariableSearchChange:v,onMouseHover:this.setHoveredField,hoveredField:this.state.hoveredField,onSelect:this.setActiveField,activeField:this.state.activeField,isPremium:k,setEditorRef:this.setEditorRef,idSuffix:R})]})}}Yi.propTypes={title:o().string.isRequired,onTitleChange:o().func.isRequired,description:o().string.isRequired,onDescriptionChange:o().func.isRequired,imageUrl:o().string.isRequired,imageFallbackUrl:o().string.isRequired,onSelectImageClick:o().func.isRequired,onRemoveImageClick:o().func.isRequired,socialMediumName:o().string.isRequired,alt:o().string,isPremium:o().bool,imageWarnings:o().array,isLarge:o().bool,siteUrl:o().string,descriptionInputPlaceholder:o().string,titleInputPlaceholder:o().string,descriptionPreviewFallback:o().string,titlePreviewFallback:o().string,replacementVariables:Ki.replacementVariablesShape,recommendedReplacementVariables:Ki.recommendedReplacementVariablesShape,applyReplacementVariables:o().func,onReplacementVariableSearchChange:o().func,socialPreviewLabel:o().string,idSuffix:o().string,activeMetaTabId:o().string},Yi.defaultProps={imageWarnings:[],recommendedReplacementVariables:[],replacementVariables:[],isPremium:!1,isLarge:!0,siteUrl:"",descriptionInputPlaceholder:"",titleInputPlaceholder:"",descriptionPreviewFallback:"",titlePreviewFallback:"",alt:"",applyReplacementVariables:e=>e,onReplacementVariableSearchChange:null,socialPreviewLabel:"",idSuffix:"",activeMetaTabId:""};const zi={},Vi=(e,t,{log:s=console.warn}={})=>{zi[e]||(zi[e]=!0,s(t))},Gi=(e,t=n.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};Gi({squareWidth:125,squareHeight:125,landscapeWidth:506,landscapeHeight:265,aspectRatio:50.2},(e,t)=>Vi(`@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.`)),Gi({squareWidth:158,squareHeight:158,landscapeWidth:527,landscapeHeight:273,portraitWidth:158,portraitHeight:237,aspectRatio:52.2,largeThreshold:{width:446,height:233}},(e,t)=>Vi(`@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 Zi=V().div` max-width: calc(527px + 1.5rem); `,Xi=e=>{const t="X"===e.socialMediumName?(0,l.__)("X share preview","wordpress-seo"):(0,l.__)("Social share preview","wordpress-seo"),{locationContext:s}=(0,r.useRootContext)();return(0,d.jsx)(r.Root,{children:(0,d.jsx)(Zi,{children:(0,d.jsx)(r.FeatureUpsell,{shouldUpsell:!0,variant:"card",cardLink:(0,Cs.addQueryArgs)(wpseoAdminL10n["shortlinks.upsell.social_preview."+e.socialMediumName.toLowerCase()],{context:s}),cardText:(0,l.sprintf)(/* translators: %1$s expands to Yoast SEO Premium. */ /* translators: %1$s expands to Yoast SEO Premium. */ (0,l.__)("Unlock with %1$s","wordpress-seo"),"Yoast SEO Premium"),"data-action":"load-nfd-ctb","data-ctb-id":"f6a84663-465f-4cb5-8ba5-f7a6d72224b2",children:(0,d.jsxs)("div",{className:"yst-grayscale yst-opacity-50",children:[(0,d.jsx)(r.Label,{children:t}),(0,d.jsx)(ji,{title:"",description:"",siteUrl:"",imageUrl:"",imageFallbackUrl:"",alt:"",onSelect:n.noop,onImageClick:n.noop,onMouseHover:n.noop})]})})})})};Xi.propTypes={socialMediumName:o().oneOf(["Social","Twitter","X"]).isRequired};const Qi=Xi;class Ji 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:o,socialMediumName:r,imageWarnings:n,description:a,descriptionInputPlaceholder:l,imageUrl:c,imageFallbackUrl:p,alt:u,title:h,titleInputPlaceholder:m,replacementVariables:g,recommendedReplacementVariables:y,onReplacementVariableSearchChange:w,isPremium:f,location:x}=this.props;return(0,d.jsxs)(e.Fragment,{children:[(0,d.jsx)(Qi,{socialMediumName:r}),(0,d.jsx)(ai.SocialMetadataPreviewForm,{onDescriptionChange:t,socialMediumName:r,title:h,titleInputPlaceholder:m,onRemoveImageClick:o,imageSelected:!!c,imageUrl:c,imageFallbackUrl:p,imageAltText:u,onTitleChange:s,onSelectImageClick:i,description:a,descriptionInputPlaceholder:l,imageWarnings:n,replacementVariables:g,recommendedReplacementVariables:y,onReplacementVariableSearchChange:w,onMouseHover:this.setHoveredField,hoveredField:this.state.hoveredField,onSelect:this.setActiveField,activeField:this.state.activeField,isPremium:f,setEditorRef:this.setEditorRef,idSuffix:x})]})}}Ji.propTypes={title:o().string.isRequired,onTitleChange:o().func.isRequired,description:o().string.isRequired,onDescriptionChange:o().func.isRequired,imageUrl:o().string.isRequired,imageFallbackUrl:o().string,onSelectImageClick:o().func.isRequired,onRemoveImageClick:o().func.isRequired,socialMediumName:o().string.isRequired,isPremium:o().bool,imageWarnings:o().array,descriptionInputPlaceholder:o().string,titleInputPlaceholder:o().string,replacementVariables:Ki.replacementVariablesShape,recommendedReplacementVariables:Ki.recommendedReplacementVariablesShape,onReplacementVariableSearchChange:o().func,location:o().string,alt:o().string},Ji.defaultProps={imageWarnings:[],imageFallbackUrl:"",recommendedReplacementVariables:[],replacementVariables:[],isPremium:!1,descriptionInputPlaceholder:"",titleInputPlaceholder:"",onReplacementVariableSearchChange:null,location:"",alt:""};const eo=Ji,to=(t,s,i)=>{const[o,r]=(0,e.useState)(!1),n=(0,l.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. */ /* 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,l.__)("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)(()=>{r(""===s&&t.toLowerCase().endsWith(".avif"))},[t,s]),o?[n]:i},so=({isPremium:s,onLoad:i,location:o,imageFallbackUrl:r="",imageUrl:n="",imageWarnings:a=[],...l})=>{const[c,p]=(0,e.useState)(""),u=to(r,n,a),h=(0,e.useCallback)(e=>{p(e.detail.metaTabId)},[p]);(0,e.useEffect)(()=>(setTimeout(i),window.addEventListener("YoastSEO:metaTabChange",h),()=>{window.removeEventListener("YoastSEO:metaTabChange",h)}),[]);const m={isPremium:s,onLoad:i,location:o,imageFallbackUrl:r,imageUrl:n,imageWarnings:u,activeMetaTabId:c,...l};return s?(0,d.jsx)(t.Slot,{name:`YoastFacebookPremium${o.charAt(0).toUpperCase()+o.slice(1)}`,fillProps:m}):(0,d.jsx)(eo,{...m})};so.propTypes={isPremium:o().bool.isRequired,onLoad:o().func.isRequired,location:o().string.isRequired,imageFallbackUrl:o().string,imageUrl:o().string,imageWarnings:o().array};const io=so;function oo(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 ro=()=>{oo(e=>(0,a.dispatch)("yoast-seo/editor").setFacebookPreviewImage((e=>{const{width:t,height:s}=e,i=(0,ai.determineFacebookImageMode)({width:t,height:s}),o=ai.FACEBOOK_IMAGE_SIZES[i+"Width"],r=ai.FACEBOOK_IMAGE_SIZES[i+"Height"],n=Object.values(e.sizes).find(e=>e.width>=o&&e.height>=r);return{url:n?n.url:e.url,id:e.id,warnings:(0,ie.validateFacebookImage)(e),alt:e.alt||""}})(e)))},no=(0,Q.compose)([(0,a.withSelect)(e=>{const{getFacebookDescription:t,getDescription:s,getFacebookTitle:i,getSeoTitle:o,getFacebookImageUrl:r,getImageFallback:n,getFacebookWarnings:a,getRecommendedReplaceVars:l,getReplaceVars:c,getSiteUrl:d,getSeoTitleTemplate:p,getSeoTitleTemplateNoFallback:u,getSocialTitleTemplate:h,getSeoDescriptionTemplate:m,getSocialDescriptionTemplate:g,getReplacedExcerpt:y,getFacebookAltText:w}=e("yoast-seo/editor");return{imageUrl:r(),imageFallbackUrl:n(),recommendedReplacementVariables:l(),replacementVariables:c(),description:t(),descriptionPreviewFallback:g()||s()||m()||y()||"",title:i(),titlePreviewFallback:h()||o()||u()||p()||"",imageWarnings:a(),siteUrl:d(),isPremium:!!Ds().isPremium,titleInputPlaceholder:"",descriptionInputPlaceholder:"",socialMediumName:"Social",alt:w()}}),(0,a.withDispatch)((e,t,{select:s})=>{const{setFacebookPreviewTitle:i,setFacebookPreviewDescription:o,clearFacebookPreviewImage:r,loadFacebookPreviewData:n,findCustomFields:a}=e("yoast-seo/editor"),l=s("yoast-seo/editor").getPostId();return{onSelectImageClick:ro,onRemoveImageClick:r,onDescriptionChange:o,onTitleChange:i,onLoad:n,onReplacementVariableSearchChange:ms(l,a)}}),ss()])(io),ao=({isPremium:s,onLoad:i,location:o,imageFallbackUrl:r="",imageUrl:n="",imageWarnings:a=[],...l})=>{const c=to(r,n,a);(0,e.useEffect)(()=>{setTimeout(i)},[]);const p={isPremium:s,onLoad:i,location:o,imageFallbackUrl:r,imageUrl:n,imageWarnings:c,...l};return s?(0,d.jsx)(t.Slot,{name:`YoastTwitterPremium${o.charAt(0).toUpperCase()+o.slice(1)}`,fillProps:p}):(0,d.jsx)(eo,{...p})};ao.propTypes={isPremium:o().bool.isRequired,onLoad:o().func.isRequired,location:o().string.isRequired,imageFallbackUrl:o().string,imageUrl:o().string,imageWarnings:o().array};const lo=ao,co=()=>{oo(e=>(0,a.dispatch)("yoast-seo/editor").setTwitterPreviewImage((e=>{const t="summary"!==(0,n.get)(window,"wpseoScriptData.metabox.twitterCardType")?"landscape":"square",s=ai.TWITTER_IMAGE_SIZES[t+"Width"],i=ai.TWITTER_IMAGE_SIZES[t+"Height"],o=Object.values(e.sizes).find(e=>e.width>=s&&e.height>=i);return{url:o?o.url:e.url,id:e.id,warnings:(0,ie.validateTwitterImage)(e),alt:e.alt||""}})(e)))},po=(0,Q.compose)([(0,a.withSelect)(e=>{const{getTwitterDescription:t,getTwitterTitle:s,getTwitterImageUrl:i,getFacebookImageUrl:o,getFacebookTitle:r,getFacebookDescription:n,getDescription:a,getSeoTitle:l,getTwitterWarnings:c,getTwitterImageType:d,getImageFallback:p,getRecommendedReplaceVars:u,getReplaceVars:h,getSiteUrl:m,getSeoTitleTemplate:g,getSeoTitleTemplateNoFallback:y,getSocialTitleTemplate:w,getSeoDescriptionTemplate:f,getSocialDescriptionTemplate:x,getReplacedExcerpt:b,getTwitterAltText:v}=e("yoast-seo/editor");return{imageUrl:i(),imageFallbackUrl:o()||p(),recommendedReplacementVariables:u(),replacementVariables:h(),description:t(),descriptionPreviewFallback:x()||n()||a()||f()||b()||"",title:s(),titlePreviewFallback:w()||r()||l()||y()||g()||"",imageWarnings:c(),siteUrl:m(),isPremium:!!Ds().isPremium,isLarge:"summary"!==d(),titleInputPlaceholder:"",descriptionInputPlaceholder:"",socialMediumName:"X",alt:v()}}),(0,a.withDispatch)((e,t,{select:s})=>{const{setTwitterPreviewTitle:i,setTwitterPreviewDescription:o,clearTwitterPreviewImage:r,loadTwitterPreviewData:n,findCustomFields:a}=e("yoast-seo/editor"),l=s("yoast-seo/editor").getPostId();return{onSelectImageClick:co,onRemoveImageClick:r,onDescriptionChange:o,onTitleChange:i,onLoad:n,onReplacementVariableSearchChange:ms(l,a)}}),ss()])(lo),uo=V().legend` margin: 16px 0; padding: 0; color: ${N.colors.$color_headings}; font-size: 12px; font-weight: 300; `,ho=V().legend` margin: 0 0 16px; padding: 0; color: ${N.colors.$color_headings}; font-size: 12px; font-weight: 300; `,mo=V().div` padding: 16px; `,go=({useOpenGraphData:t,useTwitterData:s})=>(0,d.jsxs)(e.Fragment,{children:[s&&t&&(0,d.jsxs)(e.Fragment,{children:[(0,d.jsxs)(ks,{hasSeparator:!1 /* translators: Social media appearance refers to a preview of how a page will be represented on social media. */,title:(0,l.__)("Social media appearance","wordpress-seo"),initialIsOpen:!0,children:[(0,d.jsx)(ho,{children:(0,l.__)("Determine how your post should look on social media like Facebook, X, Instagram, WhatsApp, Threads, LinkedIn, Slack, and more.","wordpress-seo")}),(0,d.jsx)(no,{}),(0,d.jsx)(uo,{children:(0,l.__)("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,d.jsx)(ks,{title:(0,l.__)("X appearance","wordpress-seo"),hasSeparator:!0,initialIsOpen:!1,children:(0,d.jsx)(po,{})})]}),t&&!s&&(0,d.jsxs)(mo,{children:[(0,d.jsx)(ho,{children:(0,l.__)("Determine how your post should look on social media like Facebook, X, Instagram, WhatsApp, Threads, LinkedIn, Slack, and more.","wordpress-seo")}),(0,d.jsx)(no,{})]}),!t&&s&&(0,d.jsxs)(mo,{children:[(0,d.jsx)(ho,{children:(0,l.__)("To customize the appearance of your post specifically for X, please fill out the 'X appearance' settings below.","wordpress-seo")}),(0,d.jsx)(po,{})]})]});go.propTypes={useOpenGraphData:o().bool.isRequired,useTwitterData:o().bool.isRequired};const yo=go,wo=(0,a.withSelect)(e=>{const{getPreferences:t}=e("yoast-seo/editor"),{useOpenGraphData:s,useTwitterData:i}=t();return{useOpenGraphData:s,useTwitterData:i}})(yo);function fo({target:e}){return(0,d.jsx)($,{target:e,children:(0,d.jsx)(wo,{})})}fo.propTypes={target:o().string.isRequired};const xo=(0,ie.makeOutboundLink)(),bo=V().div` padding: 16px; `,vo="yoast-seo/editor";function ko({location:e,show:t}){return t?(0,d.jsxs)(O.Alert,{type:"info",children:[(0,l.sprintf)(/* translators: %s Expands to "Yoast News SEO" */ /* translators: %s Expands to "Yoast News SEO" */ (0,l.__)("Are you working on a news article? %s helps you optimize your site for Google News.","wordpress-seo"),"Yoast News SEO")+" ",(0,d.jsx)(xo,{href:window.wpseoAdminL10n[`shortlinks.upsell.${e}.news`],children:(0,l.sprintf)(/* translators: %s: Expands to "Yoast News SEO". */ /* translators: %s: Expands to "Yoast News SEO". */ (0,l.__)("Buy %s now!","wordpress-seo"),"Yoast News SEO")})]}):null}ko.propTypes={show:o().bool.isRequired,location:o().string.isRequired};const _o=(e,t,s)=>{const i=(0,a.useSelect)(e=>e(vo).getIsProduct(),[]),o=(0,a.useSelect)(e=>e(vo).getIsWooSeoActive(),[]),r=i&&o?{name:(0,l.__)("Item Page","wordpress-seo"),value:"ItemPage"}:e.find(e=>e.value===t);return[{name:(0,l.sprintf)(/* translators: %1$s expands to the plural name of the current post type, %2$s expands to the current site wide default. */ /* translators: %1$s expands to the plural name of the current post type, %2$s expands to the current site wide default. */ (0,l.__)("Default for %1$s (%2$s)","wordpress-seo"),s,r?r.name:""),value:""},...e]},To=(e,t)=>c((e=>(0,l.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 */ /* 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,l.__)("You can change the default type for %1$s under Content types in the %2$sSettings%3$s.","wordpress-seo"),e,"<link>","</link>"))(e),{link:(0,d.jsx)("a",{href:t,target:"_blank",rel:"noreferrer"})}),Ro=({helpTextTitle:e,helpTextLink:t,helpTextDescription:s})=>(0,d.jsx)(O.FieldGroup,{label:e,linkTo:t /* translators: Hidden accessibility text. */,linkText:(0,l.__)("Learn more about structured data with Schema.org","wordpress-seo"),description:s});Ro.propTypes={helpTextTitle:o().string.isRequired,helpTextLink:o().string.isRequired,helpTextDescription:o().string.isRequired};const jo=({schemaPageTypeChange:t=n.noop,schemaPageTypeSelected:s=null,pageTypeOptions:i,schemaArticleTypeChange:o=n.noop,schemaArticleTypeSelected:r=null,articleTypeOptions:c,showArticleTypeInput:p,additionalHelpTextLink:u,helpTextLink:h,helpTextTitle:m,helpTextDescription:g,postTypeName:y,displayFooter:w=!1,defaultPageType:f,defaultArticleType:x,location:b,isNewsEnabled:v=!1})=>{const k=_o(i,f,y),_=_o(c,x,y),T=(0,a.useSelect)(e=>e(vo).selectLink("https://yoa.st/product-schema-metabox"),[]),R=(0,a.useSelect)(e=>e(vo).getIsWooSeoUpsell(),[]),[j,S]=(0,e.useState)(r),I=(0,l.__)("Want your products stand out in search results with rich results like price, reviews and more?","wordpress-seo"),C=(0,a.useSelect)(e=>e(vo).getIsProduct(),[]),E=(0,a.useSelect)(e=>e(vo).getIsWooSeoActive(),[]),L=(0,a.useSelect)(e=>e(vo).selectAdminLink("?page=wpseo_page_settings"),[]),A=C&&E,F=(0,e.useCallback)((e,t)=>{S(t)},[]);return(0,e.useEffect)(()=>{F(null,r)},[r]),(0,d.jsxs)(e.Fragment,{children:[(0,d.jsx)(Ro,{helpTextLink:h,helpTextTitle:m,helpTextDescription:g}),(0,d.jsx)(O.FieldGroup,{label:(0,l.__)("What type of page or content is this?","wordpress-seo"),linkTo:u /* translators: Hidden accessibility text. */,linkText:(0,l.__)("Learn more about page or content types","wordpress-seo")}),R&&(0,d.jsx)(ys,{link:T,text:I}),(0,d.jsx)(O.Select,{id:(0,ie.join)(["yoast-schema-page-type",b]),options:k,label:(0,l.__)("Page type","wordpress-seo"),onChange:t,selected:A?"ItemPage":s,disabled:A}),p&&(0,d.jsx)(O.Select,{id:(0,ie.join)(["yoast-schema-article-type",b]),options:_,label:(0,l.__)("Article type","wordpress-seo"),onChange:o,selected:r,onOptionFocus:F}),(0,d.jsx)(ko,{location:b,show:!v&&(q=j,P=x,"NewsArticle"===q||""===q&&"NewsArticle"===P)}),w&&!A&&(0,d.jsx)("p",{children:To(y,L)}),A&&(0,d.jsx)("p",{children:(0,l.sprintf)(/* translators: %1$s expands to Yoast WooCommerce SEO. */ /* translators: %1$s expands to Yoast WooCommerce SEO. */ (0,l.__)("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 q,P},So=o().arrayOf(o().shape({name:o().string,value:o().string}));jo.propTypes={schemaPageTypeChange:o().func,schemaPageTypeSelected:o().string,pageTypeOptions:So.isRequired,schemaArticleTypeChange:o().func,schemaArticleTypeSelected:o().string,articleTypeOptions:So.isRequired,showArticleTypeInput:o().bool.isRequired,additionalHelpTextLink:o().string.isRequired,helpTextLink:o().string.isRequired,helpTextTitle:o().string.isRequired,helpTextDescription:o().string.isRequired,postTypeName:o().string.isRequired,displayFooter:o().bool,defaultPageType:o().string.isRequired,defaultArticleType:o().string.isRequired,location:o().string.isRequired,isNewsEnabled:o().bool};const Io=({isMetabox:t,showArticleTypeInput:s=!1,articleTypeLabel:i="",additionalHelpTextLink:o="",pageTypeLabel:r,helpTextLink:n,helpTextTitle:a,helpTextDescription:l,postTypeName:c,displayFooter:p=!1,loadSchemaArticleData:u,loadSchemaPageData:h,location:m,...g})=>{const y=(0,d.jsx)(jo,{showArticleTypeInput:s,articleTypeLabel:i,additionalHelpTextLink:o,pageTypeLabel:r,helpTextLink:n,helpTextTitle:a,helpTextDescription:l,postTypeName:c,displayFooter:p,loadSchemaArticleData:u,loadSchemaPageData:h,location:m,...g});return t?(0,e.createPortal)((0,d.jsx)(bo,{children:y}),document.getElementById("wpseo-meta-section-schema")):y};Io.propTypes={isMetabox:o().bool.isRequired,showArticleTypeInput:o().bool,articleTypeLabel:o().string,additionalHelpTextLink:o().string,pageTypeLabel:o().string.isRequired,helpTextLink:o().string.isRequired,helpTextTitle:o().string.isRequired,helpTextDescription:o().string.isRequired,postTypeName:o().string.isRequired,displayFooter:o().bool,loadSchemaArticleData:o().func.isRequired,loadSchemaPageData:o().func.isRequired,location:o().string.isRequired};const Co=Io;class Eo{static get articleTypeInput(){return document.getElementById("yoast_wpseo_schema_article_type")}static get defaultArticleType(){return Eo.articleTypeInput.getAttribute("data-default")}static get articleType(){return Eo.articleTypeInput.value}static set articleType(e){Eo.articleTypeInput.value=e}static get pageTypeInput(){return document.getElementById("yoast_wpseo_schema_page_type")}static get defaultPageType(){return Eo.pageTypeInput.getAttribute("data-default")}static get pageType(){return Eo.pageTypeInput.value}static set pageType(e){Eo.pageTypeInput.value=e}}const Lo=t=>{const s=null!==Eo.articleTypeInput;(0,e.useEffect)(()=>{t.loadSchemaPageData(),s&&t.loadSchemaArticleData()},[]);const{pageTypeOptions:i,articleTypeOptions:o}=window.wpseoScriptData.metabox.schema,r={articleTypeLabel:(0,l.__)("Article type","wordpress-seo"),pageTypeLabel:(0,l.__)("Page type","wordpress-seo"),postTypeName:window.wpseoAdminL10n.postTypeNamePlural,helpTextTitle:(0,l.__)("Yoast SEO automatically describes your pages using schema.org","wordpress-seo"),helpTextDescription:(0,l.__)("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:o},n={...t,...r,...(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,d.jsx)(Co,{...n})};Lo.propTypes={displayFooter:o().bool.isRequired,schemaPageTypeSelected:o().string.isRequired,schemaArticleTypeSelected:o().string.isRequired,defaultArticleType:o().string.isRequired,defaultPageType:o().string.isRequired,loadSchemaPageData:o().func.isRequired,loadSchemaArticleData:o().func.isRequired,schemaPageTypeChange:o().func.isRequired,schemaArticleTypeChange:o().func.isRequired,location:o().string.isRequired};const Ao=(0,Q.compose)([(0,a.withSelect)(e=>{const{getPreferences:t,getPageType:s,getDefaultPageType:i,getArticleType:o,getDefaultArticleType:r}=e("yoast-seo/editor"),{displaySchemaSettingsFooter:n,isNewsEnabled:a}=t();return{displayFooter:n,isNewsEnabled:a,schemaPageTypeSelected:s(),schemaArticleTypeSelected:o(),defaultArticleType:r(),defaultPageType:i()}}),(0,a.withDispatch)(e=>{const{setPageType:t,setArticleType:s,getSchemaPageData:i,getSchemaArticleData:o}=e("yoast-seo/editor");return{loadSchemaPageData:i,loadSchemaArticleData:o,schemaPageTypeChange:t,schemaArticleTypeChange:s}}),ss()])(Lo),Fo=window.yoast.relatedKeyphraseSuggestions;function qo({requestLimitReached:e,isSuccess:t,response:s,requestHasData:i,relatedKeyphrases:o}){return e?"requestLimitReached":!t&&function(e){return"invalid_json"===(null==e?void 0:e.code)||"fetch_error"===(null==e?void 0:e.code)||!(0,n.isEmpty)(e)&&"error"in e}(s)?"requestFailed":i?function(e){return e&&e.length>=4}(o)?"maxRelatedKeyphrases":null:"requestEmpty"}function Po({keyphrase:t="",relatedKeyphrases:s=[],renderAction:i=null,requestLimitReached:o=!1,countryCode:n,setCountry:a,newRequest:l,response:c={},isRtl:p=!1,userLocale:u="en_US",isPending:h=!1,isSuccess:m=!1,requestHasData:g=!0,isPremium:y=!1,semrushUpsellLink:w="",premiumUpsellLink:f=""}){var x,b;const[v,k]=(0,e.useState)(n),_=(0,e.useCallback)(async()=>{l(n,t),k(n)},[n,t,l]);return(0,d.jsxs)(r.Root,{context:{isRtl:p},children:[!o&&!y&&(0,d.jsx)(Fo.PremiumUpsell,{url:f,className:"yst-mb-4"}),!o&&(0,d.jsx)(Fo.CountrySelector,{countryCode:n,activeCountryCode:v,onChange:a,onClick:_,className:"yst-mb-4",userLocale:u.split("_")[0]}),!h&&(0,d.jsx)(Fo.UserMessage,{variant:qo({requestLimitReached:o,isSuccess:m,response:c,requestHasData:g,relatedKeyphrases:s}),upsellLink:w}),(0,d.jsx)(Fo.KeyphrasesTable,{relatedKeyphrases:s,columnNames:null==c||null===(x=c.results)||void 0===x?void 0:x.columnNames,data:null==c||null===(b=c.results)||void 0===b?void 0:b.rows,isPending:h,renderButton:i,className:"yst-mt-4"})]})}Po.propTypes={keyphrase:o().string,relatedKeyphrases:o().array,renderAction:o().func,requestLimitReached:o().bool,countryCode:o().string.isRequired,setCountry:o().func.isRequired,newRequest:o().func.isRequired,response:o().object,isRtl:o().bool,userLocale:o().string,isPending:o().bool,isSuccess:o().bool,requestHasData:o().bool,isPremium:o().bool,semrushUpsellLink:o().string,premiumUpsellLink:o().string};const Mo=(0,Q.compose)([(0,a.withSelect)(e=>{const{getFocusKeyphrase:t,getSEMrushSelectedCountry:s,getSEMrushRequestLimitReached:i,getSEMrushRequestResponse:o,getSEMrushRequestIsSuccess:r,getSEMrushIsRequestPending:n,getSEMrushRequestHasData:a,getPreference:l,getIsPremium:c,selectLinkParams:d}=e("yoast-seo/editor");return{keyphrase:t(),countryCode:s(),requestLimitReached:i(),response:o(),isSuccess:r(),isPending:n(),requestHasData:a(),isRtl:l("isRtl",!1),userLocale:l("userLocale","en_US"),isPremium:c(),semrushUpsellLink:(0,Cs.addQueryArgs)("https://yoa.st/semrush-prices",d()),premiumUpsellLink:(0,Cs.addQueryArgs)("https://yoa.st/413",d())}}),(0,a.withDispatch)(e=>{const{setSEMrushChangeCountry:t,setSEMrushNewRequest:s}=e("yoast-seo/editor");return{setCountry:e=>{t(e)},newRequest:(e,t)=>{s(e,t)}}})])(Po),Do=({isOpen:e,closeModal:t,id:s,upsellLink:i})=>(0,d.jsx)(Ys,{isOpen:e,onClose:t,id:s,upsellLink:i,title:(0,l.__)("Cover more search intent with related keyphrases","wordpress-seo"),description:(0,l.__)("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,l.__)("Fine-tune your content for every audience","wordpress-seo"),modalTitle:(0,l.__)("Add more keyphrases with Premium","wordpress-seo"),ctbId:"f6a84663-465f-4cb5-8ba5-f7a6d72224b2"}),Oo=()=>{const[t,,,s,i]=(0,r.useToggleState)(!1),o=(0,e.useContext)(Y.LocationContext),{locationContext:n}=(0,Y.useRootContext)(),a=(0,r.useSvgAria)(),c=wpseoAdminL10n["sidebar"===o.toLowerCase()?"shortlinks.upsell.sidebar.additional_button":"shortlinks.upsell.metabox.additional_button"];return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Do,{isOpen:t,closeModal:i,upsellLink:(0,Cs.addQueryArgs)(c,{context:n}),id:`yoast-additional-keyphrases-modal-${o}`}),"sidebar"===o&&(0,d.jsx)(ue,{id:"yoast-additional-keyphrase-modal-open-button",title:(0,l.__)("Add related keyphrase","wordpress-seo"),prefixIcon:{icon:"plus",color:N.colors.$color_grey_medium_dark},onClick:s,children:(0,d.jsx)("div",{className:"yst-root",children:(0,d.jsx)(r.Badge,{size:"small",variant:"upsell",children:(0,d.jsx)(Bs(),{className:"yst-w-2.5 yst-h-2.5 yst-shrink-0",...a})})})}),"metabox"===o&&(0,d.jsx)("div",{className:"yst-root",children:(0,d.jsxs)(se,{id:"yoast-additional-keyphrase-metabox-modal-open-button",onClick:s,children:[(0,d.jsx)(O.SvgIcon,{icon:"plus",color:N.colors.$color_grey_medium_dark}),(0,d.jsx)(se.Text,{children:(0,l.__)("Add related keyphrase","wordpress-seo")}),(0,d.jsxs)(r.Badge,{size:"small",variant:"upsell",children:[(0,d.jsx)(Bs(),{className:"yst-w-2.5 yst-h-2.5 yst-me-1 yst-shrink-0",...a}),(0,d.jsx)("span",{children:"Premium"})]})]})})]})};var No=s(998),Uo=s.n(No);const Wo=({store:t="yoast-seo/editor",location:s="sidebar"})=>{const i="black-friday-promotion",o=(0,a.useSelect)(e=>e(t).getIsPremium(),[t]),n=(0,a.useSelect)(e=>e(t).selectLinkParams(),[t]),c=(0,a.useSelect)(e=>e(t).isPromotionActive(i),[t]),p=(0,a.useSelect)(e=>e(t).getIsWooCommerceActive(),[t]),u=(0,a.useSelect)(e=>e(t).isAlertDismissed(i),[t]),h=(0,e.useCallback)(()=>{(0,a.dispatch)(t).dismissAlert(i)},[t,i]),g=(0,Cs.addQueryArgs)("https://yoa.st/black-friday-sale",n),y=(0,r.useSvgAria)();return o||!c||u?null:(0,d.jsx)("div",{className:"yst-root",children:(0,d.jsxs)("div",{className:q()("yst-border yst-rounded-lg yst-p-4 yst-max-w-md yst-relative yst-shadow-sm yst-mt-2",p?"yst-border-woo-light":"yst-border-primary-200"),children:[(0,d.jsxs)(r.Badge,{size:"small",className:"yst-text-[10px] yst-bg-black yst-text-amber-300 yst-absolute yst--top-2",children:[(0,l.__)("BLACK FRIDAY","wordpress-seo")," "]}),(0,d.jsxs)("button",{className:"yst-absolute yst-top-4 yst-end-4",onClick:h,children:[(0,d.jsx)(Uo(),{className:"yst-w-4 yst-text-slate-400 yst-shrink-0 yst--mt-0.5"}),(0,d.jsx)("div",{className:"yst-sr-only",children:(0,l.__)("Dismiss","wordpress-seo")})]}),(0,d.jsxs)("div",{className:q()("sidebar"===s?"":"yst-flex yst-justify-between yst-gap-3"),children:[(0,d.jsxs)("div",{className:p?"yst-text-woo-light":"yst-text-primary-500",children:[(0,d.jsx)("div",{className:"yst-text-2xl yst-font-bold",children:(0,l.__)("30% OFF","wordpress-seo")}),(0,d.jsx)("div",{className:"yst-flex yst-gap-2 yst-font-semibold yst-text-tiny",children:p?(0,d.jsxs)(d.Fragment,{children:["Yoast WooCommerce SEO ",(0,d.jsx)(Ks(),{className:"yst-w-4 yst-scale-x-[-1]",...y})]}):(0,d.jsxs)(d.Fragment,{children:[" Yoast SEO Premium ",(0,d.jsx)(D,{className:"yst-w-4",...y})]})})]}),(0,d.jsx)("div",{className:"yst-flex yst-items-end",children:(0,d.jsxs)(r.Button,{as:"a",className:q()("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,l.__)("Buy now!","wordpress-seo"),(0,d.jsx)(m(),{className:"yst-w-4 rtl:yst-rotate-180",...y})]})})]})]})})};Wo.propTypes={store:o().string,location:o().oneOf(["sidebar","metabox"]),inEditorIntro:o().bool};const $o="yoast-seo/content-planner",Bo=(0,Q.compose)([(0,a.withDispatch)(e=>{const{setFeatureModalStatus:t}=e($o);return{setFeatureModalStatus:t}})])(({location:t,setFeatureModalStatus:s})=>{const i=(0,e.useCallback)(()=>{s("idle")},[s]),o=(0,a.useSelect)(e=>e($o).selectIsMinPostsMet(),[]),n="yoast-content-planner-min-posts-notice-"+t;return(0,d.jsx)(r.Root,{children:(0,d.jsxs)("div",{className:q()("metabox"===t&&"yst-flex yst-items-center yst-gap-3"),children:[(0,d.jsx)(r.Button,{variant:"ai-secondary",onClick:i,disabled:!o,"aria-describedby":o?null:n,className:"sidebar"===t?"yst-w-full":"",children:(0,l.__)("Get content suggestions","wordpress-seo")}),!o&&(0,d.jsx)("span",{id:n,className:q()("yst-text-sm yst-text-slate-500 yst-italic","sidebar"===t&&"yst-flex yst-mt-1 yst-justify-center"),children:(0,l.__)("Available after 5 published posts","wordpress-seo")})]})})});var Ho;function Ko(){return Ko=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)({}).hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},Ko.apply(null,arguments)}const Yo=e=>f.createElement("svg",Ko({xmlns:"http://www.w3.org/2000/svg",fill:"none","aria-hidden":"true",viewBox:"0 0 54 24"},e),Ho||(Ho=f.createElement("path",{fill:"currentColor",d:"M17.854 5.72c-4.173 0-5.842 2.798-5.842 5.913 0 3.116 1.645 6.036 5.842 6.036 4.196 0 5.831-2.93 5.824-5.846-.01-3.551-1.809-6.104-5.824-6.104v.001zm-2.528 6.09c.101-4.169 3.306-4.165 4.377-2.672.976 1.36 1.176 6.013-1.85 5.98-1.392-.016-2.486-.956-2.527-3.309zm36.371 2.968V8.74h2.161V6.117h-2.16V2.951H48.36v3.166h-1.694V8.74h1.694v5.696c0 3.239 2.26 5.162 4.643 5.56l.997-2.68c-1.39-.176-2.29-1.214-2.303-2.537zm-16.84-.957v-4.54c0-.165-.01-.32-.026-.472-.29-3.668-5.503-3.66-9.54-2.252l1.166 2.346c2.63-1.248 4.203-.926 4.753-.311.014.016.028.031.04.048l.005.007c.28.379.213.975.213 1.445-3.436 0-7.093.455-7.093 4.22 0 2.862 3.59 4.703 7.34 1.976l.556 1.341h3.215c-.286-1.575-.63-2.925-.63-3.808h.002zm-3.362-.025c-2.643 2.955-5.064.174-2.585-1.04.73-.248 1.72-.26 2.585-.26v1.3zm8.492-4.759c0-1.118 1.792-1.64 4.619-.351l.977-2.371c-3.804-1.15-8.998-1.252-9.033 2.722-.016 1.905 1.208 2.93 2.969 3.585 1.22.453 2.98.687 2.975 1.657-.006 1.268-2.736 1.463-5.221-.243l-1.004 2.572c3.39 1.686 9.692 1.733 9.66-2.49-.034-4.176-5.94-3.46-5.94-5.08h-.002zM10.638 0 5.783 13.471 3.46 6.196H0l3.872 9.935c.33.846.33 1.784 0 2.63-.433 1.11-1.153 2.057-2.908 2.294V24c3.418 0 5.265-2.1 6.913-6.699L14.337 0h-3.7z"}))),zo=({children:e})=>(0,d.jsxs)("div",{className:"yst-p-4 yst-flex yst-flex-col yst-gap-3",children:[(0,d.jsx)(Yo,{className:"yst-w-14 yst-text-primary-500"}),e]}),Vo=({withPromptForContentSuggestions:e,className:t})=>(0,d.jsx)("p",{className:q()("yst-text-slate-600 yst-my-0",t),children:e?(0,l.__)("Optimize your content for discovery or get new content suggestions.","wordpress-seo"):(0,l.__)("Optimize your content for discovery.","wordpress-seo")}),Go=(Zo=Wo,e=>!(()=>{var e,t;const s=(0,a.select)("yoast-seo/editor").getIsPremium(),i=(0,a.select)("yoast-seo/editor").getWarningMessage();return(s&&null!==(e=null===(t=(0,a.select)("yoast-seo-premium/editor"))||void 0===t?void 0:t.getMetaboxWarning())&&void 0!==e?e:[]).length>0||i.length>0})()&&(0,d.jsx)(Zo,{...e}));var Zo;function Xo({settings:s}){const{isTerm:i,isPost:o,isAiFeatureActive:r}=(0,a.useSelect)(e=>({isTerm:e("yoast-seo/editor").getIsTerm(),isPost:"post"===e("yoast-seo/editor").getPostType(),isAiFeatureActive:e("yoast-seo/editor").getPreference("isAiFeatureActive")}),[]),n=window.wpseoScriptData&&"1"===window.wpseoScriptData.isBlockEditor;return n&&(()=>{const{editorMode:t,activeAIButtonId:s}=(0,a.useSelect)(e=>({editorMode:e("core/edit-post").getEditorMode(),activeAIButtonId:e("yoast-seo/editor").getActiveAIFixesButton()}),[]),{setMarkerStatus:i}=(0,a.useDispatch)("yoast-seo/editor");(0,e.useEffect)(()=>(i("visual"===t&&s||"text"===t?"disabled":"enabled"),()=>{i("disabled")}),[t,s])})(),(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)(t.Fill,{name:"YoastMetabox",children:[(0,d.jsx)(Gs,{renderPriority:0,children:(0,d.jsx)(xs,{})},"warning"),(0,d.jsx)(Gs,{renderPriority:1,children:(0,d.jsxs)(zo,{children:[(0,d.jsx)(Go,{location:"metabox"}),(0,d.jsx)(Vo,{withPromptForContentSuggestions:r&&n&&o}),o&&n&&r&&(0,d.jsx)(Bo,{location:"metabox"})]})},"editor-intro"),s.isKeywordAnalysisActive&&(0,d.jsxs)(Gs,{renderPriority:8,children:[(0,d.jsx)(ts.TopicInputs,{isSEMrushIntegrationActive:s.isSEMrushIntegrationActive}),!window.wpseoScriptData.metabox.isPremium&&(0,d.jsx)(t.Fill,{name:"YoastRelatedKeyphrases",children:(0,d.jsx)(Mo,{})})]},"keyword-input"),(0,d.jsx)(Gs,{renderPriority:9,children:(0,d.jsx)(ks,{id:"yoast-snippet-editor-metabox",title:(0,l.__)("Search appearance","wordpress-seo"),initialIsOpen:!0,children:(0,d.jsx)(fs,{hasPaperStyle:!1})})},"search-appearance"),s.isContentAnalysisActive&&(0,d.jsx)(Gs,{renderPriority:10,children:(0,d.jsx)(ts.ReadabilityAnalysis,{shouldUpsell:s.shouldUpsell})},"readability-analysis"),s.isKeywordAnalysisActive&&(0,d.jsx)(Gs,{renderPriority:20,children:(0,d.jsx)(e.Fragment,{children:(0,d.jsx)(ts.SeoAnalysis,{shouldUpsell:s.shouldUpsell})})},"seo-analysis"),s.isInclusiveLanguageAnalysisActive&&(0,d.jsx)(Gs,{renderPriority:21,children:(0,d.jsx)(ts.InclusiveLanguageAnalysis,{})},"inclusive-language-analysis"),s.isKeywordAnalysisActive&&(0,d.jsx)(Gs,{renderPriority:22,children:s.shouldUpsell&&(0,d.jsx)(Oo,{})},"additional-keywords-upsell"),s.isKeywordAnalysisActive&&s.isWincherIntegrationActive&&(0,d.jsx)(Gs,{renderPriority:23,children:(0,d.jsx)(es,{location:"metabox"})},"wincher-seo-performance"),s.shouldUpsell&&!i&&(0,d.jsx)(Gs,{renderPriority:25,children:(0,d.jsx)(zs,{})},"internal-linking-suggestions-upsell"),s.isCornerstoneActive&&(0,d.jsx)(Gs,{renderPriority:30,children:(0,d.jsx)(is,{})},"cornerstone"),s.displayAdvancedTab&&(0,d.jsx)(Gs,{renderPriority:40,children:(0,d.jsx)(ks,{id:"collapsible-advanced-settings",title:(0,l.__)("Advanced","wordpress-seo"),children:(0,d.jsx)(ii,{})})},"advanced"),s.displaySchemaSettings&&(0,d.jsx)(Gs,{renderPriority:50,children:(0,d.jsx)(Ao,{})},"schema"),n&&(0,d.jsx)(Gs,{renderPriority:24,children:(0,d.jsx)(ts.ContentBlocks,{})},"content-blocks"),(0,d.jsx)(Gs,{renderPriority:-1,children:(0,d.jsx)(fo,{target:"wpseo-section-social"})},"social"),s.isInsightsEnabled&&(0,d.jsx)(Gs,{renderPriority:52,children:(0,d.jsx)(Ws,{location:"metabox"})},"insights")]})})}Xo.propTypes={settings:o().object.isRequired};const Qo=(0,Q.compose)([(0,a.withSelect)((e,t)=>{const{getPreferences:s}=e("yoast-seo/editor");return{settings:s(),store:t.store}})])(Xo);function Jo({target:e,store:t,theme:s}){return(0,d.jsxs)($,{target:e,children:[(0,d.jsx)(X,{store:t,theme:s}),(0,d.jsx)(Qo,{store:t,theme:s})]})}Jo.propTypes={target:o().string.isRequired,store:o().object.isRequired,theme:o().object.isRequired};const er=[];let tr=null;class sr extends e.Component{constructor(e){super(e),this.state={registeredComponents:[...er]}}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,d.jsx)(e,{},t))}}function ir(e,t){null===tr||null===tr.current?er.push({key:e,Component:t}):tr.current.registerComponent(e,t)}const or=window.yoast.externals.redux,rr=window.jQuery;var nr=s.n(rr);function ar(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}n.noop,n.noop,n.noop;const{removeMarks:lr}=U.markers,{updateReplacementVariable:cr,updateData:dr,hideReplacementVariables:pr,setContentImage:ur,setEditorDataContent:hr,setEditorDataTitle:mr,setEditorDataExcerpt:gr,setEditorDataImageUrl:yr,setEditorDataSlug:wr}=or.actions;window.yoast=window.yoast||{},window.yoast.initEditorIntegration=function(s){window.YoastSEO=window.YoastSEO||{},window.YoastSEO._registerReactComponent=ir,function(s){const i=Ds();tr=(0,e.createRef)();const o={isRtl:i.isRtl};(0,e.createRoot)(document.getElementById("wpseo-metabox-root")).render((0,d.jsxs)(t.SlotFillProvider,{children:[(0,d.jsx)(Y.Root,{context:{locationContext:"classic-metabox"},children:(0,d.jsx)(Jo,{target:"wpseo-metabox-root",store:s,theme:o})}),(0,d.jsx)(sr,{ref:tr})]}))}(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,o;i=s,o=this._store,(0,n.forEach)(i,(e,t)=>{us.includes(t)||o.dispatch(cs(t,e))}),this._store.dispatch(pr(t)),this._previousEditorData.content=s.content,this._store.dispatch(hr(s.content)),this._previousEditorData.contentImage=s.contentImage,this._store.dispatch(ur(s.contentImage)),this.setImageInSnippetPreview(s.snippetPreviewImageURL||s.contentImage),this._previousEditorData.slug=s.slug,this._store.dispatch(wr(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,n.isString)(e)||(e=this.getContent()),this._previousEditorData.content===e)return;if(this._previousEditorData.content=e,this._store.dispatch(hr(e)),this.featuredImageIsSet)return;const t=this.getContentImage(e);this._previousEditorData.contentImage!==t&&(this._previousEditorData.contentImage=t,this._store.dispatch(ur(t)),this.setImageInSnippetPreview(t))};nr()(document).on("tinymce-editor-init",(t,s)=>{s.id===this._tinyMceId&&(e(this.getContent()),["input","change","cut","paste"].forEach(t=>s.on(t,(0,n.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(wr(e)),this._store.dispatch(dr({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,o;if(null==t||null===(i=t.classList)||void 0===i||!i.contains("edit-slug"))return;const r=null===(o=document.getElementById("editable-post-name-full"))||void 0===o?void 0:o.innerText;r&&(e(r),s.disconnect(),this.subscribeToSlug())})})).observe(i,{childList:!0})}subscribeToSnippetPreviewImage(){if((0,n.isUndefined)(wp.media)||(0,n.isUndefined)(wp.media.featuredImage))return;nr()("#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(ur(e)),this.setImageInSnippetPreview(t)},"undefined"!=typeof tinyMCE&&"function"==typeof tinyMCE.on&&tinyMCE.on("addEditor",function(e){const o=e.editor;o.id===t&&(0,n.forEach)(s,function(e){o.on(e,i)})})}getFeaturedImage(){const e=nr()("#set-post-thumbnail img").attr("src");return e?(this.featuredImageIsSet=!0,e):(this.featuredImageIsSet=!1,null)}setImageInSnippetPreview(e){this._store.dispatch(yr(e)),this._store.dispatch(dr({snippetPreviewImageURL:e}))}getContentImage(e){if(this.featuredImageIsSet)return"";const t=U.languageProcessing.imageInText(e);if(0===t.length)return"";const s=nr().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=Ds();return(0,n.get)(e,"contentLocale","en_US")}()?80:156;return""!==s||!1===e?s:function(e,t=156){return(e=(e=(0,ls.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 lr(ar(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(mr(s));break;case"excerpt":this._store.dispatch(gr(s))}this._store.dispatch(cr(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(cr("excerpt",e.excerpt)),this._store.dispatch(cr("excerpt_only",e.excerpt_only))),this._previousData.snippetPreviewImageURL!==e.snippetPreviewImageURL&&this.setImageInSnippetPreview(e.snippetPreviewImageURL),this._previousData.slug!==e.slug&&this._store.dispatch(wr(e.slug)),this._previousData.title!==e.title&&this._store.dispatch(mr(e.title))}subscribeToStore(){this.subscriber=(0,n.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,n.forEach)(e.custom_taxonomies,(e,t)=>{const{name:i,label:o,descriptionName:r,descriptionLabel:n}=function(e){const t=hs(e);return{name:"ct_"+t,label:ds(e+" (custom taxonomy)"),descriptionName:"ct_desc_"+t,descriptionLabel:ds(e+" description (custom taxonomy)")}}(t),a="string"==typeof e.name?(0,ie.decodeHTML)(e.name):e.name,l="string"==typeof e.description?(0,ie.decodeHTML)(e.description):e.description;s[i]={value:a,label:o},s[r]={value:l,label:n}}),t.dispatch(function(e){return{type:"SNIPPET_EDITOR_UPDATE_REPLACEMENT_VARIABLES_BATCH",updatedVariables:e}}(s)),(0,n.omit)({...e},"custom_taxonomies")}(e=function(e,t){return e.custom_fields?((0,n.forEach)(e.custom_fields,(e,s)=>{const{name:i,label:o}=function(e){return{name:"cf_"+hs(e),label:ds(e+" (custom field)")}}(s);t.dispatch(cs(i,e,o))}),(0,n.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)}}}})()})();
💾 Save Changes
❌ Cancel