Version Description
Download this release
Release Info
Developer | brainstormworg |
Plugin | Astra Starter Sites |
Version | 3.0.2 |
Comparing to | |
See all releases |
Code changes from version 3.0.1 to 3.0.2
- astra-sites.php +2 -2
- inc/lib/onboarding/assets/dist/main.asset.php +1 -1
- inc/lib/onboarding/assets/dist/main.js +8 -6
- inc/lib/onboarding/assets/src/steps/import-site/index.js +175 -130
- inc/lib/onboarding/classes/class-astra-sites-ai-site-setup.php +1 -0
- languages/astra-sites.pot +3 -3
- readme.txt +4 -1
astra-sites.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Starter Templates
|
4 |
* Plugin URI: https://wpastra.com/
|
5 |
* Description: Starter Templates is all in one solution for complete starter sites, single page templates, blocks & images. This plugin offers the premium library of ready templates & provides quick access to beautiful Pixabay images that can be imported in your website easily.
|
6 |
-
* Version: 3.0.
|
7 |
* Author: Brainstorm Force
|
8 |
* Author URI: https://www.brainstormforce.com
|
9 |
* Text Domain: astra-sites
|
@@ -19,7 +19,7 @@ if ( ! defined( 'ASTRA_SITES_NAME' ) ) {
|
|
19 |
}
|
20 |
|
21 |
if ( ! defined( 'ASTRA_SITES_VER' ) ) {
|
22 |
-
define( 'ASTRA_SITES_VER', '3.0.
|
23 |
}
|
24 |
|
25 |
if ( ! defined( 'ASTRA_SITES_FILE' ) ) {
|
3 |
* Plugin Name: Starter Templates
|
4 |
* Plugin URI: https://wpastra.com/
|
5 |
* Description: Starter Templates is all in one solution for complete starter sites, single page templates, blocks & images. This plugin offers the premium library of ready templates & provides quick access to beautiful Pixabay images that can be imported in your website easily.
|
6 |
+
* Version: 3.0.2
|
7 |
* Author: Brainstorm Force
|
8 |
* Author URI: https://www.brainstormforce.com
|
9 |
* Text Domain: astra-sites
|
19 |
}
|
20 |
|
21 |
if ( ! defined( 'ASTRA_SITES_VER' ) ) {
|
22 |
+
define( 'ASTRA_SITES_VER', '3.0.2' );
|
23 |
}
|
24 |
|
25 |
if ( ! defined( 'ASTRA_SITES_FILE' ) ) {
|
inc/lib/onboarding/assets/dist/main.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-media-utils', 'wp-polyfill', 'wp-url'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-media-utils', 'wp-polyfill', 'wp-url'), 'version' => 'facaaf0aae2e83ac8d96a8f08c47438e');
|
inc/lib/onboarding/assets/dist/main.js
CHANGED
@@ -4,12 +4,14 @@ Object(x.__)("Your Website is up and ready!. %1$s","astra-sites"),w),g="I just b
|
|
4 |
/* translators: %1$s - search term. */
|
5 |
Object(x.__)("Your search - %1$s - did not match any Starter Templates.","astra-sites"),Object(ia.decodeEntities)(e)))):null}),rc=(r(73),function(){return Object(c.createElement)("div",{className:"st-no-favorites"},Object(c.createElement)("h3",null,Object(x.__)("No favorites added. Press the heart icon to add templates as favorites.","astra-sites")))}),nc=function(t){var e=t.sites;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"st-sites-grid"},Object(c.createElement)("div",{className:"st-sites-found-message"},Object(x.__)("Other suggested Starter Templates","astra-sites")),Object(c.createElement)(Jl,{sites:e})))};function ic(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ac(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ic(Object(r),!0).forEach((function(e){m()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ic(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var sc=(r(74),r(75),function(){return Object(c.createElement)("div",{className:"branding-wrap"},H()?Object(c.createElement)("h3",null,astraSitesVars.whiteLabelName):Object(c.createElement)(Ll,{className:"ist-logo",src:"".concat(starterTemplates.imageDir,"logo.svg"),alt:Object(x.__)("Starter Templates","astra-sites")}))}),oc=function(){var t=C(),e=b()(t,2),r=e[0].builder,n=e[1],i=[{id:"gutenberg",title:Object(x.__)("Block Editor","astra-sites"),image:"".concat(starterTemplates.imageDir,"block-editor.svg")},{id:"elementor",title:Object(x.__)("Elementor","astra-sites"),image:"".concat(starterTemplates.imageDir,"elementor.svg")},{id:"beaver-builder",title:Object(x.__)("Beaver Builder","astra-sites"),image:"".concat(starterTemplates.imageDir,"beaver-builder.svg")}];return"1"===starterTemplates.isBrizyEnabled&&i.push({id:"brizy",title:Object(x.__)("Brizy","astra-sites"),image:"".concat(starterTemplates.imageDir,"brizy.svg")}),Object(c.createElement)("div",{className:"st-page-builder-filter"},Object(c.createElement)(Ul,{value:r,options:i,className:"st-page-builder-toggle",onClick:function(t,e){n({type:"set",builder:e.id,siteCategory:Qh.siteCategory,siteType:"",siteOrder:"popular",onMyFavorite:!1});var r=new FormData;r.append("action","astra-sites-change-page-builder"),r.append("_ajax_nonce",astraSitesVars._ajax_nonce),r.append("page_builder",e.id),fetch(ajaxurl,{method:"post",body:r})}}))},lc=(r(76),function(){return Object(c.createElement)("a",{className:"st-exit-to-dashboard",href:starterTemplates.adminUrl},Object(c.createElement)(Tl,{content:Object(x.__)("Exit to Dashboard","astra-sites")},E.dashboard))}),cc=(r(77),function(){var t=C(),e=b()(t,2),r=e[0],n=e[1],i=r.onMyFavorite;return Object(c.createElement)("div",{className:"st-my-favorite ".concat(i?"active":""),onClick:function(t){t.stopPropagation(),n({type:"set",onMyFavorite:!i,siteType:"",siteOrder:Qh.siteOrder,siteCategory:Qh.siteCategory,siteSearchTerm:""})}},Object(c.createElement)(Tl,{content:Object(x.__)("My Favorite","astra-sites")},E.favorite))}),hc=r(17),pc=r.n(hc);function uc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function fc(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?uc(Object(r),!0).forEach((function(e){m()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):uc(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function dc(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return mc(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mc(t,void 0):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){o=!0,a=t},f:function(){try{s||null==r.return||r.return()}finally{if(o)throw a}}}}function mc(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var gc=wp.ajax.post,yc=[],vc=!1,bc=function(t,e){var r=new FormData;return r.append(t,e),r},xc=function(){var t=Ol()(Il.a.mark((function t(){var e,r,n,i;return Il.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch(ajaxurl,{method:"post",body:bc("action","astra-sites-update-library")});case 3:return e=t.sent,t.next=6,e.json();case 6:return r=t.sent,t.next=9,r.data;case 9:if(n=t.sent,i=null,yc=[],"updated"!==n){t.next=17;break}yc.push(!0),vc=!0,t.next=53;break;case 17:if("batch"!==n){t.next=53;break}return t.next=20,Pc();case 20:return i=t.sent,t.t0=yc,t.next=24,wc();case 24:return t.t1=t.sent,t.t0.push.call(t.t0,t.t1),t.t2=yc,t.next=29,Sc();case 29:return t.t3=t.sent,t.t2.push.call(t.t2,t.t3),t.t4=yc,t.next=34,Ac();case 34:return t.t5=t.sent,t.t4.push.call(t.t4,t.t5),t.t6=yc,t.next=39,Cc();case 39:return t.t7=t.sent,t.t6.push.call(t.t6,t.t7),t.t8=yc,t.next=44,kc();case 44:return t.t9=t.sent,t.t8.push.call(t.t8,t.t9),t.t10=yc,t.next=49,Ec();case 49:t.t11=t.sent,t.t10.push.call(t.t10,t.t11),yc.push(i),vc=!0;case 53:return t.abrupt("return",i);case 56:return t.prev=56,t.t12=t.catch(0),yc.push(!1),vc=!0,t.abrupt("return",!1);case 61:case"end":return t.stop()}}),t,null,[[0,56]])})));return function(){return t.apply(this,arguments)}}(),Ec=function(){var t=Ol()(Il.a.mark((function t(){return Il.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch(ajaxurl,{method:"post",body:bc("action","astra-sites-update-library-complete")}).then((function(t){return t.json()}));case 3:if(!0!==t.sent.success){t.next=6;break}return t.abrupt("return",!0);case 6:return t.abrupt("return",!1);case 9:return t.prev=9,t.t0=t.catch(0),t.abrupt("return",!1);case 12:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(){return t.apply(this,arguments)}}(),kc=function(){var t=Ol()(Il.a.mark((function t(){return Il.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch(ajaxurl,{method:"post",body:bc("action","astra-sites-import-page-builders")}).then((function(t){return t.json()}));case 3:if(!0!==t.sent.success){t.next=6;break}return t.abrupt("return",!0);case 6:return t.abrupt("return",!1);case 9:return t.prev=9,t.t0=t.catch(0),t.abrupt("return",!1);case 12:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(){return t.apply(this,arguments)}}(),Cc=function(){var t=Ol()(Il.a.mark((function t(){var e,r,n,i,a;return Il.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch(ajaxurl,{method:"post",body:bc("action","astra-sites-get-blocks-request-count")}).then((function(t){return t.json()})).then((function(t){return t.data}));case 3:if(!(e=t.sent)){t.next=11;break}for(r=[],n=1;n<=e;n++)(i=new FormData).append("action","astra-sites-import-blocks"),i.append("page_no",n),r.push(fetch(ajaxurl,{method:"post",body:i}));return t.next=9,Promise.allSettled(r).then((function(t){return Promise.all(t.map((function(t){return t.value.json()})))}));case 9:return a=t.sent,t.abrupt("return",a.every((function(t){return!0===t.success})));case 11:t.next=16;break;case 13:return t.prev=13,t.t0=t.catch(0),t.abrupt("return",!1);case 16:case"end":return t.stop()}}),t,null,[[0,13]])})));return function(){return t.apply(this,arguments)}}(),Ac=function(){var t=Ol()(Il.a.mark((function t(){return Il.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch(ajaxurl,{method:"post",body:bc("action","astra-sites-import-page-builders")}).then((function(t){return t.json()}));case 3:if(!0!==t.sent.success){t.next=6;break}return t.abrupt("return",!0);case 6:return t.abrupt("return",!1);case 9:return t.prev=9,t.t0=t.catch(0),t.abrupt("return",!1);case 12:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(){return t.apply(this,arguments)}}(),Sc=function(){var t=Ol()(Il.a.mark((function t(){return Il.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch(ajaxurl,{method:"post",body:bc("action","astra-sites-import-all-categories")}).then((function(t){return t.json()}));case 3:if(!0!==t.sent.success){t.next=6;break}return t.abrupt("return",!0);case 6:return t.abrupt("return",!1);case 9:return t.prev=9,t.t0=t.catch(0),t.abrupt("return",!1);case 12:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(){return t.apply(this,arguments)}}(),wc=function(){var t=Ol()(Il.a.mark((function t(){return Il.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch(ajaxurl,{method:"post",body:bc("action","astra-sites-import-all-categories-and-tags")}).then((function(t){return t.json()}));case 3:if(!0!==t.sent.success){t.next=6;break}return t.abrupt("return",!0);case 6:return t.abrupt("return",!1);case 9:return t.prev=9,t.t0=t.catch(0),t.abrupt("return",!1);case 12:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(){return t.apply(this,arguments)}}(),Pc=function(){var t=Ol()(Il.a.mark((function t(){var e,r,n,i,a;return Il.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,gc({action:"astra-sites-get-sites-request-count",_ajax_nonce:starterTemplates.nonce});case 3:if(!(e=t.sent)){t.next=11;break}for(r=[],n=1;n<=e;n++)(i=new FormData).append("action","astra-sites-import-sites"),i.append("page_no",n),r.push(fetch(ajaxurl,{method:"post",body:i}));return t.next=9,Promise.allSettled(r).then((function(t){return Promise.all(t.map((function(t){return t.value.json()})))})).then((function(t){var e,r={},n=dc(t);try{for(n.s();!(e=n.n()).done;){var i=e.value;"object"===pc()(i.data)&&(r=fc(fc({},r),i.data))}}catch(t){n.e(t)}finally{n.f()}return r}));case 9:return a=t.sent,t.abrupt("return",a);case 11:return t.abrupt("return",null);case 14:return t.prev=14,t.t0=t.catch(0),t.abrupt("return",null);case 17:case"end":return t.stop()}}),t,null,[[0,14]])})));return function(){return t.apply(this,arguments)}}(),Oc=(r(78),function(){var t=Object(h.useState)(!1),e=b()(t,2),r=e[0],n=e[1],i=function(){if(yc&&vc){var t=yc.every(Boolean);return yc=[],vc=!1,t}}(),a=function(){var t=Ol()(Il.a.mark((function t(e){return Il.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.stopPropagation(),!r){t.next=3;break}return t.abrupt("return");case 3:return n(!0),t.next=6,xc();case 6:n(!1);case 7:case"end":return t.stop()}}),t)})));return function(_x){return t.apply(this,arguments)}}();return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"st-sync-library ".concat(r?"loading":""),onClick:a},Object(c.createElement)(Tl,{content:Object(x.__)("Sync Library","astra-sites")},E.sync)),!r&&!0===i&&Object(c.createElement)(Nl,{type:"success",message:Object(x.__)("Library refreshed successfully","astra-sites"),autoHideDuration:5,bottomRight:!0}),!r&&!1===i&&Object(c.createElement)(Nl,{type:"error",message:Object(x.__)("Library refreshed failed!","astra-sites"),autoHideDuration:5,bottomRight:!0}))}),jc=(r(79),function(){var t=C(),e=b()(t,2),r=e[0],n=r.selectedTemplateName,i=r.currentIndex,a=e[1];return Object(c.createElement)("div",{className:"change-template-wrap"},Object(c.createElement)("div",{className:"template-name"},Object(c.createElement)("p",{className:"label"},Object(x.__)("Selected Template:","astra-sites")),Object(c.createElement)("h5",null,Object(ia.decodeEntities)(n))),Object(c.createElement)("div",{className:"change-btn-wrap",onClick:function(){a({type:"set",currentIndex:i-1,currentCustomizeIndex:0})}},Object(c.createElement)("span",{className:"change-btn"},E.cross)))}),Ic=r(18),_c=r.n(Ic),Tc=starterTemplates.restNonce,Fc=r(32),Mc=r(33),Dc=r(20);function Rc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Bc(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Rc(Object(r),!0).forEach((function(e){m()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Rc(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}r(80);var Vc=function(){var t=C(),e=b()(t,2),r=e[0],n=r.siteLogo,i=r.builder,a=r.currentCustomizeIndex,s=r.currentIndex,o=e[1];Object(Fc.addFilter)("editor.MediaUpload","core/edit-post/components/media-upload/replace-media-upload",(function(){return Dc.MediaUpload}));var l=function(t){o({type:"set",siteLogo:t}),Q({param:"siteLogo",data:t})},h=function(){l(Qh.siteLogo)},p=function(t){var e=Bc(Bc({},n),{},{width:t});o({type:"set",siteLogo:e}),Q({param:"siteLogo",data:e})},u=function(){o("beaver-builder"===i||"brizy"===i?{type:"set",currentCustomizeIndex:a+2}:{type:"set",currentCustomizeIndex:a+1})},f=function(){o({type:"set",currentIndex:s-1,currentCustomizeIndex:0})},d=function(t){n.url&&(t.stopPropagation(),p(Qh.siteLogo.width))};return Object(c.createElement)(Dc.MediaUpload,{onSelect:function(t){return function(t){var e,r,i,a={id:t.id,url:t.url,width:n.width};"http:"===window.location.protocol?(e=t.url,r=function(t){a.dataUri=t,l(a)},(i=new Image).onload=function(){var t=document.createElement("canvas");t.width=this.naturalWidth,t.height=this.naturalHeight,t.getContext("2d").drawImage(this,0,0),r(t.toDataURL("image/png"))},i.src=e):l(a)}(t)},allowedTypes:["image"],value:n.id,render:function(t){var e=t.open;return Object(c.createElement)(c.Fragment,null,""!==n.url&&void 0!==n.url?Object(c.createElement)("div",{className:"ist-logo-wrapper"},Object(c.createElement)("div",{className:"ist-remove-logo",onClick:h,title:Object(x.__)("Remove Logo","astra-sites")},Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"8",height:"8",viewBox:"0 0 8 8",fill:"#333333"},Object(c.createElement)("path",{d:"M8 0.7L7.3 0L4 3.3L0.7 0L0 0.7L3.3 4L0 7.3L0.7 8L4 4.7L7.3 8L8 7.3L4.7 4L8 0.7Z",fill:"#333333"}))),Object(c.createElement)("div",{className:"ist-selected-image",onClick:e},Object(c.createElement)("div",{onClick:e,className:"ist-logo-preview-wrap"},Object(c.createElement)("img",{alt:Object(x.__)("Site Logo","astra-sites"),src:n.url}),Object(c.createElement)("div",{className:"ist-change-logo",onClick:e},Object(x.__)("Change Logo","astra-sites"))))):"",""===n.url?Object(c.createElement)("div",null,Object(c.createElement)(R,{className:"ist-button ist-button-outline",onClick:e},Object(c.createElement)("h5",null,Object(x.__)("Upload File Here","astra-sites")),Object(c.createElement)("p",null,Object(x.__)("Suggested Dimensions: 180x60 pixels","astra-sites")))):"",""===n.url&&Object(c.createElement)("div",{className:"logo-skip-info"},Object(c.createElement)("h5",null,Object(x.__)("Don't have Logo? No Problem!","astra-sites")),Object(c.createElement)("p",null,Object(x.__)("You can upload it later","astra-sites"))),Object(c.createElement)("div",{className:"astra-sites-ai-logo-wrap"},Object(c.createElement)("div",{className:"label"},Object(x.__)("Logo Width","astra-sitess")),Object(c.createElement)("div",{className:"control-reset ".concat(n.width===Qh.siteLogo.width?"disabled":""),onClick:d},E.reset)),Object(c.createElement)("div",{className:"astra-sites-ai-rangecontrol-wrap"},Object(c.createElement)(Mc.RangeControl,{value:n.width,min:0,max:500,step:1,onChange:function(t){p(t)},trackColor:"#4361ee",disabled:""===n.url})),Object(c.createElement)(R,{className:"ist-button",onClick:u,after:!0},""!==n.url?Object(x.__)("Continue","astra-sites"):Object(x.__)("Skip & Continue","astra-sites")),Object(c.createElement)(V,{onClick:f},Object(x.__)("Back","astra-sites")))}})},Lc=[{slug:"style-1",title:Object(x.__)("Style 1","astra-sites"),colors:["#8E43F0","#7215EA","#FFFFFF","#FAF5FF","#726C7A","#3C2F4B","#000000","#4B4F58","#F6F7F8"]},{slug:"style-2",title:Object(x.__)("Style 2","astra-sites"),colors:["#FFB72B","#FF9900","#FFFFFF","#F9F5EE","#6D6A64","#3A362D","#000000","#4B4F58","#F6F7F8"]},{slug:"style-3",title:Object(x.__)("Style 3","astra-sites"),colors:["#FF2459","#D90336","#FFFFFF","#FAF4F6","#6B6365","#352A2D","#000000","#4B4F58","#F6F7F8"]},{slug:"style-4",title:Object(x.__)("Style 4","astra-sites"),colors:["#2B60E8","#0A43D7","#FFFFFF","#F7F7FA","#64666C","#2E323E","#000000","#4B4F58","#F6F7F8"]},{slug:"style-5",title:Object(x.__)("Style 5","astra-sites"),colors:["#1BAE70","#008D52","#FFFFFF","#F3FAF7","#5C6461","#26312C","#000000","#4B4F58","#F6F7F8"]},{slug:"style-6",title:Object(x.__)("Style 6","astra-sites"),colors:["#FF8F3F","#EC6300","#FFFFFF","#F9F6F4","#66625F","#37302A","#000000","#4B4F58","#F6F7F8"]}],Nc=[{slug:"style-1",title:Object(x.__)("Style 1","astra-sites"),colors:["#8E43F0","#7215EA","#3C2F4B","#726C7A","#FAF5FF","#FFFFFF","#000000","#4B4F58","#F6F7F8"]},{slug:"style-2",title:Object(x.__)("Style 2","astra-sites"),colors:["#FFB72B","#FF9900","#3A362D","#6D6A64","#F9F5EE","#FFFFFF","#000000","#4B4F58","#F6F7F8"]},{slug:"style-3",title:Object(x.__)("Style 3","astra-sites"),colors:["#FF2459","#D90336","#352A2D","#6B6365","#FAF4F6","#FFFFFF","#000000","#4B4F58","#F6F7F8"]},{slug:"style-4",title:Object(x.__)("Style 4","astra-sites"),colors:["#2B60E8","#0A43D7","#2E323E","#64666C","#F7F7FA","#FFFFFF","#000000","#4B4F58","#F6F7F8"]},{slug:"style-5",title:Object(x.__)("Style 5","astra-sites"),colors:["#1BAE70","#008D52","#26312C","#5C6461","#F3FAF7","#FFFFFF","#000000","#4B4F58","#F6F7F8"]},{slug:"style-6",title:Object(x.__)("Style 6","astra-sites"),colors:["#FF8F3F","#EC6300","#37302A","#66625F","#F9F6F4","#FFFFFF","#000000","#4B4F58","#F6F7F8"]}];function zc(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Gc=function(t,e){if(!t)return"";if(t){var r=t.match(/'([^']+)'/);return r?r[1]:"inherit"===t?e:t}return e||void 0},Hc=[{"body-font-family":"'Open Sans', sans-serif","body-font-variant":"400","body-font-weight":"400","font-size-body":{desktop:16,tablet:"",mobile:"","desktop-unit":"px","tablet-unit":"px","mobile-unit":"px"},"body-line-height":"1.7","headings-font-family":"'Playfair Display', serif","headings-font-weight":"700","headings-line-height":"1.2","headings-font-variant":"700"},{"body-font-family":"'Lora', serif","body-font-variant":"400","body-font-weight":"400","font-size-body":{desktop:16,tablet:"",mobile:"","desktop-unit":"px","tablet-unit":"px","mobile-unit":"px"},"body-line-height":"","headings-font-family":"'Lato', sans-serif","headings-font-weight":"700","headings-line-height":"1.2","headings-font-variant":"700"},{"body-font-family":"'Roboto', sans-serif","body-font-variant":"400","body-font-weight":"400","font-size-body":{desktop:17,tablet:"",mobile:"","desktop-unit":"px","tablet-unit":"px","mobile-unit":"px"},"body-line-height":"","headings-font-family":"'Barlow Condensed', sans-serif","headings-font-weight":"600","headings-line-height":"1.2","headings-font-variant":"600"},{"body-font-family":"'Source Sans Pro', sans-serif","body-font-variant":"400","body-font-weight":"400","font-size-body":{desktop:17,tablet:"",mobile:"","desktop-unit":"px","tablet-unit":"px","mobile-unit":"px"},"body-line-height":1.7,"headings-font-family":"'Montserrat', sans-serif","headings-font-weight":"700","headings-line-height":"1.3","headings-font-variant":"700"},{"body-font-family":"'Karla', sans-serif","body-font-variant":"400","body-font-weight":"400","font-size-body":{desktop:17,tablet:"",mobile:"","desktop-unit":"px","tablet-unit":"px","mobile-unit":"px"},"body-line-height":"","headings-font-family":"'Rubik', sans-serif","headings-font-weight":"500","headings-line-height":"1.3","headings-font-variant":"500"},{"body-font-family":"'Work Sans', sans-serif","body-font-variant":"400","body-font-weight":"400","font-size-body":{desktop:16,tablet:"",mobile:"","desktop-unit":"px","tablet-unit":"px","mobile-unit":"px"},"body-line-height":"","headings-font-family":"'DM Serif Display', serif","headings-font-weight":"400","headings-line-height":"1.2","headings-font-variant":"400"}],Qc=[{content:function(){var t=C(),e=b()(t,2),r=e[0],n=r.licenseStatus,i=r.selectedTemplateType,a=e[1];return Object(h.useEffect)((function(){a({type:"set",designStep:1})}),[]),Object(c.createElement)(c.Fragment,null,Object(c.createElement)(jc,null),Object(c.createElement)("div",{className:"customizer-header"},Object(c.createElement)("div",{className:"header-name"},!n&&"free"!==i&&Object(c.createElement)("p",{className:"premium-notice"},Object(x.__)("This is a Premium Template","astra-sites")),Object(c.createElement)("h3",{className:"ist-customizer-heading"},Object(x.__)("Logo","astra-sites")),Object(c.createElement)("p",{className:"screen-description"},Object(x.__)("Choose logo for your site. You can update it anytime later.","astra-sites")))))},controls:function(){return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Vc,null))},class:"customize-business-logo"},{content:function(){var t=C(),e=b()(t,2),r=e[0],n=r.licenseStatus,i=r.selectedTemplateType,a=e[1];return Object(h.useEffect)((function(){a({type:"set",designStep:2})}),[]),Object(c.createElement)(c.Fragment,null,Object(c.createElement)(jc,null),Object(c.createElement)("div",{className:"customizer-header"},Object(c.createElement)("div",{className:"header-name"},!n&&"free"!==i&&Object(c.createElement)("p",{className:"premium-notice"},Object(x.__)("This is a Premium Template","astra-sites")),Object(c.createElement)("h3",{className:"ist-customizer-heading"},Object(x.__)("Colors","astra-sites")),Object(c.createElement)("p",{className:"screen-description"},Object(x.__)("Choose colors for your site. You can update them anytime later.","astra-sites")))))},controls:function(){var t=C(),e=b()(t,2),r=e[0],n=r.activePaletteSlug,i=r.templateResponse,a=r.currentCustomizeIndex,s=e[1],o=Object(h.useState)([]),l=b()(o,2),p=l[0],u=l[1],f=Object(h.useState)(Nc),d=b()(f,2),m=d[0],g=d[1],y=function(t,e){e&&(s({type:"set",activePaletteSlug:e.slug,activePalette:e}),Q({param:"colorPalette",data:e}))};return Object(h.useEffect)((function(){var t=function(t){var e=[];if(t&&"astra-site-customizer-data"in t){var r=t["astra-site-customizer-data"]||"";if(r){var n=r["astra-settings"]["global-color-palette"].palette||[];n&&(e=[{slug:"default",title:Object(x.__)("Default","astra-sites"),colors:n}])}}return e}(i);u(t);var e="light"===function(t){var e="light";return t&&"astra-site-color-scheme"in t&&""!==t["astra-site-color-scheme"]&&(e=t["astra-site-color-scheme"]),e}(i)?Nc:Lc;g(e)}),[i]),Object(c.createElement)(c.Fragment,null,p?Object(c.createElement)(c.Fragment,null,Object(c.createElement)(B,{selected:n,options:p,onChange:function(t,e){y(0,e)},tabIndex:"0"})):"",Object(c.createElement)("h4",{className:"ist-secondary-heading"},Object(x.__)("You can also try:","astra-sites")),Object(c.createElement)(B,{selected:n,options:m,onChange:function(t,e){y(0,e)},tabIndex:"0"}),Object(c.createElement)(R,{className:"ist-button",onClick:function(){s({type:"set",currentCustomizeIndex:a+1})},after:!0},Object(x.__)("Continue","astra-sites")),Object(c.createElement)(V,{customizeStep:!0,onClick:function(){s({type:"set",currentCustomizeIndex:a-1})}},Object(x.__)("Back","astra-sites")))},actions:null,class:"customize-site-colors"},{content:function(){var t=C(),e=b()(t,2),r=e[0],n=r.licenseStatus,i=r.selectedTemplateType,a=e[1];return Object(h.useEffect)((function(){a({type:"set",designStep:3})}),[]),Object(c.createElement)(c.Fragment,null,Object(c.createElement)(jc,null),Object(c.createElement)("div",{className:"customizer-header"},Object(c.createElement)("div",{className:"header-name"},!n&&"free"!==i&&Object(c.createElement)("p",{className:"premium-notice"},Object(x.__)("This is a Premium Template","astra-sites")),Object(c.createElement)("h3",{className:"ist-customizer-heading"},Object(x.__)("Fonts","astra-sites")),Object(c.createElement)("p",{className:"screen-description"},Object(x.__)("Choose fonts for your site. You can update them anytime later.","astra-sites")))))},controls:function(){var t=C(),e=b()(t,2),r=e[0],n=r.typographyIndex,i=r.typography,a=r.templateResponse,s=e[1],o=Object(h.useState)(Hc),l=b()(o,2),p=l[0],u=l[1];return Object(h.useEffect)((function(){if(null!==a){var t=[],e=function(t){var e={};if(t&&"astra-site-customizer-data"in t){var r=t["astra-site-customizer-data"]||"";if(r){var n=r["astra-settings"]||[],i=n["headings-font-family"];e={default:!0,"body-font-family":n["body-font-family"],"body-font-variant":n["body-font-variant"],"body-font-weight":n["body-font-weight"],"font-size-body":n["font-size-body"],"body-line-height":n["body-line-height"],"headings-font-family":i,"headings-font-weight":n["headings-font-weight"],"headings-line-height":n["headings-line-height"],"headings-font-variant":n["headings-font-variant"]}}}return e}(a);if(t.push(e),!document.getElementById("google-fonts-domain")){var r=document.createElement("link");r.id="google-fonts-domain",r.setAttribute("rel","preconnect"),r.setAttribute("href","https://fonts.gstatic.com"),document.head.appendChild(r)}if(!document.getElementById("google-fonts-url")){var i=document.createElement("link");i.id="google-fonts-url",i.setAttribute("rel","stylesheet");var o=[],l=e["body-font-family"]||"",c=parseInt(e["body-font-weight"])||"";c&&(c=":wght@".concat(c)),l&&(l=(l=Gc(l)).replace(" ","+"),o.push("family=".concat(l).concat(c)));var h=e["headings-font-family"]||"",f=parseInt(e["headings-font-weight"])||"";f&&(f=":wght@".concat(f)),h&&(h=(h=Gc(h,l)).replace(" ","+"),o.push("family=".concat(h).concat(f)));var d="";if(p){var m,g=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return zc(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zc(t,void 0):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){o=!0,a=t},f:function(){try{s||null==r.return||r.return()}finally{if(o)throw a}}}}(p);try{for(g.s();!(m=g.n()).done;){var y=m.value,v=Gc(y["headings-font-family"]).replaceAll(" ","+"),b=y["headings-font-weight"],x=Gc(y["body-font-family"]).replaceAll(" ","+"),E=y["body-font-weight"];d+="&family=".concat(v,":wght@").concat(b,"&family=").concat(x,":wght@").concat(E)}}catch(t){g.e(t)}finally{g.f()}d=d.replace(/[&]{1}$/i,"")}if(o){var k="https://fonts.googleapis.com/css2?".concat(o.join("&")).concat(d,"&display=swap");i.setAttribute("href",k),document.head.appendChild(i)}}0===n&&s({type:"set",typography:e}),p=t.concat(p),u(p)}}),[a]),Object(h.useEffect)((function(){Q({param:"siteTypography",data:JSON.parse(JSON.stringify(i))})}),[i]),Object(c.createElement)(c.Fragment,null,Object(c.createElement)(G,{selected:n,options:p,onSelect:function(t,e){s({type:"set",typographyIndex:e,typography:p[e]||p[0]})}}))},actions:null,class:"customize-site-typography"},{content:function(){var t=C(),e=b()(t,2),r=e[0].builder,n=e[1];Object(h.useEffect)((function(){n({type:"set",designStep:1})}),[]);var i=Object(x.__)("This is a premium template and comes with our Essentials and Growth Bundle. <br/><br/> Get access to this premium template and 100+ more.","astra-sites");return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(jc,null),Object(c.createElement)("div",{className:"customizer-header"},Object(c.createElement)("div",{className:"header-name"},Object(c.createElement)("h3",{className:"ist-customizer-heading"},Object(x.__)("Liked this Starter Template?","astra-sites")),Object(c.createElement)("p",{className:"screen-description",dangerouslySetInnerHTML:{__html:i}}),Object(c.createElement)(R,{className:"st-access-btn",onClick:function(){window.open(astraSitesVars.cta_links[r])}},Object(x.__)("Unlock Access","astra-sites"),Object(c.createElement)("img",{className:"st-get-access",alt:"Get Access",src:"".concat(starterTemplates.imageDir,"get-access.svg")})))))},controls:function(){var t=C(),e=b()(t,2),r=e[0],n=(r.templateResponse,r.currentCustomizeIndex),i=r.importError,a=r.currentIndex,s=r.validateLicenseStatus,o=e[1],l=Object(h.useState)(""),p=b()(l,2),u=p[0],f=p[1],d=Object(h.useState)(!1),m=b()(d,2),g=m[0],y=m[1],v=Object(h.useState)(""),k=b()(v,2),A=k[0],S=k[1];Object(h.useEffect)((function(){i&&o({type:"set",currentIndex:a+2})}),[i]);var w=g?"processing":"",P=Object(x.sprintf)(//translators: %1$s Support page URL.
|
6 |
Object(x.__)("<b> Questions? </b> Get in touch with our %1$ssupport team%2$s.","astra-sites"),'<a href="https://wpastra.com/support/free-support/" target="_blank">',"</a>"),O=Object(x.sprintf)(//translators: %1$s Store page URL.
|
7 |
-
Object(x.__)("If you have purchased our Essential or Growth Bundle, please install the premium version of the plugin that you can %1$sdownload.%2$s from our store.","astra-sites"),'<a href="https://store.brainstormforce.com/login/" target="_blank">',"</a>");return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("h4",null,Object(x.__)("Already a customer?","astra-sites")),s&&Object(c.createElement)("p",{className:"customer-notices"},Object(x.__)("If you have purchased our Essential or Growth Bundle, just enter your license key below to import this template.","astra-sites")),!s&&Object(c.createElement)(c.Fragment,null,Object(c.createElement)("p",{className:"customer-notices",dangerouslySetInnerHTML:{__html:O}}),Object(c.createElement)("p",{className:"customer-notices"},Object(x.__)("Currently the free version is installed.","astra-sites"))),Object(c.createElement)("p",{className:"support-link",dangerouslySetInnerHTML:{__html:P}}),s&&Object(c.createElement)("div",{className:"license-wrap"},Object(c.createElement)("input",{type:"text",className:"license-key-input",name:"license-key",placeholder:Object(x.__)("License key","astra-sites"),required:!0,onChange:function(t){S(t.target.value),f("")}}),Object(c.createElement)(R,{className:"validate-btn ".concat(w),onClick:function(){""!==A?(y(!0),_c.a.use(_c.a.createNonceMiddleware(Tc)),_c()({path:"/bsf-core/v1/license/activate",method:"POST",data:{"license-key":A,"product-id":"astra-pro-sites"}}).then((function(t){t.success?o({type:"set",licenseStatus:!0,currentIndex:a+1}):f(t.message),y(!1)}))):f(Object(x.__)("Please Enter License Key","astra-sites"))}},E.arrowRightBold)),Object(c.createElement)(V,{onClick:function(){o({type:"set",currentCustomizeIndex:n-1})},customizeStep:!0},Object(x.__)("Back","astra-sites")),u&&!g&&Object(c.createElement)(Nl,{type:"error",message:u,autoHideDuration:5}))},actions:null,class:"customize-license-validation"}],Wc=r(34),Xc=r.n(Wc),qc=r(21),Jc=r.n(qc),Yc=r(22),Kc=r.n(Yc);function Uc(){return(Uc=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Zc(t,e){return t(e={exports:{}},e.exports),e.exports}var $c="function"==typeof Symbol&&Symbol.for,th=$c?Symbol.for("react.element"):60103,eh=$c?Symbol.for("react.portal"):60106,rh=$c?Symbol.for("react.fragment"):60107,nh=$c?Symbol.for("react.strict_mode"):60108,ih=$c?Symbol.for("react.profiler"):60114,ah=$c?Symbol.for("react.provider"):60109,sh=$c?Symbol.for("react.context"):60110,oh=$c?Symbol.for("react.async_mode"):60111,lh=$c?Symbol.for("react.concurrent_mode"):60111,ch=$c?Symbol.for("react.forward_ref"):60112,hh=$c?Symbol.for("react.suspense"):60113,ph=$c?Symbol.for("react.suspense_list"):60120,uh=$c?Symbol.for("react.memo"):60115,fh=$c?Symbol.for("react.lazy"):60116,dh=$c?Symbol.for("react.block"):60121,mh=$c?Symbol.for("react.fundamental"):60117,gh=$c?Symbol.for("react.responder"):60118,yh=$c?Symbol.for("react.scope"):60119;function vh(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case th:switch(t=t.type){case oh:case lh:case rh:case ih:case nh:case hh:return t;default:switch(t=t&&t.$$typeof){case sh:case ch:case fh:case uh:case ah:return t;default:return e}}case eh:return e}}}function bh(t){return vh(t)===lh}var xh={AsyncMode:oh,ConcurrentMode:lh,ContextConsumer:sh,ContextProvider:ah,Element:th,ForwardRef:ch,Fragment:rh,Lazy:fh,Memo:uh,Portal:eh,Profiler:ih,StrictMode:nh,Suspense:hh,isAsyncMode:function(t){return bh(t)||vh(t)===oh},isConcurrentMode:bh,isContextConsumer:function(t){return vh(t)===sh},isContextProvider:function(t){return vh(t)===ah},isElement:function(t){return"object"==typeof t&&null!==t&&t.$$typeof===th},isForwardRef:function(t){return vh(t)===ch},isFragment:function(t){return vh(t)===rh},isLazy:function(t){return vh(t)===fh},isMemo:function(t){return vh(t)===uh},isPortal:function(t){return vh(t)===eh},isProfiler:function(t){return vh(t)===ih},isStrictMode:function(t){return vh(t)===nh},isSuspense:function(t){return vh(t)===hh},isValidElementType:function(t){return"string"==typeof t||"function"==typeof t||t===rh||t===lh||t===ih||t===nh||t===hh||t===ph||"object"==typeof t&&null!==t&&(t.$$typeof===fh||t.$$typeof===uh||t.$$typeof===ah||t.$$typeof===sh||t.$$typeof===ch||t.$$typeof===mh||t.$$typeof===gh||t.$$typeof===yh||t.$$typeof===dh)},typeOf:vh};Zc((function(t,e){})),Zc((function(t){t.exports=xh})),Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;(function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}})()&&Object.assign;function Eh(){}function kh(){}Function.call.bind(Object.prototype.hasOwnProperty),kh.resetWarningCache=Eh;var Ch,Ah,Sh=Zc((function(t){t.exports=function(){function t(t,e,r,n,i,a){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==a){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function e(){return t}t.isRequired=t;var r={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:kh,resetWarningCache:Eh};return r.PropTypes=r,r}()})),wh=(Ch=Xc.a,(Ah=Object(h.memo)((function(t){var e=t.animationData,r=t.path,n=t.play,i=t.speed,a=t.direction,s=t.segments,o=t.goTo,l=t.renderer,c=t.loop,u=t.rendererSettings,f=t.audioFactory,d=t.onLoad,m=t.onComplete,g=t.onLoopComplete,y=t.onEnterFrame,v=t.onSegmentStart,b=function(t,e){if(null==t)return{};var r,n,i={},a=Object.keys(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||(i[r]=t[r]);return i}(t,["animationData","path","play","speed","direction","segments","goTo","renderer","loop","rendererSettings","audioFactory","onLoad","onComplete","onLoopComplete","onEnterFrame","onSegmentStart"]),x=Object(h.useRef)(),E=Object(h.useRef)(),k=Object(h.useState)(!1),C=k[0],A=k[1],S=Object(h.useState)(s),w=S[0],P=S[1];Object(h.useEffect)((function(){Jc()(w,s)||P(s)}),[s,w]);var O=Object(h.useState)(u),j=O[0],I=O[1];Object(h.useEffect)((function(){Jc()(j,u)||I(u)}),[u,j]),Object(h.useEffect)((function(){return function(){return E.current.removeEventListener("complete",m)}}),[m]),Object(h.useEffect)((function(){return function(){return E.current.removeEventListener("loopComplete",g)}}),[g]),Object(h.useEffect)((function(){return function(){return E.current.removeEventListener("enterFrame",y)}}),[y]),Object(h.useEffect)((function(){return function(){return E.current.removeEventListener("segmentStart",v)}}),[v]),Object(h.useEffect)((function(){function t(){A(!0),d()}return E.current=Ch.loadAnimation({animationData:null==e||"object"!=typeof e?e:"object"==typeof e.default?Kc()(e.default):Kc()(e),path:r,container:x.current,renderer:l,loop:!1,autoplay:!1,rendererSettings:j,audioFactory:f}),E.current.addEventListener("DOMLoaded",t),function(){E.current.removeEventListener("DOMLoaded",t),A(!1),E.current.destroy(),E.current=void 0}}),[c,l,j,e,r,f]),Object(h.useEffect)((function(){E.current.addEventListener("complete",m)}),[m]),Object(h.useEffect)((function(){E.current.addEventListener("loopComplete",g)}),[g]),Object(h.useEffect)((function(){E.current.addEventListener("enterFrame",y)}),[y]),Object(h.useEffect)((function(){E.current.addEventListener("segmentStart",v)}),[v]),Object(h.useEffect)((function(){C&&(E.current.loop=c)}),[C,c]);var _=Object(h.useRef)(!1);return Object(h.useEffect)((function(){function t(t){E.current.goToAndPlay(t,!0),E.current.setDirection(a)}C&&(!0===n?w?(E.current.playSegments(w,!0),_.current=!0,-1===a&&t(w[1])):(_.current&&E.current.resetSegments(!0),_.current=!1,-1===a?t(E.current.getDuration(!0)):E.current.play()):!1===n&&E.current.pause())}),[n,w,C]),Object(h.useEffect)((function(){C&&(Number.isNaN(i)||E.current.setSpeed(i))}),[i,C]),Object(h.useEffect)((function(){C&&E.current.setDirection(a)}),[a,C]),Object(h.useEffect)((function(){C&&null!=o&&(n?E.current.goToAndPlay(o,!0):E.current.goToAndStop(o,!0))}),[o,n,C]),p.a.createElement("div",Uc({},b,{ref:x}))}))).propTypes={animationData:Sh.object,path:Sh.string,play:Sh.bool,goTo:Sh.number,speed:Sh.number,direction:Sh.number,loop:Sh.oneOfType([Sh.number,Sh.bool]),segments:Sh.oneOfType([Sh.arrayOf(Sh.number),Sh.bool]),rendererSettings:Sh.object,renderer:Sh.string,audioFactory:Sh.func,onComplete:Sh.func,onLoopComplete:Sh.func,onEnterFrame:Sh.func,onSegmentStart:Sh.func},Ah.defaultProps={animationData:null,path:null,play:null,segments:null,goTo:null,speed:1,direction:1,loop:!0,rendererSettings:{},renderer:"svg",audioFactory:null,onLoad:function(){},onComplete:function(){},onLoopComplete:function(){},onEnterFrame:function(){},onSegmentStart:function(){}},Ah),Ph=function(){var t=C(),e=b()(t,1)[0],r=e.importPercent,n=e.importStatus,i=100===r?"import-done":"",a="",s="";return r<=25&&(a="import-1",s=Object(x.__)("1. Installing required theme, plugins, forms, etc","astra-sites")),r>25&&r<=50&&(a="import-2",s=Object(x.__)("2. Importing pages, menus, posts, etc","astra-sites")),r>50&&r<=75&&(a="import-3",s=Object(x.__)("3. Setting up customizer settings and ther site settings","astra-sites")),r>75&&r<=100&&(a="import-4",s=Object(x.__)("4. Finalizing last few settings","astra-sites")),Object(c.createElement)("div",{className:"ist-import-progress"},Object(c.createElement)("div",{className:"ist-import-progress-info"},Object(c.createElement)("div",{className:"ist-import-progress-info-text"},100!==r&&s,100===r&&Object(c.createElement)(c.Fragment,null,Object(x.__)("Done ","astra-sites"),E.tada)),Object(c.createElement)("div",{className:"ist-import-progress-info-precent"},r,"%")),Object(c.createElement)("div",{className:"ist-import-progress-bar-wrap"},Object(c.createElement)("div",{className:"ist-import-progress-bar-bg"},Object(c.createElement)("div",{className:"ist-import-progress-bar ".concat(i," ").concat(a)})),Object(c.createElement)("div",{className:"import-progress-gap"},Object(c.createElement)("span",null),Object(c.createElement)("span",null),Object(c.createElement)("span",null))),Object(c.createElement)("div",{className:"ist-import-progress-info"},Object(c.createElement)("div",{className:"ist-import-progress-info-text"},100!==r&&Object(c.createElement)("p",null,n+Object(ia.decodeEntities)(" ")),100===r&&Object(c.createElement)("p",null,Object(x.__)("Redirecting you in ","astra-sites"),Object(c.createElement)("span",{id:"redirect-counter"},Object(x.__)("3 seconds…","astra-sites"))))))},Oh=(r(82),function(){var t=C(),e=b()(t,2),r=e[0],n=r.importErrorMessages,i=r.importPercent,a=r.currentIndex,s=r.tryAgainCount,o=r.templateId,l=e[1],h="https://wpastra.com/starter-templates-support/?ip="+starterTemplates.clientIP+"&template-id="+o+"&subject="+n.errorText,p="";return i<=25&&(p="import-1"),i>25&&i<=50&&(p="import-2"),i>50&&i<=75&&(p="import-3"),i>75&&i<=100&&(p="import-4"),Object(c.createElement)("div",{className:"ist-import-error"},Object(c.createElement)("div",{className:"ist-import-progress-info"},Object(c.createElement)("div",{className:"ist-import-progress-info-text label-text"},Object(x.__)("Error Occured!","astra-sites")),Object(c.createElement)("div",{className:"ist-import-progress-info-precent"},i,"%")),Object(c.createElement)("div",{className:"ist-import-progress-bar-wrap"},Object(c.createElement)("div",{className:"ist-import-progress-bar-bg"},Object(c.createElement)("div",{className:"ist-import-progress-bar ".concat(p)})),Object(c.createElement)("div",{className:"import-progress-gap"},Object(c.createElement)("span",null),Object(c.createElement)("span",null),Object(c.createElement)("span",null))),Object(c.createElement)("div",{className:"ist-import-error-wrap ist-import-error-primary-wrap"},n.primaryText&&Object(c.createElement)("p",{className:"website-import-subtitle"},n.primaryText)),Object(c.createElement)("div",{className:"ist-import-error-box"},Object(c.createElement)("div",{className:"ist-import-error-wrap ist-import-error-secondary-wrap"},n.errorText&&"object"!==pc()(n.errorText)&&Object(c.createElement)("p",null,n.errorText),n.errorText&&"object"===pc()(n.errorText)&&Object(c.createElement)("div",null,Object(c.createElement)("pre",null,JSON.stringify(n.errorText,void 0,2))))),Object(c.createElement)("div",null,n.secondaryText&&Object(c.createElement)("p",{dangerouslySetInnerHTML:{__html:n.secondaryText}}),n.solutionText&&Object(c.createElement)("p",{className:"ist-import-error-solution",dangerouslySetInnerHTML:{__html:n.solutionText}}),!n.solutionText&&!n.tryAgain||n.tryAgain&&s>1&&Object(c.createElement)("p",{className:"ist-import-error-solution"},Object(ia.decodeEntities)(Object(x.__)("Please report this error ","astra-sites")),Object(c.createElement)("a",{href:h,target:"_blank",rel:"noreferrer"},"here"),Object(ia.decodeEntities)(Object(x.__)(" so we can fix it.","astra-sites")))),n.tryAgain&&Object(c.createElement)(R,{className:"ist-button",after:!0,onClick:function(){l({type:"set",importErrorMessages:{},importErrorResponse:[],importError:!1,tryAgainCount:s+1,resetCustomizer:!1,resetSiteOptions:!1,resetContent:!1,resetWidgets:!1,resetDone:!1,resetData:[],importStart:!1,importEnd:!1,importPercent:0,requiredPluginsDone:!1,notInstalledList:[],notActivatedList:[],currentIndex:a-1})}},Object(x.__)("Try Importing Again","astra-sites")))}),jh=r(35),Ih={complete:{posts:0,media:0,users:0,comments:0,terms:0},updateDelta:function(t,e){this.complete[t]+=e;var r=this;requestAnimationFrame((function(){r.render()}))},updateProgress:function(t,e,r,n,i){"undefined"!==t&&"undefined"!=e+"/"+r&&((0===(r=parseInt(r))||isNaN(r))&&(r=1),parseInt(e)/r*100<=100&&"function"==typeof n&&(n({type:"set",importStatus:Object(x.__)("Importing Content…","astra-sites")}),n({type:"set",importPercent:i+=5})))},render:function(t,e){for(var r=Object.keys(this.complete),n=0,i=0,a=r.length-1;a>=0;a--){var s=r[a];this.updateProgress(s,this.complete[s],this.data.count[s],t,e),n+=this.complete[s],i+=this.data.count[s]}this.updateProgress("total",n,i,t,e)}},_h=(r(83),function(){var t=C(),e=b()(t,2),r=e[0],n=r.resetDone,i=r.importStart,a=r.importEnd,s=r.importPercent,o=r.templateResponse,l=r.reset,p=r.themeStatus,u=r.currentIndex,f=r.importError,d=r.resetCustomizer,m=r.resetSiteOptions,g=r.resetContent,y=r.resetWidgets,v=r.siteLogo,E=r.activePalette,k=r.typography,S=r.customizerImportFlag,w=r.widgetImportFlag,P=r.contentImportFlag,O=r.themeActivateFlag,j=r.requiredPluginsDone,I=r.requiredPlugins,_=r.notInstalledList,T=r.notActivatedList,F=e[1],M=s,D=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"";F({type:"set",importError:!0,importErrorMessages:{primaryText:t,secondaryText:e,errorCode:n,errorText:r,solutionText:i,tryAgain:!0}}),localStorage.removeItem("st-import-start"),localStorage.removeItem("st-import-end");var s=new FormData;s.append("action","report_error"),s.append("error",JSON.stringify({primaryText:t,secondaryText:e,errorCode:n,errorText:r,solutionText:i,tryAgain:!0,stack:a})),s.append("id",o.id),s.append("plugins",JSON.stringify(I)),fetch(ajaxurl,{method:"post",body:s})},R=function(){_.length<=0||(M+=2,F({type:"set",importStatus:Object(x.__)("Installing Required Plugins.","astra-sites"),importPercent:M}),_.forEach((function(t){wp.updates.queue.push({action:"install-plugin",data:{slug:t.slug,init:t.init,name:t.name,success:function(){F({type:"set",importStatus:Object(x.sprintf)(// translators: Plugin Name.
|
8 |
-
Object(x.__)("%1$s plugin installed successfully.","astra-sites"),t.name)});var e=T;e.push(t),F({type:"set",notActivatedList:e});var r=_;r.forEach((function(e,n){e.slug===t.slug&&r.splice(n,1)})),F({type:"set",notInstalledList:r})},error:function(t){
|
9 |
-
Object(x.__)("Importing - %1$s","astra-sites"),r)})}))})).catch((function(t){
|
10 |
/* Translators: %s is action. */
|
11 |
-
Object(x.__)("Resetting Failed for %s","astra-sites"),
|
12 |
-
|
13 |
-
Object(x.__)("%1$s activated.","astra-sites"),t.name),importPercent:M})})).catch((function(t){D(Object(x.__)("Could not activate the required plugin list.","astra-sites"),"","".concat(t.message),"",astraSitesVars.importFailedRequiredPluginsMessage,"".concat(t.message,": ").concat(t.stack))}))}(T[0])}),[T.length]),Object(c.createElement)(A,{content:Object(c.createElement)("div",{className:"middle-content middle-content-import"},Object(c.createElement)(c.Fragment,null,Object(c.createElement)("h1",null,Object(x.__)("We are building your website…","astra-sites")),f&&Object(c.createElement)("div",{className:"ist-import-process-step-wrap"},Object(c.createElement)(Oh,null)),!f&&Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"ist-import-process-step-wrap"},Object(c.createElement)(Ph,null)),Object(c.createElement)(wh,{loop:!0,animationData:jh,play:!0,style:{height:400,margin:"-70px auto -90px auto"}})))),actions:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(V,{before:!0,disabled:!0,customizeStep:!0},Object(x.__)("Back","astra-sites")))})});function Th(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Fh(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Th(Object(r),!0).forEach((function(e){m()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Th(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Mh=function(t){var e=t.updateFormDetails,r=Object(h.useState)({option1:0,option2:0}),n=b()(r,2),i=n[0],a=n[1];return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("p",{className:"label-text row-label"},Object(x.__)("Tell us a little bit about yourself","astra-sites")),Object(c.createElement)("div",{className:"survey-fields-wrap"},Object(c.createElement)("input",{type:"text",className:"survey-text-input",name:"first_name",placeholder:Object(x.__)("Your First Name","astra-sites"),onChange:function(t){return e("first_name",t.target.value)}}),Object(c.createElement)("input",{type:"email",className:"survey-text-input",name:"email",placeholder:Object(x.__)("Your Work Email","astra-sites"),onChange:function(t){return e("email",t.target.value)}}),Object(c.createElement)("select",{name:"wp_user_type",className:0!==i.option1?"survey-select-input":"survey-select-input initial",defaultValue:"",onBlur:function(t){return e("wp_user_type",t.target.value)},onChange:function(t){e("wp_user_type",t.target.value),a(Fh(Fh({},i),{},{option1:t.target.selectedIndex}))}},Object(c.createElement)("option",{value:"",disabled:!0},Object(x.__)("I am…","astra-sites")),Object(c.createElement)("option",{value:"1"},Object(x.__)("Beginner","astra-sites")),Object(c.createElement)("option",{value:"2"},Object(x.__)("Intermidiate","astra-sites")),Object(c.createElement)("option",{value:"3"},Object(x.__)("Expert","astra-sites"))),Object(c.createElement)("select",{name:"build_website_for",className:0!==i.option2?"survey-select-input":"survey-select-input initial",defaultValue:"",onBlur:function(t){return e("build_website_for",t.target.value)},onChange:function(t){a(Fh(Fh({},i),{},{option2:t.target.selectedIndex}))}},Object(c.createElement)("option",{value:"",disabled:!0},Object(x.__)("I am building website for…","astra-sites")),Object(c.createElement)("option",{value:"1"},Object(x.__)("Myself/My Company","astra-sites")),Object(c.createElement)("option",{value:"2"},Object(x.__)("My Client","astra-sites")))))},Dh=function(){var t=Object(h.useState)(!0),e=b()(t,2),r=e[0],n=e[1],i=C(),a=b()(i,2),s=a[0],o=s.reset,l=s.customizerImportFlag,p=s.themeActivateFlag,u=s.widgetImportFlag,f=s.contentImportFlag,d=s.requiredPlugins,m=a[1],g=null!==d?d.required_plugins.inactive:[],y="installed-and-active"!==starterTemplates.themeStatus?"theme-check":"";return Object(c.createElement)("div",{className:"survey-form-advanced-wrapper ".concat(r?"show-section":"hidden-section")},Object(c.createElement)("p",{className:"label-text row-label",onClick:function(){n(!r)}},Object(x.__)("Advanced Options","astra-sites"),Object(c.createElement)("span",{className:"advanced-options-icons"},r?E.angleUP:E.angleDown)),Object(c.createElement)("div",{className:"survey-advanced-section"},Object(c.createElement)("ul",null,"yes"===starterTemplates.firstImportStatus&&Object(c.createElement)("li",null,Object(c.createElement)("input",{type:"checkbox",id:"reset-site",name:"reset-site",defaultChecked:o,onChange:function(){m({type:"set",reset:!o})}}),Object(c.createElement)("label",{htmlFor:"reset-site"}," ",Object(x.__)("Delete Previously imported sites","astra-sites")),Object(c.createElement)(Tl,{content:Object(c.createElement)("span",null,Object(x.__)("WARNING: Selecting this option will delete all data from the previous import. Choose this option only if this is intended.","astra-sites"),Object(c.createElement)("br",null),Object(x.__)("Choose this option only if this is intended.You can find the backup to the current customizer settings at /wp-content/uploads astra-sites","astra-sites"))},E.questionMark)),"installed-and-active"!==starterTemplates.themeStatus&&Object(c.createElement)("li",null,Object(c.createElement)("input",{type:"checkbox",id:"import-theme",name:"import-theme",defaultChecked:p,onChange:function(){m({type:"set",themeActivateFlag:!p,customizerImportFlag:!p})}}),Object(c.createElement)("label",{htmlFor:"import-theme"}," ",Object(x.__)("Install & Activate Astra Theme","astra-sites")),Object(c.createElement)(Tl,{content:Object(x.__)("To import the site in the original format, you would need the Astra theme activated. You can import it with any other theme, but the site might lose some of the design settings and look a bit different.","astra-sites")},E.questionMark)),p&&Object(c.createElement)("li",{className:y},Object(c.createElement)("input",{type:"checkbox",id:"import-customizer",name:"import-customizer",defaultChecked:l,onChange:function(){m({type:"set",customizerImportFlag:!l})}}),Object(c.createElement)("label",{htmlFor:"import-customizer"}," ",Object(x.__)("Import Customizer Settings","astra-sites")),Object(c.createElement)(Tl,{content:Object(x.__)("Starter Templates customizer serves global settings that give uniform design to the website. Choosing this option will override your current customizer settings.","astra-sites")},E.questionMark)),Object(c.createElement)("li",null,Object(c.createElement)("input",{type:"checkbox",id:"import-widgets",name:"import-widgets",defaultChecked:u,onChange:function(){m({type:"set",widgetImportFlag:!u})}}),Object(c.createElement)("label",{htmlFor:"import-widgets"}," ",Object(x.__)("Import Widgets","astra-sites"))),g.length>0&&Object(c.createElement)("li",null,Object(c.createElement)("input",{type:"checkbox",id:"import-plugins",name:"import-plugins",defaultChecked:!0,disabled:!0}),Object(c.createElement)("label",{htmlFor:"import-plugins"}," ",Object(x.__)("Install Required Plugins","astra-sites")),Object(c.createElement)(Tl,{content:Object(c.createElement)("div",null,Object(c.createElement)("span",null,Object(x.__)("Plugins needed to import this template are missing. Required plugins will be installed and activated automatically.","astra-sites")),Object(c.createElement)("ul",null,g.map((function(t,e){return Object(c.createElement)("li",{key:e},Object(ia.decodeEntities)("• ".concat(t.name)))}))))},E.questionMark)),Object(c.createElement)("li",null,Object(c.createElement)("input",{type:"checkbox",id:"import-content",name:"import-content",defaultChecked:f,onChange:function(){m({type:"set",contentImportFlag:!f})}}),Object(c.createElement)("label",{htmlFor:"import-content"}," ",Object(x.__)("Import Content","astra-sites")),Object(c.createElement)(Tl,{content:Object(x.__)("Selecting this option will import dummy pages, posts, images, and menus. If you do not want to import dummy content, please uncheck this option.","astra-sites")},E.questionMark)))))};function Rh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Bh(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Rh(Object(r),!0).forEach((function(e){m()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Rh(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}r(84);var Vh=[{content:Object(c.createElement)((function(){var t=C(),e=b()(t,2),r=e[0].currentIndex,n=e[1],i=Object(h.useState)(!0),a=b()(i,2),s=a[0],o=a[1];return Object(c.createElement)(A,{content:Object(c.createElement)("div",{className:"welcome-screen"},Object(c.createElement)("h1",{className:"d-flex-center-align"},Object(x.__)("Getting Started with Starter Templates","astra-sites")),Object(c.createElement)("p",{className:"screen-description"},Object(x.__)("This is the very beginning of the fastest and easiest website building experience you`ve ever had!","astra-sites")),Object(c.createElement)("div",{className:"video-showcase",onClick:function(){var t=document.getElementById("st-welcome-video"),e=t.src.replace("&mute=1&controls=0","&mute=0&controls=1");t.src=e,o(!1)}},s&&Object(c.createElement)("div",{className:"click-to-play-wrap"},Object(c.createElement)("span",{className:"click-btn-text"},E.clickToPlay),Object(c.createElement)("span",{className:"youtube-btn middle-content"},E.youtube)),Object(c.createElement)("iframe",{src:"https://www.youtube-nocookie.com/embed/Ch6Yg-9eCyc?rel=0&autoplay=1&mute=1&controls=0&showinfo=0&loop=1&modestbranding=1&loop=1",frameBorder:"0",allow:"autoplay; encrypted-media",allowFullScreen:!0,title:"st-welcome-video",id:"st-welcome-video"})),Object(c.createElement)("div",{className:"get-started-wrap"},Object(c.createElement)(O,{onClick:function(){n({type:"set",currentIndex:r+1})}},Object(x.__)("Build Your Website Now","astra-sites")))),actions:null})}),null),class:"step-welcome"},{content:Object(c.createElement)(na,null),class:"step-page-builder"},{header:Object(c.createElement)((function(){return Object(c.createElement)("div",{className:"site-list-header row"},Object(c.createElement)("div",{className:"st-header-left"},Object(c.createElement)(sc,null)),Object(c.createElement)("div",{className:"st-header-right"},Object(c.createElement)(cc,null),Object(c.createElement)(Oc,null),Object(c.createElement)(oc,null),Object(c.createElement)(lc,null)))}),null),content:Object(c.createElement)((function(){var t=Object(h.useState)(!0),e=b()(t,2),r=e[0],n=e[1],i=Object(h.useState)({sites:{},tags:[],defaultSites:{},allFavorites:[]}),a=b()(i,2),s=a[0],o=a[1],l=C(),p=b()(l,2),u=p[0],f=p[1],d=u.favoriteSiteIDs,m=u.onMyFavorite,g=u.builder,y=u.siteSearchTerm,v=u.siteType,E=u.siteOrder,k=u.siteCategory;Object(h.useEffect)((function(){f({type:"set",templateResponse:null,selectedTemplateName:"",selectedTemplateType:""});var t=Sl(y,v,"",g),e=ac(ac({},t.sites),t.related);"latest"===E&&Object.keys(e).length&&(e=Qo(e,"publish-date").reverse());var r=[],i=astraSitesVars.all_sites;if(m&&Object.keys(i).length>0)for(var a in i)d.length&&d.includes(a)&&r.push(ac({id:a.replace("id-",""),image:i[a]["thumbnail-image-url"],title:Object(ia.decodeEntities)(i[a].title),badge:"agency-mini"===i[a]["astra-sites-type"]?Object(x.__)("Premium","astra-sites"):""},i[a]));o(ac(ac(ac({},s),t),{},{defaultSites:Sl("","","",g).sites,sites:e,allFavorites:r})),setTimeout((function(){n(!1)}),300)}),[d,m,g,y,v,E,k]),W(u);var S=Object.keys(s.sites).length;return Object(c.createElement)(A,{content:Object(c.createElement)("div",{className:"site-list-screen-container ".concat(r?"site-loading":"site-loaded")},Object(c.createElement)(wl,null),Object(c.createElement)("div",{className:"site-list-screen-wrap"},Object(c.createElement)("h1",null,Object(x.__)("What type of website are you building?","astra-sites")),Object(c.createElement)("div",{className:"site-list-content"},Object(c.createElement)(Kl,null),Object(c.createElement)("div",{className:"st-templates-content"},Object(c.createElement)("div",{className:"st-other-filters"},Object(c.createElement)("div",{className:"st-category-filter"},Object(c.createElement)(tc,null)),Object(c.createElement)("div",{className:"st-type-and-order-filters"},"gutenberg"!==g&&Object(c.createElement)(Zl,null),Object(c.createElement)($l,null))),m?Object(c.createElement)(c.Fragment,null,s.allFavorites.length?Object(c.createElement)("div",{className:"st-sites-grid"},Object(c.createElement)(Jl,{sites:s.allFavorites})):Object(c.createElement)(c.Fragment,null,Object(c.createElement)(rc,null),Object(c.createElement)(nc,{sites:s.defaultSites}))):Object(c.createElement)(c.Fragment,null,S?Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"st-sites-grid"},y&&Object(c.createElement)("div",{className:"st-sites-found-message"},Object(x.sprintf)(
|
|
|
|
|
14 |
/* translators: %1$s: search term. */
|
15 |
Object(x.__)("Starter Templates for %1$s:","astra-sites"),Object(ia.decodeEntities)(y))),Object(c.createElement)(Jl,{sites:s.sites}))):Object(c.createElement)(c.Fragment,null,Object(c.createElement)(ec,null),Object(c.createElement)(nc,{sites:s.defaultSites}))))))),actions:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(V,{before:!0},Object(x.__)("Back","astra-sites")),!astraSitesVars.isPro&&!H()&&Object(c.createElement)("div",{className:"cta-strip-right"},Object(c.createElement)("h5",null,Object(x.__)("Get unlimited access to all Premium Starter Templates and more, at a single low cost!","astra-sites")),Object(c.createElement)(R,{className:"st-access-btn",onClick:function(){return window.open(astraSitesVars.cta_links[g])}},Object(x.__)("Get Essential Bundle","astra-sites"))))})}),null),class:"step-site-list"},{content:Object(c.createElement)((function(){var t,e,r=C(),n=b()(r,2),i=n[0],a=i.currentCustomizeIndex,s=i.currentIndex,o=i.builder,l=n[1],p=Qc[a];void 0!==p&&(t=p.content,e=p.controls),Object(h.useEffect)((function(){var t=parseInt(a)-1,e=parseInt(a)+1;e>0&&e<Qc.length&&document.body.classList.remove(Qc[e].class),t>=0&&document.body.classList.remove(Qc[t].class),document.body.classList.add(Qc[a].class)}));var u=function(){if(Qc.length-1===a)return null;l("beaver-builder"===o||"brizy"===o?{type:"set",currentIndex:s+1}:{type:"set",currentCustomizeIndex:a+1})},f=function(){if(0===a)return null;l({type:"set",currentCustomizeIndex:a-1})};return Object(c.createElement)(A,{stepName:Qc[a].class,content:Object(c.createElement)(t,{customizeStep:!0,onNextClick:u,onPreviousClick:f}),controls:e&&Object(c.createElement)(e,{customizeStep:!0,onNextClick:u,onPreviousClick:f}),actions:null,preview:Object(c.createElement)(ra,null)})}),null),class:"step-customizer"},{content:Object(c.createElement)((function(){var t=C(),e=b()(t,2),r=e[0],n=r.currentIndex,i=r.builder,a=r.requiredPlugins,s=e[1],o=null!==a?a.third_party_required_plugins:[],l=o.length>0,p=Object(h.useState)(l),u=b()(p,2),f=u[0],d=u[1],g=Object(h.useState)({first_name:"",email:"",wp_user_type:"",build_website_for:""}),y=b()(g,2),v=y[0],k=y[1];return Object(c.createElement)(A,{content:Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"survey-container"},f&&Object(c.createElement)("form",{className:"required-plugins-form",onSubmit:function(t){t.preventDefault(),d(!1)}},Object(c.createElement)("h1",null,Object(x.__)("Required plugins missing","astra-sites")),Object(c.createElement)("p",null,Object(x.__)("This starter template requires premium plugins. As these are third party premium plugins, you'll need to purchase, install and activate them first.","astra-sites")),Object(c.createElement)("h5",null,Object(x.__)("Required plugins -","astra-sites")),Object(c.createElement)("ul",{className:"third-party-required-plugins-list"},o.map((function(t,e){return Object(c.createElement)("li",{"data-slug":t.slug,"data-init":t.init,"data-name":t.name,key:e},Object(c.createElement)("a",{href:t.link,target:"_blank",rel:"noreferrer"},t.name))}))),Object(c.createElement)("button",{type:"submit",className:"submit-survey-btn button-text d-flex-center-align"},Object(x.__)("Skip & Start Importing","astra-sites"),E.arrowRight)),!f&&Object(c.createElement)("form",{className:"survey-form",onSubmit:function(t){if(t.preventDefault(),setTimeout((function(){s({type:"set",currentIndex:n+1})}),500),"yes"!==astraSitesVars.subscribed){var e={EMAIL:v.email,FIRSTNAME:v.first_name,PAGE_BUILDER:i,WP_USER_TYPE:v.wp_user_type,BUILD_WEBSITE_FOR:v.build_website_for},r=new FormData;r.append("action","astra-sites-update-subscription"),r.append("_ajax_nonce",astraSitesVars._ajax_nonce),r.append("data",JSON.stringify(e)),fetch(ajaxurl,{method:"post",body:r}).then((function(t){return t.json()})).then((function(){s({type:"set",user_subscribed:!0})}))}else s({type:"set",user_subscribed:!0})}},Object(c.createElement)("h1",null,Object(x.__)("Okay, just one last step…","astra-sites")),"yes"!==astraSitesVars.subscribed&&Object(c.createElement)(Mh,{updateFormDetails:function(t,e){k((function(r){return Bh(Bh({},r),{},m()({},t,e))}))}}),Object(c.createElement)(Dh,null),Object(c.createElement)("button",{type:"submit",className:"submit-survey-btn button-text d-flex-center-align"},Object(x.__)("Submit & Build My Website","astra-sites"),E.arrowRight)))),actions:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(V,{before:!0},Object(x.__)("Back","astra-sites")))})}),null),class:"step-survey"},{title:"We are buiding your website...",content:Object(c.createElement)(_h,null),class:"step-import-site"},{content:Object(c.createElement)(D,null),class:"step-congrats"}],Lh=["type"];function Nh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function zh(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Nh(Object(r),!0).forEach((function(e){m()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nh(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Gh=0,Hh="gutenberg";astraSitesVars.default_page_builder&&(Gh=2,Hh="brizy"===astraSitesVars.default_page_builder?"gutenberg":astraSitesVars.default_page_builder);var Qh={currentIndex:Gh,currentCustomizeIndex:0,siteLogo:{id:"",thumbnail:"",url:"",width:120},activePaletteSlug:"default",activePalette:{},typography:{},typographyIndex:0,stepsLength:Object.keys(Vh).length,builder:Hh,siteType:"",siteOrder:"popular",siteCategory:{id:"",slug:""},siteSearchTerm:"",userSubscribed:!1,showSidebar:!0,tryAgainCount:0,confettiDone:!1,templateId:0,templateResponse:null,requiredPlugins:null,selectedTemplateName:"",selectedTemplateType:"",reset:!0,themeStatus:!1,importStatusLog:"",resetCustomizer:!1,resetSiteOptions:!1,resetContent:!1,resetWidgets:!1,resetDone:!1,requiredPluginsDone:!1,notInstalledList:[],notActivatedList:[],resetData:[],importStart:!1,importEnd:!1,importPercent:0,importError:!1,importErrorMessages:{primaryText:"",secondaryText:"",errorCode:"",errorText:"",solutionText:"",tryAgain:!1},importErrorResponse:[],customizerImportFlag:!0,themeActivateFlag:!0,widgetImportFlag:!0,contentImportFlag:!0,onMyFavorite:!1,favoriteSiteIDs:Object.values(astraSitesVars.favorite_data)||[],licenseStatus:astraSitesVars.license_status,validateLicenseStatus:!1,searchTerms:[],searchTermsWithCount:[]};function Wh(t){return"/"===t.charAt(0)}function Xh(t,e){for(var r=e,n=r+1,i=t.length;n<i;r+=1,n+=1)t[r]=t[n];t.pop()}function qh(t,e){if(!t)throw new Error("Invariant failed")}function Jh(t){return"/"===t.charAt(0)?t:"/"+t}function Yh(t,e){return function(t,e){return 0===t.toLowerCase().indexOf(e.toLowerCase())&&-1!=="/?#".indexOf(t.charAt(e.length))}(t,e)?t.substr(e.length):t}function Kh(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t}function Uh(t){var e=t.pathname,r=t.search,n=t.hash,i=e||"/";return r&&"?"!==r&&(i+="?"===r.charAt(0)?r:"?"+r),n&&"#"!==n&&(i+="#"===n.charAt(0)?n:"#"+n),i}function Zh(t,e,r,n){var i;"string"==typeof t?(i=function(t){var e=t||"/",r="",n="",i=e.indexOf("#");-1!==i&&(n=e.substr(i),e=e.substr(0,i));var a=e.indexOf("?");return-1!==a&&(r=e.substr(a),e=e.substr(0,a)),{pathname:e,search:"?"===r?"":r,hash:"#"===n?"":n}}(t)).state=e:(void 0===(i=J({},t)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==e&&void 0===i.state&&(i.state=e));try{i.pathname=decodeURI(i.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return r&&(i.key=r),n?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=function(t,e){void 0===e&&(e="");var r,n=t&&t.split("/")||[],i=e&&e.split("/")||[],a=t&&Wh(t),s=e&&Wh(e),o=a||s;if(t&&Wh(t)?i=n:n.length&&(i.pop(),i=i.concat(n)),!i.length)return"/";if(i.length){var l=i[i.length-1];r="."===l||".."===l||""===l}else r=!1;for(var c=0,h=i.length;h>=0;h--){var p=i[h];"."===p?Xh(i,h):".."===p?(Xh(i,h),c++):c&&(Xh(i,h),c--)}if(!o)for(;c--;c)i.unshift("..");!o||""===i[0]||i[0]&&Wh(i[0])||i.unshift("");var u=i.join("/");return r&&"/"!==u.substr(-1)&&(u+="/"),u}(i.pathname,n.pathname)):i.pathname=n.pathname:i.pathname||(i.pathname="/"),i}function $h(){var t=null,e=[];return{setPrompt:function(e){return t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,r,n,i){if(null!=t){var a="function"==typeof t?t(e,r):t;"string"==typeof a?"function"==typeof n?n(a,i):i(!0):i(!1!==a)}else i(!0)},appendListener:function(t){var r=!0;function n(){r&&t.apply(void 0,arguments)}return e.push(n),function(){r=!1,e=e.filter((function(t){return t!==n}))}},notifyListeners:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];e.forEach((function(t){return t.apply(void 0,r)}))}}}var tp=!("undefined"==typeof window||!window.document||!window.document.createElement);function ep(t,e){e(window.confirm(t))}function rp(){try{return window.history.state||{}}catch(t){return{}}}function np(t){void 0===t&&(t={}),tp||qh(!1);var e,r=window.history,n=(-1===(e=window.navigator.userAgent).indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,i=!(-1===window.navigator.userAgent.indexOf("Trident")),a=t,s=a.forceRefresh,o=void 0!==s&&s,l=a.getUserConfirmation,c=void 0===l?ep:l,h=a.keyLength,p=void 0===h?6:h,u=t.basename?Kh(Jh(t.basename)):"";function f(t){var e=t||{},r=e.key,n=e.state,i=window.location,a=i.pathname+i.search+i.hash;return u&&(a=Yh(a,u)),Zh(a,n,r)}function d(){return Math.random().toString(36).substr(2,p)}var m=$h();function g(t){J(O,t),O.length=r.length,m.notifyListeners(O.location,O.action)}function y(t){(function(t){return void 0===t.state&&-1===navigator.userAgent.indexOf("CriOS")})(t)||x(f(t.state))}function v(){x(f(rp()))}var b=!1;function x(t){b?(b=!1,g()):m.confirmTransitionTo(t,"POP",c,(function(e){e?g({action:"POP",location:t}):function(t){var e=O.location,r=k.indexOf(e.key);-1===r&&(r=0);var n=k.indexOf(t.key);-1===n&&(n=0);var i=r-n;i&&(b=!0,A(i))}(t)}))}var E=f(rp()),k=[E.key];function C(t){return u+Uh(t)}function A(t){r.go(t)}var S=0;function w(t){1===(S+=t)&&1===t?(window.addEventListener("popstate",y),i&&window.addEventListener("hashchange",v)):0===S&&(window.removeEventListener("popstate",y),i&&window.removeEventListener("hashchange",v))}var P=!1,O={length:r.length,action:"POP",location:E,createHref:C,push:function(t,e){var i=Zh(t,e,d(),O.location);m.confirmTransitionTo(i,"PUSH",c,(function(t){if(t){var e=C(i),a=i.key,s=i.state;if(n)if(r.pushState({key:a,state:s},null,e),o)window.location.href=e;else{var l=k.indexOf(O.location.key),c=k.slice(0,l+1);c.push(i.key),k=c,g({action:"PUSH",location:i})}else window.location.href=e}}))},replace:function(t,e){var i=Zh(t,e,d(),O.location);m.confirmTransitionTo(i,"REPLACE",c,(function(t){if(t){var e=C(i),a=i.key,s=i.state;if(n)if(r.replaceState({key:a,state:s},null,e),o)window.location.replace(e);else{var l=k.indexOf(O.location.key);-1!==l&&(k[l]=i.key),g({action:"REPLACE",location:i})}else window.location.replace(e)}}))},go:A,goBack:function(){A(-1)},goForward:function(){A(1)},block:function(t){void 0===t&&(t=!1);var e=m.setPrompt(t);return P||(w(1),P=!0),function(){return P&&(P=!1,w(-1)),e()}},listen:function(t){var e=m.appendListener(t);return w(1),function(){w(-1),e()}}};return O}var ip=r(36),ap=r(23),sp=r.n(ap),op=(r(16),function(t){var e=Object(ip.a)();return e.displayName=t,e}),lp=op("Router-History"),cp=op("Router"),hp=function(t){function e(e){var r;return(r=t.call(this,e)||this).state={location:e.history.location},r._isMounted=!1,r._pendingLocation=null,e.staticContext||(r.unlisten=e.history.listen((function(t){r._isMounted?r.setState({location:t}):r._pendingLocation=t}))),r}Object(ht.a)(e,t),e.computeRootMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}};var r=e.prototype;return r.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},r.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},r.render=function(){return p.a.createElement(cp.Provider,{value:{history:this.props.history,location:this.state.location,match:e.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},p.a.createElement(lp.Provider,{children:this.props.children||null,value:this.props.history}))},e}(p.a.Component);p.a.Component,p.a.Component;var pp={},up=0;p.a.Component,p.a.Component,p.a.Component;var fp=p.a.useContext,dp=function(t){function e(){for(var e,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).history=np(e.props),e}return Object(ht.a)(e,t),e.prototype.render=function(){return p.a.createElement(hp,{history:this.history,children:this.props.children})},e}(p.a.Component);p.a.Component;var mp=function(t,e){return"function"==typeof t?t(e):t},gp=function(t,e){return"string"==typeof t?Zh(t,null,null,e):t},yp=function(t){return t},vp=p.a.forwardRef;void 0===vp&&(vp=yp);var bp=vp((function(t,e){var r=t.innerRef,n=t.navigate,i=t.onClick,a=Y(t,["innerRef","navigate","onClick"]),s=a.target,o=J({},a,{onClick:function(t){try{i&&i(t)}catch(e){throw t.preventDefault(),e}t.defaultPrevented||0!==t.button||s&&"_self"!==s||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||(t.preventDefault(),n())}});return o.ref=yp!==vp&&e||r,p.a.createElement("a",o)})),xp=vp((function(t,e){var r=t.component,n=void 0===r?bp:r,i=t.replace,a=t.to,s=t.innerRef,o=Y(t,["component","replace","to","innerRef"]);return p.a.createElement(cp.Consumer,null,(function(t){t||qh(!1);var r=t.history,l=gp(mp(a,t.location),t.location),c=l?r.createHref(l):"",h=J({},o,{href:c,navigate:function(){var e=mp(a,t.location),n=Uh(t.location)===Uh(gp(e));(i||n?r.replace:r.push)(e)}});return yp!==vp?h.ref=e||s:h.innerRef=s,p.a.createElement(n,h)}))})),Ep=function(t){return t},kp=p.a.forwardRef;function Cp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}void 0===kp&&(kp=Ep),kp((function(t,e){var r=t["aria-current"],n=void 0===r?"page":r,i=t.activeClassName,a=void 0===i?"active":i,s=t.activeStyle,o=t.className,l=t.exact,c=t.isActive,h=t.location,u=t.sensitive,f=t.strict,d=t.style,m=t.to,g=t.innerRef,y=Y(t,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return p.a.createElement(cp.Consumer,null,(function(t){t||qh(!1);var r=h||t.location,i=gp(mp(m,r),r),v=i.pathname,b=v&&v.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),x=b?function(t,e){void 0===e&&(e={}),("string"==typeof e||Array.isArray(e))&&(e={path:e});var r=e,n=r.path,i=r.exact,a=void 0!==i&&i,s=r.strict,o=void 0!==s&&s,l=r.sensitive,c=void 0!==l&&l;return[].concat(n).reduce((function(e,r){if(!r&&""!==r)return null;if(e)return e;var n=function(t,e){var r=""+e.end+e.strict+e.sensitive,n=pp[r]||(pp[r]={});if(n[t])return n[t];var i=[],a={regexp:sp()(t,i,e),keys:i};return up<1e4&&(n[t]=a,up++),a}(r,{end:a,strict:o,sensitive:c}),i=n.regexp,s=n.keys,l=i.exec(t);if(!l)return null;var h=l[0],p=l.slice(1),u=t===h;return a&&!u?null:{path:r,url:"/"===r&&""===h?"/":h,isExact:u,params:s.reduce((function(t,e,r){return t[e.name]=p[r],t}),{})}}),null)}(r.pathname,{path:b,exact:l,sensitive:u,strict:f}):null,E=!!(c?c(x,r):x),k="function"==typeof o?o(E):o,C="function"==typeof d?d(E):d;E&&(k=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.filter((function(t){return t})).join(" ")}(k,a),C=J({},C,s));var A=J({"aria-current":E&&n||null,className:k,style:C,to:i},y);return Ep!==kp?A.ref=e||g:A.innerRef=g,p.a.createElement(xp,A)}))}));var Ap=function(){var t=C(),e=b()(t,2),r=e[0],n=e[1],i=r.currentIndex,a=r.templateResponse,s=r.designStep,o=r.importError,l=Object(h.useState)(!0),p=b()(l,2),u=p[0],f=p[1],d=Object(h.useState)(!0),g=b()(d,2),y=g[0],v=g[1],k=Vh[i],A=fp(lp);return Object(h.useEffect)((function(){var t=parseInt(i)-1,e=parseInt(i)+1;e>0&&e<Vh.length&&document.body.classList.remove(Vh[e].class),t>0&&document.body.classList.remove(Vh[t].class),document.body.classList.add(Vh[i].class)})),Object(h.useEffect)((function(){o?document.body.classList.add("st-error"):document.body.classList.remove("st-error")}),[o]),Object(h.useEffect)((function(){var t=new URLSearchParams(window.location.search),e=JSON.parse(localStorage.getItem("starter-templates-onboarding")),r=parseInt(t.get("currentIndex"))||0,i=parseInt(t.get("designStep"))||0;if(0!==r){var a={};for(var s in e)"currentIndex"!==s&&(a[s]=e["".concat(s)]);n(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Cp(Object(r),!0).forEach((function(e){m()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Cp(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({type:"set",currentIndex:r,designStep:i},a))}else localStorage.removeItem("starter-templates-onboarding");f(!1)}),[A]),Object(h.useEffect)((function(){var t=new URLSearchParams(window.location.search),e=parseInt(t.get("currentIndex"))||0;0===i&&(t.delete("currentIndex"),A.push(window.location.pathname+"?"+t.toString())),(0!==i&&e!==i||null!==a)&&(W(r),t.set("currentIndex",i),A.push(window.location.pathname+"?"+t.toString())),0!==s&&e===Vh.length-1&&null!==a&&(W(r),t.set("designStep",s),A.push(window.location.pathname+"?"+t.toString())),2===i&&n({type:"set",activePalette:{},activePaletteSlug:"default",typography:{},typographyIndex:0}),v(!1)}),[i,a,s]),Object(c.createElement)("div",{className:"step ".concat(k.class)},3!==i&&Object(c.createElement)("div",{className:"step-header"},k.header?k.header:Object(c.createElement)("div",{className:"row"},Object(c.createElement)("div",{className:"col"},Object(c.createElement)(sc,null)),Object(c.createElement)("div",{className:"right-col"},4===i&&Object(c.createElement)("div",{className:"back-to-main",onClick:function(){n({type:"set",currentIndex:i-2,currentCustomizeIndex:0})}},Object(c.createElement)(Tl,{content:Object(x.__)("Back to Templates","astra-sites")},E.cross)),Object(c.createElement)("div",{className:"col exit-link"},Object(c.createElement)("a",{href:starterTemplates.adminUrl},Object(c.createElement)(Tl,{content:Object(x.__)("Exit to Dashboard","astra-sites")},E.dashboard))))),Object(c.createElement)("canvas",{id:"ist-bashcanvas",width:window.innerWidth,height:window.innerHeight})),!1===u&&!1===y&&k?k.content:null)},Sp=(r(86),function(){return Object(c.createElement)(dp,null,Object(c.createElement)("div",{className:"starter-templates-ai-steps"},Object(c.createElement)(Ap,null)))});f.a.render(Object(c.createElement)((function(t){var e=t.reducer,r=t.initialState,n=t.children;return Object(c.createElement)(k.Provider,{value:Object(h.useReducer)(e,r)},n)}),{reducer:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Qh,e=arguments.length>1?arguments[1]:void 0,r=e.type,n=y()(e,Lh);switch(r){case"set":return zh(zh({},t),n);default:return t}},initialState:Qh},Object(c.createElement)(Sp,null)),document.getElementById("starter-templates-ai-root"))}]);
|
4 |
/* translators: %1$s - search term. */
|
5 |
Object(x.__)("Your search - %1$s - did not match any Starter Templates.","astra-sites"),Object(ia.decodeEntities)(e)))):null}),rc=(r(73),function(){return Object(c.createElement)("div",{className:"st-no-favorites"},Object(c.createElement)("h3",null,Object(x.__)("No favorites added. Press the heart icon to add templates as favorites.","astra-sites")))}),nc=function(t){var e=t.sites;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"st-sites-grid"},Object(c.createElement)("div",{className:"st-sites-found-message"},Object(x.__)("Other suggested Starter Templates","astra-sites")),Object(c.createElement)(Jl,{sites:e})))};function ic(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ac(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ic(Object(r),!0).forEach((function(e){m()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ic(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var sc=(r(74),r(75),function(){return Object(c.createElement)("div",{className:"branding-wrap"},H()?Object(c.createElement)("h3",null,astraSitesVars.whiteLabelName):Object(c.createElement)(Ll,{className:"ist-logo",src:"".concat(starterTemplates.imageDir,"logo.svg"),alt:Object(x.__)("Starter Templates","astra-sites")}))}),oc=function(){var t=C(),e=b()(t,2),r=e[0].builder,n=e[1],i=[{id:"gutenberg",title:Object(x.__)("Block Editor","astra-sites"),image:"".concat(starterTemplates.imageDir,"block-editor.svg")},{id:"elementor",title:Object(x.__)("Elementor","astra-sites"),image:"".concat(starterTemplates.imageDir,"elementor.svg")},{id:"beaver-builder",title:Object(x.__)("Beaver Builder","astra-sites"),image:"".concat(starterTemplates.imageDir,"beaver-builder.svg")}];return"1"===starterTemplates.isBrizyEnabled&&i.push({id:"brizy",title:Object(x.__)("Brizy","astra-sites"),image:"".concat(starterTemplates.imageDir,"brizy.svg")}),Object(c.createElement)("div",{className:"st-page-builder-filter"},Object(c.createElement)(Ul,{value:r,options:i,className:"st-page-builder-toggle",onClick:function(t,e){n({type:"set",builder:e.id,siteCategory:Qh.siteCategory,siteType:"",siteOrder:"popular",onMyFavorite:!1});var r=new FormData;r.append("action","astra-sites-change-page-builder"),r.append("_ajax_nonce",astraSitesVars._ajax_nonce),r.append("page_builder",e.id),fetch(ajaxurl,{method:"post",body:r})}}))},lc=(r(76),function(){return Object(c.createElement)("a",{className:"st-exit-to-dashboard",href:starterTemplates.adminUrl},Object(c.createElement)(Tl,{content:Object(x.__)("Exit to Dashboard","astra-sites")},E.dashboard))}),cc=(r(77),function(){var t=C(),e=b()(t,2),r=e[0],n=e[1],i=r.onMyFavorite;return Object(c.createElement)("div",{className:"st-my-favorite ".concat(i?"active":""),onClick:function(t){t.stopPropagation(),n({type:"set",onMyFavorite:!i,siteType:"",siteOrder:Qh.siteOrder,siteCategory:Qh.siteCategory,siteSearchTerm:""})}},Object(c.createElement)(Tl,{content:Object(x.__)("My Favorite","astra-sites")},E.favorite))}),hc=r(17),pc=r.n(hc);function uc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function fc(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?uc(Object(r),!0).forEach((function(e){m()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):uc(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function dc(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return mc(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mc(t,void 0):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){o=!0,a=t},f:function(){try{s||null==r.return||r.return()}finally{if(o)throw a}}}}function mc(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var gc=wp.ajax.post,yc=[],vc=!1,bc=function(t,e){var r=new FormData;return r.append(t,e),r},xc=function(){var t=Ol()(Il.a.mark((function t(){var e,r,n,i;return Il.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch(ajaxurl,{method:"post",body:bc("action","astra-sites-update-library")});case 3:return e=t.sent,t.next=6,e.json();case 6:return r=t.sent,t.next=9,r.data;case 9:if(n=t.sent,i=null,yc=[],"updated"!==n){t.next=17;break}yc.push(!0),vc=!0,t.next=53;break;case 17:if("batch"!==n){t.next=53;break}return t.next=20,Pc();case 20:return i=t.sent,t.t0=yc,t.next=24,wc();case 24:return t.t1=t.sent,t.t0.push.call(t.t0,t.t1),t.t2=yc,t.next=29,Sc();case 29:return t.t3=t.sent,t.t2.push.call(t.t2,t.t3),t.t4=yc,t.next=34,Ac();case 34:return t.t5=t.sent,t.t4.push.call(t.t4,t.t5),t.t6=yc,t.next=39,Cc();case 39:return t.t7=t.sent,t.t6.push.call(t.t6,t.t7),t.t8=yc,t.next=44,kc();case 44:return t.t9=t.sent,t.t8.push.call(t.t8,t.t9),t.t10=yc,t.next=49,Ec();case 49:t.t11=t.sent,t.t10.push.call(t.t10,t.t11),yc.push(i),vc=!0;case 53:return t.abrupt("return",i);case 56:return t.prev=56,t.t12=t.catch(0),yc.push(!1),vc=!0,t.abrupt("return",!1);case 61:case"end":return t.stop()}}),t,null,[[0,56]])})));return function(){return t.apply(this,arguments)}}(),Ec=function(){var t=Ol()(Il.a.mark((function t(){return Il.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch(ajaxurl,{method:"post",body:bc("action","astra-sites-update-library-complete")}).then((function(t){return t.json()}));case 3:if(!0!==t.sent.success){t.next=6;break}return t.abrupt("return",!0);case 6:return t.abrupt("return",!1);case 9:return t.prev=9,t.t0=t.catch(0),t.abrupt("return",!1);case 12:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(){return t.apply(this,arguments)}}(),kc=function(){var t=Ol()(Il.a.mark((function t(){return Il.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch(ajaxurl,{method:"post",body:bc("action","astra-sites-import-page-builders")}).then((function(t){return t.json()}));case 3:if(!0!==t.sent.success){t.next=6;break}return t.abrupt("return",!0);case 6:return t.abrupt("return",!1);case 9:return t.prev=9,t.t0=t.catch(0),t.abrupt("return",!1);case 12:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(){return t.apply(this,arguments)}}(),Cc=function(){var t=Ol()(Il.a.mark((function t(){var e,r,n,i,a;return Il.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch(ajaxurl,{method:"post",body:bc("action","astra-sites-get-blocks-request-count")}).then((function(t){return t.json()})).then((function(t){return t.data}));case 3:if(!(e=t.sent)){t.next=11;break}for(r=[],n=1;n<=e;n++)(i=new FormData).append("action","astra-sites-import-blocks"),i.append("page_no",n),r.push(fetch(ajaxurl,{method:"post",body:i}));return t.next=9,Promise.allSettled(r).then((function(t){return Promise.all(t.map((function(t){return t.value.json()})))}));case 9:return a=t.sent,t.abrupt("return",a.every((function(t){return!0===t.success})));case 11:t.next=16;break;case 13:return t.prev=13,t.t0=t.catch(0),t.abrupt("return",!1);case 16:case"end":return t.stop()}}),t,null,[[0,13]])})));return function(){return t.apply(this,arguments)}}(),Ac=function(){var t=Ol()(Il.a.mark((function t(){return Il.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch(ajaxurl,{method:"post",body:bc("action","astra-sites-import-page-builders")}).then((function(t){return t.json()}));case 3:if(!0!==t.sent.success){t.next=6;break}return t.abrupt("return",!0);case 6:return t.abrupt("return",!1);case 9:return t.prev=9,t.t0=t.catch(0),t.abrupt("return",!1);case 12:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(){return t.apply(this,arguments)}}(),Sc=function(){var t=Ol()(Il.a.mark((function t(){return Il.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch(ajaxurl,{method:"post",body:bc("action","astra-sites-import-all-categories")}).then((function(t){return t.json()}));case 3:if(!0!==t.sent.success){t.next=6;break}return t.abrupt("return",!0);case 6:return t.abrupt("return",!1);case 9:return t.prev=9,t.t0=t.catch(0),t.abrupt("return",!1);case 12:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(){return t.apply(this,arguments)}}(),wc=function(){var t=Ol()(Il.a.mark((function t(){return Il.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch(ajaxurl,{method:"post",body:bc("action","astra-sites-import-all-categories-and-tags")}).then((function(t){return t.json()}));case 3:if(!0!==t.sent.success){t.next=6;break}return t.abrupt("return",!0);case 6:return t.abrupt("return",!1);case 9:return t.prev=9,t.t0=t.catch(0),t.abrupt("return",!1);case 12:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(){return t.apply(this,arguments)}}(),Pc=function(){var t=Ol()(Il.a.mark((function t(){var e,r,n,i,a;return Il.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,gc({action:"astra-sites-get-sites-request-count",_ajax_nonce:starterTemplates.nonce});case 3:if(!(e=t.sent)){t.next=11;break}for(r=[],n=1;n<=e;n++)(i=new FormData).append("action","astra-sites-import-sites"),i.append("page_no",n),r.push(fetch(ajaxurl,{method:"post",body:i}));return t.next=9,Promise.allSettled(r).then((function(t){return Promise.all(t.map((function(t){return t.value.json()})))})).then((function(t){var e,r={},n=dc(t);try{for(n.s();!(e=n.n()).done;){var i=e.value;"object"===pc()(i.data)&&(r=fc(fc({},r),i.data))}}catch(t){n.e(t)}finally{n.f()}return r}));case 9:return a=t.sent,t.abrupt("return",a);case 11:return t.abrupt("return",null);case 14:return t.prev=14,t.t0=t.catch(0),t.abrupt("return",null);case 17:case"end":return t.stop()}}),t,null,[[0,14]])})));return function(){return t.apply(this,arguments)}}(),Oc=(r(78),function(){var t=Object(h.useState)(!1),e=b()(t,2),r=e[0],n=e[1],i=function(){if(yc&&vc){var t=yc.every(Boolean);return yc=[],vc=!1,t}}(),a=function(){var t=Ol()(Il.a.mark((function t(e){return Il.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.stopPropagation(),!r){t.next=3;break}return t.abrupt("return");case 3:return n(!0),t.next=6,xc();case 6:n(!1);case 7:case"end":return t.stop()}}),t)})));return function(_x){return t.apply(this,arguments)}}();return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"st-sync-library ".concat(r?"loading":""),onClick:a},Object(c.createElement)(Tl,{content:Object(x.__)("Sync Library","astra-sites")},E.sync)),!r&&!0===i&&Object(c.createElement)(Nl,{type:"success",message:Object(x.__)("Library refreshed successfully","astra-sites"),autoHideDuration:5,bottomRight:!0}),!r&&!1===i&&Object(c.createElement)(Nl,{type:"error",message:Object(x.__)("Library refreshed failed!","astra-sites"),autoHideDuration:5,bottomRight:!0}))}),jc=(r(79),function(){var t=C(),e=b()(t,2),r=e[0],n=r.selectedTemplateName,i=r.currentIndex,a=e[1];return Object(c.createElement)("div",{className:"change-template-wrap"},Object(c.createElement)("div",{className:"template-name"},Object(c.createElement)("p",{className:"label"},Object(x.__)("Selected Template:","astra-sites")),Object(c.createElement)("h5",null,Object(ia.decodeEntities)(n))),Object(c.createElement)("div",{className:"change-btn-wrap",onClick:function(){a({type:"set",currentIndex:i-1,currentCustomizeIndex:0})}},Object(c.createElement)("span",{className:"change-btn"},E.cross)))}),Ic=r(18),_c=r.n(Ic),Tc=starterTemplates.restNonce,Fc=r(32),Mc=r(33),Dc=r(20);function Rc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Bc(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Rc(Object(r),!0).forEach((function(e){m()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Rc(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}r(80);var Vc=function(){var t=C(),e=b()(t,2),r=e[0],n=r.siteLogo,i=r.builder,a=r.currentCustomizeIndex,s=r.currentIndex,o=e[1];Object(Fc.addFilter)("editor.MediaUpload","core/edit-post/components/media-upload/replace-media-upload",(function(){return Dc.MediaUpload}));var l=function(t){o({type:"set",siteLogo:t}),Q({param:"siteLogo",data:t})},h=function(){l(Qh.siteLogo)},p=function(t){var e=Bc(Bc({},n),{},{width:t});o({type:"set",siteLogo:e}),Q({param:"siteLogo",data:e})},u=function(){o("beaver-builder"===i||"brizy"===i?{type:"set",currentCustomizeIndex:a+2}:{type:"set",currentCustomizeIndex:a+1})},f=function(){o({type:"set",currentIndex:s-1,currentCustomizeIndex:0})},d=function(t){n.url&&(t.stopPropagation(),p(Qh.siteLogo.width))};return Object(c.createElement)(Dc.MediaUpload,{onSelect:function(t){return function(t){var e,r,i,a={id:t.id,url:t.url,width:n.width};"http:"===window.location.protocol?(e=t.url,r=function(t){a.dataUri=t,l(a)},(i=new Image).onload=function(){var t=document.createElement("canvas");t.width=this.naturalWidth,t.height=this.naturalHeight,t.getContext("2d").drawImage(this,0,0),r(t.toDataURL("image/png"))},i.src=e):l(a)}(t)},allowedTypes:["image"],value:n.id,render:function(t){var e=t.open;return Object(c.createElement)(c.Fragment,null,""!==n.url&&void 0!==n.url?Object(c.createElement)("div",{className:"ist-logo-wrapper"},Object(c.createElement)("div",{className:"ist-remove-logo",onClick:h,title:Object(x.__)("Remove Logo","astra-sites")},Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"8",height:"8",viewBox:"0 0 8 8",fill:"#333333"},Object(c.createElement)("path",{d:"M8 0.7L7.3 0L4 3.3L0.7 0L0 0.7L3.3 4L0 7.3L0.7 8L4 4.7L7.3 8L8 7.3L4.7 4L8 0.7Z",fill:"#333333"}))),Object(c.createElement)("div",{className:"ist-selected-image",onClick:e},Object(c.createElement)("div",{onClick:e,className:"ist-logo-preview-wrap"},Object(c.createElement)("img",{alt:Object(x.__)("Site Logo","astra-sites"),src:n.url}),Object(c.createElement)("div",{className:"ist-change-logo",onClick:e},Object(x.__)("Change Logo","astra-sites"))))):"",""===n.url?Object(c.createElement)("div",null,Object(c.createElement)(R,{className:"ist-button ist-button-outline",onClick:e},Object(c.createElement)("h5",null,Object(x.__)("Upload File Here","astra-sites")),Object(c.createElement)("p",null,Object(x.__)("Suggested Dimensions: 180x60 pixels","astra-sites")))):"",""===n.url&&Object(c.createElement)("div",{className:"logo-skip-info"},Object(c.createElement)("h5",null,Object(x.__)("Don't have Logo? No Problem!","astra-sites")),Object(c.createElement)("p",null,Object(x.__)("You can upload it later","astra-sites"))),Object(c.createElement)("div",{className:"astra-sites-ai-logo-wrap"},Object(c.createElement)("div",{className:"label"},Object(x.__)("Logo Width","astra-sitess")),Object(c.createElement)("div",{className:"control-reset ".concat(n.width===Qh.siteLogo.width?"disabled":""),onClick:d},E.reset)),Object(c.createElement)("div",{className:"astra-sites-ai-rangecontrol-wrap"},Object(c.createElement)(Mc.RangeControl,{value:n.width,min:0,max:500,step:1,onChange:function(t){p(t)},trackColor:"#4361ee",disabled:""===n.url})),Object(c.createElement)(R,{className:"ist-button",onClick:u,after:!0},""!==n.url?Object(x.__)("Continue","astra-sites"):Object(x.__)("Skip & Continue","astra-sites")),Object(c.createElement)(V,{onClick:f},Object(x.__)("Back","astra-sites")))}})},Lc=[{slug:"style-1",title:Object(x.__)("Style 1","astra-sites"),colors:["#8E43F0","#7215EA","#FFFFFF","#FAF5FF","#726C7A","#3C2F4B","#000000","#4B4F58","#F6F7F8"]},{slug:"style-2",title:Object(x.__)("Style 2","astra-sites"),colors:["#FFB72B","#FF9900","#FFFFFF","#F9F5EE","#6D6A64","#3A362D","#000000","#4B4F58","#F6F7F8"]},{slug:"style-3",title:Object(x.__)("Style 3","astra-sites"),colors:["#FF2459","#D90336","#FFFFFF","#FAF4F6","#6B6365","#352A2D","#000000","#4B4F58","#F6F7F8"]},{slug:"style-4",title:Object(x.__)("Style 4","astra-sites"),colors:["#2B60E8","#0A43D7","#FFFFFF","#F7F7FA","#64666C","#2E323E","#000000","#4B4F58","#F6F7F8"]},{slug:"style-5",title:Object(x.__)("Style 5","astra-sites"),colors:["#1BAE70","#008D52","#FFFFFF","#F3FAF7","#5C6461","#26312C","#000000","#4B4F58","#F6F7F8"]},{slug:"style-6",title:Object(x.__)("Style 6","astra-sites"),colors:["#FF8F3F","#EC6300","#FFFFFF","#F9F6F4","#66625F","#37302A","#000000","#4B4F58","#F6F7F8"]}],Nc=[{slug:"style-1",title:Object(x.__)("Style 1","astra-sites"),colors:["#8E43F0","#7215EA","#3C2F4B","#726C7A","#FAF5FF","#FFFFFF","#000000","#4B4F58","#F6F7F8"]},{slug:"style-2",title:Object(x.__)("Style 2","astra-sites"),colors:["#FFB72B","#FF9900","#3A362D","#6D6A64","#F9F5EE","#FFFFFF","#000000","#4B4F58","#F6F7F8"]},{slug:"style-3",title:Object(x.__)("Style 3","astra-sites"),colors:["#FF2459","#D90336","#352A2D","#6B6365","#FAF4F6","#FFFFFF","#000000","#4B4F58","#F6F7F8"]},{slug:"style-4",title:Object(x.__)("Style 4","astra-sites"),colors:["#2B60E8","#0A43D7","#2E323E","#64666C","#F7F7FA","#FFFFFF","#000000","#4B4F58","#F6F7F8"]},{slug:"style-5",title:Object(x.__)("Style 5","astra-sites"),colors:["#1BAE70","#008D52","#26312C","#5C6461","#F3FAF7","#FFFFFF","#000000","#4B4F58","#F6F7F8"]},{slug:"style-6",title:Object(x.__)("Style 6","astra-sites"),colors:["#FF8F3F","#EC6300","#37302A","#66625F","#F9F6F4","#FFFFFF","#000000","#4B4F58","#F6F7F8"]}];function zc(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Gc=function(t,e){if(!t)return"";if(t){var r=t.match(/'([^']+)'/);return r?r[1]:"inherit"===t?e:t}return e||void 0},Hc=[{"body-font-family":"'Open Sans', sans-serif","body-font-variant":"400","body-font-weight":"400","font-size-body":{desktop:16,tablet:"",mobile:"","desktop-unit":"px","tablet-unit":"px","mobile-unit":"px"},"body-line-height":"1.7","headings-font-family":"'Playfair Display', serif","headings-font-weight":"700","headings-line-height":"1.2","headings-font-variant":"700"},{"body-font-family":"'Lora', serif","body-font-variant":"400","body-font-weight":"400","font-size-body":{desktop:16,tablet:"",mobile:"","desktop-unit":"px","tablet-unit":"px","mobile-unit":"px"},"body-line-height":"","headings-font-family":"'Lato', sans-serif","headings-font-weight":"700","headings-line-height":"1.2","headings-font-variant":"700"},{"body-font-family":"'Roboto', sans-serif","body-font-variant":"400","body-font-weight":"400","font-size-body":{desktop:17,tablet:"",mobile:"","desktop-unit":"px","tablet-unit":"px","mobile-unit":"px"},"body-line-height":"","headings-font-family":"'Barlow Condensed', sans-serif","headings-font-weight":"600","headings-line-height":"1.2","headings-font-variant":"600"},{"body-font-family":"'Source Sans Pro', sans-serif","body-font-variant":"400","body-font-weight":"400","font-size-body":{desktop:17,tablet:"",mobile:"","desktop-unit":"px","tablet-unit":"px","mobile-unit":"px"},"body-line-height":1.7,"headings-font-family":"'Montserrat', sans-serif","headings-font-weight":"700","headings-line-height":"1.3","headings-font-variant":"700"},{"body-font-family":"'Karla', sans-serif","body-font-variant":"400","body-font-weight":"400","font-size-body":{desktop:17,tablet:"",mobile:"","desktop-unit":"px","tablet-unit":"px","mobile-unit":"px"},"body-line-height":"","headings-font-family":"'Rubik', sans-serif","headings-font-weight":"500","headings-line-height":"1.3","headings-font-variant":"500"},{"body-font-family":"'Work Sans', sans-serif","body-font-variant":"400","body-font-weight":"400","font-size-body":{desktop:16,tablet:"",mobile:"","desktop-unit":"px","tablet-unit":"px","mobile-unit":"px"},"body-line-height":"","headings-font-family":"'DM Serif Display', serif","headings-font-weight":"400","headings-line-height":"1.2","headings-font-variant":"400"}],Qc=[{content:function(){var t=C(),e=b()(t,2),r=e[0],n=r.licenseStatus,i=r.selectedTemplateType,a=e[1];return Object(h.useEffect)((function(){a({type:"set",designStep:1})}),[]),Object(c.createElement)(c.Fragment,null,Object(c.createElement)(jc,null),Object(c.createElement)("div",{className:"customizer-header"},Object(c.createElement)("div",{className:"header-name"},!n&&"free"!==i&&Object(c.createElement)("p",{className:"premium-notice"},Object(x.__)("This is a Premium Template","astra-sites")),Object(c.createElement)("h3",{className:"ist-customizer-heading"},Object(x.__)("Logo","astra-sites")),Object(c.createElement)("p",{className:"screen-description"},Object(x.__)("Choose logo for your site. You can update it anytime later.","astra-sites")))))},controls:function(){return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Vc,null))},class:"customize-business-logo"},{content:function(){var t=C(),e=b()(t,2),r=e[0],n=r.licenseStatus,i=r.selectedTemplateType,a=e[1];return Object(h.useEffect)((function(){a({type:"set",designStep:2})}),[]),Object(c.createElement)(c.Fragment,null,Object(c.createElement)(jc,null),Object(c.createElement)("div",{className:"customizer-header"},Object(c.createElement)("div",{className:"header-name"},!n&&"free"!==i&&Object(c.createElement)("p",{className:"premium-notice"},Object(x.__)("This is a Premium Template","astra-sites")),Object(c.createElement)("h3",{className:"ist-customizer-heading"},Object(x.__)("Colors","astra-sites")),Object(c.createElement)("p",{className:"screen-description"},Object(x.__)("Choose colors for your site. You can update them anytime later.","astra-sites")))))},controls:function(){var t=C(),e=b()(t,2),r=e[0],n=r.activePaletteSlug,i=r.templateResponse,a=r.currentCustomizeIndex,s=e[1],o=Object(h.useState)([]),l=b()(o,2),p=l[0],u=l[1],f=Object(h.useState)(Nc),d=b()(f,2),m=d[0],g=d[1],y=function(t,e){e&&(s({type:"set",activePaletteSlug:e.slug,activePalette:e}),Q({param:"colorPalette",data:e}))};return Object(h.useEffect)((function(){var t=function(t){var e=[];if(t&&"astra-site-customizer-data"in t){var r=t["astra-site-customizer-data"]||"";if(r){var n=r["astra-settings"]["global-color-palette"].palette||[];n&&(e=[{slug:"default",title:Object(x.__)("Default","astra-sites"),colors:n}])}}return e}(i);u(t);var e="light"===function(t){var e="light";return t&&"astra-site-color-scheme"in t&&""!==t["astra-site-color-scheme"]&&(e=t["astra-site-color-scheme"]),e}(i)?Nc:Lc;g(e)}),[i]),Object(c.createElement)(c.Fragment,null,p?Object(c.createElement)(c.Fragment,null,Object(c.createElement)(B,{selected:n,options:p,onChange:function(t,e){y(0,e)},tabIndex:"0"})):"",Object(c.createElement)("h4",{className:"ist-secondary-heading"},Object(x.__)("You can also try:","astra-sites")),Object(c.createElement)(B,{selected:n,options:m,onChange:function(t,e){y(0,e)},tabIndex:"0"}),Object(c.createElement)(R,{className:"ist-button",onClick:function(){s({type:"set",currentCustomizeIndex:a+1})},after:!0},Object(x.__)("Continue","astra-sites")),Object(c.createElement)(V,{customizeStep:!0,onClick:function(){s({type:"set",currentCustomizeIndex:a-1})}},Object(x.__)("Back","astra-sites")))},actions:null,class:"customize-site-colors"},{content:function(){var t=C(),e=b()(t,2),r=e[0],n=r.licenseStatus,i=r.selectedTemplateType,a=e[1];return Object(h.useEffect)((function(){a({type:"set",designStep:3})}),[]),Object(c.createElement)(c.Fragment,null,Object(c.createElement)(jc,null),Object(c.createElement)("div",{className:"customizer-header"},Object(c.createElement)("div",{className:"header-name"},!n&&"free"!==i&&Object(c.createElement)("p",{className:"premium-notice"},Object(x.__)("This is a Premium Template","astra-sites")),Object(c.createElement)("h3",{className:"ist-customizer-heading"},Object(x.__)("Fonts","astra-sites")),Object(c.createElement)("p",{className:"screen-description"},Object(x.__)("Choose fonts for your site. You can update them anytime later.","astra-sites")))))},controls:function(){var t=C(),e=b()(t,2),r=e[0],n=r.typographyIndex,i=r.typography,a=r.templateResponse,s=e[1],o=Object(h.useState)(Hc),l=b()(o,2),p=l[0],u=l[1];return Object(h.useEffect)((function(){if(null!==a){var t=[],e=function(t){var e={};if(t&&"astra-site-customizer-data"in t){var r=t["astra-site-customizer-data"]||"";if(r){var n=r["astra-settings"]||[],i=n["headings-font-family"];e={default:!0,"body-font-family":n["body-font-family"],"body-font-variant":n["body-font-variant"],"body-font-weight":n["body-font-weight"],"font-size-body":n["font-size-body"],"body-line-height":n["body-line-height"],"headings-font-family":i,"headings-font-weight":n["headings-font-weight"],"headings-line-height":n["headings-line-height"],"headings-font-variant":n["headings-font-variant"]}}}return e}(a);if(t.push(e),!document.getElementById("google-fonts-domain")){var r=document.createElement("link");r.id="google-fonts-domain",r.setAttribute("rel","preconnect"),r.setAttribute("href","https://fonts.gstatic.com"),document.head.appendChild(r)}if(!document.getElementById("google-fonts-url")){var i=document.createElement("link");i.id="google-fonts-url",i.setAttribute("rel","stylesheet");var o=[],l=e["body-font-family"]||"",c=parseInt(e["body-font-weight"])||"";c&&(c=":wght@".concat(c)),l&&(l=(l=Gc(l)).replace(" ","+"),o.push("family=".concat(l).concat(c)));var h=e["headings-font-family"]||"",f=parseInt(e["headings-font-weight"])||"";f&&(f=":wght@".concat(f)),h&&(h=(h=Gc(h,l)).replace(" ","+"),o.push("family=".concat(h).concat(f)));var d="";if(p){var m,g=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return zc(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zc(t,void 0):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){o=!0,a=t},f:function(){try{s||null==r.return||r.return()}finally{if(o)throw a}}}}(p);try{for(g.s();!(m=g.n()).done;){var y=m.value,v=Gc(y["headings-font-family"]).replaceAll(" ","+"),b=y["headings-font-weight"],x=Gc(y["body-font-family"]).replaceAll(" ","+"),E=y["body-font-weight"];d+="&family=".concat(v,":wght@").concat(b,"&family=").concat(x,":wght@").concat(E)}}catch(t){g.e(t)}finally{g.f()}d=d.replace(/[&]{1}$/i,"")}if(o){var k="https://fonts.googleapis.com/css2?".concat(o.join("&")).concat(d,"&display=swap");i.setAttribute("href",k),document.head.appendChild(i)}}0===n&&s({type:"set",typography:e}),p=t.concat(p),u(p)}}),[a]),Object(h.useEffect)((function(){Q({param:"siteTypography",data:JSON.parse(JSON.stringify(i))})}),[i]),Object(c.createElement)(c.Fragment,null,Object(c.createElement)(G,{selected:n,options:p,onSelect:function(t,e){s({type:"set",typographyIndex:e,typography:p[e]||p[0]})}}))},actions:null,class:"customize-site-typography"},{content:function(){var t=C(),e=b()(t,2),r=e[0].builder,n=e[1];Object(h.useEffect)((function(){n({type:"set",designStep:1})}),[]);var i=Object(x.__)("This is a premium template and comes with our Essentials and Growth Bundle. <br/><br/> Get access to this premium template and 100+ more.","astra-sites");return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(jc,null),Object(c.createElement)("div",{className:"customizer-header"},Object(c.createElement)("div",{className:"header-name"},Object(c.createElement)("h3",{className:"ist-customizer-heading"},Object(x.__)("Liked this Starter Template?","astra-sites")),Object(c.createElement)("p",{className:"screen-description",dangerouslySetInnerHTML:{__html:i}}),Object(c.createElement)(R,{className:"st-access-btn",onClick:function(){window.open(astraSitesVars.cta_links[r])}},Object(x.__)("Unlock Access","astra-sites"),Object(c.createElement)("img",{className:"st-get-access",alt:"Get Access",src:"".concat(starterTemplates.imageDir,"get-access.svg")})))))},controls:function(){var t=C(),e=b()(t,2),r=e[0],n=(r.templateResponse,r.currentCustomizeIndex),i=r.importError,a=r.currentIndex,s=r.validateLicenseStatus,o=e[1],l=Object(h.useState)(""),p=b()(l,2),u=p[0],f=p[1],d=Object(h.useState)(!1),m=b()(d,2),g=m[0],y=m[1],v=Object(h.useState)(""),k=b()(v,2),A=k[0],S=k[1];Object(h.useEffect)((function(){i&&o({type:"set",currentIndex:a+2})}),[i]);var w=g?"processing":"",P=Object(x.sprintf)(//translators: %1$s Support page URL.
|
6 |
Object(x.__)("<b> Questions? </b> Get in touch with our %1$ssupport team%2$s.","astra-sites"),'<a href="https://wpastra.com/support/free-support/" target="_blank">',"</a>"),O=Object(x.sprintf)(//translators: %1$s Store page URL.
|
7 |
+
Object(x.__)("If you have purchased our Essential or Growth Bundle, please install the premium version of the plugin that you can %1$sdownload.%2$s from our store.","astra-sites"),'<a href="https://store.brainstormforce.com/login/" target="_blank">',"</a>");return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("h4",null,Object(x.__)("Already a customer?","astra-sites")),s&&Object(c.createElement)("p",{className:"customer-notices"},Object(x.__)("If you have purchased our Essential or Growth Bundle, just enter your license key below to import this template.","astra-sites")),!s&&Object(c.createElement)(c.Fragment,null,Object(c.createElement)("p",{className:"customer-notices",dangerouslySetInnerHTML:{__html:O}}),Object(c.createElement)("p",{className:"customer-notices"},Object(x.__)("Currently the free version is installed.","astra-sites"))),Object(c.createElement)("p",{className:"support-link",dangerouslySetInnerHTML:{__html:P}}),s&&Object(c.createElement)("div",{className:"license-wrap"},Object(c.createElement)("input",{type:"text",className:"license-key-input",name:"license-key",placeholder:Object(x.__)("License key","astra-sites"),required:!0,onChange:function(t){S(t.target.value),f("")}}),Object(c.createElement)(R,{className:"validate-btn ".concat(w),onClick:function(){""!==A?(y(!0),_c.a.use(_c.a.createNonceMiddleware(Tc)),_c()({path:"/bsf-core/v1/license/activate",method:"POST",data:{"license-key":A,"product-id":"astra-pro-sites"}}).then((function(t){t.success?o({type:"set",licenseStatus:!0,currentIndex:a+1}):f(t.message),y(!1)}))):f(Object(x.__)("Please Enter License Key","astra-sites"))}},E.arrowRightBold)),Object(c.createElement)(V,{onClick:function(){o({type:"set",currentCustomizeIndex:n-1})},customizeStep:!0},Object(x.__)("Back","astra-sites")),u&&!g&&Object(c.createElement)(Nl,{type:"error",message:u,autoHideDuration:5}))},actions:null,class:"customize-license-validation"}],Wc=r(34),Xc=r.n(Wc),qc=r(21),Jc=r.n(qc),Yc=r(22),Kc=r.n(Yc);function Uc(){return(Uc=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Zc(t,e){return t(e={exports:{}},e.exports),e.exports}var $c="function"==typeof Symbol&&Symbol.for,th=$c?Symbol.for("react.element"):60103,eh=$c?Symbol.for("react.portal"):60106,rh=$c?Symbol.for("react.fragment"):60107,nh=$c?Symbol.for("react.strict_mode"):60108,ih=$c?Symbol.for("react.profiler"):60114,ah=$c?Symbol.for("react.provider"):60109,sh=$c?Symbol.for("react.context"):60110,oh=$c?Symbol.for("react.async_mode"):60111,lh=$c?Symbol.for("react.concurrent_mode"):60111,ch=$c?Symbol.for("react.forward_ref"):60112,hh=$c?Symbol.for("react.suspense"):60113,ph=$c?Symbol.for("react.suspense_list"):60120,uh=$c?Symbol.for("react.memo"):60115,fh=$c?Symbol.for("react.lazy"):60116,dh=$c?Symbol.for("react.block"):60121,mh=$c?Symbol.for("react.fundamental"):60117,gh=$c?Symbol.for("react.responder"):60118,yh=$c?Symbol.for("react.scope"):60119;function vh(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case th:switch(t=t.type){case oh:case lh:case rh:case ih:case nh:case hh:return t;default:switch(t=t&&t.$$typeof){case sh:case ch:case fh:case uh:case ah:return t;default:return e}}case eh:return e}}}function bh(t){return vh(t)===lh}var xh={AsyncMode:oh,ConcurrentMode:lh,ContextConsumer:sh,ContextProvider:ah,Element:th,ForwardRef:ch,Fragment:rh,Lazy:fh,Memo:uh,Portal:eh,Profiler:ih,StrictMode:nh,Suspense:hh,isAsyncMode:function(t){return bh(t)||vh(t)===oh},isConcurrentMode:bh,isContextConsumer:function(t){return vh(t)===sh},isContextProvider:function(t){return vh(t)===ah},isElement:function(t){return"object"==typeof t&&null!==t&&t.$$typeof===th},isForwardRef:function(t){return vh(t)===ch},isFragment:function(t){return vh(t)===rh},isLazy:function(t){return vh(t)===fh},isMemo:function(t){return vh(t)===uh},isPortal:function(t){return vh(t)===eh},isProfiler:function(t){return vh(t)===ih},isStrictMode:function(t){return vh(t)===nh},isSuspense:function(t){return vh(t)===hh},isValidElementType:function(t){return"string"==typeof t||"function"==typeof t||t===rh||t===lh||t===ih||t===nh||t===hh||t===ph||"object"==typeof t&&null!==t&&(t.$$typeof===fh||t.$$typeof===uh||t.$$typeof===ah||t.$$typeof===sh||t.$$typeof===ch||t.$$typeof===mh||t.$$typeof===gh||t.$$typeof===yh||t.$$typeof===dh)},typeOf:vh};Zc((function(t,e){})),Zc((function(t){t.exports=xh})),Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;(function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}})()&&Object.assign;function Eh(){}function kh(){}Function.call.bind(Object.prototype.hasOwnProperty),kh.resetWarningCache=Eh;var Ch,Ah,Sh=Zc((function(t){t.exports=function(){function t(t,e,r,n,i,a){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==a){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function e(){return t}t.isRequired=t;var r={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:kh,resetWarningCache:Eh};return r.PropTypes=r,r}()})),wh=(Ch=Xc.a,(Ah=Object(h.memo)((function(t){var e=t.animationData,r=t.path,n=t.play,i=t.speed,a=t.direction,s=t.segments,o=t.goTo,l=t.renderer,c=t.loop,u=t.rendererSettings,f=t.audioFactory,d=t.onLoad,m=t.onComplete,g=t.onLoopComplete,y=t.onEnterFrame,v=t.onSegmentStart,b=function(t,e){if(null==t)return{};var r,n,i={},a=Object.keys(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||(i[r]=t[r]);return i}(t,["animationData","path","play","speed","direction","segments","goTo","renderer","loop","rendererSettings","audioFactory","onLoad","onComplete","onLoopComplete","onEnterFrame","onSegmentStart"]),x=Object(h.useRef)(),E=Object(h.useRef)(),k=Object(h.useState)(!1),C=k[0],A=k[1],S=Object(h.useState)(s),w=S[0],P=S[1];Object(h.useEffect)((function(){Jc()(w,s)||P(s)}),[s,w]);var O=Object(h.useState)(u),j=O[0],I=O[1];Object(h.useEffect)((function(){Jc()(j,u)||I(u)}),[u,j]),Object(h.useEffect)((function(){return function(){return E.current.removeEventListener("complete",m)}}),[m]),Object(h.useEffect)((function(){return function(){return E.current.removeEventListener("loopComplete",g)}}),[g]),Object(h.useEffect)((function(){return function(){return E.current.removeEventListener("enterFrame",y)}}),[y]),Object(h.useEffect)((function(){return function(){return E.current.removeEventListener("segmentStart",v)}}),[v]),Object(h.useEffect)((function(){function t(){A(!0),d()}return E.current=Ch.loadAnimation({animationData:null==e||"object"!=typeof e?e:"object"==typeof e.default?Kc()(e.default):Kc()(e),path:r,container:x.current,renderer:l,loop:!1,autoplay:!1,rendererSettings:j,audioFactory:f}),E.current.addEventListener("DOMLoaded",t),function(){E.current.removeEventListener("DOMLoaded",t),A(!1),E.current.destroy(),E.current=void 0}}),[c,l,j,e,r,f]),Object(h.useEffect)((function(){E.current.addEventListener("complete",m)}),[m]),Object(h.useEffect)((function(){E.current.addEventListener("loopComplete",g)}),[g]),Object(h.useEffect)((function(){E.current.addEventListener("enterFrame",y)}),[y]),Object(h.useEffect)((function(){E.current.addEventListener("segmentStart",v)}),[v]),Object(h.useEffect)((function(){C&&(E.current.loop=c)}),[C,c]);var _=Object(h.useRef)(!1);return Object(h.useEffect)((function(){function t(t){E.current.goToAndPlay(t,!0),E.current.setDirection(a)}C&&(!0===n?w?(E.current.playSegments(w,!0),_.current=!0,-1===a&&t(w[1])):(_.current&&E.current.resetSegments(!0),_.current=!1,-1===a?t(E.current.getDuration(!0)):E.current.play()):!1===n&&E.current.pause())}),[n,w,C]),Object(h.useEffect)((function(){C&&(Number.isNaN(i)||E.current.setSpeed(i))}),[i,C]),Object(h.useEffect)((function(){C&&E.current.setDirection(a)}),[a,C]),Object(h.useEffect)((function(){C&&null!=o&&(n?E.current.goToAndPlay(o,!0):E.current.goToAndStop(o,!0))}),[o,n,C]),p.a.createElement("div",Uc({},b,{ref:x}))}))).propTypes={animationData:Sh.object,path:Sh.string,play:Sh.bool,goTo:Sh.number,speed:Sh.number,direction:Sh.number,loop:Sh.oneOfType([Sh.number,Sh.bool]),segments:Sh.oneOfType([Sh.arrayOf(Sh.number),Sh.bool]),rendererSettings:Sh.object,renderer:Sh.string,audioFactory:Sh.func,onComplete:Sh.func,onLoopComplete:Sh.func,onEnterFrame:Sh.func,onSegmentStart:Sh.func},Ah.defaultProps={animationData:null,path:null,play:null,segments:null,goTo:null,speed:1,direction:1,loop:!0,rendererSettings:{},renderer:"svg",audioFactory:null,onLoad:function(){},onComplete:function(){},onLoopComplete:function(){},onEnterFrame:function(){},onSegmentStart:function(){}},Ah),Ph=function(){var t=C(),e=b()(t,1)[0],r=e.importPercent,n=e.importStatus,i=100===r?"import-done":"",a="",s="";return r<=25&&(a="import-1",s=Object(x.__)("1. Installing required theme, plugins, forms, etc","astra-sites")),r>25&&r<=50&&(a="import-2",s=Object(x.__)("2. Importing pages, menus, posts, etc","astra-sites")),r>50&&r<=75&&(a="import-3",s=Object(x.__)("3. Setting up customizer settings and ther site settings","astra-sites")),r>75&&r<=100&&(a="import-4",s=Object(x.__)("4. Finalizing last few settings","astra-sites")),Object(c.createElement)("div",{className:"ist-import-progress"},Object(c.createElement)("div",{className:"ist-import-progress-info"},Object(c.createElement)("div",{className:"ist-import-progress-info-text"},100!==r&&s,100===r&&Object(c.createElement)(c.Fragment,null,Object(x.__)("Done ","astra-sites"),E.tada)),Object(c.createElement)("div",{className:"ist-import-progress-info-precent"},r,"%")),Object(c.createElement)("div",{className:"ist-import-progress-bar-wrap"},Object(c.createElement)("div",{className:"ist-import-progress-bar-bg"},Object(c.createElement)("div",{className:"ist-import-progress-bar ".concat(i," ").concat(a)})),Object(c.createElement)("div",{className:"import-progress-gap"},Object(c.createElement)("span",null),Object(c.createElement)("span",null),Object(c.createElement)("span",null))),Object(c.createElement)("div",{className:"ist-import-progress-info"},Object(c.createElement)("div",{className:"ist-import-progress-info-text"},100!==r&&Object(c.createElement)("p",null,n+Object(ia.decodeEntities)(" ")),100===r&&Object(c.createElement)("p",null,Object(x.__)("Redirecting you in ","astra-sites"),Object(c.createElement)("span",{id:"redirect-counter"},Object(x.__)("3 seconds…","astra-sites"))))))},Oh=(r(82),function(){var t=C(),e=b()(t,2),r=e[0],n=r.importErrorMessages,i=r.importPercent,a=r.currentIndex,s=r.tryAgainCount,o=r.templateId,l=e[1],h="https://wpastra.com/starter-templates-support/?ip="+starterTemplates.clientIP+"&template-id="+o+"&subject="+n.errorText,p="";return i<=25&&(p="import-1"),i>25&&i<=50&&(p="import-2"),i>50&&i<=75&&(p="import-3"),i>75&&i<=100&&(p="import-4"),Object(c.createElement)("div",{className:"ist-import-error"},Object(c.createElement)("div",{className:"ist-import-progress-info"},Object(c.createElement)("div",{className:"ist-import-progress-info-text label-text"},Object(x.__)("Error Occured!","astra-sites")),Object(c.createElement)("div",{className:"ist-import-progress-info-precent"},i,"%")),Object(c.createElement)("div",{className:"ist-import-progress-bar-wrap"},Object(c.createElement)("div",{className:"ist-import-progress-bar-bg"},Object(c.createElement)("div",{className:"ist-import-progress-bar ".concat(p)})),Object(c.createElement)("div",{className:"import-progress-gap"},Object(c.createElement)("span",null),Object(c.createElement)("span",null),Object(c.createElement)("span",null))),Object(c.createElement)("div",{className:"ist-import-error-wrap ist-import-error-primary-wrap"},n.primaryText&&Object(c.createElement)("p",{className:"website-import-subtitle"},n.primaryText)),Object(c.createElement)("div",{className:"ist-import-error-box"},Object(c.createElement)("div",{className:"ist-import-error-wrap ist-import-error-secondary-wrap"},n.errorText&&"object"!==pc()(n.errorText)&&Object(c.createElement)("p",null,n.errorText),n.errorText&&"object"===pc()(n.errorText)&&Object(c.createElement)("div",null,Object(c.createElement)("pre",null,JSON.stringify(n.errorText,void 0,2))))),Object(c.createElement)("div",null,n.secondaryText&&Object(c.createElement)("p",{dangerouslySetInnerHTML:{__html:n.secondaryText}}),n.solutionText&&Object(c.createElement)("p",{className:"ist-import-error-solution",dangerouslySetInnerHTML:{__html:n.solutionText}}),!n.solutionText&&!n.tryAgain||n.tryAgain&&s>1&&Object(c.createElement)("p",{className:"ist-import-error-solution"},Object(ia.decodeEntities)(Object(x.__)("Please report this error ","astra-sites")),Object(c.createElement)("a",{href:h,target:"_blank",rel:"noreferrer"},"here"),Object(ia.decodeEntities)(Object(x.__)(" so we can fix it.","astra-sites")))),n.tryAgain&&Object(c.createElement)(R,{className:"ist-button",after:!0,onClick:function(){l({type:"set",importErrorMessages:{},importErrorResponse:[],importError:!1,tryAgainCount:s+1,resetCustomizer:!1,resetSiteOptions:!1,resetContent:!1,resetWidgets:!1,resetDone:!1,resetData:[],importStart:!1,importEnd:!1,importPercent:0,requiredPluginsDone:!1,notInstalledList:[],notActivatedList:[],currentIndex:a-1})}},Object(x.__)("Try Importing Again","astra-sites")))}),jh=r(35),Ih={complete:{posts:0,media:0,users:0,comments:0,terms:0},updateDelta:function(t,e){this.complete[t]+=e;var r=this;requestAnimationFrame((function(){r.render()}))},updateProgress:function(t,e,r,n,i){"undefined"!==t&&"undefined"!=e+"/"+r&&((0===(r=parseInt(r))||isNaN(r))&&(r=1),parseInt(e)/r*100<=100&&"function"==typeof n&&(n({type:"set",importStatus:Object(x.__)("Importing Content…","astra-sites")}),n({type:"set",importPercent:i+=5})))},render:function(t,e){for(var r=Object.keys(this.complete),n=0,i=0,a=r.length-1;a>=0;a--){var s=r[a];this.updateProgress(s,this.complete[s],this.data.count[s],t,e),n+=this.complete[s],i+=this.data.count[s]}this.updateProgress("total",n,i,t,e)}},_h=(r(83),function(){var t=C(),e=b()(t,2),r=e[0],n=r.resetDone,i=r.importStart,a=r.importEnd,s=r.importPercent,o=r.templateResponse,l=r.reset,p=r.themeStatus,u=r.currentIndex,f=r.importError,d=r.resetCustomizer,m=r.resetSiteOptions,g=r.resetContent,y=r.resetWidgets,v=r.siteLogo,E=r.activePalette,k=r.typography,S=r.customizerImportFlag,w=r.widgetImportFlag,P=r.contentImportFlag,O=r.themeActivateFlag,j=r.requiredPluginsDone,I=r.requiredPlugins,_=r.notInstalledList,T=r.notActivatedList,F=e[1],M=Object(h.useState)(0),D=b()(M,2),R=D[0],B=D[1],L=s,N=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"";F({type:"set",importError:!0,importErrorMessages:{primaryText:t,secondaryText:e,errorCode:n,errorText:r,solutionText:i,tryAgain:!0}}),localStorage.removeItem("st-import-start"),localStorage.removeItem("st-import-end");var s=new FormData;s.append("action","report_error"),s.append("error",JSON.stringify({primaryText:t,secondaryText:e,errorCode:n,errorText:r,solutionText:i,tryAgain:!0,stack:a})),s.append("id",o.id),s.append("plugins",JSON.stringify(I)),fetch(ajaxurl,{method:"post",body:s})},z=function(){_.length<=0||(L+=2,F({type:"set",importStatus:Object(x.__)("Installing Required Plugins.","astra-sites"),importPercent:L}),_.forEach((function(t){wp.updates.queue.push({action:"install-plugin",data:{slug:t.slug,init:t.init,name:t.name,success:function(){F({type:"set",importStatus:Object(x.sprintf)(// translators: Plugin Name.
|
8 |
+
Object(x.__)("%1$s plugin installed successfully.","astra-sites"),t.name)});var e=T;e.push(t),F({type:"set",notActivatedList:e});var r=_;r.forEach((function(e,n){e.slug===t.slug&&r.splice(n,1)})),F({type:"set",notInstalledList:r})},error:function(t){N(Object(x.__)("Could not install the plugin list.","astra-sites"),"",t)}}})})),wp.updates.queueChecker())},G=function(){var t=encodeURI(o["astra-site-wpforms-path"])||"";if(""!==t){F({type:"set",importStatus:Object(x.__)("Importing forms.","astra-sites")});var e=new FormData;e.append("action","astra-sites-import-wpforms"),e.append("wpforms_url",t),e.append("_ajax_nonce",astraSitesVars._ajax_nonce),fetch(ajaxurl,{method:"post",body:e}).then((function(t){return t.json()})).then((function(t){if(!t.success)throw t.data;F({type:"set",importPercent:L+=2}),H()})).catch((function(t){N(Object(x.__)("Importing forms Failed.","astra-sites"),"",t)}))}else H()},H=function(){if(!S)return F({type:"set",importPercent:L+=5}),void Q();F({type:"set",importStatus:Object(x.__)("Importing forms.","astra-sites")});var t=new FormData;t.append("action","astra-sites-import-customizer-settings"),t.append("_ajax_nonce",astraSitesVars._ajax_nonce),fetch(ajaxurl,{method:"post",body:t}).then((function(t){return t.json()})).then((function(t){if(!t.success)throw t.data;F({type:"set",importPercent:L+=5}),Q()})).catch((function(t){N(Object(x.__)("Importing Customizer JSON Failed.","astra-sites"),"",t)}))},Q=function(){if(!P)return F({type:"set",importPercent:L+=20}),void W();F({type:"set",importStatus:Object(x.__)("Importing Site Content.","astra-sites")});var t=encodeURI(o["astra-site-wxr-path"])||"",e=new FormData;e.append("action","astra-sites-import-prepare-xml"),e.append("wxr_url",t),e.append("_ajax_nonce",astraSitesVars._ajax_nonce),fetch(ajaxurl,{method:"post",body:e}).then((function(t){return t.json()})).then((function(t){if(F({type:"set",importPercent:L+=2}),!1===t.success)throw t.data.error||t.data;Ih.data=t.data,Ih.render(F,L);var e=new EventSource(Ih.data.url);e.onmessage=function(t){var r=JSON.parse(t.data);switch(r.action){case"updateDelta":Ih.updateDelta(r.type,r.delta);break;case"complete":!1===r.error?(e.close(),W()):N(astraSitesVars.xml_import_interrupted_primary,"",astraSitesVars.xml_import_interrupted_error,"",astraSitesVars.xml_import_interrupted_secondary)}},e.onerror=function(){throw e.close(),Object(x.__)("Importing Site Content Failed. - Import Process Interrupted","astra-sites")},e.addEventListener("log",(function(t){var e=JSON.parse(t.data),r=e.message||"";r&&"info"===e.level&&(r=r.replace(/"/g,(function(){return""}))),F({type:"set",importStatus:Object(x.sprintf)(// translators: Response importMessage
|
9 |
+
Object(x.__)("Importing - %1$s","astra-sites"),r)})}))})).catch((function(t){N(Object(x.__)("Importing Site Content Failed.","astra-sites"),"",t)}))},W=function(){F({type:"set",importStatus:Object(x.__)("Importing Site Options.","astra-sites")});var t=new FormData;t.append("action","astra-sites-import-options"),t.append("_ajax_nonce",astraSitesVars._ajax_nonce),fetch(ajaxurl,{method:"post",body:t}).then((function(t){return t.json()})).then((function(t){if(!t.success)throw t.data;F({type:"set",importPercent:L+=5}),X()})).catch((function(t){N(Object(x.__)("Importing Site Options Failed.","astra-sites"),"",t)}))},X=function(){if(!w)return F({type:"set",importPercent:90}),void q();F({type:"set",importStatus:Object(x.__)("Importing Widgets.","astra-sites")});var t=o["astra-site-widgets-data"]||"",e=new FormData;e.append("action","astra-sites-import-widgets"),e.append("widgets_data",t),e.append("_ajax_nonce",astraSitesVars._ajax_nonce),fetch(ajaxurl,{method:"post",body:e}).then((function(t){return t.json()})).then((function(t){if(!t.success)throw t.data;F({type:"set",importPercent:90}),q()})).catch((function(t){N(Object(x.__)("Importing Widgets Failed.","astra-sites"),"",t)}))},q=function(){var t=Ol()(Il.a.mark((function t(){var e;return Il.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Hl(v);case 2:return t.next=4,Ql(JSON.stringify(E));case 4:return delete(e=k).preview,t.next=8,Wl(e);case 8:J();case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),J=function(){F({type:"set",importStatus:Object(x.__)("Final finishings.","astra-sites")});var t=new FormData;t.append("action","astra-sites-import-end"),t.append("_ajax_nonce",astraSitesVars._ajax_nonce);var e=3;fetch(ajaxurl,{method:"post",body:t}).then((function(t){return t.json()})).then((function(t){if(!t.success)throw t.data;F({type:"set",importPercent:100,importEnd:!0}),localStorage.setItem("st-import-end",+new Date),setInterval((function(){e--;var t=document.getElementById("redirect-counter");if(t)if(e<0)F({type:"set",currentIndex:u+1});else{var r=e<=1?" second…":" seconds…";t.innerHTML=e+r}}),1e3)})).catch((function(t){N(Object(x.__)("Final finishings Failed.","astra-sites"),"",t)}))};return Object(h.useEffect)((function(){i||a||f||(localStorage.setItem("st-import-start",+new Date),function(){if(l){L+=2,F({type:"set",importStatus:Object(x.__)("Reseting site.","astra-sites"),importPercent:L});var t=new FormData;t.append("action","astra-sites-set-reset-data"),t.append("_ajax_nonce",astraSitesVars._ajax_nonce),fetch(ajaxurl,{method:"post",body:t}).then((function(t){return t.text()})).then((function(t){try{var e=JSON.parse(t);F({type:"set",resetData:e.data}),function(){F({type:"set",importStatus:Object(x.__)("Resetting customizer.","astra-sites")});var t=new FormData;t.append("action","astra-sites-reset-customizer-data"),t.append("_ajax_nonce",astraSitesVars._ajax_nonce),fetch(ajaxurl,{method:"post",body:t}).then((function(t){return t.text()})).then((function(t){try{var e=JSON.parse(t);if(!e.success)throw e.data;F({type:"set",importPercent:L+=2,resetCustomizer:!0})}catch(e){N(Object(x.__)("Resetting customizer failed.","astra-sites"),"","".concat(e.message),"","","".concat(t))}})).catch((function(t){N(Object(x.__)("Resetting customizer failed.","astra-sites"),"","".concat(t.message),"","","".concat(t.message,": ").concat(t.stack))}))}(),function(){F({type:"set",importStatus:Object(x.__)("Resetting site options.","astra-sites")});var t=new FormData;t.append("action","astra-sites-reset-site-options"),t.append("_ajax_nonce",astraSitesVars._ajax_nonce),fetch(ajaxurl,{method:"post",body:t}).then((function(t){return t.text()})).then((function(t){try{var e=JSON.parse(t);if(!e.success)throw e.data;F({type:"set",importPercent:L+=2,resetSiteOptions:!0})}catch(e){N(Object(x.__)("Resetting site options Failed.","astra-sites"),"","".concat(e.message),"","","".concat(t))}})).catch((function(t){N(Object(x.__)("Resetting site options Failed.","astra-sites"),"","".concat(t.message),"","","".concat(t.message,": ").concat(t.stack))}))}(),function(t){var e=[],r=0;t.reset_terms.forEach((function(t){var n=new FormData;n.append("action","astra-sites-delete-terms"),n.append("term_id",t),n.append("_ajax_nonce",astraSitesVars._ajax_nonce),e[r]=n,r++})),t.reset_wp_forms.forEach((function(t){var n=new FormData;n.append("action","astra-sites-delete-wp-forms"),n.append("post_id",t),n.append("_ajax_nonce",astraSitesVars._ajax_nonce),e[r]=n,r++})),t.reset_posts.forEach((function(t){var n=new FormData;n.append("action","astra-sites-delete-posts"),n.append("post_id",t),n.append("_ajax_nonce",astraSitesVars._ajax_nonce),e[r]=n,r++})),0===e.length&&F({type:"set",resetContent:!0});for(var n=function(t){var r=e[t].get("action"),n="astra-sites-delete-terms"===r?"terms":"posts";"astra-sites-delete-wp-forms"===r&&(n="forms"),fetch(ajaxurl,{method:"post",body:e[t]}).then((function(t){return t.text()})).then((function(r){try{var i=JSON.parse(r);if(!i.success)throw i.data;F({type:"set",importStatus:i.data}),t===e.length-1&&F({type:"set",resetContent:!0}),0==t%10&&F({type:"set",importPercent:L+=1})}catch(t){R<1&&(N(Object(x.sprintf)(
|
10 |
/* Translators: %s is action. */
|
11 |
+
Object(x.__)("Resetting Failed for %s","astra-sites"),n),"","".concat(t.message),"","","".concat(r)),B(1))}})).catch((function(t){R<1&&(N(Object(x.sprintf)(
|
12 |
+
/* Translators: %s is action. */
|
13 |
+
Object(x.__)("Resetting Failed for %s","astra-sites"),n),"",t),B(1))}))},i=0;i<e.length;i++)n(i)}(e.data),(r=new FormData).append("action","astra-sites-reset-widgets-data"),r.append("_ajax_nonce",astraSitesVars._ajax_nonce),F({type:"set",importStatus:Object(x.__)("Resetting widgets.","astra-sites")}),fetch(ajaxurl,{method:"post",body:r}).then((function(t){return t.text()})).then((function(t){try{var e=JSON.parse(t);if(!e.success)throw e.data;F({type:"set",importPercent:L+=2,resetWidgets:!0})}catch(e){N(Object(x.__)("Resetting widgets failed.","astra-sites"),"","".concat(e.message),"","","".concat(t))}})).catch((function(t){N(Object(x.__)("Resetting widgets failed.","astra-sites"),"","".concat(t.message),"","","".concat(t.message,": ").concat(t.stack))}))}catch(e){N(Object(x.__)("Resetting website failed.","astra-sites"),"","".concat(e.message),"","","".concat(t))}var r})).catch((function(t){N(Object(x.__)("Resetting website failed.","astra-sites"),"","".concat(t.message),"","","".concat(t.message,": ").concat(t.stack))}))}else z()}())}),[o]),Object(h.useEffect)((function(){i||a||(null!==o?d&&m&&g&&y&&(F({type:"set",resetDone:!0}),O?function(t){var e=b()(t,2),r=e[0].importPercent,n=e[1],i=r;"not-installed"===starterTemplates.themeStatus&&(wp.updates.shouldRequestFilesystemCredentials&&!wp.updates.ajaxLocked&&wp.updates.requestFilesystemCredentials(),n({type:"set",importPercent:i+=5,importStatus:Object(x.__)("Installing Astra Theme…","astra-sites")}),wp.updates.installTheme({slug:"astra"}),jQuery(document).on("wp-theme-install-success",(function(t,e){n({type:"set",themeStatus:e,importStatus:Object(x.__)("Astra Theme Installed.","astra-sites")})}))),"installed-but-inactive"===starterTemplates.themeStatus&&setTimeout((function(){var t=new FormData;t.append("action","astra-sites-activate-theme"),t.append("_ajax_nonce",astraSitesVars._ajax_nonce),fetch(ajaxurl,{method:"post",body:t}).then((function(t){return t.json()})).then((function(t){t.success?n({type:"set",themeStatus:t,importStatus:Object(x.__)("Astra Theme Installed.","astra-sites")}):n({type:"set",importError:!0,importErrorMessages:{primaryText:Object(x.__)("Astra theme installation failed.","astra-sites"),secondaryText:"",errorCode:"",errorText:t.data,solutionText:"",tryAgain:!0}})})).catch((function(t){console.error(t)}))}),3e3),"installed-and-active"===starterTemplates.themeStatus&&n({type:"set",themeStatus:!0})}(t):F({type:"set",themeStatus:!0})):F({type:"set",importStatus:Object(x.__)("Invalid demo selected. Please contact us.","astra-sites")}))}),[d,m,g,y,o]),Object(h.useEffect)((function(){if(!i&&!a)return p&&n?void(null!==o?f||(F({type:"set",importStart:!0,importPercent:L+=5,importStatus:Object(x.__)("Starting Import.","astra-sites")}),z()):N(Object(x.__)("Fetching related demo failed.","astra-sites"))):(a&&(setTimeout((function(){F({type:"set",currentIndex:u+1})}),5e3),F({type:"set",importStatus:Object(x.__)("Import is already done.","astra-sites")})),void(i&&!a&&F({type:"set",importStatus:Object(x.__)("Import is already in progress.","astra-sites")})))}),[p,n,o]),Object(h.useEffect)((function(){j&&n&&p&&function(){var t=encodeURI(o["astra-site-cartflows-path"])||"";if(""!==t){F({type:"set",importStatus:Object(x.__)("Importing CartFlows flows.","astra-sites")});var e=new FormData;e.append("action","astra-sites-import-cartflows"),e.append("cartflows_url",t),e.append("_ajax_nonce",astraSitesVars._ajax_nonce),fetch(ajaxurl,{method:"post",body:e}).then((function(t){return t.json()})).then((function(t){if(!t.success)throw t.data;F({type:"set",importPercent:L+=2}),G()})).catch((function(t){N(Object(x.__)("Importing CartFlows flows Failed.","astra-sites"),"",t)}))}else G()}()}),[j,n,p]),Object(h.useEffect)((function(){T.length<=0&&_.length<=0&&F({type:"set",requiredPluginsDone:!0})}),[T.length,_.length]),Object(h.useEffect)((function(){T.length>0&&function(t){L+=2,F({type:"set",importStatus:Object(x.sprintf)(// translators: Plugin Name.
|
14 |
+
Object(x.__)("Activating %1$s plugin.","astra-sites"),t.name),importPercent:L});var e=new FormData;e.append("action","astra-required-plugin-activate"),e.append("init",t.init),e.append("_ajax_nonce",astraSitesVars._ajax_nonce),fetch(ajaxurl,{method:"post",body:e}).then((function(t){return t.json()})).then((function(e){if(!e.success)throw e.data.message;var r=T;r.forEach((function(e,n){e.slug===t.slug&&r.splice(n,1)})),F({type:"set",notActivatedList:r}),L+=2,F({type:"set",importStatus:Object(x.sprintf)(// translators: Plugin Name.
|
15 |
+
Object(x.__)("%1$s activated.","astra-sites"),t.name),importPercent:L})})).catch((function(t){N(Object(x.__)("Could not activate the required plugin list.","astra-sites"),"",t,"",astraSitesVars.importFailedRequiredPluginsMessage)}))}(T[0])}),[T.length]),Object(c.createElement)(A,{content:Object(c.createElement)("div",{className:"middle-content middle-content-import"},Object(c.createElement)(c.Fragment,null,Object(c.createElement)("h1",null,Object(x.__)("We are building your website…","astra-sites")),f&&Object(c.createElement)("div",{className:"ist-import-process-step-wrap"},Object(c.createElement)(Oh,null)),!f&&Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"ist-import-process-step-wrap"},Object(c.createElement)(Ph,null)),Object(c.createElement)(wh,{loop:!0,animationData:jh,play:!0,style:{height:400,margin:"-70px auto -90px auto"}})))),actions:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(V,{before:!0,disabled:!0,customizeStep:!0},Object(x.__)("Back","astra-sites")))})});function Th(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Fh(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Th(Object(r),!0).forEach((function(e){m()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Th(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Mh=function(t){var e=t.updateFormDetails,r=Object(h.useState)({option1:0,option2:0}),n=b()(r,2),i=n[0],a=n[1];return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("p",{className:"label-text row-label"},Object(x.__)("Tell us a little bit about yourself","astra-sites")),Object(c.createElement)("div",{className:"survey-fields-wrap"},Object(c.createElement)("input",{type:"text",className:"survey-text-input",name:"first_name",placeholder:Object(x.__)("Your First Name","astra-sites"),onChange:function(t){return e("first_name",t.target.value)}}),Object(c.createElement)("input",{type:"email",className:"survey-text-input",name:"email",placeholder:Object(x.__)("Your Work Email","astra-sites"),onChange:function(t){return e("email",t.target.value)}}),Object(c.createElement)("select",{name:"wp_user_type",className:0!==i.option1?"survey-select-input":"survey-select-input initial",defaultValue:"",onBlur:function(t){return e("wp_user_type",t.target.value)},onChange:function(t){e("wp_user_type",t.target.value),a(Fh(Fh({},i),{},{option1:t.target.selectedIndex}))}},Object(c.createElement)("option",{value:"",disabled:!0},Object(x.__)("I am…","astra-sites")),Object(c.createElement)("option",{value:"1"},Object(x.__)("Beginner","astra-sites")),Object(c.createElement)("option",{value:"2"},Object(x.__)("Intermidiate","astra-sites")),Object(c.createElement)("option",{value:"3"},Object(x.__)("Expert","astra-sites"))),Object(c.createElement)("select",{name:"build_website_for",className:0!==i.option2?"survey-select-input":"survey-select-input initial",defaultValue:"",onBlur:function(t){return e("build_website_for",t.target.value)},onChange:function(t){a(Fh(Fh({},i),{},{option2:t.target.selectedIndex}))}},Object(c.createElement)("option",{value:"",disabled:!0},Object(x.__)("I am building website for…","astra-sites")),Object(c.createElement)("option",{value:"1"},Object(x.__)("Myself/My Company","astra-sites")),Object(c.createElement)("option",{value:"2"},Object(x.__)("My Client","astra-sites")))))},Dh=function(){var t=Object(h.useState)(!0),e=b()(t,2),r=e[0],n=e[1],i=C(),a=b()(i,2),s=a[0],o=s.reset,l=s.customizerImportFlag,p=s.themeActivateFlag,u=s.widgetImportFlag,f=s.contentImportFlag,d=s.requiredPlugins,m=a[1],g=null!==d?d.required_plugins.inactive:[],y="installed-and-active"!==starterTemplates.themeStatus?"theme-check":"";return Object(c.createElement)("div",{className:"survey-form-advanced-wrapper ".concat(r?"show-section":"hidden-section")},Object(c.createElement)("p",{className:"label-text row-label",onClick:function(){n(!r)}},Object(x.__)("Advanced Options","astra-sites"),Object(c.createElement)("span",{className:"advanced-options-icons"},r?E.angleUP:E.angleDown)),Object(c.createElement)("div",{className:"survey-advanced-section"},Object(c.createElement)("ul",null,"yes"===starterTemplates.firstImportStatus&&Object(c.createElement)("li",null,Object(c.createElement)("input",{type:"checkbox",id:"reset-site",name:"reset-site",defaultChecked:o,onChange:function(){m({type:"set",reset:!o})}}),Object(c.createElement)("label",{htmlFor:"reset-site"}," ",Object(x.__)("Delete Previously imported sites","astra-sites")),Object(c.createElement)(Tl,{content:Object(c.createElement)("span",null,Object(x.__)("WARNING: Selecting this option will delete all data from the previous import. Choose this option only if this is intended.","astra-sites"),Object(c.createElement)("br",null),Object(x.__)("Choose this option only if this is intended.You can find the backup to the current customizer settings at /wp-content/uploads astra-sites","astra-sites"))},E.questionMark)),"installed-and-active"!==starterTemplates.themeStatus&&Object(c.createElement)("li",null,Object(c.createElement)("input",{type:"checkbox",id:"import-theme",name:"import-theme",defaultChecked:p,onChange:function(){m({type:"set",themeActivateFlag:!p,customizerImportFlag:!p})}}),Object(c.createElement)("label",{htmlFor:"import-theme"}," ",Object(x.__)("Install & Activate Astra Theme","astra-sites")),Object(c.createElement)(Tl,{content:Object(x.__)("To import the site in the original format, you would need the Astra theme activated. You can import it with any other theme, but the site might lose some of the design settings and look a bit different.","astra-sites")},E.questionMark)),p&&Object(c.createElement)("li",{className:y},Object(c.createElement)("input",{type:"checkbox",id:"import-customizer",name:"import-customizer",defaultChecked:l,onChange:function(){m({type:"set",customizerImportFlag:!l})}}),Object(c.createElement)("label",{htmlFor:"import-customizer"}," ",Object(x.__)("Import Customizer Settings","astra-sites")),Object(c.createElement)(Tl,{content:Object(x.__)("Starter Templates customizer serves global settings that give uniform design to the website. Choosing this option will override your current customizer settings.","astra-sites")},E.questionMark)),Object(c.createElement)("li",null,Object(c.createElement)("input",{type:"checkbox",id:"import-widgets",name:"import-widgets",defaultChecked:u,onChange:function(){m({type:"set",widgetImportFlag:!u})}}),Object(c.createElement)("label",{htmlFor:"import-widgets"}," ",Object(x.__)("Import Widgets","astra-sites"))),g.length>0&&Object(c.createElement)("li",null,Object(c.createElement)("input",{type:"checkbox",id:"import-plugins",name:"import-plugins",defaultChecked:!0,disabled:!0}),Object(c.createElement)("label",{htmlFor:"import-plugins"}," ",Object(x.__)("Install Required Plugins","astra-sites")),Object(c.createElement)(Tl,{content:Object(c.createElement)("div",null,Object(c.createElement)("span",null,Object(x.__)("Plugins needed to import this template are missing. Required plugins will be installed and activated automatically.","astra-sites")),Object(c.createElement)("ul",null,g.map((function(t,e){return Object(c.createElement)("li",{key:e},Object(ia.decodeEntities)("• ".concat(t.name)))}))))},E.questionMark)),Object(c.createElement)("li",null,Object(c.createElement)("input",{type:"checkbox",id:"import-content",name:"import-content",defaultChecked:f,onChange:function(){m({type:"set",contentImportFlag:!f})}}),Object(c.createElement)("label",{htmlFor:"import-content"}," ",Object(x.__)("Import Content","astra-sites")),Object(c.createElement)(Tl,{content:Object(x.__)("Selecting this option will import dummy pages, posts, images, and menus. If you do not want to import dummy content, please uncheck this option.","astra-sites")},E.questionMark)))))};function Rh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Bh(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Rh(Object(r),!0).forEach((function(e){m()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Rh(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}r(84);var Vh=[{content:Object(c.createElement)((function(){var t=C(),e=b()(t,2),r=e[0].currentIndex,n=e[1],i=Object(h.useState)(!0),a=b()(i,2),s=a[0],o=a[1];return Object(c.createElement)(A,{content:Object(c.createElement)("div",{className:"welcome-screen"},Object(c.createElement)("h1",{className:"d-flex-center-align"},Object(x.__)("Getting Started with Starter Templates","astra-sites")),Object(c.createElement)("p",{className:"screen-description"},Object(x.__)("This is the very beginning of the fastest and easiest website building experience you`ve ever had!","astra-sites")),Object(c.createElement)("div",{className:"video-showcase",onClick:function(){var t=document.getElementById("st-welcome-video"),e=t.src.replace("&mute=1&controls=0","&mute=0&controls=1");t.src=e,o(!1)}},s&&Object(c.createElement)("div",{className:"click-to-play-wrap"},Object(c.createElement)("span",{className:"click-btn-text"},E.clickToPlay),Object(c.createElement)("span",{className:"youtube-btn middle-content"},E.youtube)),Object(c.createElement)("iframe",{src:"https://www.youtube-nocookie.com/embed/Ch6Yg-9eCyc?rel=0&autoplay=1&mute=1&controls=0&showinfo=0&loop=1&modestbranding=1&loop=1",frameBorder:"0",allow:"autoplay; encrypted-media",allowFullScreen:!0,title:"st-welcome-video",id:"st-welcome-video"})),Object(c.createElement)("div",{className:"get-started-wrap"},Object(c.createElement)(O,{onClick:function(){n({type:"set",currentIndex:r+1})}},Object(x.__)("Build Your Website Now","astra-sites")))),actions:null})}),null),class:"step-welcome"},{content:Object(c.createElement)(na,null),class:"step-page-builder"},{header:Object(c.createElement)((function(){return Object(c.createElement)("div",{className:"site-list-header row"},Object(c.createElement)("div",{className:"st-header-left"},Object(c.createElement)(sc,null)),Object(c.createElement)("div",{className:"st-header-right"},Object(c.createElement)(cc,null),Object(c.createElement)(Oc,null),Object(c.createElement)(oc,null),Object(c.createElement)(lc,null)))}),null),content:Object(c.createElement)((function(){var t=Object(h.useState)(!0),e=b()(t,2),r=e[0],n=e[1],i=Object(h.useState)({sites:{},tags:[],defaultSites:{},allFavorites:[]}),a=b()(i,2),s=a[0],o=a[1],l=C(),p=b()(l,2),u=p[0],f=p[1],d=u.favoriteSiteIDs,m=u.onMyFavorite,g=u.builder,y=u.siteSearchTerm,v=u.siteType,E=u.siteOrder,k=u.siteCategory;Object(h.useEffect)((function(){f({type:"set",templateResponse:null,selectedTemplateName:"",selectedTemplateType:""});var t=Sl(y,v,"",g),e=ac(ac({},t.sites),t.related);"latest"===E&&Object.keys(e).length&&(e=Qo(e,"publish-date").reverse());var r=[],i=astraSitesVars.all_sites;if(m&&Object.keys(i).length>0)for(var a in i)d.length&&d.includes(a)&&r.push(ac({id:a.replace("id-",""),image:i[a]["thumbnail-image-url"],title:Object(ia.decodeEntities)(i[a].title),badge:"agency-mini"===i[a]["astra-sites-type"]?Object(x.__)("Premium","astra-sites"):""},i[a]));o(ac(ac(ac({},s),t),{},{defaultSites:Sl("","","",g).sites,sites:e,allFavorites:r})),setTimeout((function(){n(!1)}),300)}),[d,m,g,y,v,E,k]),W(u);var S=Object.keys(s.sites).length;return Object(c.createElement)(A,{content:Object(c.createElement)("div",{className:"site-list-screen-container ".concat(r?"site-loading":"site-loaded")},Object(c.createElement)(wl,null),Object(c.createElement)("div",{className:"site-list-screen-wrap"},Object(c.createElement)("h1",null,Object(x.__)("What type of website are you building?","astra-sites")),Object(c.createElement)("div",{className:"site-list-content"},Object(c.createElement)(Kl,null),Object(c.createElement)("div",{className:"st-templates-content"},Object(c.createElement)("div",{className:"st-other-filters"},Object(c.createElement)("div",{className:"st-category-filter"},Object(c.createElement)(tc,null)),Object(c.createElement)("div",{className:"st-type-and-order-filters"},"gutenberg"!==g&&Object(c.createElement)(Zl,null),Object(c.createElement)($l,null))),m?Object(c.createElement)(c.Fragment,null,s.allFavorites.length?Object(c.createElement)("div",{className:"st-sites-grid"},Object(c.createElement)(Jl,{sites:s.allFavorites})):Object(c.createElement)(c.Fragment,null,Object(c.createElement)(rc,null),Object(c.createElement)(nc,{sites:s.defaultSites}))):Object(c.createElement)(c.Fragment,null,S?Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"st-sites-grid"},y&&Object(c.createElement)("div",{className:"st-sites-found-message"},Object(x.sprintf)(
|
16 |
/* translators: %1$s: search term. */
|
17 |
Object(x.__)("Starter Templates for %1$s:","astra-sites"),Object(ia.decodeEntities)(y))),Object(c.createElement)(Jl,{sites:s.sites}))):Object(c.createElement)(c.Fragment,null,Object(c.createElement)(ec,null),Object(c.createElement)(nc,{sites:s.defaultSites}))))))),actions:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(V,{before:!0},Object(x.__)("Back","astra-sites")),!astraSitesVars.isPro&&!H()&&Object(c.createElement)("div",{className:"cta-strip-right"},Object(c.createElement)("h5",null,Object(x.__)("Get unlimited access to all Premium Starter Templates and more, at a single low cost!","astra-sites")),Object(c.createElement)(R,{className:"st-access-btn",onClick:function(){return window.open(astraSitesVars.cta_links[g])}},Object(x.__)("Get Essential Bundle","astra-sites"))))})}),null),class:"step-site-list"},{content:Object(c.createElement)((function(){var t,e,r=C(),n=b()(r,2),i=n[0],a=i.currentCustomizeIndex,s=i.currentIndex,o=i.builder,l=n[1],p=Qc[a];void 0!==p&&(t=p.content,e=p.controls),Object(h.useEffect)((function(){var t=parseInt(a)-1,e=parseInt(a)+1;e>0&&e<Qc.length&&document.body.classList.remove(Qc[e].class),t>=0&&document.body.classList.remove(Qc[t].class),document.body.classList.add(Qc[a].class)}));var u=function(){if(Qc.length-1===a)return null;l("beaver-builder"===o||"brizy"===o?{type:"set",currentIndex:s+1}:{type:"set",currentCustomizeIndex:a+1})},f=function(){if(0===a)return null;l({type:"set",currentCustomizeIndex:a-1})};return Object(c.createElement)(A,{stepName:Qc[a].class,content:Object(c.createElement)(t,{customizeStep:!0,onNextClick:u,onPreviousClick:f}),controls:e&&Object(c.createElement)(e,{customizeStep:!0,onNextClick:u,onPreviousClick:f}),actions:null,preview:Object(c.createElement)(ra,null)})}),null),class:"step-customizer"},{content:Object(c.createElement)((function(){var t=C(),e=b()(t,2),r=e[0],n=r.currentIndex,i=r.builder,a=r.requiredPlugins,s=e[1],o=null!==a?a.third_party_required_plugins:[],l=o.length>0,p=Object(h.useState)(l),u=b()(p,2),f=u[0],d=u[1],g=Object(h.useState)({first_name:"",email:"",wp_user_type:"",build_website_for:""}),y=b()(g,2),v=y[0],k=y[1];return Object(c.createElement)(A,{content:Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"survey-container"},f&&Object(c.createElement)("form",{className:"required-plugins-form",onSubmit:function(t){t.preventDefault(),d(!1)}},Object(c.createElement)("h1",null,Object(x.__)("Required plugins missing","astra-sites")),Object(c.createElement)("p",null,Object(x.__)("This starter template requires premium plugins. As these are third party premium plugins, you'll need to purchase, install and activate them first.","astra-sites")),Object(c.createElement)("h5",null,Object(x.__)("Required plugins -","astra-sites")),Object(c.createElement)("ul",{className:"third-party-required-plugins-list"},o.map((function(t,e){return Object(c.createElement)("li",{"data-slug":t.slug,"data-init":t.init,"data-name":t.name,key:e},Object(c.createElement)("a",{href:t.link,target:"_blank",rel:"noreferrer"},t.name))}))),Object(c.createElement)("button",{type:"submit",className:"submit-survey-btn button-text d-flex-center-align"},Object(x.__)("Skip & Start Importing","astra-sites"),E.arrowRight)),!f&&Object(c.createElement)("form",{className:"survey-form",onSubmit:function(t){if(t.preventDefault(),setTimeout((function(){s({type:"set",currentIndex:n+1})}),500),"yes"!==astraSitesVars.subscribed){var e={EMAIL:v.email,FIRSTNAME:v.first_name,PAGE_BUILDER:i,WP_USER_TYPE:v.wp_user_type,BUILD_WEBSITE_FOR:v.build_website_for},r=new FormData;r.append("action","astra-sites-update-subscription"),r.append("_ajax_nonce",astraSitesVars._ajax_nonce),r.append("data",JSON.stringify(e)),fetch(ajaxurl,{method:"post",body:r}).then((function(t){return t.json()})).then((function(){s({type:"set",user_subscribed:!0})}))}else s({type:"set",user_subscribed:!0})}},Object(c.createElement)("h1",null,Object(x.__)("Okay, just one last step…","astra-sites")),"yes"!==astraSitesVars.subscribed&&Object(c.createElement)(Mh,{updateFormDetails:function(t,e){k((function(r){return Bh(Bh({},r),{},m()({},t,e))}))}}),Object(c.createElement)(Dh,null),Object(c.createElement)("button",{type:"submit",className:"submit-survey-btn button-text d-flex-center-align"},Object(x.__)("Submit & Build My Website","astra-sites"),E.arrowRight)))),actions:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(V,{before:!0},Object(x.__)("Back","astra-sites")))})}),null),class:"step-survey"},{title:"We are buiding your website...",content:Object(c.createElement)(_h,null),class:"step-import-site"},{content:Object(c.createElement)(D,null),class:"step-congrats"}],Lh=["type"];function Nh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function zh(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Nh(Object(r),!0).forEach((function(e){m()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nh(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Gh=0,Hh="gutenberg";astraSitesVars.default_page_builder&&(Gh=2,Hh="brizy"===astraSitesVars.default_page_builder?"gutenberg":astraSitesVars.default_page_builder);var Qh={currentIndex:Gh,currentCustomizeIndex:0,siteLogo:{id:"",thumbnail:"",url:"",width:120},activePaletteSlug:"default",activePalette:{},typography:{},typographyIndex:0,stepsLength:Object.keys(Vh).length,builder:Hh,siteType:"",siteOrder:"popular",siteCategory:{id:"",slug:""},siteSearchTerm:"",userSubscribed:!1,showSidebar:!0,tryAgainCount:0,confettiDone:!1,templateId:0,templateResponse:null,requiredPlugins:null,selectedTemplateName:"",selectedTemplateType:"",reset:!0,themeStatus:!1,importStatusLog:"",resetCustomizer:!1,resetSiteOptions:!1,resetContent:!1,resetWidgets:!1,resetDone:!1,requiredPluginsDone:!1,notInstalledList:[],notActivatedList:[],resetData:[],importStart:!1,importEnd:!1,importPercent:0,importError:!1,importErrorMessages:{primaryText:"",secondaryText:"",errorCode:"",errorText:"",solutionText:"",tryAgain:!1},importErrorResponse:[],customizerImportFlag:!0,themeActivateFlag:!0,widgetImportFlag:!0,contentImportFlag:!0,onMyFavorite:!1,favoriteSiteIDs:Object.values(astraSitesVars.favorite_data)||[],licenseStatus:astraSitesVars.license_status,validateLicenseStatus:!1,searchTerms:[],searchTermsWithCount:[]};function Wh(t){return"/"===t.charAt(0)}function Xh(t,e){for(var r=e,n=r+1,i=t.length;n<i;r+=1,n+=1)t[r]=t[n];t.pop()}function qh(t,e){if(!t)throw new Error("Invariant failed")}function Jh(t){return"/"===t.charAt(0)?t:"/"+t}function Yh(t,e){return function(t,e){return 0===t.toLowerCase().indexOf(e.toLowerCase())&&-1!=="/?#".indexOf(t.charAt(e.length))}(t,e)?t.substr(e.length):t}function Kh(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t}function Uh(t){var e=t.pathname,r=t.search,n=t.hash,i=e||"/";return r&&"?"!==r&&(i+="?"===r.charAt(0)?r:"?"+r),n&&"#"!==n&&(i+="#"===n.charAt(0)?n:"#"+n),i}function Zh(t,e,r,n){var i;"string"==typeof t?(i=function(t){var e=t||"/",r="",n="",i=e.indexOf("#");-1!==i&&(n=e.substr(i),e=e.substr(0,i));var a=e.indexOf("?");return-1!==a&&(r=e.substr(a),e=e.substr(0,a)),{pathname:e,search:"?"===r?"":r,hash:"#"===n?"":n}}(t)).state=e:(void 0===(i=J({},t)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==e&&void 0===i.state&&(i.state=e));try{i.pathname=decodeURI(i.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return r&&(i.key=r),n?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=function(t,e){void 0===e&&(e="");var r,n=t&&t.split("/")||[],i=e&&e.split("/")||[],a=t&&Wh(t),s=e&&Wh(e),o=a||s;if(t&&Wh(t)?i=n:n.length&&(i.pop(),i=i.concat(n)),!i.length)return"/";if(i.length){var l=i[i.length-1];r="."===l||".."===l||""===l}else r=!1;for(var c=0,h=i.length;h>=0;h--){var p=i[h];"."===p?Xh(i,h):".."===p?(Xh(i,h),c++):c&&(Xh(i,h),c--)}if(!o)for(;c--;c)i.unshift("..");!o||""===i[0]||i[0]&&Wh(i[0])||i.unshift("");var u=i.join("/");return r&&"/"!==u.substr(-1)&&(u+="/"),u}(i.pathname,n.pathname)):i.pathname=n.pathname:i.pathname||(i.pathname="/"),i}function $h(){var t=null,e=[];return{setPrompt:function(e){return t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,r,n,i){if(null!=t){var a="function"==typeof t?t(e,r):t;"string"==typeof a?"function"==typeof n?n(a,i):i(!0):i(!1!==a)}else i(!0)},appendListener:function(t){var r=!0;function n(){r&&t.apply(void 0,arguments)}return e.push(n),function(){r=!1,e=e.filter((function(t){return t!==n}))}},notifyListeners:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];e.forEach((function(t){return t.apply(void 0,r)}))}}}var tp=!("undefined"==typeof window||!window.document||!window.document.createElement);function ep(t,e){e(window.confirm(t))}function rp(){try{return window.history.state||{}}catch(t){return{}}}function np(t){void 0===t&&(t={}),tp||qh(!1);var e,r=window.history,n=(-1===(e=window.navigator.userAgent).indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,i=!(-1===window.navigator.userAgent.indexOf("Trident")),a=t,s=a.forceRefresh,o=void 0!==s&&s,l=a.getUserConfirmation,c=void 0===l?ep:l,h=a.keyLength,p=void 0===h?6:h,u=t.basename?Kh(Jh(t.basename)):"";function f(t){var e=t||{},r=e.key,n=e.state,i=window.location,a=i.pathname+i.search+i.hash;return u&&(a=Yh(a,u)),Zh(a,n,r)}function d(){return Math.random().toString(36).substr(2,p)}var m=$h();function g(t){J(O,t),O.length=r.length,m.notifyListeners(O.location,O.action)}function y(t){(function(t){return void 0===t.state&&-1===navigator.userAgent.indexOf("CriOS")})(t)||x(f(t.state))}function v(){x(f(rp()))}var b=!1;function x(t){b?(b=!1,g()):m.confirmTransitionTo(t,"POP",c,(function(e){e?g({action:"POP",location:t}):function(t){var e=O.location,r=k.indexOf(e.key);-1===r&&(r=0);var n=k.indexOf(t.key);-1===n&&(n=0);var i=r-n;i&&(b=!0,A(i))}(t)}))}var E=f(rp()),k=[E.key];function C(t){return u+Uh(t)}function A(t){r.go(t)}var S=0;function w(t){1===(S+=t)&&1===t?(window.addEventListener("popstate",y),i&&window.addEventListener("hashchange",v)):0===S&&(window.removeEventListener("popstate",y),i&&window.removeEventListener("hashchange",v))}var P=!1,O={length:r.length,action:"POP",location:E,createHref:C,push:function(t,e){var i=Zh(t,e,d(),O.location);m.confirmTransitionTo(i,"PUSH",c,(function(t){if(t){var e=C(i),a=i.key,s=i.state;if(n)if(r.pushState({key:a,state:s},null,e),o)window.location.href=e;else{var l=k.indexOf(O.location.key),c=k.slice(0,l+1);c.push(i.key),k=c,g({action:"PUSH",location:i})}else window.location.href=e}}))},replace:function(t,e){var i=Zh(t,e,d(),O.location);m.confirmTransitionTo(i,"REPLACE",c,(function(t){if(t){var e=C(i),a=i.key,s=i.state;if(n)if(r.replaceState({key:a,state:s},null,e),o)window.location.replace(e);else{var l=k.indexOf(O.location.key);-1!==l&&(k[l]=i.key),g({action:"REPLACE",location:i})}else window.location.replace(e)}}))},go:A,goBack:function(){A(-1)},goForward:function(){A(1)},block:function(t){void 0===t&&(t=!1);var e=m.setPrompt(t);return P||(w(1),P=!0),function(){return P&&(P=!1,w(-1)),e()}},listen:function(t){var e=m.appendListener(t);return w(1),function(){w(-1),e()}}};return O}var ip=r(36),ap=r(23),sp=r.n(ap),op=(r(16),function(t){var e=Object(ip.a)();return e.displayName=t,e}),lp=op("Router-History"),cp=op("Router"),hp=function(t){function e(e){var r;return(r=t.call(this,e)||this).state={location:e.history.location},r._isMounted=!1,r._pendingLocation=null,e.staticContext||(r.unlisten=e.history.listen((function(t){r._isMounted?r.setState({location:t}):r._pendingLocation=t}))),r}Object(ht.a)(e,t),e.computeRootMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}};var r=e.prototype;return r.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},r.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},r.render=function(){return p.a.createElement(cp.Provider,{value:{history:this.props.history,location:this.state.location,match:e.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},p.a.createElement(lp.Provider,{children:this.props.children||null,value:this.props.history}))},e}(p.a.Component);p.a.Component,p.a.Component;var pp={},up=0;p.a.Component,p.a.Component,p.a.Component;var fp=p.a.useContext,dp=function(t){function e(){for(var e,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).history=np(e.props),e}return Object(ht.a)(e,t),e.prototype.render=function(){return p.a.createElement(hp,{history:this.history,children:this.props.children})},e}(p.a.Component);p.a.Component;var mp=function(t,e){return"function"==typeof t?t(e):t},gp=function(t,e){return"string"==typeof t?Zh(t,null,null,e):t},yp=function(t){return t},vp=p.a.forwardRef;void 0===vp&&(vp=yp);var bp=vp((function(t,e){var r=t.innerRef,n=t.navigate,i=t.onClick,a=Y(t,["innerRef","navigate","onClick"]),s=a.target,o=J({},a,{onClick:function(t){try{i&&i(t)}catch(e){throw t.preventDefault(),e}t.defaultPrevented||0!==t.button||s&&"_self"!==s||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||(t.preventDefault(),n())}});return o.ref=yp!==vp&&e||r,p.a.createElement("a",o)})),xp=vp((function(t,e){var r=t.component,n=void 0===r?bp:r,i=t.replace,a=t.to,s=t.innerRef,o=Y(t,["component","replace","to","innerRef"]);return p.a.createElement(cp.Consumer,null,(function(t){t||qh(!1);var r=t.history,l=gp(mp(a,t.location),t.location),c=l?r.createHref(l):"",h=J({},o,{href:c,navigate:function(){var e=mp(a,t.location),n=Uh(t.location)===Uh(gp(e));(i||n?r.replace:r.push)(e)}});return yp!==vp?h.ref=e||s:h.innerRef=s,p.a.createElement(n,h)}))})),Ep=function(t){return t},kp=p.a.forwardRef;function Cp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}void 0===kp&&(kp=Ep),kp((function(t,e){var r=t["aria-current"],n=void 0===r?"page":r,i=t.activeClassName,a=void 0===i?"active":i,s=t.activeStyle,o=t.className,l=t.exact,c=t.isActive,h=t.location,u=t.sensitive,f=t.strict,d=t.style,m=t.to,g=t.innerRef,y=Y(t,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return p.a.createElement(cp.Consumer,null,(function(t){t||qh(!1);var r=h||t.location,i=gp(mp(m,r),r),v=i.pathname,b=v&&v.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),x=b?function(t,e){void 0===e&&(e={}),("string"==typeof e||Array.isArray(e))&&(e={path:e});var r=e,n=r.path,i=r.exact,a=void 0!==i&&i,s=r.strict,o=void 0!==s&&s,l=r.sensitive,c=void 0!==l&&l;return[].concat(n).reduce((function(e,r){if(!r&&""!==r)return null;if(e)return e;var n=function(t,e){var r=""+e.end+e.strict+e.sensitive,n=pp[r]||(pp[r]={});if(n[t])return n[t];var i=[],a={regexp:sp()(t,i,e),keys:i};return up<1e4&&(n[t]=a,up++),a}(r,{end:a,strict:o,sensitive:c}),i=n.regexp,s=n.keys,l=i.exec(t);if(!l)return null;var h=l[0],p=l.slice(1),u=t===h;return a&&!u?null:{path:r,url:"/"===r&&""===h?"/":h,isExact:u,params:s.reduce((function(t,e,r){return t[e.name]=p[r],t}),{})}}),null)}(r.pathname,{path:b,exact:l,sensitive:u,strict:f}):null,E=!!(c?c(x,r):x),k="function"==typeof o?o(E):o,C="function"==typeof d?d(E):d;E&&(k=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.filter((function(t){return t})).join(" ")}(k,a),C=J({},C,s));var A=J({"aria-current":E&&n||null,className:k,style:C,to:i},y);return Ep!==kp?A.ref=e||g:A.innerRef=g,p.a.createElement(xp,A)}))}));var Ap=function(){var t=C(),e=b()(t,2),r=e[0],n=e[1],i=r.currentIndex,a=r.templateResponse,s=r.designStep,o=r.importError,l=Object(h.useState)(!0),p=b()(l,2),u=p[0],f=p[1],d=Object(h.useState)(!0),g=b()(d,2),y=g[0],v=g[1],k=Vh[i],A=fp(lp);return Object(h.useEffect)((function(){var t=parseInt(i)-1,e=parseInt(i)+1;e>0&&e<Vh.length&&document.body.classList.remove(Vh[e].class),t>0&&document.body.classList.remove(Vh[t].class),document.body.classList.add(Vh[i].class)})),Object(h.useEffect)((function(){o?document.body.classList.add("st-error"):document.body.classList.remove("st-error")}),[o]),Object(h.useEffect)((function(){var t=new URLSearchParams(window.location.search),e=JSON.parse(localStorage.getItem("starter-templates-onboarding")),r=parseInt(t.get("currentIndex"))||0,i=parseInt(t.get("designStep"))||0;if(0!==r){var a={};for(var s in e)"currentIndex"!==s&&(a[s]=e["".concat(s)]);n(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Cp(Object(r),!0).forEach((function(e){m()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Cp(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({type:"set",currentIndex:r,designStep:i},a))}else localStorage.removeItem("starter-templates-onboarding");f(!1)}),[A]),Object(h.useEffect)((function(){var t=new URLSearchParams(window.location.search),e=parseInt(t.get("currentIndex"))||0;0===i&&(t.delete("currentIndex"),A.push(window.location.pathname+"?"+t.toString())),(0!==i&&e!==i||null!==a)&&(W(r),t.set("currentIndex",i),A.push(window.location.pathname+"?"+t.toString())),0!==s&&e===Vh.length-1&&null!==a&&(W(r),t.set("designStep",s),A.push(window.location.pathname+"?"+t.toString())),2===i&&n({type:"set",activePalette:{},activePaletteSlug:"default",typography:{},typographyIndex:0}),v(!1)}),[i,a,s]),Object(c.createElement)("div",{className:"step ".concat(k.class)},3!==i&&Object(c.createElement)("div",{className:"step-header"},k.header?k.header:Object(c.createElement)("div",{className:"row"},Object(c.createElement)("div",{className:"col"},Object(c.createElement)(sc,null)),Object(c.createElement)("div",{className:"right-col"},4===i&&Object(c.createElement)("div",{className:"back-to-main",onClick:function(){n({type:"set",currentIndex:i-2,currentCustomizeIndex:0})}},Object(c.createElement)(Tl,{content:Object(x.__)("Back to Templates","astra-sites")},E.cross)),Object(c.createElement)("div",{className:"col exit-link"},Object(c.createElement)("a",{href:starterTemplates.adminUrl},Object(c.createElement)(Tl,{content:Object(x.__)("Exit to Dashboard","astra-sites")},E.dashboard))))),Object(c.createElement)("canvas",{id:"ist-bashcanvas",width:window.innerWidth,height:window.innerHeight})),!1===u&&!1===y&&k?k.content:null)},Sp=(r(86),function(){return Object(c.createElement)(dp,null,Object(c.createElement)("div",{className:"starter-templates-ai-steps"},Object(c.createElement)(Ap,null)))});f.a.render(Object(c.createElement)((function(t){var e=t.reducer,r=t.initialState,n=t.children;return Object(c.createElement)(k.Provider,{value:Object(h.useReducer)(e,r)},n)}),{reducer:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Qh,e=arguments.length>1?arguments[1]:void 0,r=e.type,n=y()(e,Lh);switch(r){case"set":return zh(zh({},t),n);default:return t}},initialState:Qh},Object(c.createElement)(Sp,null)),document.getElementById("starter-templates-ai-root"))}]);
|
inc/lib/onboarding/assets/src/steps/import-site/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
import React, { useEffect } from 'react';
|
2 |
import { __, sprintf } from '@wordpress/i18n';
|
3 |
import Lottie from 'react-lottie-player';
|
4 |
import PreviousStepLink from '../../components/util/previous-step-link/index';
|
@@ -48,6 +48,8 @@ const ImportSite = () => {
|
|
48 |
dispatch,
|
49 |
] = storedState;
|
50 |
|
|
|
|
|
51 |
let percentage = importPercent;
|
52 |
|
53 |
/**
|
@@ -183,10 +185,7 @@ const ImportSite = () => {
|
|
183 |
'astra-sites'
|
184 |
),
|
185 |
'',
|
186 |
-
|
187 |
-
'',
|
188 |
-
'',
|
189 |
-
`${ err.message }: ${ err.stack }`
|
190 |
);
|
191 |
},
|
192 |
},
|
@@ -260,10 +259,9 @@ const ImportSite = () => {
|
|
260 |
'astra-sites'
|
261 |
),
|
262 |
'',
|
263 |
-
|
264 |
'',
|
265 |
-
astraSitesVars.importFailedRequiredPluginsMessage
|
266 |
-
`${ error.message }: ${ error.stack }`
|
267 |
);
|
268 |
} );
|
269 |
};
|
@@ -292,32 +290,44 @@ const ImportSite = () => {
|
|
292 |
method: 'post',
|
293 |
body: content,
|
294 |
} )
|
295 |
-
.then( ( response ) => response.
|
296 |
-
.then( (
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
|
|
|
|
301 |
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
321 |
} )
|
322 |
.catch( ( error ) => {
|
323 |
report(
|
@@ -351,17 +361,29 @@ const ImportSite = () => {
|
|
351 |
method: 'post',
|
352 |
body: customizerContent,
|
353 |
} )
|
354 |
-
.then( ( response ) => response.
|
355 |
-
.then( (
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
365 |
}
|
366 |
} )
|
367 |
.catch( ( error ) => {
|
@@ -393,17 +415,29 @@ const ImportSite = () => {
|
|
393 |
method: 'post',
|
394 |
body: siteOptions,
|
395 |
} )
|
396 |
-
.then( ( response ) => response.
|
397 |
-
.then( (
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
407 |
}
|
408 |
} )
|
409 |
.catch( ( error ) => {
|
@@ -463,55 +497,75 @@ const ImportSite = () => {
|
|
463 |
}
|
464 |
|
465 |
for ( let $i = 0; $i < allResetOptions.length; $i++ ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
466 |
fetch( ajaxurl, {
|
467 |
method: 'post',
|
468 |
body: allResetOptions[ $i ],
|
469 |
} )
|
470 |
-
.then( ( response ) => response.
|
471 |
-
.then( (
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
importStatus: data.data,
|
476 |
-
} );
|
477 |
-
if ( $i === allResetOptions.length - 1 ) {
|
478 |
dispatch( {
|
479 |
type: 'set',
|
480 |
-
|
481 |
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
482 |
}
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
489 |
}
|
490 |
-
} else {
|
491 |
-
throw data.data;
|
492 |
}
|
493 |
} )
|
494 |
.catch( ( error ) => {
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
|
|
|
|
|
|
|
|
502 |
}
|
503 |
-
report(
|
504 |
-
sprintf(
|
505 |
-
/* Translators: %s is action. */
|
506 |
-
__( 'Resetting Failed for %s', 'astra-sites' ),
|
507 |
-
actionText
|
508 |
-
),
|
509 |
-
'',
|
510 |
-
`${ error.message }`,
|
511 |
-
'',
|
512 |
-
'',
|
513 |
-
`${ error.message }: ${ error.stack }`
|
514 |
-
);
|
515 |
} );
|
516 |
}
|
517 |
};
|
@@ -532,17 +586,29 @@ const ImportSite = () => {
|
|
532 |
method: 'post',
|
533 |
body: widgets,
|
534 |
} )
|
535 |
-
.then( ( response ) => response.
|
536 |
-
.then( (
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
546 |
}
|
547 |
} )
|
548 |
.catch( ( error ) => {
|
@@ -600,10 +666,7 @@ const ImportSite = () => {
|
|
600 |
report(
|
601 |
__( 'Importing CartFlows flows Failed.', 'astra-sites' ),
|
602 |
'',
|
603 |
-
|
604 |
-
'',
|
605 |
-
'',
|
606 |
-
`${ error.message }: ${ error.stack }`
|
607 |
);
|
608 |
} );
|
609 |
};
|
@@ -651,10 +714,7 @@ const ImportSite = () => {
|
|
651 |
report(
|
652 |
__( 'Importing forms Failed.', 'astra-sites' ),
|
653 |
'',
|
654 |
-
|
655 |
-
'',
|
656 |
-
'',
|
657 |
-
`${ error.message }: ${ error.stack }`
|
658 |
);
|
659 |
} );
|
660 |
};
|
@@ -702,10 +762,7 @@ const ImportSite = () => {
|
|
702 |
report(
|
703 |
__( 'Importing Customizer JSON Failed.', 'astra-sites' ),
|
704 |
'',
|
705 |
-
|
706 |
-
'',
|
707 |
-
'',
|
708 |
-
`${ error.message }: ${ error.stack }`
|
709 |
);
|
710 |
} );
|
711 |
};
|
@@ -815,10 +872,7 @@ const ImportSite = () => {
|
|
815 |
report(
|
816 |
__( 'Importing Site Content Failed.', 'astra-sites' ),
|
817 |
'',
|
818 |
-
|
819 |
-
'',
|
820 |
-
'',
|
821 |
-
`${ error.message }: ${ error.stack }`
|
822 |
);
|
823 |
} );
|
824 |
};
|
@@ -857,10 +911,7 @@ const ImportSite = () => {
|
|
857 |
report(
|
858 |
__( 'Importing Site Options Failed.', 'astra-sites' ),
|
859 |
'',
|
860 |
-
|
861 |
-
'',
|
862 |
-
'',
|
863 |
-
`${ error.message }: ${ error.stack }`
|
864 |
);
|
865 |
} );
|
866 |
};
|
@@ -909,10 +960,7 @@ const ImportSite = () => {
|
|
909 |
report(
|
910 |
__( 'Importing Widgets Failed.', 'astra-sites' ),
|
911 |
'',
|
912 |
-
|
913 |
-
'',
|
914 |
-
'',
|
915 |
-
`${ error.message }: ${ error.stack }`
|
916 |
);
|
917 |
} );
|
918 |
};
|
@@ -981,10 +1029,7 @@ const ImportSite = () => {
|
|
981 |
report(
|
982 |
__( 'Final finishings Failed.', 'astra-sites' ),
|
983 |
'',
|
984 |
-
|
985 |
-
'',
|
986 |
-
'',
|
987 |
-
`${ error.message }: ${ error.stack }`
|
988 |
);
|
989 |
} );
|
990 |
};
|
1 |
+
import React, { useEffect, useState } from 'react';
|
2 |
import { __, sprintf } from '@wordpress/i18n';
|
3 |
import Lottie from 'react-lottie-player';
|
4 |
import PreviousStepLink from '../../components/util/previous-step-link/index';
|
48 |
dispatch,
|
49 |
] = storedState;
|
50 |
|
51 |
+
const [ resetFailedCount, setResetFailedCount ] = useState( 0 );
|
52 |
+
|
53 |
let percentage = importPercent;
|
54 |
|
55 |
/**
|
185 |
'astra-sites'
|
186 |
),
|
187 |
'',
|
188 |
+
err
|
|
|
|
|
|
|
189 |
);
|
190 |
},
|
191 |
},
|
259 |
'astra-sites'
|
260 |
),
|
261 |
'',
|
262 |
+
error,
|
263 |
'',
|
264 |
+
astraSitesVars.importFailedRequiredPluginsMessage
|
|
|
265 |
);
|
266 |
} );
|
267 |
};
|
290 |
method: 'post',
|
291 |
body: content,
|
292 |
} )
|
293 |
+
.then( ( response ) => response.text() )
|
294 |
+
.then( ( text ) => {
|
295 |
+
try {
|
296 |
+
const data = JSON.parse( text );
|
297 |
+
dispatch( {
|
298 |
+
type: 'set',
|
299 |
+
resetData: data.data,
|
300 |
+
} );
|
301 |
|
302 |
+
/**
|
303 |
+
* Reset Customizer.
|
304 |
+
*/
|
305 |
+
performResetCustomizer();
|
306 |
+
|
307 |
+
/**
|
308 |
+
* Reset Site Options.
|
309 |
+
*/
|
310 |
+
performResetSiteOptions();
|
311 |
+
|
312 |
+
/**
|
313 |
+
* Reset Terms, Posts and Forms in Queue.
|
314 |
+
*/
|
315 |
+
performResetContent( data.data );
|
316 |
+
|
317 |
+
/**
|
318 |
+
* Reset Widgets.
|
319 |
+
*/
|
320 |
+
performResetWidget();
|
321 |
+
} catch ( error ) {
|
322 |
+
report(
|
323 |
+
__( 'Resetting website failed.', 'astra-sites' ),
|
324 |
+
'',
|
325 |
+
`${ error.message }`,
|
326 |
+
'',
|
327 |
+
'',
|
328 |
+
`${ text }`
|
329 |
+
);
|
330 |
+
}
|
331 |
} )
|
332 |
.catch( ( error ) => {
|
333 |
report(
|
361 |
method: 'post',
|
362 |
body: customizerContent,
|
363 |
} )
|
364 |
+
.then( ( response ) => response.text() )
|
365 |
+
.then( ( text ) => {
|
366 |
+
try {
|
367 |
+
const response = JSON.parse( text );
|
368 |
+
if ( response.success ) {
|
369 |
+
percentage += 2;
|
370 |
+
dispatch( {
|
371 |
+
type: 'set',
|
372 |
+
importPercent: percentage,
|
373 |
+
resetCustomizer: true,
|
374 |
+
} );
|
375 |
+
} else {
|
376 |
+
throw response.data;
|
377 |
+
}
|
378 |
+
} catch ( error ) {
|
379 |
+
report(
|
380 |
+
__( 'Resetting customizer failed.', 'astra-sites' ),
|
381 |
+
'',
|
382 |
+
`${ error.message }`,
|
383 |
+
'',
|
384 |
+
'',
|
385 |
+
`${ text }`
|
386 |
+
);
|
387 |
}
|
388 |
} )
|
389 |
.catch( ( error ) => {
|
415 |
method: 'post',
|
416 |
body: siteOptions,
|
417 |
} )
|
418 |
+
.then( ( response ) => response.text() )
|
419 |
+
.then( ( text ) => {
|
420 |
+
try {
|
421 |
+
const data = JSON.parse( text );
|
422 |
+
if ( data.success ) {
|
423 |
+
percentage += 2;
|
424 |
+
dispatch( {
|
425 |
+
type: 'set',
|
426 |
+
importPercent: percentage,
|
427 |
+
resetSiteOptions: true,
|
428 |
+
} );
|
429 |
+
} else {
|
430 |
+
throw data.data;
|
431 |
+
}
|
432 |
+
} catch ( error ) {
|
433 |
+
report(
|
434 |
+
__( 'Resetting site options Failed.', 'astra-sites' ),
|
435 |
+
'',
|
436 |
+
`${ error.message }`,
|
437 |
+
'',
|
438 |
+
'',
|
439 |
+
`${ text }`
|
440 |
+
);
|
441 |
}
|
442 |
} )
|
443 |
.catch( ( error ) => {
|
497 |
}
|
498 |
|
499 |
for ( let $i = 0; $i < allResetOptions.length; $i++ ) {
|
500 |
+
const action = allResetOptions[ $i ].get( 'action' );
|
501 |
+
let actionText =
|
502 |
+
action === 'astra-sites-delete-terms' ? 'terms' : 'posts';
|
503 |
+
if ( action === 'astra-sites-delete-wp-forms' ) {
|
504 |
+
actionText = 'forms';
|
505 |
+
}
|
506 |
fetch( ajaxurl, {
|
507 |
method: 'post',
|
508 |
body: allResetOptions[ $i ],
|
509 |
} )
|
510 |
+
.then( ( response ) => response.text() )
|
511 |
+
.then( ( text ) => {
|
512 |
+
try {
|
513 |
+
const data = JSON.parse( text );
|
514 |
+
if ( data.success ) {
|
|
|
|
|
|
|
515 |
dispatch( {
|
516 |
type: 'set',
|
517 |
+
importStatus: data.data,
|
518 |
} );
|
519 |
+
if ( $i === allResetOptions.length - 1 ) {
|
520 |
+
dispatch( {
|
521 |
+
type: 'set',
|
522 |
+
resetContent: true,
|
523 |
+
} );
|
524 |
+
}
|
525 |
+
if ( 0 === $i % 10 ) {
|
526 |
+
percentage += 1;
|
527 |
+
dispatch( {
|
528 |
+
type: 'set',
|
529 |
+
importPercent: percentage,
|
530 |
+
} );
|
531 |
+
}
|
532 |
+
} else {
|
533 |
+
throw data.data;
|
534 |
}
|
535 |
+
} catch ( error ) {
|
536 |
+
if ( resetFailedCount < 1 ) {
|
537 |
+
report(
|
538 |
+
sprintf(
|
539 |
+
/* Translators: %s is action. */
|
540 |
+
__(
|
541 |
+
'Resetting Failed for %s',
|
542 |
+
'astra-sites'
|
543 |
+
),
|
544 |
+
actionText
|
545 |
+
),
|
546 |
+
'',
|
547 |
+
`${ error.message }`,
|
548 |
+
'',
|
549 |
+
'',
|
550 |
+
`${ text }`
|
551 |
+
);
|
552 |
+
setResetFailedCount( 1 );
|
553 |
}
|
|
|
|
|
554 |
}
|
555 |
} )
|
556 |
.catch( ( error ) => {
|
557 |
+
if ( resetFailedCount < 1 ) {
|
558 |
+
report(
|
559 |
+
sprintf(
|
560 |
+
/* Translators: %s is action. */
|
561 |
+
__( 'Resetting Failed for %s', 'astra-sites' ),
|
562 |
+
actionText
|
563 |
+
),
|
564 |
+
'',
|
565 |
+
error
|
566 |
+
);
|
567 |
+
setResetFailedCount( 1 );
|
568 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
569 |
} );
|
570 |
}
|
571 |
};
|
586 |
method: 'post',
|
587 |
body: widgets,
|
588 |
} )
|
589 |
+
.then( ( response ) => response.text() )
|
590 |
+
.then( ( text ) => {
|
591 |
+
try {
|
592 |
+
const response = JSON.parse( text );
|
593 |
+
if ( response.success ) {
|
594 |
+
percentage += 2;
|
595 |
+
dispatch( {
|
596 |
+
type: 'set',
|
597 |
+
importPercent: percentage,
|
598 |
+
resetWidgets: true,
|
599 |
+
} );
|
600 |
+
} else {
|
601 |
+
throw response.data;
|
602 |
+
}
|
603 |
+
} catch ( error ) {
|
604 |
+
report(
|
605 |
+
__( 'Resetting widgets failed.', 'astra-sites' ),
|
606 |
+
'',
|
607 |
+
`${ error.message }`,
|
608 |
+
'',
|
609 |
+
'',
|
610 |
+
`${ text }`
|
611 |
+
);
|
612 |
}
|
613 |
} )
|
614 |
.catch( ( error ) => {
|
666 |
report(
|
667 |
__( 'Importing CartFlows flows Failed.', 'astra-sites' ),
|
668 |
'',
|
669 |
+
error
|
|
|
|
|
|
|
670 |
);
|
671 |
} );
|
672 |
};
|
714 |
report(
|
715 |
__( 'Importing forms Failed.', 'astra-sites' ),
|
716 |
'',
|
717 |
+
error
|
|
|
|
|
|
|
718 |
);
|
719 |
} );
|
720 |
};
|
762 |
report(
|
763 |
__( 'Importing Customizer JSON Failed.', 'astra-sites' ),
|
764 |
'',
|
765 |
+
error
|
|
|
|
|
|
|
766 |
);
|
767 |
} );
|
768 |
};
|
872 |
report(
|
873 |
__( 'Importing Site Content Failed.', 'astra-sites' ),
|
874 |
'',
|
875 |
+
error
|
|
|
|
|
|
|
876 |
);
|
877 |
} );
|
878 |
};
|
911 |
report(
|
912 |
__( 'Importing Site Options Failed.', 'astra-sites' ),
|
913 |
'',
|
914 |
+
error
|
|
|
|
|
|
|
915 |
);
|
916 |
} );
|
917 |
};
|
960 |
report(
|
961 |
__( 'Importing Widgets Failed.', 'astra-sites' ),
|
962 |
'',
|
963 |
+
error
|
|
|
|
|
|
|
964 |
);
|
965 |
} );
|
966 |
};
|
1029 |
report(
|
1030 |
__( 'Final finishings Failed.', 'astra-sites' ),
|
1031 |
'',
|
1032 |
+
error
|
|
|
|
|
|
|
1033 |
);
|
1034 |
} );
|
1035 |
};
|
inc/lib/onboarding/classes/class-astra-sites-ai-site-setup.php
CHANGED
@@ -78,6 +78,7 @@ if ( ! class_exists( 'Astra_Sites_AI_Site_Setup' ) ) :
|
|
78 |
'not_activated' => ( ! empty( $plugins['required_plugins']['inactive'] ) ) ? json_encode( $plugins['required_plugins']['inactive'] ) : '',
|
79 |
'version' => ASTRA_SITES_VER,
|
80 |
'role' => json_encode( wp_get_current_user()->roles ),
|
|
|
81 |
),
|
82 |
);
|
83 |
|
78 |
'not_activated' => ( ! empty( $plugins['required_plugins']['inactive'] ) ) ? json_encode( $plugins['required_plugins']['inactive'] ) : '',
|
79 |
'version' => ASTRA_SITES_VER,
|
80 |
'role' => json_encode( wp_get_current_user()->roles ),
|
81 |
+
'active_plugins' => json_encode( get_option( 'active_plugins' ) ),
|
82 |
),
|
83 |
);
|
84 |
|
languages/astra-sites.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the Starter Templates package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Starter Templates 3.0.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/astra-sites\n"
|
7 |
-
"POT-Creation-Date: 2021-12-08
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -1793,7 +1793,7 @@ msgstr ""
|
|
1793 |
msgid "Enable Brizy Page Builder Templates in Starter Templates"
|
1794 |
msgstr ""
|
1795 |
|
1796 |
-
#: inc/lib/onboarding/classes/class-astra-sites-ai-site-setup.php:
|
1797 |
msgid "You are not authorized to perform this action."
|
1798 |
msgstr ""
|
1799 |
|
2 |
# This file is distributed under the same license as the Starter Templates package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Starter Templates 3.0.2\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/astra-sites\n"
|
7 |
+
"POT-Creation-Date: 2021-12-08 13:46:37+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
1793 |
msgid "Enable Brizy Page Builder Templates in Starter Templates"
|
1794 |
msgstr ""
|
1795 |
|
1796 |
+
#: inc/lib/onboarding/classes/class-astra-sites-ai-site-setup.php:116
|
1797 |
msgid "You are not authorized to perform this action."
|
1798 |
msgstr ""
|
1799 |
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: Elementor,Beaver Builder,Templates,Gutenberg,Block Editor,Astra Starter Si
|
|
5 |
Requires at least: 4.4
|
6 |
Requires PHP: 5.3
|
7 |
Tested up to: 5.8
|
8 |
-
Stable tag: 3.0.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -133,6 +133,9 @@ We are open to suggestions and would love to work on topics that our users are l
|
|
133 |
|
134 |
== Changelog ==
|
135 |
|
|
|
|
|
|
|
136 |
v3.0.1 - 8-December-2021
|
137 |
- Improvement: Better handling of errors.
|
138 |
- Fix: Removed extra sub directory from v3.0.0 update.
|
5 |
Requires at least: 4.4
|
6 |
Requires PHP: 5.3
|
7 |
Tested up to: 5.8
|
8 |
+
Stable tag: 3.0.2
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
133 |
|
134 |
== Changelog ==
|
135 |
|
136 |
+
v3.0.2 - 8-December-2021
|
137 |
+
- Fix: Improvised errors for the Site Reset step while importing.
|
138 |
+
|
139 |
v3.0.1 - 8-December-2021
|
140 |
- Improvement: Better handling of errors.
|
141 |
- Fix: Removed extra sub directory from v3.0.0 update.
|