!function(){var e={151:function(e){var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n * @license MIT */ e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},213:function(e,t,n){var o,r,a;r=[],void 0===(a="function"==typeof(o=function(){"use strict";function t(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function o(e,t,n){var o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){s(o.response,t,n)},o.onerror=function(){console.error("could not download file")},o.send()}function r(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function a(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var c="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:void 0,l=c.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),s=c.saveAs||("object"!=typeof window||window!==c?function(){}:"download"in HTMLAnchorElement.prototype&&!l?function(e,t,n){var l=c.URL||c.webkitURL,s=document.createElement("a");t=t||e.name||"download",s.download=t,s.rel="noopener","string"==typeof e?(s.href=e,s.origin===location.origin?a(s):r(s.href)?o(e,t,n):a(s,s.target="_blank")):(s.href=l.createObjectURL(e),setTimeout(function(){l.revokeObjectURL(s.href)},4e4),setTimeout(function(){a(s)},0))}:"msSaveOrOpenBlob"in navigator?function(e,n,c){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,c),n);else if(r(e))o(e,n,c);else{var l=document.createElement("a");l.href=e,l.target="_blank",setTimeout(function(){a(l)})}}:function(e,t,n,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),"string"==typeof e)return o(e,t,n);var a="application/octet-stream"===e.type,s=/constructor/i.test(c.HTMLElement)||c.safari,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||a&&s||l)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=i?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=e:location=e,r=null},u.readAsDataURL(e)}else{var m=c.URL||c.webkitURL,d=m.createObjectURL(e);r?r.location=d:location.href=d,r=null,setTimeout(function(){m.revokeObjectURL(d)},4e4)}});c.saveAs=s.saveAs=s,e.exports=s})?o.apply(t,r):o)||(e.exports=a)},503:function(e,t,n){var o,r,a,c,l;o=n(939),r=n(151).utf8,a=n(206),c=n(151).bin,(l=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?c.stringToBytes(e):r.stringToBytes(e):a(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var n=o.bytesToWords(e),s=8*e.length,i=1732584193,u=-271733879,m=-1732584194,d=271733878,p=0;p>>24)|4278255360&(n[p]<<24|n[p]>>>8);n[s>>>5]|=128<>>9<<4)]=s;var f=l._ff,h=l._gg,g=l._hh,b=l._ii;for(p=0;p>>0,u=u+v>>>0,m=m+_>>>0,d=d+E>>>0}return o.endian([i,u,m,d])})._ff=function(e,t,n,o,r,a,c){var l=e+(t&n|~t&o)+(r>>>0)+c;return(l<>>32-a)+t},l._gg=function(e,t,n,o,r,a,c){var l=e+(t&o|n&~o)+(r>>>0)+c;return(l<>>32-a)+t},l._hh=function(e,t,n,o,r,a,c){var l=e+(t^n^o)+(r>>>0)+c;return(l<>>32-a)+t},l._ii=function(e,t,n,o,r,a,c){var l=e+(n^(t|~o))+(r>>>0)+c;return(l<>>32-a)+t},l._blocksize=16,l._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var n=o.wordsToBytes(l(e,t));return t&&t.asBytes?n:t&&t.asString?c.bytesToString(n):o.bytesToHex(n)}},939:function(e){var t,n;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,o=0;n>>5]|=e[n]<<24-o%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n>>6*(3-a)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],o=0,r=0;o>>6-2*r);return n}},e.exports=n},942:function(e,t){var n; /*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t0&&e(`/extensions/${Object.keys(n)[0]}`)},[n,t]),t?(0,r.createElement)(M,null):(0,r.createElement)("div",{className:"ct-extensions-container"},(0,r.createElement)(s.Transition,{items:!0,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],initial:null,config:function(e,t){return{duration:300}}},function(e,t){return t?(0,r.createElement)(s.animated.p,{style:e,className:"ct-loading-text"},(0,r.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 100 100"},(0,r.createElement)("g",{transform:"translate(50,50)"},(0,r.createElement)("g",{transform:"scale(1)"},(0,r.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"currentColor"}),(0,r.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},(0,r.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"}))))),(0,l.__)("Loading Extensions Status...","blocksy-companion")):null}))},N=n(942),L=n.n(N);function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function T(e){for(var t=1;t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t'}}),t&&t.config.name,t&&(!t.config.requirement||t.config.requirement&&t.config.requirement.check)&&(0,r.createElement)("div",{className:L()("ct-option-switch",{"ct-active":p}),onClick:function(){"from-custom-content"!==d.activationStrategy?i(function(){o(function(e){return U(U({},e),{},{[t.name]:U(U({},e[t.name]),{},{__object:e[t.name].__object?null:{}})})})}):c(!a)}},(0,r.createElement)("span",null))),t&&t.config.description&&(0,r.createElement)("p",null,t.config.description),f.length>0&&(0,r.createElement)("div",{className:"ct-extension-actions"},f.map(function(e,t){return(0,r.createElement)(r.Fragment,{key:t},e)}))),p&&t.config.features&&(!t.config.requirement||t.config.requirement&&t.config.requirement.check)&&(0,r.createElement)("div",{className:"ct-extension-modules"},t.config.features.map(function(e){return(0,r.createElement)("div",{className:"ct-extension-module",key:e.id},(0,r.createElement)("h5",null,e.title,(0,r.createElement)("div",{className:L()("ct-option-switch",{"ct-active":t.data&&t.data.settings.features[e.id]}),onClick:function(){i(function(){n({extAction:{type:"update-features",require_refresh:!(null==e||!e.require_refresh),settings:{features:U(U({},t.data.settings.features),{},{[e.id]:!t.data.settings.features[e.id]})}}}),o(function(n){return U(U({},n),{},{[t.name]:U(U({},n[t.name]),{},{data:U(U({},n[t.name].data),{},{settings:U(U({},n[t.name].data.settings),{},{features:U(U({},n[t.name].data.settings.features),{},{[e.id]:!n[t.name].data.settings.features[e.id]})})})})})})},!1)}},(0,r.createElement)("span",null))),(0,r.createElement)("p",null,e.description),e.documentation&&!ctDashboardLocalizations.plugin_data.hide_docs_section||(e.customize||e.manage)&&t.data&&t.data.settings.features[e.id]?(0,r.createElement)("div",{className:"ct-extension-module-actions"},e.documentation&&!ctDashboardLocalizations.plugin_data.hide_docs_section&&(0,r.createElement)("a",{href:e.documentation,target:"_blank"},(0,r.createElement)("svg",{width:"14px",height:"14px",viewBox:"0 0 24 24",fill:"currentColor"},(0,r.createElement)("path",{d:"M23 2.1h-6.6c-1.8 0-3.4.9-4.4 2.3C11 3 9.4 2.1 7.6 2.1H1c-.6 0-1 .4-1 1v16.5c0 .6.4 1 1 1h7.7c1.3 0 2.3 1 2.3 2.3 0 .6.4 1 1 1s1-.4 1-1c0-1.3 1-2.3 2.3-2.3H23c.6 0 1-.4 1-1V3.1c0-.6-.4-1-1-1zM11 19.3c-.7-.4-1.5-.7-2.3-.7H2V4.1h5.6c1.9 0 3.4 1.5 3.4 3.4v11.8zm11-.7h-6.7c-.8 0-1.6.2-2.3.7V7.5c0-1.9 1.5-3.4 3.4-3.4H22v14.5z"})),(0,l.__)("Documentation","blocksy-companion")),(e.customize||e.manage)&&t.data&&t.data.settings.features[e.id]&&(0,r.createElement)("a",{href:e.customize||e.manage,target:"_blank"},(0,r.createElement)("svg",{width:"14px",height:"14px",viewBox:"0 0 24 24",fill:"currentColor"},(0,r.createElement)("path",{d:"M4 11c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1s-1 .4-1 1v7c0 .6.4 1 1 1zM12 11c-.6 0-1 .4-1 1v9c0 .6.4 1 1 1s1-.4 1-1v-9c0-.6-.4-1-1-1zM20 13c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1s-1 .4-1 1v9c0 .6.4 1 1 1zM7 13H1c-.6 0-1 .4-1 1s.4 1 1 1h2v6c0 .6.4 1 1 1s1-.4 1-1v-6h2c.6 0 1-.4 1-1s-.4-1-1-1zM15 7h-2V3c0-.6-.4-1-1-1s-1 .4-1 1v4H9c-.6 0-1 .4-1 1s.4 1 1 1h6c.6 0 1-.4 1-1s-.4-1-1-1zM23 15h-6c-.6 0-1 .4-1 1s.4 1 1 1h2v4c0 .6.4 1 1 1s1-.4 1-1v-4h2c.6 0 1-.4 1-1s-.4-1-1-1z"})),e.customize?(0,l.__)("Customize","blocksy-companion"):(0,l.__)("Manage","blocksy-companion"))):null)})),t&&t.config.requirement&&!t.config.requirement.check&&t.config.requirement.message&&(0,r.createElement)("div",{className:"ct-extension-options ct-newsletter-subscribe-options"},(0,r.createElement)("div",{className:"ct-extension-requirement"},(0,r.createElement)("span",null,(0,r.createElement)("svg",{width:"16",height:"16",fill:"#ffffff",viewBox:"0 0 24 24"},(0,r.createElement)("path",{d:"M12,23.6c-1.4,0-2.6-1-2.8-2.3L8.9,20h6.2l-0.3,1.3C14.6,22.6,13.4,23.6,12,23.6z M24,17.8H0l3.1-2c0.5-0.3,0.9-0.7,1.1-1.3c0.5-1,0.5-2.2,0.5-3.2V7.6c0-4.1,3.2-7.3,7.3-7.3s7.3,3.2,7.3,7.3v3.6c0,1.1,0.1,2.3,0.5,3.2c0.3,0.5,0.6,1,1.1,1.3L24,17.8zM6.1,15.6h11.8c0,0-0.1-0.1-0.1-0.2c-0.7-1.3-0.7-2.9-0.7-4.2V7.6c0-2.8-2.2-5.1-5.1-5.1c-2.8,0-5.1,2.2-5.1,5.1v3.6c0,1.3-0.1,2.9-0.7,4.2C6.1,15.5,6.1,15.6,6.1,15.6z"}))),t.config.requirement.message)),p&&d.content,u):null};var J=function(){const e=ctDashboardLocalizations.plugin_data,t=e.facebook||{},n=e.video_tutorials||{},o=e.knowledge_base||{},a=e.support||{},c=[{key:"facebook",hide:e.hide_support_facebook_section,icon:(0,r.createElement)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor"},(0,r.createElement)("path",{d:"M8.6 6.7c0-1.9 1.5-3.5 3.4-3.5s3.4 1.5 3.4 3.5-1.5 3.5-3.4 3.5-3.4-1.6-3.4-3.5zM22 11.3h-3.9c.5.5.7 1.2.7 2v5.9c0 .6-.2 1.2-.3 1.7H22c1.2-.8 2-2.2 2-3.8v-3.7c0-1.2-.9-2.1-2-2.1zm.8-4.1c0-1.6-1.3-2.9-2.9-2.9-1.6 0-2.9 1.3-2.9 2.9 0 1.6 1.3 2.9 2.9 2.9 1.7 0 2.9-1.3 2.9-2.9zM5.2 13c.1-.7.3-1.3.7-1.8H1.8c-1 .1-1.8.9-1.8 2V17c0 1.6.8 2.9 2 3.8h3.5c-.2-.6-.3-1.3-.3-2.1V13zM4 4.4c-1.6 0-2.9 1.3-2.9 2.9 0 1.6 1.3 2.9 2.9 2.9s2.9-1.3 2.9-2.9c0-1.7-1.3-2.9-2.9-2.9zm11.2 6.9H8.8c-1.1 0-2 .9-2 2v5.5c0 .7.2 1.4.4 2.1h9.5c.3-.6.4-1.3.4-2.1v-5.5c.1-1.1-.8-2-1.9-2z"})),title:t.title||(0,l.__)("Facebook Community","blocksy"),description:t.description||(0,l.__)("Share ideas, help others, ask questions and discuss your next project in our friendly community.","blocksy"),link:t.link||"https://www.facebook.com/groups/blocksy.community",buttonText:t.buttonText||(0,l.__)("Join Our Community","blocksy")},{key:"video_tutorials",hide:e.hide_support_video_section,icon:(0,r.createElement)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"currentColor"},(0,r.createElement)("path",{d:"M13.3 3.7 8.5.4C7.4-.3 5.9-.1 5.2 1c-.3.4-.5.9-.5 1.4v19.1c0 1.3 1.1 2.4 2.4 2.4.5 0 1-.2 1.4-.4l4.7-3.3 9-6.3c1.1-.8 1.4-2.3.6-3.4l-.6-.6-8.9-6.2z"})),title:n.title||(0,l.__)("Video Tutorials","blocksy"),description:n.description||(0,l.__)("Learn how to do just about anything within Blocksy by following our byte-sized video tutorials.","blocksy"),link:n.link||"https://creativethemes.com/blocksy/video-tutorials/",buttonText:n.buttonText||(0,l.__)("Watch Tutorials","blocksy")},{key:"knowledge_base",hide:e.hide_support_docs_section,icon:(0,r.createElement)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor"},(0,r.createElement)("path",{d:"M24 4.1v13.8c0 .7-.5 1.2-1.2 1.3-2 .1-6.1.5-8.9 1.9-.4.2-.9-.1-.9-.6V5.7c0-.2.1-.4.3-.5 2.7-1.7 7.2-2.1 9.4-2.3.7-.1 1.3.5 1.3 1.2zM1.4 2.9C.6 2.8 0 3.4 0 4.1v13.8c0 .7.5 1.2 1.2 1.3 2 .1 6.1.5 8.9 1.9.4.2.9-.1.9-.5V5.7c0-.2-.1-.4-.3-.5C8.1 3.5 3.6 3 1.4 2.9z"})),title:o.title||(0,l.__)("Knowledge Base","blocksy"),description:o.description||(0,l.__)("Dive in with our documentation and learn tips and tricks about Blocksy and its components.","blocksy"),link:o.link||"https://creativethemes.com/blocksy/docs/",buttonText:o.buttonText||(0,l.__)("View Documentation","blocksy")},{key:"support",hide:e.hide_support_section,icon:(0,r.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},(0,r.createElement)("path",{d:"M8.3 7.3 4.1 3C6.2 1.1 9 0 12 0s5.8 1.1 7.9 3l-4.3 4.3C14.6 6.5 13.4 6 12 6s-2.6.5-3.7 1.3zM12 18c-1.4 0-2.6-.5-3.7-1.3L4.1 21c2.1 1.9 4.9 3 7.9 3s5.8-1.1 7.9-3l-4.3-4.3c-1 .8-2.2 1.3-3.6 1.3zm9-13.9-4.3 4.3c.8 1 1.3 2.3 1.3 3.7s-.5 2.6-1.3 3.7l4.3 4.3c1.9-2.1 3-4.9 3-7.9s-1.1-6-3-8.1zM6 12c0-1.4.5-2.6 1.3-3.7L3 4.1C1.1 6.2 0 9 0 12s1.1 5.8 3 7.9l4.3-4.3C6.5 14.6 6 13.4 6 12z"})),title:a.title||(0,l.__)("Support","blocksy"),description:a.description||(0,l.__)("If your questions have not been answered by documentation or video tutorials, drop us a line.","blocksy"),link:a.link||ctDashboardLocalizations.support_url,buttonText:a.buttonText||(0,l.__)("Submit a Ticket","blocksy")}].filter(function(e){return!e.hide});return 0===c.length?null:(0,r.createElement)("div",{className:"ct-support-container-wrapper"},(0,r.createElement)("ul",{className:"ct-support-container","data-placement":"bottom"},c.map(function({key:e,icon:t,title:n,description:o,link:a,buttonText:c}){return(0,r.createElement)("li",{key:e},(0,r.createElement)("h4",null,(0,r.createElement)("span",null,t),n),(0,r.createElement)("p",null,o),(0,r.createElement)("a",{href:a,className:"ct-button","data-hover":"blue",target:"_blank"},c))})))};function Y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function K(e){for(var t=1;t-1}).map(function(e){return{personal_v2:(0,l.__)("Personal","blocksy-companion"),professional_v2:(0,l.__)("Business","blocksy-companion"),agency_v2:(0,l.__)("Agency","blocksy-companion")}[e]}),"disjunction"))),(0,r.createElement)("h3",null,(0,l.__)("Available for","blocksy-companion")),(0,r.createElement)("span",{className:"ct-available-builders"},ce(n.filter(function({name:t}){return t===e.name||""}).sort(function(e,t){return e.buildert.builder?1:0}).map(function({builder:e}){return ne(e)||"Gutenberg"})))),e.is_pro&&(0,r.createElement)("span",{className:"ct-pro-badge"},"PRO")),(0,r.createElement)("div",{className:"ct-demo-actions"},(0,r.createElement)("h4",null,e.name),(0,r.createElement)("div",null,(0,r.createElement)("a",{className:"ct-button",target:"_blank",href:e.url},(0,l.__)("Preview","blocksy-companion")),(0,r.createElement)("button",{className:"ct-button-primary",onClick:function(){c?s():(a(!1),o(e.name))}},t&&t.demo.indexOf(e.name)>-1?(0,l.__)("Modify","blocksy-companion"):(0,l.__)("Import","blocksy-companion"))))),i)};var se=function(){const{demos_list:e}=(0,r.useContext)(nt);return(0,r.createElement)("ul",{className:"ct-demo-list"},e.filter(function(t,n){return e.map(function({name:e}){return e}).indexOf(t.name)===n}).map(function(e){return(0,r.createElement)(le,{key:e.name,demo:e})}))};function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function ue(e){for(var t=1;t0&&e.cleanup){console.log(`[${c}] Running cleanup before attempt ${a+1}`);try{await he({title:`${c} (cleanup)`,params:e.cleanup.params},{},{maxRetries:3}),console.log(`[${c}] Cleanup completed`)}catch(e){console.log(`[${c}] Cleanup failed: ${e.message}, continuing anyway`)}}if(a>=2){const e=1e3*Math.pow(2,a-2);console.log(`[${c}] Waiting ${e}ms before attempt ${a+1}`),await new Promise(function(t){return setTimeout(t,e)})}console.log(`[${c}] Attempt ${a+1}/${n}`);const u=Date.now();let m,d={};"sse"===o&&null!==l&&(d.duration=l,console.log(`[${c}] Using safe duration: ${l}s`));try{m=await pe(e,t,d,{strategy:o,onStatus:r})}catch(e){const t=Date.now()-u;console.log(`[${c}] Attempt ${a+1} failed after ${t}ms: ${e.message}`),"sse"===o&&null===l&&(l=Math.max(10,Math.floor(.7*t/1e3)),console.log(`[${c}] Calculated safe duration: ${l}s`)),a++;continue}const p=Date.now()-u;if("sse"===o&&"content_import_timeout_reached"===(null===(s=m.data)||void 0===s?void 0:s.status)){null===l&&(l=Math.max(10,Math.floor(.7*p/1e3))),console.log(`[${c}] Timeout reached, continuing with chunked import (safe duration: ${l}s)`);let n=ue(ue({},t),{},{importer_data:m.data.importer_data});for(;;){var i;let t;console.log(`[${c}] Continuing chunked import (processed: ${m.data.total_processed}/${m.data.total_posts})`);try{t=await pe(e,n,{duration:l},{strategy:o,onStatus:r})}catch(e){console.log(`[${c}] Chunked import failed: ${e.message}, restarting attempt`);break}if("content_import_timeout_reached"!==(null===(i=t.data)||void 0===i?void 0:i.status))return console.log(`[${c}] Chunked import complete`),{success:!0,data:t.data,requestsPayload:ue(ue({},n),t.data)};console.log(`[${c}] Chunk completed, more content remaining (processed: ${t.data.total_processed}/${t.data.total_posts})`),n=ue(ue({},n),{},{importer_data:t.data.importer_data})}a++;continue}console.log(`[${c}] Success on attempt ${a+1} (took ${p}ms)`);let f=t;return m.data&&null!=m.data&&"Object"===m.data.constructor.name&&(f=ue(ue({},t),m.data)),{success:!0,data:m.data,requestsPayload:f}}throw console.log(`[${c}] All ${n} attempts failed`),new Error(me)};function ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function be(e){for(var t=1;t1&&(0,r.createElement)("div",{className:"ct-demo-builder"},(0,r.createElement)("i",{className:"ct-demo-icon"},(0,r.createElement)("svg",{width:"52",height:"40",viewBox:"0 0 52 40"},(0,r.createElement)("path",{fill:"#DBE7EE",d:"M0,38.1C0,39.1,0.9,40,1.8,40h39.3c1.1,0,1.8-0.9,1.8-1.9v-31H0V38.1z"}),(0,r.createElement)("path",{fill:"#CFDBE4",d:"M13.8,14.6v18.8h22.6V14.6H13.8zM34.8,31.9H15.4V16.1h19.4V31.9z"}),(0,r.createElement)("path",{fill:"#BDC8D7",d:"M13.1,15.3L13.1,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C13.7,16.8,13.1,16.1,13.1,15.3z M34.1,15.3L34.1,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C34.8,16.8,34.1,16.1,34.1,15.3z M13.1,32.7L13.1,32.7c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C13.7,34.1,13.1,33.5,13.1,32.7z M34.1,32.7L34.1,32.7c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C34.8,34.1,34.1,33.5,34.1,32.7z M23.3,15.3L23.3,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C24,16.8,23.3,16.1,23.3,15.3z M4.2,13.9h5.9v7.9H4.2V13.9zM4.2,23.3h5.9v2.9H4.2V23.3zM0,9V1.9C0,0.9,0.9,0,1.8,0h39.3c1.1,0,1.8,0.9,1.8,1.9V9H0z M42.9,35.4V10.9h-9.3v15.2L42.9,35.4zM7.2,27.6c-1.6,0-3,1.3-3,3c0,1.6,1.3,3,3,3s3-1.3,3-3C10.2,28.9,8.8,27.6,7.2,27.6z"}),(0,r.createElement)("path",{fill:"#0C7AB3",d:"M50,27.8H35.6c-1.1,0-2-0.9-2-2v-18c0-1.1,0.9-2,2-2H50c1.1,0,2,0.9,2,2v18C52,26.9,51.1,27.8,50,27.8z"}),(0,r.createElement)("path",{fill:"#44ACDF",d:"M49,17.5H36.8c-0.7,0-1.2-0.5-1.2-1.2V9.1c0-0.7,0.5-1.2,1.2-1.2H49c0.7,0,1.2,0.5,1.2,1.2v7.3C50.2,17,49.6,17.5,49,17.5z M50.2,20.4v-0.1c0-0.5-0.4-1-1-1H36.5c-0.5,0-1,0.4-1,1v0.1c0,0.5,0.4,1,1,1h12.7C49.7,21.4,50.2,20.9,50.2,20.4z M40.8,25.2h-4.3c-0.5,0-1-0.4-1-1v-0.1c0-0.5,0.4-1,1-1h4.3c0.5,0,1,0.4,1,1v0.1C41.7,24.8,41.3,25.2,40.8,25.2z M49.2,25.2h-4.3c-0.5,0-1-0.4-1-1v-0.1c0-0.5,0.4-1,1-1h4.3c0.5,0,1,0.4,1,1v0.1C50.2,24.8,49.7,25.2,49.2,25.2z"}),(0,r.createElement)("path",{fill:"#C8E6F4",d:"M47.4,11.2h-9.1c-0.2,0-0.5-0.2-0.5-0.4v0c0-0.2,0.2-0.4,0.5-0.4h9.1c0.2,0,0.5,0.2,0.5,0.4v0C47.8,11,47.6,11.2,47.4,11.2z M47.9,14.7L47.9,14.7c0-0.2-0.2-0.5-0.5-0.5h-9.1c-0.2,0-0.4,0.2-0.4,0.4v0c0,0.2,0.2,0.4,0.4,0.4h9.1C47.7,15.1,47.9,14.9,47.9,14.7z"}),(0,r.createElement)("path",{fill:"#FFFFFF",d:"M26.3,20.8h-2.9l-2.9,7.9H23l0.3-0.7h2.8l0.3,0.7h2.7L26.3,20.8z M23.9,25.8l0.8-2.2h0l0.8,2.2H23.9zM46.5,10.7c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5c0-0.8,0.7-1.5,1.5-1.5S46.5,9.9,46.5,10.7zM42.1,14.7c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5S42.1,13.9,42.1,14.7z"}))),(0,r.createElement)("h2",null,(0,l.__)("Choose Page Builder","blocksy-companion")),(0,r.createElement)("p",null,(0,l.__)("This starter site can be imported and used with one of these page builders. Please select one in order to continue.","blocksy-companion")),(0,r.createElement)("ul",{"data-count":d.length},d.sort(function(e,t){return e.buildert.builder?1:0}).map(function({builder:n,plugins:o}){return(0,r.createElement)("li",{key:n,className:L()({active:n===(null===e.builder?d[0].builder:e.builder)}),onClick:function(){t(ke(ke({},e),{},{builder:n,plugins:o.map(function(e){return{plugin:e,enabled:!0}})}))}},(0,r.createElement)("figure",null,(0,r.createElement)("span",{className:L()("ct-checkbox",{active:n===(null===e.builder?d[0].builder:e.builder)})},(0,r.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},(0,r.createElement)("polyline",{className:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))),""===n&&(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},(0,r.createElement)("path",{d:"M122.5 35.5c-1.7-1.1-4-.7-5.1 1C110.8 46.4 96.8 47 96 47h-.3c-17.4 0-24 14.8-24.3 15.4-.8 1.9.1 4 1.9 4.8.5.2 1 .3 1.5.3 1.4 0 2.7-.8 3.4-2.2.1-.1 4.6-10.3 16.3-11v19c-.5 4.1-2.4 7.3-5.8 9.7-3.6 2.5-8.3 3.8-14.1 3.8-7 0-12.7-2.4-16.9-7.2-4.3-4.8-6.4-11.5-6.4-20.2l.1-20.9c.3-7.7 2.4-13.8 6.4-18.2 4.3-4.8 9.9-7.2 16.9-7.2 5.8 0 10.6 1.3 14.1 3.8 3.6 2.5 5.6 5.9 5.9 10.3v.5c0 2.5 2.1 4.6 4.6 4.6 2.5 0 4.6-2.1 4.6-4.6v-.5c-.7-6.6-3.7-11.9-9.1-15.8-5.4-4-12.2-5.9-20.4-5.9-9.7 0-17.6 3.2-23.5 9.6-5.6 6-8.6 13.8-8.9 23.5 0 .7-.1 1.3-.1 2l.1 18.8h-.1c0 10.7 3 19.2 9 25.5 6 6.4 13.8 9.6 23.5 9.6 8.2 0 14.9-1.9 20.4-5.9 5-3.6 7.9-8.4 8.9-14.3l.2-21c6.1-1.5 14.4-4.8 19.6-12.7 1.3-1.7.8-4-1-5.1z"})),"brizy"===n&&(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},(0,r.createElement)("path",{d:"M14.6 36.7L75 0l60.4 36.7L75 73.4 14.6 36.7zm21.7.9L75 61.2l38.8-23.6L75 14 36.3 37.6z",fill:"#181c25"}),(0,r.createElement)("path",{fill:"#a7b2dd",d:"M14.6 63.2l10.8-6.5L75 86.8l49.9-30 10.5 6.4L75 100z"})),"elementor"===n&&(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},(0,r.createElement)("path",{d:"M32.5 7.6h17v84.9h-17V7.6zm34 84.9h51v-17h-51v17zm0-34h51v-17h-51v17zm0-51v17h51v-17h-51z"}))),(0,r.createElement)("div",{className:"builder-name"},ne(n)||"Gutenberg"))}))))};function xe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Ce(e){for(var t=1;t0&&r.push("plugins"),e.content.erase_content&&r.push("erase_content"),e.content.options&&r.push("options"),e.content.widgets&&r.push("widgets"),e.content.content&&r.push("content"),o&&r.push("install_finish"),r},Me=function(e){const{demos_list:t,currentDemo:n,setInstallerBlockingReleased:o,setCurrentlyInstalledDemo:a,pluginsStatus:c}=(0,r.useContext)(nt),{is_child_theme:s}=(0,r.useContext)(V),[i,u]=(0,r.useState)(!1),[m,d]=(0,r.useState)(null),[p,f]=(0,r.useState)(!1),[h,g]=(0,r.useState)(0),b=(0,r.useMemo)(function(){const[o,r]=(n||"").split(":"),a=t.filter(function({name:e}){return e===o}).sort(function(e,t){return e.buildert.builder?1:0});return`${n}:${null===e.builder?a[0].builder:e.builder}`},[n,e,t]),y=(0,r.useMemo)(function(){return ze({demoConfiguration:e,pluginsStatus:c,is_child_theme:s,includeMetaSteps:!0})},[e,c,s]),v=(0,r.useCallback)(async function(t){const n=function(e){const{currentDemoWithVariation:t,demoConfiguration:n,pluginsStatus:o,demoContent:r}=e,a=n.plugins.filter(function({enabled:e,plugin:t}){return e&&!o[t]}).map(function({plugin:e}){return e});return{register_current_demo:{requests:[{title:(0,l.__)("Preparing data...","blocksy-companion"),params:{action:"blocksy_demo_register_current_demo",demo_name:t}}]},child_theme:{requests:[{title:(0,l.__)("Child theme","blocksy-companion"),params:{action:"blocksy_demo_install_child_theme"}}]},plugins:{requests:a.map(function(e){return{title:(0,l.sprintf)((0,l.__)("Installing %s","blocksy-companion"),ne(e)),params:{action:"blocksy_demo_activate_plugins",plugins:e}}})},erase_content:{requests:[{title:(0,l.__)("Preparing content","blocksy-companion"),params:{action:"blocksy_demo_erase_content"}}]},options:{requests:[{title:(0,l.__)("Import options","blocksy-companion"),params:{action:"blocksy_demo_install_options",demo_name:t}}]},widgets:{requests:[{title:(0,l.__)("Import widgets","blocksy-companion"),params:{action:"blocksy_demo_install_widgets",demo_name:t},cleanup:{params:{action:"blocksy_demo_erase_content",to_erase:"widgets"}}}]},content:{requests:[{title:(0,l.__)("Import content","blocksy-companion"),params:{action:"blocksy_demo_install_content",demo_name:t},cleanup:{params:{action:"blocksy_demo_erase_content",to_erase:"content"}}}]},install_finish:{requests:[{title:(0,l.__)("Final touches","blocksy-companion"),params:{action:"blocksy_demo_install_finish"}}]}}}({currentDemoWithVariation:b,demoConfiguration:e,pluginsStatus:c,demoContent:t}),r=y.length;let a=0,s={};const i=function(e,t=null){console.timeEnd("Blocksy:Dashboard:DemoInstall"),e?u(!0):f(t),o(!0),window.removeEventListener("beforeunload",Pe)};for(const e of y){const t=n[e];if(t&&0!==t.requests.length){for(const e of t.requests){d(e.title);const t="blocksy_demo_install_content"===e.params.action;try{s=(await he(e,s,t?{strategy:"sse",onStatus:function(e){d(e)}}:{})).requestsPayload}catch(e){return void i(!1,e.message)}}a++,g(a/r*100),r===a&&i(!0)}}},[y,g]),_=(0,r.useCallback)(async function(){window.addEventListener("beforeunload",Pe),console.time("Blocksy:Dashboard:DemoInstall"),a({demo:`${n}:${e.builder}`}),d((0,l.__)("Preparing data...","blocksy-companion"));const t=await fetch(de({action:"blocksy_demo_get_content_preliminary_data",demo_name:b}));if(200===t.status){const e=await t.json();if(!e.success)return void f(e.data.message||me);v(e.data)}},[v,b]);return(0,r.useEffect)(function(){_()},[]),{isCompleted:i,isError:p,lastMessage:m,progress:h}};var De=function({lastMessage:e,progress:t}){return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("i",{className:"ct-demo-icon"},(0,r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 50 50"},(0,r.createElement)("path",{className:"g1",d:"M47,38.8c0.3-1,0.5-2,0.5-3.1c0-1.1-0.2-2.1-0.5-3.1l0.2-0.1l1.8-1.7l-1.8-3.1l-2.3,0.7l-0.2,0.1c-1.4-1.5-3.3-2.7-5.4-3.1V25l-0.6-2.4h-3.5L34.5,25v0.3c-2.1,0.5-4,1.6-5.4,3.1l-0.2-0.1l-2.3-0.7l-1.8,3.1l1.7,1.7l0.2,0.1c-0.3,1-0.5,2-0.5,3.1c0,1.1,0.2,2.1,0.5,3.1l-0.2,0.1l-1.8,1.7l1.8,3.1l2.3-0.7l0.2-0.1c1.4,1.5,3.3,2.7,5.4,3.1v0.3l0.6,2.4h3.5l0.6-2.4V46c2.1-0.5,4-1.6,5.4-3.1l0.2,0.1l2.3,0.7l1.8-3.1l-1.7-1.7L47,38.8z M36.9,41.5c-3.3,0-5.9-2.6-5.9-5.9s2.6-5.9,5.9-5.9s5.9,2.6,5.9,5.9S40.1,41.5,36.9,41.5z"}),(0,r.createElement)("path",{className:"g2",d:"M21.2,32.2c0.2-0.8,0.4-1.7,0.4-2.5c0-0.9-0.1-1.7-0.4-2.5l0.3-0.2l1.7-1.7l-1.8-3.1L19.1,23l-0.3,0.2c-1.2-1.2-2.7-2.1-4.4-2.5v-0.3l-0.6-2.4h-3.5l-0.6,2.4v0.3c-1.7,0.4-3.2,1.3-4.4,2.5L5.1,23l-2.3-0.7L1,25.4L2.7,27L3,27.2c-0.2,0.8-0.4,1.7-0.4,2.5c0,0.9,0.1,1.7,0.4,2.5l-0.3,0.1L1,34.1l1.8,3.1l2.3-0.7l0.3-0.1c1.2,1.2,2.7,2.1,4.4,2.5v0.3l0.6,2.4h3.5l0.6-2.4v-0.3c1.7-0.4,3.2-1.3,4.4-2.5l0.3,0.1l2.3,0.7l1.8-3.1l-1.7-1.7L21.2,32.2z M12.1,34.4c-2.6,0-4.7-2.1-4.7-4.7S9.5,25,12.1,25s4.7,2.1,4.7,4.7S14.7,34.4,12.1,34.4z"}),(0,r.createElement)("path",{className:"g3",d:"M37.7,15.7c0.2-0.8,0.4-1.7,0.4-2.5c0-0.9-0.1-1.7-0.4-2.5l0.3-0.2l1.7-1.7l-1.8-3.1l-2.3,0.7l-0.3,0.2c-1.2-1.2-2.7-2.1-4.4-2.5V3.8l-0.6-2.4h-3.5l-0.6,2.4v0.3c-1.7,0.4-3.2,1.3-4.4,2.5l-0.3-0.2l-2.3-0.7l-1.8,3.1l1.7,1.7l0.3,0.2c-0.2,0.8-0.4,1.7-0.4,2.5c0,0.9,0.1,1.7,0.4,2.5l-0.3,0.1l-1.7,1.7l1.8,3.1l2.3-0.7l0.3-0.1c1.2,1.2,2.7,2.1,4.4,2.5v0.3l0.6,2.4h3.5l0.6-2.4v-0.3c1.7-0.4,3.2-1.3,4.4-2.5l0.3,0.1l2.3,0.7l1.8-3.1L38,15.9L37.7,15.7z M28.6,17.9c-2.6,0-4.7-2.1-4.7-4.7s2.1-4.7,4.7-4.7s4.7,2.1,4.7,4.7S31.2,17.9,28.6,17.9z"}))),(0,r.createElement)("h2",null,(0,l.__)("Installing","blocksy-companion"),"..."),(0,r.createElement)("p",null,(0,l.__)("Please be patient and don't refresh this page, the import process may take a while, this also depends on your server.","blocksy-companion")),(0,r.createElement)("div",{className:"ct-progress-info"},(0,r.createElement)("span",{className:"ct-progress-label"},e),(0,r.createElement)("span",{className:"ct-progress-counter"},Math.round(t),"%")),(0,r.createElement)("div",{style:{"--progress":`${t}%`},className:"ct-installer-progress"},(0,r.createElement)("div",null)))};var Ne=function({isError:e}){return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("i",{className:"ct-demo-icon"},(0,r.createElement)("svg",{width:"37",height:"37",viewBox:"0 0 40 40"},(0,r.createElement)("path",{fill:"#BDC8D7",d:"M30.7,25.4L14.6,9.3c0.7-2.5,0-5.2-1.9-7.2c-2.4-2.3-6-2.7-8.8-1.3l4.5,4.5L7.9,7.9L5.3,8.4L0.8,3.9c-1.5,2.8-1,6.4,1.3,8.7c2,2,4.7,2.6,7.2,1.9l16.1,16.1c-0.7,2.5,0,5.2,1.9,7.2c2.3,2.3,5.9,2.8,8.7,1.3l-4.5-4.5L32,32l2.6-0.5l4.5,4.5c1.5-2.8,1-6.4-1.3-8.7C35.9,25.4,33.1,24.7,30.7,25.4z"}),(0,r.createElement)("polygon",{fill:"#44ACDF",points:"34.6,11.3 39.8,3.7 36.3,0.2 28.7,5.4 28.7,7.8 11.8,24.7 15.3,28.2 32.2,11.3 "}),(0,r.createElement)("path",{fill:"#0C7AB3",d:"M18.4,27.5l-5.9-5.9c-0.4-0.4-1-0.4-1.4,0s-0.4,1,0,1.4l0,0L0.7,33.5c-0.7,0.7-0.7,1.7,0,2.3l3.5,3.5c0.7,0.7,1.7,0.7,2.3,0L17,28.9l0,0c0.2,0.2,0.5,0.3,0.7,0.3s0.5-0.1,0.7-0.3C18.8,28.5,18.8,27.9,18.4,27.5z"}))),(0,r.createElement)("h2",null,(0,l.__)("Can't Import Starter Site","blocksy-companion")),(0,r.createElement)("p",null,e),(0,r.createElement)("a",{href:"https://creativethemes.com/blocksy/docs/troubleshooting/starter-site-import-stuck-at-xx/",className:"ct-demo-btn",target:"_blank"},"More Information"))};var Le=function({demoConfiguration:e,style:t}){const{isCompleted:n,isError:o,lastMessage:a,progress:c}=Me(e),l=n?"complete":o?"error":"progress";return(0,r.createElement)(s.animated.div,{className:"ct-demo-install",style:t},(0,r.createElement)(s.Transition,{initial:!0,items:l,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},function(e,t){return(0,r.createElement)(s.animated.div,{style:e},"complete"===t&&(0,r.createElement)(Se,null),"error"===t&&(0,r.createElement)(Ne,{isError:o}),"progress"===t&&(0,r.createElement)(De,{lastMessage:a,progress:c}))}))};var Be=function({location:e,navigate:t}){const[n,o]=(0,r.useState)(!0),{installerBlockingReleased:a,demos_list:c,currentDemo:i,pluginsStatus:u,currentlyInstalledDemo:m,setCurrentDemo:d,filters:p}=(0,r.useContext)(nt),{is_child_theme:f}=(0,r.useContext)(V),[h,g]=(0,r.useState)(m),[b,y]=(0,r.useState)({builder:"",child_theme:!1,plugins:[],content:{options:!0,widgets:!0,content:!0,erase_content:!0}}),[v,_]=(0,r.useState)(0),[E,w]=(i||"").split(":"),k=["modify_demo","builder","content","plugins","installer"].filter(function(e){if(!i)return!1;if("modify_demo"===e){if(!h)return!1;if(-1===h.demo.indexOf(E))return!1}if("child_theme"===e&&f)return!1;const t=c.filter(function({name:e}){return e===E}).sort(function(e,t){return e.buildert.builder?1:0});return("plugins"!==e||0!==t.reduce(function(e,t){return[...e,...t.plugins||[]]},[]).filter(function(e){return!u[e]}).length)&&("builder"!==e||t.length>1)}),O=k[v],x=v===k.indexOf("installer")-1;return(0,r.useEffect)(function(){if(!E)return;if(i.indexOf(":hide")>-1)return;const e=c.filter(function({name:e}){return e===E}).sort(function(e,t){return e.buildert.builder?1:0});_(0),g(m);let t=e[0];if("all"!==p.builder){const n=e.find(function({builder:e}){return e===p.builder});n&&(t=n)}y({builder:t.builder,child_theme:!1,plugins:t.plugins.map(function(e){return{plugin:e,enabled:!0}}),content:{options:!0,widgets:!0,content:!0,erase_content:!0}})},[i]),(0,r.createElement)(s.Overlay,{items:i,isVisible:function(e){return e&&-1===e.indexOf(":hide")},className:L()("ct-demo-modal",{"ct-demo-installer":"installer"===O||"modify_demo"===O}),onDismiss:function(){("installer"!==O||a)&&d(`${E}:hide`)},onDismissed:function(){_(0)},render:function(){return(0,r.createElement)("div",{className:"ct-modal-content ct-demo-step-container"},(0,r.createElement)("div",{className:"ct-current-step"},(0,r.createElement)(s.Transition,{items:O,from:{opacity:0},enter:{opacity:1},leave:{opacity:0},initial:!1,config:function(e,t){return"leave"===t?{duration:150}:{delay:150,duration:150}}},function(e,t){return(0,r.createElement)(r.Fragment,null,"modify_demo"===t&&(0,r.createElement)(ye,{demoConfiguration:b,nextStep:function(){_(Math.min(v+1,k.length-1))},style:e}),"child_theme"===t&&(0,r.createElement)(Ee,{style:e,demoConfiguration:b,setDemoConfiguration:y}),"plugins"===t&&(0,r.createElement)(oe,{demoConfiguration:b,style:e,setDemoConfiguration:y}),"builder"===t&&(0,r.createElement)(Oe,{style:e,demoConfiguration:b,setDemoConfiguration:y}),"content"===t&&(0,r.createElement)(je,{style:e,demoConfiguration:b,setDemoConfiguration:y}),"installer"===t&&(0,r.createElement)(Le,{style:e,demoConfiguration:b}))})),"installer"!==O&&"modify_demo"!==O&&(0,r.createElement)("div",{className:"ct-demo-step-controls"},v>0&&(0,r.createElement)("button",{className:"ct-demo-btn demo-back-btn",onClick:function(){_(Math.max(v-1,0))}},(0,l.__)("Back","blocksy-companion")),k.length>2&&(0,r.createElement)("ul",{className:"ct-steps-pills"},k.map(function(e,t){return t===k.length-1?null:(0,r.createElement)("li",{className:L()({active:e===O}),key:e},t+1)})),(0,r.createElement)("button",{className:"ct-demo-btn demo-main-btn",disabled:x&&0===ze({demoConfiguration:b,pluginsStatus:u,is_child_theme:f}).length,onClick:function(){_(Math.min(v+1,k.length-1))}},x?(0,l.__)("Install","blocksy-companion"):(0,l.__)("Next","blocksy-companion"))))}})},Te=window.wp.components,Fe=window.React;function Ae(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t{const a={...n,className:Ve(e,{"is-pressed":t})||void 0,"aria-hidden":!0,focusable:!1};return(0,r.createElement)("svg",{...a,ref:o})});He.displayName="SVG";var $e=(0,Fe.createElement)(He,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Fe.createElement)(e=>(0,r.createElement)("path",e),{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),Ge=n(213),Ie=n.n(Ge);function Re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function qe(e){for(var t=1;to?1:0}).map(function(e){return(0,r.createElement)("option",{value:e.id,key:e.id},e.title)}))),(0,r.createElement)("label",null,(0,r.createElement)("span",{className:"ct-label"},(0,l.__)("Builder","blocksy-companion")),(0,r.createElement)("input",{type:"text",placeholder:(0,l.__)("Builder","blocksy-companion"),value:p,onChange:function({target:{value:e}}){return f(e)}}))),(0,r.createElement)("section",{className:"plugins-section"},(0,r.createElement)("h4",null,"Required plugins"),(0,r.createElement)("div",{className:"ct-bundled-plugins-list grid-labels"},Object.keys({gutenberg:"Gutenberg","stackable-ultimate-gutenberg-blocks":"Stackable - Gutenberg Blocks","wpforms-lite":"WPForms - Contact Form",woocommerce:"WooCommerce",elementor:"Elementor",brizy:"Brizy",getwid:"Getwid","simply-gallery-block":"SimpLy Gallery Block & Lightbox","recipe-card-blocks-by-wpzoom":"Recipe Card Blocks by WPZOOM","map-block-gutenberg":"Map Block for Google Maps","mb-custom-post-type":"MB Custom Post Types & Custom Taxonomies",leadin:"HubSpot","block-slider":"Block Slider","ht-slider-for-elementor":"HT Slider For Elementor","modula-best-grid-gallery":"Modula - Image Gallery","advanced-custom-fields":"Advanced Custom Fields (ACF)","greenshift-animation-and-page-builder-blocks":"Greenshift – Gutenberg Blocks",fluentform:"Fluent Forms","translatepress-multilingual":"TranslatePress","fluent-booking":"Fluent Booking","easy-code-manager":"Fluent Snippets"}).filter(function(e){return"gutenberg"!==e}).map(function(e){return(0,r.createElement)("label",{tabindex:"0",onClick:function(t){t.preventDefault(),g(function(t){return t.includes(e)?t.filter(function(t){return t!==e}):[...t,e]})}},(0,r.createElement)("input",{type:"checkbox",checked:h.indexOf(e)>-1,onChange:function({target:{checked:e}}){}}),(0,r.createElement)("span",null,{gutenberg:"Gutenberg","stackable-ultimate-gutenberg-blocks":"Stackable - Gutenberg Blocks","wpforms-lite":"WPForms - Contact Form",woocommerce:"WooCommerce",elementor:"Elementor",brizy:"Brizy",getwid:"Getwid","simply-gallery-block":"SimpLy Gallery Block & Lightbox","recipe-card-blocks-by-wpzoom":"Recipe Card Blocks by WPZOOM","map-block-gutenberg":"Map Block for Google Maps","mb-custom-post-type":"MB Custom Post Types & Custom Taxonomies",leadin:"HubSpot","block-slider":"Block Slider","ht-slider-for-elementor":"HT Slider For Elementor","modula-best-grid-gallery":"Modula - Image Gallery","advanced-custom-fields":"Advanced Custom Fields (ACF)","greenshift-animation-and-page-builder-blocks":"Greenshift – Gutenberg Blocks",fluentform:"Fluent Forms","translatepress-multilingual":"TranslatePress","fluent-booking":"Fluent Booking","easy-code-manager":"Fluent Snippets"}[e]))})))),(0,r.createElement)("div",{className:"ct-modal-actions has-divider"},(0,r.createElement)("button",{className:"button button-primary",disabled:n,onClick:function(){return async function(){o(!0);const e=new FormData;e.append("action","blocksy_demo_export"),e.append("nonce",ctDashboardLocalizations.dashboard_actions_nonce),e.append("demoId",m),e.append("builder",p),e.append("plugins",h.join(",")),e.append("wp_customize","on");try{const n=await fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:e});if(200===n.status){const{success:e,data:o}=await n.json();if(e){const e=i.find(function(e){return e.id===m}),n=qe(qe({name:e.title,url:e.demo_live_link,is_pro:"Pro"===e.is_pro,categories:e.categories,keywords:e.keywords},"Pro"===e.is_pro&&e.plans?{plans:["personal","professional","agency",...e.plans.map(function(e){return`${e}_v2`})]}:{}),o.demo);"elementor"===n.builder.toLowerCase()&&(n.elementor_experiment_container=!0),console.log("Blocksy:Dashboard:DemoInstall:exported",{remoteDemo:e,finalDemo:n});var t=new Blob([JSON.stringify(n)],{type:"text/plain;charset=utf-8"});Ie().saveAs(t,`${e.title}.json`)}}}catch(e){}o(!1)}()}},n?(0,l.__)("Loading...","blocksy-companion"):(0,l.__)("Export site","blocksy-companion"))))}}))};function Ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Ze(e){for(var t=1;tn)return!1;if(o===n)return e===t;e:for(var r=0,a=0;r Error code - %s","blocksy-companion"),'',"",v.message)}}),"remote_fetch_failed"===v.reason&&(0,r.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:sprintf((0,l.__)("Failed to retrieve starter sites list.
Error code - %s","blocksy-companion"),v.message)}}),"generic"===v.reason&&(0,r.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:v.message}}),(0,r.createElement)(J,null)):(0,r.createElement)(s.animated.div,{style:e},(0,r.createElement)(r.Fragment,null,(0,r.createElement)(nt.Provider,{value:{currentDemo:d,pluginsStatus:u,setPluginsStatus:m,installerBlockingReleased:k,setInstallerBlockingReleased:O,setCurrentDemo:p,currentlyInstalledDemo:f,setCurrentlyInstalledDemo:h,unfiltered_demos_list:g.unfiltered_demos_list,demos_list:g.demos_list,filters:g.filters,setFilters:g.setFilters,allPlans:g.allPlans,allCategories:g.allCategories}},g.display(),(0,r.createElement)(se,null),(0,r.createElement)(Be,null)),(0,r.createElement)(J,null)))}))};function at(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}x().then(function(e){511===e.status&&fetch(`${ctDashboardLocalizations.ajax_url}?action=blocksy_dashboard_handle_incorrect_license`,{method:"POST",body:JSON.stringify({}),headers:{Accept:"application/json","Content-Type":"application/json"}}).then(function({success:e,data:t}){})}).catch(function(e){console.error("Error:",e)}),c().on("ct:dashboard:routes",function(e){e.push({Component:function(e){return(0,r.createElement)(D,e)},path:"/extensions"}),e.push({Component:function(e){return(0,r.createElement)(X,e)},path:"/extensions/:extension"}),"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&e.push({Component:function(e){return(0,r.createElement)(rt,e)},path:"/demos"})}),c().on("ct:dashboard:navigation-links",function(e){"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&e.push({text:(0,l.__)("Starter Sites","blocksy-companion"),path:"demos",getProps:function({isPartiallyCurrent:e,isCurrent:t}){return e?{"aria-current":"page"}:{}}}),e.push({text:(0,l.__)("Extensions","blocksy-companion"),path:"/extensions",onClick:function(e){location.hash.indexOf("extensions")>-1&&e.preventDefault()},getProps:function({isPartiallyCurrent:e,isCurrent:t}){return function(e){for(var t=1;t