(()=>{"use strict";var e={n:n=>{var o=n&&n.__esModule?()=>n.default:()=>n;return e.d(o,{a:o}),o},d:(n,o)=>{for(var s in o)e.o(o,s)&&!e.o(n,s)&&Object.defineProperty(n,s,{enumerable:!0,get:o[s]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n)};const n=window.wp.element,o=window.yoast.propTypes;var s=e.n(o);const t=window.yoast.componentsNew,a=window.wp.i18n,i=window.yoast.styledComponents;var l=e.n(i);const d=window.wp.components,r=window.ReactJSXRuntime,c=e=>{const{title:n,className:o,showYoastIcon:s,additionalClassName:t,...a}=e,i=s?(0,r.jsx)("span",{className:"yoast-icon"}):null;return(0,r.jsx)(d.Modal,{title:n,className:`${o} ${t}`,icon:i,...a,children:e.children})};c.propTypes={title:s().string,className:s().string,showYoastIcon:s().bool,children:s().oneOfType([s().node,s().arrayOf(s().node)]),additionalClassName:s().string},c.defaultProps={title:"Yoast SEO",className:"yoast yoast-gutenberg-modal",showYoastIcon:!0,children:null,additionalClassName:""};const p=c,w=window.React;var u,h;function m(){return m=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(e[s]=o[s])}return e},m.apply(this,arguments)}const y=e=>w.createElement("svg",m({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 425 456.27"},e),u||(u=w.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"})),h||(h=w.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"}))),f=l().div`
	display: flex;
	justify-content: flex-end;
	gap: 8px;
`,g=e=>{const[o,s]=(0,n.useState)(!0);function i(){s(!1)}const l=(0,a.sprintf)(/* translators: %s expands to Yoast */
(0,a.__)("%s SEO installation","wordpress-seo"),"Yoast");let d,c=(0,a.__)("the following addons","wordpress-seo");return 1===e.addons.length&&(c=e.addons[0]),1!==e.addons.length&&(d=(0,r.jsx)("ul",{className:"ul-disc",children:e.addons.map(((e,n)=>(0,r.jsx)("li",{children:e},"addon-"+n)))})),o?(0,r.jsxs)(p,{title:l,onRequestClose:i,icon:(0,r.jsx)(y,{}),isDismissible:!1,children:[(0,r.jsx)("p",{children:(0,a.sprintf)(/* translators: %s expands to Yoast SEO Premium */
(0,a.__)("Please confirm below that you would like to install %s on this site.","wordpress-seo"),c)}),d,(0,r.jsxs)(f,{children:[(0,r.jsx)(t.Button,{onClick:i,id:"close-addon-installation-dialog",children:(0,a.__)("Cancel","wordpress-seo")}),(0,r.jsx)(t.Button,{onClick:function(){window.location.href="admin.php?page=wpseo_licenses&action=install&nonce="+e.nonce},id:"continue-addon-installation-dialog",className:"yoast-button--primary",children:(0,a.__)("Install and activate","wordpress-seo")})]})]}):null};g.propTypes={nonce:s().string.isRequired,addons:s().array},g.defaultProps={addons:[]};const v=g,j=document.createElement("div");j.setAttribute("id","wpseo-app-element"),document.getElementById("extensions").append(j),(0,n.createRoot)(j).render((0,r.jsx)(v,{nonce:wpseoAddonInstallationL10n.nonce,addons:wpseoAddonInstallationL10n.addons}))})();