From 46c5f0300c5b840de0a71b170550c03e5edcb692 Mon Sep 17 00:00:00 2001 From: arunshenoy99 Date: Tue, 9 Apr 2024 14:01:17 +0530 Subject: [PATCH] Rebuild --- build/2.1.9/619.js | 2 +- build/2.1.9/onboarding.asset.php | 2 +- build/2.1.9/onboarding.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/2.1.9/619.js b/build/2.1.9/619.js index 7f2990552..d7ad61670 100644 --- a/build/2.1.9/619.js +++ b/build/2.1.9/619.js @@ -1 +1 @@ -"use strict";(globalThis.webpackChunknewfold_Onboarding=globalThis.webpackChunknewfold_Onboarding||[]).push([[619],{619:(e,t,n)=>{n.r(t),n.d(t,{default:()=>E});var a=n(1609),i=n(8468),r=n(7143),s=n(148),o=n(6087),l=n(7723);var d=n(7708),g=n(7517),c=n(1056),p=n(3988),m=n(7044);const u=()=>(0,a.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"24",viewBox:"-5 -2 36 24",fill:"none",className:"heart"},(0,a.createElement)("g",{id:"State=Active"},(0,a.createElement)("path",{id:"Vector",d:"M10 19.1585L8.975 18.2335C7.20833 16.6168 5.75 15.221 4.6 14.046C3.45 12.871 2.53333 11.821 1.85 10.896C1.16667 9.971 0.6875 9.1335 0.4125 8.3835C0.1375 7.6335 0 6.87516 0 6.1085C0 4.6085 0.504167 3.35433 1.5125 2.346C2.52083 1.33766 3.76667 0.833496 5.25 0.833496C6.2 0.833496 7.07917 1.0585 7.8875 1.5085C8.69583 1.9585 9.4 2.6085 10 3.4585C10.7 2.5585 11.4417 1.896 12.225 1.471C13.0083 1.046 13.85 0.833496 14.75 0.833496C16.2333 0.833496 17.4792 1.33766 18.4875 2.346C19.4958 3.35433 20 4.6085 20 6.1085C20 6.87516 19.8625 7.6335 19.5875 8.3835C19.3125 9.1335 18.8333 9.971 18.15 10.896C17.4667 11.821 16.55 12.871 15.4 14.046C14.25 15.221 12.7917 16.6168 11.025 18.2335L10 19.1585Z",fill:"#EF4A71"}))),_=function({count:e=1,isRegenerating:t}){const n=[];for(let i=0;i{const[e,t]=(0,i.useState)(!1),[n,E]=(0,i.useState)(!1),[C,S]=(0,i.useState)(!1),[N,k]=(0,i.useState)(!1),F=(0,s.Zp)(),D=(0,i.useRef)(),{currentData:G,nextStep:x,siteGenErrorStatus:I,themeStatus:R}=(0,r.useSelect)((e=>({currentData:e(f.M).getCurrentOnboardingData(),nextStep:e(f.M).getNextStep(),siteGenErrorStatus:e(f.M).getSiteGenErrorStatus(),themeStatus:e(f.M).getThemeStatus()}))),{setIsHeaderEnabled:A,setSidebarActiveView:O,setHeaderActiveView:M,setDrawerActiveView:H,setCurrentOnboardingData:T,updateInitialize:V,setHideFooterNav:B,updateSiteGenErrorStatus:Z,setIsHeaderNavigationEnabled:z}=(0,r.useDispatch)(f.M);(0,i.useEffect)((()=>{A(!0),B(!0),O(!1),M(y.Ix),H(!1),V(!0)}),[]),(0,i.useEffect)((()=>{!0===D.current&&!1===I&&(L(),W(),z(!1)),D.current=I}),[I]);const L=async()=>{if(S(!0),!(0,o.isEmpty)(G.sitegen.homepages.data))return t(G.sitegen.homepages.data),S(!1),void P();if(""===G.sitegen.siteDetails?.prompt)return void S(!1);const e=await(0,d.c7)(G.sitegen.siteDetails.prompt);if(e.error)return S(!1),void Z(!0);G.sitegen.homepages.data=e.body,t(e.body),T(G),S(!1),P()},P=()=>{window.nfdOnboarding.siteGenTimerInterval&&(clearInterval(window.nfdOnboarding.siteGenTimerInterval),(0,c.v)(new c.iC(b.uv,window.nfdOnboarding.siteGenTime,{source:h.d0})))},W=async()=>{const e=await(0,g.w6)();e.error?S(!1):k(e.body)};(0,i.useEffect)((()=>{y.Er===R&&(L(),W())}),[R]);const j=(t,n)=>{if(!(t in e))return!1;G.sitegen.homepages.active=e[t],G.sitegen.skipCache=!1,T(G),(0,c.v)(new c.iC(b.Wi,t,{position:n,source:h.d0})),F(x.path)},q=(n,a)=>{if(!(n in e))return;const i=!e[n].isFavorite;e[n].isFavorite=i,G.sitegen.homepages.data=e,t(e),T(G),(0,c.v)(new c.iC(b.Nz,n,{favorite:i,placement:"preview_grid",position:a,source:h.d0}))},U=async(n,a,i,r)=>{if(document.getElementsByClassName("nfd-onboarding-step--site-gen__preview__note")&&document.getElementsByClassName("nfd-onboarding-step--site-gen__preview__note")[0].scrollIntoView({behavior:"smooth",block:"end"}),E(!0),!(n in e))return void E(!1);if(""===G.sitegen.siteDetails?.prompt)return void E(!1);const s=await(0,d.HA)(G.sitegen.siteDetails.prompt,n,a,i);if(s.error)return void E(!1);const o=s.body;e[o.slug]=o,G.sitegen.homepages.data=e,t(e),T(G),E(!1),(0,c.v)(new c.iC(b.Hf,n,{position:r,source:h.d0,placement:"preview_grid"}))},X={heading:(0,l.__)("Presto, here are 3 versions","wp-module-onboarding"),subheading:(0,l.__)("We've created 3 unique website designs for you to start with, preview click around or start over.","wp-module-onboarding"),favouriteNote:(0,l.__)("Favorite a generated version to find and use again in the future.","wp-module-onboarding"),generating:(0,l.__)("Generating Site","wp-module-onboarding"),regenerating:(0,l.__)("Regenerating Site","wp-module-onboarding")};return(0,a.createElement)(w.UX,null,(0,a.createElement)(w.tR,null,(0,a.createElement)(p.A,{className:"nfd-onboarding-step--site-gen__preview"},(0,a.createElement)("div",{className:"nfd-onboarding-step--site-gen__preview__container"},!C&&(0,a.createElement)(v.A,{type:"fade-in"},(0,a.createElement)("div",{className:"nfd-onboarding-step--site-gen__preview__container__heading"},(0,a.createElement)("p",{className:"nfd-onboarding-step--site-gen__preview__container__heading__text"},X.heading)),(0,a.createElement)("div",{className:"nfd-onboarding-step--site-gen__preview__container__sub-heading"},(0,a.createElement)("p",{className:"nfd-onboarding-step--site-gen__preview__container__sub-heading__text"},X.subheading)))),(0,a.createElement)("div",{className:"nfd-onboarding-step--site-gen__preview__options"},e&&N&&!C?Object.keys(e).map(((t,i)=>{const r=e[t],s=(0,o.cloneDeep)(N[0]);s.settings.color.palette=r.color.palette;const l=r.styles?.blocks[0]?.["core/body"]?.typography?.fontFamily,d=r.styles?.blocks[0]?.["core/heading"]?.typography?.fontFamily;s.styles.typography&&l&&(s.styles.typography.fontFamily=l),s.styles.blocks["core/heading"].typography&&d&&(s.styles.blocks["core/heading"].typography.fontFamily=d);let g="";return["header","content","footer"].forEach((e=>{e in r&&(g+=r[e])})),(0,a.createElement)(m.GZ,{key:i,blockGrammar:g,previewSettings:s,slug:t,position:i+1,title:r.title,isFavorite:r.isFavorite,palette:r.color,styling:"custom",overlay:!0,tabIndex:"0",role:"button",handleFavorite:q,handleRegenerate:U,handlePreview:j,isRegenerating:n})})):(0,a.createElement)(_,{count:3,isRegenerating:!1}),n&&(0,a.createElement)(_,{count:1,isRegenerating:!0})),(0,a.createElement)("div",{className:"nfd-onboarding-step--site-gen__preview__note"},(0,a.createElement)(u,null),(0,a.createElement)("span",null,X.favouriteNote)))))}}}]); \ No newline at end of file +"use strict";(globalThis.webpackChunknewfold_Onboarding=globalThis.webpackChunknewfold_Onboarding||[]).push([[619],{619:(e,t,n)=>{n.r(t),n.d(t,{default:()=>E});var a=n(1609),r=n(8468),i=n(7143),s=n(148),o=n(6087),d=n(7723);var l=n(7708),g=n(7517),c=n(1056),p=n(3988),m=n(7044);const u=()=>(0,a.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"24",viewBox:"-5 -2 36 24",fill:"none",className:"heart"},(0,a.createElement)("g",{id:"State=Active"},(0,a.createElement)("path",{id:"Vector",d:"M10 19.1585L8.975 18.2335C7.20833 16.6168 5.75 15.221 4.6 14.046C3.45 12.871 2.53333 11.821 1.85 10.896C1.16667 9.971 0.6875 9.1335 0.4125 8.3835C0.1375 7.6335 0 6.87516 0 6.1085C0 4.6085 0.504167 3.35433 1.5125 2.346C2.52083 1.33766 3.76667 0.833496 5.25 0.833496C6.2 0.833496 7.07917 1.0585 7.8875 1.5085C8.69583 1.9585 9.4 2.6085 10 3.4585C10.7 2.5585 11.4417 1.896 12.225 1.471C13.0083 1.046 13.85 0.833496 14.75 0.833496C16.2333 0.833496 17.4792 1.33766 18.4875 2.346C19.4958 3.35433 20 4.6085 20 6.1085C20 6.87516 19.8625 7.6335 19.5875 8.3835C19.3125 9.1335 18.8333 9.971 18.15 10.896C17.4667 11.821 16.55 12.871 15.4 14.046C14.25 15.221 12.7917 16.6168 11.025 18.2335L10 19.1585Z",fill:"#EF4A71"}))),_=function({count:e=1,isRegenerating:t}){const n=[];for(let r=0;r{const[e,t]=(0,r.useState)(!1),[n,E]=(0,r.useState)(!1),[C,S]=(0,r.useState)(!1),[N,k]=(0,r.useState)(!1),F=(0,s.Zp)(),D=(0,r.useRef)(),{currentData:G,nextStep:x,siteGenErrorStatus:I,themeStatus:R}=(0,i.useSelect)((e=>({currentData:e(f.M).getCurrentOnboardingData(),nextStep:e(f.M).getNextStep(),siteGenErrorStatus:e(f.M).getSiteGenErrorStatus(),themeStatus:e(f.M).getThemeStatus()}))),{setIsHeaderEnabled:A,setSidebarActiveView:O,setHeaderActiveView:M,setDrawerActiveView:H,setCurrentOnboardingData:T,updateInitialize:V,setHideFooterNav:B,updateSiteGenErrorStatus:Z,setIsHeaderNavigationEnabled:z}=(0,i.useDispatch)(f.M);(0,r.useEffect)((()=>{A(!0),B(!0),O(!1),M(y.Ix),H(!1),V(!0)}),[]),(0,r.useEffect)((()=>{!0===D.current&&!1===I&&(L(),W(),z(!1)),D.current=I}),[I]);const L=async()=>{if(S(!0),!(0,o.isEmpty)(G.sitegen.homepages.data))return t(G.sitegen.homepages.data),S(!1),void P();if(""===G.sitegen.siteDetails?.prompt)return void S(!1);const e=await(0,l.c7)(G.sitegen.siteDetails.prompt);if(e.error)return S(!1),void Z(!0);G.sitegen.homepages.data=e.body,t(e.body),T(G),S(!1),P()},P=()=>{window.nfdOnboarding.siteGenTimerInterval&&(clearInterval(window.nfdOnboarding.siteGenTimerInterval),(0,c.v)(new c.iC(b.uv,window.nfdOnboarding.siteGenTime,{source:h.d0})))},W=async()=>{const e=await(0,g.w6)();e.error?S(!1):k(e.body)};(0,r.useEffect)((()=>{y.Er===R&&(L(),W())}),[R]);const j=(t,n)=>{if(!(t in e))return!1;G.sitegen.homepages.active=e[t],G.sitegen.skipCache=!1,T(G),(0,c.v)(new c.iC(b.Wi,t,{position:n,source:h.d0})),F(x.path)},q=(n,a)=>{if(!(n in e))return;const r=!e[n].isFavorite;e[n].isFavorite=r,G.sitegen.homepages.data=e,t(e),T(G),(0,c.v)(new c.iC(b.Nz,n,{favorite:r,placement:"preview_grid",position:a,source:h.d0}))},U=async(n,a,r,i)=>{if(document.getElementsByClassName("nfd-onboarding-step--site-gen__preview__note")&&document.getElementsByClassName("nfd-onboarding-step--site-gen__preview__note")[0].scrollIntoView({behavior:"smooth",block:"end"}),E(!0),!(n in e))return void E(!1);if(""===G.sitegen.siteDetails?.prompt)return void E(!1);const s=await(0,l.HA)(G.sitegen.siteDetails.prompt,n,a,r);if(s.error)return void E(!1);const o=s.body;e[o.slug]=o,G.sitegen.homepages.data=e,t(e),T(G),E(!1),(0,c.v)(new c.iC(b.Hf,n,{position:i,source:h.d0,placement:"preview_grid"}))},X={heading:(0,d.__)("Presto, here are 3 versions","wp-module-onboarding"),subheading:(0,d.__)("We've created 3 unique website designs for you to start with, preview click around or start over.","wp-module-onboarding"),favouriteNote:(0,d.__)("Favorite a generated version to find and use again in the future.","wp-module-onboarding"),generating:(0,d.__)("Generating Site","wp-module-onboarding"),regenerating:(0,d.__)("Regenerating Site","wp-module-onboarding")};return(0,a.createElement)(w.UX,{render:!1},(0,a.createElement)(w.tR,null,(0,a.createElement)(p.A,{className:"nfd-onboarding-step--site-gen__preview"},(0,a.createElement)("div",{className:"nfd-onboarding-step--site-gen__preview__container"},!C&&(0,a.createElement)(v.A,{type:"fade-in"},(0,a.createElement)("div",{className:"nfd-onboarding-step--site-gen__preview__container__heading"},(0,a.createElement)("p",{className:"nfd-onboarding-step--site-gen__preview__container__heading__text"},X.heading)),(0,a.createElement)("div",{className:"nfd-onboarding-step--site-gen__preview__container__sub-heading"},(0,a.createElement)("p",{className:"nfd-onboarding-step--site-gen__preview__container__sub-heading__text"},X.subheading)))),(0,a.createElement)("div",{className:"nfd-onboarding-step--site-gen__preview__options"},e&&N&&!C?Object.keys(e).map(((t,r)=>{const i=e[t],s=(0,o.cloneDeep)(N[0]);s.settings.color.palette=i.color.palette;const d=i.styles?.blocks[0]?.["core/body"]?.typography?.fontFamily,l=i.styles?.blocks[0]?.["core/heading"]?.typography?.fontFamily;s.styles.typography&&d&&(s.styles.typography.fontFamily=d),s.styles.blocks["core/heading"].typography&&l&&(s.styles.blocks["core/heading"].typography.fontFamily=l);let g="";return["header","content","footer"].forEach((e=>{e in i&&(g+=i[e])})),(0,a.createElement)(m.GZ,{key:r,blockGrammar:g,previewSettings:s,slug:t,position:r+1,title:i.title,isFavorite:i.isFavorite,palette:i.color,styling:"custom",overlay:!0,tabIndex:"0",role:"button",handleFavorite:q,handleRegenerate:U,handlePreview:j,isRegenerating:n})})):(0,a.createElement)(_,{count:3,isRegenerating:!1}),n&&(0,a.createElement)(_,{count:1,isRegenerating:!0})),(0,a.createElement)("div",{className:"nfd-onboarding-step--site-gen__preview__note"},(0,a.createElement)(u,null),(0,a.createElement)("span",null,X.favouriteNote)))))}}}]); \ No newline at end of file diff --git a/build/2.1.9/onboarding.asset.php b/build/2.1.9/onboarding.asset.php index db1cdfcc5..eb5df2870 100644 --- a/build/2.1.9/onboarding.asset.php +++ b/build/2.1.9/onboarding.asset.php @@ -1 +1 @@ - array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-preferences', 'wp-primitives', 'wp-style-engine', 'wp-url'), 'version' => '9b018c02a224febc739a'); + array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-preferences', 'wp-primitives', 'wp-style-engine', 'wp-url'), 'version' => 'c2275ccdfe760dbd8ccd'); diff --git a/build/2.1.9/onboarding.js b/build/2.1.9/onboarding.js index b375a6d00..53ff3e5f4 100644 --- a/build/2.1.9/onboarding.js +++ b/build/2.1.9/onboarding.js @@ -30,7 +30,7 @@ (0,m.__)("Would you like to enter your WordPress Dashboard or continue setting up your %s?","wp-module-onboarding"),(0,h.P)("site")),question1:(0,m.__)("You've made great progress! Would you like to keep going with the setup or take it from here?","wp-module-onboarding"),question2:(0,m.sprintf)(/* translators: Brand */ /* translators: Brand */ (0,m.__)("You can continue from your %s home page in the Next steps list.","wp-module-onboarding"),e),redirectMessage:(0,m.__)("Taking you to WordPress in…","wp-module-onboarding")},buttons:{button1:{text:(0,m.__)("Enter WordPress","wp-module-onboarding")},button2:{text:(0,m.__)("Continue Setup","wp-module-onboarding")}}}))(C);return(0,r.createElement)(u.A,{isBgPrimary:!0,isCentered:!0},(0,r.createElement)(p.A,{className:"chapter-interstitial"},(0,r.createElement)(d.A,{heading:x.heading,subHeading:x.subheading}),(0,r.createElement)("div",{className:"chapter-interstitial__content"},(0,r.createElement)("div",{className:"chapter-interstitial__content__column-left"},(0,r.createElement)("h2",{className:"chapter-interstitial__content__column-left__heading"},x.content.heading),(0,r.createElement)("p",{className:"chapter-interstitial__content__column-left__question1"},x.content.question1),(0,r.createElement)("p",{className:"chapter-interstitial__content__column-left__question2"},x.content.question2),(0,r.createElement)("h2",{className:"chapter-interstitial__content__column-left__heading"},x.content.redirectMessage,(0,r.createElement)("br",null)," ",e)),(0,r.createElement)("div",{className:"chapter-interstitial__content__column-right"},(0,r.createElement)("div",{className:"chapter-interstitial__content__column-right__img"}))),(0,r.createElement)("div",{className:"chapter-interstitial__buttons"},(0,r.createElement)(g.default,{onClick:()=>k(),text:x.buttons.button1.text,className:"chapter-interstitial__buttons--blue"}),(0,r.createElement)(f.default,{onClick:()=>n(N.path),text:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("b",{className:"chapter-interstitial__buttons--white__text"},x.buttons.button2.text),(0,r.createElement)(s.A,{className:"chapter-interstitial__buttons--white__icon",icon:l.A})),className:"chapter-interstitial__buttons--white"}))))}},6478:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(1609),a=n(6942),i=n.n(a);const o=({className:e})=>(0,r.createElement)("div",{className:i()("nfd-onboarding-loader--spinner",e)})},212:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(1609),a=n(3988),i=n(4639),o=n(9889);const s=({title:e,subtitle:t})=>(0,r.createElement)(a.A,{className:"step-loader",isVerticallyCentered:!0},(0,r.createElement)(i.A,{title:e,subtitle:t}),(0,r.createElement)("div",{className:"step-loader__logo-container"},(0,r.createElement)("div",{className:"step-loader__logo"})),(0,r.createElement)(o.A,null))},518:(e,t,n)=>{"use strict";n.d(t,{c:()=>o,S:()=>r.A});var r=n(212),a=n(1609),i=n(431);const o=()=>(0,a.createElement)("div",{className:"image-upload-loader--loading-box"},(0,a.createElement)(i.A,{type:"load",className:"image-upload-loader--loading-box__loader"}))},9889:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(1609),a=n(7675),i=n(7143),o=n(7723);const s=({question:e=(0,o.__)("Need Help?","wp-module-onboarding"),urlLabel:t=(0,o.__)("Hire our Experts","wp-module-onboarding")})=>{const n=(0,i.select)(a.M).getHireExpertsUrl();return n&&(0,r.createElement)("div",{className:"nfd-card-need-help-tag"},e,(0,r.createElement)("a",{href:n,target:"_blank",rel:"noreferrer"},t))}},5842:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(1609),a=n(6942),i=n.n(a);const o=({className:e="",children:t})=>(0,r.createElement)("div",{className:i()("nfd-onboarding-large-card",e)},(0,r.createElement)("div",{className:"nfd-onboarding-large-card__logo"}),t)},7673:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(1609),a=n(8468);const i=({height:e="80px"})=>{const t={"--wnd-ai-logo-size":e,height:`var(--wnd-ai-logo-size, ${e})`};return(0,a.useEffect)((()=>{document.querySelectorAll("[data-wnd-ai-logo]").forEach((function(e){let t=!1,n=null;const r=()=>{t?document.body.classList.add("wnd-ai-logo-keydown"):document.body.classList.remove("wnd-ai-logo-keydown"),n=null};e.addEventListener("keydown",(function(){t||(t=!0,n||(n=window.requestAnimationFrame(r)))})),e.addEventListener("keyup",(function(){t=!1,n||(n=window.requestAnimationFrame(r))}))}))}),[]),(0,r.createElement)("span",{className:"wnd-ai-logo",style:t},(0,r.createElement)("span",{className:"wnd-ai-logo__circle wnd-ai-logo__circle--bg"}),(0,r.createElement)("span",{className:"wnd-ai-logo__circle wnd-ai-logo__circle--1"}),(0,r.createElement)("span",{className:"wnd-ai-logo__circle wnd-ai-logo__circle--2"}),(0,r.createElement)("span",{className:"wnd-ai-logo__circle wnd-ai-logo__circle--3"}),(0,r.createElement)("span",{className:"wnd-ai-logo__circle wnd-ai-logo__circle--4"}),(0,r.createElement)("span",{className:"wnd-ai-logo__circle wnd-ai-logo__circle--5"}),(0,r.createElement)("span",{className:"wnd-ai-logo__circle wnd-ai-logo__circle--6"}),(0,r.createElement)("span",{className:"wnd-ai-logo__spinner"}))}},2538:(e,t,n)=>{"use strict";n.d(t,{L:()=>a,Z:()=>o});var r=n(6087);const a={NONE:"none",AD_LINK_ERROR:"ad-link-error",INVALID_LINK_ERROR:"invalid-link-error"},i={facebook_site:"facebook",twitter_site:"twitter",instagram_url:"instagram",youtube_url:"youtube",linkedin_url:"linkedin",yelp_url:"yelp",tiktok_url:"tiktok"},o=e=>(0,r.transform)(i,((t,n,r)=>{const a=e?.[r]||e?.other_social_urls?.[r];a&&(t[n]=a)}))},1032:(e,t,n)=>{"use strict";n.d(t,{UX:()=>h,Iy:()=>Pe,tR:()=>Le});var r=n(1609),a=n(7143),i=n(8468),o=n(9491),s=n(7723),l=n(518),c=n(7675),d=n(7517),u=n(8969),p=n(5677);var m=n(5748);const h=({children:e,navigationStateCallback:t=!1,refresh:n=!0,render:h=!0})=>{const g=(0,o.useViewportMatch)("medium"),{storedThemeStatus:f,brandName:w}=(0,a.useSelect)((e=>({storedThemeStatus:e(c.M).getThemeStatus(),brandName:e(c.M).getNewfoldBrandName()})),[]),b=(e=>({loader:{title:(0,s.sprintf)(/* translators: %s: Brand */ /* translators: %s: Brand */ (0,s.__)("Preparing your %s design studio","wp-module-onboarding"),e),subtitle:(0,s.__)("Hang tight while we show you some of the best WordPress has to offer!","wp-module-onboarding")},errorState:{title:(0,s.sprintf)(/* translators: %s: Brand */ /* translators: %s: Brand */ -(0,s.__)("Preparing your %s design studio","wp-module-onboarding"),e),subtitle:(0,s.__)("Hang tight while we show you some of the best WordPress has to offer!","wp-module-onboarding"),error:(0,s.__)("Uh-oh, something went wrong. Please contact support.","wp-module-onboarding")}}))(w),{updateThemeStatus:_,setIsDrawerOpened:v,setIsDrawerSuppressed:E,setIsHeaderNavigationEnabled:y}=(0,a.useDispatch)(c.M),S=()=>{switch(f){case u.SQ:case u.Er:return(()=>{if("function"==typeof t)return t();g&&v(!0),E(!1),y(!0)})();default:v(!1),E(!0),y(!1)}};(0,i.useEffect)((()=>{S(),f===u.So&&(async()=>{const e=await(async()=>{const e=await(0,d.qv)(u.f1);return e?.error?u.mp:e.body.status})();switch(e){case u.fO:(async()=>{(await(0,d.xN)(u.f1)).error||!0!==n?k():window.location.reload()})();break;case u.Er:!0===n&&window.location.reload();break;default:_(e)}})()}),[f]);const k=async()=>{if(_(u.fO),(await(0,d.ai)(u.f1,!0,!1)).error)return _(u.SQ);!0===n&&window.location.reload()};return(0,r.createElement)(i.Fragment,null,h?(()=>{switch(f){case u.mp:return(0,r.createElement)(m.A,{showButton:!1,isModalOpen:!0,modalTitle:(0,s.__)("It looks like you may have an existing website","wp-module-onboarding"),modalText:(0,s.__)("Going through this setup will change your active theme, WordPress settings, add content – would you like to continue?","wp-module-onboarding"),modalOnClose:k,modalExitButtonText:(0,s.__)("Exit to WordPress","wp-module-onboarding")});case u.SQ:return(0,r.createElement)(p.W,{title:b.errorState.title,subtitle:b.errorState.subtitle,error:b.errorState.error});case u.Er:return e;default:return(0,r.createElement)(l.S,{title:b.loader.title,subtitle:b.loader.subtitle})}})():e)};var g=n(3832),f=n(148),w=n(4371),b=n(6079),_=n(3272),v=n(2940),E=n(7835),y=n(212),S=n(3474);const k=()=>{const{brandName:e}=(0,a.useSelect)((e=>({brandName:e(c.M).getNewfoldBrandName()})),[]),t=(e=>({title:(0,s.sprintf)(/* translators: 1: Brand 2: Site or Store */ /* translators: 1: Brand 2: Site or Store */ +(0,s.__)("Preparing your %s design studio","wp-module-onboarding"),e),subtitle:(0,s.__)("Hang tight while we show you some of the best WordPress has to offer!","wp-module-onboarding"),error:(0,s.__)("Uh-oh, something went wrong. Please contact support.","wp-module-onboarding")}}))(w),{updateThemeStatus:_,setIsDrawerOpened:v,setIsDrawerSuppressed:E,setIsHeaderNavigationEnabled:y}=(0,a.useDispatch)(c.M),S=async()=>{(await(0,d.xN)(u.f1)).error||!0!==n?C():window.location.reload()},k=()=>{switch(f){case u.SQ:case u.Er:return(()=>{if("function"==typeof t)return t();g&&v(!0),E(!1),y(!0)})();default:v(!1),E(!0),y(!1)}};(0,i.useEffect)((()=>{k(),f===u.So&&(async()=>{const e=await(async()=>{const e=await(0,d.qv)(u.f1);return e?.error?u.mp:e.body.status})();switch(e){case u.fO:S();break;case u.Er:!0===n&&window.location.reload();break;case u.mp:!1===h&&S();break;default:_(e)}})()}),[f]);const C=async()=>{if(_(u.fO),(await(0,d.ai)(u.f1,!0,!1)).error)return _(u.SQ);!0===n&&window.location.reload()};return(0,r.createElement)(i.Fragment,null,h?(()=>{switch(f){case u.mp:return(0,r.createElement)(m.A,{showButton:!1,isModalOpen:!0,modalTitle:(0,s.__)("It looks like you may have an existing website","wp-module-onboarding"),modalText:(0,s.__)("Going through this setup will change your active theme, WordPress settings, add content – would you like to continue?","wp-module-onboarding"),modalOnClose:C,modalExitButtonText:(0,s.__)("Exit to WordPress","wp-module-onboarding")});case u.SQ:return(0,r.createElement)(p.W,{title:b.errorState.title,subtitle:b.errorState.subtitle,error:b.errorState.error});case u.Er:return e;default:return(0,r.createElement)(l.S,{title:b.loader.title,subtitle:b.loader.subtitle})}})():e)};var g=n(3832),f=n(148),w=n(4371),b=n(6079),_=n(3272),v=n(2940),E=n(7835),y=n(212),S=n(3474);const k=()=>{const{brandName:e}=(0,a.useSelect)((e=>({brandName:e(c.M).getNewfoldBrandName()})),[]),t=(e=>({title:(0,s.sprintf)(/* translators: 1: Brand 2: Site or Store */ /* translators: 1: Brand 2: Site or Store */ (0,s.__)("Making the keys to your %1$s Online %2$s","wp-module-onboarding"),e,(0,S.P)("Site")),subtitle:(0,s.__)("We’re installing WooCommerce for you to fill with your amazing products & services!","wp-module-onboarding")}))(e);return(0,r.createElement)(y.A,{title:t.title,subtitle:t.subtitle})};var C=n(6427),N=n(6942),T=n.n(N),x=n(4487),A=n(8744);const D=()=>{const{headers:e,headerActiveView:t,isHeaderEnabled:n,currentStep:o}=(0,a.useSelect)((e=>({currentStep:e(c.M).getCurrentStep(),headers:e(c.M).getHeaders(),headerActiveView:e(c.M).getHeaderActiveView(),isHeaderEnabled:e(c.M).isHeaderEnabled()}))),s=o===x.b,l=window.nfdOnboarding.currentFlow===A.d0;return(0,r.createElement)(i.Fragment,null,(0,r.createElement)(i.Suspense,{fallback:(0,r.createElement)(i.Fragment,null)},e.map((e=>(0,r.createElement)(i.Fragment,{key:e.id},(0,r.createElement)(e.header,null))))),(0,r.createElement)(C.Slot,{name:`${t}/${u.KK}`}),n&&(0,r.createElement)("div",{className:T()("nfd-onboarding-header",{"nfd-onboarding-header--dark":s},{"nfd-onboarding-header--sitegen":l})},(0,r.createElement)("div",{className:"nfd-onboarding-header__start"},(0,r.createElement)(C.Slot,{name:`${t}/${u.nK}`})),(0,r.createElement)("div",{className:"nfd-onboarding-header__center"},(0,r.createElement)(C.Slot,{name:`${t}/${u.me}`})),(0,r.createElement)("div",{className:"nfd-onboarding-header__end"},(0,r.createElement)(C.Slot,{name:`${t}/${u.KZ}`}))))},P=(0,i.memo)((()=>{const{routes:e}=(0,a.useSelect)((e=>({routes:e(c.M).getRoutes()}))),t=(0,i.useCallback)((()=>e?.map((e=>(0,r.createElement)(f.qh,{key:e.path,path:e.path,end:!0,element:(0,r.createElement)(e.Component,null)})))),[e]);return(0,r.createElement)("main",{className:"nfd-onboard-content"},(0,r.createElement)(i.Suspense,{fallback:(0,r.createElement)(i.Fragment,null)},(0,r.createElement)(f.BV,null,t(e))))}));var O=n(431),I=n(1056),M=n(7225);function L(e){if(e){const t={};return e?.forEach((e=>{t[e.slug]=e.color})),t}}function z(e){if(e){const t=[];for(const n in e)t.push({slug:n,name:n?.charAt(0).toUpperCase()+n?.slice(1),color:e[n]});return t}}var R=n(3957),V=n(2202);const F=()=>{const e=(0,i.useRef)(null),[t,n]=(0,i.useState)(),[o,l]=(0,i.useState)(),[p,m]=(0,i.useState)(),[h,g]=(0,i.useState)(),[f,w]=(0,i.useState)(""),[b,v]=(0,i.useState)(!1),[E,y]=(0,i.useState)(!0),[S,k]=(0,i.useState)(),{storedPreviewSettings:N,currentData:x,themeStatus:A}=(0,a.useSelect)((e=>({storedPreviewSettings:e(c.M).getPreviewSettings(),currentData:e(c.M).getCurrentOnboardingData(),themeStatus:e(c.M).getThemeStatus()})),[]),{updatePreviewSettings:D,setCurrentOnboardingData:P,updateThemeStatus:F}=(0,a.useDispatch)(c.M);(0,i.useEffect)((()=>{u.Er===A&&($(),"custom"===x?.data?.colorStyle&&(y(!1),e?.current?.scrollIntoView({behavior:"smooth",block:"end"})))}),[A]);const $=async()=>{const[e,t]=await Promise.all([(0,d.w6)(),(0,d.kt)()]);if(t?.error)return F(u.So);if(e?.error)return F(u.So);let r;var a;n(t?.body.tailored),l(t?.body["custom-picker-grouping"]),""!==x?.data?.colorStyle?(r=null!==(a=N?.settings?.color?.palette)&&void 0!==a?a:e.body[0]?.settings?.color?.palette,"custom"===x?.data?.colorStyle&&(m(L(r)),g(L(r))),m(L(r))):H()};async function H(){const e=await(0,d.w6)(!0);let t;x?.data?.theme?.variation?t=e.body.filter((e=>e.title===x.data.theme.variation))[0]:0===e.body[0]?.id&&(t=e.body[0]),D((0,M.AN)(t,N)),g();const n=t.settings.color.palette;x.data.colorStyle="",P(x),m(L(n))}const W=e=>{g(),async function(e){const n=N;let r=N?.settings?.color?.palette;t&&e&&r&&(r=r.map((n=>(t?.[e]?.[n.slug]&&(n.color=t[e][n.slug]),n))),n.settings.color.palette=r,D((0,M.AN)(n,N)))}(e),m(t[e]),z(t[e]),x.data.colorStyle=e,P(x),(0,I.v)(new I.iC(V.Ep,e,{colors:(0,_.g2)(t[e])}))},U=async e=>{const t={...p};if(t[f]=e,o){const n=o[f];n&&n.forEach((n=>{t[n]=e}))}!async function(){const e=N,t=e?.settings?.color?.palette;if(t){for(let e=0;e{h&&void 0!==h[f]&&(t[function(e,t,n){const r=n.findIndex((({slug:t})=>t===e));return-1===r?n.findIndex((({slug:e})=>e===t)):r}(e,f,N?.settings?.color?.palette)].color=h[f])}))}e.settings.color.palette=t,D((0,M.AN)(e,N))}}(),z(t),x.data.colorStyle="custom",P(x),m(t),clearTimeout(S),k(setTimeout((()=>{(0,I.v)(new I.iC(V.Ep,"custom",{colors:(0,_.g2)(t)}))}),1e3)),g(t)},B=e=>{v(!b),w(b?"":e)};return t&&(0,r.createElement)("div",{className:"theme-colors--drawer"},(0,r.createElement)("h2",null,(0,s.__)("Color Palettes","wp-module-onboarding")),Object.keys(t).map(((e,n)=>(0,r.createElement)("div",{key:e,className:T()("color-palette drawer-palette--button",{"color-palette-selected drawer-palette--button--selected":e===x?.data?.colorStyle}),role:"button",tabIndex:n+1,onClick:()=>W(e),onKeyDown:()=>W(e)},(0,r.createElement)("div",{className:"color-palette__colors"},(0,r.createElement)("div",{className:"color-palette__colors--tertiary",style:{backgroundColor:`${t[e]?.["header-background"]}`}}),(0,r.createElement)("div",{className:"color-palette__colors--secondary",style:{backgroundColor:`${t[e]?.secondary}`}}),(0,r.createElement)("div",{className:"color-palette__colors--primary",style:{backgroundColor:`${t[e]?.primary}`}})),(0,r.createElement)("div",{className:"color-palette__name drawer-palette--button__text"},t[e]?.name)))),function(){var t,n,a,i;const o="#fff",l=h&&""!==h?.primary?h.primary:null!==(t=p?.primary)&&void 0!==t?t:o,c=h&&""!==h?.secondary?h.secondary:null!==(n=p?.secondary)&&void 0!==n?n:o,d=h&&""!==h?.["header-background"]?h["header-background"]:null!==(a=p?.["header-background"])&&void 0!==a?a:o;return(0,r.createElement)("div",{className:"custom-palette"},(0,r.createElement)("div",{className:"custom-palette__top",role:"button",tabIndex:0,onClick:()=>y(!E),onKeyDown:()=>y(!E)},(0,r.createElement)("div",{className:"custom-palette__top-text"},(0,s.__)("SELECT CUSTOM COLORS","wp-module-onboarding")),E?(0,r.createElement)("div",{className:"custom-palette__top-icon"},"+"):(0,r.createElement)("div",{className:"custom-palette__top-icon"},"-")),(0,r.createElement)(O.A,{type:"fade-in",duration:"300ms",timingFunction:"ease-in-out",className:"custom-palette__below "+(E?"custom-palette_acc_closed":"custom-palette_acc_opened")},(0,r.createElement)(R.A,{isColorSelected:h,color:null!==(i=h?.base)&&void 0!==i?i:o,slug:"base",name:(0,s.__)("Background","wp-module-onboarding"),callback:B}),(0,r.createElement)(R.A,{isColorSelected:h,color:l,slug:"primary",name:(0,s.__)("Primary","wp-module-onboarding"),callback:B}),(0,r.createElement)(R.A,{isColorSelected:h,color:c,slug:"secondary",name:(0,s.__)("Secondary","wp-module-onboarding"),callback:B}),(0,r.createElement)(R.A,{isColorSelected:h,color:d,slug:"tertiary",name:(0,s.__)("Tertiary","wp-module-onboarding"),callback:B})),h&&(0,r.createElement)(O.A,{type:"fade-in",duration:"300ms"},(0,r.createElement)("div",{ref:e,className:"theme-colors--drawer--reset",role:"button",tabIndex:0,onClick:H,onKeyDown:H},(0,r.createElement)("div",null,(0,s.__)("Reset","wp-module-onboarding")))),b&&(0,r.createElement)(C.Popover,null,(0,r.createElement)("div",{role:"button",tabIndex:0,className:"custom-palette__picker__close-icon",onClick:()=>v(!1),onKeyDown:()=>v(!1)},"X"),(0,r.createElement)(C.ColorPicker,{onChange:U})))}())};var $=n(8520),H=n(7044);const W=()=>{const[e,t]=(0,i.useState)(),[n,o]=(0,i.useState)(),[s,l]=(0,i.useState)(""),d=(0,f.zy)(),{currentStep:p,currentData:m,themeStatus:h,storedPreviewSettings:g}=(0,a.useSelect)((e=>({currentStep:e(c.M).getStepFromPath(d.pathname),currentData:e(c.M).getCurrentOnboardingData(),themeStatus:e(c.M).getThemeStatus(),storedPreviewSettings:e(c.M).getStepPreviewData()})),[]),{setCurrentOnboardingData:w,updateThemeStatus:_,setHeaderMenuData:v}=(0,a.useDispatch)(c.M);return(0,i.useEffect)((()=>{h===u.Er&&(async()=>{const e=await(0,$.O)(p?.data?.patternId);if(e?.error)return _(u.So);const n=e?.body.pageHeaders,r=e?.body.pageFooter,a=e?.body.pageBody;m.data.partHeader&&""!==m.data.partHeader||(m.data.partHeader=n[0].slug,w(m)),m.data?.partFooter&&""!==m.data?.partFooter||(m.data.partFooter=r.slug,w(m)),l(m.data.partHeader),o(e.body),t(n);let[i,s]=["",""];n.forEach((e=>{e.slug===m.data.partHeader&&(i=e.content)})),s=i+a,v(s)})()}),[h]),(0,r.createElement)(H._Z,{count:g[p?.data?.patternId]?.previewCount,watch:e,callback:()=>e?.map(((t,a)=>(0,r.createElement)(H.ph,{key:a,className:"theme-header-menu-preview--drawer__list__item",selected:t.slug===s,blockGrammer:t.content,viewportWidth:900,styling:"custom",overlay:!1,onClick:()=>(async t=>{document.getElementsByClassName("nfd-onboard-content")&&document.getElementsByClassName("nfd-onboard-content")[0].scrollIntoView({behavior:"smooth"});const r=e[t];if(r.slug===s)return!0;l(r.slug),m.data.partHeader=r.slug,w(m);const a=r.content+n.pageBody;v(a);const i=await(0,b.V1)(m);null===i?.error&&w(m),(0,I.v)(new I.iC(V.r2,r.slug))})(a)}))),className:"theme-header-menu-preview--drawer__list__item",viewportWidth:900})},U=()=>(0,r.createElement)("div",{style:{padding:"0 16px"}},(0,r.createElement)("h2",null,(0,s.__)("Pick a Homepage Design","wp-module-onboarding")),(0,r.createElement)("p",null,(0,s.__)("Panel will show a few Homepage Patterns.","wp-module-onboarding"))),B=()=>(0,r.createElement)("div",{style:{padding:"0 16px"}},(0,r.createElement)("h2",null,(0,s.__)("Pick a Theme Style","wp-module-onboarding")),(0,r.createElement)("h4",null,(0,s.__)("No Style Selected","wp-module-onboarding")),(0,r.createElement)("p",null,(0,s.__)("Panel will show Theme details","wp-module-onboarding")),(0,r.createElement)("h4",null,(0,s.__)("With Style Selected","wp-module-onboarding")),(0,r.createElement)("p",null,(0,s.__)("Panel will show single-column of other Styles.","wp-module-onboarding"))),G=()=>{const[e,t]=(0,i.useState)(),[n,o]=(0,i.useState)(),[s,l]=(0,i.useState)(""),{currentStep:p,currentData:m,storedPreviewSettings:h,themeStatus:g,themeVariations:f}=(0,a.useSelect)((e=>({currentStep:e(c.M).getCurrentStep(),currentData:e(c.M).getCurrentOnboardingData(),storedPreviewSettings:e(c.M).getPreviewSettings(),themeStatus:e(c.M).getThemeStatus(),themeVariations:e(c.M).getStepPreviewData()})),[]),{updatePreviewSettings:w,setCurrentOnboardingData:b,updateThemeStatus:_}=(0,a.useDispatch)(c.M);return(0,i.useEffect)((()=>{g===u.Er&&(async()=>{const e=await(0,d.w6)(!0);if(e?.error)return _(u.So);let n;m.data.theme.variation?n=m.data.theme.variation:(n=e.body[0].title,m.data.theme.variation=n,b(m)),l(n);const r=await(0,$.O)(p?.data?.patternId,!0);if(r?.error)return _(u.So);t(r?.body),o(e?.body),document.getElementsByClassName("theme-styles-preview--drawer__list__item__title-bar--selected")&&document.getElementsByClassName("theme-styles-preview--drawer__list__item__title-bar--selected")[0]&&document.getElementsByClassName("theme-styles-preview--drawer__list__item__title-bar--selected")[0].scrollIntoView({behavior:"smooth",block:"center"})})()}),[g]),(0,r.createElement)("div",{className:"theme-styles-preview--drawer"},(0,r.createElement)("div",{className:"theme-styles-preview--drawer__list"},(0,r.createElement)(H._Z,{className:"theme-styles-preview--drawer__list__item",watch:n&&e,count:f[p?.data?.patternId]?.previewCount,callback:()=>n?.map(((t,a)=>(0,r.createElement)(H.ph,{key:a,className:"theme-styles-preview--drawer__list__item",selected:t.title===s,blockGrammer:e,viewportWidth:900,styling:"custom",previewSettings:t,overlay:!1,onClick:()=>(e=>{const t=n[e];if(s===t.title)return!0;w((0,M.AN)(t,h)),l(t.title),m.data.theme.variation=t.title,b(m),(0,I.v)(new I.iC(V.hi,t.title))})(a)}))),viewportWidth:900})))},q=()=>(0,r.createElement)("div",{style:{padding:"0 16px"}},(0,r.createElement)("h2",null,(0,s.__)("Pick a Theme","wp-module-onboarding")),(0,r.createElement)("h4",null,(0,s.__)("No Theme Selected","wp-module-onboarding")),(0,r.createElement)("p",null,(0,s.__)("Panel will show contextual help","wp-module-onboarding")),(0,r.createElement)("h4",null,(0,s.__)("With Theme Selected","wp-module-onboarding")),(0,r.createElement)("p",null,(0,s.__)("Panel will show single-column of other Themes.","wp-module-onboarding"))),j=()=>{const e=(0,i.useRef)(),[t,n]=(0,i.useState)(!1),[o,l]=(0,i.useState)(),[p,m]=(0,i.useState)(),{storedPreviewSettings:h,currentData:g,themeStatus:f}=(0,a.useSelect)((e=>({storedPreviewSettings:e(c.M).getPreviewSettings(),currentData:e(c.M).getCurrentOnboardingData(),themeStatus:e(c.M).getThemeStatus()})),[]),{updatePreviewSettings:w,setCurrentOnboardingData:b,updateThemeStatus:_}=(0,a.useDispatch)(c.M);(0,i.useEffect)((()=>{""!==g?.data?.fontStyle&&void 0!==p&&(l(g?.data?.fontStyle),v(g?.data?.fontStyle))}),[p,h]),(0,i.useEffect)((()=>{t||u.Er!==f||(async()=>{const t=await(0,d._t)();if(t?.error)return _(u.So);m(t?.body);const r=h?.settings?.styles[0]?.css;if(r){const t=/--wp--preset--font-family.*;/;e.current.setAttribute("style",r.match(t))}n(!0)})()}),[t,f]);const v=async(e,t="click")=>{if(o===e)return!0;l(e);const n=h,r=p;n?.styles?.typography?.fontFamily&&n?.styles?.blocks["core/heading"]&&(n.styles.typography.fontFamily=r[e]?.styles?.typography?.fontFamily,n.styles.blocks["core/heading"]={...n.styles.blocks["core/heading"],typography:r[e]?.styles.blocks["core/heading"].typography}),n.styles?.blocks["core/site-title"]?.typography?.fontFamily&&(n.styles.blocks["core/site-title"].typography.fontFamily=r[e]?.styles.blocks["core/heading"].typography.fontFamily),n.styles?.blocks["core/site-tagline"]?.typography?.fontFamily&&(n.styles.blocks["core/site-tagline"].typography.fontFamily=r[e]?.styles.blocks["core/heading"].typography.fontFamily),g.data.fontStyle=e,w((0,M.AN)(n,h)),b(g),"click"===t&&(0,I.v)(new I.iC(V.ce,e))};return(0,r.createElement)("div",{ref:e,className:"theme-fonts--drawer"},(0,r.createElement)("h2",null,(0,s.__)("Font Palettes","wp-module-onboarding")),p&&Object.keys(p).map(((e,t)=>{var n;const a=p[e]?.label.split("&",2);return 0===a.length?null:(0,r.createElement)("div",{key:e,role:"button",tabIndex:t+1,className:T()("font-palette drawer-palette--button",{"font-palette-selected drawer-palette--button--selected":o===e}),onClick:()=>v(e),onKeyDown:()=>v(e)},(0,r.createElement)("div",{className:"font-palette__icon drawer-palette--button__text",style:{fontFamily:p[e]?.styles?.typography?.fontFamily}},/* translators: text in each font selection pill representing the respective font */ /* translators: text in each font selection pill representing the respective font */ (0,s.__)("Aa","wp-module-onboarding")),(0,r.createElement)("div",{className:"font-palette__name drawer-palette--button__text"},(0,r.createElement)("span",{style:{fontFamily:p[e]?.styles.blocks["core/heading"].typography.fontFamily}},a[0]),a[1]?"&":"",(0,r.createElement)("span",{style:{fontFamily:p[e]?.styles?.typography?.fontFamily}},null!==(n=a[1])&&void 0!==n?n:"")))})))};var Q=n(8558),K=n(1607),Z=n(7677),Y=n(1003);const J=()=>{const{designRoutes:e}=(0,a.useSelect)((e=>({designRoutes:e(c.M).getDesignRoutes()})),[]),{setDrawerActiveView:t}=(0,a.useDispatch)(c.M),n=(0,f.zy)();return(0,r.createElement)(O.A,{type:"fade-in",duration:"100ms",timingFunction:"ease-in"},(0,r.createElement)(C.Button,{className:"nfd-onboarding-drawer__panel-back",variant:"tertiary",icon:K.A,onClick:()=>t(u.vO)},(0,s.__)("Onboarding Menu","wp-module-onboarding")),(0,r.createElement)("div",{className:"nfd-onboarding-drawer__panel-menu"},(0,r.createElement)("ul",{className:"nfd-onboarding-drawer__panel-routes"},e.map((e=>(0,r.createElement)("li",{key:e.path,className:"nfd-onboarding-drawer__panel-menu-item"},(0,r.createElement)(Y.k2,{to:e.path,className:T()("nfd-onboarding-drawer__panel-menu-link",{active:n.pathname===e.path||n.pathname.includes(e?.data?.designDrawerActiveLinkIncludes)}),state:{origin:"drawer-nav"},onClick:()=>t(e.drawerView)},(0,r.createElement)(Z.A,{icon:e.icon}),(0,r.createElement)("span",null,e.title))))))))};var X=n(2895);const ee=()=>{const e=X._.steps,{setDrawerActiveView:t}=(0,a.useDispatch)(c.M);return(0,r.createElement)(O.A,{type:"fade-in",duration:"100ms",timingFunction:"ease-in"},(0,r.createElement)(C.Button,{className:"nfd-onboarding-drawer__panel-back",variant:"tertiary",icon:K.A,onClick:()=>t(u.vO)},(0,s.__)("Onboarding Menu","wp-module-onboarding")),(0,r.createElement)("div",{className:"nfd-onboarding-drawer__panel-menu"},(0,r.createElement)("ul",{className:"nfd-onboarding-drawer__panel-routes"},e.map((e=>(0,r.createElement)("li",{key:e.path,className:"nfd-onboarding-drawer__panel-menu-item"},(0,r.createElement)(Y.k2,{to:e.path,className:"nfd-onboarding-drawer__panel-menu-link",state:{origin:"drawer-nav"},onClick:()=>t(e.drawerView)},(0,r.createElement)(Z.A,{icon:e.icon}),(0,r.createElement)("span",null,e.title))))))))},te=()=>{const{setDrawerActiveView:e}=(0,a.useDispatch)(c.M);return(0,r.createElement)(O.A,{type:"fade-in",duration:"100ms",timingFunction:"ease-in"},(0,r.createElement)(C.Button,{className:"nfd-onboarding-drawer__panel-back",variant:"tertiary",icon:K.A,onClick:()=>e(u.vO)},(0,s.__)("Resume Onboarding","wp-module-onboarding")))},ne=()=>{const e=(0,f.zy)(),{topSteps:t}=(0,a.useSelect)((e=>({topSteps:e(c.M).getTopSteps()})),[]),{setDrawerActiveView:n}=(0,a.useDispatch)(c.M);return(0,r.createElement)(O.A,{type:"fade-in",duration:"100ms",timingFunction:"ease-in"},(0,r.createElement)(m.A,{buttonClassName:"nfd-onboarding-drawer__panel-back",buttonVariant:"tertiary",origin:"drawer-panel"}),(0,r.createElement)("div",{className:"nfd-onboarding-drawer__panel-menu"},(0,r.createElement)("ul",{className:"nfd-onboarding-drawer__panel-routes"},t.map((t=>!1!==t.drawerNavigation&&(0,r.createElement)(C.Tooltip,{key:t.path,text:t.data?.tooltipText},(0,r.createElement)("li",{className:"nfd-onboarding-drawer__panel-menu-item"},(0,r.createElement)(Y.k2,{to:e.pathname===t.path||e.pathname.includes(t?.data?.primaryDrawerActiveLinkIncludes)?e.pathname:t.path,className:T()("nfd-onboarding-drawer__panel-menu-link",{active:e.pathname===t.path||e.pathname.includes(t?.data?.primaryDrawerActiveLinkIncludes)}),state:{origin:"drawer-nav"},onClick:()=>t?.drawerView&&n(t.drawerView)},(0,r.createElement)(Z.A,{icon:t.icon}),(0,r.createElement)("span",null,t.title)))))))))};var re=n(19);const ae=()=>{const e=re.E.steps,{setDrawerActiveView:t}=(0,a.useDispatch)(c.M);return(0,r.createElement)(O.A,{type:"fade-in",duration:"100ms",timingFunction:"ease-in"},(0,r.createElement)(C.Button,{className:"nfd-onboarding-drawer__panel-back",variant:"tertiary",icon:K.A,onClick:()=>t(u.vO)},(0,s.__)("Onboarding Menu","wp-module-onboarding")),(0,r.createElement)("div",{className:"nfd-onboarding-drawer__panel-menu"},(0,r.createElement)("ul",{className:"nfd-onboarding-drawer__panel-routes"},e.map((e=>(0,r.createElement)("li",{key:e.path,className:"nfd-onboarding-drawer__panel-menu-item"},(0,r.createElement)(Y.k2,{to:e.path,className:"nfd-onboarding-drawer__panel-menu-link",state:{origin:"drawer-nav"},onClick:()=>t(e.drawerView)},(0,r.createElement)(Z.A,{icon:e.icon}),(0,r.createElement)("span",null,e.title))))))))},ie=({children:e})=>{const{setDrawerActiveView:t}=(0,a.useDispatch)(c.M);return(0,r.createElement)(O.A,{type:"fade-in",duration:"100ms",timingFunction:"ease-in"},(0,r.createElement)(C.Button,{className:"nfd-onboarding-drawer__panel-back",variant:"tertiary",icon:K.A,onClick:()=>t(u.VG)},(0,s.__)("Design","wp-module-onboarding")),e)},oe=()=>{const{isDrawerOpen:e,drawerView:t}=(0,a.useSelect)((e=>{const{isDrawerOpened:t,getActiveDrawerView:n}=e(c.M);return{isDrawerOpen:t(),drawerView:n()}}),[]),{setIsDrawerOpened:n}=(0,a.useDispatch)(c.M);return(0,r.createElement)("div",{className:T()("nfd-onboarding-drawer__panel",{"is-open":e}),role:"button",tabIndex:"0",onKeyDown:e=>{e.keyCode!==Q.ESCAPE||e.defaultPrevented||(e.preventDefault(),n(!1))}},(0,r.createElement)("div",{className:"nfd-onboarding-drawer__panel-inner"},(0,r.createElement)("div",{className:"nfd-onboarding-drawer__panel-site-title-container"},(0,r.createElement)("div",{className:"nfd-onboarding-drawer__panel-site-title"},(0,s.__)("WordPress Onboarding","wp-module-onboarding"))),(0,r.createElement)("div",{className:"nfd-onboarding-drawer__panel-scroll-container"},(0,r.createElement)("div",{className:"nfd-onboarding-drawer__panel-inside"},u.vO===t&&(0,r.createElement)(ne,null),u.VG===t&&(0,r.createElement)(J,null),u.lf===t&&(0,r.createElement)(ee,null),u.eY===t&&(0,r.createElement)(ae,null),u.yY===t&&(0,r.createElement)(te,null),u.KJ===t&&(0,r.createElement)(ie,null,(0,r.createElement)(q,null)),u.Cx===t&&(0,r.createElement)(ie,null,(0,r.createElement)(B,null)),u.PE===t&&(0,r.createElement)(ie,null,(0,r.createElement)(G,null)),u.iQ===t&&(0,r.createElement)(ie,null,(0,r.createElement)(F,null)),u.SJ===t&&(0,r.createElement)(ie,null,(0,r.createElement)(j,null)),u.HJ===t&&(0,r.createElement)(ie,null,(0,r.createElement)(W,null)),u.CL===t&&(0,r.createElement)(ie,null,(0,r.createElement)(U,null))))))},se=({isOpen:e})=>{const{isDrawerOpen:t,isDrawerSuppressed:n,activeDrawerView:o}=(0,a.useSelect)((e=>({isDrawerOpen:e(c.M).isDrawerOpened(),isDrawerSuppressed:e(c.M).isDrawerSuppressed(),activeDrawerView:e(c.M).getActiveDrawerView()})),[]),{setIsDrawerOpened:l}=(0,a.useDispatch)(c.M),d=(0,i.useRef)();return(0,i.useEffect)((()=>{t||d?.current?.focus()}),[t]),o&&(0,r.createElement)(C.__unstableMotion.div,{className:T()("nfd-onboarding-drawer__toggle",{"is-open":t}),whileHover:"expand"},(0,r.createElement)(C.Button,{className:`nfd-onboarding-drawer__toggle-button has-icon ${!n||"is-suppressed"}`,label:(0,s.__)("Toggle Navigation","wp-module-onboarding"),ref:d,"aria-pressed":e,onClick:()=>{n||l(!t)}},(0,r.createElement)("div",{style:{width:"36px",height:"36px",backgroundImage:"var(--nfd-onboarding-icon)",backgroundSize:"contain"}})))},le=(0,i.memo)((({isDefaultOpen:e=!1})=>{const t=(0,o.useViewportMatch)("medium"),{setIsDrawerOpened:n}=(0,a.useDispatch)(c.M);return(0,i.useEffect)((()=>{n(e&&t)}),[e,t,n]),(0,r.createElement)(i.Fragment,null,(0,r.createElement)(se,null),(0,r.createElement)(oe,null))})),ce=()=>{const{isSidebarOpened:e,sideBarView:t,sidebars:n}=(0,a.useSelect)((e=>({isSidebarOpened:e(c.M).isSidebarOpened(),sideBarView:e(c.M).getSidebarView(),sidebars:e(c.M).getSidebars()})));return(0,r.createElement)(i.Fragment,null,(0,r.createElement)(i.Suspense,{fallback:(0,r.createElement)(i.Fragment,null)},n.map((e=>(0,r.createElement)(i.Fragment,{key:e.id},e?.sidebar&&(0,r.createElement)(e.sidebar,null),e?.menu&&(0,r.createElement)(e.menu,null))))),(0,r.createElement)("div",{className:T()("nfd-onboarding-sidebar__panel",{"is-open":e&&t})},(0,r.createElement)("div",{className:"nfd-onboarding-sidebar__panel-inner"},e&&t&&(0,r.createElement)(C.Slot,{name:`${u.St}/${t}`}))))};var de=n(8294),ue=n(2014),pe=n(5171),me=n(6087);const he=n.p+"images/ai_bg.55900f2d.png";var ge=n(9269);const fe=(0,i.forwardRef)((function({footer:e,header:t,sidebar:n,secondarySidebar:a,notices:l,content:c,drawer:d,actions:p,labels:m,className:h,shortcuts:g,interactionDisabled:f},w){const b=(0,C.__unstableUseNavigateRegions)(g);if("sitegen"===window.nfdOnboarding.currentFlow){const{theme:e}=(0,i.useContext)(ge.D);!function(e,t){(0,i.useEffect)((()=>{const n=new Image;n.src=he,n.onload=()=>{document.querySelector(".nfd-onboarding-skeleton--sitegen")&&(document.querySelector(".nfd-onboarding-skeleton--sitegen").style.background=t?`url('${he}')`:"#ededed")};const r=document&&document.querySelector(`html:not(.${e})`);if(r)return r.classList.toggle(e),()=>{r.classList.toggle(e)}}),[e,t])}("nfd-interface-interface-skeleton__html-container",e===u.fS)}const _={ /* translators: accessibility text for the nav bar landmark region. */