(()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var a in n)e.o(n,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:n[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.element;function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}const a=window.wp.i18n,r=window.yoast.componentsNew,o=window.yoast.propTypes;var l=e.n(o);const s=window.yoast.styledComponents;var i=e.n(s);const c=window.React;var d,u;function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},p.apply(null,arguments)}var f=function(e){return c.createElement("svg",p({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 425 456.27"},e),d||(d=c.createElement("path",{d:"M73 405.26a67 67 0 0 1-6.54-1.7 65 65 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 70 0 0 1-5.08-4.19 69 69 0 0 1-8.4-9.17c-.92-1.2-1.68-2.25-2.35-3.24a71 71 0 0 1-3.44-5.64 68.3 68.3 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.3 69.3 0 0 1 14.49-13.25C50.37 84.19 52.27 83 54.2 82A67.6 67.6 0 0 1 73 75.09a68.8 68.8 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.8 68.8 0 0 1 73 405.26M368.55 60.85l-1.41-.53-6.41 17.18 1.41.53a68 68 0 0 1 8.66 4c1.93 1 3.82 2.2 5.65 3.43A69.2 69.2 0 0 1 391 98.67c1.4 1.68 2.72 3.46 3.95 5.27s2.39 3.72 3.44 5.64a68.3 68.3 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.28"})),u||(u=c.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"})))};function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},m.apply(null,arguments)}const w=window.wp.components;var y=["title","className","showYoastIcon","children","additionalClassName"],v=function(e){var t=e.title,n=void 0===t?"Yoast SEO":t,a=e.className,r=void 0===a?"yoast yoast-gutenberg-modal":a,o=e.showYoastIcon,l=void 0===o||o,s=e.children,i=void 0===s?null:s,c=e.additionalClassName,d=void 0===c?"":c,u=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.includes(a))continue;n[a]=e[a]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,y),p=l?React.createElement("span",{className:"yoast-icon"}):null;return React.createElement(w.Modal,m({title:n,className:"".concat(r," ").concat(d),icon:p},u),i)};v.propTypes={title:l().string,className:l().string,showYoastIcon:l().bool,children:l().oneOfType([l().node,l().arrayOf(l().node)]),additionalClassName:l().string};const h=v;var b,g,O,E=i().div(b||(g=["\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\tgap: 8px;\n"],O||(O=g.slice(0)),b=Object.freeze(Object.defineProperties(g,{raw:{value:Object.freeze(O)}})))),j=function(e){var o,l=e.nonce,s=e.addons,i=void 0===s?[]:s,c=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,o,l,s=[],i=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(a=o.call(n)).done)&&(s.push(a.value),s.length!==t);i=!0);}catch(e){c=!0,r=e}finally{try{if(!i&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var a={}.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?n(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,t.useState)(!0),2),d=c[0],u=c[1],p=(0,t.useCallback)(function(){u(!1)},[u]),m=(0,t.useCallback)(function(){window.location.href="admin.php?page=wpseo_licenses&action=install&nonce="+l},[l]),w=(0,t.useCallback)(function(){return React.createElement(r.Button,{onClick:p,id:"close-addon-installation-dialog"},(0,a.__)("Cancel","wordpress-seo"))},[p]),y=(0,a.sprintf)(/* translators: %s expands to Yoast */ /* translators: %s expands to Yoast */
(0,a.__)("%s SEO installation","wordpress-seo"),"Yoast"),v=(0,a.__)("the following addons","wordpress-seo");return 1===i.length&&(v=i[0]),1!==i.length&&(o=React.createElement("ul",{className:"ul-disc"},i.map(function(e,t){return React.createElement("li",{key:"addon-"+t},e)}))),d?React.createElement(h,{title:y,onRequestClose:p,icon:React.createElement(f,null),isDismissible:!1},React.createElement("p",null,(0,a.sprintf)(/* translators: %s expands to Yoast SEO Premium */ /* translators: %s expands to Yoast SEO Premium */
(0,a.__)("Please confirm below that you would like to install %s on this site.","wordpress-seo"),v)),o,React.createElement(E,null,w(),React.createElement(r.Button,{onClick:m,id:"continue-addon-installation-dialog",className:"yoast-button--primary"},(0,a.__)("Install and activate","wordpress-seo")))):null};j.propTypes={nonce:l().string.isRequired,addons:l().array};const R=j;var A=document.createElement("div");A.setAttribute("id","wpseo-app-element"),document.getElementById("extensions").append(A),(0,t.createRoot)(A).render(React.createElement(R,{nonce:wpseoAddonInstallationL10n.nonce,addons:wpseoAddonInstallationL10n.addons}))})();