PluginProbe
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell / 3.13.3
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell v3.13.3
3.13.3 3.13.2 3.13.1 3.13.0 3.12.13 3.12.12 3.12.11 3.12.10 3.12.9 3.12.8 3.12.7 3.12.6 3.12.5 3.12.4 3.12.3 3.12.1 3.12.2 3.12.0 3.11.1 3.11.0 3.10.9 3.10.8 3.10.7 3.10.6 2.8.16 All 261 releases
wpfunnels / admin / assets / dist / js / wpfnl-react-admin.min.js

wpfnl-react-admin.min.js in WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell 3.13.3, at admin/assets/dist/js/wpfnl-react-admin.min.js

2 lines 553.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*! For license information please see wpfnl-react-admin.min.js.LICENSE.txt */
2 var wpfunnels;(self.webpackChunkwpfunnels=self.webpackChunkwpfunnels||[]).push([["wpfnl-react-admin"],{45588(e,t,n){"use strict";function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e},l.apply(this,arguments)}var r;n.d(t,{AO:()=>p,B6:()=>k,Gh:()=>z,HS:()=>E,Oi:()=>o,RO:()=>C,Rr:()=>f,TM:()=>i,pX:()=>T,pb:()=>_,rc:()=>r,tH:()=>D,ue:()=>v,yD:()=>M,zR:()=>s}),function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(r||(r={}));const a="popstate";function s(e){return void 0===e&&(e={}),h(function(e,t){let{pathname:n,search:l,hash:r}=e.location;return d("",{pathname:n,search:l,hash:r},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"==typeof t?t:p(t)},null,e)}function i(e){return void 0===e&&(e={}),h(function(e,t){let{pathname:n="/",search:l="",hash:r=""}=f(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),d("",{pathname:n,search:l,hash:r},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){let n=e.document.querySelector("base"),l="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");l=-1===n?t:t.slice(0,n)}return l+"#"+("string"==typeof t?t:p(t))},function(e,t){c("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")},e)}function o(e,t){if(!1===e||null==e)throw new Error(t)}function c(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function u(e,t){return{usr:e.state,key:e.key,idx:t}}function d(e,t,n,r){return void 0===n&&(n=null),l({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?f(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function p(e){let{pathname:t="/",search:n="",hash:l=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),l&&"#"!==l&&(t+="#"===l.charAt(0)?l:"#"+l),t}function f(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let l=e.indexOf("?");l>=0&&(t.search=e.substr(l),e=e.substr(0,l)),e&&(t.pathname=e)}return t}function h(e,t,n,s){void 0===s&&(s={});let{window:i=document.defaultView,v5Compat:c=!1}=s,f=i.history,h=r.Pop,m=null,v=g();function g(){return(f.state||{idx:null}).idx}function w(){h=r.Pop;let e=g(),t=null==e?null:e-v;v=e,m&&m({action:h,location:b.location,delta:t})}function x(e){let t="null"!==i.location.origin?i.location.origin:i.location.href,n="string"==typeof e?e:p(e);return n=n.replace(/ $/,"%20"),o(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==v&&(v=0,f.replaceState(l({},f.state,{idx:v}),""));let b={get action(){return h},get location(){return e(i,f)},listen(e){if(m)throw new Error("A history only accepts one active listener");return i.addEventListener(a,w),m=e,()=>{i.removeEventListener(a,w),m=null}},createHref:e=>t(i,e),createURL:x,encodeLocation(e){let t=x(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){h=r.Push;let l=d(b.location,e,t);n&&n(l,e),v=g()+1;let a=u(l,v),s=b.createHref(l);try{f.pushState(a,"",s)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;i.location.assign(s)}c&&m&&m({action:h,location:b.location,delta:1})},replace:function(e,t){h=r.Replace;let l=d(b.location,e,t);n&&n(l,e),v=g();let a=u(l,v),s=b.createHref(l);f.replaceState(a,"",s),c&&m&&m({action:h,location:b.location,delta:0})},go:e=>f.go(e)};return b}var m;function v(e,t,n){return void 0===n&&(n="/"),function(e,t,n,l){let r=_(("string"==typeof t?f(t):t).pathname||"/",n);if(null==r)return null;let a=g(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(a);let s=null;for(let e=0;null==s&&e<a.length;++e){let t=C(r);s=j(a[e],t,l)}return s}(e,t,n,!1)}function g(e,t,n,l){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===l&&(l="");let r=(e,r,a)=>{let s={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:r,route:e};s.relativePath.startsWith("/")&&(o(s.relativePath.startsWith(l),'Absolute route path "'+s.relativePath+'" nested under path "'+l+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(l.length));let i=E([l,s.relativePath]),c=n.concat(s);e.children&&e.children.length>0&&(o(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+i+'".'),g(e.children,t,c,i)),(null!=e.path||e.index)&&t.push({path:i,score:y(i,e.index),routesMeta:c})};return e.forEach((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let n of w(e.path))r(e,t,n);else r(e,t)}),t}function w(e){let t=e.split("/");if(0===t.length)return[];let[n,...l]=t,r=n.endsWith("?"),a=n.replace(/\?$/,"");if(0===l.length)return r?[a,""]:[a];let s=w(l.join("/")),i=[];return i.push(...s.map(e=>""===e?a:[a,e].join("/"))),r&&i.push(...s),i.map(t=>e.startsWith("/")&&""===t?"/":t)}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(m||(m={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const x=/^:[\w-]+$/,b=e=>"*"===e;function y(e,t){let n=e.split("/"),l=n.length;return n.some(b)&&(l+=-2),t&&(l+=2),n.filter(e=>!b(e)).reduce((e,t)=>e+(x.test(t)?3:""===t?1:10),l)}function j(e,t,n){void 0===n&&(n=!1);let{routesMeta:l}=e,r={},a="/",s=[];for(let e=0;e<l.length;++e){let i=l[e],o=e===l.length-1,c="/"===a?t:t.slice(a.length)||"/",u=k({path:i.relativePath,caseSensitive:i.caseSensitive,end:o},c),d=i.route;if(!u&&o&&n&&!l[l.length-1].route.index&&(u=k({path:i.relativePath,caseSensitive:i.caseSensitive,end:!1},c)),!u)return null;Object.assign(r,u.params),s.push({params:r,pathname:E([a,u.pathname]),pathnameBase:A(E([a,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(a=E([a,u.pathnameBase]))}return s}function k(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,l]=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!0),c("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let l=[],r="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(l.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(l.push({paramName:"*"}),r+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?r+="\\/*$":""!==e&&"/"!==e&&(r+="(?:(?=\\/|$))"),[new RegExp(r,t?void 0:"i"),l]}(e.path,e.caseSensitive,e.end),r=t.match(n);if(!r)return null;let a=r[0],s=a.replace(/(.)\/+$/,"$1"),i=r.slice(1);return{params:l.reduce((e,t,n)=>{let{paramName:l,isOptional:r}=t;if("*"===l){let e=i[n]||"";s=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const o=i[n];return e[l]=r&&!o?void 0:(o||"").replace(/%2F/g,"/"),e},{}),pathname:a,pathnameBase:s,pattern:e}}function C(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return c(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function _(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,l=e.charAt(n);return l&&"/"!==l?null:e.slice(n)||"/"}const N=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function S(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function L(e,t,n,l){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(l)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function M(e,t){let n=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t?n.map((e,t)=>t===n.length-1?e.pathname:e.pathnameBase):n.map(e=>e.pathnameBase)}function z(e,t,n,r){let a;void 0===r&&(r=!1),"string"==typeof e?a=f(e):(a=l({},e),o(!a.pathname||!a.pathname.includes("?"),L("?","pathname","search",a)),o(!a.pathname||!a.pathname.includes("#"),L("#","pathname","hash",a)),o(!a.search||!a.search.includes("#"),L("#","search","hash",a)));let s,i=""===e||""===a.pathname,u=i?"/":a.pathname;if(null==u)s=n;else{let e=t.length-1;if(!r&&u.startsWith("..")){let t=u.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}s=e>=0?t[e]:"/"}let d=function(e,t){void 0===t&&(t="/");let n,{pathname:l,search:r="",hash:a=""}="string"==typeof e?f(e):e;if(l)if(s=l,N.test(s))n=l;else{if(l.includes("//")){let e=l;l=l.replace(/\/\/+/g,"/"),c(!1,"Pathnames cannot have embedded double slashes - normalizing "+e+" -> "+l)}n=l.startsWith("/")?S(l.substring(1),"/"):S(l,t)}else n=t;var s;return{pathname:n,search:P(r),hash:F(a)}}(a,s),p=u&&"/"!==u&&u.endsWith("/"),h=(i||"."===u)&&n.endsWith("/");return d.pathname.endsWith("/")||!p&&!h||(d.pathname+="/"),d}const E=e=>e.join("/").replace(/\/\/+/g,"/"),A=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),P=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",F=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class D extends Error{}function T(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}const R=["post","put","patch","delete"],B=(new Set(R),["get",...R]);new Set(B),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred")},47958(e,t,n){"use strict";function l(e){try{return decodeURIComponent(e)}catch(t){return e}}function r(e="",t){if(!t||!Object.keys(t).length)return e;let n=e;const r=e.indexOf("?");return-1!==r&&(t=Object.assign(function(e){return(function(e){let t;try{t=new URL(e,"http://example.com").search.substring(1)}catch(e){}if(t)return t}(e)||"").replace(/\+/g,"%20").split("&").reduce((e,t)=>{const[n,r=""]=t.split("=").filter(Boolean).map(l);return n&&function(e,t,n){const l=t.length,r=l-1;for(let a=0;a<l;a++){let l=t[a];!l&&Array.isArray(e)&&(l=e.length.toString()),l=["__proto__","constructor","prototype"].includes(l)?l.toUpperCase():l;const s=!isNaN(Number(t[a+1]));e[l]=a===r?n:e[l]||(s?[]:{}),Array.isArray(e[l])&&!s&&(e[l]={...e[l]}),e=e[l]}}(e,n.replace(/\]/g,"").split("["),r),e},Object.create(null))}(e),t),n=n.substr(0,r)),n+"?"+function(e){let t="";const n=Object.entries(e);let l;for(;l=n.shift();){let[e,r]=l;if(Array.isArray(r)||r&&r.constructor===Object){const t=Object.entries(r).reverse();for(const[l,r]of t)n.unshift([`${e}[${l}]`,r])}else void 0!==r&&(null===r&&(r=""),t+="&"+[e,r].map(encodeURIComponent).join("="))}return t.substr(1)}(t)}n.d(t,{F:()=>r})},19792(e,t,n){"use strict";n(16586);var l=n(5338),r=n(40961),a=n(84976),s=n(47767),i=n(96540),o=n(33718),c=n(47958);const u="undefined"!=typeof window&&window.RWPFNLAdmin||{},d={restApiUrl:u.rest_api_url||"",nonce:u.nonce||"",adminUrl:u.admin_url||"",imagePath:u.image_path||"",priceConfig:u.priceConfig||{price_format:"%1$s%2$s",currency_symbol:"$"},isProActivated:"1"===String(u.isProActivated),isProLicenseActive:"1"===String(u.isProLicenseActive),isWPFIntegrationActive:"1"===String(u.isWPFIntegrationActive),isMailMintProLicenseActive:"1"===String(u.isMailMintProLicenseActive),automationDependencies:Array.isArray(u.automationDependencies)?u.automationDependencies:[],canInstallPlugins:"1"===String(u.canInstallPlugins),canActivatePlugins:"1"===String(u.canActivatePlugins),proCta:u.proCta||null,startOfWeek:Number.isInteger(Number(u.startOfWeek))?Number(u.startOfWeek):0,onboardingHint:"yes"===u.onboardingHint||"no"!==u.onboardingHint&&null,text:u.getText||{},proUpgradeUrl:u.upgradeUrl||"https://getwpfunnels.com/pricing/",documentTitleSuffix:u.documentTitleSuffix||"",templateLibrary:{builder:"gutenberg",isAnyPluginMissing:"no",dependencyPlugins:{},types:[],activeFunnels:0,allowedFunnels:3,isRemote:"no",...u.templateLibrary||{}},settingsPanelApps:u.settingsPanelApps||{}},p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return d.text[e]||t},f=e=>d.adminUrl?`${d.adminUrl}admin.php?page=wpfunnels#${e}`:`#${e}`,h=o.A.createNonceMiddleware(d.nonce);d.nonce&&o.A.use(h),"undefined"!=typeof window&&window.jQuery&&window.jQuery(document).on("heartbeat-tick.wpfnl-react-admin",(e,t)=>{t&&t.rest_nonce&&(h.nonce=t.rest_nonce)});const m=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"wpfunnels/v1";const l=`${d.restApiUrl}${n}/${e}`;return t?(0,c.F)(l,t):l},v=(e,t,n)=>(0,o.A)({url:m(e,t,n),method:"GET"}),g=(e,t,n)=>(0,o.A)({url:m(e,null,n),method:"POST",...t?{data:t}:{}}),w=(e,t,n)=>(0,o.A)({url:m(e,t,n),method:"DELETE"}),x=e=>{let{basename:t,slug:n}=e;return g("activate-plugin",{basename:t,slug:n})},b=(e,t)=>{return n=`automation-canvas/${e}`,l={status:t},(0,o.A)({url:m(n,null,void 0),method:"PUT",...l?{data:l}:{}});var n,l},y=e=>w(`automation-canvas/${e}`),j=(e,t)=>g(`funnels/${e}/status`,{status:t}),k=e=>g(`funnels/${e}/trash`),C=e=>g(`funnels/${e}/restore`),_=e=>w(`funnels/${e}`),N=(e,t)=>g("funnels/bulk",{action:e,ids:t}),S=e=>v("import-export/import-status",e?{run_id:e}:void 0),L=e=>{let{page:t,perPage:n,search:l,funnelStatus:r,orderby:a,order:s}=e;return v("store-checkout/listing",{page:t,per_page:n,search:l,funnel_status:r,orderby:a,order:s})},M=e=>{let{after:t,before:n,interval:l}=e;return v("report/overview",{after:t,before:n,interval:l})},z=e=>{let{after:t,before:n,interval:l}=e;return v("report/stats",{after:t,before:n,interval:l})},E=e=>g("steps/wpfunnel-import-step",e),A=e=>{let{contextType:t="",contextId:n=0,limit:l,offset:r}=e;return v("ai/conversations",{context_type:t,context_id:n,limit:l,offset:r})},P=e=>v(`ai/conversations/${e}`),F=e=>g(`ai/conversations/${e}/step`),D=()=>v("settings/ai");function T(e){return e.replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>").replace(/`([^`]+)`/g,"<code>$1</code>").replace(/\[([^\]]+)\]\(([^)]+)\)/g,(e,t,n)=>{const l=/edit|open|view|configure|go to/i.test(t);return`<a href="${n}" class="${l?"wpfnl-ai-md-link-btn":"wpfnl-ai-md-link"}" target="_blank" rel="noopener noreferrer">${t}${l?" &rarr;":""}</a>`})}function R(e){const t=e.trim();return t.startsWith("|")&&t.lastIndexOf("|")>0&&t.length>1}function B(e){return/^\s*\|?[\s:|-]+\|?\s*$/.test(e)&&e.includes("-")}function $(e){return e.trim().replace(/^\|/,"").replace(/\|$/,"").split("|").map(e=>e.trim())}function I(e,t){return`<div class="wpfnl-ai-md-table-wrap"><table class="wpfnl-ai-md-table"><thead><tr>${$(e).map(e=>`<th>${T(e)}</th>`).join("")}</tr></thead><tbody>${t.map(e=>`<tr>${$(e).map(e=>`<td>${T(e)}</td>`).join("")}</tr>`).join("")}</tbody></table></div>`}function O(e){const t=String(e||"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").split("\n"),n=[];let l=[],r=[],a=0;const s=()=>{l.length&&(n.push(`<p class="wpfnl-ai-md-p">${l.join("<br />")}</p>`),l=[])},i=()=>{if(r.length){const e=r.map(e=>`<li>${e}</li>`).join("");n.push(`<ul class="wpfnl-ai-md-list">${e}</ul>`),r=[]}},o=()=>{s(),i()};for(;a<t.length;){const e=t[a];if(R(e)&&a+1<t.length&&B(t[a+1])){o();const l=e,r=[];let s=a+2;for(;s<t.length&&R(t[s])&&!B(t[s]);)r.push(t[s]),s+=1;n.push(I(l,r)),a=s;continue}const c=e.match(/^\s*(#{1,6})\s+(.*)$/);if(c){o(),n.push(`<div class="wpfnl-ai-md-h">${T(c[2])}</div>`),a+=1;continue}const u=e.match(/^\s*(?:[-*]|\d+\.)\s+(.*)$/);u?(s(),r.push(T(u[1])),a+=1):""!==e.trim()?(i(),l.push(T(e)),a+=1):(o(),a+=1)}return o(),n.join("")}var W=n(74848);const H=()=>(0,W.jsxs)("p",{className:"rwpfnl-ai-disclaimer",children:["AI can make mistakes."," ",(0,W.jsx)("a",{href:"https://en.wikipedia.org/wiki/Hallucination_(artificial_intelligence)",target:"_blank",rel:"noopener noreferrer",children:"Check important info."})]}),V={dashboard:[{title:"Build Sales Funnel",prompt:"Build a 4-step sales funnel for my best-selling product with an order bump and one upsell.",icon:"rocket"},{title:"Lead Generation Flow",prompt:"Create a lead generation funnel with a landing page, opt-in form, and thank-you page.",icon:"user-plus"},{title:"Course Launch Funnel",prompt:"Design an online course launch funnel with a landing page, checkout, and course upsell.",icon:"book-open"},{title:"Diagnostic Setup Audit",prompt:"Check my site setup status and tell me what is missing to run sales funnels.",icon:"shield-check"}],funnel:[{title:"Add Order Bump",prompt:"Add an order bump with a 15% discount to the checkout step.",icon:"plus-circle"},{title:"Add One-Click Upsell",prompt:"Add a high-converting upsell step offering a complementary product at 20% off.",icon:"trending-up"},{title:"Reorder Funnel Flow",prompt:"Reorder the steps into canonical flow: Landing, Checkout, Upsell, Downsell, Thank You.",icon:"layers"},{title:"Publish Funnel",prompt:"Review the funnel setup and publish it live.",icon:"check-circle"}],step:[{title:"Assign Products",prompt:"Search products and attach my main product with a 10% discount.",icon:"shopping-cart"},{title:"Rewrite Copy",prompt:"Write compelling, high-converting headline and call-to-action copy for this step.",icon:"edit-3"}],analytics:[{title:"Funnel Overview",prompt:"Analyze conversion rates and revenue for my active funnels.",icon:"bar-chart-2"},{title:"Top Performing Funnels",prompt:"Show me my top 5 funnels by conversion rate and order volume.",icon:"award"}]},U=[{key:"building",label:"Funnel building",items:[{label:"Build Sales Funnel",prompt:"Build a 4-step sales funnel for my best-selling product with an order bump and one upsell."},{label:"Lead Generation Flow",prompt:"Create a lead generation funnel with a landing page, opt-in form, and thank-you page."},{label:"Course Launch Funnel",prompt:"Design an online course launch funnel with a landing page, checkout, and course upsell."},{label:"Webinar Registration Funnel",prompt:"Design a webinar registration funnel with a signup landing page, confirmation page and reminder follow-ups."}]},{key:"offers",label:"Offers & bumps",items:[{label:"Add Order Bump",prompt:"Add an order bump with a 15% discount to the checkout step."},{label:"Add One-Click Upsell",prompt:"Add a high-converting upsell step offering a complementary product at 20% off."},{label:"Reorder Funnel Flow",prompt:"Reorder the steps into canonical flow: Landing, Checkout, Upsell, Downsell, Thank You."},{label:"Publish Funnel",prompt:"Review the funnel setup and publish it live."}]},{key:"performance",label:"Funnel performance",items:[{label:"Funnel Overview",prompt:"Analyze conversion rates and revenue for my active funnels."},{label:"Top Performing Funnels",prompt:"Show me my top 5 funnels by conversion rate and order volume."},{label:"Checkout Drop-off Analysis",prompt:"Analyze where customers are dropping off in my checkout step and suggest fixes to recover lost sales."},{label:"Order Bump & Upsell Performance",prompt:"Show me acceptance rates for my order bumps and upsells across all active funnels."}]},{key:"setup",label:"Setup & health",items:[{label:"Diagnostic Setup Audit",prompt:"Check my site setup status and tell me what is missing to run sales funnels."},{label:"Assign Products to a Step",prompt:"Search products and attach my main product with a 10% discount."},{label:"Improve Step Copy",prompt:"Write compelling, high-converting headline and call-to-action copy for this step."},{label:"Payment Gateway Check",prompt:"Check my payment gateway and checkout configuration and flag anything that could block a sale."}]}],Z=()=>(0,W.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 22 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("path",{d:"M9.32781 2.31781L10.6625 9.61166L17.9564 10.9464L10.6625 12.2811L9.32781 19.575L7.99307 12.2811L0.699219 10.9464L7.99307 9.61166L9.32781 2.31781Z",stroke:"currentColor",strokeWidth:"1.4",strokeLinejoin:"round"}),(0,W.jsx)("path",{d:"M16.8785 0.700012L17.4504 3.90311L20.6535 4.47502L17.4504 5.04693L16.8785 8.25003L16.3066 5.04693L13.1035 4.47502L16.3066 3.90311L16.8785 0.700012Z",stroke:"currentColor",strokeWidth:"1.4",strokeLinejoin:"round"})]}),Y=()=>(0,W.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",children:[(0,W.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,W.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),q=()=>(0,W.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,W.jsx)("polyline",{points:"12 7 12 12 15.5 14"})]}),K=()=>(0,W.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,W.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),Q=()=>(0,W.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",children:(0,W.jsx)("line",{x1:"5",y1:"19",x2:"19",y2:"19"})}),G=()=>(0,W.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,W.jsx)("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"})}),X=()=>(0,W.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("path",{d:"M12 2 2 7l10 5 10-5-10-5z"}),(0,W.jsx)("path",{d:"M2 17l10 5 10-5"}),(0,W.jsx)("path",{d:"M2 12l10 5 10-5"})]}),J=()=>(0,W.jsxs)("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),(0,W.jsx)("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]}),ee=()=>(0,W.jsxs)("svg",{viewBox:"0 0 24 24",width:"15",height:"15",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,W.jsx)("polyline",{points:"12 5 19 12 12 19"})]}),te=e=>{let{gradientId:t}=e;return(0,W.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("path",{d:"M8.28899 0.984575C8.1454 1.10382 8.04805 1.26953 8.01378 1.45301L7.17318 5.89834C7.11348 6.21439 6.95989 6.50509 6.73246 6.73252C6.50503 6.95995 6.21433 7.11354 5.89828 7.17324L1.45295 8.01384C1.26947 8.04811 1.10376 8.14547 0.984514 8.28905C0.865265 8.43263 0.799988 8.6134 0.799988 8.80005C0.799988 8.9867 0.865265 9.16747 0.984514 9.31105C1.10376 9.45463 1.26947 9.55199 1.45295 9.58626L5.89828 10.4269C6.21433 10.4866 6.50503 10.6402 6.73246 10.8676C6.95989 11.095 7.11348 11.3857 7.17318 11.7018L8.01378 16.1471C8.04805 16.3306 8.1454 16.4963 8.28899 16.6155C8.43257 16.7348 8.61334 16.8 8.79999 16.8C8.98664 16.8 9.1674 16.7348 9.31099 16.6155C9.45457 16.4963 9.55193 16.3306 9.5862 16.1471L10.4268 11.7018C10.4865 11.3857 10.6401 11.095 10.8675 10.8676C11.0949 10.6402 11.3857 10.4866 11.7017 10.4269L16.147 9.58626C16.3305 9.55199 16.4962 9.45463 16.6155 9.31105C16.7347 9.16747 16.8 8.9867 16.8 8.80005C16.8 8.6134 16.7347 8.43263 16.6155 8.28905C16.4962 8.14547 16.3305 8.04811 16.147 8.01384L11.7017 7.17324C11.3857 7.11354 11.0949 6.95995 10.8675 6.73252C10.6401 6.50509 10.4865 6.21439 10.4268 5.89834L9.5862 1.45301C9.55193 1.26953 9.45457 1.10382 9.31099 0.984575C9.1674 0.865326 8.98664 0.800049 8.79999 0.800049C8.61334 0.800049 8.43257 0.865326 8.28899 0.984575Z",stroke:`url(#${t})`,strokeWidth:"1.6",strokeLinecap:"round"}),(0,W.jsx)("defs",{children:(0,W.jsxs)("linearGradient",{id:t,x1:"8.79999",y1:"0.800049",x2:"8.79999",y2:"16.8",gradientUnits:"userSpaceOnUse",children:[(0,W.jsx)("stop",{stopColor:"#573BFF"}),(0,W.jsx)("stop",{offset:"0.697115",stopColor:"#F26887"}),(0,W.jsx)("stop",{offset:"0.985577",stopColor:"#FF9746"})]})})]})},ne=e=>{let{contextType:t="dashboard",onSelectPrompt:n}=e;const l=V[t]||V.dashboard;return(0,W.jsxs)("div",{className:"rwpfnl-ai-prompts",children:[(0,W.jsxs)("div",{className:"rwpfnl-ai-prompts__header",children:[(0,W.jsx)("h3",{children:"What do you want to build?"}),(0,W.jsx)("p",{children:"Build anything across your funnels, steps and offers — all in plain English."})]}),(0,W.jsxs)("div",{className:"rwpfnl-ai-prompts__starters",children:[(0,W.jsx)("div",{className:"rwpfnl-ai-prompts__slabel",children:"Try the copilot for…"}),(0,W.jsx)("div",{className:"rwpfnl-ai-prompts__grid",children:l.map(e=>(0,W.jsxs)("button",{type:"button",className:"rwpfnl-ai-prompt-card",onClick:()=>n(e.prompt),children:[(0,W.jsx)("span",{children:e.title}),(0,W.jsx)("span",{className:"rwpfnl-ai-prompt-card__arrow",children:(0,W.jsx)(ee,{})})]},e.title))})]})]})},le=["low","medium","high"],re=(e,t)=>{const n=e.details||{};return{key:e.id||t,name:n.tool||e.name||"",arguments:e.arguments||{},title:n.title||e.summary||"Run an action",subject:n.subject||"",note:n.note||"",risk:le.includes(n.risk)?n.risk:"high",fields:Array.isArray(n.fields)?n.fields:[]}},ae=e=>{let{pending:t,onConfirmAction:n}=e;const[l,r]=(0,i.useState)(!1),[a,s]=(0,i.useState)(!1),[o,c]=(0,i.useState)(""),[u,d]=(0,i.useState)(!1),p=(t||[]).map(re),f=p.some(e=>"high"===e.risk)?"high":p.some(e=>"medium"===e.risk)?"medium":"low",h="high"===f?"Read this before approving":"medium"===f?"Confirm before I continue":"Ready when you are",m=(()=>{const e=p.length>1;return"high"===f?e?"Yes, apply all":"Yes, do it":e?"Approve all":"Approve"})(),v=()=>{d(!0),n({approve:!1,denyReason:o})};return(0,W.jsxs)("div",{className:`rwpfnl-ai-confirm-card is-risk-${f}`,children:[(0,W.jsxs)("div",{className:"rwpfnl-ai-confirm-card__head",children:[(0,W.jsx)("span",{className:"rwpfnl-ai-confirm-card__head-icon",children:"high"===f?"⚠️":"🛡️"}),(0,W.jsxs)("div",{className:"rwpfnl-ai-confirm-card__head-text",children:[(0,W.jsx)("h4",{children:h}),(0,W.jsxs)("p",{children:[p.length," change",p.length>1?"s are":" is"," waiting for your approval."]})]})]}),(0,W.jsx)("ul",{className:"rwpfnl-ai-confirm-card__list",children:p.map(e=>{return(0,W.jsxs)("li",{className:`rwpfnl-ai-confirm-card__item is-risk-${e.risk}`,children:[(0,W.jsxs)("div",{className:"rwpfnl-ai-confirm-card__item-body",children:[(0,W.jsxs)("p",{className:"rwpfnl-ai-confirm-card__item-title",children:[e.title,e.subject&&(0,W.jsx)("strong",{children:e.subject})]}),e.fields.length>0&&(0,W.jsx)("div",{className:"rwpfnl-ai-confirm-card__fields",children:e.fields.map((e,t)=>(0,W.jsxs)("div",{className:"rwpfnl-ai-confirm-card__field",children:[(0,W.jsx)("span",{className:"rwpfnl-ai-confirm-card__field-label",children:e.label}),(0,W.jsx)("span",{className:"rwpfnl-ai-confirm-card__field-val",children:e.value})]},t))}),e.note&&(0,W.jsx)("p",{className:"rwpfnl-ai-confirm-card__note",children:e.note})]}),(0,W.jsx)("span",{className:`rwpfnl-ai-confirm-card__risk-pill is-${e.risk}`,children:(t=e.risk,"high"===t?"Can't be undone":"medium"===t?"Reversible":"Safe")})]},e.key);var t})}),(0,W.jsxs)("div",{className:"rwpfnl-ai-confirm-card__foot",children:[(0,W.jsxs)("button",{type:"button",className:"rwpfnl-ai-confirm-card__raw-toggle",onClick:()=>r(e=>!e),children:[(0,W.jsx)("span",{className:l?"is-open":"",children:"▸"}),l?"Hide technical details":"Show technical details"]}),a&&(0,W.jsx)("div",{className:"rwpfnl-ai-confirm-card__deny-input",children:(0,W.jsx)("input",{type:"text",value:o,placeholder:"Reason for refusal (optional)...",onChange:e=>c(e.target.value),onKeyUp:e=>{"Enter"===e.key&&v()}})}),(0,W.jsxs)("div",{className:"rwpfnl-ai-confirm-card__actions",children:[(0,W.jsx)("button",{type:"button",className:"rwpfnl-ai-btn is-refuse",disabled:u,onClick:()=>{a?v():s(!0)},children:a?"Confirm Refusal":"Not now"}),(0,W.jsx)("button",{type:"button",className:"rwpfnl-ai-btn is-approve"+("high"===f?" is-approve-danger":""),disabled:u,onClick:()=>{d(!0),n({approve:!0,denyReason:""})},children:m})]})]}),l&&(0,W.jsx)("div",{className:"rwpfnl-ai-confirm-card__raw-body",children:p.map(e=>(0,W.jsx)("pre",{children:(0,W.jsxs)("code",{children:[e.name,": ",JSON.stringify(e.arguments,null,2)]})},`${e.key}-raw`))})]})},se=e=>{let{visible:t=!1,label:n="Processing...",pct:l=0}=e;return t?(0,W.jsxs)("div",{className:"rwpfnl-ai-progress",children:[(0,W.jsx)("div",{className:"rwpfnl-ai-progress__bar",style:{width:`${l}%`}}),(0,W.jsxs)("div",{className:"rwpfnl-ai-progress__info",children:[(0,W.jsx)("span",{className:"rwpfnl-ai-progress__label",children:n}),(0,W.jsxs)("span",{className:"rwpfnl-ai-progress__pct",children:[l,"%"]})]})]}):null},ie=["92%","78%","85%","40%"],oe=()=>(0,W.jsxs)("div",{className:"rwpfnl-ai-thread-skeleton","aria-hidden":"true",children:[(0,W.jsx)("div",{className:"rwpfnl-ai-skel-bubble rwpfnl-ai-shimmer"}),(0,W.jsx)("div",{className:"rwpfnl-ai-skel-answer",children:ie.map(e=>(0,W.jsx)("div",{className:"rwpfnl-ai-skel-line rwpfnl-ai-shimmer",style:{width:e}},e))})]}),ce={"wpfunnels/create-funnel":"Built a sales funnel","wpfunnels/update-funnel":"Updated the funnel","wpfunnels/create-step":"Added a funnel step","wpfunnels/reorder-steps":"Reordered funnel steps","wpfunnels/upsert-order-bump":"Added an order bump","wpfunnels/compose-step-page":"Wrote the step page"},ue=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(e){return null}return e||null},de=e=>{if("string"==typeof e){const t=ue(e);return t&&t.text||e}return e&&e.text||""},pe=e=>{const t=ue(e.content);return ce[t&&t.name]||"Updated the funnel"},fe=e=>{let{messages:t=[],contextType:n="dashboard",pendingAction:l=[],isRunning:r=!1,isPendingConfirmation:a=!1,isLoadingConversation:s=!1,isSending:o=!1,progressLabel:c="",progressPct:u=0,errorMessage:d=null,onSendMessage:p,onConfirmAction:f,onOpenPreview:h}=e;const[m,v]=(0,i.useState)(""),g=(0,i.useRef)(null),w=(0,i.useRef)(null),x=Array.isArray(l)&&l.length>0,b=r||a;(0,i.useEffect)(()=>{g.current&&(g.current.scrollTop=g.current.scrollHeight)},[t,x,s,c,d]);const y=()=>{const e=m.trim();e&&!b&&(p(e),v(""),w.current&&(w.current.style.height="auto"))},j=e=>{if("user"===e.role)return(0,W.jsx)("div",{className:"rwpfnl-ai-chat-bubble is-user",children:de(e.content)});if("assistant"===e.role){const t=(e=>{if(!e.content)return"";if("string"==typeof e.content){const t=ue(e.content);return t?t.text||"":e.content}return e.content.text||""})(e);return t?(0,W.jsx)("div",{className:"rwpfnl-ai-chat-bubble is-assistant",dangerouslySetInnerHTML:{__html:O(t)}}):null}if("tool"===e.role){const t=(e=>{if(!e)return null;if(e.preview)return e.preview;const t=ue(e.content);return t&&t.preview||null})(e);return t?(0,W.jsxs)("button",{type:"button",className:"rwpfnl-ai-artifact-chip",onClick:()=>h&&h(t),children:[(0,W.jsx)("span",{className:"rwpfnl-ai-artifact-chip__icon",children:(0,W.jsx)(X,{})}),(0,W.jsx)("span",{className:"rwpfnl-ai-artifact-chip__label",children:pe(e)}),(0,W.jsx)("span",{className:"rwpfnl-ai-artifact-chip__cta",children:"View"})]}):null}return null};return(0,W.jsxs)("div",{className:"rwpfnl-ai-thread",children:[(0,W.jsx)("div",{ref:g,className:"rwpfnl-ai-thread__scroll",children:(0,W.jsx)("div",{className:"rwpfnl-ai-thread__inner",children:s?(0,W.jsx)(oe,{}):t&&0!==t.length?(0,W.jsxs)(W.Fragment,{children:[t.map(e=>(0,W.jsx)("div",{className:`rwpfnl-ai-chat-row is-${e.role}`,children:j(e)},e.id)),x&&a&&(0,W.jsx)("div",{className:"rwpfnl-ai-chat-row is-pending",children:(0,W.jsx)(ae,{pending:l,onConfirmAction:f})})]}):(0,W.jsx)(ne,{contextType:n,onSelectPrompt:e=>{v(e),w.current&&w.current.focus()}})})}),(0,W.jsx)(se,{visible:r,label:c,pct:u}),d&&(0,W.jsxs)("div",{className:"rwpfnl-ai-thread__error",children:["⚠️ ",d]}),(0,W.jsxs)("div",{className:"rwpfnl-ai-thread__composer",children:[(0,W.jsxs)("div",{className:"rwpfnl-ai-thread__input-bar",children:[(0,W.jsx)("textarea",{ref:w,className:"rwpfnl-ai-thread__textarea",placeholder:"Ask a follow-up…",rows:"1",value:m,disabled:b,onChange:e=>{v(e.target.value),(e=>{const t=e.target;t.style.height="auto",t.style.height=`${Math.min(t.scrollHeight,140)}px`})(e)},onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||e.ctrlKey||e.altKey||e.metaKey||(e.preventDefault(),y())}}),(0,W.jsx)("button",{type:"button",className:"rwpfnl-ai-thread__send-btn","aria-label":"Send",disabled:!m.trim()||b||o,onClick:y,children:(0,W.jsx)(J,{})})]}),(0,W.jsx)(H,{})]})]})},he=[{key:"wordpress_ai",label:"WordPress AI (Recommended)",placeholder:"",requiresKey:!1},{key:"anthropic",label:"Anthropic (Claude)",placeholder:"sk-ant-api03-…",requiresKey:!0},{key:"openai",label:"OpenAI (GPT)",placeholder:"sk-…",requiresKey:!0},{key:"gemini",label:"Google Gemini",placeholder:"AIza…",requiresKey:!0}],me=e=>{let{isOpen:t=!1,initialProvider:n=null,onClose:l,onSaved:r}=e;const[a,s]=(0,i.useState)(n||"wordpress_ai"),[o,c]=(0,i.useState)(""),[u,d]=(0,i.useState)(""),[p,f]=(0,i.useState)(!1),[h,m]=(0,i.useState)(""),[v,w]=(0,i.useState)(null),x=`rwpfnl-ai-connect-sparkle-${(0,i.useId)().replace(/[^\w-]/g,"")}`;if((0,i.useEffect)(()=>{if(!t)return;m(""),c(""),d(""),s(n||"wordpress_ai");let e=!1;return D().then(t=>{e||w(t||null)}).catch(()=>{e||w(null)}),()=>{e=!0}},[t,n]),!t)return null;const b=e=>v&&v.settings&&v.settings.providers&&v.settings.providers[e]||{},y=b(a),j=y.model_list||[],k=async(e,t)=>{f(!0);try{const l=await(n=e,g("settings/ai",n));l&&l.success?r(l):m(l&&l.message||t)}catch(e){m(e&&e.message||t)}finally{f(!1)}var n};return(0,W.jsx)("div",{className:"rwpfnl-ai-connect-overlay",role:"dialog","aria-modal":"true","aria-labelledby":"rwpfnl-ai-connect-modal-title",onClick:e=>{e.target===e.currentTarget&&l()},children:(0,W.jsxs)("div",{className:"rwpfnl-ai-connect-modal",children:[(0,W.jsx)("button",{type:"button",className:"rwpfnl-ai-connect-close","aria-label":"Close",onClick:l,children:(0,W.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,W.jsx)("path",{d:"M10.5 3.5L3.5 10.5M3.5 3.5l7 7",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,W.jsxs)("div",{className:"rwpfnl-ai-connect-header",children:[(0,W.jsx)("span",{className:"rwpfnl-ai-connect-icon",children:(0,W.jsx)(te,{gradientId:x})}),(0,W.jsx)("h3",{className:"rwpfnl-ai-connect-title",id:"rwpfnl-ai-connect-modal-title",children:"Connect your AI"})]}),(0,W.jsxs)("div",{className:"rwpfnl-ai-connect-body",children:[he.map(e=>{const t=b(e.key),n=a===e.key;return(0,W.jsxs)("div",{className:"rwpfnl-ai-provider-option"+(n?" is-selected":""),onClick:()=>s(e.key),children:[(0,W.jsxs)("div",{className:"rwpfnl-ai-provider-option-header",children:[(0,W.jsxs)("span",{className:"rwpfnl-ai-provider-name",children:[e.label,t.connected&&(0,W.jsx)("span",{className:"rwpfnl-ai-provider-connected",children:"Connected"})]}),(0,W.jsx)("span",{className:"rwpfnl-ai-provider-radio"+(n?" is-checked":"")})]}),n&&(0,W.jsxs)("div",{className:"rwpfnl-ai-provider-option-body",children:[e.requiresKey?(0,W.jsxs)("div",{className:"rwpfnl-ai-provider-key",children:[(0,W.jsx)("label",{htmlFor:`rwpfnl-ai-key-${e.key}`,children:t.connected?"Replace API key (optional)":"API key"}),(0,W.jsx)("input",{id:`rwpfnl-ai-key-${e.key}`,type:"password",autoComplete:"off",placeholder:t.connected?t.masked_key:e.placeholder,value:o,onClick:e=>e.stopPropagation(),onChange:e=>c(e.target.value)})]}):(0,W.jsxs)("div",{className:"rwpfnl-ai-provider-wp-info",children:[(0,W.jsx)("p",{children:"WordPress AI uses the provider configured on this site — no API key needed here. Requires the AI Services plugin or compatible hosting."}),t.connected&&(0,W.jsx)("p",{className:"is-connected",children:"✓ WordPress AI is available and configured."})]}),j.length>1&&(0,W.jsxs)("div",{className:"rwpfnl-ai-provider-model",children:[(0,W.jsx)("label",{htmlFor:`rwpfnl-ai-model-${e.key}`,children:"Model"}),(0,W.jsx)("select",{id:`rwpfnl-ai-model-${e.key}`,value:u||y.model||"",onClick:e=>e.stopPropagation(),onChange:e=>d(e.target.value),children:j.map(e=>(0,W.jsx)("option",{value:e.id,children:e.label},e.id))})]})]})]},e.key)}),h&&(0,W.jsx)("div",{className:"rwpfnl-ai-connect-alert",children:h})]}),(0,W.jsxs)("div",{className:"rwpfnl-ai-connect-actions",children:[(0,W.jsx)("button",{type:"button",className:"rwpfnl-ai-connect-cancel",disabled:p,onClick:l,children:"Cancel"}),(0,W.jsxs)("button",{type:"button",className:"rwpfnl-ai-connect-confirm",disabled:p,onClick:()=>{m(""),"wordpress_ai"!==a?o.trim()||!y.connected?o.trim()?k({provider:a,api_key:o.trim(),model:u},"Connection failed."):m("Please enter your API key."):k({provider:a,set_active:!0},"Could not switch provider."):k({provider:"wordpress_ai",test_connection:!0},"Could not connect WordPress AI.")},children:[p?"Validating…":"Connect",p&&(0,W.jsx)("span",{className:"rwpfnl-ai-connect-loader"})]})]})]})})},ve={"wpfunnels/get-funnel-context":{label:"Analyzing store & funnel context...",pct:10},"wpfunnels/check-setup-status":{label:"Auditing setup readiness...",pct:15},"wpfunnels/search-products":{label:"Searching WooCommerce products...",pct:20},"wpfunnels/create-funnel":{label:"Creating sales funnel structure...",pct:35},"wpfunnels/create-step":{label:"Adding funnel step...",pct:50},"wpfunnels/assign-products-to-step":{label:"Attaching products & discounts...",pct:65},"wpfunnels/upsert-order-bump":{label:"Configuring order bump offer...",pct:75},"wpfunnels/reorder-steps":{label:"Reordering step sequence...",pct:85},"wpfunnels/update-funnel":{label:"Updating funnel status...",pct:90}};function ge(){const[e,t]=(0,i.useState)([]),[n,l]=(0,i.useState)("idle"),[r,a]=(0,i.useState)(null),[s,o]=(0,i.useState)(""),[c,u]=(0,i.useState)(0),[d,p]=(0,i.useState)(null),[f,h]=(0,i.useState)(!1),[m,w]=(0,i.useState)(!1),[x,b]=(0,i.useState)(null),y=(0,i.useRef)(e),j=(0,i.useRef)(n),k=(0,i.useRef)(c),C=(0,i.useRef)(f),_=(0,i.useRef)(0),N=(0,i.useCallback)(e=>{y.current=e,t(e)},[]),S=(0,i.useCallback)(e=>{j.current=e,l(e)},[]),L=(0,i.useCallback)(e=>{k.current=e,u(e)},[]),M=(0,i.useCallback)(e=>{C.current=e,h(e)},[]),z=(0,i.useCallback)(e=>{_.current++,b(e)},[]),E=(0,i.useCallback)(()=>{_.current++,b(null)},[]),A=(0,i.useCallback)(async e=>{const t=++_.current;try{const l=await(n=e,v(`ai/funnel-preview/${n}`));if(t!==_.current)return;l&&l.preview&&b(l.preview)}catch(e){window.console?.warn("Could not load funnel preview:",e)}var n},[]),D="running"===n,T="pending_confirmation"===n,R=(0,i.useCallback)(()=>{S("idle"),p(null),a(null),L(0),o("")},[S,L]),B=(0,i.useCallback)(async e=>{try{const t=await P(e);t&&t.messages&&N(t.messages),t&&t.conversation&&"funnel"===t.conversation.context_type&&t.conversation.context_id&&A(t.conversation.context_id)}catch(e){window.console?.error("Failed to reload messages:",e)}},[A,N]),$=(0,i.useCallback)(async e=>{let t=0,n=0;for(;t<25;){t++;try{const l=await F(e);if(!l)break;if("rate_limited"===l.status){if(n++,n>4){S("error"),p(l.message||"The provider is rate-limiting requests. Please try again shortly.");break}t--;const e=l.retry_after>0?l.retry_after:5;S("running"),o(`Rate limited — retrying in ${Math.ceil(e)}s…`),await new Promise(t=>setTimeout(t,1e3*e+250));continue}if("pending_confirmation"===l.status){S("pending_confirmation"),l.pending&&l.pending.length>0&&a(l.pending),await B(e);break}if("done"===l.status){S("done"),L(100),o("Complete!"),await B(e),setTimeout(()=>{L(0),o(""),S("idle")},1200);break}if("error"===l.status){S("error"),p(l.message||"An error occurred during execution."),await B(e);break}if("running"===l.status){if(S("running"),l.progress&&l.progress.label)o(l.progress.label),"number"==typeof l.progress.pct&&L(l.progress.pct);else if(l.executed&&l.executed.length>0){const e=l.executed[l.executed.length-1],t=ve[e.tool];t?(o(t.label),L(t.pct)):(o(`Executing ${e.tool}...`),L(Math.min(90,k.current+15)))}await B(e)}}catch(t){S("error"),p(t.message||"Loop step execution failed"),await B(e);break}}},[B,S,L]),I=(0,i.useCallback)(async e=>{if(e){R(),N([]),E(),w(!0);try{const t=await P(e);t&&t.messages&&N(t.messages),t&&t.pending&&t.pending.length>0?(a(t.pending),S("pending_confirmation")):t&&t.conversation&&S(t.conversation.status||"idle"),t&&t.conversation&&"funnel"===t.conversation.context_type&&t.conversation.context_id&&await A(t.conversation.context_id)}catch(e){p(e.message||"Failed to load conversation messages"),S("error")}finally{w(!1)}}},[E,R,A,S,N]),O=(0,i.useCallback)(()=>{N([]),E(),R()},[E,R,N]),W=(0,i.useCallback)(async function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t&&w(!0);try{await B(e)}finally{t&&w(!1)}S("running"),L(10),o("Thinking..."),await $(e)},[$,B,S,L]),H=(0,i.useCallback)(async(e,t)=>{if(t.trim()&&!C.current){M(!0),p(null);try{await(n=e,l=t,g(`ai/conversations/${n}/messages`,{content:l})),await W(e)}catch(e){p(e.message||"Failed to send message"),S("error")}finally{M(!1)}}var n,l},[W,M,S]),V=(0,i.useCallback)(async e=>{if(!C.current){M(!0),p(null),N([]),E();try{await W(e,!0)}catch(e){p(e.message||"Failed to start agent loop"),S("error")}finally{M(!1)}}},[E,W,M,S,N]),U=(0,i.useCallback)(async function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";S("running"),a(null),o(t?"Executing approved action...":"Processing refusal..."),L(50);try{await function(e,t){return g(`ai/conversations/${e}/confirm`,{approve:t,deny_reason:arguments.length>2&&void 0!==arguments[2]?arguments[2]:""})}(e,t,n),await B(e),await $(e)}catch(e){p(e.message||"Failed to confirm action"),S("error")}},[$,B,S,L]);return{messages:e,loopStatus:n,pendingAction:r,progressLabel:s,progressPct:c,errorMessage:d,isSending:f,isLoadingConversation:m,previewData:x,isRunning:D,isPendingConfirmation:T,loadConversation:I,resetConversation:O,sendMessage:H,startLoop:V,confirmAction:U,fetchPreview:A,setPreviewData:z}}function we(){const[e,t]=(0,i.useState)([]),[n,l]=(0,i.useState)(!1),[r,a]=(0,i.useState)(!0),[s,c]=(0,i.useState)(!1),[u,d]=(0,i.useState)(null),p=(0,i.useRef)(e),f=(0,i.useRef)(r),h=(0,i.useRef)(s),v=(0,i.useCallback)(e=>{p.current=e,t(e)},[]),x=(0,i.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;d(null);try{const n=await A({contextType:e,contextId:t,limit:15,offset:0}),l=n&&n.conversations||[];v(l),f.current=l.length>=15,a(f.current)}catch(e){d(e.message||"Failed to fetch conversations")}finally{l(!0)}},[v]),b=(0,i.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!h.current&&f.current){h.current=!0,c(!0);try{const n=await A({contextType:e,contextId:t,limit:15,offset:p.current.length}),l=n&&n.conversations||[];l.length&&v([...p.current,...l]),f.current=l.length>=15,a(f.current)}catch(e){f.current=!1,a(!1)}finally{h.current=!1,c(!1)}}},[v]),y=(0,i.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"dashboard",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";d(null);try{const r=await(e=>{let{message:t="",contextType:n="dashboard",contextId:l=0,title:r=""}=e;return g("ai/conversations",{message:t,context_type:n,context_id:l,title:r})})({message:e,contextType:t,contextId:n,title:l});if(r&&r.conversation_id){const e={id:r.conversation_id,title:r.title||"New Conversation",context_type:r.context_type||t,context_id:r.context_id||n,status:"idle",created_at:(new Date).toISOString()};return v([e,...p.current]),e}return}catch(e){throw d(e.message||"Failed to start conversation"),e}},[v]);return{conversations:e,loaded:n,hasMore:r,isLoadingMore:s,error:u,fetchConversations:x,loadMoreConversations:b,createNewChat:y,renameConversation:(0,i.useCallback)(async(e,t)=>{try{await((e,t)=>{return n=`ai/conversations/${e}`,l=t,(0,o.A)({url:m(n,null,void 0),method:"PATCH",...l?{data:l}:{}});var n,l})(e,{title:t}),v(p.current.map(n=>n.id===e?{...n,title:t}:n))}catch(e){d(e.message||"Failed to rename conversation")}},[v]),deleteConversation:(0,i.useCallback)(async e=>{try{await(e=>w(`ai/conversations/${e}`))(e);const t=p.current.filter(t=>t.id!==e);return v(t),t}catch(e){return d(e.message||"Failed to delete conversation"),p.current}},[v])}}const xe=()=>(0,W.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",children:[(0,W.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,W.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),be=e=>{let{collapsed:t=!1}=e;return(0,W.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:t?"rotate(180deg)":"none"},children:[(0,W.jsx)("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),(0,W.jsx)("line",{x1:"9",y1:"4",x2:"9",y2:"20"}),(0,W.jsx)("path",{d:"M13 9l-2 3 2 3"})]})},ye=()=>(0,W.jsxs)("svg",{className:"rwpfnl-ai-sidebar-search-icon",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,W.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]}),je=e=>{let{className:t=""}=e;return(0,W.jsx)("svg",{className:t,width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,W.jsx)("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})},ke=()=>(0,W.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,W.jsx)("circle",{cx:"12",cy:"5",r:"2"}),(0,W.jsx)("circle",{cx:"12",cy:"12",r:"2"}),(0,W.jsx)("circle",{cx:"12",cy:"19",r:"2"})]}),Ce=()=>(0,W.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,W.jsx)("path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"})}),_e=()=>(0,W.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("polyline",{points:"3 6 5 6 21 6"}),(0,W.jsx)("path",{d:"M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]}),Ne=()=>(0,W.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,W.jsx)("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"})]}),Se=()=>(0,W.jsxs)("svg",{viewBox:"0 0 24 24",width:"17",height:"17",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),(0,W.jsx)("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]}),Le=e=>{let{size:t=15}=e;return(0,W.jsxs)("svg",{viewBox:"0 0 24 24",width:t,height:t,fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,W.jsx)("polyline",{points:"12 5 19 12 12 19"})]})},Me=()=>(0,W.jsxs)("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,W.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),ze=e=>{let{size:t=15,strokeWidth:n=2}=e;return(0,W.jsxs)("svg",{viewBox:"0 0 24 24",width:t,height:t,fill:"none",stroke:"currentColor",strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("path",{d:"M12 2 2 7l10 5 10-5-10-5z"}),(0,W.jsx)("path",{d:"M2 17l10 5 10-5"}),(0,W.jsx)("path",{d:"M2 12l10 5 10-5"})]})},Ee=()=>(0,W.jsx)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2.6",strokeLinecap:"round",strokeLinejoin:"round",children:(0,W.jsx)("polyline",{points:"20 6 9 17 4 12"})}),Ae=()=>(0,W.jsxs)("svg",{viewBox:"0 0 24 24",width:"13",height:"13",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),(0,W.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,W.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),Pe=()=>(0,W.jsx)("svg",{viewBox:"0 0 24 24",width:"48",height:"48",fill:"none",stroke:"currentColor",strokeWidth:"1",children:(0,W.jsx)("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})}),Fe=()=>(0,W.jsxs)("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("path",{d:"M9 12l2 2 4-4"}),(0,W.jsx)("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10Z"})]}),De=()=>(0,W.jsxs)("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,W.jsx)("path",{d:"M12 6v6l4 2"})]}),Te=[{icon:(0,W.jsx)(ze,{size:16,strokeWidth:1.8}),title:"Builds full funnels",copy:"Landing page, checkout, order bump and upsell — created step by step."},{icon:(0,W.jsx)(Fe,{}),title:"Asks before it acts",copy:"Anything that changes live pages or spends money is confirmed first."},{icon:(0,W.jsx)(De,{}),title:"Works in one place",copy:"Every change happens live in your funnel — no separate export or import."}],Re=e=>{let{onOpenConnect:t}=e;return(0,W.jsx)("div",{className:"rwpfnl-ai-locked",children:(0,W.jsxs)("div",{className:"rwpfnl-ai-locked__inner",children:[(0,W.jsx)("div",{className:"rwpfnl-ai-locked__badge",children:(0,W.jsx)(te,{gradientId:"rwpfnl-ai-locked-sparkle"})}),(0,W.jsx)("h1",{children:"Connect an AI Model to Get Started"}),(0,W.jsx)("p",{className:"rwpfnl-ai-locked__lead",children:"No AI model is connected yet. Link a provider to build funnels, manage offers and automate your setup in plain English."}),(0,W.jsx)("div",{className:"rwpfnl-ai-locked__features",children:Te.map(e=>{let{icon:t,title:n,copy:l}=e;return(0,W.jsxs)("div",{className:"rwpfnl-ai-locked__feature",children:[(0,W.jsx)("div",{className:"rwpfnl-ai-locked__feature-ico",children:t}),(0,W.jsx)("p",{className:"rwpfnl-ai-locked__feature-title",children:n}),(0,W.jsx)("p",{className:"rwpfnl-ai-locked__feature-copy",children:l})]},n)})}),(0,W.jsxs)("button",{type:"button",className:"rwpfnl-ai-locked__cta",onClick:t,children:["Connect an AI model",(0,W.jsx)(Le,{})]}),(0,W.jsx)("p",{className:"rwpfnl-ai-locked__note",children:"Supports OpenAI, Anthropic, Gemini and more"})]})})},Be=e=>{let{preview:t}=e;const n=t.funnel||t,l=t.steps||n&&n.steps||[],r=n.status||"draft";return(0,W.jsxs)("div",{className:"rwpfnl-ai-flow-preview",children:[(0,W.jsxs)("div",{className:"rwpfnl-ai-flow-preview__header",children:[(0,W.jsx)("h4",{className:"rwpfnl-ai-flow-preview__title",children:n.title||"Funnel Canvas"}),(0,W.jsx)("span",{className:`rwpfnl-ai-flow-preview__status is-${r}`,children:r.toUpperCase()})]}),n.type&&(0,W.jsxs)("div",{className:"rwpfnl-ai-flow-preview__meta",children:[(0,W.jsxs)("span",{children:["Type: ",(0,W.jsx)("strong",{children:n.type})]}),n.builder&&(0,W.jsxs)("span",{children:["Builder: ",(0,W.jsx)("strong",{children:n.builder})]})]}),(0,W.jsx)("div",{className:"rwpfnl-ai-flow-preview__chain",children:l.map((e,t)=>(0,W.jsxs)("div",{className:"rwpfnl-ai-flow-chain-item",children:[(0,W.jsxs)("div",{className:"rwpfnl-ai-flow-step-node",children:[(0,W.jsx)("div",{className:"rwpfnl-ai-flow-step-node__badge",children:t+1}),(0,W.jsxs)("div",{className:"rwpfnl-ai-flow-step-node__content",children:[(0,W.jsx)("div",{className:"rwpfnl-ai-flow-step-node__type",children:e.type}),(0,W.jsx)("div",{className:"rwpfnl-ai-flow-step-node__title",children:e.title||e.name}),e.products&&e.products.length>0&&(0,W.jsxs)("div",{className:"rwpfnl-ai-flow-step-node__products",children:[e.products.length," product(s) assigned"]}),e.order_bump&&e.order_bump.enabled&&(0,W.jsx)("div",{className:"rwpfnl-ai-flow-step-node__bump",children:"Order bump active"})]})]}),t<l.length-1&&(0,W.jsx)("div",{className:"rwpfnl-ai-flow-preview__connector"})]},e.id||t))})]})},$e=e=>`${window.location.origin+window.location.pathname}?page=edit_funnel&id=${e}#/flow`,Ie=e=>{let{preview:t}=e;const n=t.funnel||t,l=n&&(n.id||n.ID)||null;return(0,W.jsxs)("div",{className:"rwpfnl-ai-preview-card",children:[(0,W.jsxs)("div",{className:"rwpfnl-ai-preview-card__tag",children:[(0,W.jsx)("span",{className:"rwpfnl-ai-preview-card__tag-lead",children:(0,W.jsx)(ze,{})}),"Built a sales funnel",(0,W.jsx)("span",{className:"rwpfnl-ai-preview-card__tag-check",children:(0,W.jsx)(Ee,{})})]}),(0,W.jsxs)("div",{className:"rwpfnl-ai-preview-card__shell",children:[(0,W.jsx)("div",{className:"rwpfnl-ai-preview-card__body",children:(0,W.jsx)(Be,{preview:t})}),(0,W.jsxs)("div",{className:"rwpfnl-ai-preview-card__foot",children:[(0,W.jsx)("span",{className:"rwpfnl-ai-preview-card__foot-lbl",children:"FUNNEL"}),l&&(0,W.jsxs)("a",{href:$e(l),target:"_blank",rel:"noopener noreferrer",className:"rwpfnl-ai-preview-card__foot-open",children:["Open in funnel builder",(0,W.jsx)(Ae,{})]})]})]})]})},Oe=e=>{let{previewData:t=null,onClose:n}=e;return(0,W.jsxs)("div",{className:"rwpfnl-ai-canvas",children:[(0,W.jsxs)("div",{className:"rwpfnl-ai-canvas__header",children:[(0,W.jsx)("span",{className:"rwpfnl-ai-canvas__title",children:"Funnel canvas"}),(0,W.jsx)("button",{type:"button",className:"rwpfnl-ai-canvas__close","aria-label":"Close preview",onClick:n,children:(0,W.jsx)(Me,{})})]}),(0,W.jsx)("div",{className:"rwpfnl-ai-canvas__body",children:t?(0,W.jsx)(Ie,{preview:t}):(0,W.jsxs)("div",{className:"rwpfnl-ai-canvas__empty",children:[(0,W.jsx)("div",{className:"rwpfnl-ai-canvas__empty-icon",children:(0,W.jsx)(Pe,{})}),(0,W.jsx)("h4",{children:"Live Canvas Preview"}),(0,W.jsx)("p",{children:"When the AI creates or modifies a sales funnel, its live step flow and configuration will display here."})]})})]})},We={openai:"OpenAI",anthropic:"Anthropic",gemini:"Gemini",wp_ai:"WordPress AI"},He={openai:"openai_model",anthropic:"anthropic_model",gemini:"gemini_model"},Ve=e=>{if(!e)return"";const t=e.provider||"",n=We[t]||t||"AI",l=He[t],r=l?e[l]:"";return r?`${n} · ${r}`:n},Ue=e=>{let{initialPrompt:t="",onStartConversation:n,onOpenConnect:l}=e;const[r,a]=(0,i.useState)(null),[s,o]=(0,i.useState)(t),[c,u]=(0,i.useState)(!1),[d,p]=(0,i.useState)(!1),[f,h]=(0,i.useState)(U[0].key),m=(0,i.useRef)(null),v=!(!r||!r.enabled),g=U.find(e=>e.key===f)||U[0];(0,i.useEffect)(()=>{let e=!1;return D().then(t=>{e||a(t&&t.settings||{})}).catch(()=>{e||a({})}),()=>{e=!0}},[]);const w=e=>{const t=e||m.current;t&&(t.style.height="auto",t.style.height=`${Math.min(t.scrollHeight,180)}px`)};(0,i.useEffect)(()=>{s&&w()},[]);const x=()=>{const e=s.trim();e&&!d&&v&&(p(!0),n(e))};return(0,W.jsx)("div",{className:"rwpfnl-ai-landing",children:(0,W.jsxs)("div",{className:"rwpfnl-ai-landing__inner",children:[(0,W.jsx)("h2",{children:"What do you want to build?"}),(0,W.jsx)("p",{className:"rwpfnl-ai-landing__tagline",children:"Ask anything about your funnels, steps, offers and setup."}),(0,W.jsxs)("div",{className:"rwpfnl-ai-askbox"+(c?" is-focused":""),children:[(0,W.jsx)("textarea",{ref:m,rows:"1",placeholder:"Ask me anything...",value:s,disabled:!v||d,onChange:e=>{o(e.target.value),w(e.target)},onFocus:()=>u(!0),onBlur:()=>u(!1),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||e.ctrlKey||e.altKey||e.metaKey||(e.preventDefault(),x())}}),(0,W.jsxs)("div",{className:"rwpfnl-ai-askbox__foot",children:[v?(0,W.jsxs)("span",{className:"rwpfnl-ai-model-chip",children:[(0,W.jsx)("span",{className:"rwpfnl-ai-model-chip__dot"}),Ve(r)]}):(0,W.jsx)("button",{type:"button",className:"rwpfnl-ai-model-chip is-connect",onClick:l,children:"✦ Connect AI to unlock"}),(0,W.jsx)("button",{type:"button",className:"rwpfnl-ai-landing__send","aria-label":"Send",disabled:!v||d||!s.trim(),onClick:x,children:d?(0,W.jsx)("span",{className:"rwpfnl-ai-landing__send-spinner"}):(0,W.jsx)(Se,{})})]})]}),(0,W.jsx)(H,{}),(0,W.jsxs)("div",{className:"rwpfnl-ai-starters",children:[(0,W.jsx)("div",{className:"rwpfnl-ai-starters__label",children:"Try the copilot for…"}),(0,W.jsx)("div",{className:"rwpfnl-ai-starters__tabs",children:U.map(e=>(0,W.jsx)("button",{type:"button",className:"rwpfnl-ai-starters__tab"+(e.key===f?" is-active":""),onClick:()=>h(e.key),children:e.label},e.key))}),(0,W.jsx)("div",{className:"rwpfnl-ai-starters__cards",children:(g.items||[]).map(e=>(0,W.jsxs)("button",{type:"button",className:"rwpfnl-ai-starters__card",disabled:!v||d,onClick:()=>{return t=e.prompt,o(t),void(m.current&&(m.current.focus(),w()));var t},children:[(0,W.jsx)("span",{children:e.label}),(0,W.jsx)("span",{className:"rwpfnl-ai-starters__card-arrow",children:(0,W.jsx)(Le,{})})]},e.label))})]})]})})},Ze={wordpress_ai:"WordPress AI",anthropic:"Anthropic",openai:"OpenAI",gemini:"Google Gemini"},Ye="wpfnl_ai_sidebar_collapsed",qe=["72%","88%","60%","80%","66%","84%"],Ke=()=>{try{return"1"===window.localStorage.getItem(Ye)}catch(e){return!1}},Qe=e=>{let{conversations:t=[],activeId:n=null,loaded:l=!0,hasMore:r=!1,loadingMore:a=!1,onNewChat:s,onSelectChat:o,onRenameChat:c,onDeleteChat:u,onLoadMore:d,onOpenConnect:p,handle:f}=e;const[h,m]=(0,i.useState)(""),[v,g]=(0,i.useState)(null),[w,x]=(0,i.useState)(""),[b,y]=(0,i.useState)(null),[j,k]=(0,i.useState)(Ke),[C,_]=(0,i.useState)(null),[N,S]=(0,i.useState)(null),[L,M]=(0,i.useState)(!1),z=(0,i.useRef)(null),E=(0,i.useCallback)(async()=>{try{const e=await D(),t=e&&e.settings||{},n=t.provider||"";if(!n)return void y("");const l=t[`${n}_model`]||"",r=Ze[n]||n;y(l?`${r} · ${l}`:r)}catch(e){y("")}},[]);(0,i.useImperativeHandle)(f,()=>({fetchProviderLabel:E}),[E]),(0,i.useEffect)(()=>{E()},[E]),(0,i.useEffect)(()=>{if(!C)return;const e=e=>{z.current&&!z.current.contains(e.target)&&_(null)},t=e=>{"Escape"===e.key&&_(null)};return document.addEventListener("click",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("click",e),document.removeEventListener("keydown",t)}},[C]),(0,i.useEffect)(()=>{N&&!t.some(e=>e.id===N.id)&&(M(!1),S(null))},[t,N]);const A=(e=>{const t=new Date,n=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),l=n-6048e5,r={today:{label:"Today",items:[]},week:{label:"Previous 7 days",items:[]},older:{label:"Older",items:[]}};return e.forEach(e=>{const t=(e=>{if(!e)return 0;const t=/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(e)?e.replace(" ","T"):e,n=new Date(t);return Number.isNaN(n.getTime())?0:n.getTime()})(e.updated_at||e.created_at);t>=n?r.today.items.push(e):t>=l?r.week.items.push(e):r.older.items.push(e)}),[r.today,r.week,r.older].filter(e=>e.items.length>0)})(h.trim()?t.filter(e=>e.title&&e.title.toLowerCase().includes(h.toLowerCase())):t),P=e=>{v===e&&w.trim()&&c({id:e,title:w.trim()}),g(null)},F=e=>t.find(t=>t.id===e)||null,T=()=>{L||S(null)};return(0,W.jsxs)("div",{className:"rwpfnl-ai-sidebar"+(j?" is-collapsed":""),children:[(0,W.jsxs)("div",{className:"rwpfnl-ai-sidebar__top",children:[(0,W.jsxs)("button",{type:"button",className:"rwpfnl-ai-sidebar__new-chat",title:"New chat",onClick:s,children:[(0,W.jsx)(xe,{}),!j&&(0,W.jsx)("span",{children:"New chat"})]}),(0,W.jsx)("button",{type:"button",className:"rwpfnl-ai-sidebar__collapse",title:j?"Expand sidebar":"Collapse sidebar",onClick:()=>{const e=!j;k(e);try{window.localStorage.setItem(Ye,e?"1":"0")}catch(e){}},children:(0,W.jsx)(be,{collapsed:j})})]}),!j&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)("div",{className:"rwpfnl-ai-sidebar__search",children:[(0,W.jsx)(ye,{}),(0,W.jsx)("input",{type:"text",placeholder:"Search chats",className:"rwpfnl-ai-sidebar__search-input",value:h,onChange:e=>m(e.target.value)})]}),(0,W.jsx)("div",{className:"rwpfnl-ai-sidebar__list",children:l?(0,W.jsxs)(W.Fragment,{children:[A.map(e=>(0,W.jsxs)("div",{children:[(0,W.jsx)("div",{className:"rwpfnl-ai-sidebar__grouplabel",children:e.label}),e.items.map(e=>(0,W.jsxs)("div",{className:`rwpfnl-ai-sidebar__item${e.id===n?" is-active":""}${C&&C.id===e.id?" is-menu-open":""}`,onClick:()=>{v!==e.id&&o(e.id)},onContextMenu:t=>((e,t)=>{e.preventDefault(),e.stopPropagation(),_({id:t.id,x:e.clientX,y:e.clientY})})(t,e),children:[(0,W.jsx)(je,{className:"rwpfnl-ai-sidebar__item-icon"}),(0,W.jsx)("div",{className:"rwpfnl-ai-sidebar__item-main",children:v===e.id?(0,W.jsx)("input",{type:"text",autoFocus:!0,className:"rwpfnl-ai-sidebar__edit-input",value:w,onChange:e=>x(e.target.value),onKeyUp:t=>{"Enter"===t.key&&P(e.id),"Escape"===t.key&&g(null)},onBlur:()=>P(e.id),onClick:e=>e.stopPropagation()}):(0,W.jsx)("span",{className:"rwpfnl-ai-sidebar__item-title",children:e.title||"Untitled chat"})}),(0,W.jsx)("button",{type:"button",className:"rwpfnl-ai-sidebar__item-more",title:"More",onClick:t=>((e,t)=>{if(e.preventDefault(),e.stopPropagation(),C&&C.id===t.id)return void _(null);const n=e.currentTarget.getBoundingClientRect();_({id:t.id,x:n.right-170,y:n.bottom+4})})(t,e),children:(0,W.jsx)(ke,{})})]},e.id))]},e.label)),0===A.length&&(0,W.jsx)("div",{className:"rwpfnl-ai-sidebar__empty",children:"No conversations yet."}),r&&(0,W.jsx)("button",{type:"button",className:"rwpfnl-ai-sidebar__load-more",disabled:a,onClick:d,children:a?"Loading...":"Load More"})]}):(0,W.jsxs)("div",{className:"rwpfnl-ai-sidebar__skeleton","aria-hidden":"true",children:[(0,W.jsx)("div",{className:"rwpfnl-ai-skel-shimmer rwpfnl-ai-skel-grouplabel"}),qe.map((e,t)=>(0,W.jsxs)("div",{className:"rwpfnl-ai-skel-row",children:[(0,W.jsx)("span",{className:"rwpfnl-ai-skel-shimmer rwpfnl-ai-skel-dot"}),(0,W.jsx)("span",{className:"rwpfnl-ai-skel-shimmer rwpfnl-ai-skel-bar",style:{width:e}})]},t))]})})]}),C&&(0,W.jsxs)("ul",{ref:z,className:"rwpfnl-ai-sidebar__menu",style:{top:`${C.y}px`,left:`${C.x}px`},children:[(0,W.jsxs)("li",{onClick:()=>{C&&o(C.id),_(null)},children:[(0,W.jsx)(je,{}),"Open"]}),(0,W.jsxs)("li",{onClick:()=>{const e=C&&F(C.id);_(null),e&&(e=>{g(e.id),x(e.title||"")})(e)},children:[(0,W.jsx)(Ce,{}),"Rename"]}),(0,W.jsxs)("li",{className:"is-danger",onClick:()=>{const e=C&&F(C.id);_(null),e&&S(e)},children:[(0,W.jsx)(_e,{}),"Delete"]})]}),N&&(0,W.jsx)("div",{className:"rwpfnl-ai-sidebar__delete-overlay",onClick:T,children:(0,W.jsxs)("div",{className:"rwpfnl-ai-sidebar__delete-popup",onClick:e=>e.stopPropagation(),children:[(0,W.jsx)("h4",{children:"Delete conversation"}),(0,W.jsx)("p",{children:"This chat and its messages will be permanently deleted."}),(0,W.jsxs)("div",{className:"rwpfnl-ai-sidebar__delete-actions",children:[(0,W.jsx)("button",{type:"button",className:"rwpfnl-ai-btn-cancel",disabled:L,onClick:T,children:"Cancel"}),(0,W.jsx)("button",{type:"button",className:"rwpfnl-ai-btn-delete",disabled:L,onClick:()=>{N&&(M(!0),u(N.id))},children:L?"Deleting...":"Delete"})]})]})}),(0,W.jsxs)("div",{className:"rwpfnl-ai-sidebar__footer",children:[(0,W.jsxs)("span",{className:"rwpfnl-ai-sidebar__model"+(null===b?" is-loading":""),children:[b&&(0,W.jsx)("span",{className:"rwpfnl-ai-sidebar__model-dot"}),!j&&(b||"")]}),(0,W.jsx)("button",{type:"button",className:"rwpfnl-ai-sidebar__settings",title:"AI settings",onClick:p,children:(0,W.jsx)(Ne,{})})]})]})},Ge=["dashboard","funnel","step","analytics"],Xe=()=>{const[e,t]=(0,a.ok)(),n=parseInt(e.get("conversation_id"),10)||0,l=(0,i.useRef)({prompt:e.get("wpfnl_prompt")||"",context:e.get("wpfnl_context")||""}),r=l.current,s=r.prompt?0:n,[o,c]=(0,i.useState)(!0),[u,d]=(0,i.useState)(!1),[p,f]=(0,i.useState)(()=>Ge.includes(r.context)?r.context:"dashboard"),[h,m]=(0,i.useState)(!1),{conversations:v,loaded:g,hasMore:w,isLoadingMore:x,fetchConversations:b,loadMoreConversations:y,createNewChat:j,renameConversation:k,deleteConversation:C}=we(),{messages:_,pendingAction:N,progressLabel:S,progressPct:L,errorMessage:M,isSending:z,isLoadingConversation:E,previewData:A,isRunning:P,isPendingConfirmation:F,loadConversation:T,resetConversation:R,sendMessage:B,startLoop:$,confirmAction:I,setPreviewData:O}=ge(),H=(0,i.useRef)(0),V=(0,i.useRef)(null),U=(0,i.useCallback)(async()=>{try{const e=await D();e&&e.settings&&c(!!e.settings.enabled)}catch(e){window.console?.warn("AI settings check:",e)}},[]),Z=(0,i.useCallback)(function(e){let{replace:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(t=>{const n=new URLSearchParams(t);return e?n.set("conversation_id",String(e)):n.delete("conversation_id"),n.delete("wpfnl_prompt"),n.delete("wpfnl_context"),n},{replace:n})},[t]),Y=(0,i.useCallback)(async e=>{if(s)await B(s,e);else try{const t=await j(e,p,0);t&&(H.current=t.id,Z(t.id),await $(t.id))}catch(e){}},[s,p,j,B,Z,$]);return(0,i.useEffect)(()=>(document.body.classList.add("folded"),()=>document.body.classList.remove("folded")),[]),(0,i.useEffect)(()=>{let e=!1;return(async()=>{await U(),e||(b(p,0),r.prompt&&(Z(0,{replace:!0}),l.current={prompt:"",context:r.context},await Y(r.prompt)))})(),()=>{e=!0}},[]),(0,i.useEffect)(()=>{s?H.current!==s&&(H.current=s,m(!1),T(s)):H.current=0},[s,T]),(0,W.jsxs)("div",{className:"rwpfnl-ai-page",children:[(0,W.jsx)("div",{className:"rwpfnl-ai-page__container",children:o?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Qe,{handle:V,conversations:v,activeId:s||null,loaded:g,hasMore:w,loadingMore:x,onNewChat:()=>{H.current=0,m(!1),Z(0),R()},onSelectChat:e=>{m(!1),Z(e)},onRenameChat:e=>{let{id:t,title:n}=e;return k(t,n)},onDeleteChat:async e=>{const t=await C(e);if(e===s){const e=t.length>0?t[0].id:0;H.current=0,Z(e,{replace:!0}),e||R()}},onLoadMore:()=>y(p,0),onOpenConnect:()=>d(!0)}),(0,W.jsx)("main",{className:"rwpfnl-ai-page__main",children:s?(0,W.jsx)(fe,{messages:_,contextType:p,pendingAction:N,isRunning:P,isPendingConfirmation:F,isLoadingConversation:E,isSending:z,progressLabel:S,progressPct:L,errorMessage:M,onSendMessage:Y,onConfirmAction:async e=>{let{approve:t,denyReason:n}=e;s&&await I(s,t,n)},onOpenPreview:e=>{O(e),m(!1)}}):(0,W.jsx)(Ue,{onStartConversation:Y,onOpenConnect:()=>d(!0)})}),A&&!h&&(0,W.jsx)("aside",{className:"rwpfnl-ai-page__canvas",children:(0,W.jsx)(Oe,{previewData:A,onClose:()=>m(!0)})})]}):(0,W.jsx)(Re,{onOpenConnect:()=>d(!0)})}),(0,W.jsx)(me,{isOpen:u,onClose:()=>d(!1),onSaved:()=>{d(!1),U(),V.current?.fetchProviderLabel()}})]})},Je=()=>(0,W.jsxs)("svg",{width:"38",height:"28",viewBox:"0 0 38 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("path",{d:"M7.01532 18H31.9847L34 11H5L7.01532 18Z",fill:"#EE8134"}),(0,W.jsx)("path",{d:"M11.9621 27.2975C12.0923 27.7154 12.4792 28 12.9169 28H26.0831C26.5208 28 26.9077 27.7154 27.0379 27.2975L29 21H10L11.9621 27.2975Z",fill:"#6E42D3"}),(0,W.jsx)("path",{d:"M37.8161 0.65986C37.61 0.247888 37.2609 0 36.8867 0H1.11326C0.739128 0 0.390003 0.247888 0.183972 0.65986C-0.0220592 1.07193 -0.0573873 1.59277 0.0898627 2.04655L1.69781 7H36.3022L37.9102 2.04655C38.0574 1.59287 38.022 1.07193 37.8161 0.65986Z",fill:"#6E42D3"})]}),et=()=>(0,W.jsx)("svg",{fill:"none",width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",children:(0,W.jsx)("path",{fill:"#12B76A",stroke:"#12B76A",strokeWidth:".605",d:"M7.14 4.792c0 .16.13.291.291.291h3.073l-5.919 5.92a.292.292 0 10.413.412l5.919-5.92V8.57a.292.292 0 00.583 0V5.083a.584.584 0 00-.583-.583H7.43a.292.292 0 00-.291.292z"})}),tt=()=>(0,W.jsx)("svg",{fill:"none",width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",children:(0,W.jsx)("path",{fill:"#EC5956",stroke:"#EC5956",strokeWidth:".605",d:"M7.14 11.208c0-.16.13-.291.291-.291h3.073l-5.919-5.92a.292.292 0 11.413-.412l5.919 5.92V7.43a.292.292 0 01.583 0v3.486a.584.584 0 01-.583.583H7.43a.292.292 0 01-.291-.292z"})}),nt=()=>(0,W.jsxs)("svg",{fill:"none",width:"22",height:"22",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("circle",{cx:"11",cy:"11",r:"11",fill:"#2FCF5C"}),(0,W.jsx)("path",{fill:"#fff",d:"M15.209 9.236l-1.587.396-1.983-2.471a.926.926 0 00-1.445 0L8.21 9.63l-1.618-.395a.933.933 0 00-1.124 1.124l1.093 3.842a.618.618 0 00.617.451h7.412a.618.618 0 00.618-.45l1.1-3.843a.932.932 0 00-1.1-1.124zM5.172 8.57a.772.772 0 100-1.545.772.772 0 000 1.544zm11.427 0a.772.772 0 100-1.545.772.772 0 000 1.544zm-5.714-2.626a.772.772 0 100-1.544.772.772 0 000 1.544zm3.706 10.964H7.18a.618.618 0 010-1.236h7.411a.618.618 0 110 1.236z"})]}),lt=()=>(0,W.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("rect",{x:"3",y:"5",width:"18",height:"16",rx:"3",stroke:"currentColor",strokeWidth:"1.8"}),(0,W.jsx)("path",{d:"M3 10h18",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,W.jsx)("path",{d:"M8 3v4M16 3v4",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]}),rt=()=>(0,W.jsxs)("svg",{className:"rwpfnl-sync-icon",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("polyline",{points:"23 4 23 10 17 10"}),(0,W.jsx)("polyline",{points:"1 20 1 14 7 14"}),(0,W.jsx)("path",{d:"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"})]}),at=()=>(0,W.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2"}),(0,W.jsx)("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]}),st=()=>(0,W.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("path",{d:"M7 17L17 7"}),(0,W.jsx)("path",{d:"M8 7h9v9"})]}),it=()=>(0,W.jsx)("svg",{width:"8",height:"14",viewBox:"0 0 8 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,W.jsx)("path",{d:"M7 1L1 7l6 6",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}),ot=()=>(0,W.jsx)("svg",{width:"8",height:"14",viewBox:"0 0 8 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,W.jsx)("path",{d:"M1 1l6 6-6 6",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}),ct=e=>{let{color:t="#6E42D3"}=e;return(0,W.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"13",height:"11",viewBox:"0 0 13 11",fill:"none",children:(0,W.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.52454 1.2922C4.45632 1.00791 4.00201 1.0079 3.93379 1.2922L3.2121 4.29955C3.03302 5.04577 2.29449 5.57889 1.43983 5.57889H0.604167C0.270495 5.57889 0 5.33736 0 5.03941C0 4.74146 0.270495 4.49992 0.604167 4.49992H1.43983C1.72472 4.49992 1.97089 4.32221 2.03059 4.07347L2.75228 1.06613C3.0934 -0.355368 5.36493 -0.355381 5.70606 1.06612L7.55879 8.78661C7.62701 9.07092 8.08132 9.07091 8.14954 8.78661L8.87123 5.77927C9.05031 5.03304 9.78884 4.49992 10.6435 4.49992H11.4792C11.8128 4.49992 12.0833 4.74146 12.0833 5.03941C12.0833 5.33736 11.8128 5.57889 11.4792 5.57889H10.6435C10.3586 5.57889 10.1124 5.7566 10.0527 6.00535L9.33105 9.01269C8.98993 10.4342 6.7184 10.4342 6.37728 9.01269L4.52454 1.2922Z",fill:t})})},ut=()=>(0,W.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:[(0,W.jsx)("path",{d:"M9 1L1 9",stroke:"#7a8b9a",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,W.jsx)("path",{d:"M1 1L9 9",stroke:"#7a8b9a",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),dt=()=>(0,W.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[(0,W.jsx)("rect",{width:"24",height:"24",rx:"12",fill:"#239654"}),(0,W.jsx)("path",{d:"M17.7212 8.25825C17.3499 7.91381 16.747 7.91402 16.3752 8.25825L10.3174 13.8709L7.62503 11.3764C7.25325 11.032 6.65061 11.032 6.27883 11.3764C5.90706 11.7209 5.90706 12.2792 6.27883 12.6237L9.6442 15.7416C9.82998 15.9137 10.0736 16 10.3172 16C10.5608 16 10.8046 15.9139 10.9904 15.7416L17.7212 9.50546C18.0929 9.16125 18.0929 8.60267 17.7212 8.25825Z",fill:"#fff",stroke:"#fff",strokeWidth:".2"})]}),pt=()=>(0,W.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"11",height:"8",viewBox:"0 0 11 8",fill:"none",children:(0,W.jsx)("path",{d:"M10.0326 0.699951L3.61589 7.11662L0.699219 4.19995",stroke:"#444d5e",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})}),ft=()=>(0,W.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",children:(0,W.jsx)("path",{d:"M11.4596 16.1H4.73961C3.29961 16.1 2.49961 16.1 1.85961 15.78C1.21961 15.46 0.739609 14.98 0.499609 14.42C0.0996094 13.7 0.0996094 12.9 0.0996094 11.46V4.73998C0.0996094 3.29998 0.0996094 2.49998 0.419609 1.85998C0.739609 1.21998 1.21961 0.739976 1.77961 0.499976C2.49961 0.0999756 3.29961 0.0999756 4.73961 0.0999756H6.49961C6.97961 0.0999756 7.29961 0.419976 7.29961 0.899976C7.29961 1.37998 6.97961 1.69998 6.49961 1.69998H4.73961C3.53961 1.69998 2.89961 1.69998 2.57961 1.85998C2.25961 2.01998 2.01961 2.25998 1.85961 2.57998C1.69961 2.89998 1.69961 3.53998 1.69961 4.73998V11.46C1.69961 12.66 1.69961 13.3 1.85961 13.62C2.01961 13.94 2.25961 14.18 2.57961 14.34C2.89961 14.5 3.53961 14.5 4.73961 14.5H11.4596C12.6596 14.5 13.2996 14.5 13.6196 14.34C13.9396 14.18 14.1796 13.94 14.3396 13.62C14.4996 13.3 14.4996 12.66 14.4996 11.46V9.69998C14.4996 9.21998 14.8196 8.89998 15.2996 8.89998C15.7796 8.89998 16.0996 9.21998 16.0996 9.69998V11.46C16.0996 12.9 16.0996 13.7 15.7796 14.34C15.4596 14.98 14.9796 15.46 14.4196 15.7C13.6996 16.1 12.8996 16.1 11.4596 16.1ZM8.09961 8.89998C7.85961 8.89998 7.69961 8.81998 7.53961 8.65998C7.21961 8.33998 7.21961 7.85998 7.53961 7.53998L13.3796 1.69998H10.4996C10.0196 1.69998 9.69961 1.37998 9.69961 0.899976C9.69961 0.419976 10.0196 0.0999756 10.4996 0.0999756H15.2996C15.3796 0.0999756 15.5396 0.0999755 15.6196 0.179976C15.6996 0.179976 15.7796 0.259976 15.8596 0.339976C15.9396 0.419976 16.0196 0.499976 16.0196 0.579976C16.0996 0.659976 16.0996 0.819976 16.0996 0.899976V5.69998C16.0996 6.17998 15.7796 6.49998 15.2996 6.49998C14.8196 6.49998 14.4996 6.17998 14.4996 5.69998V2.81998L8.65961 8.65998C8.49961 8.81998 8.33961 8.89998 8.09961 8.89998Z",fill:"#6e42d3",stroke:"#6e42d3",strokeWidth:".2"})}),ht=()=>(0,W.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",children:[(0,W.jsx)("path",{d:"M9.09961 0.0999756C4.12532 0.0999756 0.0996094 4.12523 0.0996094 9.09998C0.0996094 14.0742 4.12486 18.1 9.09961 18.1C14.0739 18.1 18.0996 14.0747 18.0996 9.09998C18.0996 4.12568 14.0744 0.0999756 9.09961 0.0999756ZM9.09961 16.8442C4.82946 16.8442 1.35543 13.3702 1.35543 9.09998C1.35543 4.82979 4.82946 1.35579 9.09961 1.35579C13.3698 1.35579 16.8438 4.82979 16.8438 9.09998C16.8438 13.3702 13.3698 16.8442 9.09961 16.8442Z",fill:"#6e42d3",stroke:"#6e42d3",strokeWidth:".2"}),(0,W.jsx)("path",{d:"M8.83395 11.4879C8.33638 11.4879 7.93359 11.9025 7.93359 12.4001C7.93359 12.8858 8.32453 13.3123 8.83395 13.3123C9.34336 13.3123 9.74611 12.8858 9.74611 12.4001C9.74611 11.9025 9.33148 11.4879 8.83395 11.4879Z",fill:"#6e42d3",stroke:"#6e42d3",strokeWidth:".2"}),(0,W.jsx)("path",{d:"M8.98811 4.5813C7.38878 4.5813 6.6543 5.52908 6.6543 6.16878C6.6543 6.6308 7.04523 6.84406 7.36509 6.84406C8.00482 6.84406 7.74421 5.93183 8.95257 5.93183C9.54488 5.93183 10.0188 6.19247 10.0188 6.73743C10.0188 7.37713 9.35535 7.74438 8.96441 8.07608C8.62083 8.3722 8.17069 8.85795 8.17069 9.87678C8.17069 10.4928 8.33656 10.6705 8.82224 10.6705C9.40271 10.6705 9.52118 10.4099 9.52118 10.1847C9.52118 9.56874 9.53303 9.21335 10.1846 8.70393C10.5045 8.45517 11.5114 7.64956 11.5114 6.53599C11.5114 5.42241 10.5045 4.5813 8.98811 4.5813Z",fill:"#6e42d3",stroke:"#6e42d3",strokeWidth:".2"})]}),mt=()=>(0,W.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"20",viewBox:"0 0 16 20",fill:"none",children:(0,W.jsx)("path",{d:"M14.408 7.19013L3.24942 0.312012C2.93046 0.110674 2.56721 0.00302319 2.19661 0C1.61403 0 1.05532 0.246909 0.643373 0.686411C0.231428 1.12591 0 1.722 0 2.34355V17.1052C7.40914e-05 17.5176 0.10371 17.9225 0.300131 18.2778C0.496553 18.6331 0.778589 18.9257 1.11691 19.1253C1.45524 19.3249 1.8375 19.4241 2.22396 19.4127C2.61041 19.4013 2.98695 19.2797 3.31441 19.0604L14.4859 11.5306C14.8333 11.2986 15.1184 10.9746 15.3135 10.5902C15.5086 10.2057 15.607 9.77389 15.5992 9.33678C15.5913 8.89967 15.4775 8.47219 15.2687 8.09598C15.0599 7.71978 14.7634 7.40769 14.408 7.19013Z",fill:"#6e42d3"})}),vt=()=>(0,W.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,W.jsx)("path",{d:"M1 1L13 13M13 1L1 13",stroke:"#1D2327",strokeWidth:"2",strokeLinecap:"round"})}),gt=()=>(0,W.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("circle",{cx:"10",cy:"10",r:"8.25"}),(0,W.jsx)("path",{d:"M7.8 7.65a2.2 2.2 0 1 1 2.95 2.07c-.52.19-.85.68-.85 1.23v.4"}),(0,W.jsx)("path",{d:"M9.9 14.05h.01"})]}),wt=()=>(0,W.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("circle",{cx:"10",cy:"10",r:"2.75"}),(0,W.jsx)("path",{d:"M15.9 12.35a1.3 1.3 0 0 0 .26 1.43l.05.05a1.57 1.57 0 1 1-2.23 2.23l-.05-.05a1.3 1.3 0 0 0-1.43-.26 1.3 1.3 0 0 0-.79 1.19v.14a1.58 1.58 0 0 1-3.15 0v-.07a1.3 1.3 0 0 0-.85-1.19 1.3 1.3 0 0 0-1.43.26l-.05.05a1.58 1.58 0 1 1-2.23-2.23l.05-.05a1.3 1.3 0 0 0 .26-1.43 1.3 1.3 0 0 0-1.19-.79h-.14a1.58 1.58 0 0 1 0-3.15h.07a1.3 1.3 0 0 0 1.19-.85 1.3 1.3 0 0 0-.26-1.43l-.05-.05a1.575 1.575 0 1 1 2.23-2.23l.05.05a1.3 1.3 0 0 0 1.43.26h.06a1.3 1.3 0 0 0 .79-1.19v-.14a1.575 1.575 0 1 1 3.15 0v.07a1.3 1.3 0 0 0 .79 1.19 1.3 1.3 0 0 0 1.43-.26l.05-.05a1.575 1.575 0 1 1 2.23 2.23l-.05.05a1.3 1.3 0 0 0-.26 1.43v.06a1.3 1.3 0 0 0 1.19.79h.14a1.575 1.575 0 1 1 0 3.15h-.07a1.3 1.3 0 0 0-1.19.79Z"})]}),xt=()=>(0,W.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,W.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),bt=()=>(0,W.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,W.jsx)("path",{d:"m6 3.5 4.5 4.5L6 12.5"})}),yt=()=>(0,W.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("path",{d:"M8.17 2.33h3.5v3.5M11.67 2.33 6.42 7.58"}),(0,W.jsx)("path",{d:"M9.92 8.17v2.33c0 .65-.52 1.17-1.17 1.17H3.5c-.64 0-1.17-.52-1.17-1.17V5.25c0-.64.53-1.17 1.17-1.17h2.33"})]}),jt=e=>{let{activeId:t=0,conversations:n=[],loaded:l=!1,hasMore:r=!1,loadingMore:a=!1,onSelect:s,onLoadMore:i}=e;return(0,W.jsxs)("div",{className:"rwpfnl-ai-drawer__history",children:[l&&0===n.length&&(0,W.jsx)("div",{className:"rwpfnl-ai-drawer__state",children:(0,W.jsx)("p",{children:"No conversations yet."})}),n.map(e=>(0,W.jsx)("button",{type:"button",className:"rwpfnl-ai-drawer__history-item"+(parseInt(t,10)===parseInt(e.id,10)?" is-active":""),onClick:()=>s(e.id),children:(0,W.jsx)("span",{className:"rwpfnl-ai-drawer__history-label",children:e.title||"Untitled chat"})},e.id)),l&&n.length>0&&r&&(0,W.jsx)("button",{type:"button",className:"rwpfnl-ai-drawer__history-more",disabled:a,onClick:i,children:a?"Loading…":"Load more"})]})},kt="wpfnl_global_ai_drawer_open",Ct="wpfnl_global_ai_window",_t=20,Nt="dashboard",St=e=>{const t=Math.min(Math.max(e.width,340),Math.min(720,window.innerWidth-40)),n=Math.min(Math.max(e.height,360),window.innerHeight-40);return{width:t,height:n,left:Math.min(Math.max(e.left,_t),Math.max(_t,window.innerWidth-t-_t)),top:Math.min(Math.max(e.top,_t),Math.max(_t,window.innerHeight-n-_t))}},Lt=()=>{try{const e=window.localStorage.getItem(Ct),t=e?JSON.parse(e):null;if(t&&t.width&&t.height)return St(t)}catch(e){}return{width:400,height:Math.min(640,window.innerHeight-40),top:92,left:window.innerWidth-400-_t}},Mt=()=>{try{return"1"===window.localStorage.getItem(kt)}catch(e){return!1}},zt=()=>{const[e,t]=(0,i.useState)(Mt),[n,l]=(0,i.useState)(null),[r,a]=(0,i.useState)(!1),[s,o]=(0,i.useState)(!1),[c,u]=(0,i.useState)(0),[d,p]=(0,i.useState)(!1),[f,h]=(0,i.useState)(Lt),{messages:m,pendingAction:v,progressLabel:g,progressPct:w,errorMessage:x,isSending:b,isLoadingConversation:y,isRunning:j,isPendingConfirmation:k,loadConversation:C,resetConversation:_,sendMessage:N,startLoop:S,confirmAction:L}=ge(),{conversations:M,loaded:z,hasMore:E,isLoadingMore:A,fetchConversations:P,loadMoreConversations:F,createNewChat:T}=we(),R=(0,i.useRef)(null),B=(0,i.useRef)(null),$=(0,i.useRef)(f),I=(0,i.useRef)(z),O=(0,i.useRef)(n),H=(0,i.useCallback)(e=>{const t=St(e);$.current=t,h(t);try{window.localStorage.setItem(Ct,JSON.stringify(t))}catch(e){}},[]);(0,i.useEffect)(()=>{I.current=z},[z]),(0,i.useEffect)(()=>{O.current=n},[n]),(0,i.useEffect)(()=>{try{window.localStorage.setItem(kt,e?"1":"0")}catch(e){}e&&(null===O.current&&D().then(e=>l(!!(e&&e.settings&&e.settings.enabled))).catch(()=>l(!1)),I.current||P(Nt,0))},[e,P]),(0,i.useEffect)(()=>{const e=()=>H($.current);return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[H]);const V={top:`${f.top}px`,left:`${f.left}px`,width:`${f.width}px`,height:d?"auto":`${f.height}px`};return(0,W.jsxs)("div",{className:"rwpfnl-ai-drawer-root",children:[(0,W.jsxs)("button",{type:"button",className:"rwpfnl-ai-drawer__toggle"+(e?" is-active":""),"aria-pressed":e,"aria-label":"AI Assistant",onClick:()=>t(e=>!e),children:[(0,W.jsx)(Z,{}),(0,W.jsx)("span",{className:"rwpfnl-ai-drawer__toggle-tip",children:"AI Assistant"})]}),e&&(0,W.jsxs)("aside",{className:"rwpfnl-ai-drawer"+(d?" is-minimized":""),style:V,"aria-label":"AI Assistant",children:[(0,W.jsxs)("div",{className:"rwpfnl-ai-drawer__thread",children:[(0,W.jsxs)("div",{className:"rwpfnl-ai-drawer__head",onMouseDown:e=>{if(e.target.closest("button"))return;e.preventDefault(),R.current={startX:e.clientX,startY:e.clientY,startTop:$.current.top,startLeft:$.current.left};const t=e=>{const t=R.current;t&&H({...$.current,top:t.startTop+(e.clientY-t.startY),left:t.startLeft+(e.clientX-t.startX)})},n=()=>{R.current=null,window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",n)};window.addEventListener("mousemove",t),window.addEventListener("mouseup",n)},children:[(0,W.jsxs)("span",{className:"rwpfnl-ai-drawer__title",children:[(0,W.jsx)(Z,{}),"AI Assistant"]}),!1!==n&&!d&&(0,W.jsxs)("div",{className:"rwpfnl-ai-drawer__actions",children:[(0,W.jsx)("button",{type:"button",className:"rwpfnl-ai-drawer__icon-btn",title:"New chat","aria-label":"New chat",onClick:()=>{u(0),o(!1),_()},children:(0,W.jsx)(Y,{})}),(0,W.jsx)("button",{type:"button",className:"rwpfnl-ai-drawer__icon-btn"+(s?" is-active":""),title:"Chat history","aria-label":"Chat history","aria-pressed":s,onClick:()=>o(e=>!e),children:(0,W.jsx)(q,{})})]}),(0,W.jsxs)("div",{className:"rwpfnl-ai-drawer__actions",children:[(0,W.jsx)("button",{type:"button",className:"rwpfnl-ai-drawer__icon-btn",title:d?"Restore":"Minimize","aria-label":d?"Restore":"Minimize",onClick:()=>p(e=>!e),children:d?(0,W.jsx)(G,{}):(0,W.jsx)(Q,{})}),(0,W.jsx)("button",{type:"button",className:"rwpfnl-ai-drawer__close",title:"Close","aria-label":"Close",onClick:()=>t(!1),children:(0,W.jsx)(K,{})})]})]}),!d&&(0,W.jsxs)(W.Fragment,{children:[!1===n&&(0,W.jsxs)("div",{className:"rwpfnl-ai-drawer__state",children:[(0,W.jsx)(Z,{}),(0,W.jsx)("p",{children:"Connect an AI provider to use the assistant."}),(0,W.jsx)("button",{type:"button",className:"rwpfnl-ai-drawer__btn",onClick:()=>a(!0),children:"Connect AI"})]}),!1!==n&&s&&(0,W.jsx)(jt,{activeId:c,conversations:M,loaded:z,hasMore:E,loadingMore:A,onSelect:async e=>{u(e),o(!1),await C(e)},onLoadMore:()=>F(Nt,0)}),!1!==n&&!s&&(0,W.jsx)(fe,{messages:m,contextType:Nt,pendingAction:v,isRunning:j,isPendingConfirmation:k,isLoadingConversation:y,isSending:b,progressLabel:g,progressPct:w,errorMessage:x,onSendMessage:async e=>{if(c)await N(c,e);else try{const t=await T(e,Nt,0);t&&(u(t.id),await S(t.id),P(Nt,0))}catch(e){}},onConfirmAction:async e=>{let{approve:t,denyReason:n}=e;c&&await L(c,t,n)}})]})]}),!d&&(0,W.jsx)("div",{className:"rwpfnl-ai-drawer__resize-handle",onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),B.current={startX:e.clientX,startY:e.clientY,startWidth:$.current.width,startHeight:$.current.height};const t=e=>{const t=B.current;t&&H({...$.current,width:t.startWidth+(e.clientX-t.startX),height:t.startHeight+(e.clientY-t.startY)})},n=()=>{B.current=null,window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",n)};window.addEventListener("mousemove",t),window.addEventListener("mouseup",n)}})]}),(0,W.jsx)(me,{isOpen:r,onClose:()=>a(!1),onSaved:()=>{a(!1),l(!0)}})]})},Et="?utm_source=wpfnl-plugin-knowledge-base&utm_medium=wpfnl-plugin-header&utm_campaign=wpfnl-knowledge-base",At=[{id:"getting-started",title:"Getting Started with WPFunnels",summary:"A guided tour of the dashboard, funnels, steps and the canvas so you know where everything lives before you build your first funnel.",link:`https://getwpfunnels.com/docs/getting-started-with-wpfunnels/${Et}`},{id:"first-funnel",title:"Create Your First Sales Funnel",summary:"Pick a funnel type, add landing, checkout and thank-you steps on the canvas, then publish it and start sending traffic.",link:`https://getwpfunnels.com/docs/getting-started-with-wpfunnels/create-your-first-sales-funnel/${Et}`},{id:"store-checkout",title:"Set Up Store Checkout",summary:"Replace the default WooCommerce checkout with an optimized WPFunnels checkout, including order bumps and conditional rules.",link:`https://getwpfunnels.com/docs/checkoutify-documentations-guides/${Et}`},{id:"global-funnel",title:"Global Funnels for WooCommerce",summary:"Attach offers to any product on your store so upsells and downsells run without building a dedicated funnel for each one.",link:`https://getwpfunnels.com/docs/global-funnels-for-woocommerce/${Et}`},{id:"course-funnel",title:"Sales Funnels for Courses",summary:"Build enrolment funnels for LMS courses — sell, upsell and onboard students from a single flow.",link:`https://getwpfunnels.com/docs/sales-funnels-for-courses/${Et}`},{id:"integrations",title:"Funnel Integrations",summary:"Connect your CRM, email tool and analytics so every lead and order captured in a funnel lands where your team works.",link:`https://getwpfunnels.com/docs/funnel-integrations/${Et}`},{id:"facebook-pixel",title:"Facebook Pixel Integration",summary:"Fire pixel events on funnel views, add-to-cart and purchases so ad campaigns can optimize against real funnel conversions.",link:`https://getwpfunnels.com/docs/funnel-integrations/facebook-pixel-integration/${Et}`},{id:"google-tag-manager",title:"Google Tag Manager Integration",summary:"Push funnel and purchase events into GTM so you can manage all downstream tracking tags from one place.",link:`https://getwpfunnels.com/docs/funnel-integrations/google-tag-manager-integration/${Et}`},{id:"utm-parameters",title:"Track Funnels with UTM Parameters",summary:"Tag incoming traffic with UTM parameters and see which source, campaign and medium actually drives funnel revenue.",link:`https://getwpfunnels.com/docs/funnel-integrations/utm-parameters/${Et}`},{id:"shortcodes",title:"WPFunnels Shortcodes",summary:"Drop checkout, order bump, order details and offer buttons into any page builder using the built-in shortcodes.",link:`https://getwpfunnels.com/docs/wpfunnels-shortcodes/${Et}`},{id:"mail-mint",title:"Email Marketing with Mail Mint",summary:"Use Mail Mint alongside WPFunnels to capture leads from funnel steps and follow up with campaigns and sequences.",link:`https://getwpfunnels.com/docs/mail-mint/${Et}`},{id:"mail-mint-automation",title:"Automate Follow-ups After a Funnel",summary:"Trigger automations from funnel activity — new leads, purchases and offer acceptance — without writing any code.",link:`https://getwpfunnels.com/docs/mail-mint/automation/${Et}`}],Pt={support:"https://wordpress.org/support/plugin/wpfunnels/",documentation:`https://getwpfunnels.com/docs/wpfunnels-wordpress-funnel-builder/${Et}`,videos:"https://www.youtube.com/@WPFunnels",community:"https://www.facebook.com/groups/wpfunnels"},Ft=[{id:"support",Icon:()=>(0,W.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("path",{d:"M3.75 13.75v-3.5a6.25 6.25 0 0 1 12.5 0v3.5"}),(0,W.jsx)("path",{d:"M16.25 13.125A1.875 1.875 0 0 1 14.375 15h-.625v-4.375h.625a1.875 1.875 0 0 1 1.875 1.875v.625ZM3.75 13.125A1.875 1.875 0 0 0 5.625 15h.625v-4.375h-.625A1.875 1.875 0 0 0 3.75 12.5v.625Z"}),(0,W.jsx)("path",{d:"M16.25 15v.625a2.5 2.5 0 0 1-2.5 2.5h-2.5"})]}),title:"Need Help?",description:"Ask the WPFunnels team on the WordPress.org support forum and get unstuck fast.",ctaLabel:"Request Support",link:Pt.support},{id:"documentation",Icon:()=>(0,W.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round",children:(0,W.jsx)("path",{d:"M10 5.625v10M10 5.625C8.75 4.375 7.1 3.75 5 3.75H2.5v10.625H5c2.1 0 3.75.625 5 1.875 1.25-1.25 2.9-1.875 5-1.875h2.5V3.75H15c-2.1 0-3.75.625-5 1.875Z"})}),title:"All Documentation",description:"Browse documentation, reference material, and tutorials for WPFunnels.",ctaLabel:"View Documentation",link:Pt.documentation},{id:"videos",Icon:()=>(0,W.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("circle",{cx:"10",cy:"10",r:"8.25"}),(0,W.jsx)("path",{d:"M8.4 7.2 13 10l-4.6 2.8V7.2Z",fill:"currentColor"})]}),title:"Videos",description:"Browse tutorial videos on our YouTube channel.",ctaLabel:"Youtube Channel",link:Pt.videos},{id:"community",Icon:()=>(0,W.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("path",{d:"M13.75 16.25v-1.5a2.92 2.92 0 0 0-2.92-2.92H5.42A2.92 2.92 0 0 0 2.5 14.75v1.5"}),(0,W.jsx)("circle",{cx:"8.13",cy:"6.46",r:"2.71"}),(0,W.jsx)("path",{d:"M17.5 16.25v-1.5a2.92 2.92 0 0 0-2.19-2.82M12.71 3.85a2.92 2.92 0 0 1 0 5.65"})]}),title:"Join the Community",description:"Swap funnel ideas and get answers from other WPFunnels users.",ctaLabel:"Join Community",link:Pt.community}],Dt=e=>{let{isOpen:t,onClose:n}=e;const[l,r]=(0,i.useState)("getting-started");return(0,i.useEffect)(()=>{if(t)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[t]),(0,i.useEffect)(()=>{if(!t)return;const e=e=>{"Escape"===e.key&&n()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[t,n]),t?(0,W.jsxs)("div",{className:"rwpfnl-knowledge-base-modal",children:[(0,W.jsx)("div",{className:"knowledge-base-overlay","aria-hidden":"true",onClick:n}),(0,W.jsxs)("div",{className:"knowledge-base-inner",role:"dialog","aria-modal":"true","aria-label":"Knowledge Base",children:[(0,W.jsxs)("div",{className:"knowledge-base-header",children:[(0,W.jsx)("h2",{className:"knowledge-base-title",children:"Knowledge Base"}),(0,W.jsx)("button",{type:"button",className:"knowledge-base-close","aria-label":"Close",onClick:n,children:(0,W.jsx)(xt,{})})]}),(0,W.jsxs)("div",{className:"knowledge-base-body",children:[(0,W.jsx)("div",{className:"knowledge-base-articles",children:(0,W.jsx)("ul",{className:"article-list",children:At.map(e=>{const t=l===e.id;return(0,W.jsxs)("li",{className:"article-item"+(t?" is-open":""),children:[(0,W.jsxs)("button",{type:"button",className:"article-trigger","aria-expanded":t,onClick:()=>{return t=e.id,r(e=>e===t?null:t);var t},children:[(0,W.jsx)("span",{className:"article-caret",children:(0,W.jsx)(bt,{})}),(0,W.jsx)("span",{className:"article-title",children:e.title})]}),(0,W.jsx)("div",{className:"article-panel",children:(0,W.jsx)("div",{className:"article-panel-inner",children:(0,W.jsxs)("div",{className:"article-panel-content",children:[(0,W.jsx)("p",{className:"article-summary",children:e.summary}),(0,W.jsxs)("a",{className:"article-link",href:e.link,target:"_blank",rel:"noreferrer",children:["Read the full article",(0,W.jsx)(yt,{})]})]})})})]},e.id)})})}),(0,W.jsx)("aside",{className:"knowledge-base-sidebar",children:Ft.map(e=>{let{Icon:t,...n}=e;return(0,W.jsxs)("div",{className:"knowledge-base-card",children:[(0,W.jsxs)("h3",{className:"card-title",children:[(0,W.jsx)("span",{className:"card-icon",children:(0,W.jsx)(t,{})}),n.title]}),(0,W.jsx)("p",{className:"card-description",children:n.description}),(0,W.jsxs)("a",{className:"card-link",href:n.link,target:"_blank",rel:"noreferrer",children:[n.ctaLabel,(0,W.jsx)(yt,{})]})]},n.id)})})]})]})]}):null},Tt=()=>{const[e,t]=(0,i.useState)(!1),n=d.proCta;return(0,W.jsxs)("div",{className:"rwpfnl-header-actions",children:[(0,W.jsxs)("button",{type:"button",className:"rwpfnl-header-action","aria-label":"Knowledge Base",onClick:()=>t(!0),children:[(0,W.jsx)(gt,{}),(0,W.jsx)("span",{className:"rwpfnl-header-action__tip",children:"Knowledge Base"})]}),(0,W.jsx)(zt,{}),(0,W.jsxs)(a.N_,{className:"rwpfnl-header-action",to:"/settings","aria-label":"Settings",children:[(0,W.jsx)(wt,{}),(0,W.jsx)("span",{className:"rwpfnl-header-action__tip",children:"Settings"})]}),n&&(0,W.jsx)("a",{className:`rwpfnl-header-upgrade is-${n.state}`,href:n.url,title:n.title,...n.newTab?{target:"_blank",rel:"noreferrer"}:{},children:n.label}),(0,W.jsx)(Dt,{isOpen:e,onClose:()=>t(!1)})]})},Rt=[{label:"Funnels",slug:"wp_funnels",route:"/funnels"},{label:"Store Checkout",slug:"store_checkout",route:"/store-checkout"},{label:"Automations",slug:"wpfnl_automations",route:"/automation"},{label:"Integrations",slug:"wpfunnels_integrations"},{label:"Templates",slug:"wpf_templates",route:"/funnel-templates"},{label:"AI Assistant",slug:"wpfnl-ai-funnel",route:"/ai-assistant"}],Bt=e=>{let{to:t,end:n=!1,children:l}=e;const r=(0,s.RQ)({path:t,end:n});return(0,W.jsx)("li",{className:"rwpfnl-dashboard-sidebar-menu-item"+(r?" active":""),children:(0,W.jsx)(a.N_,{to:t,children:l})})},$t=()=>(0,W.jsxs)("div",{className:"rwpfnl-dashboard-sidebar",children:[(0,W.jsx)("div",{className:"rwpfnl-logo",children:(0,W.jsx)(a.N_,{to:"/",children:(0,W.jsx)(Je,{})})}),(0,W.jsxs)("ul",{className:"rwpfnl-dashboard-sidebar-menu",children:[(0,W.jsx)(Bt,{to:"/",end:!0,children:"Dashboard"}),Rt.map(e=>{return e.route?(0,W.jsx)(Bt,{to:e.route,children:e.label},e.slug):(0,W.jsx)("li",{className:"rwpfnl-dashboard-sidebar-menu-item",children:(0,W.jsx)("a",{href:(t=e.slug,d.adminUrl?`${d.adminUrl}admin.php?page=${t}`:"#"),target:"_self",children:e.label})},e.slug);var t})]}),(0,W.jsx)("div",{className:"rwpfnl-dashboard__nav-right",children:(0,W.jsx)(Tt,{})})]}),It=()=>(0,W.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:(0,W.jsx)("path",{d:"M15.4084 2.59132C14.7091 1.89342 13.7615 1.50146 12.7735 1.50146C11.7855 1.50146 10.8379 1.89342 10.1386 2.59132L8.73546 3.9945L2.42143 10.3088C2.30665 10.4234 2.23224 10.5723 2.20941 10.7329L1.50756 15.6438C1.49234 15.7502 1.50016 15.8586 1.5305 15.9617C1.56083 16.0648 1.61297 16.1602 1.68338 16.2414C1.75379 16.3226 1.84083 16.3877 1.9386 16.4323C2.03637 16.4769 2.14259 16.5 2.25006 16.5C2.28559 16.5001 2.32108 16.4976 2.35626 16.4925L7.26756 15.791C7.42812 15.7678 7.57686 15.6933 7.69161 15.5786L15.4091 7.8618C15.7552 7.51576 16.0298 7.10493 16.2171 6.65277C16.4044 6.20061 16.5008 5.71598 16.5008 5.22656C16.5008 4.73714 16.4044 4.25251 16.2171 3.80035C16.0298 3.3482 15.7552 2.93737 15.4091 2.59132H15.4084ZM6.80758 14.3416L3.13408 14.866L3.65908 11.1928L9.26593 5.58555L12.415 8.73435L6.80758 14.3416ZM14.3476 6.8013L13.4753 7.67385L10.3261 4.5249L11.1991 3.65182C11.6233 3.24704 12.1872 3.0212 12.7735 3.0212C13.3598 3.0212 13.9237 3.24704 14.3479 3.65182C14.7654 4.06953 14.9999 4.63596 14.9999 5.22656C14.9999 5.81716 14.7651 6.38359 14.3476 6.8013Z",fill:"currentColor"})}),Ot=()=>(0,W.jsxs)("svg",{width:"4",height:"15",viewBox:"0 0 4 15",fill:"none","aria-hidden":"true",children:[(0,W.jsx)("ellipse",{cx:"1.75",cy:"1.69355",rx:"1.69355",ry:"1.75",transform:"rotate(90 1.75 1.69355)",fill:"currentColor"}),(0,W.jsx)("ellipse",{cx:"1.75",cy:"7.50001",rx:"1.69355",ry:"1.75",transform:"rotate(90 1.75 7.50001)",fill:"currentColor"}),(0,W.jsx)("ellipse",{cx:"1.75",cy:"13.3064",rx:"1.69355",ry:"1.75",transform:"rotate(90 1.75 13.3064)",fill:"currentColor"})]}),Wt=()=>(0,W.jsxs)("svg",{width:"13",height:"16",viewBox:"0 0 13 16",fill:"none","aria-hidden":"true",children:[(0,W.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.27097 1.23077C1.70086 1.23077 1.23871 1.68997 1.23871 2.25641V13.7436C1.23871 14.31 1.70086 14.7692 2.27097 14.7692H10.529C11.0991 14.7692 11.5613 14.31 11.5613 13.7436V5.71239C11.5613 5.44538 11.4565 5.18889 11.2691 4.99744L7.88752 1.54146C7.69312 1.34283 7.42616 1.23077 7.14736 1.23077H2.27097ZM0 2.25641C0 1.01023 1.01674 0 2.27097 0H7.14736C7.7608 0 8.34808 0.246536 8.77568 0.683512L12.1573 4.1395C12.5694 4.56068 12.8 5.12496 12.8 5.71239V13.7436C12.8 14.9898 11.7833 16 10.529 16H2.27097C1.01674 16 0 14.9898 0 13.7436V2.25641Z",fill:"currentColor"}),(0,W.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.30371 10.4615C3.30371 10.8014 3.58101 11.077 3.92307 11.077H8.87793C9.21993 11.077 9.49729 10.8014 9.49729 10.4615C9.49729 10.1217 9.21993 9.84616 8.87793 9.84616H3.92307C3.58101 9.84616 3.30371 10.1217 3.30371 10.4615Z",fill:"currentColor"}),(0,W.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.30371 7.17953C3.30371 7.51937 3.58101 7.79489 3.92307 7.79489H6.40049C6.74257 7.79489 7.01985 7.51937 7.01985 7.17953C7.01985 6.83961 6.74257 6.56409 6.40049 6.56409H3.92307C3.58101 6.56409 3.30371 6.83961 3.30371 7.17953Z",fill:"currentColor"})]}),Ht=()=>(0,W.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[(0,W.jsx)("path",{d:"M14.2 1.8L7.9 14.3a.36.36 0 01-.65 0L4.9 9.7 1.7 8.1a.36.36 0 010-.65L14.2 1.8z",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,W.jsx)("path",{d:"M14.2 1.8L4.9 9.7",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]}),Vt=()=>(0,W.jsxs)("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none","aria-hidden":"true",children:[(0,W.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.53778 1.67101e-05H9.4622C9.64936 -0.00010437 9.81238 -0.000208058 9.96633 0.0243798C10.5746 0.121512 11.1009 0.50088 11.3855 1.0472C11.4574 1.18548 11.5089 1.34019 11.568 1.51777L11.6646 1.80741C11.6809 1.85644 11.6856 1.87032 11.6895 1.88125C11.841 2.29994 12.2336 2.58297 12.6787 2.59425C12.6904 2.59455 12.7047 2.5946 12.7567 2.5946H15.3513C15.7095 2.5946 15.9999 2.88501 15.9999 3.24324C15.9999 3.60147 15.7095 3.89188 15.3513 3.89188H0.648641C0.29041 3.89188 0 3.60147 0 3.24324C0 2.88501 0.29041 2.5946 0.648641 2.5946H3.24328C3.29521 2.5946 3.30954 2.59455 3.32124 2.59425C3.76634 2.58297 4.15901 2.29996 4.31045 1.88127C4.31444 1.87027 4.31902 1.85668 4.33544 1.80741L4.43197 1.51779C4.49103 1.34022 4.5425 1.18548 4.61451 1.0472C4.899 0.50088 5.42535 0.121512 6.0336 0.0243798C6.18756 -0.000208058 6.35063 -0.00010437 6.53778 1.67101e-05ZM5.41239 2.5946C5.45694 2.50723 5.49642 2.41644 5.53038 2.32255C5.54069 2.29404 5.55081 2.26369 5.5638 2.2247L5.65011 1.96575C5.72896 1.72921 5.74712 1.68096 5.76513 1.64637C5.85996 1.46427 6.03542 1.33781 6.23816 1.30543C6.27668 1.29928 6.32814 1.29732 6.57748 1.29732H9.42242C9.67176 1.29732 9.7233 1.29928 9.76179 1.30543C9.96451 1.33781 10.14 1.46427 10.2349 1.64637C10.2529 1.68096 10.271 1.7292 10.3498 1.96575L10.4361 2.22454L10.4696 2.32257C10.5036 2.41646 10.543 2.50723 10.5876 2.5946H5.41239Z",fill:"currentColor"}),(0,W.jsx)("path",{d:"M2.73728 5.36223C2.71345 5.00479 2.40437 4.73435 2.04693 4.75817C1.68949 4.782 1.41904 5.09108 1.44287 5.44853L1.84368 11.4607C1.91763 12.5702 1.97736 13.4663 2.11744 14.1695C2.26308 14.9005 2.51079 15.5112 3.02243 15.9898C3.53408 16.4685 4.15984 16.675 4.89899 16.7717C5.60992 16.8647 6.50797 16.8647 7.61983 16.8647H8.37995C9.4918 16.8647 10.3899 16.8647 11.1009 16.7717C11.84 16.675 12.4658 16.4685 12.9774 15.9898C13.4891 15.5112 13.7368 14.9005 13.8824 14.1695C14.0225 13.4663 14.0822 12.5702 14.1561 11.4607L14.557 5.44853C14.5808 5.09108 14.3103 4.782 13.9529 4.75817C13.5955 4.73435 13.2864 5.00479 13.2626 5.36223L12.8647 11.3289C12.7871 12.4947 12.7317 13.3057 12.6101 13.916C12.4922 14.508 12.3276 14.8213 12.0911 15.0425C11.8547 15.2637 11.531 15.4072 10.9326 15.4854C10.3156 15.5661 9.50261 15.5674 8.33437 15.5674H7.66549C6.49724 15.5674 5.68424 15.5661 5.06725 15.4854C4.46877 15.4072 4.14518 15.2637 3.90872 15.0425C3.67226 14.8213 3.50764 14.508 3.38972 13.916C3.26815 13.3057 3.21278 12.4947 3.13506 11.3289L2.73728 5.36223Z",fill:"currentColor"}),(0,W.jsx)("path",{d:"M5.7736 6.92209C6.13006 6.88646 6.44796 7.14652 6.48359 7.50301L6.91602 11.8273C6.95165 12.1837 6.69159 12.5016 6.3351 12.5372C5.97866 12.5729 5.6608 12.3128 5.62515 11.9563L5.19272 7.63205C5.15708 7.27564 5.41715 6.95772 5.7736 6.92209Z",fill:"currentColor"}),(0,W.jsx)("path",{d:"M10.2267 6.92209C10.5832 6.95772 10.8433 7.27564 10.8076 7.63205L10.3752 11.9563C10.3396 12.3128 10.0216 12.5729 9.66524 12.5372C9.30875 12.5016 9.04869 12.1837 9.08432 11.8273L9.51675 7.50301C9.55238 7.14652 9.8703 6.88646 10.2267 6.92209Z",fill:"currentColor"})]}),Ut=()=>(0,W.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[(0,W.jsx)("path",{d:"M2.7 8a5.3 5.3 0 105.3-5.3A5.3 5.3 0 003.6 5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"}),(0,W.jsx)("path",{d:"M2.3 2.3v3h3",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}),Zt=()=>(0,W.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[(0,W.jsx)("path",{d:"M14 8a6 6 0 11-1.76-4.24",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"}),(0,W.jsx)("path",{d:"M13.4 1.6v3.2h-3.2",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})]}),Yt=()=>(0,W.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:(0,W.jsx)("path",{d:"M7 1.8v10.4M1.8 7h10.4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})}),qt=()=>(0,W.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[(0,W.jsx)("circle",{cx:"7",cy:"7",r:"4.6",stroke:"currentColor",strokeWidth:"1.4"}),(0,W.jsx)("path",{d:"M10.5 10.5L14 14",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})]}),Kt=()=>(0,W.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:(0,W.jsx)("path",{d:"M0.970215 5.4703C0.677246 5.76327 0.677246 6.23905 0.970215 6.53202L4.72021 10.282C5.01318 10.575 5.48897 10.575 5.78193 10.282C6.0749 9.98905 6.0749 9.51327 5.78193 9.2203L2.56162 5.99999L5.77959 2.77968C6.07256 2.48671 6.07256 2.01093 5.77959 1.71796C5.48662 1.42499 5.01084 1.42499 4.71787 1.71796L0.967871 5.46796L0.970215 5.4703ZM9.22021 1.7203L5.47021 5.4703C5.17725 5.76327 5.17725 6.23905 5.47021 6.53202L9.22021 10.282C9.51318 10.575 9.98897 10.575 10.2819 10.282C10.5749 9.98905 10.5749 9.51327 10.2819 9.2203L7.06162 5.99999L10.2796 2.77968C10.5726 2.48671 10.5726 2.01093 10.2796 1.71796C9.98662 1.42499 9.51084 1.42499 9.21787 1.71796L9.22021 1.7203Z",fill:"currentColor"})}),Qt=()=>(0,W.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:(0,W.jsx)("path",{d:"M10.5264 12.4739C10.5889 12.4119 10.6385 12.3382 10.6724 12.2569C10.7062 12.1757 10.7236 12.0885 10.7236 12.0005C10.7236 11.9125 10.7062 11.8254 10.6724 11.7442C10.6385 11.6629 10.5889 11.5892 10.5264 11.5272L7.4731 8.47387C7.41062 8.4119 7.36102 8.33816 7.32717 8.25692C7.29333 8.17568 7.2759 8.08855 7.2759 8.00054C7.2759 7.91253 7.29333 7.82539 7.32717 7.74416C7.36102 7.66292 7.41062 7.58918 7.4731 7.52721L10.5264 4.47387C10.5889 4.4119 10.6385 4.33816 10.6724 4.25692C10.7062 4.17568 10.7236 4.08855 10.7236 4.00054C10.7236 3.91253 10.7062 3.82539 10.6724 3.74415C10.6385 3.66292 10.5889 3.58918 10.5264 3.52721C10.4015 3.40304 10.2326 3.33334 10.0564 3.33334C9.88031 3.33334 9.71134 3.40304 9.58643 3.52721L6.52643 6.58721C6.1519 6.96221 5.94153 7.47054 5.94153 8.00054C5.94153 8.53054 6.1519 9.03887 6.52643 9.41387L9.58643 12.4739C9.71134 12.598 9.88031 12.6677 10.0564 12.6677C10.2326 12.6677 10.4015 12.598 10.5264 12.4739Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"})}),Gt=()=>(0,W.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:(0,W.jsx)("path",{d:"M5.47357 12.4739C5.41108 12.4119 5.36148 12.3382 5.32764 12.2569C5.29379 12.1757 5.27637 12.0885 5.27637 12.0005C5.27637 11.9125 5.29379 11.8254 5.32764 11.7442C5.36148 11.6629 5.41108 11.5892 5.47357 11.5272L8.5269 8.47387C8.58939 8.4119 8.63898 8.33816 8.67283 8.25692C8.70667 8.17568 8.7241 8.08855 8.7241 8.00054C8.7241 7.91253 8.70667 7.82539 8.67283 7.74416C8.63898 7.66292 8.58939 7.58918 8.5269 7.52721L5.47357 4.47387C5.41108 4.4119 5.36148 4.33816 5.32764 4.25692C5.29379 4.17568 5.27637 4.08855 5.27637 4.00054C5.27637 3.91253 5.29379 3.82539 5.32764 3.74415C5.36148 3.66292 5.41108 3.58918 5.47357 3.52721C5.59847 3.40304 5.76744 3.33334 5.94357 3.33334C6.11969 3.33334 6.28866 3.40304 6.41357 3.52721L9.47357 6.58721C9.8481 6.96221 10.0585 7.47054 10.0585 8.00054C10.0585 8.53054 9.8481 9.03887 9.47357 9.41387L6.41357 12.4739C6.28866 12.598 6.11969 12.6677 5.94357 12.6677C5.76744 12.6677 5.59847 12.598 5.47357 12.4739Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"})}),Xt=()=>(0,W.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:(0,W.jsx)("path",{d:"M11.0295 6.52968C11.3225 6.23671 11.3225 5.76093 11.0295 5.46796L7.27949 1.71796C6.98652 1.42499 6.51074 1.42499 6.21777 1.71796C5.9248 2.01093 5.9248 2.48671 6.21777 2.77968L9.43809 5.99999L6.22012 9.2203C5.92715 9.51327 5.92715 9.98905 6.22012 10.282C6.51309 10.575 6.98887 10.575 7.28184 10.282L11.0318 6.53202L11.0295 6.52968ZM2.77949 10.2797L6.52949 6.52968C6.82246 6.23671 6.82246 5.76093 6.52949 5.46796L2.77949 1.71796C2.48652 1.42499 2.01074 1.42499 1.71777 1.71796C1.4248 2.01093 1.4248 2.48671 1.71777 2.77968L4.93809 5.99999L1.72012 9.2203C1.42715 9.51327 1.42715 9.98905 1.72012 10.282C2.01309 10.575 2.48887 10.575 2.78184 10.282L2.77949 10.2797Z",fill:"currentColor"})}),Jt=()=>(0,W.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:[(0,W.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.99984 4.79199C6.09983 4.79199 3.4609 6.9409 1.84429 8.64183C1.10725 9.41733 1.10725 10.5833 1.84429 11.3588C3.4609 13.0597 6.09983 15.2087 8.99984 15.2087C11.8998 15.2087 14.5388 13.0597 16.1554 11.3588C16.8924 10.5833 16.8924 9.41733 16.1554 8.64183C14.5388 6.9409 11.8998 4.79199 8.99984 4.79199ZM0.938237 7.78067C2.58125 6.05198 5.54065 3.54199 8.99984 3.54199C12.459 3.54199 15.4184 6.05198 17.0614 7.78067C18.2571 9.03866 18.2571 10.962 17.0614 12.22C15.4184 13.9487 12.459 16.4587 8.99984 16.4587C5.54065 16.4587 2.58125 13.9487 0.938237 12.22C-0.257407 10.962 -0.257407 9.03866 0.938237 7.78067Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"}),(0,W.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 8.12532C7.9645 8.12532 7.125 8.96482 7.125 10.0003C7.125 11.0358 7.9645 11.8753 9 11.8753C10.0355 11.8753 10.875 11.0358 10.875 10.0003C10.875 8.96482 10.0355 8.12532 9 8.12532ZM5.875 10.0003C5.875 8.27443 7.27411 6.87532 9 6.87532C10.7259 6.87532 12.125 8.27443 12.125 10.0003C12.125 11.7262 10.7259 13.1253 9 13.1253C7.27411 13.1253 5.875 11.7262 5.875 10.0003Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"})]}),en=()=>(0,W.jsxs)("svg",{width:"16",height:"18",viewBox:"0 0 16 18",fill:"none","aria-hidden":"true",children:[(0,W.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.21935 1.36428C2.20222 1.36428 1.37768 2.17976 1.37768 3.18571V12.2929C1.37768 12.6281 1.10283 12.9 0.763791 12.9C0.424753 12.9 0.149902 12.6281 0.149902 12.2929V3.18571C0.149902 1.50913 1.52414 0.149994 3.21935 0.149994H8.13046C8.4695 0.149994 8.74435 0.421824 8.74435 0.757137C8.74435 1.09245 8.4695 1.36428 8.13046 1.36428H3.21935Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.3"}),(0,W.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.60547 5.61427C2.60547 3.93769 3.97971 2.57855 5.67491 2.57855H11.8138C13.509 2.57855 14.8832 3.93769 14.8832 5.61427V14.1143C14.8832 15.7908 13.509 17.15 11.8138 17.15H5.67491C3.97971 17.15 2.60547 15.7908 2.60547 14.1143V5.61427ZM5.67491 3.79284C4.65779 3.79284 3.83325 4.60832 3.83325 5.61427V14.1143C3.83325 15.1202 4.65779 15.9357 5.67491 15.9357H11.8138C12.8309 15.9357 13.6555 15.1202 13.6555 14.1143V5.61427C13.6555 4.60832 12.8309 3.79284 11.8138 3.79284H5.67491Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.3"})]}),tn=()=>(0,W.jsxs)("svg",{width:"17",height:"15",viewBox:"0 0 17 15",fill:"none","aria-hidden":"true",children:[(0,W.jsx)("path",{d:"M3.44052 14.9972C2.53036 14.9948 1.65804 14.6328 1.01361 13.9901C0.369164 13.3474 0.00483508 12.476 3.4965e-09 11.5658V9.27215C-1.83459e-05 9.08884 0.0721867 8.91287 0.200972 8.78231C0.329758 8.65185 0.504766 8.57726 0.688104 8.57487C0.869865 8.57726 1.04351 8.65047 1.17204 8.77901C1.30057 8.90755 1.37383 9.08122 1.37621 9.26297V11.5567C1.381 12.1026 1.60003 12.625 1.98613 13.011C2.37223 13.3972 2.89451 13.6162 3.44052 13.621H12.6152C12.8859 13.621 13.1539 13.5675 13.4038 13.4636C13.6538 13.3598 13.8807 13.2076 14.0717 13.0158C14.2627 12.824 14.4139 12.5963 14.5166 12.346C14.6193 12.0956 14.6716 11.8273 14.6704 11.5567V9.26297C14.6652 9.16921 14.6796 9.07544 14.7127 8.98746C14.7456 8.89956 14.7965 8.81947 14.862 8.75222C14.9275 8.68497 15.0064 8.63203 15.0933 8.5968C15.1804 8.56148 15.2738 8.54469 15.3677 8.54735C15.4583 8.54349 15.5487 8.55845 15.6333 8.59102C15.7179 8.62368 15.7948 8.67341 15.8594 8.73708C15.9239 8.80084 15.9748 8.87709 16.0085 8.96131C16.0423 9.04544 16.0583 9.13563 16.0558 9.22628V11.52C16.0581 11.9729 15.9709 12.4218 15.799 12.8408C15.627 13.2598 15.3739 13.6407 15.0541 13.9614C14.7341 14.2821 14.354 14.5363 13.9354 14.7094C13.5168 14.8824 13.0682 14.9708 12.6152 14.9697H3.44052V14.9972Z",fill:"currentColor"}),(0,W.jsx)("path",{d:"M8.02801 10.7768C7.84626 10.7744 7.67258 10.7012 7.54404 10.5727C7.4155 10.4441 7.34229 10.2704 7.3399 10.0887V1.83145C7.33871 1.74075 7.35559 1.65071 7.38981 1.56667C7.42394 1.48262 7.47459 1.40628 7.53872 1.34214C7.60285 1.27799 7.67918 1.22736 7.76322 1.19321C7.84727 1.15907 7.93727 1.14211 8.02801 1.14334C8.20893 1.14333 8.38261 1.21457 8.51133 1.34164C8.64014 1.4687 8.71373 1.64137 8.71611 1.82227V10.0795C8.71611 10.2628 8.64391 10.4389 8.51518 10.5694C8.38637 10.6998 8.21132 10.7744 8.02801 10.7768Z",fill:"currentColor"}),(0,W.jsx)("path",{d:"M4.11919 5.28117C3.98507 5.27695 3.85502 5.23411 3.74464 5.15781C3.63424 5.0815 3.54822 4.97498 3.49689 4.85099C3.44556 4.72701 3.43108 4.59085 3.45522 4.45884C3.47935 4.32685 3.54106 4.2046 3.63293 4.10681L7.51384 0.198376C7.64559 0.0711228 7.82156 0 8.00469 0C8.18782 0 8.36379 0.0711228 8.49554 0.198376L12.3948 4.07928C12.5237 4.2083 12.596 4.3832 12.596 4.56554C12.596 4.74789 12.5237 4.92278 12.3948 5.0518C12.2658 5.18062 12.0909 5.25301 11.9085 5.25301C11.7262 5.25301 11.5513 5.18062 11.4223 5.0518L8.02763 1.65716L4.61463 5.07015C4.55017 5.13641 4.47316 5.18915 4.3881 5.22539C4.30305 5.26163 4.21165 5.28062 4.11919 5.28117Z",fill:"currentColor"})]}),nn=()=>(0,W.jsxs)("svg",{width:"17",height:"15",viewBox:"0 0 17 15",fill:"none","aria-hidden":"true",children:[(0,W.jsx)("path",{d:"M3.44052 14.9972C2.53036 14.9948 1.65804 14.6328 1.01361 13.9901C0.369164 13.3474 0.00483508 12.476 3.4965e-09 11.5658V9.27215C-1.83459e-05 9.08884 0.0721867 8.91287 0.200972 8.78231C0.329758 8.65185 0.504766 8.57726 0.688104 8.57487C0.869865 8.57726 1.04351 8.65047 1.17204 8.77901C1.30057 8.90755 1.37383 9.08122 1.37621 9.26297V11.5567C1.381 12.1026 1.60003 12.625 1.98613 13.011C2.37223 13.3972 2.89451 13.6162 3.44052 13.621H12.6152C12.8859 13.621 13.1539 13.5675 13.4038 13.4636C13.6538 13.3598 13.8807 13.2076 14.0717 13.0158C14.2627 12.824 14.4139 12.5963 14.5166 12.346C14.6193 12.0956 14.6716 11.8273 14.6704 11.5567V9.26297C14.6652 9.16921 14.6796 9.07544 14.7127 8.98746C14.7456 8.89956 14.7965 8.81947 14.862 8.75222C14.9275 8.68497 15.0064 8.63203 15.0933 8.5968C15.1804 8.56148 15.2738 8.54469 15.3677 8.54735C15.4583 8.54349 15.5487 8.55845 15.6333 8.59102C15.7179 8.62368 15.7948 8.67341 15.8594 8.73708C15.9239 8.80084 15.9748 8.87709 16.0085 8.96131C16.0423 9.04544 16.0583 9.13563 16.0558 9.22628V11.52C16.0581 11.9729 15.9709 12.4218 15.799 12.8408C15.627 13.2598 15.3739 13.6407 15.0541 13.9614C14.7341 14.2821 14.354 14.5363 13.9354 14.7094C13.5168 14.8824 13.0682 14.9708 12.6152 14.9697H3.44052V14.9972Z",fill:"currentColor"}),(0,W.jsxs)("g",{transform:"translate(0, 11.92) scale(1, -1)",children:[(0,W.jsx)("path",{d:"M8.02801 10.7768C7.84626 10.7744 7.67258 10.7012 7.54404 10.5727C7.4155 10.4441 7.34229 10.2704 7.3399 10.0887V1.83145C7.33871 1.74075 7.35559 1.65071 7.38981 1.56667C7.42394 1.48262 7.47459 1.40628 7.53872 1.34214C7.60285 1.27799 7.67918 1.22736 7.76322 1.19321C7.84727 1.15907 7.93727 1.14211 8.02801 1.14334C8.20893 1.14333 8.38261 1.21457 8.51133 1.34164C8.64014 1.4687 8.71373 1.64137 8.71611 1.82227V10.0795C8.71611 10.2628 8.64391 10.4389 8.51518 10.5694C8.38637 10.6998 8.21132 10.7744 8.02801 10.7768Z",fill:"currentColor"}),(0,W.jsx)("path",{d:"M4.11919 5.28117C3.98507 5.27695 3.85502 5.23411 3.74464 5.15781C3.63424 5.0815 3.54822 4.97498 3.49689 4.85099C3.44556 4.72701 3.43108 4.59085 3.45522 4.45884C3.47935 4.32685 3.54106 4.2046 3.63293 4.10681L7.51384 0.198376C7.64559 0.0711228 7.82156 0 8.00469 0C8.18782 0 8.36379 0.0711228 8.49554 0.198376L12.3948 4.07928C12.5237 4.2083 12.596 4.3832 12.596 4.56554C12.596 4.74789 12.5237 4.92278 12.3948 5.0518C12.2658 5.18062 12.0909 5.25301 11.9085 5.25301C11.7262 5.25301 11.5513 5.18062 11.4223 5.0518L8.02763 1.65716L4.61463 5.07015C4.55017 5.13641 4.47316 5.18915 4.3881 5.22539C4.30305 5.26163 4.21165 5.28062 4.11919 5.28117Z",fill:"currentColor"})]})]}),ln=e=>{let{up:t=!1}=e;return(0,W.jsx)("svg",{width:"10",height:"7",viewBox:"0 0 10 7",fill:"none","aria-hidden":"true",style:t?{transform:"rotate(180deg)"}:void 0,children:(0,W.jsx)("path",{d:"M1 1.5L5 5.5l4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})},rn=e=>{let{direction:t=null}=e;return(0,W.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:[(0,W.jsx)("path",{opacity:"asc"===t?.3:1,fillRule:"evenodd",clipRule:"evenodd",d:"M2.27669 9.60385L1.04245 7.74508C0.868969 7.48344 0.515747 7.41177 0.254108 7.58582C-0.0075305 7.7593 -0.0786273 8.1125 0.0948505 8.37414L1.90016 11.0935C2.11061 11.4103 2.46497 11.6008 2.84491 11.602C3.22486 11.6031 3.58034 11.4143 3.79249 11.0986C4.45853 10.1066 5.59097 8.42078 5.59097 8.42078C5.76615 8.16028 5.69677 7.8065 5.43627 7.63131C5.1752 7.4567 4.82199 7.52609 4.64681 7.7866L3.41425 9.62204V0.681969C3.41425 0.368003 3.15887 0.11319 2.84547 0.11319C2.5315 0.11319 2.27669 0.368003 2.27669 0.681969V9.60385Z",fill:"currentColor"}),(0,W.jsx)("path",{opacity:"desc"===t?.3:1,fillRule:"evenodd",clipRule:"evenodd",d:"M7.96419 1.99813V10.92C7.96419 11.234 8.219 11.4888 8.53297 11.4888C8.84637 11.4888 9.10175 11.234 9.10175 10.92V1.97994L10.3343 3.81538C10.5095 4.07589 10.8627 4.14528 11.1238 3.97067C11.3843 3.79548 11.4536 3.4417 11.2785 3.1812C11.2785 3.1812 10.146 1.49533 9.47999 0.503381C9.26784 0.187708 8.91236 -0.00113245 8.53241 5.11035e-06C8.15247 0.00114267 7.79811 0.191691 7.58766 0.508501L5.78235 3.22784C5.60887 3.48948 5.67997 3.84268 5.94161 4.01616C6.20325 4.19021 6.55647 4.11854 6.72995 3.8569L7.96419 1.99813Z",fill:"currentColor"})]})},an=()=>(0,W.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:(0,W.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2.25C12.4142 2.25 12.75 2.58579 12.75 3V3.75H15.75C16.1642 3.75 16.5 4.08579 16.5 4.5C16.5 4.91422 16.1642 5.25 15.75 5.25H12.75V6C12.75 6.41421 12.4142 6.75 12 6.75C11.5858 6.75 11.25 6.41421 11.25 6V3C11.25 2.58579 11.5858 2.25 12 2.25ZM1.5 4.5C1.5 4.08579 1.83579 3.75 2.25 3.75H9C9.41423 3.75 9.75 4.08579 9.75 4.5C9.75 4.91422 9.41423 5.25 9 5.25H2.25C1.83579 5.25 1.5 4.91421 1.5 4.5ZM6 6.75C6.41421 6.75 6.75 7.08579 6.75 7.5V10.5C6.75 10.9142 6.41421 11.25 6 11.25C5.58579 11.25 5.25 10.9142 5.25 10.5V9.75H2.25C1.83579 9.75 1.5 9.41423 1.5 9C1.5 8.58577 1.83579 8.25 2.25 8.25H5.25V7.5C5.25 7.08579 5.58579 6.75 6 6.75ZM8.25 9C8.25 8.58577 8.58577 8.25 9 8.25H15.75C16.1642 8.25 16.5 8.58577 16.5 9C16.5 9.41423 16.1642 9.75 15.75 9.75H9C8.58577 9.75 8.25 9.41423 8.25 9ZM12 11.25C12.4142 11.25 12.75 11.5858 12.75 12V12.75H15.75C16.1642 12.75 16.5 13.0858 16.5 13.5C16.5 13.9142 16.1642 14.25 15.75 14.25H12.75V15C12.75 15.4142 12.4142 15.75 12 15.75C11.5858 15.75 11.25 15.4142 11.25 15V12C11.25 11.5858 11.5858 11.25 12 11.25ZM1.5 13.5C1.5 13.0858 1.83579 12.75 2.25 12.75H9C9.41423 12.75 9.75 13.0858 9.75 13.5C9.75 13.9142 9.41423 14.25 9 14.25H2.25C1.83579 14.25 1.5 13.9142 1.5 13.5Z",fill:"currentColor"})}),sn=()=>(0,W.jsxs)("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none","aria-hidden":"true",children:[(0,W.jsx)("path",{d:"M18.6 9a6.25 6.25 0 00-12.1 0 6.25 6.25 0 00.6 12.5h2.3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),(0,W.jsx)("path",{d:"M15.6 21.5h2.3a6.25 6.25 0 00.7-12.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),(0,W.jsx)("path",{d:"M13 22V10.6M13 10.6L9.6 14M13 10.6L16.4 14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),on=()=>(0,W.jsx)("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none","aria-hidden":"true",children:(0,W.jsx)("path",{d:"M3 14l6 6L23 6",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})}),cn=()=>(0,W.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:[(0,W.jsx)("circle",{cx:"9",cy:"9",r:"7.5",stroke:"currentColor",strokeWidth:"1.4"}),(0,W.jsx)("path",{d:"M9 5.5v4.2",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"}),(0,W.jsx)("circle",{cx:"9",cy:"12.2",r:"0.9",fill:"currentColor"})]}),un=()=>(0,W.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:[(0,W.jsx)("rect",{x:"2.8",y:"6.2",width:"8.4",height:"6.2",rx:"1.4",stroke:"currentColor",strokeWidth:"1.3"}),(0,W.jsx)("path",{d:"M4.8 6.2V4.6a2.2 2.2 0 014.4 0v1.6",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]}),dn=e=>{let{toast:t,onDismiss:n}=e;return(0,W.jsxs)("div",{className:`rwpfnl-toast is-${t.type}`,role:"error"===t.type?"alert":"status",children:[(0,W.jsx)("span",{className:"rwpfnl-toast__icon",children:"error"===t.type?(0,W.jsx)(cn,{}):(0,W.jsx)(dt,{})}),(0,W.jsx)("p",{className:"rwpfnl-toast__message",children:t.message}),t.action&&(0,W.jsx)("button",{type:"button",className:"rwpfnl-toast__action",onClick:()=>{t.action.onClick(),n(t.id)},children:t.action.label}),(0,W.jsx)("button",{type:"button",className:"rwpfnl-toast__close","aria-label":"Dismiss",onClick:()=>n(t.id),children:(0,W.jsx)(xt,{})})]})},pn=(0,i.createContext)({notify:()=>{},dismiss:()=>{}}),fn=()=>(0,i.useContext)(pn),hn=e=>{let{children:t}=e;const[n,l]=(0,i.useState)([]),a=(0,i.useRef)(new Map),s=(0,i.useRef)(0),o=(0,i.useCallback)(e=>{const t=a.current.get(e);t&&(clearTimeout(t),a.current.delete(e)),l(t=>t.filter(t=>t.id!==e))},[]),c=(0,i.useCallback)(function(e){let{type:t="success",duration:n,action:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=++s.current,c=void 0===n?"error"===t?0:4e3:n;return l(n=>[...n,{id:i,message:e,type:t,action:r}].slice(-4)),c>0&&a.current.set(i,setTimeout(()=>o(i),c)),i},[o]),u=(0,i.useMemo)(()=>({notify:c,dismiss:o}),[c,o]),d=n.length&&"undefined"!=typeof document&&(document.querySelector(".rwpfnl-app")||document.body)||null;return(0,W.jsxs)(pn.Provider,{value:u,children:[t,d&&(0,r.createPortal)((0,W.jsx)("div",{className:"rwpfnl-toasts","aria-live":"polite",children:n.map(e=>(0,W.jsx)(dn,{toast:e,onDismiss:o},e.id))}),d)]})},mn=[{pattern:"/"},{pattern:"/funnels/trash"},{pattern:"/funnels"},{pattern:"/funnel-templates"},{pattern:"/store-checkout/templates"},{pattern:"/store-checkout"},{pattern:"/automation/:automationId"},{pattern:"/automation"},{pattern:"/ai-assistant"},{pattern:"/settings/:section",keep:["section"]},{pattern:"/settings"}],vn=/^[a-z0-9-]{1,40}$/,gn=e=>e.split("/").filter(Boolean),wn="wpfunnels",xn=[{prefix:"/funnels",route:"#/funnels"},{prefix:"/store-checkout",route:"#/store-checkout"},{prefix:"/funnel-templates",route:"#/funnel-templates"},{prefix:"/automation",route:"#/automation"},{prefix:"/ai-assistant",route:"#/ai-assistant"},{prefix:"/settings",route:"#/settings"}],bn=[{prefix:"/funnels/trash",title:"Trash"},{prefix:"/funnels",title:"Funnels"},{prefix:"/store-checkout/templates",title:"Store Checkout Templates"},{prefix:"/store-checkout",title:"Store Checkout"},{prefix:"/funnel-templates",title:"Templates"},{prefix:"/automation",title:"Automations"},{prefix:"/settings",title:"Settings"},{prefix:"/ai-assistant",title:"AI Assistant"}],yn=()=>((()=>{const{pathname:e}=(0,s.zy)();(0,i.useEffect)(()=>(e=>{const t=document.getElementById("adminmenu");if(!t)return;t.querySelectorAll(".current").forEach(e=>e.classList.remove("current"));const n=t.querySelectorAll((e=>{const t=xn.find(t=>e.startsWith(t.prefix));return t?t.route?`li > a[href$="page=${wn}${t.route}"]`:`li > a[href$="page=${t.slug}"]`:`li > a[href$="page=${wn}"]`})(e));n.forEach(e=>{e.classList.add("current"),e.parentElement.classList.add("current")});const l=document.getElementById(`toplevel_page_${wn}`);l&&(l.classList.remove("wp-not-current-submenu"),l.classList.add("wp-has-current-submenu","wp-menu-open","current"))})(e),[e])})(),(()=>{const{pathname:e}=(0,s.zy)();(0,i.useEffect)(()=>(e=>{document.title=`${(e=>bn.find(t=>e.startsWith(t.prefix))?.title||"Dashboard")(e)}${d.documentTitleSuffix}`})(e),[e])})(),(()=>{const{pathname:e}=(0,s.zy)();(0,i.useEffect)(()=>(e=>{const t=(e=>{const t=gn(e||"/");for(const e of mn){const n=gn(e.pattern);if(n.length!==t.length)continue;const l=[];if(n.every((n,r)=>{if(n.startsWith(":")){const a=(e.keep||[]).includes(n.slice(1))&&vn.test(t[r]);return l.push(a?t[r]:n),!0}return l.push(n),n===t[r]}))return`/${l.join("/")}`}return""})(e);t&&d.restApiUrl&&"function"==typeof fetch&&fetch(`${d.restApiUrl}wpfunnels/v1/activity-trail/screen`,{method:"POST",credentials:"same-origin",keepalive:!0,headers:{"Content-Type":"application/json","X-WP-Nonce":d.nonce},body:JSON.stringify({screen:t})}).catch(()=>{})})(e),[e])})(),(0,W.jsx)(hn,{children:(0,W.jsx)("div",{className:"rwpfnl-admin-views-wrapper",children:(0,W.jsxs)("div",{className:"rwpfnl-admin-dashboard",children:[(0,W.jsx)($t,{}),(0,W.jsx)(s.sv,{})]})})})),jn=()=>(0,W.jsx)("section",{className:"rwpfnl-automation-cta",children:(0,W.jsxs)("div",{className:"rwpfnl-cta-content",style:{"--rwpfnl-automation-cta-bg":`url(${d.imagePath}/automation-cta-bg.webp)`},children:[(0,W.jsxs)("div",{className:"rwpfnl-cta-text",children:[(0,W.jsx)("h2",{className:"rwpfnl-cta-title",children:"Stay Focused On Reaching Your Business Goals With Mail Mint"}),(0,W.jsx)("p",{className:"rwpfnl-cta-subtitle",children:"Launch successful sales campaigns, run a profitable business & develop a trusting relationship with your customers."})]}),(0,W.jsx)("div",{className:"rwpfnl-cta-btn-wrapper",children:(0,W.jsx)("a",{href:"https://getwpfunnels.com/email-marketing-automation-mail-mint/",target:"_blank",role:"button","aria-label":"Visit Mail Mint Website",rel:"noopener noreferrer",className:"rwpfnl-btn rwpfnl-btn-primary",children:"Visit Mail Mint Website"})})]})}),kn=[{icon:"contact-management.svg",title:"Email Marketing Automation",description:"Automate email marketing campaigns based on customer actions, such as abandoned carts or completed purchases in WPFunnels."},{icon:"email-builder.svg",title:"Upsell and Cross-sell Automation",description:"Automatically trigger personalized upsell and cross-sell offers in your WPFunnels based on each customer’s purchase behavior and product engagement in WooCommerce."},{icon:"email-sequence.svg",title:"Automated Coupon Code",description:"Automatically create and send coupon codes based on customer actions or conditions in WooCommerce."},{icon:"automation-flows.svg",title:"Order Alerts & Automations",description:"Trigger instant notifications and automate actions for new or updated WooCommerce orders in WPFunnels."},{icon:"realtime-analytics.svg",title:"Real-time Analytics",description:"Actionable analytics to help you make data-driven decisions and optimize your campaigns."},{icon:"dynamic-segmentation.svg",title:"Customer Winback Automation",description:"Re-engage inactive customers automatically with targeted offers and reminders in WPFunnels."},{icon:"stunning-email-templates.svg",title:"Stunning Email Templates",description:"Impress subscribers with visually appealing email templates by Mail Mint to get more opens and clicks."},{icon:"woocommerce-icon.svg",title:"WooCommerce",description:"Trigger personalized and automated email campaigns for your WooCommerce store based on customer actions, order status, etc."}],Cn=["360° Contact Profiles","Email Builder","Marketing Automations","Campaign Ferformance","Abandoned Cart Recovery"],_n=()=>(0,W.jsx)("section",{className:"rwpfnl-automation-features",children:(0,W.jsxs)("div",{className:"rwpfnl-feature-container",children:[(0,W.jsx)("h2",{className:"rwpfnl-section-title",children:"See how WPFunnels and Mail Mint work together"}),(0,W.jsx)("div",{className:"rwpfnl-features-grid",children:kn.map(e=>(0,W.jsxs)("div",{className:"rwpfnl-feature-card",children:[(0,W.jsx)("div",{className:"rwpfnl-feature-icon",children:(0,W.jsx)("img",{src:`${d.imagePath}/${e.icon}`,alt:""})}),(0,W.jsx)("h3",{className:"rwpfnl-feature-title",children:e.title}),(0,W.jsx)("p",{className:"rwpfnl-feature-description",children:e.description})]},e.icon))}),(0,W.jsx)("p",{className:"rwpfnl-features-footer",children:"These are just examples. The possibilities are truly endless."})]})}),Nn={install:{busy:"Installing...",done:"Installed Successfully!",failed:"Installation Failed"},activate:{busy:"Activating...",done:"Activated Successfully!",failed:"Activation Failed"}},Sn=()=>(0,W.jsx)("span",{className:"rwpfnl-btn-loader",children:(0,W.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeOpacity:"0.25",strokeWidth:"2"}),(0,W.jsx)("path",{d:"M15 8a7 7 0 01-7 7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:(0,W.jsx)("animateTransform",{attributeName:"transform",type:"rotate",from:"0 8 8",to:"360 8 8",dur:"1s",repeatCount:"indefinite"})})]})}),Ln=e=>{let{dependency:t}=e;const[n,l]=(0,i.useState)(t.label),[r,a]=(0,i.useState)(!1),s=(0,i.useRef)(null);(0,i.useEffect)(()=>()=>clearTimeout(s.current),[]);const o=Nn[t.action]||Nn.activate;return(0,W.jsxs)("a",{href:"#",role:"button","aria-label":t.label,rel:"noopener noreferrer",className:"rwpfnl-btn-default","aria-busy":r,onClick:e=>{e.preventDefault(),r||(a(!0),l(o.busy),x({basename:t.basename,slug:t.slug}).then(e=>{if(!e||!e.success)throw new Error(e&&e.error||"Request failed.");l(o.done),window.location.reload()}).catch(()=>{l(o.failed),a(!1),s.current=setTimeout(()=>l(t.label),3e3)}))},children:[(0,W.jsx)("span",{className:"rwpfnl-btn-text",children:n}),r&&(0,W.jsx)(Sn,{})]})},Mn=e=>{let{dependency:t}=e;if(t.action&&("install"===t.action?d.canInstallPlugins:d.canActivatePlugins))return(0,W.jsx)(Ln,{dependency:t});const n=t.action?`${d.adminUrl}plugins.php`:t.url||"#";return(0,W.jsx)("a",{href:n,role:"button","aria-label":t.label,className:"rwpfnl-btn-default",...t.newTab?{target:"_blank",rel:"noopener noreferrer"}:{},children:t.label})},zn=()=>d.automationDependencies.filter(e=>"satisfied"!==e.state),En=()=>d.automationDependencies.length>0&&0===zn().length,An=e=>{let{dependencies:t}=e;return t.length?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)("ul",{className:"rwpfnl-dependency-list",children:t.map(e=>(0,W.jsx)("li",{className:"rwpfnl-dependency-item",children:e.message},e.id))}),(0,W.jsx)("div",{className:"rwpfnl-cta-buttons",children:t.map(e=>(0,W.jsx)(Mn,{dependency:e},e.id))})]}):null},Pn=()=>(0,W.jsx)("svg",{width:"11",height:"11",viewBox:"0 0 11 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,W.jsx)("path",{d:"M5.35272 0.795459C5.37435 0.751757 5.40777 0.71497 5.44919 0.689251C5.49062 0.663531 5.53841 0.649902 5.58718 0.649902C5.63594 0.649902 5.68373 0.663531 5.72516 0.689251C5.76659 0.71497 5.8 0.751757 5.82163 0.795459L6.96182 3.10497C7.03694 3.25697 7.14781 3.38849 7.28494 3.48821C7.42206 3.58794 7.58134 3.65291 7.7491 3.67753L10.299 4.05068C10.3473 4.05768 10.3927 4.07806 10.43 4.10952C10.4674 4.14097 10.4952 4.18225 10.5102 4.22867C10.5253 4.2751 10.5272 4.32483 10.5155 4.37223C10.5038 4.41962 10.4791 4.46281 10.4441 4.49689L8.60005 6.29257C8.47844 6.41108 8.38744 6.55737 8.33491 6.71885C8.28237 6.88032 8.26987 7.05215 8.29846 7.21953L8.73381 9.75658C8.74234 9.80487 8.73712 9.85459 8.71876 9.90006C8.70039 9.94553 8.66961 9.98492 8.62993 10.0137C8.59025 10.0426 8.54327 10.0596 8.49435 10.063C8.44543 10.0665 8.39654 10.056 8.35325 10.033L6.07386 8.83455C5.92366 8.75569 5.75657 8.71449 5.58693 8.71449C5.41729 8.71449 5.25019 8.75569 5.1 8.83455L2.8211 10.033C2.77783 10.0559 2.72899 10.0662 2.68016 10.0627C2.63132 10.0593 2.58443 10.0422 2.54483 10.0134C2.50524 9.98456 2.47452 9.94522 2.45617 9.89983C2.43782 9.85444 2.43257 9.80481 2.44104 9.75658L2.87589 7.22002C2.90461 7.05256 2.89217 6.88063 2.83963 6.71905C2.78709 6.55747 2.69603 6.41111 2.5743 6.29257L0.730253 4.49738C0.695008 4.46334 0.670032 4.42008 0.658171 4.37254C0.646309 4.325 0.648039 4.27508 0.663164 4.22847C0.678288 4.18186 0.706199 4.14044 0.743717 4.10892C0.781234 4.0774 0.826851 4.05705 0.875369 4.05019L3.42476 3.67753C3.59271 3.6531 3.7522 3.58822 3.88952 3.48848C4.02683 3.38874 4.13785 3.25712 4.21302 3.10497L5.35272 0.795459Z",fill:"#ee8134",stroke:"#ee8134",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})}),Fn=()=>{const e=zn();return(0,W.jsxs)("div",{className:"rwpfnl-automation-hero",children:[(0,W.jsxs)("div",{className:"rwpfnl-automation-hero-left",children:[(0,W.jsx)("h1",{className:"rwpfnl-hero-title",children:"Automate Your Funnels with Mail Mint"}),(0,W.jsx)("p",{className:"rwpfnl-hero-description",children:"Create automated email journeys, behavior-based workflows, and follow-up sequences that maximize your funnel conversions."}),e.length?(0,W.jsx)(An,{dependencies:e}):(0,W.jsx)("div",{className:"rwpfnl-cta-buttons",children:(0,W.jsx)("a",{href:d.proUpgradeUrl||"https://getwpfunnels.com/pricing/",role:"button",target:"_blank","aria-label":"Upgrade to Pro",rel:"noopener noreferrer",className:"rwpfnl-btn-default",children:"Upgrade to Pro"})})]}),(0,W.jsxs)("div",{className:"rwpfnl-automation-hero-right",children:[(0,W.jsxs)("span",{className:"rwpfnl-rating",children:[(0,W.jsx)("span",{className:"rwpfnl-rating-stars",children:[0,1,2,3,4].map(e=>(0,W.jsx)(Pn,{},e))}),"Rated 5 Stars by Users"]}),(0,W.jsx)("ul",{className:"rwpfnl-hero-feature-list",children:Cn.map(e=>(0,W.jsx)("li",{children:e},e))})]})]})},Dn=()=>(0,W.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"rwpfnl-spin","aria-hidden":"true",children:[(0,W.jsx)("circle",{cx:"7",cy:"7",r:"6",stroke:"currentColor",strokeOpacity:"0.3",strokeWidth:"2"}),(0,W.jsx)("path",{d:"M13 7a6 6 0 01-6 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),Tn=e=>{let{title:t,message:n,confirmLabel:l="Delete",busyLabel:r="Deleting...",cancelLabel:a="Cancel",destructive:s=!0,busy:o=!1,onConfirm:c,onCancel:u}=e;const d=(0,i.useRef)(null);return(0,i.useEffect)(()=>{d.current?.focus();const e=e=>{"Escape"!==e.key||o||u()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[u,o]),(0,W.jsx)("div",{className:"rwpfnl-confirm-backdrop",role:"presentation",onClick:e=>{e.target!==e.currentTarget||o||u()},children:(0,W.jsxs)("div",{className:"rwpfnl-confirm-dialog",role:"alertdialog","aria-modal":"true","aria-labelledby":"rwpfnl-confirm-title",children:[(0,W.jsx)("h2",{className:"rwpfnl-confirm-title",id:"rwpfnl-confirm-title",children:t}),n&&(0,W.jsx)("p",{className:"rwpfnl-confirm-message",children:n}),(0,W.jsxs)("div",{className:"rwpfnl-confirm-actions",children:[(0,W.jsx)("button",{type:"button",className:"rwpfnl-confirm-cancel",disabled:o,onClick:u,children:a}),(0,W.jsxs)("button",{type:"button",ref:d,className:"rwpfnl-confirm-accept"+(s?" is-destructive":""),disabled:o,"aria-busy":o,onClick:c,children:[o&&(0,W.jsx)(Dn,{}),o?r:l]})]})]})})},Rn=[10,25,50,100],Bn=e=>{let{page:t,perPage:n,total:l,totalPages:r,onPageChange:a,onPerPageChange:s}=e;const i=Math.max(1,r),o=l?(t-1)*n+1:0,c=Math.min(t*n,l),u=e=>{e<1||e>i||e===t||a(e)};return(0,W.jsxs)("div",{className:"rwpfnl-table-footer",children:[(0,W.jsx)("p",{className:"rwpfnl-footer-summary",children:l?`Showing ${o} to ${c} of ${l} results`:"Showing 0 results"}),(0,W.jsxs)("div",{className:"rwpfnl-footer-controls",children:[(0,W.jsxs)("label",{className:"rwpfnl-footer-field",children:[(0,W.jsx)("span",{children:"Rows per page"}),(0,W.jsx)("select",{value:n,onChange:e=>s(Number(e.target.value)),children:Rn.map(e=>(0,W.jsx)("option",{value:e,children:e},e))})]}),(0,W.jsxs)("label",{className:"rwpfnl-footer-field",children:[(0,W.jsx)("span",{children:"Page"}),(0,W.jsx)("select",{value:t,onChange:e=>u(Number(e.target.value)),children:Array.from({length:i}).map((e,t)=>(0,W.jsx)("option",{value:t+1,children:t+1},t+1))}),(0,W.jsx)("span",{className:"rwpfnl-footer-total",children:`/ ${i}`})]}),(0,W.jsxs)("div",{className:"rwpfnl-footer-nav",children:[(0,W.jsx)("button",{type:"button","aria-label":"First page",disabled:t<=1,onClick:()=>u(1),children:(0,W.jsx)(Kt,{})}),(0,W.jsx)("button",{type:"button","aria-label":"Previous page",disabled:t<=1,onClick:()=>u(t-1),children:(0,W.jsx)(Qt,{})}),(0,W.jsx)("button",{type:"button","aria-label":"Next page",disabled:t>=i,onClick:()=>u(t+1),children:(0,W.jsx)(Gt,{})}),(0,W.jsx)("button",{type:"button","aria-label":"Last page",disabled:t>=i,onClick:()=>u(i),children:(0,W.jsx)(Xt,{})})]})]})]})},$n=[{icon:"welcome-email.svg",title:"Opt-in Welcome Email"},{icon:"login-notification.svg",title:"User Login Notification"},{icon:"first-order-in-store.svg",title:"WC - First Order In Store"},{icon:"new-user-welcome-email.svg",title:"New User Welcome Email"}],In=()=>(0,W.jsxs)("div",{className:"rwpfnl-automation-empty",children:[(0,W.jsxs)("div",{className:"rwpfnl-feature-content",children:[(0,W.jsx)("div",{className:"rwpfnl-feature-cards",children:$n.map(e=>(0,W.jsxs)("div",{className:"rwpfnl-single-card",children:[(0,W.jsx)("div",{className:"rwpfnl-card-icon",children:(0,W.jsx)("img",{src:`${d.imagePath}/${e.icon}`,alt:""})}),(0,W.jsx)("h2",{className:"rwpfnl-card-title",children:e.title}),(0,W.jsx)("div",{className:"rwpfnl-card-logo",children:(0,W.jsx)("img",{src:`${d.imagePath}/automation-loader.png`,alt:""})})]},e.icon))}),(0,W.jsxs)("div",{className:"rwpfnl-feature-text",children:[(0,W.jsx)("h2",{className:"rwpfnl-feature-heading",children:"Quick-start with ready-made recipes"}),(0,W.jsx)("p",{className:"rwpfnl-feature-des",children:"Save time by importing and editing our ever-growing library of practical automation recipes to fit your needs"})]})]}),(0,W.jsxs)("div",{className:"rwpfnl-feature-content",children:[(0,W.jsx)("div",{className:"rwpfnl-feature-cards rwpfnl-feature-cards-image",children:(0,W.jsx)("img",{src:`${d.imagePath}/build-automation.webp`,alt:""})}),(0,W.jsxs)("div",{className:"rwpfnl-feature-text",children:[(0,W.jsx)("h2",{className:"rwpfnl-feature-heading",children:"Build any automation you imagine"}),(0,W.jsx)("p",{className:"rwpfnl-feature-des",children:"Save time by importing and editing our ever-growing library of practical automation recipes to fit your needs"})]})]})]}),On=()=>(0,W.jsx)("svg",{width:"29",height:"29",fill:"none",viewBox:"0 0 29 29",xmlns:"http://www.w3.org/2000/svg",children:(0,W.jsx)("path",{fill:"#D5D6D9",d:"M.85 13.65h2.605v-2.548c0-.47.38-.85.85-.85h7.792a2.56 2.56 0 011.553-1.553V6.854h-2.548a.85.85 0 01-.85-.85V.85c0-.47.38-.85.85-.85h6.796c.47 0 .85.38.85.85v5.154c0 .47-.38.85-.85.85H15.35v1.845a2.56 2.56 0 011.553 1.553h7.792c.47 0 .85.38.85.85v2.548h2.605c.47 0 .85.38.85.85v5.098a.85.85 0 01-.85.85h-6.853a.85.85 0 01-.85-.85v-.85H15.35v1.785a4.255 4.255 0 013.398 4.162c0 2.349-1.9 4.305-4.248 4.305-2.348 0-4.248-1.956-4.248-4.305a4.255 4.255 0 013.398-4.162v-1.785H8.553v.85a.85.85 0 01-.85.85H.85a.85.85 0 01-.85-.85V14.5c0-.47.38-.85.85-.85zM17.049 1.7H11.95v3.454h5.098V1.7zM11.95 24.694c0 1.413 1.167 2.606 2.549 2.606s2.549-1.193 2.549-2.606a2.552 2.552 0 00-2.549-2.549 2.552 2.552 0 00-2.549 2.55zm2.55-14.442a.85.85 0 000 1.7.85.85 0 000-1.7zm7.646 8.496h5.155V15.35h-5.154v3.398zm-1.699-1.7V14.5c0-.47.38-.85.85-.85h2.549v-1.699h-6.943a2.553 2.553 0 01-2.403 1.7 2.553 2.553 0 01-2.403-1.7H5.154v1.7h2.55a.85.85 0 01.849.849v2.549h11.894zM1.7 18.749h5.155V15.35H1.699v3.398z"})}),Wn=()=>(0,W.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[(0,W.jsx)("path",{d:"M11.0833 1.16667H10.5V0.583333C10.5 0.428624 10.4385 0.280251 10.3291 0.170854C10.2197 0.0614582 10.0714 0 9.91667 0C9.76196 0 9.61358 0.0614582 9.50419 0.170854C9.39479 0.280251 9.33333 0.428624 9.33333 0.583333V1.16667H4.66667V0.583333C4.66667 0.428624 4.60521 0.280251 4.49581 0.170854C4.38642 0.0614582 4.23804 0 4.08333 0C3.92862 0 3.78025 0.0614582 3.67085 0.170854C3.56146 0.280251 3.5 0.428624 3.5 0.583333V1.16667H2.91667C2.1434 1.16759 1.40208 1.47518 0.855295 2.02196C0.308514 2.56874 0.00092625 3.31007 0 4.08333L0 11.0833C0.00092625 11.8566 0.308514 12.5979 0.855295 13.1447C1.40208 13.6915 2.1434 13.9991 2.91667 14H11.0833C11.8566 13.9991 12.5979 13.6915 13.1447 13.1447C13.6915 12.5979 13.9991 11.8566 14 11.0833V4.08333C13.9991 3.31007 13.6915 2.56874 13.1447 2.02196C12.5979 1.47518 11.8566 1.16759 11.0833 1.16667ZM1.16667 4.08333C1.16667 3.6192 1.35104 3.17409 1.67923 2.8459C2.00742 2.51771 2.45254 2.33333 2.91667 2.33333H11.0833C11.5475 2.33333 11.9926 2.51771 12.3208 2.8459C12.649 3.17409 12.8333 3.6192 12.8333 4.08333V4.66667H1.16667V4.08333ZM11.0833 12.8333H2.91667C2.45254 12.8333 2.00742 12.649 1.67923 12.3208C1.35104 11.9926 1.16667 11.5475 1.16667 11.0833V5.83333H12.8333V11.0833C12.8333 11.5475 12.649 11.9926 12.3208 12.3208C11.9926 12.649 11.5475 12.8333 11.0833 12.8333Z",fill:"#6E42D3"}),(0,W.jsx)("path",{d:"M7 9.625a.875.875 0 100-1.75.875.875 0 000 1.75z",fill:"#6E42D3"}),(0,W.jsx)("path",{d:"M4.083 9.625a.875.875 0 100-1.75.875.875 0 000 1.75z",fill:"#6E42D3"}),(0,W.jsx)("path",{d:"M9.917 9.625a.875.875 0 100-1.75.875.875 0 000 1.75z",fill:"#6E42D3"})]}),Hn=()=>(0,W.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:(0,W.jsx)("path",{d:"M6.36364 5.09091V8.90909C6.36364 9.26036 6.07918 9.54545 5.72727 9.54545C5.37536 9.54545 5.09091 9.26036 5.09091 8.90909V5.09091C5.09091 4.73964 5.37536 4.45455 5.72727 4.45455C6.07918 4.45455 6.36364 4.73964 6.36364 5.09091ZM8.27273 4.45455C7.92082 4.45455 7.63636 4.73964 7.63636 5.09091V8.90909C7.63636 9.26036 7.92082 9.54545 8.27273 9.54545C8.62464 9.54545 8.90909 9.26036 8.90909 8.90909V5.09091C8.90909 4.73964 8.62464 4.45455 8.27273 4.45455ZM14 7C14 11.9064 11.9064 14 7 14C2.09364 14 0 11.9064 0 7C0 2.09364 2.09364 0 7 0C11.9064 0 14 2.09364 14 7ZM12.7273 7C12.7273 2.82482 11.1752 1.27273 7 1.27273C2.82482 1.27273 1.27273 2.82482 1.27273 7C1.27273 11.1752 2.82482 12.7273 7 12.7273C11.1752 12.7273 12.7273 11.1752 12.7273 7Z",fill:"#EE8134"})}),Vn=()=>(0,W.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:(0,W.jsx)("path",{d:"M9.50717 4.83467L10.3262 5.66592L6.94692 8.995C6.72117 9.22075 6.42425 9.33333 6.12617 9.33333C5.82808 9.33333 5.52825 9.21958 5.30017 8.99208L3.67733 7.41942L4.48992 6.58117L6.11917 8.16025L9.50717 4.83467ZM14 7C14 10.8599 10.8599 14 7 14C3.14008 14 0 10.8599 0 7C0 3.14008 3.14008 0 7 0C10.8599 0 14 3.14008 14 7ZM12.8333 7C12.8333 3.7835 10.2165 1.16667 7 1.16667C3.7835 1.16667 1.16667 3.7835 1.16667 7C1.16667 10.2165 3.7835 12.8333 7 12.8333C10.2165 12.8333 12.8333 10.2165 12.8333 7Z",fill:"#00D057"})}),Un=()=>(0,W.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[(0,W.jsx)("circle",{cx:"8",cy:"8",r:"6.6",stroke:"currentColor",strokeWidth:"1.4"}),(0,W.jsx)("path",{d:"M6.7 5.7l4 2.3-4 2.3V5.7z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"})]}),Zn=()=>(0,W.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[(0,W.jsx)("circle",{cx:"8",cy:"8",r:"6.6",stroke:"currentColor",strokeWidth:"1.4"}),(0,W.jsx)("path",{d:"M6.6 5.6v4.8M9.4 5.6v4.8",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})]}),Yn=e=>{let{automation:t,selected:n,busy:l,onSelect:a,onOpen:s,onStatusChange:o,onDelete:c}=e;const[u,d]=(0,i.useState)(!1),[p,f]=(0,i.useState)(null),[h,m]=(0,i.useState)(!1),v=(0,i.useRef)(null),g=(0,i.useRef)(null),w=(0,i.useCallback)(()=>{const e=v.current;if(!e)return;const t=e.getBoundingClientRect(),n=g.current?.offsetHeight||120,l=window.innerHeight-t.bottom<n+6&&t.top>n+6,r=Math.max(6,Math.min(t.right-190,window.innerWidth-190-6));m(l),f({position:"fixed",left:`${Math.round(r)}px`,top:l?"auto":`${Math.round(t.bottom+6)}px`,bottom:l?`${Math.round(window.innerHeight-t.top+6)}px`:"auto",width:"190px"})},[]);(0,i.useLayoutEffect)(()=>{u?w():f(null)},[u,w]),(0,i.useEffect)(()=>{if(!u)return;const e=e=>{g.current?.contains(e.target)||v.current?.contains(e.target)||d(!1)},t=e=>{"Escape"===e.key&&d(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),window.addEventListener("scroll",w,!0),window.addEventListener("resize",w),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t),window.removeEventListener("scroll",w,!0),window.removeEventListener("resize",w)}},[u,w]);const x=(e,t)=>{e.preventDefault(),d(!1),t()},b="active"===t.status,y=["rwpfnl-automation-row",n?"is-selected":"",l?"is-busy":""].filter(Boolean).join(" ");return(0,W.jsxs)("div",{className:y,children:[(0,W.jsx)("div",{className:"rwpfnl-automation-cell rwpfnl-cell-select",children:(0,W.jsxs)("span",{className:"rwpfnl-checkbox",children:[(0,W.jsx)("input",{type:"checkbox",id:`rwpfnl-automation-${t.id}`,checked:n,onChange:()=>a(t.id)}),(0,W.jsx)("label",{htmlFor:`rwpfnl-automation-${t.id}`})]})}),(0,W.jsxs)("div",{className:"rwpfnl-automation-cell rwpfnl-cell-name",children:[(0,W.jsx)("span",{className:"rwpfnl-automation-logo",children:(0,W.jsx)(On,{})}),(0,W.jsxs)("span",{className:"rwpfnl-automation-name-group",children:[(0,W.jsx)("a",{href:"#",className:"rwpfnl-automation-name",onClick:e=>{e.preventDefault(),s(t.id)},children:t.name}),(0,W.jsx)("span",{className:"rwpfnl-automation-meta",children:t.created_at})]})]}),(0,W.jsxs)("div",{className:"rwpfnl-automation-cell rwpfnl-cell-customers",children:[(0,W.jsxs)("span",{className:"rwpfnl-count-pill",title:"Contacts entered",children:[(0,W.jsx)(Wn,{}),t.enterance]}),(0,W.jsxs)("span",{className:"rwpfnl-count-pill",title:"Contacts in progress",children:[(0,W.jsx)(Hn,{}),t.processing]}),(0,W.jsxs)("span",{className:"rwpfnl-count-pill",title:"Contacts completed",children:[(0,W.jsx)(Vn,{}),t.completed]})]}),(0,W.jsx)("div",{className:"rwpfnl-automation-cell rwpfnl-cell-status",children:(0,W.jsx)("span",{className:"rwpfnl-status-pill is-"+(b?"active":"paused"),children:b?"Active":"Paused"})}),(0,W.jsxs)("div",{className:"rwpfnl-automation-cell rwpfnl-cell-action",children:[(0,W.jsx)("button",{type:"button",className:"rwpfnl-icon-btn",title:"Edit",disabled:l,onClick:()=>s(t.id),children:(0,W.jsx)(It,{})}),(0,W.jsxs)("div",{className:"rwpfnl-row-menu",children:[(0,W.jsx)("button",{type:"button",ref:v,className:"rwpfnl-icon-btn"+(u?" is-open":""),"aria-label":"More actions","aria-expanded":u,disabled:l,onClick:()=>d(e=>!e),children:(0,W.jsx)(Ot,{})}),u&&(0,r.createPortal)((0,W.jsxs)("ul",{ref:g,style:p||{position:"fixed",visibility:"hidden"},className:"rwpfnl-dropdown rwpfnl-row-dropdown"+(h?" is-above":""),children:[(0,W.jsx)("li",{children:(0,W.jsxs)("a",{href:"#",onClick:e=>x(e,()=>o(t,b?"pause":"active")),children:[b?(0,W.jsx)(Zn,{}):(0,W.jsx)(Un,{}),b?"Pause":"Activate"]})}),(0,W.jsx)("li",{className:"rwpfnl-dropdown-sep",children:(0,W.jsxs)("a",{href:"#",className:"rwpfnl-dropdown-delete",onClick:e=>x(e,()=>c(t)),children:[(0,W.jsx)(Vt,{}),"Delete"]})})]}),document.querySelector(".rwpfnl-app")||document.body)]})]})]})},qn=5,Kn=e=>{let{rows:t=qn}=e;return(0,W.jsxs)("div",{className:"rwpfnl-automation-table rwpfnl-automation-table--loading","aria-busy":"true",children:[(0,W.jsxs)("div",{className:"rwpfnl-automation-row rwpfnl-automation-row--head",children:[(0,W.jsx)("div",{className:"rwpfnl-automation-cell rwpfnl-cell-select",children:(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--box"})}),(0,W.jsx)("div",{className:"rwpfnl-automation-cell rwpfnl-cell-name",children:(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--label"})}),(0,W.jsx)("div",{className:"rwpfnl-automation-cell rwpfnl-cell-customers",children:(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--label"})}),(0,W.jsx)("div",{className:"rwpfnl-automation-cell rwpfnl-cell-status",children:(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--label"})}),(0,W.jsx)("div",{className:"rwpfnl-automation-cell rwpfnl-cell-action",children:(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--label"})})]}),Array.from({length:t}).map((e,t)=>(0,W.jsxs)("div",{className:"rwpfnl-automation-row",children:[(0,W.jsx)("div",{className:"rwpfnl-automation-cell rwpfnl-cell-select",children:(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--box"})}),(0,W.jsxs)("div",{className:"rwpfnl-automation-cell rwpfnl-cell-name",children:[(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--builder"}),(0,W.jsxs)("span",{className:"rwpfnl-automation-name-group",children:[(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--title"}),(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--subtitle"})]})]}),(0,W.jsxs)("div",{className:"rwpfnl-automation-cell rwpfnl-cell-customers",children:[(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--pill"}),(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--pill"}),(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--pill"})]}),(0,W.jsx)("div",{className:"rwpfnl-automation-cell rwpfnl-cell-status",children:(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--pill"})}),(0,W.jsxs)("div",{className:"rwpfnl-automation-cell rwpfnl-cell-action",children:[(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--icon"}),(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--icon"})]})]},t)),(0,W.jsxs)("div",{className:"rwpfnl-table-footer",children:[(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--text"}),(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--text"})]})]})},Qn=(e,t)=>{const n=e&&(e.message||e.code);return n?`${t} ${n}`:t},Gn=()=>{const e=(0,s.Zp)(),{notify:t}=fn(),[n,l]=(0,i.useState)([]),[r,a]=(0,i.useState)(0),[o,c]=(0,i.useState)(1),[u,d]=(0,i.useState)(1),[p,f]=(0,i.useState)(25),[h,m]=(0,i.useState)(""),[g,w]=(0,i.useState)(""),[x,j]=(0,i.useState)(!0),[k,C]=(0,i.useState)(""),[_,N]=(0,i.useState)([]),[S,L]=(0,i.useState)([]),[M,z]=(0,i.useState)(!1),[E,A]=(0,i.useState)(null),[P,F]=(0,i.useState)(!1);(0,i.useEffect)(()=>{const e=setTimeout(()=>w(h),400);return()=>clearTimeout(e)},[h]);const D=(0,i.useCallback)(()=>(j(!0),(e=>{let{page:t,perPage:n}=e;return v("automation/list",{page:t,per_page:n},"wpfnl/v1")})({page:u,perPage:p}).then(e=>{l(e.data||[]),a(e.total||0),c(e.total_pages||1),N([]),C("")}).catch(e=>{console.error("WPFunnels: loading automations failed.",e),C(Qn(e,"Could not load your automations."))}).finally(()=>j(!1))),[u,p]);(0,i.useEffect)(()=>{D()},[D]),(0,i.useEffect)(()=>{!x&&u>1&&!n.length&&r>0&&d(Math.min(u-1,Math.max(1,o)))},[n.length,x,u,r,o]);const T=(0,i.useMemo)(()=>{const e=g.trim().toLowerCase();return e?n.filter(t=>String(t.name||"").toLowerCase().includes(e)):n},[n,g]),R=e=>t(e),B=(e,n)=>t(Qn(e,n),{type:"error"}),$=e=>N(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),I=t=>e(t?`/automation/${t}`:"/automation/new"),O=(e,t)=>{const r=n;return l(n=>n.map(n=>n.id===e.id?{...n,status:t}:n)),b(e.id,t).catch(e=>{l(r),B(e,"Could not update the automation status.")})},H=e=>A({title:"Delete this automation?",message:e.name?`“${e.name}” will be deleted. This cannot be undone.`:"This automation will be deleted. This cannot be undone.",confirmLabel:"Delete",onConfirm:()=>{return t=e.id,n=()=>y(e.id).then(()=>(R(`“${e.name}” has been deleted.`),D())).catch(e=>B(e,"Could not delete this automation.")),L(e=>[...e,t]),Promise.resolve(n()).finally(()=>L(e=>e.filter(e=>e!==t)));var t,n}}),V=(e,n)=>{const l=_.length;return z(!0),L(_),Promise.allSettled(_.map(n)).then(n=>{const r=n.filter(e=>"rejected"===e.status).length;return r?t(`${r} automation${1===r?"":"s"} could not be ${e}. Please try again.`,{type:"error"}):R(`${l} automation${1===l?"":"s"} ${e}.`),D()}).finally(()=>{z(!1),L([])})},U=T.length>0&&_.length===T.length,Z=n.filter(e=>_.includes(e.id)).some(e=>"active"===e.status);return(0,W.jsxs)("div",{className:"rwpfnl-dashboard-body rwpfnl-automation-list",children:[(0,W.jsxs)("div",{className:"rwpfnl-list-header",children:[!x&&_.length>0&&(0,W.jsxs)("div",{className:"rwpfnl-selection-bar",children:[(0,W.jsxs)("p",{className:"rwpfnl-bulk-summary",children:[(0,W.jsxs)("span",{className:"rwpfnl-selected-count",children:[_.length," ",1===_.length?"item":"items"]})," ","selected in the list"]}),(0,W.jsxs)("button",{type:"button",className:"rwpfnl-bulk-clear",onClick:()=>N([]),children:[(0,W.jsx)(xt,{}),"Clear All"]}),(0,W.jsx)("span",{className:"rwpfnl-bulk-divider"}),(0,W.jsxs)("div",{className:"rwpfnl-bulk-buttons",children:[(0,W.jsxs)("button",{type:"button",className:"rwpfnl-bulk-btn",disabled:M,onClick:e=>((e,t)=>{e.preventDefault(),_.length&&V("active"===t?"activated":"paused",e=>b(e,t))})(e,Z?"pause":"active"),children:[Z?(0,W.jsx)(Zn,{}):(0,W.jsx)(Un,{}),Z?"Pause":"Activate"]}),(0,W.jsxs)("button",{type:"button",className:"rwpfnl-bulk-btn is-destructive",disabled:M,onClick:e=>{if(e.preventDefault(),!_.length)return;const t=_.length;A({title:1===t?"Delete this automation?":`Delete ${t} automations?`,message:(1===t?"It":"They")+" will be deleted. This cannot be undone.",confirmLabel:1===t?"Delete":`Delete ${t}`,onConfirm:()=>V("deleted",e=>y(e))})},children:[(0,W.jsx)(Vt,{}),"Delete"]})]})]}),(0,W.jsxs)("div",{className:"rwpfnl-list-header-right",children:[(n.length>0||g)&&(0,W.jsxs)("div",{className:"rwpfnl-search-group",children:[(0,W.jsx)(qt,{}),(0,W.jsx)("input",{type:"search",value:h,placeholder:"Search for an automation...",onChange:e=>m(e.target.value)})]}),(0,W.jsx)("button",{type:"button",className:"rwpfnl-btn-icon"+(x?" is-busy":""),title:"Refresh the list","aria-label":"Refresh the list",disabled:x,onClick:()=>D(),children:(0,W.jsx)(Zt,{})}),(0,W.jsxs)("button",{type:"button",className:"rwpfnl-btn-primary",onClick:()=>I(null),children:[(0,W.jsx)(Yt,{}),"New Automation"]})]})]}),k&&(0,W.jsxs)("div",{className:"rwpfnl-list-error",children:[(0,W.jsx)("span",{children:k}),(0,W.jsx)("button",{type:"button",className:"rwpfnl-retry",onClick:()=>D(),children:"Try again"})]}),x&&(0,W.jsx)(Kn,{rows:Math.min(p,5)}),!x&&!n.length&&(0,W.jsx)(In,{}),!x&&n.length>0&&(0,W.jsxs)("div",{className:"rwpfnl-automation-table",children:[(0,W.jsxs)("div",{className:"rwpfnl-automation-row rwpfnl-automation-row--head",children:[(0,W.jsx)("div",{className:"rwpfnl-automation-cell rwpfnl-cell-select",children:(0,W.jsxs)("span",{className:"rwpfnl-checkbox",children:[(0,W.jsx)("input",{type:"checkbox",id:"rwpfnl-automation-select-all",checked:U,disabled:!T.length,onChange:e=>N(e.target.checked?T.map(e=>e.id):[])}),(0,W.jsx)("label",{htmlFor:"rwpfnl-automation-select-all"})]})}),(0,W.jsx)("div",{className:"rwpfnl-automation-cell rwpfnl-cell-name",children:"Name"}),(0,W.jsx)("div",{className:"rwpfnl-automation-cell rwpfnl-cell-customers",children:"Customers"}),(0,W.jsx)("div",{className:"rwpfnl-automation-cell rwpfnl-cell-status",children:"Status"}),(0,W.jsx)("div",{className:"rwpfnl-automation-cell rwpfnl-cell-action",children:"Action"})]}),!T.length&&(0,W.jsx)("div",{className:"rwpfnl-automation-empty-row",children:(0,W.jsxs)("div",{className:"rwpfnl-table-empty",children:[(0,W.jsxs)("h3",{children:["No automation matches “",g,"”"]}),(0,W.jsx)("p",{children:"Try a different name, or clear the search to see every automation on this page."})]})}),T.map(e=>(0,W.jsx)(Yn,{automation:e,selected:_.includes(e.id),busy:S.includes(e.id),onSelect:$,onOpen:I,onStatusChange:O,onDelete:H},e.id)),r>0&&(0,W.jsx)(Bn,{page:u,perPage:p,total:r,totalPages:o,onPageChange:d,onPerPageChange:e=>{f(e),d(1)}})]}),E&&(0,W.jsx)(Tn,{title:E.title,message:E.message,confirmLabel:E.confirmLabel,busy:P,onConfirm:()=>{F(!0),Promise.resolve(E.onConfirm()).finally(()=>{F(!1),A(null)})},onCancel:()=>A(null)})]})},Xn=()=>En()?(0,W.jsx)(Gn,{}):(0,W.jsx)("div",{className:"rwpfnl-automation-promo",children:(0,W.jsxs)("div",{className:"rwpfnl-automation-content",children:[(0,W.jsx)(Fn,{}),(0,W.jsx)("section",{className:"rwpfnl-automation-video",children:(0,W.jsx)("div",{className:"rwpfnl-video-container",children:(0,W.jsx)("iframe",{width:"560",height:"315",src:"https://www.youtube.com/embed/lRKDasiv9O0?si=R_9sKePZq0yn7gCk",title:"Mail Mint Overview Video",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})})}),(0,W.jsx)(_n,{}),(0,W.jsx)(jn,{})]})}),Jn={"table-three":[40,60,80],"table-full-six":[100,100,100,100,100,100],"table-full":[100,100],default:[40,60,80,100]},el=e=>{let{type:t="default"}=e;const n=Jn[t]||Jn.default;return(0,W.jsx)("div",{className:"rwpfnl-shimmer-wrapper",children:n.map((e,t)=>(0,W.jsx)("div",{className:`rwpfnl-shimmer-line rwpfnl-shimmer-line-br rwpfnl-shimmer-line-${100===e?"full":e} rwpfnl-shimmer-animate`},t))})},tl=()=>{const e=window._;return Promise.all([n.e("vendors-node_modules_wordpress_components_build-module_composite_legacy_index_js-node_modules-f19f6a"),n.e("wpfnl-automation-editor")]).then(n.bind(n,81629)).then(t=>(e&&(window._=e),t))},nl=(0,i.lazy)(tl),ll=()=>{const{automationId:e}=(0,s.g)(),t=(0,s.Zp)();if(!En())return(0,W.jsx)(s.C5,{to:"/automation",replace:!0});const n=e&&"new"!==e?Number(e):null,l=(0,i.useCallback)(()=>t("/automation"),[t]);return(0,W.jsx)(i.Suspense,{fallback:(0,W.jsx)(el,{type:"table-full-six"}),children:(0,W.jsx)(nl,{isOpen:!0,automationId:n,onClose:l})})},rl=e=>{let{loader:t,label:n="",mainValue:l="",baselineLabel:r="",baselineValue:a="",footerLabel:s="",liftValue:i="",liftPercent:o=0,liftType:c="increase",isLocked:u=!1}=e;return(0,W.jsxs)("div",{className:"rwpfnl-compare-store-card"+(u?" is-pro-locked":""),children:[t&&(0,W.jsx)(el,{type:"table-three"}),!t&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)("div",{className:"rwpfnl-csc-header",children:[(0,W.jsx)("span",{className:"rwpfnl-csc-label",children:n}),(0,W.jsx)("div",{className:"rwpfnl-csc-header-right",children:u&&(0,W.jsx)("a",{href:d.proUpgradeUrl,target:"_blank",rel:"noopener noreferrer",className:"rwpfnl-csc-pro-badge",children:(0,W.jsx)(nt,{})})})]}),(0,W.jsxs)("div",{className:"rwpfnl-csc-body",children:[(0,W.jsx)("span",{className:"rwpfnl-csc-main-value",children:l}),(r||a)&&(0,W.jsxs)("span",{className:"rwpfnl-csc-baseline",children:[r," ",(0,W.jsx)("strong",{children:a})]})]}),(0,W.jsxs)("div",{className:"rwpfnl-csc-footer",children:[(0,W.jsxs)("div",{className:"rwpfnl-csc-footer-top",children:[(0,W.jsx)("span",{className:"rwpfnl-csc-footer-label",children:s}),(0,W.jsx)("span",{className:`rwpfnl-csc-lift-value${"increase"===c?" is-increase":""}${"decrease"===c?" is-decrease":""}`,children:i})]}),(0,W.jsx)("div",{className:"rwpfnl-csc-progress-bar",children:(0,W.jsx)("div",{className:"rwpfnl-csc-progress-fill"+("decrease"===c?" is-decrease":""),style:{width:`${Math.min(Math.abs(o),100)}%`}})})]})]})]})},al=e=>{let{loader:t,cards:n=[]}=e;return(0,W.jsx)("div",{className:"rwpfnl-dashboard-compare-store",children:n.map(e=>(0,W.jsx)(rl,{...e,loader:t},e.label))})},sl={id:"verticalLine",afterDraw(e){if(!e.tooltip._active||!e.tooltip._active.length)return;const t=e.ctx,n=e.tooltip._active[0].element.x;t.save(),t.beginPath(),t.moveTo(n,e.scales.y.top),t.lineTo(n,e.scales.y.bottom),t.lineWidth=1,t.strokeStyle="#DCD9E8",t.setLineDash([4,4]),t.stroke(),t.restore()}},il=e=>{let{loader:t=!1,summaryCards:l=[],labels:r=[],funnelData:a=[],storeData:s=[]}=e;const o=(0,i.useRef)(null),c=(0,i.useRef)(null),u=(0,i.useRef)({labels:r,funnelData:a,storeData:s});return u.current={labels:r,funnelData:a,storeData:s},(0,i.useEffect)(()=>{if(t)return;let e=!1;return(async()=>{const{Chart:t,registerables:l}=await n.e("vendors-node_modules_chart_js_dist_chart_mjs").then(n.bind(n,33050));if(t.register(...l),e||!o.current)return;const r=u.current;c.current=new t(o.current.getContext("2d"),{type:"line",plugins:[sl],data:{labels:r.labels,datasets:[{label:"Funnel",data:r.funnelData,borderColor:"#6E42D3",backgroundColor:"transparent",borderWidth:2,pointRadius:0,pointHoverRadius:5,tension:.4},{label:"Store",data:r.storeData,borderColor:"#F97316",backgroundColor:"transparent",borderWidth:2,pointRadius:0,pointHoverRadius:5,tension:.4}]},options:{responsive:!0,maintainAspectRatio:!1,layout:{padding:{left:8,right:8}},interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!1},tooltip:{callbacks:{label:e=>` ${e.dataset.label}: $${e.parsed.y.toLocaleString()}`}}},scales:{x:{grid:{display:!1},border:{display:!1},ticks:{color:"#9398A5",font:{size:12}}},y:{grid:{color:"#F0EEF8",drawBorder:!1},border:{display:!1,dash:[4,4]},ticks:{color:"#9398A5",font:{size:12},callback:e=>`$${e.toLocaleString()}`}}}}})})(),()=>{e=!0,c.current&&(c.current.destroy(),c.current=null)}},[t]),(0,i.useEffect)(()=>{const e=c.current;!t&&e&&(e.data.labels=r,e.data.datasets[0].data=a,e.data.datasets[1].data=s,e.update())},[t,r,a,s]),(0,W.jsxs)("div",{className:"rwpfnl-day-by-day-performance",children:[t&&(0,W.jsx)(el,{type:"table-three"}),!t&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)("div",{className:"rwpfnl-dbdp-header",children:[(0,W.jsx)("h3",{className:"rwpfnl-dbdp-title",children:"Day-by-day performance"}),(0,W.jsxs)("div",{className:"rwpfnl-dbdp-legend",children:[(0,W.jsxs)("span",{className:"rwpfnl-dbdp-legend-item",children:[(0,W.jsx)("span",{className:"rwpfnl-dbdp-legend-dot",style:{background:"#6E42D3"}}),"Funnel"]}),(0,W.jsxs)("span",{className:"rwpfnl-dbdp-legend-item",children:[(0,W.jsx)("span",{className:"rwpfnl-dbdp-legend-dot",style:{background:"#F97316"}}),"Store"]})]})]}),(0,W.jsx)("div",{className:"rwpfnl-dbdp-summary",children:l.map(e=>(0,W.jsxs)("div",{className:"rwpfnl-dbdp-summary-card",children:[(0,W.jsx)("div",{className:"rwpfnl-dbdp-summary-icon",children:(0,W.jsx)(ct,{color:e.color})}),(0,W.jsxs)("div",{className:"rwpfnl-dbdp-summary-info",children:[(0,W.jsx)("span",{className:"rwpfnl-dbdp-summary-label",children:e.label}),(0,W.jsx)("span",{className:"rwpfnl-dbdp-summary-value",children:e.value})]})]},e.label))}),(0,W.jsx)("div",{className:"rwpfnl-dbdp-chart",children:(0,W.jsx)("canvas",{ref:o})})]})]})},ol=()=>d.startOfWeek,cl=e=>{const t=new Date(e);return t.setHours(0,0,0,0),t},ul=(e,t)=>{const n=cl(e);return n.setDate(n.getDate()+t),n},dl=(e,t)=>!!e&&!!t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),pl=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ol();const n=cl(e);return ul(n,-(n.getDay()-t+7)%7)},fl=(e,t)=>Math.round((cl(t)-cl(e))/864e5)+1,hl=(e,t)=>{const n=fl(e,t);return n<=31?"day":n<=180?"week":"month"},ml=e=>String(e).padStart(2,"0"),vl=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return`${e.getFullYear()}-${ml(e.getMonth()+1)}-${ml(e.getDate())}T`+(t?"23:59:59":"00:00:00")},gl=e=>e?e.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"",wl=["January","February","March","April","May","June","July","August","September","October","November","December"],xl=["S","M","T","W","T","F","S"],bl=e=>{let{from:t,to:n,preset:l,onApply:r,onCancel:a}=e;const s=(0,i.useMemo)(()=>(()=>{const e=cl(new Date),t=e.getFullYear(),n=e.getMonth(),l=pl(e),r=ul(l,-7);return[{value:"today",label:p("today","Today"),from:e,to:e},{value:"yesterday",label:p("yesterday","Yesterday"),from:ul(e,-1),to:ul(e,-1)},{value:"this_week",label:p("this_week","This Week"),from:l,to:e},{value:"last_week",label:p("last_week","Last Week"),from:r,to:ul(r,6)},{value:"this_month",label:p("this_month","This Month"),from:new Date(t,n,1),to:e},{value:"last_month",label:p("last_month","Last Month"),from:new Date(t,n-1,1),to:new Date(t,n,0)}]})(),[]),o=(0,i.useMemo)(()=>cl(new Date),[]),[c,u]=(0,i.useState)(l),[d,f]=(0,i.useState)(t?cl(t):null),[h,m]=(0,i.useState)(n?cl(n):null),v=t?new Date(t):new Date,[g,w]=(0,i.useState)(v.getFullYear()),[x,b]=(0,i.useState)(v.getMonth()),y=(0,i.useMemo)(()=>{const e=ol();return xl.slice(e).concat(xl.slice(0,e))},[]),j=[0,1].map(e=>((e,t)=>{const n=new Date(e,t,1),l=pl(n),r=new Date(e,t+1,0).getDate(),a=Math.round((n-l)/864e5),s=7*Math.ceil((a+r)/7),i=[];for(let e=0;e<s;e++){const t=ul(l,e),r=t.getMonth()!==n.getMonth();i.push({key:`${t.getFullYear()}-${t.getMonth()}-${t.getDate()}`,date:t,isOutside:r,isDisabled:r||t>o,isStart:!r&&dl(t,d),isEnd:!r&&dl(t,h),isInRange:!r&&!!d&&!!h&&t>d&&t<h})}return{year:e,month:n.getMonth(),title:`${wl[n.getMonth()]} ${n.getFullYear()}`,cells:i}})(g,x+e)),k=new Date(g,x+1,1)<new Date(o.getFullYear(),o.getMonth(),1),C=e=>{const t=new Date(g,x+e,1);w(t.getFullYear()),b(t.getMonth())};return(0,W.jsxs)("div",{className:"rwpfnl-date-range-panel",children:[(0,W.jsx)("ul",{className:"rwpfnl-date-range-presets",children:s.map(e=>(0,W.jsx)("li",{className:"rwpfnl-date-range-preset"+(e.value===c?" active":""),onClick:()=>(e=>{u(e.value),f(e.from),m(e.to),w(e.from.getFullYear()),b(e.from.getMonth())})(e),children:e.label},e.value))}),(0,W.jsx)("div",{className:"rwpfnl-date-range-calendars",children:j.map(e=>(0,W.jsxs)("div",{className:"rwpfnl-date-range-calendar",children:[(0,W.jsxs)("div",{className:"rwpfnl-date-range-calendar-header",children:[(0,W.jsx)("button",{type:"button",className:"rwpfnl-date-range-nav","aria-label":p("previous_month","Previous month"),onClick:()=>C(-1),children:(0,W.jsx)(it,{})}),(0,W.jsx)("span",{className:"rwpfnl-date-range-calendar-title",children:e.title}),(0,W.jsx)("button",{type:"button",className:"rwpfnl-date-range-nav","aria-label":p("next_month","Next month"),disabled:!k,onClick:()=>C(1),children:(0,W.jsx)(ot,{})})]}),(0,W.jsx)("div",{className:"rwpfnl-date-range-weekdays",children:y.map((e,t)=>(0,W.jsx)("span",{children:e},t))}),(0,W.jsx)("div",{className:"rwpfnl-date-range-days",children:e.cells.map(e=>(0,W.jsx)("button",{type:"button",className:["rwpfnl-date-range-day",e.isOutside?"is-outside":"",e.isDisabled?"is-disabled":"",e.isStart?"is-start":"",e.isEnd?"is-end":"",e.isInRange?"is-in-range":""].filter(Boolean).join(" "),disabled:e.isDisabled,onClick:()=>{return t=e.date,!d||h?(f(t),m(null)):t<d?(m(d),f(t)):m(t),void u("custom");var t},children:e.date.getDate()},e.key))})]},`${e.year}-${e.month}`))}),(0,W.jsxs)("div",{className:"rwpfnl-date-range-footer",children:[(0,W.jsx)("button",{type:"button",className:"rwpfnl-date-range-cancel",onClick:a,children:p("cancel","Cancel")}),(0,W.jsx)("button",{type:"button",className:"rwpfnl-date-range-apply",disabled:!d||!h,onClick:()=>{d&&h&&r({from:d,to:h,preset:c})},children:p("apply","Apply")})]})]})},yl=e=>{let{onFilter:t}=e;const[n,l]=(0,i.useState)(()=>(()=>{const e=cl(new Date);return{from:ul(e,-7),to:e,preset:"custom"}})()),[r,a]=(0,i.useState)(!1),s=(0,i.useRef)(null),o=(0,i.useRef)(t);o.current=t;const c=(0,i.useCallback)(e=>{let{from:t,to:n,preset:l}=e;const r=((e,t)=>{const n=fl(e,t),l=ul(e,-1);return{from:ul(l,-(n-1)),to:l}})(t,n);o.current({period:l,interval:hl(t,n),primaryAfter:vl(t),primaryBefore:vl(n,!0),secondaryAfter:vl(r.from),secondaryBefore:vl(r.to,!0)})},[]);return(0,i.useEffect)(()=>{c(n)},[]),(0,i.useEffect)(()=>{const e=e=>{s.current&&!s.current.contains(e.target)&&a(!1)};return document.addEventListener("click",e),()=>document.removeEventListener("click",e)},[]),(0,W.jsxs)("div",{className:"rwpfnl-dashboard-filter-wrapper",ref:s,children:[(0,W.jsxs)("button",{type:"button",className:"rwpfnl-date-range-trigger"+(r?" is-open":""),onClick:()=>a(e=>!e),children:[(0,W.jsx)("span",{children:(u=n.from,d=n.to,`${gl(u)} - ${gl(d)}`)}),(0,W.jsx)(lt,{})]}),r&&(0,W.jsx)(bl,{from:n.from,to:n.to,preset:n.preset,onApply:e=>{l(e),a(!1),c(e)},onCancel:()=>a(!1)})]});var u,d},jl=e=>{let{loader:t=!1,totalRevenue:l="$0",breakdown:r=[]}=e;const a=(0,i.useRef)(null),s=(0,i.useRef)(null),o=(0,i.useRef)(r);return o.current=r,(0,i.useEffect)(()=>{if(t)return;let e=!1;return(async()=>{const{Chart:t,registerables:l}=await n.e("vendors-node_modules_chart_js_dist_chart_mjs").then(n.bind(n,33050));if(t.register(...l),e||!a.current)return;const r=o.current;s.current=new t(a.current.getContext("2d"),{type:"doughnut",data:{datasets:[{data:r.map(e=>e.pct),backgroundColor:r.map(e=>e.color),borderWidth:0,hoverOffset:0,hoverBackgroundColor:r.map(e=>e.color)}]},options:{responsive:!0,maintainAspectRatio:!1,cutout:"72%",plugins:{legend:{display:!1},tooltip:{enabled:!1}}}})})(),()=>{e=!0,s.current&&(s.current.destroy(),s.current=null)}},[t]),(0,i.useEffect)(()=>{const e=s.current;if(t||!e)return;const n=e.data.datasets[0];n.data=r.map(e=>e.pct),n.backgroundColor=r.map(e=>e.color),n.hoverBackgroundColor=r.map(e=>e.color),e.update()},[t,r]),(0,W.jsxs)("div",{className:"rwpfnl-funnel-contribution",children:[t&&(0,W.jsx)(el,{type:"table-three"}),!t&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)("h3",{className:"rwpfnl-fc-title",children:"Funnel contribution"}),(0,W.jsx)("div",{className:"rwpfnl-fc-donut-wrapper",children:(0,W.jsxs)("div",{className:"rwpfnl-fc-donut",children:[(0,W.jsx)("canvas",{ref:a}),(0,W.jsxs)("div",{className:"rwpfnl-fc-donut-center",children:[(0,W.jsx)("span",{className:"rwpfnl-fc-total-value",children:l}),(0,W.jsx)("span",{className:"rwpfnl-fc-total-label",children:"Total Revenue"})]})]})}),(0,W.jsx)("div",{className:"rwpfnl-fc-breakdown",children:r.map(e=>(0,W.jsxs)("div",{className:"rwpfnl-fc-breakdown-item",children:[(0,W.jsxs)("div",{className:"rwpfnl-fc-breakdown-top",children:[(0,W.jsx)("span",{className:"rwpfnl-fc-breakdown-value",children:e.value}),(0,W.jsxs)("span",{className:"rwpfnl-fc-breakdown-pct",children:[e.pct,"%"]})]}),(0,W.jsx)("div",{className:"rwpfnl-fc-breakdown-label",children:e.label}),(0,W.jsx)("div",{className:"rwpfnl-fc-breakdown-bar-track",children:(0,W.jsx)("div",{className:"rwpfnl-fc-breakdown-bar-fill",style:{width:`${e.pct}%`,backgroundColor:e.color}})})]},e.label))})]})]})},kl=e=>{let{label:t="",value:n=0,color:l="#6E42D3"}=e;return(0,W.jsxs)("div",{className:"rwpfnl-health-metric-bar",children:[(0,W.jsxs)("div",{className:"rwpfnl-hmb-top",children:[(0,W.jsx)("span",{className:"rwpfnl-hmb-label",children:t}),(0,W.jsxs)("span",{className:"rwpfnl-hmb-value",children:[n,"%"]})]}),(0,W.jsx)("div",{className:"rwpfnl-hmb-track",children:(0,W.jsx)("div",{className:"rwpfnl-hmb-fill",style:{width:`${Math.min(n,100)}%`,backgroundColor:l}})})]})},Cl=e=>{let{message:t}=e;return(0,W.jsxs)("a",{href:d.proUpgradeUrl,target:"_blank",rel:"noopener noreferrer",className:"rwpfnl-pro-banner",children:[(0,W.jsxs)("span",{className:"rwpfnl-pro-banner-left",children:[(0,W.jsx)(at,{}),t]}),(0,W.jsx)("span",{className:"rwpfnl-pro-banner-btn",children:"Upgrade to Pro"})]})},_l=[{label:"Order bump acceptance rate",value:42,color:"#6E42D3"},{label:"Upsell acceptance rate",value:28,color:"#2FCF5C"},{label:"Downsell recovery rate",value:15,color:"#FF8C42"},{label:"Checkout completion rate",value:67,color:"#3B9EFF"}],Nl=e=>{let{loader:t=!1,metrics:n=[],isPro:l=!1}=e;const r=l?n:_l;return(0,W.jsxs)("div",{className:"rwpfnl-funnel-health-metrics",children:[t&&(0,W.jsx)(el,{type:"table-three"}),!t&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)("h3",{className:"rwpfnl-fhm-title",children:"Funnel Health Metrics"}),(0,W.jsxs)("div",{className:"rwpfnl-pro-section-wrapper"+(l?"":" is-locked"),children:[!l&&(0,W.jsx)(Cl,{message:"Upgrade to Pro to unlock Funnel Health Metrics"}),(0,W.jsx)("div",{className:"rwpfnl-pro-content rwpfnl-fhm-grid",children:r.map(e=>(0,W.jsx)(kl,{...e},e.label))})]})]})]})};function Sl(e){const t=document.createElement("textarea");return t.innerHTML=e,t.value}function Ll(e,t){return Sl(t.price_format.replace("%1$s",t.currency_symbol).replace("%2$s",e))}function Ml(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={...e,currency_symbol:Sl(e.currency_symbol)};return e=>Ll(Number(e||0).toLocaleString(void 0,t),n)}n(89431);const zl=e=>e>0?"rwpfnl-increase":e<0?"rwpfnl-decrease":"",El=e=>{let{label:t,value:n,secondaryValue:l,type:r,loader:a,cardFor:s}=e;const i="total_upsell_revenue"===s&&!d.isProActivated,o=function(e,t){return Number.isFinite(e)&&Number.isFinite(t)?0===t?0:Math.round((e-t)/t*100):null}(n,l),c=i?Ll(1240,d.priceConfig):null==n?"N/A":"Number"===r?n:Ll(n,d.priceConfig);return(0,W.jsxs)("div",{className:"rwpfnl-single-card"+(i?" is-pro-locked":""),children:[a&&(0,W.jsx)(el,{type:"table-three"}),!a&&(0,W.jsxs)(W.Fragment,{children:[i&&(0,W.jsx)("a",{href:d.proUpgradeUrl,target:"_blank",rel:"noopener noreferrer",className:"rwpfnl-card-pro-badge",children:(0,W.jsx)(nt,{})}),(0,W.jsx)("div",{className:"rwpfnl-card-header",children:(0,W.jsx)("p",{className:"rwpfnl-card-label",children:t})}),(0,W.jsxs)("div",{className:"rwpfnl-card-body",children:[(0,W.jsx)("p",{className:"rwpfnl-card-value",children:c}),(0,W.jsxs)("p",{className:`rwpfnl-percentage ${zl(o)}`,title:`Previous period: ${Ll(l,d.priceConfig)}`,children:[(0,W.jsxs)("span",{children:[o>0&&(0,W.jsx)(et,{}),o<0&&(0,W.jsx)(tt,{})]}),(0,W.jsx)("span",{children:null===o?"N/A":`${Math.abs(o)}%`})]})]})]})]})},Al=[{key:"total_customers",titleKey:"total_customers",fallback:"Total Customers",type:"Number"},{key:"total_orders",titleKey:"total_orders",fallback:"Total Orders",type:"Number"},{key:"total_sales",titleKey:"total_revenue",fallback:"Total Revenue",type:"Currency"},{key:"total_ob_revenue",titleKey:"order_bump_revenue",fallback:"Order Bump Revenue",type:"Currency"},{key:"total_upsell_revenue",titleKey:"upsell_downsell_evenue",fallback:"Upsell/Downsell Revenue",type:"Currency"}],Pl=e=>{let{primaryData:t,secondaryData:n,loader:l}=e;return(0,W.jsx)(W.Fragment,{children:Al.map(e=>(0,W.jsx)(El,{label:p(e.titleKey,e.fallback),value:t[e.key],secondaryValue:n[e.key],type:e.type,loader:l,cardFor:e.key},e.key))})},Fl=()=>(0,W.jsx)("span",{className:"rwpfnl-no-funnel-icon",dangerouslySetInnerHTML:{__html:'<svg fill="none" width="147" height="110" viewBox="0 0 147 110" xmlns="http://www.w3.org/2000/svg"><path fill="#fff" fill-rule="evenodd" d="M106.756 109.151l-.76-66.847s-3.788 2.79-6.206 4.576a5.86 5.86 0 00-2.329 3.904c-.495 3.45-1.357 9.797-1.642 14.054-.686 10.088 1.473 38.311 1.92 43.98.015.116.035.231.076.333h8.941z" clip-rule="evenodd"/><path fill="#42445D" fill-rule="evenodd" stroke="#42445D" stroke-width=".4" d="M97.937 108.982h8.647l-.755-66.346c-.901.664-3.906 2.878-5.94 4.38a5.722 5.722 0 00-2.261 3.792c-.49 3.413-1.356 9.774-1.642 14.041-.684 10.051 1.48 38.38 1.921 43.957.006.05.015.113.03.176zm8.817.338h-8.94a.168.168 0 01-.157-.106 1.478 1.478 0 01-.086-.375c-.442-5.588-2.607-33.938-1.922-44.013.286-4.278 1.153-10.649 1.644-14.065a6.063 6.063 0 012.396-4.016c2.416-1.786 6.205-4.576 6.205-4.576a.168.168 0 01.269.134l.76 66.846a.164.164 0 01-.048.121.17.17 0 01-.121.05z" clip-rule="evenodd"/><path fill="#6E42D3" fill-rule="evenodd" d="M101.43 109.151h35.523c-2.407-15.414-10.539-62.656-20.437-67.305l-5.72 1.581s-5.12 1.193-7.267 4.909c-1.916 3.312-3.886 7.873-4.05 15.086-.135 5.89 1.384 35.135 1.951 45.729z" clip-rule="evenodd"/><path fill="#fff" fill-rule="evenodd" d="M82.55 47.185a2.65 2.65 0 00-2.655-2.648H21.97a2.648 2.648 0 00-2.648 2.648v35.174a2.654 2.654 0 002.648 2.653h57.924a2.655 2.655 0 002.654-2.653V47.185z" clip-rule="evenodd"/><path fill="#42445D" fill-rule="evenodd" stroke="#42445D" stroke-width=".5" d="M21.97 44.706a2.481 2.481 0 00-2.479 2.479v35.174a2.485 2.485 0 002.479 2.485h57.924a2.489 2.489 0 002.486-2.485V47.185a2.485 2.485 0 00-2.486-2.479H21.97zm57.924 40.475H21.97a2.822 2.822 0 01-2.816-2.822V47.185a2.82 2.82 0 012.816-2.816h57.924a2.823 2.823 0 012.823 2.816v35.174a2.826 2.826 0 01-2.823 2.822zM65.405 33.33a.169.169 0 01-.142-.078l-4.502-7.086a.169.169 0 11.285-.18l4.502 7.085a.169.169 0 01-.143.26zm47.237-5.822a.17.17 0 01-.15-.247l2.039-3.923a.17.17 0 01.3.156l-2.039 3.923a.169.169 0 01-.15.091z" clip-rule="evenodd"/><path fill="#42445D" fill-rule="evenodd" d="M74.68 80.117c0-.68-.27-1.33-.748-1.809a2.562 2.562 0 00-1.81-.746H16.288a2.548 2.548 0 00-2.552 2.555v14.605a2.56 2.56 0 002.552 2.555h55.836a2.56 2.56 0 002.558-2.555V80.117z" clip-rule="evenodd"/><path fill="#6E42D3" fill-rule="evenodd" stroke="#6E42D3" stroke-width=".5" d="M34.837 28.346c-.659 0-1.195.536-1.195 1.195v6.309c0 .66.536 1.196 1.195 1.196h6.31c.659 0 1.195-.537 1.195-1.196v-6.309c0-.659-.536-1.195-1.196-1.195h-6.309zm6.31 9.037h-6.31a1.535 1.535 0 01-1.533-1.533v-6.309c0-.845.688-1.533 1.533-1.533h6.31c.845 0 1.533.688 1.533 1.533v6.309c0 .846-.688 1.533-1.534 1.533z" clip-rule="evenodd"/><path fill="#42445D" fill-rule="evenodd" stroke="#42445D" stroke-width=".5" d="M49.123 33.786a.607.607 0 00-.606.606v3.909c0 .334.272.606.606.606h3.908a.607.607 0 00.606-.606v-3.909a.607.607 0 00-.606-.606h-3.908zm3.908 5.459h-3.908a.945.945 0 01-.944-.944v-3.909c0-.52.423-.943.944-.943h3.908c.52 0 .944.423.944.943v3.909c0 .52-.424.944-.944.944z" clip-rule="evenodd"/><path fill="#42445D" fill-rule="evenodd" stroke="#42445D" stroke-width=".4" d="M86.727 90.343a.896.896 0 10.003 1.792.896.896 0 00-.003-1.792zm0 2.13a1.235 1.235 0 010-2.467 1.234 1.234 0 010 2.466z" clip-rule="evenodd"/><path fill="#42445D" fill-rule="evenodd" stroke="#42445D" stroke-width=".5" d="M126.393 31.056a.967.967 0 10.002 1.934.967.967 0 00-.002-1.934zm0 2.27a1.306 1.306 0 01-1.304-1.303 1.306 1.306 0 012.609 0c0 .719-.586 1.304-1.305 1.304zM50.56 64.803H24.017a.169.169 0 110-.338H50.56a.17.17 0 010 .338z" clip-rule="evenodd"/><path fill="#42445D" fill-rule="evenodd" d="M64.636 71.162H24.02a.282.282 0 110-.564h40.616a.283.283 0 010 .564z" clip-rule="evenodd"/><path fill="#fff" fill-rule="evenodd" stroke="#fff" stroke-width=".5" d="M42.237 92.767H19.01a.169.169 0 110-.338h23.227a.169.169 0 110 .338zm-10.486-4.525H19.012a.17.17 0 010-.338h12.74a.169.169 0 110 .338zm37.952 3.917a.168.168 0 01-.12-.05l-3.875-3.875a.17.17 0 01.239-.239l3.875 3.875a.169.169 0 01-.12.289z" clip-rule="evenodd"/><path fill="#fff" fill-rule="evenodd" stroke="#fff" stroke-width=".5" d="M65.823 92.158a.169.169 0 01-.12-.288l3.877-3.875a.169.169 0 01.239.239l-3.876 3.875a.166.166 0 01-.12.05z" clip-rule="evenodd"/><path fill="#6E42D3" fill-rule="evenodd" stroke="#6E42D3" stroke-width=".5" d="M109.525 13.153l-.326-.088.562-2.1a1.204 1.204 0 011.164-.893h.021a2.971 2.971 0 002.874-2.193 2.946 2.946 0 00-.298-2.25 2.943 2.943 0 00-1.797-1.378 2.961 2.961 0 00-3.619 2.097.17.17 0 01-.327-.087 3.3 3.3 0 014.034-2.337 3.28 3.28 0 012.002 1.536 3.28 3.28 0 01.331 2.507 3.304 3.304 0 01-3.192 2.443h-.027a.866.866 0 00-.839.643l-.563 2.1zM95.753 7.799l-.35-1.309a1.219 1.219 0 01.5-1.323 2.08 2.08 0 00.868-2.278 2.077 2.077 0 00-.977-1.27 2.078 2.078 0 00-1.585-.21 2.07 2.07 0 00-1.266.973 2.08 2.08 0 00-.206 1.588.17.17 0 01-.326.087 2.416 2.416 0 01.24-1.844 2.402 2.402 0 011.47-1.13 2.414 2.414 0 011.842.243 2.41 2.41 0 011.134 1.476 2.42 2.42 0 01-1.006 2.646.891.891 0 00-.362.955l.35 1.309-.326.087z" clip-rule="evenodd"/><path fill="#6E42D3" fill-rule="evenodd" d="M108.938 14.626a.8.8 0 11-.414 1.546.8.8 0 01.414-1.546zM96.203 8.857a.578.578 0 11.3 1.117.578.578 0 01-.3-1.117z" clip-rule="evenodd"/><path fill="#fff" fill-rule="evenodd" stroke="#000" stroke-width=".3" d="M16.671 59.331c.939 1.701-.648 4.425-3.564 6.109-2.918 1.685-6.07 1.696-7.075.034l-.012-.02-.01-.019c-.937-1.702.647-4.427 3.565-6.112 2.916-1.684 6.07-1.694 7.074-.03l.002-.002c.004.008.008.013.01.019l.012.02-.002.001z" clip-rule="evenodd"/><path fill="#6E42D3" fill-rule="evenodd" stroke="#6E42D3" stroke-width=".5" d="M13.858 58.221c-1.255 0-2.759.418-4.198 1.249-2.82 1.628-4.391 4.268-3.502 5.884l.02.036c.953 1.574 4.024 1.532 6.845-.096 2.82-1.629 4.391-4.267 3.5-5.881a.141.141 0 01-.008-.017.172.172 0 01-.01-.016c-.467-.774-1.442-1.159-2.647-1.159zm-5.031 8.66c-1.38 0-2.424-.468-2.94-1.32l-.023-.042c-.485-.88-.364-2.027.337-3.231.686-1.177 1.855-2.282 3.29-3.11 1.435-.83 2.975-1.288 4.338-1.294h.024c1.369 0 2.406.46 2.925 1.297a.161.161 0 01.02.025l.022.04c.006.01.01.02.014.03.467.874.342 2.009-.353 3.201-.686 1.177-1.855 2.281-3.29 3.11-1.435.828-2.976 1.288-4.338 1.294h-.026zM29.35 50.118c-2.076 0-3.733.75-4.104 2.03l-.01.04c-.44 1.786 1.76 3.928 4.906 4.771 3.147.843 6.123.088 6.634-1.683a.21.21 0 01.007-.018l.003-.018c.443-1.791-1.757-3.934-4.903-4.777a9.85 9.85 0 00-2.532-.345zm3.327 7.526a10.2 10.2 0 01-2.622-.358c-1.601-.43-3.016-1.194-3.983-2.153-.99-.98-1.403-2.057-1.164-3.03l.013-.047c.28-.965 1.176-1.69 2.524-2.046 1.317-.347 2.924-.302 4.525.127 1.6.428 3.015 1.193 3.982 2.153.98.972 1.394 2.037 1.169 3.002 0 .01-.002.021-.005.032l-.012.043a.175.175 0 01-.012.032c-.287.948-1.178 1.662-2.513 2.014a7.501 7.501 0 01-1.902.23z" clip-rule="evenodd"/><path fill="#000045" fill-rule="evenodd" stroke="#000" stroke-width=".5" d="M11.301 59.09a3.28 3.28 0 00-2.831 4.915 3.254 3.254 0 001.99 1.527c.844.226 1.727.11 2.485-.328a3.28 3.28 0 001.199-4.474 3.254 3.254 0 00-1.99-1.526 3.295 3.295 0 00-.853-.114zm.012 6.893a3.61 3.61 0 01-.941-.125 3.59 3.59 0 01-2.195-1.683A3.618 3.618 0 019.5 59.238a3.59 3.59 0 012.742-.36 3.59 3.59 0 012.194 1.683 3.618 3.618 0 01-3.123 5.422z" clip-rule="evenodd"/><path fill="#6E42D3" fill-rule="evenodd" stroke="#6E42D3" stroke-width=".5" d="M30.991 50.651a3.09 3.09 0 00-1.548.418 3.086 3.086 0 00-1.448 1.887 3.086 3.086 0 00.31 2.357 3.087 3.087 0 001.887 1.448 3.11 3.11 0 003.805-2.197 3.087 3.087 0 00-.31-2.358 3.086 3.086 0 00-1.886-1.447 3.128 3.128 0 00-.81-.108zm.005 6.554c-.295 0-.594-.038-.891-.118a3.422 3.422 0 01-2.092-1.605 3.423 3.423 0 01-.344-2.614 3.422 3.422 0 011.605-2.092 3.421 3.421 0 012.614-.344 3.422 3.422 0 012.092 1.605c.46.797.582 1.726.344 2.614a3.451 3.451 0 01-3.328 2.554zm-22.224.713a.169.169 0 01-.147-.085L6.02 53.32a.169.169 0 01.293-.17l2.606 4.514a.169.169 0 01-.146.254zm3.597-2.212a.169.169 0 01-.166-.2l.803-4.194a.169.169 0 11.331.064l-.803 4.193a.17.17 0 01-.165.137zm-7.167 4.467a.168.168 0 01-.056-.01l-4.032-1.401a.169.169 0 11.11-.32l4.033 1.402a.17.17 0 01-.055.329z" clip-rule="evenodd"/><path fill="#fff" fill-rule="evenodd" d="M73.321 39.23c2.873 0 5.2 2.334 5.2 5.207a5.2 5.2 0 01-5.2 5.201 5.206 5.206 0 01-5.207-5.2 5.211 5.211 0 015.207-5.208zm-.707 12.655a7.482 7.482 0 01.707-14.933 7.49 7.49 0 017.486 7.485c0 3.43-2.316 6.321-5.465 7.204l1.49 13.306a.74.74 0 01-.65.82c-.39.044-.858.094-1.246.137a.74.74 0 01-.82-.65l-1.502-13.369z" clip-rule="evenodd"/><path fill="#6E42D3" fill-rule="evenodd" stroke="#6E42D3" stroke-width=".3" d="M73.322 39.399a5.044 5.044 0 00-5.038 5.038 5.04 5.04 0 005.038 5.032 5.038 5.038 0 005.032-5.032 5.04 5.04 0 00-5.032-5.038zm0 10.408a5.379 5.379 0 01-5.376-5.37 5.382 5.382 0 015.376-5.376 5.38 5.38 0 015.37 5.376 5.376 5.376 0 01-5.37 5.37zm0-12.686c-4.034 0-7.316 3.282-7.316 7.316 0 1.833.682 3.587 1.92 4.938a7.278 7.278 0 004.705 2.342c.08.007.143.07.152.15l1.502 13.368a.556.556 0 00.211.38c.12.095.27.138.423.121a163.248 163.248 0 011.245-.137.576.576 0 00.502-.634l-1.49-13.305a.17.17 0 01.122-.182 7.338 7.338 0 005.34-7.04c0-4.035-3.281-7.317-7.316-7.317zm1.533 28.957a.915.915 0 01-.569-.197.892.892 0 01-.337-.61L72.463 52.04a7.616 7.616 0 01-4.786-2.435 7.63 7.63 0 01-2.009-5.167c0-4.22 3.434-7.654 7.654-7.654 4.221 0 7.655 3.434 7.655 7.654a7.678 7.678 0 01-5.45 7.326l1.475 13.165a.917.917 0 01-.192.67.896.896 0 01-.61.337l-.62.068c-.214.024-.43.047-.624.07a.986.986 0 01-.101.005z" clip-rule="evenodd"/><path fill="#fff" fill-rule="evenodd" d="M72.544 53.88s-.803.214-.99.766c-.18.546.163 1.708.163 1.708s-.827.946.044 2.303c0 0-.485 1.24.22 2.311 0 0-.352.593.208 1.314.559.72 2.55.963 3.002.235.228-.38-.003-1.15-.003-1.15s.492-.978.162-1.732c0 0 .454-1.502-.432-2.229 0 0 .291-1.09-.17-1.788l-1.016-1.286-1.188-.453z" clip-rule="evenodd"/><path fill="#42445D" fill-rule="evenodd" stroke="#42445D" stroke-width=".4" d="M72.539 54.058c-.166.054-.693.255-.824.642-.134.405.074 1.297.165 1.606a.168.168 0 01-.035.159c-.03.034-.73.874.058 2.1.03.046.035.103.016.154-.005.01-.443 1.175.204 2.157a.169.169 0 01.004.178c-.011.02-.282.51.195 1.124.29.373 1.116.645 1.844.607.434-.023.756-.153.882-.357.154-.256.037-.818-.021-1.013a.17.17 0 01.011-.124c.005-.009.452-.917.158-1.588a.173.173 0 01-.007-.117c.004-.014.41-1.403-.378-2.049a.17.17 0 01-.056-.174c.002-.01.264-1.02-.145-1.646l-.982-1.244-1.09-.415zm1.496 9.068c-.706 0-1.596-.247-1.98-.74-.491-.634-.353-1.187-.265-1.406-.58-.96-.311-2.003-.215-2.302-.437-.72-.42-1.331-.326-1.721.075-.309.207-.53.284-.638-.077-.285-.306-1.22-.138-1.726.213-.631 1.07-.867 1.106-.877a.17.17 0 01.104.006l1.187.452a.17.17 0 01.073.054l1.015 1.286.008.011c.417.63.28 1.519.218 1.821.77.727.5 1.986.423 2.278.27.703-.058 1.528-.161 1.758.056.212.194.845-.031 1.222-.19.306-.599.489-1.153.518a2.798 2.798 0 01-.149.004z" clip-rule="evenodd"/><path fill="#42445D" fill-rule="evenodd" d="M74.887 57.626a.26.26 0 01-.083-.013l-3.143-1.045a.262.262 0 11.165-.497l3.144 1.046a.262.262 0 01-.083.51zm.331 2.294a.252.252 0 01-.074-.011l-3.348-1.022a.253.253 0 01.147-.484l3.348 1.022a.252.252 0 01-.073.495z" clip-rule="evenodd"/><path fill="#42445D" fill-rule="evenodd" stroke="#42445D" stroke-width=".2" d="M75.125 61.55c-.009 0-.018 0-.027-.002l-3.087-.497a.169.169 0 11.054-.334l3.087.497a.17.17 0 01-.027.336z" clip-rule="evenodd"/><path fill="#fff" fill-rule="evenodd" d="M81.066 59.721s-2.372-3.298-3.104-4.55c-.733-1.252-3.449-2.21-4.431-2.635-.983-.426-1.384 2.06 1.508 2.566l.939 2.072.794 6.903.97.488 3.324-4.844z" clip-rule="evenodd"/><path fill="#42445D" fill-rule="evenodd" stroke="#42445D" stroke-width=".4" d="M77.74 64.734a.164.164 0 01-.075-.018l-.97-.488a.17.17 0 01.15-.302l.84.422 3.172-4.625c-.402-.562-2.377-3.328-3.044-4.467-.602-1.03-2.718-1.894-3.854-2.358a27.626 27.626 0 01-.498-.207c-.128-.055-.237-.045-.325.032-.133.115-.228.408-.125.778.095.34.484 1.16 2.055 1.435a.17.17 0 01.124.096l.938 2.072a.169.169 0 11-.307.14l-.903-1.992c-1.686-.325-2.122-1.266-2.232-1.66-.126-.452-.037-.893.228-1.124.186-.162.434-.194.681-.087.135.058.302.127.492.204 1.256.513 3.357 1.372 4.018 2.5.72 1.231 3.071 4.505 3.096 4.538a.17.17 0 01.002.194l-3.324 4.844a.168.168 0 01-.14.073z" clip-rule="evenodd"/><path fill="#42445D" fill-rule="evenodd" stroke="#42445D" stroke-width=".4" d="M78.466 59.834a.165.165 0 01-.074-.018c-1.667-.823-2.437-2.365-2.468-2.43a.169.169 0 01.302-.149c.008.015.755 1.505 2.315 2.276a.17.17 0 01-.075.32z" clip-rule="evenodd"/><path fill="#6E42D3" fill-rule="evenodd" d="M90.152 64.578s-4.506-4.181-6.478-4.2c0 0-1.489-.745-2.272-1.139a.689.689 0 00-.82.157c-.757.85-2.534 2.979-3.38 5.144a.673.673 0 00.038.57c.257.469.832 1.44 1.503 2.259 0 0-.576 1.69 3.63 5.52 4.206 3.83 9.67 8.374 14.563 9.533L94.57 66.787l-4.418-2.209z" clip-rule="evenodd"/><path fill="#331D67" stroke="#331D67" stroke-width=".5" d="M83.291 61.354s0 0 0 0h0z"/><path fill="#fff" fill-rule="evenodd" d="M81.404 34.07s1.572 3.843 2.905 5.355c0 0-.045 4.29 2.38 2.64 0 0 4.13 5.517 9.018.784l5.077 7.113 8.811-8.078-5.839-7.033-8.69-8.085-10.349.33-3.313 6.975z" clip-rule="evenodd"/><path fill="#42445D" fill-rule="evenodd" stroke="#42445D" stroke-width=".5" d="M95.705 42.68l.015.001c.05.005.094.03.122.07l4.967 6.957 8.55-7.84-5.728-6.9-8.632-8.03-10.176.325-3.237 6.813c.219.522 1.645 3.874 2.847 5.238a.165.165 0 01.042.113c-.006.635.14 2.368.878 2.763.315.17.732.08 1.24-.264a.169.169 0 01.23.038c.017.025 1.839 2.416 4.42 2.62 1.488.118 2.95-.507 4.344-1.856a.168.168 0 01.118-.048zm5.076 7.45h-.017a.17.17 0 01-.12-.07l-4.964-6.954c-1.425 1.327-2.926 1.938-4.465 1.815-2.416-.193-4.142-2.113-4.565-2.63-.564.348-1.053.414-1.458.197-.984-.527-1.051-2.596-1.055-3-1.326-1.545-2.828-5.197-2.892-5.353a.169.169 0 01.004-.136l3.313-6.974a.169.169 0 01.147-.097l10.35-.33a.17.17 0 01.12.045l8.69 8.085.015.015 5.839 7.033a.17.17 0 01-.016.233l-8.811 8.078a.17.17 0 01-.115.044z" clip-rule="evenodd"/><path fill="#42445D" fill-rule="evenodd" stroke="#42445D" stroke-width=".5" d="M93.86 33.424a.169.169 0 01-.157-.23c.748-1.913 1.842-3.023 1.889-3.07a.169.169 0 11.238.239c-.01.01-1.091 1.11-1.812 2.954a.169.169 0 01-.158.107z" clip-rule="evenodd"/><path fill="#42445D" fill-rule="evenodd" stroke="#42445D" stroke-width=".5" d="M96.048 32.487a.173.173 0 01-.042-.005c-.01-.002-.951-.239-1.586-.242a.168.168 0 01.001-.337h.001c.676.003 1.627.242 1.667.252a.17.17 0 01-.041.332z" clip-rule="evenodd"/><path fill="#42445D" fill-rule="evenodd" d="M85.871 36.18a.774.774 0 11.659 1.4.774.774 0 01-.659-1.4z" clip-rule="evenodd"/><path fill="#42445D" fill-rule="evenodd" d="M91.97 30.306s3.234 11.532 2.863 11.954c-.393.443-4.718-11.398-4.718-11.398-.469.204-.97.39-1.545.55l-2.458-3.883 1.08 4.445s-3.055 1.863-6.58 3.18c0 0-5.758-9.269 1.974-15.913 7.732-6.645 23.695-7.171 24.053 13.644l-4.27 3.73s-3.386.157-6.263-2.195c0 0 .81-.398 1.397-1.356.427-.695.507-1.927-.357-3.117-2.052-2.84-5.176.359-5.176.359z" clip-rule="evenodd"/><path fill="#42445D" fill-rule="evenodd" stroke="#42445D" stroke-width=".5" d="M84.302 35.786l-.016-.001a.169.169 0 01-.152-.184c.054-.548.566-1.211 1.218-1.578a2.375 2.375 0 012.254-.065.169.169 0 11-.147.304 2.021 2.021 0 00-1.942.056c-.631.355-1.01.942-1.047 1.315a.168.168 0 01-.168.153z" clip-rule="evenodd"/><path fill="#42445D" fill-rule="evenodd" d="M95.088 35.27a.17.17 0 01-.05-.33c1.792-.557 2.398-1.613 2.404-1.623a.169.169 0 01.296.163c-.027.048-.669 1.182-2.6 1.783a.17.17 0 01-.05.008z" clip-rule="evenodd"/><path fill="#fff" fill-rule="evenodd" d="M96.924 45.85l7.798-8.185 2.862 2.727-7.797 8.184-2.863-2.727z" clip-rule="evenodd"/><path fill="#42445D" fill-rule="evenodd" stroke="#42445D" stroke-width=".5" d="M97.164 45.844l2.618 2.494 7.564-7.94-2.618-2.494-7.564 7.94zm2.624 2.901a.17.17 0 01-.117-.046l-2.862-2.727a.17.17 0 01-.006-.239l7.798-8.184a.168.168 0 01.239-.006l2.862 2.727c.067.064.07.171.005.239l-7.796 8.184a.17.17 0 01-.12.052h-.003z" clip-rule="evenodd"/><path fill="#fff" fill-rule="evenodd" d="M98.515 44.161a2.647 2.647 0 00-3.74.093l-4.15 4.356a2.648 2.648 0 00.089 3.74l2.736 2.607a2.651 2.651 0 003.74-.093l4.15-4.356a2.65 2.65 0 00-.089-3.74l-2.736-2.607z" clip-rule="evenodd"/><path fill="#42445D" fill-rule="evenodd" stroke="#42445D" stroke-width=".5" d="M96.69 43.602a2.47 2.47 0 00-1.794.768l-4.152 4.357a2.48 2.48 0 00.083 3.5l2.737 2.608a2.479 2.479 0 003.5-.087l4.152-4.357a2.479 2.479 0 00-.084-3.5l-2.736-2.607a2.467 2.467 0 00-1.706-.682zm-1.42 12.252a2.8 2.8 0 01-1.939-.775l-2.736-2.607a2.817 2.817 0 01-.095-3.978l4.15-4.357a2.817 2.817 0 013.979-.098l2.736 2.607a2.817 2.817 0 01.095 3.978l-4.15 4.357a2.81 2.81 0 01-2.04.872z" clip-rule="evenodd"/><path fill="#fff" fill-rule="evenodd" d="M107.459 33.205a.978.978 0 00-1.382-.1l-3.524 3.055a.977.977 0 101.278 1.475l3.524-3.054a.977.977 0 00.104-1.376z" clip-rule="evenodd"/><path fill="#42445D" fill-rule="evenodd" d="M106.716 33.036a.806.806 0 00-.53.198l-3.525 3.054a.813.813 0 00-.081 1.144.807.807 0 001.138.076l3.525-3.055a.807.807 0 00.087-1.137.809.809 0 00-.614-.28zm-3.53 5.009c-.025 0-.051 0-.078-.003a1.13 1.13 0 01-.783-.388 1.15 1.15 0 01.115-1.621l3.525-3.055a1.15 1.15 0 011.62.116c.412.476.358 1.2-.121 1.614l-3.524 3.055a1.143 1.143 0 01-.754.282z" clip-rule="evenodd"/><path fill="#42445D" fill-rule="evenodd" stroke="#42445D" stroke-width=".5" d="M89.005 42.282a.17.17 0 01-.053-.33 5.39 5.39 0 012.066-.274.17.17 0 11-.023.337 5.06 5.06 0 00-1.937.258.17.17 0 01-.053.01z" clip-rule="evenodd"/><path fill="#42445D" fill-rule="evenodd" d="M103.566 37.69s-1.673 6.592 4.744 13.001l8.032-6.215-1.149-1.971 1.942 1.043 2.95-2.17s-4.018-7.954-12.802-6.96l-3.717 3.273z" clip-rule="evenodd"/><path fill="#fff" fill-rule="evenodd" d="M95.064 53.512s-.488-5.126-2.497-8.568c0 0-3.505-.613-7.755 1.29 0 0-1.702 2.772 1.278 4.656 0 0 .838 1.327 2.596 2.072l.495 2.015 3.386 2.403 2.497-3.868z" clip-rule="evenodd"/><path fill="#42445D" fill-rule="evenodd" stroke="#42445D" stroke-width=".5" d="M89.33 54.876l3.19 2.265 2.37-3.67c-.062-.57-.608-5.198-2.429-8.372-.53-.072-3.744-.414-7.53 1.267-.204.36-1.387 2.715 1.248 4.381a.178.178 0 01.052.053c.008.013.835 1.293 2.521 2.006a.17.17 0 01.098.116l.48 1.954zm3.236 2.673a.169.169 0 01-.098-.031l-3.385-2.403a.168.168 0 01-.067-.098l-.474-1.934c-1.603-.704-2.431-1.856-2.575-2.07-1.58-1.014-1.853-2.28-1.803-3.167.055-.96.486-1.671.504-1.7a.167.167 0 01.075-.066c4.248-1.902 7.817-1.308 7.852-1.302a.17.17 0 01.118.081c2.004 3.435 2.514 8.586 2.518 8.637a.167.167 0 01-.026.108l-2.497 3.868a.167.167 0 01-.142.077z" clip-rule="evenodd"/><path fill="#42445D" fill-rule="evenodd" stroke="#42445D" stroke-width=".5" d="M86.586 51.613a.17.17 0 01-.16-.111 10.479 10.479 0 01-.573-2.605.169.169 0 11.336-.03c.084.888.27 1.735.555 2.52a.17.17 0 01-.158.226z" clip-rule="evenodd"/><path fill="#6E42D3" fill-rule="evenodd" d="M100.479 60.973c.958 2.44 1.985 5.376 1.985 5.376l3.999-12.505s2.941-4.419 8.067-2.447c5.126 1.971 5.602 9.044 3.599 13.28-2.003 4.238-7.93 20.567-14.289 22.295-6.352 1.727-8.65-3.418-10.752-9.77 0 0-7.022-15.885-4.119-18.12 0 0-.444-1.883-.45-3.46a.861.861 0 01.588-.808c1.233-.413 4.206-1.402 5.758-1.802a.82.82 0 01.87.35c.495.745 1.415 2.178 1.778 3.023 0 0 .832 0 1.828 1.928.306.594.719 1.577 1.138 2.66z" clip-rule="evenodd"/><mask id="rwpfnl-a" fill="#fff"><path fill-rule="evenodd" d="M103.84 87.14a.17.17 0 01-.044-.332c2.272-.616 4.779-3.273 7.45-7.894 2.261-3.911 4.217-8.492 5.511-11.524.485-1.136.904-2.117 1.219-2.784 1.296-2.74 1.439-6.394.359-9.092-.767-1.912-2.103-3.281-3.865-3.96-2.069-.795-4.019-.64-5.795.464a7.495 7.495 0 00-2.059 1.901L102.624 66.4a.168.168 0 01-.32.005c-.009-.026-.929-2.653-1.826-4.977a.17.17 0 01.097-.218.168.168 0 01.218.096 189.05 189.05 0 011.662 4.514l3.847-12.027a.136.136 0 01.02-.042c.031-.047.772-1.145 2.163-2.013 1.288-.803 3.393-1.542 6.105-.498 1.853.712 3.257 2.147 4.058 4.149 1.114 2.78.967 6.541-.367 9.361-.312.661-.729 1.64-1.213 2.773-2.706 6.338-7.742 18.133-13.183 19.612a.158.158 0 01-.045.006z" clip-rule="evenodd"/></mask><path fill="#331D67" fill-rule="evenodd" d="M103.84 87.14a.17.17 0 01-.044-.332c2.272-.616 4.779-3.273 7.45-7.894 2.261-3.911 4.217-8.492 5.511-11.524.485-1.136.904-2.117 1.219-2.784 1.296-2.74 1.439-6.394.359-9.092-.767-1.912-2.103-3.281-3.865-3.96-2.069-.795-4.019-.64-5.795.464a7.495 7.495 0 00-2.059 1.901L102.624 66.4a.168.168 0 01-.32.005c-.009-.026-.929-2.653-1.826-4.977a.17.17 0 01.097-.218.168.168 0 01.218.096 189.05 189.05 0 011.662 4.514l3.847-12.027a.136.136 0 01.02-.042c.031-.047.772-1.145 2.163-2.013 1.288-.803 3.393-1.542 6.105-.498 1.853.712 3.257 2.147 4.058 4.149 1.114 2.78.967 6.541-.367 9.361-.312.661-.729 1.64-1.213 2.773-2.706 6.338-7.742 18.133-13.183 19.612a.158.158 0 01-.045.006z" clip-rule="evenodd"/><path fill="#331D67" d="M103.677 87.016l.483-.13v-.001l-.483.13zm.119-.208l-.131-.482.131.482zm7.45-7.894l-.433-.25.433.25zm5.511-11.524l.46.196-.46-.196zm1.219-2.784l-.452-.213.452.213zm.359-9.092l.464-.186-.464.186zm-3.865-3.96l.179-.466-.179.467zm-5.795.464l-.264-.425.264.425zm-2.059 1.901l-.41-.286-.043.062-.023.072.476.152zM102.624 66.4l-.476-.152-.001.002.477.15zm-.158.118v.5h.006l-.006-.5zm-.162-.113l-.475.158.004.01.471-.168zm-1.826-4.977l-.467.178.001.002.466-.18zm.097-.218l.179.466h.001l-.18-.467zm.218.096l-.467.178.001.002.466-.18zm1.662 4.514l-.471.167.496 1.398.451-1.413-.476-.152zm3.847-12.027l.476.152.004-.012-.48-.14zm.02-.042l.415.278.002-.003-.417-.276zm2.163-2.013l-.265-.424.265.424zm6.105-.498l-.179.466.179-.467zm4.058 4.149l-.464.185.464-.185zm-.367 9.361l.452.214-.452-.213zm-1.213 2.773l-.46-.196.46.196zm-13.183 19.612l-.131-.483-.01.003.141.48zm-.045-.494a.33.33 0 01.32.246l-.966.258c.08.3.351.496.646.496v-1zm.32.244a.331.331 0 01-.232.406l-.263-.965a.67.67 0 00-.47.82l.965-.261zm-.233.406c1.261-.342 2.532-1.233 3.808-2.585 1.28-1.356 2.597-3.211 3.944-5.541l-.866-.5c-1.324 2.29-2.596 4.074-3.805 5.355-1.213 1.285-2.332 2.031-3.343 2.306l.262.965zm7.752-8.126c2.279-3.942 4.245-8.55 5.538-11.579l-.919-.392c-1.297 3.036-3.241 7.59-5.485 11.47l.866.5zm5.538-11.579c.487-1.14.901-2.11 1.211-2.766l-.904-.427c-.32.677-.743 1.668-1.226 2.8l.919.393zm1.211-2.766c1.352-2.86 1.506-6.659.371-9.492l-.928.372c1.026 2.563.892 6.072-.347 8.692l.904.428zm.371-9.492c-.813-2.028-2.245-3.507-4.15-4.24l-.359.933c1.62.624 2.861 1.883 3.581 3.68l.928-.373zm-4.15-4.24c-2.205-.848-4.32-.686-6.238.505l.527.85c1.634-1.015 3.419-1.165 5.352-.422l.359-.933zm-6.238.505a7.982 7.982 0 00-2.205 2.04l.82.573a7.01 7.01 0 011.912-1.764l-.527-.849zm-2.271 2.174l-3.992 12.481.952.305 3.992-12.481-.952-.305zm-3.993 12.483a.333.333 0 01.313-.232l.012 1a.668.668 0 00.629-.467l-.954-.301zm.319-.232c.132 0 .259.08.308.218l-.941.338a.674.674 0 00.633.444v-1zm.312.229c-.011-.035-.934-2.67-1.833-5l-.933.36a176.386 176.386 0 011.776 4.838l.042.118.948-.316zm-1.833-4.998a.33.33 0 01-.191.427l-.358-.933a.67.67 0 00-.385.863l.934-.357zm-.19.427a.331.331 0 01-.429-.192l.934-.356a.668.668 0 00-.865-.385l.36.933zm-.428-.19c.668 1.733 1.35 3.636 1.657 4.5l.942-.334a185.59 185.59 0 00-1.667-4.526l-.932.36zm2.604 4.486l3.847-12.027-.952-.305-3.847 12.027.952.305zm3.851-12.039a.33.33 0 01-.045.096l-.83-.557a.658.658 0 00-.085.18l.96.281zm-.043.093l.009-.012.025-.037.099-.132a7.462 7.462 0 011.877-1.683l-.529-.848c-1.476.92-2.265 2.085-2.315 2.161l.834.551zm2.01-1.864c1.192-.743 3.132-1.43 5.662-.456l.359-.933c-2.894-1.114-5.164-.323-6.55.54l.529.85zm5.662-.456c1.711.658 3.018 1.983 3.773 3.868l.928-.371c-.848-2.119-2.347-3.663-4.342-4.43l-.359.933zm3.773 3.869c1.059 2.644.922 6.261-.355 8.962l.904.427c1.39-2.94 1.547-6.847.379-9.761l-.928.372zm-.355 8.962c-.317.671-.739 1.661-1.221 2.79l.92.392c.486-1.137.898-2.105 1.205-2.755l-.904-.427zm-1.221 2.79c-1.355 3.173-3.279 7.678-5.538 11.573-1.13 1.948-2.334 3.726-3.581 5.102-1.253 1.384-2.51 2.317-3.735 2.65l.262.965c1.495-.406 2.909-1.502 4.214-2.944 1.313-1.448 2.557-3.293 3.705-5.271 2.295-3.957 4.242-8.518 5.593-11.683l-.92-.392zm-12.864 19.328a.34.34 0 01.096-.014v1a.655.655 0 00.186-.027l-.282-.959z" mask="url(#rwpfnl-a)"/><path fill="#331D67" stroke="#331D67" stroke-width=".5" d="M88.926 65.534a.17.17 0 01.206.122c1.293 5.038 3.966 11.152 4.103 11.465l.006.012a.168.168 0 01-.154.237.17.17 0 01-.155-.1c-.028-.063-2.8-6.356-4.128-11.53m.122-.206a.17.17 0 00-.122.206m.122-.206l.04.163v.001l-.077.02m.037-.184l.043.163h0l.077-.02s0 0 0 0c1.32 5.145 4.079 11.411 4.114 11.49M88.804 65.74l.085-.022m-.085.022l.085-.022c.665 2.587 1.69 5.451 2.55 7.673a110.956 110.956 0 001.536 3.76l.026.058.007.017.002.005.001.001h0v.002l.002.002-.001-.002v-.002a.082.082 0 01.042-.105s0 0 0 0 0 0 0 0 0 0 0 0a.08.08 0 01.106.04m-4.27-11.449l4.27 11.45s0 0 0 0m-4.27-11.45h0m0 0h0m4.27 11.45l-4.27-11.45m0 0s0 0 0 0m0 0v-.001h0zm.097.059a.081.081 0 01-.098-.059l.078-.02.02.079zm.002 0l-.02-.079.078-.02a.08.08 0 01-.058.098z"/><mask id="rwpfnl-b" fill="#fff"><path fill-rule="evenodd" d="M105.16 76.701h-.012a.169.169 0 01-.157-.181c.106-1.513-.314-3.75-1.216-6.469-.684-2.064-1.41-3.692-1.417-3.708a.169.169 0 11.308-.137c.007.015.739 1.656 1.429 3.736.928 2.801 1.344 5.022 1.233 6.602a.17.17 0 01-.168.157z" clip-rule="evenodd"/></mask><path fill="#331D67" fill-rule="evenodd" d="M105.16 76.701h-.012a.169.169 0 01-.157-.181c.106-1.513-.314-3.75-1.216-6.469-.684-2.064-1.41-3.692-1.417-3.708a.169.169 0 11.308-.137c.007.015.739 1.656 1.429 3.736.928 2.801 1.344 5.022 1.233 6.602a.17.17 0 01-.168.157z" clip-rule="evenodd"/><path fill="#331D67" d="M105.148 76.7l.098-.49-.033-.007-.033-.002-.032.5zm-.157-.18l-.499-.035v.002l.499.033zm-1.216-6.469l-.475.157.475-.157zm-1.417-3.708l-.458.202.006.012.452-.214zm.085-.224l-.202-.457-.002.001.204.457zm.223.086l.457-.203v-.001l-.457.204zm1.429 3.737l.475-.157-.475.157zm1.233 6.602l-.499-.036v.001l.499.034zm-.168-.343c-.007 0 .036-.001.086.009l-.197.98c.059.012.109.011.111.011v-1zm.02 0a.332.332 0 01.31.352l-.998-.066a.668.668 0 00.623.712l.065-.998zm.31.354c.113-1.613-.333-3.925-1.241-6.661l-.949.315c.897 2.702 1.291 4.863 1.192 6.276l.998.07zm-1.241-6.661a44.056 44.056 0 00-1.44-3.765l-.903.428c-.001-.002.717 1.607 1.394 3.651l.949-.314zm-1.434-3.754a.332.332 0 01-.167.436l-.409-.913a.67.67 0 00-.339.882l.915-.405zm-.169.437a.331.331 0 01-.436-.167l.913-.41a.67.67 0 00-.882-.338l.405.915zm-.436-.169c.004.01.728 1.634 1.411 3.691l.949-.315a47.34 47.34 0 00-1.314-3.477l-.096-.222-.027-.06-.007-.016-.002-.005v-.001h-.001l-.913.405zm1.41 3.691c.923 2.784 1.313 4.93 1.209 6.41l.997.07c.119-1.679-.322-3.976-1.256-6.794l-.95.314zm1.209 6.41a.33.33 0 01.331-.308v1a.67.67 0 00.667-.623l-.998-.069z" mask="url(#rwpfnl-b)"/><path fill="#331D67" stroke="#331D67" stroke-width=".5" d="M90.114 58.74a.168.168 0 00.22.093 50.594 50.594 0 015.72-1.943.169.169 0 00.119-.207l-6.06 2.057zm0 0a.169.169 0 01.093-.22l-.093.22z"/><path fill="#42445D" fill-rule="evenodd" stroke="#42445D" stroke-width=".4" d="M146.528 109.328H50.293a.168.168 0 01-.169-.169.17.17 0 01.17-.169h96.234a.169.169 0 110 .338z" clip-rule="evenodd"/></svg>'}}),Dl=[{title:"Product Launch Funnel",link:"#",views:1240,orders:186,conversion_rate:15,revenue:9300,aov:50,aov_lift:47.1},{title:"Lead Gen Funnel",link:"#",views:870,orders:96,conversion_rate:11,revenue:4800,aov:34,aov_lift:0},{title:"Webinar Funnel",link:"#",views:530,orders:53,conversion_rate:10,revenue:2650,aov:28,aov_lift:-17.6}],Tl=e=>null==e?"N/A":Ll(e,d.priceConfig),Rl=e=>null==e?"N/A":`${e>0?"+":""}${e}%`,Bl=e=>{let{tab:t}=e;const[n,l]=(0,i.useState)([]),[r,a]=(0,i.useState)(!0),s=d.isProActivated;(0,i.useEffect)(()=>{if(!s)return void a(!1);let e=!1;return a(!0),v("report/top-funnels").then(t=>{e||(l(t.data),a(!1))}).catch(t=>{e||(a(!1),console.error(t))}),()=>{e=!0}},[s,t]);const o=s?n:Dl,c=s&&n.length>0;return(0,W.jsxs)("div",{className:"rwpfnl-top-performing-funnels",children:[(0,W.jsxs)("div",{className:"rwpfnl-section-header",children:[(0,W.jsx)("h2",{className:"rwpfnl-dashboard-section-title",children:p("top_performing_funnels","Top Performing Funnels")}),c&&(0,W.jsxs)("a",{href:f("/funnels"),className:"rwpfnl-view-all-link",children:[(0,W.jsx)("span",{children:p("view_all","View all")}),(0,W.jsx)(st,{})]})]}),(0,W.jsxs)("div",{className:"rwpfnl-pro-section-wrapper"+(s?"":" is-locked"),children:[!s&&(0,W.jsx)(Cl,{message:"Upgrade to Pro to unlock real data for Top Performing Funnels"}),(0,W.jsxs)("div",{className:"rwpfnl-pro-content rwpfnl-dashboard-table-wrapper",children:[0!==o.length&&(0,W.jsxs)("div",{className:"rwpfnl-table-header",children:[(0,W.jsx)("p",{className:"rwpfnl-table-col title",children:"Funnel Name"}),(0,W.jsx)("p",{className:"rwpfnl-table-col views",children:(0,W.jsx)("span",{className:"table-text",children:p("views","Views")})}),(0,W.jsx)("p",{className:"rwpfnl-table-col orders",children:(0,W.jsx)("span",{className:"table-text",children:"Orders"})}),(0,W.jsx)("p",{className:"rwpfnl-table-col conversion-rate",children:(0,W.jsx)("span",{className:"table-text",children:p("conversion","Conversion")})}),(0,W.jsx)("p",{className:"rwpfnl-table-col aov",children:"AOV"}),(0,W.jsx)("p",{className:"rwpfnl-table-col revenue",children:"Revenue"}),(0,W.jsx)("p",{className:"rwpfnl-table-col aov-lift",children:"AOV Lift"})]}),(0,W.jsx)("div",{className:"rwpfnl-table-body",children:0===o.length?(0,W.jsx)("div",{className:"rwpfnl-empty-table-body",children:r?(0,W.jsx)(el,{type:"table-full-six"}):(0,W.jsxs)("div",{children:[(0,W.jsx)(Fl,{}),(0,W.jsx)("p",{children:p("no_top_performing_funnels","No top performing funnels yet")})]})}):o.map((e,t)=>{return(0,W.jsxs)("div",{className:"rwpfnl-table-row",children:[(0,W.jsx)("p",{className:"rwpfnl-table-col title",children:(0,W.jsx)("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",children:e.title})}),(0,W.jsx)("p",{className:"rwpfnl-table-col views",children:e.views}),(0,W.jsx)("p",{className:"rwpfnl-table-col orders",children:e.orders}),(0,W.jsxs)("p",{className:"rwpfnl-table-col conversion-rate",children:[e.conversion_rate,"%"]}),(0,W.jsx)("p",{className:"rwpfnl-table-col aov",children:Tl(e.aov)}),(0,W.jsx)("p",{className:"rwpfnl-table-col revenue",children:Tl(e.revenue)}),(0,W.jsx)("p",{className:"rwpfnl-table-col aov-lift",children:(0,W.jsx)("span",{className:"aov-tag "+(n=e.aov_lift,null==n?"is-neutral":n>=0?"is-positive":"is-negative"),children:Rl(e.aov_lift)})})]},t);var n})})]})]})]})},$l=e=>`${Number(e||0).toFixed(1)}%`,Il=e=>`${e>=0?"+":""}${e}%`,Ol={labels:[],funnelData:[],storeData:[],summaryCards:[]},Wl=()=>{const[e,t]=(0,i.useState)(!0),[n,l]=(0,i.useState)(!1),[r,a]=(0,i.useState)({}),[s,o]=(0,i.useState)({}),[c,u]=(0,i.useState)([]),[p,f]=(0,i.useState)(Ol),[h,m]=(0,i.useState)({total:"$0",breakdown:[]}),[v,w]=(0,i.useState)([]),x=(0,i.useRef)(null),b=(0,i.useCallback)(async e=>{const{after:t,before:n,previousAfter:l,previousBefore:r,interval:s}=e,[i,c,p]=await Promise.all([M({after:t,before:n,interval:s}),M({after:l,before:r,interval:s}),z({after:t,before:n,interval:s})]);var h;a(i.data),o(c.data),u((e=>{const t=Ml(d.priceConfig,{minimumFractionDigits:0,maximumFractionDigits:2}),n=e.avg_order_value||0,l=e.store_aov||0,r=l?Math.round((n-l)/l*100):0,a=e.store_revenue||0,s=e.total_revenue||0,i=s+a,o=i>0?Math.round(a/i*100):0;let c;if(d.isProActivated){const t=e.checkout_conversion_rate||e.conversion_rate||0,n=e.store_checkout_conversion_rate||e.store_conversion_rate||0,l=n?Math.round((t-n)/n*100):0;c={mainValue:$l(t),baselineLabel:"vs regular checkout",baselineValue:$l(n),footerLabel:"Conv. lift",liftValue:Il(l),liftPercent:Math.abs(l),liftType:l>=0?"increase":"decrease"}}else c={mainValue:"68.5%",baselineLabel:"vs regular checkout",baselineValue:"34.2%",footerLabel:"Conv. lift",liftValue:"+100%",liftPercent:100,liftType:"increase"};return[{label:"Avg. order value",mainValue:t(n),baselineLabel:"vs regular store",baselineValue:t(l),footerLabel:"AOV lift",liftValue:Il(r),liftPercent:Math.abs(r),liftType:r>=0?"increase":"decrease",isLocked:!1},{label:"Checkout conversion rate",isLocked:!d.isProActivated,...c},{label:"Sales without funnels",mainValue:t(a),baselineLabel:"",baselineValue:"",footerLabel:"Revenue gap without funnels",liftValue:`-${o}%`,liftPercent:s?Math.round(a/(s+a)*100):0,liftType:"decrease",isLocked:!1}]})(i.data)),m((e=>{const t=Ml(d.priceConfig,{minimumFractionDigits:0,maximumFractionDigits:0}),n=e.total_revenue||0,l=e.store_revenue||0,r=n+l||1,a=Math.round(n/r*100),s=100-a;return{total:t(r),breakdown:[{label:"Checkout funnels",value:t(n),pct:a,color:"#6E42D3"},{label:"Regular shop",value:t(l),pct:s,color:"#F97316"}]}})(i.data)),w((h=i.data,[{label:"Order bump acceptance rate",value:Math.round(h.ob_acceptance_rate||0),color:"#6E42D3"},{label:"Upsell acceptance rate",value:Math.round(h.upsell_acceptance_rate||0),color:"#22C55E"},{label:"Downsell recovery rate",value:Math.round(h.downsell_recovery_rate||0),color:"#F97316"},{label:"Checkout completion rate",value:Math.round(h.checkout_completion_rate||0),color:"#818CF8"}])),f(((e,t,n)=>{const l=Ml(d.priceConfig,{minimumFractionDigits:0,maximumFractionDigits:0}),r=((e,t,n)=>e.length&&e[0].start_date?e.map(e=>((e,t)=>{const n=new Date(e.replace(" ","T"));if(isNaN(n))return"";const l=n.toLocaleString("default",{month:"long"});return"month"===t?l:`${l} ${n.getDate()}`})(e.start_date,n)):((e,t,n)=>{const l=[],r=new Date(e);if("day"===n)for(let e=0;e<t;e++){const e=r.toLocaleString("default",{month:"long"});l.push(`${e} ${r.getDate()}`),r.setDate(r.getDate()+1)}else if("week"===n)for(let e=0;e<t;e++){const e=r.toLocaleString("default",{month:"long"});l.push(`${e} ${r.getDate()}`),r.setDate(r.getDate()+7)}else if("month"===n){r.setDate(1);for(let e=0;e<t;e++)l.push(r.toLocaleString("default",{month:"long"})),r.setMonth(r.getMonth()+1)}return l})(t,e.length,n))(e,t,n),a=e.map(e=>e.total_funnel_sales||e.total_sales||0),s=e.map(e=>e.store_sales||0),i=a.reduce((e,t)=>e+t,0),o=s.reduce((e,t)=>e+t,0),c=i+o||1,u=Math.round(i/c*100),p=100-u,f=a.length?Math.max(...a):0,h=r[a.indexOf(f)]||"";return{labels:r,funnelData:a,storeData:s,summaryCards:[{label:`Funnel · ${u}% of total`,value:l(i),color:"#6E42D3"},{label:`Store · ${p}% of total`,value:l(o),color:"#F97316"},{label:`Peak — ${h}`,value:l(f),color:"#33A646"}]}})(p.sales.interval,t,s))},[]),y=(0,i.useCallback)(e=>{const n={after:e.primaryAfter,before:e.primaryBefore,previousAfter:e.secondaryAfter,previousBefore:e.secondaryBefore,interval:e.interval,period:e.period};x.current=n,t(!0),b(n).catch(e=>{console.error("[WPFunnels] Dashboard failed to load",e)}).finally(()=>t(!1))},[b]);return(0,W.jsxs)("div",{className:"rwpfnl-dashboard-contents-wrapper",children:[(0,W.jsxs)("div",{className:"rwpfnl-dashboard-contents-header",children:[(0,W.jsx)("div",{className:"rwpfnl-dashboard-left-header"}),(0,W.jsxs)("div",{className:"rwpfnl-dashboard-right-header",children:[(0,W.jsxs)("button",{className:"rwpfnl-sync-cache-btn"+(n?" is-syncing":""),disabled:n,type:"button",onClick:async()=>{l(!0);try{await g("report/sync-cache");const e=x.current;e?(t(!0),await b(e),t(!1)):window.location.reload()}catch(e){console.error("[WPFunnels] Sync failed",e),t(!1)}finally{l(!1)}},children:[(0,W.jsx)(rt,{}),(0,W.jsx)("span",{children:n?"Syncing…":"Sync Data"})]}),(0,W.jsx)(yl,{onFilter:y})]})]}),(0,W.jsxs)("div",{className:"rwpfnl-dashboard-contents-body",children:[(0,W.jsx)("div",{className:"rwpfnl-dashboard-cards-container",children:(0,W.jsx)(Pl,{primaryData:r,secondaryData:s,loader:e})}),(0,W.jsx)(al,{loader:e,cards:c}),(0,W.jsxs)("div",{className:"rwpfnl-dashboard-performance",children:[(0,W.jsx)(il,{loader:e,summaryCards:p.summaryCards,labels:p.labels,funnelData:p.funnelData,storeData:p.storeData}),(0,W.jsx)(jl,{loader:e,totalRevenue:h.total,breakdown:h.breakdown})]}),(0,W.jsx)(Bl,{tab:"sales"}),(0,W.jsx)(Nl,{loader:e,metrics:v,isPro:d.isProActivated})]})]})},Hl=()=>(0,W.jsxs)("div",{className:"rwpfnl-onboarding-loader",children:[(0,W.jsx)("div",{className:"rwpfnl-onboarding-loader__checklist"}),(0,W.jsx)("div",{className:"rwpfnl-onboarding-loader__panel"})]}),Vl={showOnboarding:!1,onboardingSteps:{},completedCount:0,totalSteps:0,progressPercent:0,orderBumpUrl:"",funnelBuilderUrl:""},Ul=["Launch a high-converting store checkout","Build dedicated funnels for key products","Grow average order value with dynamic offers"],Zl=()=>{const[{onboardingSteps:e,completedCount:t,totalSteps:n,progressPercent:l,orderBumpUrl:r,funnelBuilderUrl:a},s]=(0,i.useState)(Vl),[o,c]=(0,i.useState)(!0),[u,p]=(0,i.useState)(!1),[h,m]=(0,i.useState)(!1);if((0,i.useEffect)(()=>{let e=!1;return v("report/onboarding-status").then(t=>{!e&&t.success&&(s({showOnboarding:t.show_onboarding,onboardingSteps:t.steps||{},completedCount:t.completed_count||0,totalSteps:t.total_steps||0,progressPercent:t.progress_percent||0,orderBumpUrl:t.order_bump_url||"",funnelBuilderUrl:t.funnel_builder_url||""}),p(!!t.show_onboarding))}).catch(t=>{console.error("Error loading onboarding status:",t),e||p(!0)}).finally(()=>{e||c(!1)}),()=>{e=!0}},[]),(0,i.useEffect)(()=>(document.body.style.overflow=h?"hidden":"",()=>{document.body.style.overflow=""}),[h]),o)return!1===d.onboardingHint?null:(0,W.jsx)(Hl,{});if(!u)return null;const w=((e,t,n)=>{const l=f("/funnels");return[{key:"store_checkout_created",label:"Setup Store Checkout",isCompleted:!!e.store_checkout_created,action:{label:"Create",url:f("/store-checkout")}},{key:"funnel_created",label:"Build Sales Funnel",isCompleted:!!e.funnel_created,action:{label:"Go To Library",url:f("/funnel-templates")}},{key:"order_bump_added",label:"Offer with Order Bump",isCompleted:!!e.order_bump_added,action:{label:"Add",url:t||l}},{key:"upsell_added",label:"Increase Revenue with Upsell",isCompleted:!!e.upsell_added,action:{label:"Add",url:n||l}},{key:"test_order_placed",label:"Run a Test Order",isCompleted:!!e.test_order_placed,action:{label:"Run",url:l}},{key:"funnel_live",label:"Activate Funnel Live",isCompleted:!!e.funnel_live,action:{label:"Activate",url:l}}]})(e,r,a),x=e=>!!e.action?.isPro&&!d.isProActivated;return(0,W.jsx)("div",{className:"rwpfnl-guided-onboarding",children:(0,W.jsxs)("div",{className:"rwpfnl-guided-onboarding-wrapper",children:[(0,W.jsxs)("div",{className:"onboarding-title-area",children:[(0,W.jsx)("h1",{className:"onboarding-title",children:"Welcome to WPFunnels"}),(0,W.jsxs)("button",{type:"button",className:"dismiss-button",onClick:()=>{g("report/dismiss-onboarding").then(e=>{e.success&&p(!1)}).catch(e=>{console.error("Failed to dismiss onboarding:",e),p(!1)})},children:[(0,W.jsx)(ut,{}),"Dismiss Setup"]})]}),(0,W.jsxs)("div",{className:"onboarding-list-wrapper",children:[(0,W.jsxs)("div",{className:"onboarding-progressbar",children:[(0,W.jsxs)("p",{className:"funnel-progress-title",children:["You're ",l,"% closer to best in-class Sales Funnel."]}),(0,W.jsxs)("div",{className:"funnel-progress-wrapper",children:[(0,W.jsxs)("span",{className:"funnel-progress-label",children:[t,"/",n," complete"]}),(0,W.jsx)("div",{className:"funnel-progress-bar",children:(0,W.jsx)("div",{className:"funnel-progress-fill",style:{width:`${l}%`}})})]})]}),(0,W.jsx)("div",{className:"onboarding-list",children:w.map(e=>(0,W.jsxs)("div",{className:"onboarding-item"+(e.isCompleted?" completed":""),children:[(0,W.jsxs)("div",{className:"left",children:[e.isCompleted?(0,W.jsx)("div",{className:"icon check",children:(0,W.jsx)(dt,{})}):(0,W.jsx)("div",{className:"icon circle"}),(0,W.jsx)("span",{className:"title",children:e.label})]}),(0,W.jsxs)("div",{className:"right",children:[e.isCompleted&&(0,W.jsx)("span",{className:"status completed",children:"Completed"}),!e.isCompleted&&x(e)&&(0,W.jsxs)("a",{href:d.proUpgradeUrl,target:"_blank",rel:"noopener noreferrer",className:"action-link",children:[(0,W.jsx)("span",{className:"pro-badge",children:"PRO"}),"Unlock with PRO"]}),!e.isCompleted&&!x(e)&&(0,W.jsx)("a",{href:e.action.url,className:"action-link",children:e.action.label})]})]},e.key))})]}),(0,W.jsxs)("div",{className:"onboarding-info",children:[(0,W.jsxs)("div",{className:"info-content",children:[(0,W.jsx)("h2",{className:"info-title",children:"Boost Your Store Revenue"}),(0,W.jsx)("p",{className:"info-description",children:"Design conversion-focused checkout experiences with order bumps and 1-click upsells."}),(0,W.jsx)("ul",{className:"info-features",children:Ul.map(e=>(0,W.jsxs)("li",{className:"feature-item",children:[(0,W.jsx)(pt,{}),e]},e))}),(0,W.jsxs)("div",{className:"info-links",children:[(0,W.jsxs)("a",{href:"https://getwpfunnels.com/docs/getting-started-with-wpfunnels/",target:"_blank",rel:"noopener noreferrer",className:"info-link",children:[(0,W.jsx)(ft,{}),"View Documentation"]}),(0,W.jsxs)("a",{href:"https://getwpfunnels.com/contact-us/",target:"_blank",rel:"noopener noreferrer",className:"info-link",children:[(0,W.jsx)(ht,{}),"Get Support"]})]})]}),(0,W.jsx)("div",{className:"video-wrapper",children:(0,W.jsxs)("div",{className:"video-preview",onClick:()=>m(!0),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),m(!0))},tabIndex:0,role:"button","aria-label":"Play video",children:[(0,W.jsx)("img",{src:`${d.imagePath}/onboarding-video-poster.webp`,alt:"onboarding-video-poster",className:"video-poster",width:"539",height:"336"}),(0,W.jsx)("div",{className:"play-overlay",children:(0,W.jsx)("div",{className:"play-button",children:(0,W.jsx)(mt,{})})})]})}),h&&(0,W.jsx)("div",{className:"video-popup-overlay",onClick:()=>m(!1),role:"dialog","aria-modal":"true","aria-labelledby":"rwpfnl-video-popup-title",children:(0,W.jsxs)("div",{className:"video-popup-content",onClick:e=>e.stopPropagation(),children:[(0,W.jsx)("button",{className:"video-popup-close",onClick:()=>m(!1),"aria-label":"Close video",children:(0,W.jsx)(vt,{})}),(0,W.jsx)("h2",{id:"rwpfnl-video-popup-title",className:"visually-hidden",children:"Video Tutorial"}),(0,W.jsx)("div",{className:"video-container",children:(0,W.jsx)("iframe",{width:"550",height:"310",src:"https://www.youtube.com/embed/GrzIRl5jfBE?autoplay=1",title:"WPFunnels Tutorial Video",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})})]})})]})]})})},Yl=()=>(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Zl,{}),(0,W.jsx)("div",{className:"rwpfnl-dashboard-body",children:(0,W.jsx)(Wl,{})})]}),ql=()=>(0,W.jsxs)("svg",{width:"19",height:"18",fill:"none",viewBox:"0 0 19 18",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("path",{fill:"#1874FF",d:"M17.308 8.1c-.495 0-.9.404-.9.9 0 3.964-3.226 7.198-7.199 7.198A7.201 7.201 0 012.011 9a7.201 7.201 0 017.198-7.198c.495 0 .9-.406.9-.901a.903.903 0 00-.9-.901c-4.964 0-9 4.036-9 9s4.036 9 9 9 9-4.036 9-9c0-.496-.405-.9-.9-.9z"}),(0,W.jsx)("path",{fill:"#1874FF",d:"M6.245 7.468a.897.897 0 10-1.27 1.27l2.936 2.929a1.74 1.74 0 001.226.513h.108c.495-.027.955-.27 1.261-.666l5.72-7.36a.9.9 0 00-.152-1.262.9.9 0 00-1.262.153l-5.675 7.306-2.883-2.883h-.01z"})]}),Kl={beauty:()=>(0,W.jsxs)("svg",{width:"18",height:"18",fill:"none",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("g",{clipPath:"url(#clip0_405_2916)",children:(0,W.jsx)("path",{fill:"#6E42D3",stroke:"#6E42D3",strokeWidth:".2",d:"M10.732 9.303a.562.562 0 00-.562-.562 3.924 3.924 0 01-3.91-3.912.563.563 0 00-1.125 0 3.924 3.924 0 01-3.912 3.912.563.563 0 000 1.125 3.925 3.925 0 013.912 3.912.563.563 0 001.125 0 3.925 3.925 0 013.912-3.912c.31 0 .561-.252.561-.563zm-4.121.915a5.056 5.056 0 00-.915 1.246 5.056 5.056 0 00-.914-1.246 5.058 5.058 0 00-1.246-.915 5.056 5.056 0 001.246-.914c.372-.372.678-.792.914-1.246.236.454.543.874.915 1.246s.792.679 1.246.914a5.057 5.057 0 00-1.246.915zm9.629 3.575a2.528 2.528 0 01-2.52-2.52.563.563 0 00-1.125 0 2.528 2.528 0 01-2.52 2.52.563.563 0 000 1.125 2.528 2.528 0 012.52 2.52.563.563 0 001.125 0 2.528 2.528 0 012.52-2.52.563.563 0 000-1.125zM13.157 15.5a3.683 3.683 0 00-1.143-1.143c.46-.291.852-.683 1.143-1.143a3.7 3.7 0 001.143 1.143c-.46.291-.852.682-1.143 1.143zM16.78 3.622a3.07 3.07 0 01-3.06-3.06.563.563 0 00-1.124 0 3.07 3.07 0 01-3.06 3.06.563.563 0 000 1.125 3.07 3.07 0 013.06 3.06.563.563 0 001.125 0 3.07 3.07 0 013.06-3.06.563.563 0 000-1.125zm-3.622 2.096a4.226 4.226 0 00-1.533-1.534 4.226 4.226 0 001.533-1.533 4.226 4.226 0 001.534 1.533 4.225 4.225 0 00-1.534 1.534z"})}),(0,W.jsx)("defs",{children:(0,W.jsx)("clipPath",{id:"clip0_405_2916",children:(0,W.jsx)("path",{fill:"#fff",d:"M0 0h18v18H0z"})})})]}),"business-coach":()=>(0,W.jsxs)("svg",{width:"19",height:"19",fill:"none",viewBox:"0 0 19 19",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("path",{stroke:"#6E42D3",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",strokeWidth:"1.5",d:"M17.502 6.833H6.832a5.335 5.335 0 105.295 4.673l5.375-.672V6.833z"}),(0,W.jsx)("path",{stroke:"#6E42D3",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",strokeWidth:"1.5",d:"M4.165 6.833a1.334 1.334 0 11-2.667 0 1.334 1.334 0 012.667 0zM9.5 12.167a2.667 2.667 0 11-5.334 0 2.667 2.667 0 015.335 0zm0-4.267V6.833m0-4.001V1.498M7.19 4.165L6.035 3.5m6.931-.001l-1.155.666"})]}),counselor:()=>(0,W.jsx)("svg",{width:"21",height:"21",fill:"none",viewBox:"0 0 21 21",xmlns:"http://www.w3.org/2000/svg",children:(0,W.jsx)("path",{fill:"#24C21A",stroke:"#24C21A",strokeWidth:".1",d:"M11.3 7.365l2.089 1.702a.555.555 0 00.582.073.533.533 0 00.315-.483V7.32c1.54-.255 2.715-1.565 2.715-3.138C17.001 2.428 15.538 1 13.74 1H7.824C6.026 1 4.563 2.428 4.563 4.182c0 .288.039.566.112.831h-.251c-1.335 0-2.422 1.06-2.422 2.363 0 1.12.802 2.06 1.875 2.302v.788c0 .208.123.396.315.484a.557.557 0 00.583-.074L6.17 9.739h2.34c1.335 0 2.421-1.06 2.421-2.363v-.011h.37v0zM5.656 4.182c0-1.166.973-2.115 2.168-2.115h5.916c1.195 0 2.167.95 2.167 2.115 0 1.167-.972 2.115-2.167 2.115a.54.54 0 00-.547.534v.685L11.85 6.422a.556.556 0 00-.351-.125H7.824c-1.195 0-2.168-.948-2.168-2.115zm4.181 3.194c0 .714-.595 1.296-1.328 1.296H5.971a.556.556 0 00-.35.124l-.65.53v-.12a.54.54 0 00-.547-.534c-.732 0-1.328-.582-1.328-1.296 0-.715.596-1.296 1.328-1.296h.784a3.286 3.286 0 002.616 1.285h2.013v.011zm-2.901 8.45c.845-.912.799-2.285-.14-3.146-.99-.907-2.599-.906-3.588 0a2.216 2.216 0 00-.743 1.644 2.2 2.2 0 00.602 1.503 4.224 4.224 0 00-1.797 1.528 1.603 1.603 0 00-.014 1.754c.347.558.971.891 1.67.891h4.15c.7 0 1.325-.333 1.672-.891a1.603 1.603 0 00-.015-1.754 4.225 4.225 0 00-1.797-1.529zm.633 2.668a.564.564 0 01-.492.263h-4.15a.564.564 0 01-.493-.263.459.459 0 01.003-.505c.535-.827 1.517-1.34 2.565-1.34 1.047 0 2.03.513 2.565 1.34a.46.46 0 01.002.505zm-3.402-4.936c.23-.21.532-.316.835-.316.302 0 .604.106.835.316a1.02 1.02 0 010 1.53 1.26 1.26 0 01-1.67 0 1.031 1.031 0 01-.346-.764c0-.29.123-.561.346-.766zm15.545 3.602c-.526-.812-1.317-1.438-2.237-1.81.527-.482.817-1.122.817-1.802 0-.681-.29-1.321-.817-1.803-1.088-.994-2.859-.993-3.946 0-.527.482-.818 1.122-.818 1.803 0 .68.29 1.32.817 1.802-.92.372-1.71.998-2.237 1.81a1.716 1.716 0 00-.015 1.882c.374.6 1.047.958 1.801.958h4.85c.753 0 1.427-.358 1.8-.958a1.716 1.716 0 00-.015-1.883zm-1.06 1.323a.844.844 0 01-.726.387h-4.849a.844.844 0 01-.727-.387.678.678 0 01.005-.748c.656-1.01 1.862-1.639 3.147-1.639 1.285 0 2.49.629 3.146 1.64a.678.678 0 01.005.747zm-4.704-4.935c0-.38.162-.736.455-1.004a1.63 1.63 0 011.099-.415c.397 0 .795.139 1.098.415.293.268.455.625.455 1.004s-.162.735-.455 1.003a1.661 1.661 0 01-2.197 0 1.35 1.35 0 01-.455-1.003z"})}),"digital-marketer":()=>(0,W.jsxs)("svg",{width:"20",height:"19",fill:"none",viewBox:"0 0 20 19",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("path",{fill:"#D95080",d:"M9.727 18.398a1.52 1.52 0 01-1.177-.561l-1.22-1.483a.283.283 0 00-.22-.104H4.764a3.116 3.116 0 01-3.11-2.814l-.749-7.5a3.132 3.132 0 01.793-2.408A3.131 3.131 0 014.014 2.5h11.974a3.13 3.13 0 012.318 1.029c.59.654.88 1.531.792 2.408l-.75 7.5a3.116 3.116 0 01-3.11 2.814h-3.683a.285.285 0 00-.284.281l-.003.341a1.519 1.519 0 01-1.02 1.434 1.557 1.557 0 01-.52.091zM4.013 3.75c-.536 0-1.03.22-1.39.617-.36.398-.529.911-.476 1.445l.75 7.5A1.87 1.87 0 004.764 15h2.348c.46 0 .892.204 1.185.56l1.22 1.482a.27.27 0 00.313.088.27.27 0 00.189-.266l.002-.34A1.538 1.538 0 0111.554 15h3.683c.968 0 1.77-.726 1.866-1.688l.75-7.5a1.855 1.855 0 00-.475-1.446 1.852 1.852 0 00-1.39-.616H4.012z"}),(0,W.jsx)("path",{fill:"#D95080",d:"M13.441 12.11c-.136 0-.273-.015-.41-.046l-3.97-.883a.651.651 0 00-.135-.014H6.564A1.877 1.877 0 014.69 9.292V8.043c0-1.034.842-1.875 1.875-1.875h2.362a.622.622 0 00.135-.015l3.97-.882a1.864 1.864 0 011.58.367c.446.358.702.89.702 1.463v3.133c0 .572-.256 1.105-.702 1.463-.337.27-.748.412-1.17.412zM6.565 7.417a.626.626 0 00-.625.625v1.249c0 .344.28.625.625.625h2.361c.135 0 .272.015.405.044l3.972.883a.625.625 0 00.76-.61V7.1a.624.624 0 00-.76-.61l-3.97.882a1.86 1.86 0 01-.407.045h-2.36z"}),(0,W.jsx)("path",{fill:"#D95080",d:"M8.432 6.784h1.25v3.787h-1.25V6.784z"}),(0,W.jsx)("path",{fill:"#D95080",d:"M8.264 13.254a.625.625 0 01-.625-.625v-2.087h1.25v2.087c0 .345-.28.625-.625.625zm7.875-9.504H3.914l-.355-1.42a1.864 1.864 0 01.34-1.609A1.865 1.865 0 015.379 0h9.297c.582 0 1.12.263 1.478.721a1.86 1.86 0 01.34 1.609l-.354 1.42zM4.89 2.5h10.274l.118-.473a.62.62 0 00-.114-.536.62.62 0 00-.493-.24H5.378a.621.621 0 00-.493.24.621.621 0 00-.114.536l.119.474V2.5z"})]}),ebook:()=>(0,W.jsxs)("svg",{width:"16",height:"18",fill:"none",viewBox:"0 0 16 18",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("path",{fill:"#0094A6",d:"M13.523 0H2.478c-.488 0-.956.19-1.301.528C.83.865.637 1.323.637 1.8v13.8c0 .636.26 1.246.72 1.696.46.45 1.084.703 1.734.704h10.432c.488 0 .956-.19 1.301-.528a1.78 1.78 0 00.54-1.272V1.8a1.78 1.78 0 00-.54-1.272 1.864 1.864 0 00-1.3-.528zm.614 16.2a.594.594 0 01-.18.424.622.622 0 01-.434.176H3.091a1.24 1.24 0 01-.868-.352 1.184 1.184 0 01-.359-.848c0-.318.13-.623.36-.848.23-.226.542-.352.867-.352h11.046v1.8zm0-3H3.09a2.467 2.467 0 00-.583.076c-.057.014-.11.033-.166.05a2.46 2.46 0 00-.382.157c-.03.015-.066.022-.096.039V1.8c0-.159.065-.311.18-.424a.622.622 0 01.434-.176h11.045c.163 0 .319.064.434.176.115.113.18.265.18.424v11.4z"}),(0,W.jsx)("path",{fill:"#0094A6",d:"M10.162 7.135L8.657 8.542V3.886a.594.594 0 00-.192-.434.68.68 0 00-.464-.18.68.68 0 00-.464.18.594.594 0 00-.192.434v4.656L5.841 7.135a.681.681 0 00-.462-.172.68.68 0 00-.458.18.595.595 0 00-.192.428.593.593 0 00.184.432l2.624 2.454a.68.68 0 00.464.18.683.683 0 00.465-.18l2.624-2.454a.593.593 0 00.184-.432.594.594 0 00-.192-.429.68.68 0 00-.459-.18.68.68 0 00-.461.173z"})]}),"ecommerce-shop":()=>(0,W.jsxs)("svg",{width:"19",height:"18",fill:"none",viewBox:"0 0 19 18",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("path",{fill:"#EBBA40",d:"M15.306 11.864H7.215a2.318 2.318 0 01-1.5-.557 2.472 2.472 0 01-.82-1.415L3.3 1.637H.79a.776.776 0 01-.559-.24A.834.834 0 010 .818C0 .601.083.393.231.24A.776.776 0 01.79 0h3.158a.772.772 0 01.509.18.82.82 0 01.28.475l1.705 8.918a.823.823 0 00.28.475c.145.12.325.183.51.18h8.075a.772.772 0 00.507-.177.823.823 0 00.283-.47l1.27-6.136a.848.848 0 00-.163-.694.794.794 0 00-.28-.222.766.766 0 00-.346-.074h-.79a.775.775 0 01-.557-.24.834.834 0 01-.232-.578c0-.217.084-.426.232-.579a.775.775 0 01.558-.24h.79c.358-.008.713.068 1.04.222.325.155.613.384.841.671a2.507 2.507 0 01.486 2.085L17.66 9.933a2.468 2.468 0 01-.844 1.4c-.429.353-.962.54-1.509.53zM7.896 18a2.31 2.31 0 01-1.316-.414 2.438 2.438 0 01-.872-1.101 2.538 2.538 0 01-.135-1.418c.091-.476.317-.914.648-1.257a2.343 2.343 0 011.213-.672 2.29 2.29 0 011.368.14c.433.186.802.5 1.063.904.26.403.399.878.399 1.364a2.5 2.5 0 01-.694 1.735A2.327 2.327 0 017.896 18zm0-3.273a.77.77 0 00-.439.138.813.813 0 00-.29.367.846.846 0 00.17.892.764.764 0 00.86.177.796.796 0 00.355-.301.84.84 0 00-.098-1.033.775.775 0 00-.558-.24zM14.999 18a2.31 2.31 0 01-1.316-.414 2.439 2.439 0 01-.872-1.101 2.538 2.538 0 01-.135-1.418c.092-.476.317-.914.649-1.257a2.343 2.343 0 011.212-.672 2.29 2.29 0 011.368.14c.433.186.803.5 1.063.904.26.403.4.878.4 1.364a2.5 2.5 0 01-.694 1.735 2.327 2.327 0 01-1.675.719zm0-3.273a.77.77 0 00-.439.138.813.813 0 00-.29.367.846.846 0 00.17.892.764.764 0 00.86.177.796.796 0 00.355-.301.84.84 0 00-.098-1.033.775.775 0 00-.558-.24z"}),(0,W.jsx)("path",{fill:"#EBBA40",d:"M13.42 5.727H8.684a.776.776 0 01-.558-.24.834.834 0 01-.231-.578c0-.217.083-.425.23-.578a.776.776 0 01.559-.24h4.736c.21 0 .41.086.558.24a.833.833 0 01.232.578.833.833 0 01-.232.579.775.775 0 01-.558.24z"}),(0,W.jsx)("path",{fill:"#EBBA40",d:"M11.051 8.182a.776.776 0 01-.558-.24.834.834 0 01-.231-.578v-4.91c0-.216.083-.424.23-.578a.776.776 0 01.56-.24c.209 0 .41.087.557.24a.834.834 0 01.232.579v4.909a.834.834 0 01-.232.578.775.775 0 01-.558.24z"})]}),"educational-portal":()=>(0,W.jsxs)("svg",{width:"23",height:"18",fill:"none",viewBox:"0 0 23 18",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("path",{fill:"#5B5DF7",d:"M20.813 12.448h-.193V2.25A2.25 2.25 0 0018.376 0H3.742a2.249 2.249 0 00-2.244 2.25v10.198h-.193a1.25 1.25 0 00-1.246 1.25v.756A3.544 3.544 0 003.594 18h14.93a3.544 3.544 0 003.535-3.546v-.756c0-.69-.559-1.25-1.246-1.25zM2.828 2.25c0-.505.41-.916.914-.916h14.634c.505 0 .914.411.914.916v10.2H2.828V2.25zM20.73 14.454c0 1.22-.99 2.213-2.206 2.213H3.594a2.212 2.212 0 01-2.205-2.213v-.673h19.34v.673z"}),(0,W.jsx)("path",{fill:"#5B5DF7",d:"M13.23 8.69a3.28 3.28 0 001.119-2.459 3.296 3.296 0 00-3.288-3.297 3.296 3.296 0 00-3.288 3.297c0 .982.438 1.854 1.119 2.46-.563.281-1.026.67-1.315 1.14a.667.667 0 00.219.917.663.663 0 00.913-.219c.305-.497 1.15-1 2.352-1 1.201 0 2.046.502 2.352 1a.665.665 0 101.132-.697c-.289-.472-.752-.86-1.315-1.142zM9.102 6.232c0-1.083.879-1.964 1.959-1.964s1.958.88 1.958 1.964a1.964 1.964 0 01-1.958 1.964 1.964 1.964 0 01-1.959-1.964z"})]}),email:()=>(0,W.jsx)("svg",{width:"19",height:"18",fill:"none",viewBox:"0 0 19 18",xmlns:"http://www.w3.org/2000/svg",children:(0,W.jsx)("path",{fill:"#6EBA8A",d:"M17.773 5.79L9.878.265a1.474 1.474 0 00-1.683 0L.31 5.79a.628.628 0 00-.268.51v8.559A3.141 3.141 0 003.181 18H14.9a3.141 3.141 0 003.14-3.14V6.3c0-.209-.1-.393-.268-.51zm-.988 9.07a1.8 1.8 0 01-.084.527l-4.16-4.907 4.244-2.973v7.353zM8.924 1.285a.214.214 0 01.243 0l7.158 5.008-7.158 5.008a.215.215 0 01-.243 0l-7.158-5 7.158-5.016zM1.38 15.387a1.83 1.83 0 01-.084-.527V7.507L5.54 10.48l-4.16 4.907zm1.8 1.357c-.386 0-.737-.117-1.039-.318l4.43-5.226 1.623 1.14c.252.175.545.267.838.267.293 0 .586-.092.837-.268l1.624-1.139 4.429 5.226a1.854 1.854 0 01-1.038.318H3.18z"})}),"evergreen-template":()=>(0,W.jsx)("svg",{width:"19",height:"18",fill:"none",viewBox:"0 0 19 18",xmlns:"http://www.w3.org/2000/svg",children:(0,W.jsx)("path",{fill:"#3A83F7",stroke:"#fff",strokeWidth:".1",d:"M6.442 8.132H3.17A2.405 2.405 0 01.765 5.727V2.455A2.405 2.405 0 013.169.05h3.273a2.405 2.405 0 012.405 2.405v3.272a2.405 2.405 0 01-2.405 2.405zM3.17 1.586a.868.868 0 00-.868.869v3.272a.868.868 0 00.868.868h3.273a.868.868 0 00.868-.868V2.455a.868.868 0 00-.868-.869H3.17zm13.09 6.546h-3.272a2.404 2.404 0 01-2.405-2.405V2.455A2.405 2.405 0 0112.988.05h3.272a2.405 2.405 0 012.405 2.405v3.272a2.405 2.405 0 01-2.405 2.405zm-3.272-6.546a.868.868 0 00-.869.869v3.272a.868.868 0 00.869.868h3.272a.868.868 0 00.868-.868V2.455a.868.868 0 00-.868-.869h-3.272zM6.442 17.95H3.17a2.404 2.404 0 01-2.404-2.404v-3.273A2.404 2.404 0 013.17 9.868h3.273a2.404 2.404 0 012.405 2.405v3.273a2.404 2.404 0 01-2.405 2.404zM3.17 11.405a.868.868 0 00-.868.868v3.273a.868.868 0 00.868.868h3.273a.868.868 0 00.868-.869v-3.272a.868.868 0 00-.868-.868H3.17zm13.09 6.545h-3.272a2.404 2.404 0 01-2.405-2.404v-3.273a2.405 2.405 0 012.405-2.405h3.272a2.405 2.405 0 012.405 2.405v3.273a2.404 2.404 0 01-2.405 2.404zm-3.272-6.545a.868.868 0 00-.869.868v3.273a.869.869 0 00.869.868h3.272a.868.868 0 00.868-.869v-3.272a.868.868 0 00-.868-.868h-3.272z"})}),"health-supplement-provider":()=>(0,W.jsx)("svg",{width:"19",height:"15",fill:"none",viewBox:"0 0 19 15",xmlns:"http://www.w3.org/2000/svg",children:(0,W.jsx)("path",{fill:"#6DB98B",d:"M15.655 8.068h-.882a6.316 6.316 0 001.466-1.292 6.916 6.916 0 001.6-4.46V.821a.557.557 0 00-.558-.557h-1.495c-1.437 0-2.81.433-3.962 1.224A6.457 6.457 0 008.04.264h-.938a.557.557 0 00-.557.557v.938c0 .525.062 1.039.183 1.534-.08.066-.156.135-.229.208L.98 9.02A3.323 3.323 0 000 11.385c0 .893.348 1.733.98 2.365a3.32 3.32 0 002.365.98 3.32 3.32 0 002.2-.827 3.332 3.332 0 002.231.855h7.88c1.844 0 3.344-1.5 3.344-3.345 0-1.844-1.5-3.345-3.345-3.345zm1.069-6.69v.938a5.815 5.815 0 01-1.344 3.75c-1.052 1.272-2.713 2.002-4.557 2.002l2.393-2.393a.557.557 0 10-.789-.788L9.892 7.422a5.865 5.865 0 011.31-3.854 5.87 5.87 0 014.584-2.19h.938zm-9.065 0h.38a5.34 5.34 0 012.885.846 7.103 7.103 0 00-.7.785l-.353-.352a.557.557 0 10-.788.788l.521.522a6.97 6.97 0 00-.561 1.382 5.307 5.307 0 01-1.384-3.59v-.38zM7.127 4.45a6.42 6.42 0 001.674 2.213c-.04.465-.034.935.02 1.405H7.776c-.427 0-.837.081-1.213.228L4.92 6.655 7.127 4.45zm-5.359 8.512a2.215 2.215 0 01-.653-1.577c0-.596.232-1.156.653-1.577l2.365-2.365 1.448 1.448a3.338 3.338 0 00-.731 4.14 2.214 2.214 0 01-1.505.584 2.215 2.215 0 01-1.577-.653zm3.779-1.55c0-1.229 1-2.229 2.23-2.229h3.344v4.46H7.776c-1.23 0-2.23-1-2.23-2.23zm10.108 2.23h-3.419V9.184h3.42c1.229 0 2.23 1 2.23 2.23s-1.001 2.23-2.23 2.23z"})}),"legal-advisor":()=>(0,W.jsxs)("svg",{width:"18",height:"18",fill:"none",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsxs)("g",{fill:"#24C21A",stroke:"#24C21A",strokeWidth:".2",clipPath:"url(#clip0_1116_1074)",children:[(0,W.jsx)("path",{d:"M16.417 0H3.693C2.82 0 2.11.71 2.11 1.582v.84h-.53c-.87 0-1.58.71-1.58 1.582v9.435c0 .872.71 1.582 1.582 1.582h1.17v1.92c0 .936 1.119 1.37 1.726.811l2.983-2.731h6.845c.872 0 1.581-.71 1.581-1.582v-.84h.53c.872 0 1.581-.71 1.581-1.582V1.582C17.998.71 17.29 0 16.417 0zm-1.584 13.44c0 .29-.237.526-.527.526H7.325a.701.701 0 00-.475.185l-3.044 2.787v-2.269a.704.704 0 00-.703-.703H1.582a.528.528 0 01-.528-.527V4.004c0-.29.237-.527.528-.527h12.724c.29 0 .527.236.527.527v9.435zm2.11-2.423c0 .29-.236.527-.526.527h-.53v-7.54c0-.872-.71-1.582-1.581-1.582H3.166v-.84c0-.291.236-.528.527-.528h12.724c.29 0 .527.237.527.528v9.435z"}),(0,W.jsx)("path",{d:"M11.609 6.423a.53.53 0 00-.478-.305h-2.62V5.06a.527.527 0 10-1.055 0v1.058h-2.62a.53.53 0 00-.478.305L3.337 8.615a1.655 1.655 0 102.999 0l-.672-1.442h1.793v4.675H6.314a.527.527 0 100 1.054h3.34a.527.527 0 000-1.054H8.51V7.173h1.793l-.6 1.288a1.576 1.576 0 102.855 0l-.95-2.038zM4.836 9.914a.6.6 0 01-.544-.853l.544-1.168.544 1.168a.6.6 0 01-.544.853zm6.295-.266a.52.52 0 01-.472-.741l.472-1.014.472 1.014a.52.52 0 01-.472.74z"})]}),(0,W.jsx)("defs",{children:(0,W.jsx)("clipPath",{id:"clip0_1116_1074",children:(0,W.jsx)("path",{fill:"#fff",d:"M0 0h18v18H0z"})})})]}),"life-coach":()=>(0,W.jsxs)("svg",{width:"20",height:"20",fill:"none",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("path",{stroke:"#C082FF",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",strokeWidth:"1.4",d:"M7.89 12.6v1.71a49.353 49.353 0 00-3.726.473c-1.524.25-2.637 1.611-2.637 3.155v.535h16.946v-.535c0-1.544-1.113-2.905-2.637-3.155a49.35 49.35 0 00-3.727-.473V12.6"}),(0,W.jsx)("path",{stroke:"#C082FF",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",strokeWidth:"1.3",d:"M8.945 11.055a1.055 1.055 0 11-2.11 0 1.055 1.055 0 012.11 0zM7.89 10H10"}),(0,W.jsx)("path",{stroke:"#C082FF",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",strokeWidth:"1.4",d:"M12.11 14.219a2.11 2.11 0 01-4.22 0M5.781 5.781c2.11 0 2.11-1.054 4.219-1.054 2.11 0 2.11 1.054 4.219 1.054"}),(0,W.jsx)("path",{fill:"#C082FF",d:"M8.945 6.836a.527.527 0 11-1.054 0 .527.527 0 011.054 0zm3.165 0a.527.527 0 11-1.055 0 .527.527 0 011.054 0z"}),(0,W.jsx)("path",{stroke:"#C082FF",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",strokeWidth:"1.4",d:"M5.781 6.836V5.78c0-2.33 1.89-4.254 4.219-4.254 2.33 0 4.219 1.924 4.219 4.254v1.055a1.055 1.055 0 010 2.11 4.219 4.219 0 01-8.438 0 1.055 1.055 0 110-2.11zM10 2.582V1.527"})]}),"marketing-tutor":()=>(0,W.jsxs)("svg",{width:"18",height:"18",fill:"none",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsxs)("g",{fill:"#A8AC40",stroke:"#A8AC40",strokeWidth:".2",clipPath:"url(#clip0_1116_1240)",children:[(0,W.jsx)("path",{d:"M6.89 3.234a2.953 2.953 0 10-5.906 0 2.953 2.953 0 005.907 0zM3.939 5.063a1.828 1.828 0 110-3.657 1.828 1.828 0 010 3.657zm11.663 5.203a2.953 2.953 0 10-5.906 0 2.953 2.953 0 005.906 0zm-2.954 1.828a1.829 1.829 0 110-3.658 1.829 1.829 0 010 3.658zM7.834 5.523a.563.563 0 00.634.008L10.014 4.5h4.33a.563.563 0 00.562-.563V.563A.562.562 0 0014.344 0H8.719a.563.563 0 00-.563.563V2.69L7.61 4.929a.562.562 0 00.224.594zM9.28 2.76V1.125h4.5v2.25H9.844c-.238-.024-.608.31-.799.419 0 0 .236-.99.236-1.035z"}),(0,W.jsx)("path",{d:"M17.438 14.063h-.563a.562.562 0 100 1.124v1.688H15.75v-2.25a1.408 1.408 0 00-1.406-1.406h-3.375a1.407 1.407 0 00-1.287.844h-7.15v-1.97a.563.563 0 00-.563-.562h-.563a.281.281 0 01-.281-.281V7.594a.282.282 0 01.281-.282h7.017l-2.78 1.472a.563.563 0 00-.3.497v3.656a.562.562 0 101.126 0V9.62l3.48-1.843a.844.844 0 00-.394-1.59H1.406A1.408 1.408 0 000 7.595v3.656a1.408 1.408 0 001.406 1.406v1.406H.563a.562.562 0 00-.563.563v2.813A.562.562 0 00.563 18h16.875a.562.562 0 00.562-.563v-2.812a.562.562 0 00-.563-.563zm-7.875 2.812H1.124v-1.688h8.438v1.688zm5.062 0h-3.938v-2.25a.281.281 0 01.282-.281h3.375a.281.281 0 01.281.281v2.25z"}),(0,W.jsx)("path",{d:"M2.531 10.969a.563.563 0 100-1.125.563.563 0 000 1.125z"})]}),(0,W.jsx)("defs",{children:(0,W.jsx)("clipPath",{id:"clip0_1116_1240",children:(0,W.jsx)("path",{fill:"#fff",d:"M0 0h18v18H0z"})})})]}),"online-course":()=>(0,W.jsxs)("svg",{width:"16",height:"20",fill:"none",viewBox:"0 0 16 20",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("path",{fill:"#94B799",d:"M8.6 8.64a.614.614 0 00-.6-.63c-.331 0-.6.282-.6.628h1.2zm-1.2 9.278c0 .347.269.628.6.628.331 0 .6-.281.6-.628H7.4zM6.1 4.044a.644.644 0 00-.22.858c.167.3.534.403.82.23l-.6-1.088zm3.2 1.087a.586.586 0 00.82-.229.644.644 0 00-.22-.858l-.6 1.087zM4.457 2.163a.647.647 0 00-.15.875c.19.284.564.354.836.155l-.686-1.03zm6.4 1.03a.583.583 0 00.835-.155.647.647 0 00-.149-.875l-.686 1.03zM7.4 8.64v9.279h1.2v-9.28H7.4zM2.81 7.283c1.389.16 3.178.584 4.415 1.466l.676-1.038C6.419 6.655 4.394 6.2 2.94 6.034l-.13 1.249zm0 10.002c1.389.16 3.178.584 4.415 1.466l.676-1.038c-1.482-1.056-3.507-1.51-4.96-1.676l-.13 1.248zM1 7.911v7.335h1.2V7.911H1zm1.942 8.126c-.437-.05-.742-.413-.742-.79H1c0 1.095.843 1.927 1.81 2.038l.132-1.248zm0-10.003C1.847 5.908 1 6.841 1 7.911h1.2c0-.403.3-.664.61-.628l.132-1.249zm10.116 0c-1.452.167-3.477.62-4.959 1.677l.676 1.038c1.237-.882 3.026-1.307 4.414-1.466l-.13-1.249zm0 10.003c-1.452.167-3.477.62-4.959 1.677l.676 1.037c1.237-.882 3.026-1.306 4.414-1.466l-.13-1.248zM13.8 7.91v7.335H15V7.911h-1.2zm-.61 9.374A2.056 2.056 0 0015 15.246h-1.2c0 .378-.305.74-.742.79l.131 1.25zm0-10.002c.31-.036.61.225.61.628H15c0-1.07-.847-2.003-1.942-1.877l.131 1.249zM7.224 18.75a1.332 1.332 0 001.55 0l-.676-1.038a.177.177 0 01-.198 0l-.676 1.038zm0-10.002a1.332 1.332 0 001.55 0L8.099 7.71a.176.176 0 01-.198 0l-.676 1.038zM6.7 5.13A2.498 2.498 0 018 4.767V3.512c-.691 0-1.34.193-1.9.532l.6 1.087zM8 4.767a2.5 2.5 0 011.3.364l.6-1.087A3.657 3.657 0 008 3.512v1.255zM5.143 3.193A4.823 4.823 0 018 2.256V1c-1.316 0-2.539.43-3.543 1.163l.686 1.03zM8 2.256c1.063 0 2.047.346 2.857.937l.686-1.03A5.987 5.987 0 008 1v1.256z"}),(0,W.jsx)("path",{stroke:"#94B799",strokeWidth:".2",d:"M8.6 8.64a.614.614 0 00-.6-.63c-.331 0-.6.282-.6.628m1.2 0H7.4m1.2 0v9.279M7.4 8.639v9.279m0 0c0 .347.269.628.6.628.331 0 .6-.281.6-.628m-1.2 0h1.2M2.876 6.658l-.065.625m0 0c1.388.16 3.177.584 4.414 1.466M2.811 7.283l.13-1.249m-.13 1.249c-.31-.036-.611.225-.611.628m5.363.319l.338-.52m0 0l-.676 1.04m.676-1.038C6.419 6.655 4.394 6.2 2.94 6.034M7.9 7.711c.057.04.141.04.198 0m-5.223 8.95l.066-.624m0 0c1.452.167 3.477.62 4.959 1.677m-4.96-1.677l-.13 1.248m.13-1.248c-.436-.05-.741-.413-.741-.79m5.363 2.985l.338-.518m0 0l-.676 1.037m.676-1.038a.175.175 0 00.198 0m5.025-11.055l-.066-.624m0 0c-1.452.167-3.477.62-4.959 1.677m4.96-1.677l.13 1.249m-.13-1.249C14.152 5.908 15 6.841 15 7.911m-6.563.319L8.1 7.71m0 0l.676 1.039m4.349 7.912l-.066-.624m0 0c-1.452.167-3.477.62-4.959 1.677m4.96-1.677l.13 1.248m-.13-1.248c.436-.05.741-.413.741-.79m-5.363 2.985l-.338-.518m0 0l.676 1.037M6.1 4.044a.644.644 0 00-.22.858c.167.3.534.403.82.23m-.6-1.088l.6 1.087m-.6-1.087A3.657 3.657 0 018 3.512m-1.3 1.62A2.498 2.498 0 018 4.766m1.3.364a.586.586 0 00.82-.229.644.644 0 00-.22-.858M9.3 5.13l.6-1.087M9.3 5.13A2.498 2.498 0 008 4.767m1.9-.723A3.657 3.657 0 008 3.512M4.457 2.163a.647.647 0 00-.15.875c.19.284.564.354.836.155m-.686-1.03l.686 1.03m-.686-1.03A5.987 5.987 0 018 1M5.143 3.193A4.823 4.823 0 018 2.256m2.857.937a.583.583 0 00.835-.155.647.647 0 00-.149-.875m-.686 1.03l.686-1.03m-.686 1.03A4.823 4.823 0 008 2.256m3.543-.093A5.987 5.987 0 008 1m-.775 7.749a1.332 1.332 0 001.55 0M2.942 6.034C1.847 5.908 1 6.841 1 7.911m1.81 9.374c1.389.16 3.178.584 4.415 1.466m-4.414-1.466A2.056 2.056 0 011 15.246m6.225 3.505a1.332 1.332 0 001.55 0M1 7.911v7.335m0-7.335h1.2M1 15.246h1.2m0 0V7.911m6.575.838c1.237-.882 3.026-1.307 4.414-1.466m0 0c.31-.036.611.225.611.628m-5.025 10.84c1.237-.882 3.026-1.306 4.414-1.466m0 0A2.056 2.056 0 0015 15.246m-1.2-7.335v7.335m0-7.335H15m-1.2 7.335H15m0 0V7.911M8 4.767V3.512m0-1.256V1"})]}),"online-fitness-trainer":()=>(0,W.jsxs)("svg",{width:"18",height:"18",fill:"none",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("g",{clipPath:"url(#clip0_1116_1412)",children:(0,W.jsx)("path",{fill:"#8387B3",stroke:"#8387B3",strokeWidth:".3",d:"M14.98 8.219l-2.777-.278a3.333 3.333 0 00.503-1.765c-.001-2.967.003-2.82-.003-2.966.602.084 1.603.367 2.203 1.31l.894-.569c-.968-1.52-2.63-1.785-3.327-1.827A3.358 3.358 0 009.353 0h-.706a3.357 3.357 0 00-3.353 3.353v2.823c0 .667.196 1.288.532 1.81L3.05 8.24A3.353 3.353 0 000 11.58V18h18v-6.445a3.353 3.353 0 00-3.02-3.336zM9 12.706a.53.53 0 11-.001 1.06.53.53 0 01.001-1.06zm.411-1.005a1.585 1.585 0 00-.822 0L7.353 9.27c.398.167.836.26 1.294.26h.706a3.34 3.34 0 001.294-.26L9.411 11.7zm-3.05-8.525h5.279c.014.185.004.025.007 3a2.297 2.297 0 01-2.294 2.295h-.706a2.297 2.297 0 01-2.294-2.295c.003-2.947-.007-2.813.007-3zM8.646 1.06h.706c.81 0 1.523.423 1.932 1.059h-4.57a2.294 2.294 0 011.932-1.06zM1.06 16.94v-2.117h2.117v2.117H1.06zm15.882 0h-2.117v-2.117h2.117v2.117zm-3.176-3.176v3.176h-9.53v-3.176H1.06v-2.187c0-1.194.897-2.176 2.086-2.284l2.899-.264 1.667 3.28a1.59 1.59 0 001.819 2.423v1.15h1.058v-2.648a1.58 1.58 0 00-.298-.925L11.972 9h.178l2.725.273a2.287 2.287 0 012.066 2.282v2.21h-3.176z"})}),(0,W.jsx)("defs",{children:(0,W.jsx)("clipPath",{id:"clip0_1116_1412",children:(0,W.jsx)("path",{fill:"#fff",d:"M0 0h18v18H0z"})})})]}),"pet-care":()=>(0,W.jsx)("svg",{width:"22",height:"19",fill:"none",viewBox:"0 0 22 19",xmlns:"http://www.w3.org/2000/svg",children:(0,W.jsx)("path",{fill:"#714566",stroke:"#714566",strokeWidth:".3",d:"M14.374 9.878c-.9-1.446-2.433-2.309-4.1-2.309-1.668 0-3.2.863-4.1 2.309l-2.169 3.484a3.226 3.226 0 00-.48 1.93c.046.685.299 1.323.732 1.845a3.048 3.048 0 001.656 1.032 2.98 2.98 0 001.928-.189l.04-.018a5.899 5.899 0 014.826.018 2.99 2.99 0 001.926.19 3.048 3.048 0 001.657-1.032c.434-.522.687-1.16.733-1.845a3.226 3.226 0 00-.48-1.931l-2.169-3.484zm1.025 6.475a1.862 1.862 0 01-2.22.522 7.04 7.04 0 00-5.81 0l-.026.012c-.77.335-1.65.123-2.195-.534a2.002 2.002 0 01-.156-2.34l2.169-3.484c.683-1.097 1.847-1.753 3.113-1.753s2.43.656 3.113 1.753l2.168 3.484a2.002 2.002 0 01-.156 2.34zM4.59 9.873c.645-.255 1.135-.79 1.38-1.507a3.234 3.234 0 00-.054-2.17c-.268-.715-.756-1.3-1.372-1.645-.649-.363-1.36-.422-2.005-.166-1.296.513-1.89 2.162-1.325 3.676.451 1.206 1.504 1.967 2.568 1.967.272 0 .544-.05.808-.155zM2.308 7.627c-.333-.892-.04-1.841.652-2.116a1.06 1.06 0 01.393-.074c.208 0 .423.058.63.175.373.208.67.57.839 1.019.167.449.182.923.042 1.334-.13.378-.376.655-.695.781h0c-.692.275-1.527-.227-1.861-1.119zm6.489-.483c1.62 0 2.938-1.546 2.938-3.447 0-1.9-1.318-3.447-2.938-3.447S5.859 1.796 5.859 3.697c0 1.9 1.318 3.447 2.938 3.447zm0-5.687c.973 0 1.765 1.005 1.765 2.24 0 1.235-.792 2.24-1.765 2.24-.974 0-1.765-1.005-1.765-2.24 0-1.235.791-2.24 1.765-2.24zm5.074 6.533h0c.25.086.504.127.757.127 1.181 0 2.332-.886 2.772-2.246.253-.784.236-1.612-.047-2.332-.296-.755-.846-1.302-1.547-1.542-.7-.24-1.46-.14-2.135.282-.646.402-1.14 1.055-1.393 1.839-.533 1.652.182 3.39 1.593 3.873zm-.48-3.492c.165-.511.48-.933.888-1.187.377-.235.788-.295 1.158-.168.37.126.664.428.83.848.178.455.186.987.02 1.499-.33 1.02-1.247 1.628-2.046 1.355-.798-.273-1.18-1.326-.85-2.347zm6.667 3.091h0c-1.117-.85-2.788-.482-3.725.82-.936 1.304-.79 3.057.326 3.907.407.31.888.459 1.38.459.857 0 1.749-.451 2.345-1.28.936-1.303.79-3.056-.326-3.906zm-.616 3.188c-.553.769-1.488 1.024-2.085.569-.596-.455-.633-1.45-.081-2.218.366-.51.902-.794 1.396-.794.25 0 .488.072.689.225.596.455.632 1.45.08 2.218z"})}),"real-estate":()=>(0,W.jsx)("svg",{width:"20",height:"20",fill:"none",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:(0,W.jsx)("path",{fill:"#D2782C",fillRule:"evenodd",stroke:"#fff",strokeWidth:".1",d:"M11.553 1.28a.9.9 0 01-.034 1.272l-.21.2 5.6 5.307.019.017 1.791 1.698a.9.9 0 11-1.238 1.305l-.562-.532-1.23 7.695A.9.9 0 0114.8 19H5.2a.9.9 0 01-.889-.758l-1.23-7.695-.562.532a.9.9 0 01-1.238-1.305l1.791-1.698a.931.931 0 01.018-.017l7.19-6.812a.9.9 0 011.273.034zm3.783 7.767L10 3.992 4.664 9.047l1.304 8.154h8.064l1.304-8.154zM6.85 11.705c0-1.7 1.379-3.078 3.08-3.078h.14a3.079 3.079 0 110 6.156h-.14a3.079 3.079 0 01-3.08-3.078zm4.5 0a1.28 1.28 0 00-1.28-1.279h-.14a1.28 1.28 0 100 2.558h.14a1.28 1.28 0 001.28-1.279z",clipRule:"evenodd"})}),"sass-product":()=>(0,W.jsxs)("svg",{width:"19",height:"20",fill:"none",viewBox:"0 0 19 20",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("path",{stroke:"#DBBB94",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",strokeWidth:"1.6",d:"M14.466 5.265a.8.8 0 00.8.8c1.14 0 2.098.997 2.098 2.473 0 1.42-1.06 2.473-2.25 2.473h-11.9c-1.19 0-2.25-1.054-2.25-2.473 0-1.476.958-2.473 2.098-2.473a.8.8 0 00.8-.8c0-1.42 1.06-2.473 2.251-2.473.245 0 .49.054.742.151a.8.8 0 00.927-.265c.708-.94 1.751-1.522 2.908-1.522 2.033 0 3.776 1.786 3.776 4.109zM9.16 18.356V11.81"}),(0,W.jsx)("mask",{id:"a",fill:"#fff",children:(0,W.jsx)("path",{d:"M6.111 11.81v4.91h-3.05"})}),(0,W.jsx)("path",{fill:"#DBBB94",d:"M7.711 11.81a1.6 1.6 0 00-3.2 0h3.2zm-1.6 4.91v1.6a1.6 1.6 0 001.6-1.6h-1.6zm-3.05-1.6a1.6 1.6 0 100 3.2v-3.2zm1.45-3.31v4.91h3.2v-4.91h-3.2zm1.6 3.31h-3.05v3.2h3.05v-3.2z",mask:"url(#a)"}),(0,W.jsx)("mask",{id:"b",fill:"#fff",children:(0,W.jsx)("path",{d:"M12.215 11.81v4.91h3.05"})}),(0,W.jsx)("path",{fill:"#DBBB94",d:"M13.815 11.81a1.6 1.6 0 00-3.2 0h3.2zm-1.6 4.91h-1.6a1.6 1.6 0 001.6 1.6v-1.6zm3.05 1.6a1.6 1.6 0 000-3.2v3.2zm-4.65-6.51v4.91h3.2v-4.91h-3.2zm1.6 6.51h3.05v-3.2h-3.05v3.2z",mask:"url(#b)"})]}),"software-firm":()=>(0,W.jsxs)("svg",{width:"18",height:"18",fill:"none",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsxs)("g",{fill:"#176D5A",stroke:"#176D5A",strokeWidth:".3",clipPath:"url(#clip0_1116_1368)",children:[(0,W.jsx)("path",{d:"M10.247 18H7.752a1.286 1.286 0 01-1.26-1.012l-.317-1.404a6.894 6.894 0 01-1.466-.851l-1.366.431a1.303 1.303 0 01-1.518-.59L.58 12.421a1.311 1.311 0 01.242-1.601l1.059-.973a7.557 7.557 0 010-1.696L.826 7.184a1.31 1.31 0 01-.25-1.599L1.83 3.422a1.298 1.298 0 011.512-.586l1.368.431c.46-.347.951-.632 1.466-.85L6.49 1.01A1.286 1.286 0 017.752 0h2.495c.609 0 1.127.416 1.26 1.012l.317 1.405a6.887 6.887 0 011.465.85l1.367-.431a1.301 1.301 0 011.518.59l1.243 2.152a1.311 1.311 0 01-.241 1.601l-1.06.973a7.543 7.543 0 010 1.696l1.055.968.005.005c.439.412.54 1.068.245 1.594l-1.25 2.164a1.299 1.299 0 01-1.514.585l-1.368-.432c-.46.348-.951.633-1.466.85l-.316 1.406A1.285 1.285 0 0110.247 18zm-5.422-4.456c.129 0 .256.044.358.128.514.424 1.077.75 1.671.97a.564.564 0 01.354.405l.382 1.694a.17.17 0 00.164.134h2.494a.171.171 0 00.164-.133l.381-1.695a.562.562 0 01.354-.404 5.785 5.785 0 001.671-.97.56.56 0 01.528-.103l1.65.522c.078.024.162-.003.2-.07l1.25-2.163a.182.182 0 00-.037-.217l-1.266-1.164a.559.559 0 01-.174-.498 6.55 6.55 0 000-1.96.563.563 0 01.174-.498l1.27-1.167a.183.183 0 00.03-.22l-1.244-2.151c-.04-.071-.122-.099-.204-.075l-1.649.52a.56.56 0 01-.527-.102 5.772 5.772 0 00-1.67-.97.564.564 0 01-.355-.404l-.382-1.695a.175.175 0 00-.165-.133H7.752a.171.171 0 00-.163.133l-.382 1.696a.562.562 0 01-.353.404 5.771 5.771 0 00-1.671.97.562.562 0 01-.528.102l-1.65-.521c-.078-.024-.162.004-.2.07L1.556 6.14a.183.183 0 00.038.218l1.265 1.163a.56.56 0 01.175.498 6.543 6.543 0 000 1.96.563.563 0 01-.175.498L1.59 11.645a.183.183 0 00-.03.22l1.244 2.151a.168.168 0 00.204.075l1.648-.52a.548.548 0 01.17-.027z"}),(0,W.jsx)("path",{d:"M8.438 12a.563.563 0 01-.549-.688l1.125-4.875a.563.563 0 011.096.252l-1.125 4.874a.561.561 0 01-.547.437zm3-.75a.561.561 0 01-.377-.981L12.472 9l-1.41-1.269a.563.563 0 01.752-.837l1.875 1.688a.565.565 0 010 .836l-1.875 1.688a.561.561 0 01-.376.144zm-4.875 0a.561.561 0 01-.377-.144L4.311 9.419a.565.565 0 010-.837l1.875-1.688a.563.563 0 01.753.837L5.529 9l1.41 1.269a.563.563 0 01-.377.981z"})]}),(0,W.jsx)("defs",{children:(0,W.jsx)("clipPath",{id:"clip0_1116_1368",children:(0,W.jsx)("path",{fill:"#fff",d:"M0 0h18v18H0z"})})})]}),webniar:()=>(0,W.jsx)("svg",{width:"22",height:"20",fill:"none",viewBox:"0 0 22 20",xmlns:"http://www.w3.org/2000/svg",children:(0,W.jsxs)("g",{fill:"#05E4BA",stroke:"#05E4BA",strokeWidth:".3",children:[(0,W.jsx)("path",{d:"M4.396 15.676h13.207a2.765 2.765 0 002.762-2.763V3.762A2.765 2.765 0 0017.603.999H4.396a2.765 2.765 0 00-2.761 2.763v9.151a2.765 2.765 0 002.761 2.763zM2.848 3.762a1.55 1.55 0 011.548-1.55h13.207a1.55 1.55 0 011.55 1.55v9.151a1.55 1.55 0 01-1.55 1.55H4.396a1.55 1.55 0 01-1.548-1.55V3.762z"}),(0,W.jsx)("path",{d:"M9.225 11.73a1.917 1.917 0 001.986-.137l2.394-1.692a1.918 1.918 0 000-3.128L11.21 5.082a1.906 1.906 0 00-1.986-.136 1.909 1.909 0 00-1.035 1.7v3.383a1.91 1.91 0 001.036 1.7zm.178-5.084c0-.267.141-.5.38-.624a.696.696 0 01.728.05l2.393 1.692a.693.693 0 01.297.573c0 .231-.109.44-.297.574l-2.394 1.692a.69.69 0 01-.728.05.69.69 0 01-.38-.624V6.646zm11.029 11.141H1.567a.606.606 0 000 1.213h18.865a.606.606 0 000-1.213z"})]})}),"weight-loss":()=>(0,W.jsx)("svg",{width:"18",height:"18",fill:"none",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",children:(0,W.jsx)("path",{fill:"#B46B42",d:"M8.998 0A4.504 4.504 0 004.94 2.571H1.929A1.939 1.939 0 000 4.5v11.572C0 17.128.871 18 1.929 18h14.143A1.939 1.939 0 0018 16.072V4.5a1.939 1.939 0 00-1.928-1.929h-3.013A4.512 4.512 0 008.998 0zm0 1.286a3.207 3.207 0 013.218 3.213 3.211 3.211 0 01-3.218 3.218 3.207 3.207 0 01-3.214-3.218 3.202 3.202 0 013.214-3.213zm-.01.631a.643.643 0 00-.63.654v2.573a.643.643 0 101.285 0V2.573a.643.643 0 00-.654-.656zm-7.06 1.94H4.55a4.52 4.52 0 00-.051.642 4.512 4.512 0 004.498 4.504 4.516 4.516 0 004.504-4.504c0-.219-.02-.432-.051-.642h2.621c.368 0 .643.276.643.643v11.572a.628.628 0 01-.643.643H1.93a.628.628 0 01-.643-.643V4.5c0-.367.275-.643.643-.643zm3.216 7.713a.643.643 0 100 1.286h7.712a.643.643 0 100-1.286H5.144zm0 2.572a.643.643 0 100 1.285h7.712a.643.643 0 100-1.285H5.144z"})}),"yoga-instructor":()=>(0,W.jsxs)("svg",{width:"18",height:"18",fill:"none",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsxs)("g",{clipPath:"url(#clip0_1116_1402)",children:[(0,W.jsx)("path",{fill:"#000",d:"M4.086 14.456a1.681 1.681 0 00-1.16-.464v1.055c.349 0 .633.284.633.633v.21h1.054v-.21c0-.35.284-.633.633-.633v-1.055c-.449 0-.857.177-1.16.464z"}),(0,W.jsx)("path",{fill:"#10299D",stroke:"#10299D",strokeWidth:".2",d:"M15.754 13.27c-.163 0-.323.012-.48.037a3.018 3.018 0 00-.836-1.571l-1.196-1.197-.906.906a6.775 6.775 0 00-2.802-1.863c.47-.317.87-.732 1.171-1.215h2.75V4.472A4.477 4.477 0 008.983 0h-3.36A4.477 4.477 0 001.15 4.472v3.895H3.9a4.04 4.04 0 001.18 1.22 6.761 6.761 0 00-4.527 6.374V18h13.853a3.043 3.043 0 003.04-3.04v-1.69h-1.692zm-2.512-1.239c.518.511.933.864 1.019 1.631-.407.23-.756.552-1.019.938a3.064 3.064 0 00-1.019-.938c.086-.766.502-1.121 1.019-1.63zm-1.606.213c-.21.325-.354.686-.426 1.063-.324-.07-1.817-.027-2.172-.038v1.691c0 .758.28 1.452.74 1.985H7.83v-4.004l2.487-1.827a5.7 5.7 0 011.319 1.13zM7.32 10.266c.666 0 1.314.113 1.92.33L7.303 12.02l-1.93-1.418a5.672 5.672 0 011.948-.336zM2.205 7.312v-2.84a3.421 3.421 0 013.417-3.417h3.361A3.421 3.421 0 0112.4 4.472v2.84h-1.23a4.04 4.04 0 00.15-1.096V5.45c-2.814-.025-4.927.388-6.998-2.004H3.285v2.771c0 .38.053.748.15 1.096h-1.23zm5.095 1.9c-1.632 0-2.96-1.344-2.96-2.995V4.954a6.55 6.55 0 004.228 1.55h1.684C10.107 8.022 8.838 9.214 7.3 9.21zm-5.693 6.75a5.697 5.697 0 012.694-4.838l2.474 1.818v4.004H1.607v-.984zm10.471.984a1.987 1.987 0 01-1.985-1.985v-.636h.637c1.094 0 1.985.89 1.985 1.985v.636h-.637zm4.313-1.985c0 1.095-.89 1.985-1.985 1.985h-.637v-.636c0-1.095.89-1.985 1.985-1.985h.637v.636z"})]}),(0,W.jsx)("defs",{children:(0,W.jsx)("clipPath",{id:"clip0_1116_1402",children:(0,W.jsx)("path",{fill:"#fff",d:"M0 0h18v18H0z"})})})]})},Ql=e=>{let{categories:t,activeCategory:n,onSelect:l}=e;return(0,W.jsx)("div",{className:"rwpfnl-templates-categories",children:(0,W.jsxs)("ul",{children:[(0,W.jsxs)("li",{className:"all"===n?"is-active":"",onClick:()=>l("all"),role:"button",children:[(0,W.jsx)(ql,{}),"All"]}),t.map(e=>{const t=Kl[e.slug];return(0,W.jsxs)("li",{"data-value":e.slug,className:e.slug===n?"is-active":"",onClick:()=>l(e.slug),role:"button",children:[t&&(0,W.jsx)(t,{}),e.name]},e.slug)})]})})},Gl=()=>(0,W.jsxs)("svg",{width:"13",height:"12",fill:"none",viewBox:"0 0 13 12",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("path",{fill:"#7A8B9A",fillRule:"evenodd",d:"M6.707.293a1 1 0 010 1.414L2.414 6l4.293 4.293a1 1 0 01-1.414 1.414l-5-5a1 1 0 010-1.414l5-5a1 1 0 011.414 0z",clipRule:"evenodd"}),(0,W.jsx)("path",{fill:"#7A8B9A",fillRule:"evenodd",d:"M12.707.293a1 1 0 010 1.414L8.414 6l4.293 4.293a1 1 0 01-1.414 1.414l-5-5a1 1 0 010-1.414l5-5a1 1 0 011.414 0z",clipRule:"evenodd"})]}),Xl=()=>(0,W.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("path",{d:"M5.99994 1V11",stroke:"#7A8B9A",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,W.jsx)("path",{d:"M0.999947 6.00022H10.9999",stroke:"#7A8B9A",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Jl=e=>{let{spinning:t=!1}=e;return(0,W.jsxs)("svg",{className:t?"rwpfnl-templates-spinning":void 0,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("polyline",{points:"23 4 23 10 17 10"}),(0,W.jsx)("polyline",{points:"1 20 1 14 7 14"}),(0,W.jsx)("path",{d:"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"})]})},er=()=>(0,W.jsx)("svg",{width:"14",height:"14",fill:"none",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg",children:(0,W.jsx)("path",{stroke:"#7A8B9A",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12.5 1.5l-11 11m0-11l11 11"})}),tr=()=>(0,W.jsxs)("svg",{fill:"none",width:"22",height:"22",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("circle",{cx:"11",cy:"11",r:"11",fill:"#2FCF5C"}),(0,W.jsx)("path",{fill:"#fff",d:"M15.209 9.236l-1.587.396-1.983-2.471a.926.926 0 00-1.445 0L8.21 9.63l-1.618-.395a.933.933 0 00-1.124 1.124l1.093 3.842a.618.618 0 00.617.451h7.412a.618.618 0 00.618-.45l1.1-3.843a.932.932 0 00-1.1-1.124zM5.172 8.57a.772.772 0 100-1.545.772.772 0 000 1.544zm11.427 0a.772.772 0 100-1.545.772.772 0 000 1.544zm-5.714-2.626a.772.772 0 100-1.544.772.772 0 000 1.544zm3.706 10.964H7.18a.618.618 0 010-1.236h7.411a.618.618 0 110 1.236z"})]}),nr=[{name:"Layout 1",value:"layout1",steps:[{name:"Landing",value:"landing",pos_x:156,pos_y:258},{name:"Thank You",value:"thankyou",pos_x:399,pos_y:258}]},{name:"Layout 2",value:"layout2",steps:[{name:"Landing",value:"landing",pos_x:156,pos_y:258},{name:"Checkout",value:"checkout",pos_x:399,pos_y:258},{name:"Thank You",value:"thankyou",pos_x:658,pos_y:258}]},{name:"Layout 3",value:"layout3",steps:[{name:"Landing",value:"landing",pos_x:156,pos_y:258},{name:"Checkout",value:"checkout",pos_x:399,pos_y:258},{name:"Upsell",value:"upsell",pos_x:658,pos_y:258},{name:"Downsell",value:"downsell",pos_x:917,pos_y:258},{name:"Thank You",value:"thankyou",pos_x:1175,pos_y:258}]},{name:"Layout 4",value:"layout4",steps:[{name:"Landing",value:"landing",pos_x:156,pos_y:258},{name:"Checkout",value:"checkout",pos_x:399,pos_y:258},{name:"Upsell",value:"upsell",pos_x:658,pos_y:258,isCondition:!0,trueCondition:[{name:"Thank You",value:"thankyou",pos_x:1059,pos_y:111}],falseCondition:[{name:"Downsell",value:"downsell",pos_x:1059,pos_y:447},{name:"Thank You",value:"thankyou",pos_x:1317,pos_y:447}]}]},{name:"Layout 5",value:"layout5",steps:[{name:"Landing",value:"landing",pos_x:156,pos_y:258},{name:"Checkout",value:"checkout",isCondition:!0,pos_x:399,pos_y:258,trueCondition:[{name:"Upsell",value:"upsell",pos_x:800,pos_y:111},{name:"Thank You",value:"thankyou",pos_x:1059,pos_y:111}],falseCondition:[{name:"Downsell",value:"downsell",pos_x:800,pos_y:447},{name:"Thank You",value:"thankyou",pos_x:1059,pos_y:447}]}]},{name:"Layout 6",value:"layout6",steps:[{name:"Landing",value:"landing",pos_x:156,pos_y:258,isCondition:!0,trueCondition:[{name:"Thank You",value:"thankyou",pos_x:556,pos_y:111}],falseCondition:[{name:"Custom",value:"custom",pos_x:556,pos_y:447},{name:"Thank You",value:"thankyou",pos_x:814,pos_y:447}]}]}],lr=e=>{let{isPro:t,type:l,busy:r,submitLabel:a,upgradeUrl:s,storeCheckout:o=!1,onCancel:c,onCreate:u}=e;const[d,p]=(0,i.useState)(""),[f,h]=(0,i.useState)(null),[m,v]=(0,i.useState)(""),[g,w]=(0,i.useState)(null);return(0,i.useEffect)(()=>{if(o)return;let e=!0;return n.e("src_admin_pages_FunnelTemplates_layoutIcons_jsx").then(n.bind(n,17042)).then(t=>{e&&w(t)}),()=>{e=!1}},[o]),(0,i.useEffect)(()=>{if(!m)return;const e=setTimeout(()=>v(""),3e3);return()=>clearTimeout(e)},[m]),(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)("div",{className:"rwpfnl-templates-overlay",onClick:c}),(0,W.jsxs)("div",{className:"rwpfnl-layout-modal"+(o?" is-compact":""),children:[(0,W.jsx)("span",{className:"rwpfnl-layout-modal-close",onClick:c,role:"button",children:(0,W.jsx)(er,{})}),(0,W.jsxs)("form",{onSubmit:e=>{e.preventDefault(),d.trim()?u(d.trim(),f||{}):v(o?"Please enter store checkout name":"Please enter funnel name")},children:[(0,W.jsxs)("div",{className:"rwpfnl-layout-modal-field",children:[(0,W.jsx)("label",{htmlFor:"rwpfnl-funnel-name",children:o?"Name of your store checkout":"Name of your funnel"}),(0,W.jsx)("input",{id:"rwpfnl-funnel-name",type:"text",placeholder:o?"Enter your store checkout name":"Enter your funnel name",value:d,onChange:e=>p(e.target.value)})]}),!o&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)("p",{className:"rwpfnl-layout-modal-subtitle",children:"Select Funnel layout"}),(0,W.jsx)("div",{className:"rwpfnl-layouts",children:nr.map((e,n)=>{const r=!t&&n>1,a=g?g[`FunnelLayout${n+1}`]:null;return(0,W.jsxs)("div",{className:`rwpfnl-layout rwpfnl-layout--${n+1}${f&&f.value===e.value?" is-active":""}`,onClick:()=>((e,n)=>{if(t||!(e>1))if(f&&f.value===n.value)h(null);else{if(!((e,t,n)=>!(!t&&e>1||"lead"===n&&(t?0!==e&&5!==e:0!==e)))(e,t,l))return v("This is only for sales funnel"),void h(null);v(""),h(n)}})(n,e),role:"button",children:[r&&(0,W.jsx)("a",{className:"rwpfnl-layout-pro-tag",href:s,target:"_blank",rel:"noreferrer",onClick:e=>e.stopPropagation(),children:(0,W.jsx)(tr,{})}),(0,W.jsx)("span",{className:"rwpfnl-layout-inner"+(r?" is-locked":""),children:(0,W.jsx)("span",{className:"rwpfnl-layout-art",children:a&&(0,W.jsx)(a,{})})})]},e.value)})})]}),(0,W.jsxs)("div",{className:"rwpfnl-layout-modal-actions",children:[m&&(0,W.jsx)("span",{className:"rwpfnl-templates-alert",children:m}),(0,W.jsx)("button",{type:"submit",disabled:r,children:a})]})]})]})]})},rr=["gutenberg","elementor"],ar=()=>(0,W.jsxs)("div",{className:"rwpfnl-template-notice rwpfnl-templates-wide",children:[(0,W.jsx)("h4",{className:"rwpfnl-template-notice-title",children:"Create your funnel with shortcodes!"}),(0,W.jsx)("p",{children:"Hello there. We believe you are using a page builder other than Gutenberg, Elementor, Divi, Oxygen, or Bricks."}),(0,W.jsx)("p",{children:"In this case, to make your funnel function, you should be using shortcodes on specific cases which include"}),(0,W.jsxs)("ul",{children:[(0,W.jsx)("li",{children:"The CTA buttons and opt-in form on the Landing page (or custom page)"}),(0,W.jsx)("li",{children:"The checkout form on the Checkout page"}),(0,W.jsx)("li",{children:"The order details on the Thank you page"}),(0,W.jsx)("li",{children:"Offer Accept/Reject button in the Upsell & Downsell pages."})]}),(0,W.jsx)("p",{children:"And it's really simple."}),(0,W.jsxs)("ol",{children:[(0,W.jsxs)("li",{children:["Find the list of shortcodes"," ",(0,W.jsx)("a",{href:"https://getwpfunnels.com/docs/wpfunnels-shortcodes/",target:"_blank",rel:"noreferrer",children:"here"})]}),(0,W.jsx)("li",{children:"Choose the one you want to use and copy it."}),(0,W.jsx)("li",{children:"Paste it where you want to place the element when editing a funnel page."}),(0,W.jsx)("li",{children:"Save and preview to see it in action."})]}),(0,W.jsx)("p",{children:"You may utilize associated parameters to customize the elements."})]}),sr=e=>{let{builder:t,plugin:n,canInstall:l,installing:r,error:a,onInstall:s}=e;const i=(e=>e.charAt(0).toUpperCase()+e.slice(1))(t),o=n&&n.name||i,c=l&&rr.includes(t);return(0,W.jsxs)("div",{className:"rwpfnl-template-notice rwpfnl-templates-wide",children:[(0,W.jsx)("h4",{className:"rwpfnl-template-notice-title",children:"gutenberg"===t?`Oops! It looks like ${o} is inactive.`:"Oops! It looks like the page builder you selected is inactive."}),(0,W.jsxs)("p",{children:["It seems like you have selected ",i," as your preferred page builder, but you do not have ",o," activated on your site. You see, we create funnel templates for"," ",i," using ",o,".",(0,W.jsx)("br",{}),"Please install and activate ",o," to import funnel templates for ",i,".",c&&(0,W.jsxs)("a",{href:"#",onClick:e=>{e.preventDefault(),s()},children:[" ","Click here to install & activate ",o,r&&(0,W.jsxs)("span",{className:"rwpfnl-templates-dots",children:[(0,W.jsx)("span",{children:"."}),(0,W.jsx)("span",{children:"."}),(0,W.jsx)("span",{children:"."})]})]})]}),(0,W.jsxs)("p",{children:["If you want to create & design funnel pages without using ",o,", then don't worry."," ",(0,W.jsx)("b",{children:"You can go ahead and create funnels from scratch using any page builder/editor. It will work just fine."})]}),a&&(0,W.jsx)("span",{className:"rwpfnl-template-notice-error",children:a})]})},ir=[{value:"desktop",Icon:()=>(0,W.jsx)("svg",{fill:"none",width:"23",height:"20",viewBox:"0 0 23 20",xmlns:"http://www.w3.org/2000/svg",children:(0,W.jsx)("path",{stroke:"#B5BAC4",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M20.25 1h-18c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h18c.621 0 1.125-.504 1.125-1.125V2.125c0-.621-.504-1.125-1.125-1.125zM5.628 18.999h11.25M7.875 14.5V19m6.75-4.5V19"})})},{value:"tablet",Icon:()=>(0,W.jsxs)("svg",{fill:"none",width:"18",height:"20",viewBox:"0 0 18 20",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("rect",{width:"14.864",height:"18.5",x:"1.568",y:".75",stroke:"#B5BAC4",strokeWidth:"1.5",rx:"2.25"}),(0,W.jsx)("circle",{cx:"8.545",cy:"15",r:"1.364",fill:"#B5BAC4"})]})},{value:"mobile",Icon:()=>(0,W.jsxs)("svg",{fill:"none",width:"14",height:"19",viewBox:"0 0 14 19",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("rect",{width:"12.5",height:"17.5",x:".75",y:".75",stroke:"#B5BAC4",strokeWidth:"1.5",rx:"1.25"}),(0,W.jsx)("circle",{cx:"7",cy:"15",r:"1",fill:"#B5BAC4"}),(0,W.jsx)("path",{fill:"#B5BAC4",d:"M5 0h4v2a1 1 0 01-1 1H6a1 1 0 01-1-1V0z"})]})}],or=e=>{let{view:t,onChange:n}=e;return(0,W.jsx)("div",{className:"rwpfnl-templates-devices",children:ir.map(e=>{let{value:l,Icon:r}=e;return(0,W.jsx)("button",{type:"button",className:`rwpfnl-templates-device-${l}${t===l?" is-active":""}`,"aria-label":`${l} preview`,"aria-pressed":t===l,onClick:()=>n(l),children:(0,W.jsx)(r,{})},l)})})},cr=e=>{let{template:t,isProActive:n,limitReached:l,upgradeUrl:r,busy:a,loaderMessage:s,disabled:i,onImport:o,onPreview:c}=e;const u=(t.steps||[]).length,d=!!t.is_pro;return(0,W.jsxs)("div",{className:"rwpfnl-template-card",children:["freemium"===t.templateType&&(0,W.jsx)("span",{className:"rwpfnl-template-badge",children:"Freemium"}),(0,W.jsxs)("div",{className:"rwpfnl-template-frame",children:[(0,W.jsxs)("div",{className:"rwpfnl-template-shot",children:[(0,W.jsx)("div",{className:"rwpfnl-template-thumb",style:{backgroundImage:`url(${t.featured_image})`}}),a?(0,W.jsx)("div",{className:"rwpfnl-template-importing",children:(0,W.jsxs)("span",{children:[s,(0,W.jsxs)("span",{className:"rwpfnl-templates-dots",children:[(0,W.jsx)("span",{children:"."}),(0,W.jsx)("span",{children:"."}),(0,W.jsx)("span",{children:"."})]})]})}):(0,W.jsxs)("div",{className:"rwpfnl-template-actions",children:[!l&&(!d||n)&&(0,W.jsx)("a",{href:"#",className:"rwpfnl-template-btn",style:i?{pointerEvents:"none"}:void 0,onClick:e=>{e.preventDefault(),o(t)},children:"Import"}),d&&!n&&(0,W.jsx)("a",{href:r,className:"rwpfnl-template-btn",target:"_blank",rel:"noreferrer",children:"Upgrade to Pro"}),(0,W.jsx)("a",{href:"#",className:"rwpfnl-template-btn",onClick:e=>{e.preventDefault(),c(t)},children:"Preview"})]})]}),(0,W.jsxs)("div",{className:"rwpfnl-template-meta",children:[(0,W.jsx)("span",{className:"rwpfnl-template-name",children:t.title}),(0,W.jsxs)("span",{className:"rwpfnl-template-steps",children:[u," steps"]})]})]})]})},ur=["checkout","thankyou"],dr=e=>{let{template:t,view:n}=e;const l=t&&t.steps||[],[r,a]=(0,i.useState)(l[0]||null),[s,o]=(0,i.useState)(!0);(0,i.useEffect)(()=>{a(l[0]||null),o(!0)},[t&&t.ID]);const c=((e,t)=>e&&e[`${t}_view_image`]||"")(r,n),u=r&&ur.includes(r.step_type)&&!!c;return(0,W.jsxs)("div",{className:"rwpfnl-template-preview",children:[(0,W.jsx)("div",{className:"rwpfnl-template-preview-steps",children:l.map(e=>(0,W.jsxs)("div",{className:"rwpfnl-template-preview-step"+(r&&r.ID===e.ID?" is-active":""),onClick:()=>{a(e),o(!0)},role:"button",children:[(0,W.jsx)("figure",{children:(0,W.jsx)("img",{src:e.featured_image,alt:e.title})}),(0,W.jsx)("p",{children:e.step_type})]},e.ID))}),(0,W.jsxs)("div",{className:`rwpfnl-template-preview-frame is-${n}`,children:[(0,W.jsxs)("div",{className:"rwpfnl-template-preview-notch",children:[(0,W.jsx)("span",{}),(0,W.jsx)("span",{})]}),(0,W.jsx)("div",{className:"rwpfnl-template-preview-viewport",children:u?(0,W.jsx)("div",{className:"rwpfnl-template-preview-shot",children:(0,W.jsx)("img",{src:c,alt:r.title})}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)("iframe",{title:r&&r.title||"Template preview",src:r?r.link:void 0,width:"100%",height:"600",onLoad:()=>o(!1)}),(0,W.jsx)("div",{className:"rwpfnl-template-preview-loading"+(s?" is-active":""),children:(0,W.jsx)("span",{})})]})})]})]})},pr=e=>Array.from({length:8},(t,n)=>(0,W.jsxs)("div",{className:"rwpfnl-templates-skeleton-card",children:[(0,W.jsx)("div",{className:"rwpfnl-templates-skeleton-block is-thumb"}),(0,W.jsx)("div",{className:"rwpfnl-templates-skeleton-block is-text"}),(0,W.jsx)("div",{className:"rwpfnl-templates-skeleton-block is-badge"})]},`${e}-${n}`)),fr=()=>(0,W.jsx)("div",{className:"rwpfnl-templates-skeleton-grid",children:pr("filter")}),hr=()=>(0,W.jsxs)("div",{className:"rwpfnl-templates-skeleton",children:[(0,W.jsxs)("div",{className:"rwpfnl-templates-skeleton-header",children:[(0,W.jsx)("div",{className:"rwpfnl-templates-skeleton-block is-title"}),(0,W.jsx)("div",{className:"rwpfnl-templates-skeleton-block is-button"})]}),(0,W.jsxs)("div",{className:"rwpfnl-templates-skeleton-body",children:[(0,W.jsxs)("div",{className:"rwpfnl-templates-skeleton-sidebar",children:[(0,W.jsx)("div",{className:"rwpfnl-templates-skeleton-block is-heading"}),Array.from({length:8},(e,t)=>(0,W.jsx)("div",{className:"rwpfnl-templates-skeleton-block is-item"},`sidebar-${t}`))]}),(0,W.jsx)("div",{className:"rwpfnl-templates-skeleton-content",children:(0,W.jsx)("div",{className:"rwpfnl-templates-skeleton-grid",children:pr("card")})})]})]}),mr=[{value:"all",label:"all"},{value:"free",label:"free"},{value:"freemium",label:"Freemium",Icon:()=>(0,W.jsx)("svg",{width:"20",height:"14",fill:"none",viewBox:"0 0 20 14",xmlns:"http://www.w3.org/2000/svg",children:(0,W.jsx)("path",{fillRule:"evenodd",stroke:"#7A8B9A",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M10 1l4 6 5-4-2 10H3L1 3l5 4 4-6z",clipRule:"evenodd"})})}],vr=(e,t)=>{const n=e&&(e.message||e.code);return n?`${t} ${n}`:t},gr=e=>{let{storeCheckout:t=!1}=e;const n=d.templateLibrary,l=d.isProLicenseActive,r=d.proUpgradeUrl,s=n.types||[],[o,c]=(0,i.useState)(()=>t?"store_checkout":s[0]&&s[0].slug||"wc"),[u,p]=(0,i.useState)([]),[f,h]=(0,i.useState)([]),[m,w]=(0,i.useState)("all"),[b,y]=(0,i.useState)("all"),[j,k]=(0,i.useState)("yes"!==n.isRemote),[C,_]=(0,i.useState)(!1),[N,S]=(0,i.useState)(!1),[M,z]=(0,i.useState)(0),[A,P]=(0,i.useState)(null),[F,D]=(0,i.useState)("desktop"),[T,R]=(0,i.useState)(null),[B,$]=(0,i.useState)("Import"),[I,O]=(0,i.useState)(""),[H,V]=(0,i.useState)(!1),[U,Z]=(0,i.useState)(!1),[Y,q]=(0,i.useState)(!1),[K,Q]=(0,i.useState)(n.isAnyPluginMissing),[G,X]=(0,i.useState)(!1),[J,ee]=(0,i.useState)(""),{notify:te}=fn(),ne=(0,i.useRef)(!0),le=n.builder,re=(n.dependencyPlugins||{})[le],ae=t?Y:!l&&Number(n.activeFunnels)>=Number(n.allowedFunnels),se="yes"===n.isRemote;(0,i.useEffect)(()=>{if(se)return void k(!1);let e=!0;return ne.current?k(!0):_(!0),(e=>{let{type:t,storeCheckout:n="no"}=e;return v("templates/get_templates",{type:t,store_checkout:n})})({type:o,storeCheckout:t?"yes":"no"}).then(t=>{if(e){if(!t||!t.success)throw new Error("The template library could not be loaded.");p(t.templates||[]),h(t.categories||[]),w("all"),y("all")}}).catch(t=>{e&&(p([]),te(vr(t,"The template library could not be loaded."),{type:"error"}))}).finally(()=>{e&&(ne.current=!1,k(!1),_(!1),S(!1))}),()=>{e=!1}},[o,M,se,t]),(0,i.useEffect)(()=>{if(!t)return;let e=!0;return L({page:1,perPage:1}).then(t=>{e&&q(!!t?.meta?.limitReached)}).catch(()=>{}),()=>{e=!1}},[t]);const ie=(0,i.useMemo)(()=>"no"!==K?[]:u.filter(e=>{const t=e.wpf_funnel_industry,n="all"===m||t&&t.slug===m,l="all"===b||b===e.templateType;return n&&l}),[u,m,b,K]),oe=(0,i.useCallback)(()=>{S(!0),g("templates/sync").then(()=>z(e=>e+1)).catch(e=>{S(!1),te(vr(e,"The template library could not be synced."),{type:"error"})})},[te]),ce=(0,i.useCallback)(e=>{ae||T||(R(e.ID),$("Getting ready to import"),O(""),(async e=>{let{template:t,steps:n,type:l,isProActive:r,isStoreCheckout:a=!1,onProgress:s}=e;const i=await(o={steps:n,name:t.title,source:"remote",remoteID:t.ID,type:l,is_store_checkout:a},g("templates/import-funnel",o));var o;if(!i||!i.funnelID)throw new Error("The funnel could not be created from this template.");const c=((e,t)=>t?e:e.filter((e,t,n)=>"downsell"!==e.step_type&&t===n.findIndex(t=>t.step_type===e.step_type)))(n||[],r),u=[];for(let e=0;e<c.length;e+=1){const t=await E({step:c[e],funnelID:i.funnelID,source:"remote",importType:"templates"});u.push(t.stepID),s(e+1,c.length)}return(e=>g("templates/finish-import",e))({funnelID:i.funnelID,templateType:t.templateType||"free",importedSteps:u,source:"remote",is_store_checkout:a})})({template:e,steps:e.steps||[],type:o,isProActive:l,isStoreCheckout:t,onProgress:(e,t)=>{$(`Importing Step: ${e}`),O(t?`${Math.round(e/t*100)}%`:"")}}).then(e=>{if(!e||!e.redirectLink)throw new Error("The funnel was created but there is nowhere to go next.");window.location.href=e.redirectLink}).catch(e=>{R(null),$("Import"),O(""),te(vr(e,"The template could not be imported."),{type:"error"})}))},[T,l,ae,te,t,o]),ue=(0,i.useCallback)((e,n)=>{Z(!0),(e=>{let{funnelName:t,type:n,selectedFunnelLayout:l,isStoreCheckout:r=!1}=e;return g("funnels",{funnelName:t,type:n,selectedFunnelLayout:l,is_store_checkout:r})})({funnelName:e,type:o,selectedFunnelLayout:n,isStoreCheckout:t}).then(e=>{if(!e||!e.redirectUrl)throw new Error("The funnel could not be created.");window.location.href=e.redirectUrl}).catch(e=>{Z(!1),te(vr(e,"The funnel could not be created."),{type:"error"})})},[te,t,o]),de=(0,i.useCallback)(()=>{re&&!G&&(X(!0),ee(""),x({basename:re.plugin_file,slug:re.slug}).then(()=>Q("no")).catch(e=>ee(vr(e,"The plugin could not be installed."))).finally(()=>X(!1)))},[G,re]);if(j)return(0,W.jsx)("div",{className:"rwpfnl-dashboard-body rwpfnl-templates",children:(0,W.jsx)(hr,{})});const pe=A&&!ae&&(!A.is_pro||l);return(0,W.jsxs)("div",{className:"rwpfnl-dashboard-body rwpfnl-templates",children:[(0,W.jsx)("div",{className:"rwpfnl-templates-header",children:A?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)("div",{className:"rwpfnl-templates-heading",children:[(0,W.jsx)("span",{className:"rwpfnl-templates-back",title:"Back to templates",onClick:()=>P(null),role:"button",children:(0,W.jsx)(Gl,{})}),(0,W.jsx)("h1",{className:"rwpfnl-templates-title",children:A.title})]}),(0,W.jsx)(or,{view:F,onChange:D}),(0,W.jsxs)("div",{className:"rwpfnl-templates-import rwpfnl-templates-header-spacer",children:[pe&&(0,W.jsxs)("a",{href:"#",className:"rwpfnl-templates-import-btn",style:T?{pointerEvents:"none"}:void 0,onClick:e=>{e.preventDefault(),ce(A)},children:[(0,W.jsx)("span",{className:"rwpfnl-templates-import-progress",style:{width:I}}),(0,W.jsx)("span",{className:"rwpfnl-templates-import-label",children:B})]}),A.is_pro&&!l&&(0,W.jsx)("a",{href:r,target:"_blank",rel:"noreferrer",className:"rwpfnl-templates-upgrade",children:"Upgrade to Pro"})]})]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)("div",{className:"rwpfnl-templates-heading",children:[t&&(0,W.jsx)(a.N_,{className:"rwpfnl-templates-back",to:"/store-checkout",title:"Back to Store Checkout",children:(0,W.jsx)(Gl,{})}),(0,W.jsx)("h1",{className:"rwpfnl-templates-title",children:t?"Choose a Store Checkout Template":"Choose a Funnel Template"}),(0,W.jsxs)("button",{type:"button",className:"rwpfnl-templates-sync",onClick:oe,disabled:N,children:[(0,W.jsx)(Jl,{spinning:N}),(0,W.jsx)("span",{children:N?"Syncing...":"Sync Templates"})]})]}),s.length>0&&!t&&(0,W.jsx)("select",{className:"rwpfnl-templates-type rwpfnl-templates-header-spacer",value:o,onChange:e=>c(e.target.value),"aria-label":"Template type",children:s.map(e=>(0,W.jsx)("option",{value:e.slug,children:e.label},e.slug))}),s.length>0&&(0,W.jsx)("ul",{className:"rwpfnl-templates-licence",children:mr.map(e=>(0,W.jsxs)("li",{className:b===e.value?"is-active":"",onClick:()=>y(e.value),role:"button",children:[e.Icon&&(0,W.jsx)(e.Icon,{}),e.label]},e.value))})]})}),(0,W.jsxs)("div",{className:"rwpfnl-templates-body",children:[!A&&(0,W.jsxs)("aside",{className:"rwpfnl-templates-sidebar",children:[(0,W.jsx)("span",{className:"rwpfnl-templates-sidebar-title",children:"Templates"}),s.length>0&&(0,W.jsx)(Ql,{categories:f,activeCategory:m,onSelect:w})]}),(0,W.jsxs)("div",{className:"rwpfnl-templates-content",children:[H&&(0,W.jsx)(lr,{isPro:l,type:o,busy:U,storeCheckout:t,submitLabel:t?U?"Creating Store Checkout...":"Create Store Checkout":U?"Creating Funnel...":"Create Funnel",upgradeUrl:r,onCancel:()=>V(!1),onCreate:ue}),N||C?(0,W.jsx)(fr,{}):(0,W.jsxs)(W.Fragment,{children:[!A&&"other"!==le&&(0,W.jsx)("h2",{className:"rwpfnl-templates-count",children:ie.length>1?`${ie.length} Templates`:`${ie.length} Template`}),(0,W.jsxs)("div",{className:"rwpfnl-templates-grid",children:[!A&&(0,W.jsx)("div",{className:"rwpfnl-template-card rwpfnl-template-scratch",children:ae?(0,W.jsxs)("p",{className:"rwpfnl-template-limit",children:[(0,W.jsx)("b",{children:t?"You have reached your limit and built 3/3 store checkouts!":"You have reached your limit and built 3/3 funnels!"}),(0,W.jsx)("br",{}),(0,W.jsx)("br",{}),t?"To create unlimited store checkouts, please upgrade to Pro.":"To create unlimited funnels, please upgrade to Pro."]}):(0,W.jsxs)("a",{href:"#",className:"rwpfnl-template-scratch-btn",onClick:e=>{e.preventDefault(),V(!0)},children:[(0,W.jsx)(Xl,{})," Start From scratch"]})}),"no"===K?!A&&ie.map(e=>(0,W.jsx)(cr,{template:e,isProActive:l,limitReached:ae,upgradeUrl:r,busy:T===e.ID,loaderMessage:B,disabled:!!T,onImport:ce,onPreview:e=>{P(e),$("Import")}},e.ID)):!!re&&(0,W.jsx)(sr,{builder:le,plugin:re,canInstall:d.canInstallPlugins||d.canActivatePlugins,installing:G,error:J,onInstall:de}),"other"===le&&(0,W.jsx)(ar,{}),A&&(0,W.jsx)("div",{className:"rwpfnl-templates-wide",children:(0,W.jsx)(dr,{template:A,view:F})})]})]})]})]})]})},wr=e=>{let{title:t,message:n,actionLabel:l,onAction:r}=e;return(0,W.jsxs)("div",{className:"rwpfnl-funnel-empty",children:[(0,W.jsx)(Fl,{}),(0,W.jsx)("h3",{children:t}),(0,W.jsx)("p",{children:n}),(0,W.jsx)("div",{className:"rwpfnl-funnel-empty-actions",children:(0,W.jsx)("button",{type:"button",className:"rwpfnl-btn-secondary",onClick:r,children:l})})]})},xr=e=>{let{search:t,statusFilter:n,counts:l={},meta:r,onShowStatus:a,onImport:s}=e;return"trash"===n?(0,W.jsx)(wr,{title:"Trash is empty",message:"Funnels you move to trash show up here until you delete them for good.",actionLabel:"Show published funnels",onAction:()=>a("publish")}):t?(0,W.jsxs)("div",{className:"rwpfnl-funnel-empty",children:[(0,W.jsx)(Fl,{}),(0,W.jsxs)("h3",{children:["No funnel matches “",t,"”"]}),(0,W.jsx)("p",{children:"Try a different name, or clear the search to see every funnel."})]}):"draft"===n?(0,W.jsx)(wr,{title:"No draft funnel",message:"None of your funnels are a draft.",actionLabel:"Show published funnels",onAction:()=>a("publish")}):l.draft>0?(0,W.jsx)(wr,{title:"No published funnel",message:"None of your funnels are published yet.",actionLabel:"Show draft funnels",onAction:()=>a("draft")}):(0,W.jsxs)("div",{className:"rwpfnl-funnel-empty",children:[(0,W.jsx)(Fl,{}),(0,W.jsx)("h3",{children:"Create your first funnel"}),(0,W.jsx)("p",{children:"Start from a ready-made template, or bring a funnel over from another site by importing its JSON export."}),(0,W.jsxs)("div",{className:"rwpfnl-funnel-empty-actions",children:[(0,W.jsxs)("a",{className:"rwpfnl-btn-primary",href:r.createFunnelUrl,children:[(0,W.jsx)(Yt,{}),"New Funnel"]}),(0,W.jsxs)("button",{type:"button",className:"rwpfnl-btn-secondary",onClick:s,children:[(0,W.jsx)(nn,{}),"Import Funnel"]})]})]})},br={elementor:{file:"elementor.png",label:"Elementor"},"divi-builder":{file:"divi.png",label:"Divi Builder"},bricks:{file:"bricks.png",label:"Bricks"},oxygen:{file:"oxygen.png",label:"Oxygen"},gutenberg:{file:"gutenberg.png",label:"Gutenberg"}},yr=e=>{let{builder:t}=e;const n=br[t];return n?(0,W.jsx)("span",{className:"rwpfnl-builder-logo",title:n.label,children:(0,W.jsx)("img",{src:`${d.imagePath}/${n.file}`,alt:n.label})}):(0,W.jsx)("span",{className:"rwpfnl-builder-logo is-empty",title:"No builder found","aria-hidden":"true"})},jr=()=>document.querySelector(".rwpfnl-app")||document.body,kr=()=>{const[e,t]=(0,i.useState)(!1),[n,l]=(0,i.useState)(null),[r,a]=(0,i.useState)(!1),s=(0,i.useRef)(null),o=(0,i.useRef)(null),c=(0,i.useCallback)(()=>{const e=s.current;if(!e)return;const t=e.getBoundingClientRect(),n=o.current?.offsetHeight||170,r=window.innerHeight-t.bottom<n+6&&t.top>n+6,i=Math.max(6,Math.min(t.right-190,window.innerWidth-190-6));a(r),l({position:"fixed",left:`${Math.round(i)}px`,top:r?"auto":`${Math.round(t.bottom+6)}px`,bottom:r?`${Math.round(window.innerHeight-t.top+6)}px`:"auto",width:"190px"})},[]);return(0,i.useLayoutEffect)(()=>{e?c():l(null)},[e,c]),(0,i.useEffect)(()=>{if(!e)return;const n=e=>{o.current?.contains(e.target)||s.current?.contains(e.target)||t(!1)},l=e=>{"Escape"===e.key&&t(!1)};return document.addEventListener("mousedown",n),document.addEventListener("keydown",l),window.addEventListener("scroll",c,!0),window.addEventListener("resize",c),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("keydown",l),window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",c)}},[e,c]),{open:e,setOpen:t,toggle:()=>t(e=>!e),runAction:(e,n)=>{e.preventDefault(),t(!1),n()},triggerRef:s,menuRef:o,style:n||{position:"fixed",visibility:"hidden"},isAbove:r}},Cr=e=>{let{funnel:t,selected:n,busy:l,trashed:a,canDuplicate:s,formatPrice:i,onSelect:o,onDuplicate:c,onExport:u,onStatusChange:d,onTrash:p,onRestore:f,onDelete:h}=e;const{open:m,toggle:v,runAction:g,triggerRef:w,menuRef:x,style:b,isAbove:y}=kr(),j="publish"===t.status,k=["rwpfnl-funnel-row",n?"is-selected":"",l?"is-busy":"",t.disabled?"is-disabled":""].filter(Boolean).join(" ");return(0,W.jsxs)("div",{className:k,title:t.disabledReason||void 0,children:[(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-select",children:(0,W.jsxs)("span",{className:"rwpfnl-checkbox",children:[(0,W.jsx)("input",{type:"checkbox",id:`rwpfnl-funnel-${t.id}`,checked:n,onChange:()=>o(t.id)}),(0,W.jsx)("label",{htmlFor:`rwpfnl-funnel-${t.id}`})]})}),(0,W.jsxs)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-name",children:[(0,W.jsx)(yr,{builder:t.builder}),(0,W.jsxs)("span",{className:"rwpfnl-funnel-name-group",children:[t.editUrl&&!t.disabled?(0,W.jsx)("a",{className:"rwpfnl-funnel-name",href:t.editUrl,children:t.name}):(0,W.jsx)("span",{className:"rwpfnl-funnel-name is-plain",children:t.name}),(0,W.jsxs)("span",{className:"rwpfnl-funnel-meta",children:[t.stepsLabel,t.typeLabel?` - ${t.typeLabel}`:""]})]})]}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-conversions",children:t.conversions}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-sales",children:i(t.sales)}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-status",children:(0,W.jsx)("span",{className:`rwpfnl-status-pill is-${t.status}`,children:t.statusLabel})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-updated",children:(0,W.jsx)("span",{className:"rwpfnl-funnel-updated","data-tooltip":t.modifiedExact?`Last Modified: ${t.modifiedExact}`:null,children:t.modifiedHuman})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-action",children:a?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)("button",{type:"button",className:"rwpfnl-icon-btn","aria-label":"Restore","data-tooltip":"Restore",disabled:l,onClick:()=>f(t),children:(0,W.jsx)(Ut,{})}),(0,W.jsx)("button",{type:"button",className:"rwpfnl-icon-btn is-destructive","aria-label":"Delete permanently","data-tooltip":"Delete permanently",disabled:l,onClick:()=>h(t),children:(0,W.jsx)(Vt,{})})]}):(0,W.jsxs)(W.Fragment,{children:[t.disabled||!t.editUrl?(0,W.jsx)("span",{className:"rwpfnl-icon-btn is-off","data-tooltip":t.disabledReason,children:(0,W.jsx)(It,{})}):(0,W.jsx)("a",{className:"rwpfnl-icon-btn",href:t.editUrl,"aria-label":"Edit","data-tooltip":"Edit",children:(0,W.jsx)(It,{})}),t.disabled||t.viewDisabled||!t.viewUrl?(0,W.jsx)("span",{className:"rwpfnl-icon-btn is-off","data-tooltip":t.disabledReason||"This funnel cannot be previewed",children:(0,W.jsx)(Jt,{})}):(0,W.jsx)("a",{className:"rwpfnl-icon-btn",href:t.viewUrl,target:"_blank",rel:"noreferrer","aria-label":"View","data-tooltip":"View",children:(0,W.jsx)(Jt,{})}),(0,W.jsxs)("div",{className:"rwpfnl-row-menu",children:[(0,W.jsx)("button",{type:"button",ref:w,className:"rwpfnl-icon-btn"+(m?" is-open":""),"aria-label":"More actions","aria-expanded":m,disabled:l,onClick:v,children:(0,W.jsx)(Ot,{})}),m&&(0,r.createPortal)((0,W.jsxs)("ul",{ref:x,style:b,className:"rwpfnl-dropdown rwpfnl-row-dropdown"+(y?" is-above":""),children:[s&&(0,W.jsx)("li",{children:(0,W.jsxs)("a",{href:"#",onClick:e=>g(e,()=>c(t)),children:[(0,W.jsx)(en,{}),"Duplicate"]})}),(0,W.jsx)("li",{children:(0,W.jsxs)("a",{href:"#",onClick:e=>g(e,()=>u(t)),children:[(0,W.jsx)(tn,{}),"Export"]})}),(0,W.jsx)("li",{children:(0,W.jsxs)("a",{href:"#",onClick:e=>g(e,()=>d(t,j?"draft":"publish")),children:[j?(0,W.jsx)(Wt,{}):(0,W.jsx)(Ht,{}),j?"Draft":"Publish"]})}),(0,W.jsx)("li",{className:"rwpfnl-dropdown-sep",children:(0,W.jsxs)("a",{href:"#",className:"rwpfnl-dropdown-delete",onClick:e=>g(e,()=>p(t)),children:[(0,W.jsx)(Vt,{}),"Trash"]})})]}),jr())]})]})})]})},_r=5,Nr=e=>{let{rows:t=_r}=e;return(0,W.jsxs)("div",{className:"rwpfnl-funnel-table rwpfnl-funnel-table--loading","aria-busy":"true",children:[(0,W.jsxs)("div",{className:"rwpfnl-funnel-row rwpfnl-funnel-row--head",children:[(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-select",children:(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--box"})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-name",children:(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--label"})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-conversions",children:(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--label"})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-sales",children:(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--label"})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-status",children:(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--label"})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-updated",children:(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--label"})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-action",children:(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--label"})})]}),Array.from({length:t}).map((e,t)=>(0,W.jsxs)("div",{className:"rwpfnl-funnel-row",children:[(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-select",children:(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--box"})}),(0,W.jsxs)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-name",children:[(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--builder"}),(0,W.jsxs)("span",{className:"rwpfnl-funnel-name-group",children:[(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--title"}),(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--subtitle"})]})]}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-conversions",children:(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--number"})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-sales",children:(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--number"})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-status",children:(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--pill"})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-updated",children:(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--text"})}),(0,W.jsxs)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-action",children:[(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--icon"}),(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--icon"}),(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--icon"})]})]},t)),(0,W.jsxs)("div",{className:"rwpfnl-table-footer",children:[(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--text"}),(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--text"})]})]})},Sr=["queued","running"],Lr=(e,t)=>e&&(e.message||e.code)||t,Mr=e=>{let{onClose:t,onFinished:n}=e;const[l,r]=(0,i.useState)(null),[a,s]=(0,i.useState)(!1),[c,u]=(0,i.useState)(""),[d,p]=(0,i.useState)(!1),[f,h]=(0,i.useState)(null),[v,w]=(0,i.useState)(!1),x=(0,i.useRef)(""),b=(0,i.useRef)(null),y=(0,i.useRef)(null),j=(0,i.useCallback)(()=>{b.current&&(clearTimeout(b.current),b.current=null)},[]),k=(0,i.useCallback)(e=>{x.current=e;const t=()=>{S(x.current).then(e=>{h(e),"superseded"!==e.state&&(Sr.includes(e.state)?b.current=setTimeout(t,2e3):n())}).catch(()=>{b.current=setTimeout(t,2e3)})};j(),t()},[n,j]);(0,i.useEffect)(()=>(S("").then(e=>{Sr.includes(e.state)&&(h(e),k(e.run_id||""))}).catch(()=>{}),j),[k,j]);const C=e=>{if(u(""),e)return"json"!==String(e.name).split(".").pop().toLowerCase()?(r(null),void u("Please select a valid file.")):void r(e);r(null)},_=f?f.state:"idle",N=Sr.includes(_),L=["completed","failed"].includes(_),M="stalled"===_;return(0,W.jsx)("div",{className:"rwpfnl-modal-backdrop",role:"presentation",onClick:e=>{e.target!==e.currentTarget||N||t()},children:(0,W.jsxs)("div",{className:"rwpfnl-import-modal",role:"dialog","aria-modal":"true","aria-label":"Import Funnel",children:[(0,W.jsxs)("div",{className:"rwpfnl-import-modal-head",children:[(0,W.jsx)("h4",{children:"Import Funnel"}),(0,W.jsx)("button",{type:"button",className:"rwpfnl-modal-close","aria-label":"Close",onClick:t,children:"×"})]}),"idle"===_&&(0,W.jsxs)("form",{onSubmit:e=>{e.preventDefault(),l?(p(!0),u(""),(e=>{const t=new FormData;return t.append("uploaded_file",e),(0,o.A)({url:m("import-export/import"),method:"POST",body:t})})(l).then(e=>{h({state:"queued",pct:0,label:"Preparing import…"}),k(e.run_id||"")}).catch(e=>{if(e&&e.can_reset)return h({state:"running",pct:0,label:e.message}),void k(e.run_id||"");u(Lr(e,"Could not start the import."))}).finally(()=>p(!1))):u("Please select a valid file.")},encType:"multipart/form-data",children:[(0,W.jsxs)("label",{className:`rwpfnl-import-dropzone${l?" has-file":""}${a?" is-dragging":""}`,onDragOver:e=>{e.preventDefault(),s(!0)},onDragLeave:()=>s(!1),onDrop:e=>{e.preventDefault(),s(!1),C(e.dataTransfer.files&&e.dataTransfer.files[0])},children:[(0,W.jsx)("input",{type:"file",accept:"application/JSON",ref:y,onChange:e=>C(e.target.files[0])}),(0,W.jsx)("span",{className:"rwpfnl-import-dropzone-icon",children:l?(0,W.jsx)(on,{}):(0,W.jsx)(sn,{})}),l?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)("h4",{children:"JSON file ready for import."}),(0,W.jsx)("p",{children:l.name})]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)("h4",{children:["Drag & Drop or"," ",(0,W.jsx)("span",{className:"rwpfnl-import-choose",children:"Choose file"})," to upload."]}),(0,W.jsx)("p",{children:"Supported formats: JSON file."})]})]}),c&&(0,W.jsxs)("p",{className:"rwpfnl-import-warning",children:[(0,W.jsx)(cn,{}),c]}),(0,W.jsxs)("div",{className:"rwpfnl-modal-actions",children:[(0,W.jsx)("button",{type:"button",className:"rwpfnl-btn-secondary",onClick:t,children:"Cancel"}),(0,W.jsx)("button",{type:"submit",className:"rwpfnl-btn-primary",disabled:d,children:d?"Importing…":"Import"})]})]}),(N||M)&&(0,W.jsxs)("div",{className:"rwpfnl-import-progress"+(M?" is-stalled":""),children:[(0,W.jsx)("div",{className:"rwpfnl-import-progress-label",children:M?"This import has stopped responding.":f.label||"Importing funnels…"}),(0,W.jsx)("div",{className:"rwpfnl-import-progress-track",children:(0,W.jsx)("span",{style:{width:`${f.pct||0}%`}})}),(0,W.jsx)("div",{className:"rwpfnl-import-progress-meta",children:f.total_funnels?`${f.done_funnels||0} of ${f.total_funnels} funnels`:""}),(0,W.jsx)("p",{className:"rwpfnl-import-progress-hint",children:"You can close this window — the import keeps running in the background."}),(0,W.jsx)("div",{className:"rwpfnl-modal-actions",children:(0,W.jsx)("button",{type:"button",className:"rwpfnl-btn-secondary",disabled:v,onClick:()=>{w(!0),g("import-export/import-reset").then(()=>{j(),h(null),r(null),n()}).catch(e=>u(Lr(e,"Could not cancel the import."))).finally(()=>w(!1))},children:v?"Cancelling…":"Cancel import"})})]}),L&&(0,W.jsxs)("div",{className:"rwpfnl-import-result",children:[(0,W.jsx)("div",{className:"rwpfnl-import-result-summary",children:f.message||("completed"===_?"The import has finished.":"The import failed.")}),(0,W.jsxs)("ul",{className:"rwpfnl-import-result-list",children:[(f.imported||[]).map((e,t)=>(0,W.jsxs)("li",{children:[(0,W.jsx)("span",{children:e.name||e.title||`Funnel ${t+1}`}),(0,W.jsx)("span",{className:"rwpfnl-import-result-note",children:"Imported"})]},`ok-${t}`)),(f.failed||[]).map((e,t)=>(0,W.jsxs)("li",{className:"is-failed",children:[(0,W.jsx)("span",{children:e.name||e.title||`Funnel ${t+1}`}),(0,W.jsx)("span",{className:"rwpfnl-import-result-note",children:e.reason||"Failed"})]},`fail-${t}`))]}),(0,W.jsx)("div",{className:"rwpfnl-modal-actions",children:(0,W.jsx)("button",{type:"button",className:"rwpfnl-btn-primary",onClick:t,children:"View funnels"})})]})]})})},zr=e=>{let{meta:t,onImport:n}=e;const[l,r]=(0,i.useState)(!1),s=(0,i.useRef)(null);(0,i.useEffect)(()=>{if(!l)return;const e=e=>{s.current&&!s.current.contains(e.target)&&r(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[l]);const o=!!t.limitReached;return(0,W.jsxs)("div",{className:"rwpfnl-new-funnel",ref:s,children:[(0,W.jsxs)("a",{className:"rwpfnl-new-funnel-main"+(o?" is-locked":""),href:o?t.upgradeUrl:t.createFunnelUrl,target:o?"_blank":"_self",rel:o?"noreferrer":void 0,title:o?"You have reached the 3 funnel limit of the free plan — upgrade for unlimited funnels":"Create a new funnel",children:[o?(0,W.jsx)(un,{}):(0,W.jsx)(Yt,{}),"New Funnel"]}),(0,W.jsx)("button",{type:"button",className:"rwpfnl-new-funnel-toggle"+(l?" is-open":""),"aria-label":"More ways to add a funnel","aria-expanded":l,onClick:()=>r(e=>!e),children:(0,W.jsx)(ln,{up:l})}),l&&(0,W.jsxs)("ul",{className:"rwpfnl-dropdown rwpfnl-new-funnel-dropdown",children:[(0,W.jsx)("li",{children:(0,W.jsxs)("a",{href:"#",onClick:e=>{e.preventDefault(),r(!1),n()},children:[(0,W.jsx)(nn,{}),"Import Funnel"]})}),t.canCreateWithAi&&(0,W.jsx)("li",{children:(0,W.jsxs)(a.N_,{to:"/ai-assistant",onClick:()=>r(!1),children:[(0,W.jsx)(Yt,{}),"Create with AI"]})})]})]})},Er={isProActive:!1,funnelCount:0,maxFunnels:3,limitReached:!1,createFunnelUrl:"",aiFunnelUrl:"",upgradeUrl:"https://getwpfunnels.com/pricing/",canCreateWithAi:!1,canBulkExport:!1},Ar=(e,t)=>{const n=e&&(e.message||e.code);return n?`${t} ${n}`:t},Pr=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:`wpfunnels-export-${(()=>{const e=new Date;return[String(e.getMonth()+1).padStart(2,"0"),String(e.getDate()).padStart(2,"0"),e.getFullYear()].join("-")})()}-.json`;const n=document.createElement("a");n.href=URL.createObjectURL(new Blob([JSON.stringify(e)],{type:"text/plain"})),n.download=t,n.click(),URL.revokeObjectURL(n.href)},Fr=e=>{let{initialStatus:t="publish"}=e;const n=(0,s.zy)(),l=(0,i.useMemo)(()=>new URLSearchParams(n.search).get("s")||"",[n.search]),[r,a]=(0,i.useState)([]),[o,c]=(0,i.useState)(Er),[u,p]=(0,i.useState)({live:0,trash:0}),[f,h]=(0,i.useState)(0),[m,w]=(0,i.useState)(1),[x,b]=(0,i.useState)(1),[y,S]=(0,i.useState)(25),[L,M]=(0,i.useState)(l),[z,E]=(0,i.useState)(l),[A,P]=(0,i.useState)({orderby:"id",order:"desc"}),[F,D]=(0,i.useState)(t),[T,R]=(0,i.useState)(!1),[B,$]=(0,i.useState)(!0),[I,O]=(0,i.useState)(""),[H,V]=(0,i.useState)([]),[U,Z]=(0,i.useState)([]),[Y,q]=(0,i.useState)(!1),[K,Q]=(0,i.useState)(!1),[G,X]=(0,i.useState)(null),[J,ee]=(0,i.useState)(!1),{notify:te}=fn(),ne=(0,i.useRef)(null),le=(0,i.useMemo)(()=>Ml(d.priceConfig,{minimumFractionDigits:2,maximumFractionDigits:2}),[]);(0,i.useEffect)(()=>{const e=setTimeout(()=>{E(L),b(1)},400);return()=>clearTimeout(e)},[L]),(0,i.useEffect)(()=>{b(1),V([])},[F]),(0,i.useEffect)(()=>D(t),[t]);const re=(0,i.useCallback)(()=>($(!0),(e=>{let{page:t,perPage:n,search:l,status:r,funnelStatus:a,orderby:s,order:i}=e;return v("funnels",{page:t,per_page:n,search:l,status:r,funnel_status:a,orderby:s,order:i})})({page:x,perPage:y,search:z,funnelStatus:F,orderby:A.orderby,order:A.order}).then(e=>{a(e.items||[]),h(e.total||0),w(e.total_pages||1),p(e.counts||{live:0,trash:0}),c({...Er,...e.meta||{}}),V([]),O("")}).catch(e=>{console.error("WPFunnels: loading funnels failed.",e),O(Ar(e,"Could not load your funnels."))}).finally(()=>$(!1))),[x,y,z,A,F]);(0,i.useEffect)(()=>{re()},[re]),(0,i.useEffect)(()=>{!B&&x>1&&!r.length&&f>0&&b(Math.min(x-1,Math.max(1,m)))},[r.length,B,x,f,m]),(0,i.useEffect)(()=>{if(!T)return;const e=e=>{ne.current&&!ne.current.contains(e.target)&&R(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[T]);const ae=(e,t)=>(Z(t=>[...t,e]),Promise.resolve(t()).finally(()=>Z(t=>t.filter(t=>t!==e)))),se=e=>te(e),ie=(e,t)=>te(Ar(e,t),{type:"error"}),oe=e=>V(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),ce=e=>{b(1),P(t=>({orderby:e,order:t.orderby===e&&"desc"===t.order?"asc":"desc"}))},ue=e=>ae(e.id,()=>{return(t=e.id,g(`funnels/${t}/duplicate`)).then(()=>(se(`“${e.name}” has been duplicated.`),re())).catch(e=>ie(e,"Could not duplicate this funnel."));var t}),de=e=>ae(e.id,()=>{return(t=e.id,v(`funnels/${t}/export`)).then(t=>Pr(t.steps,`${t.title||e.name}.json`)).catch(e=>ie(e,"Could not export this funnel."));var t}),pe=(e,t)=>{const n=r;return a(n=>n.map(n=>n.id===e.id?{...n,status:t,statusLabel:"publish"===t?"Published":"Draft"}:n)),j(e.id,t).catch(e=>{a(n),ie(e,"Could not update the funnel status.")})},fe=e=>X({title:"Move this funnel to trash?",message:`“${e.name}” and its steps will be moved to trash. You can restore them from the Trash tab.`,confirmLabel:"Move to trash",onConfirm:()=>ae(e.id,()=>k(e.id).then(()=>(se(`“${e.name}” has been moved to trash.`),re())).catch(e=>ie(e,"Could not trash this funnel.")))}),he=e=>ae(e.id,()=>C(e.id).then(()=>(se(`“${e.name}” has been restored.`),re())).catch(e=>ie(e,"Could not restore this funnel."))),me=e=>X({title:"Delete this funnel permanently?",message:`“${e.name}” and every step in it will be deleted. This cannot be undone.`,confirmLabel:"Delete",onConfirm:()=>ae(e.id,()=>_(e.id).then(()=>(se(`“${e.name}” has been deleted.`),re())).catch(e=>ie(e,"Could not delete this funnel.")))}),ve=e=>{const t=H.length;return q(!0),N(e,H).then(e=>(se(e?.message||`${t} funnel${1===t?"":"s"} updated.`),re())).catch(e=>ie(e,"Could not apply that to every funnel.")).finally(()=>q(!1))},ge=(e,t)=>{if(e.preventDefault(),!H.length)return;const n=H.length;if("export"===t)return q(!0),void function(){return g("import-export/bulk-export-funnel",{ids:arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],status:"all"})}(H).then(e=>{e&&e.success&&(Pr(e.data),se(`${H.length} funnel(s) exported.`))}).catch(e=>ie(e,"Could not export the selected funnels.")).finally(()=>q(!1));["restore","draft","publish"].includes(t)?ve(t):X("delete"===t?{title:`Delete ${n} funnel(s) permanently?`,message:"They and every step in them will be deleted. This cannot be undone.",confirmLabel:`Delete ${n}`,onConfirm:()=>ve("delete")}:{title:`Move ${n} funnel(s) to trash?`,message:"You can restore them from the Trash tab.",confirmLabel:"Move to trash",onConfirm:()=>ve("trash")})},we=r.length>0&&H.length===r.length,xe="trash"===F,be=r.filter(e=>H.includes(e.id)),ye=be.length>0&&be.every(e=>"trash"===e.status),je=be.some(e=>"publish"===e.status);return(0,W.jsxs)("div",{className:"rwpfnl-dashboard-body rwpfnl-funnel-list",children:[(0,W.jsxs)("div",{className:"rwpfnl-list-header",children:[!B&&H.length>0&&(0,W.jsxs)("div",{className:"rwpfnl-selection-bar",children:[(0,W.jsxs)("p",{className:"rwpfnl-bulk-summary",children:[(0,W.jsxs)("span",{className:"rwpfnl-selected-count",children:[H.length," ",1===H.length?"item":"items"]})," ","selected in the list"]}),(0,W.jsxs)("button",{type:"button",className:"rwpfnl-bulk-clear",onClick:()=>V([]),children:[(0,W.jsx)(xt,{}),"Clear All"]}),(0,W.jsx)("span",{className:"rwpfnl-bulk-divider"}),(0,W.jsx)("div",{className:"rwpfnl-bulk-buttons",children:ye?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)("button",{type:"button",className:"rwpfnl-bulk-btn",disabled:Y,onClick:e=>ge(e,"restore"),children:[(0,W.jsx)(Ut,{}),"Restore"]}),(0,W.jsxs)("button",{type:"button",className:"rwpfnl-bulk-btn is-destructive",disabled:Y,onClick:e=>ge(e,"delete"),children:[(0,W.jsx)(Vt,{}),"Delete"]})]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)("button",{type:"button",className:"rwpfnl-bulk-btn",disabled:Y,onClick:e=>ge(e,je?"draft":"publish"),children:[je?(0,W.jsx)(Wt,{}):(0,W.jsx)(Ht,{}),je?"Draft":"Publish"]}),o.canBulkExport&&(0,W.jsxs)("button",{type:"button",className:"rwpfnl-bulk-btn",disabled:Y,onClick:e=>ge(e,"export"),children:[(0,W.jsx)(tn,{}),"Export"]}),(0,W.jsxs)("button",{type:"button",className:"rwpfnl-bulk-btn is-destructive",disabled:Y,onClick:e=>ge(e,"trash"),children:[(0,W.jsx)(Vt,{}),"Trash"]})]})})]}),(0,W.jsxs)("div",{className:"rwpfnl-list-header-right",children:[(0,W.jsxs)("div",{className:"rwpfnl-search-group",children:[(0,W.jsx)(qt,{}),(0,W.jsx)("input",{type:"search",value:L,placeholder:"Search for a funnel...",onChange:e=>M(e.target.value)})]}),(0,W.jsx)("button",{type:"button",className:"rwpfnl-btn-icon"+(B?" is-busy":""),"aria-label":"Refresh the list","data-tooltip":"Refresh the list",disabled:B,onClick:()=>re(),children:(0,W.jsx)(Zt,{})}),!xe&&(0,W.jsx)(zr,{meta:o,onImport:()=>Q(!0)})]})]}),o.limitReached&&!xe&&(0,W.jsxs)("div",{className:"rwpfnl-upgrade-banner",children:[(0,W.jsx)("span",{className:"rwpfnl-upgrade-icon",children:(0,W.jsx)(cn,{})}),(0,W.jsxs)("div",{className:"rwpfnl-upgrade-copy",children:[(0,W.jsx)("h3",{children:"You have hit the limit! Upgrade to Pro for unlimited funnels!"}),(0,W.jsxs)("p",{children:["The free version of WPFunnels allows up to ",o.maxFunnels," funnels. To build more, move one funnel to trash or upgrade to Pro."]})]}),(0,W.jsx)("a",{className:"rwpfnl-btn-primary",href:o.upgradeUrl,target:"_blank",rel:"noreferrer",children:"Upgrade to Pro"})]}),I&&(0,W.jsxs)("div",{className:"rwpfnl-list-error",children:[(0,W.jsx)("span",{children:I}),(0,W.jsx)("button",{type:"button",className:"rwpfnl-retry",onClick:()=>re(),children:"Try again"})]}),B&&(0,W.jsx)(Nr,{rows:Math.min(y,5)}),!B&&(0,W.jsxs)("div",{className:"rwpfnl-funnel-table",children:[(0,W.jsxs)("div",{className:"rwpfnl-funnel-row rwpfnl-funnel-row--head",children:[(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-select",children:(0,W.jsxs)("span",{className:"rwpfnl-checkbox",children:[(0,W.jsx)("input",{type:"checkbox",id:"rwpfnl-funnel-select-all",checked:we,disabled:!r.length,onChange:e=>V(e.target.checked?r.map(e=>e.id):[])}),(0,W.jsx)("label",{htmlFor:"rwpfnl-funnel-select-all"})]})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-name",children:(0,W.jsxs)("button",{type:"button",className:"rwpfnl-sort-btn"+("title"===A.orderby?" is-sorted":""),onClick:()=>ce("title"),children:["Name",(0,W.jsx)(rn,{direction:"title"===A.orderby?A.order:null})]})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-conversions",children:(0,W.jsxs)("button",{type:"button",className:"rwpfnl-sort-btn"+("conversions"===A.orderby?" is-sorted":""),onClick:()=>ce("conversions"),children:["Conversions",(0,W.jsx)(rn,{direction:"conversions"===A.orderby?A.order:null})]})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-sales",children:(0,W.jsxs)("button",{type:"button",className:"rwpfnl-sort-btn"+("sales"===A.orderby?" is-sorted":""),onClick:()=>ce("sales"),children:["Sales",(0,W.jsx)(rn,{direction:"sales"===A.orderby?A.order:null})]})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-status",children:(0,W.jsxs)("div",{className:"rwpfnl-status-filter",ref:ne,children:[(0,W.jsxs)("button",{type:"button",className:"rwpfnl-sort-btn","aria-expanded":T,onClick:()=>R(e=>!e),children:["Status",(0,W.jsx)(an,{})]}),T&&(0,W.jsx)("ul",{className:"rwpfnl-dropdown rwpfnl-status-dropdown",children:[{value:"publish",label:"Published"},{value:"draft",label:"Draft"},{value:"trash",label:"Trash"}].map(e=>(0,W.jsx)("li",{children:(0,W.jsxs)("a",{href:"#",className:F===e.value?"is-active":void 0,onClick:t=>{t.preventDefault(),D(e.value),R(!1)},children:[e.label,(0,W.jsx)("span",{className:"rwpfnl-option-count",children:u[e.value]??0})]})},e.value))})]})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-updated",children:(0,W.jsxs)("button",{type:"button",className:"rwpfnl-sort-btn"+("modified"===A.orderby?" is-sorted":""),onClick:()=>ce("modified"),children:["Last Updated",(0,W.jsx)(rn,{direction:"modified"===A.orderby?A.order:null})]})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-action",children:"Action"})]}),!r.length&&(0,W.jsx)("div",{className:"rwpfnl-funnel-empty-row",children:(0,W.jsx)(xr,{search:z,statusFilter:F,meta:o,counts:u,onShowStatus:D,onImport:()=>Q(!0)})}),r.map(e=>(0,W.jsx)(Cr,{funnel:e,trashed:"trash"===e.status,selected:H.includes(e.id),busy:U.includes(e.id),canDuplicate:!o.limitReached,formatPrice:le,onSelect:oe,onDuplicate:ue,onExport:de,onStatusChange:pe,onTrash:fe,onRestore:he,onDelete:me},e.id)),f>0&&(0,W.jsx)(Bn,{page:x,perPage:y,total:f,totalPages:m,onPageChange:b,onPerPageChange:e=>{S(e),b(1)}})]}),K&&(0,W.jsx)(Mr,{onClose:()=>{Q(!1),re()},onFinished:()=>{re(),xe&&D("publish")}}),G&&(0,W.jsx)(Tn,{title:G.title,message:G.message,confirmLabel:G.confirmLabel,busy:J,onConfirm:()=>{ee(!0),Promise.resolve(G.onConfirm()).finally(()=>{ee(!1),X(null)})},onCancel:()=>X(null)})]})},Dr=(0,i.createContext)({values:{},set:()=>{},patch:()=>{},data:null,capabilities:{},options:{},isSaving:!1,reload:()=>{}}),Tr=()=>(0,i.useContext)(Dr),Rr=[4,2,2,5],Br=()=>(0,W.jsxs)("div",{className:"rwpfnl-settings","aria-busy":"true",children:[(0,W.jsx)("nav",{className:"rwpfnl-settings-nav",children:Rr.map((e,t)=>(0,W.jsxs)("div",{className:"rwpfnl-settings-nav__group",children:[(0,W.jsx)("span",{className:"rwpfnl-skel rwpfnl-skel--nav-label"}),(0,W.jsx)("ul",{children:Array.from({length:e}).map((e,t)=>(0,W.jsxs)("li",{className:"rwpfnl-settings-nav__item",children:[(0,W.jsx)("span",{className:"rwpfnl-skel rwpfnl-skel--icon"}),(0,W.jsx)("span",{className:"rwpfnl-skel rwpfnl-skel--nav-item"})]},t))})]},t))}),(0,W.jsxs)("div",{className:"rwpfnl-settings-content",children:[(0,W.jsxs)("header",{className:"rwpfnl-settings-header",children:[(0,W.jsx)("span",{className:"rwpfnl-skel rwpfnl-skel--title"}),(0,W.jsx)("span",{className:"rwpfnl-skel rwpfnl-skel--button"})]}),(0,W.jsx)("div",{className:"rwpfnl-settings-panels",children:(0,W.jsxs)("div",{className:"rwpfnl-settings-panel",children:[(0,W.jsx)("div",{className:"rwpfnl-settings-tabs",children:(0,W.jsxs)("ul",{className:"rwpfnl-settings-tabs__nav",children:[(0,W.jsx)("li",{className:"rwpfnl-settings-tabs__tab",children:(0,W.jsx)("span",{className:"rwpfnl-skel rwpfnl-skel--tab"})}),(0,W.jsx)("li",{className:"rwpfnl-settings-tabs__tab",children:(0,W.jsx)("span",{className:"rwpfnl-skel rwpfnl-skel--tab"})})]})}),Array.from({length:4}).map((e,t)=>(0,W.jsxs)("div",{className:"rwpfnl-field",children:[(0,W.jsx)("span",{className:"rwpfnl-skel rwpfnl-skel--label"}),(0,W.jsx)("span",{className:"rwpfnl-skel rwpfnl-skel--control"})]},t))]})})]})]}),$r=()=>(0,W.jsxs)("svg",{width:"16",height:"16",fill:"none",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsxs)("g",{fill:"#7A8B9A",clipPath:"url(#wpfnl-tooltip-clip)",children:[(0,W.jsx)("path",{d:"M8 0a8 8 0 108 8 8.009 8.009 0 00-8-8zm0 14.667A6.666 6.666 0 1114.667 8 6.674 6.674 0 018 14.667z"}),(0,W.jsx)("path",{d:"M8 6.667h-.667a.667.667 0 100 1.333H8v4a.667.667 0 101.333 0V8A1.333 1.333 0 008 6.667zm0-1.334a1 1 0 100-2 1 1 0 000 2z"})]}),(0,W.jsx)("defs",{children:(0,W.jsx)("clipPath",{id:"wpfnl-tooltip-clip",children:(0,W.jsx)("path",{fill:"#fff",d:"M0 0h16v16H0z"})})})]}),Ir=()=>(0,W.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("path",{d:"M6 0C2.68388 0 0 2.68352 0 6C0 9.31612 2.68352 12 6 12C9.31612 12 12 9.31648 12 6C12 2.68388 9.31648 0 6 0Z",fill:"#6E42D3"}),(0,W.jsx)("path",{d:"M6.18136 8.25C5.66666 8.25 5.25 8.60793 5.25 9.0375C5.25 9.4568 5.65439 9.825 6.18136 9.825C6.70834 9.825 7.125 9.4568 7.125 9.0375C7.125 8.60793 6.69607 8.25 6.18136 8.25Z",fill:"white"}),(0,W.jsx)("path",{d:"M6.10214 3C4.66162 3 4 3.73543 4 4.23179C4 4.59032 4.35218 4.75578 4.64025 4.75578C5.21647 4.75578 4.98175 4.04796 6.07016 4.04796C6.60371 4.04796 7.03054 4.25017 7.03054 4.67306C7.03054 5.16943 6.43298 5.45445 6.08084 5.71179C5.77136 5.94161 5.36587 6.31851 5.36587 7.1091C5.36587 7.58706 5.51527 7.725 5.95274 7.725C6.47565 7.725 6.58234 7.52276 6.58234 7.3481C6.58234 6.87014 6.59299 6.59433 7.17986 6.19905C7.46801 6.00601 8.375 5.38091 8.375 4.51681C8.375 3.65271 7.46801 3 6.10214 3Z",fill:"white"})]}),Or=()=>(0,W.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 24 24",strokeWidth:"2.5",stroke:"#7A8B9A",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,W.jsx)("path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"}),(0,W.jsx)("path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"})]}),Wr=()=>(0,W.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",children:(0,W.jsx)("path",{d:"M5.16613 11.7753C4.71195 11.7754 4.27638 11.5949 3.9555 11.2735L0.295374 7.61474C-0.098458 7.22078 -0.098458 6.58218 0.295374 6.18822C0.689332 5.79439 1.32794 5.79439 1.72189 6.18822L5.16613 9.63245L14.2781 0.520472C14.6721 0.12664 15.3107 0.12664 15.7046 0.520472C16.0985 0.914429 16.0985 1.55303 15.7046 1.94699L6.37675 11.2735C6.05587 11.5949 5.6203 11.7754 5.16613 11.7753Z",fill:"#239654"})}),Hr=()=>(0,W.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"15",viewBox:"0 0 12 15",fill:"none",children:[(0,W.jsx)("path",{d:"M11.3333 2.66665H9.99993V1.99999C9.99993 1.46956 9.78921 0.960852 9.41414 0.585782C9.03907 0.210712 8.53037 0 7.99994 0H3.99997C3.46954 0 2.96084 0.210712 2.58577 0.585782C2.2107 0.960852 1.99999 1.46956 1.99999 1.99999V2.66665H0.666662C0.489852 2.66665 0.320284 2.73688 0.195261 2.86191C0.0702373 2.98693 0 3.1565 0 3.33331C0 3.51012 0.0702373 3.67969 0.195261 3.80471C0.320284 3.92973 0.489852 3.99997 0.666662 3.99997V11.3333C0.666662 11.771 0.75288 12.2044 0.920395 12.6089C1.08791 13.0133 1.33344 13.3807 1.64297 13.6903C2.26808 14.3154 3.11592 14.6666 3.99997 14.6666H7.99994C8.43768 14.6666 8.87113 14.5803 9.27554 14.4128C9.67996 14.2453 10.0474 13.9998 10.3569 13.6903C10.6665 13.3807 10.912 13.0133 11.0795 12.6089C11.247 12.2044 11.3333 11.771 11.3333 11.3333V3.99997C11.5101 3.99997 11.6796 3.92973 11.8047 3.80471C11.9297 3.67969 11.9999 3.51012 11.9999 3.33331C11.9999 3.1565 11.9297 2.98693 11.8047 2.86191C11.6796 2.73688 11.5101 2.66665 11.3333 2.66665ZM3.33331 1.99999C3.33331 1.82318 3.40355 1.65361 3.52857 1.52858C3.65359 1.40356 3.82316 1.33332 3.99997 1.33332H7.99994C8.17675 1.33332 8.34632 1.40356 8.47134 1.52858C8.59636 1.65361 8.6666 1.82318 8.6666 1.99999V2.66665H3.33331V1.99999ZM9.99993 11.3333C9.99993 11.8637 9.78921 12.3724 9.41414 12.7475C9.03907 13.1225 8.53037 13.3332 7.99994 13.3332H3.99997C3.46954 13.3332 2.96084 13.1225 2.58577 12.7475C2.2107 12.3724 1.99999 11.8637 1.99999 11.3333V3.99997H9.99993V11.3333Z",fill:"#FF5155"}),(0,W.jsx)("path",{d:"M4.66666 6C4.48985 6 4.32028 6.07024 4.19526 6.19526C4.07024 6.32028 4 6.48985 4 6.66666V10.6666C4 10.8434 4.07024 11.013 4.19526 11.138C4.32028 11.2631 4.48985 11.3333 4.66666 11.3333C4.84347 11.3333 5.01304 11.2631 5.13806 11.138C5.26309 11.013 5.33332 10.8434 5.33332 10.6666V6.66666C5.33332 6.48985 5.26309 6.32028 5.13806 6.19526C5.01304 6.07024 4.84347 6 4.66666 6Z",fill:"#FF5155"}),(0,W.jsx)("path",{d:"M7.33365 6C7.15684 6 6.98728 6.07024 6.86225 6.19526C6.73723 6.32028 6.66699 6.48985 6.66699 6.66666V10.6666C6.66699 10.8434 6.73723 11.013 6.86225 11.138C6.98728 11.2631 7.15684 11.3333 7.33365 11.3333C7.51046 11.3333 7.68003 11.2631 7.80505 11.138C7.93008 11.013 8.00032 10.8434 8.00032 10.6666V6.66666C8.00032 6.48985 7.93008 6.32028 7.80505 6.19526C7.68003 6.07024 7.51046 6 7.33365 6Z",fill:"#FF5155"})]}),Vr=()=>(0,W.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"20",height:"20",children:(0,W.jsx)("path",{fill:"#7A8B9A",d:"M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z"})}),Ur=()=>(0,W.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",width:"20",height:"20",children:(0,W.jsx)("path",{fill:"#7A8B9A",d:"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zm151 118.3C226 97.7 269.5 80 320 80c65.2 0 118.8 29.6 159.9 67.7C518.4 183.5 545 226 558.6 256c-12.6 28-36.6 66.8-70.9 100.9l-53.8-42.2c9.1-17.6 14.2-37.5 14.2-58.7c0-70.7-57.3-128-128-128c-32.2 0-61.7 11.9-84.2 31.5l-46.1-36.1zM394.9 284.2l-81.5-63.9c4.2-8.5 6.6-18.2 6.6-28.3c0-5.5-.7-10.9-2-16c.7 0 1.3 0 2 0c44.2 0 80 35.8 80 80c0 9.9-1.8 19.4-5.1 28.2zm51.3 163.3l-41.9-33C378.8 425.4 350.7 432 320 432c-65.2 0-118.8-29.6-159.9-67.7C121.6 328.5 95 286 81.4 256c8.3-18.4 21.5-41.5 39.4-64.8L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5zm-88-69.3L302 334c-23.5-5.4-43.1-21.2-53.7-42.3l-56.1-44.2c-.2 2.8-.3 5.6-.3 8.5c0 70.7 57.3 128 128 128c13.3 0 26.1-2 38.2-5.8z"})}),Zr=()=>(0,W.jsxs)("svg",{fill:"none",width:"22",height:"22",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("circle",{cx:"11",cy:"11",r:"11",fill:"#2FCF5C"}),(0,W.jsx)("path",{fill:"#fff",d:"M15.209 9.236l-1.587.396-1.983-2.471a.926.926 0 00-1.445 0L8.21 9.63l-1.618-.395a.933.933 0 00-1.124 1.124l1.093 3.842a.618.618 0 00.617.451h7.412a.618.618 0 00.618-.45l1.1-3.843a.932.932 0 00-1.1-1.124zM5.172 8.57a.772.772 0 100-1.545.772.772 0 000 1.544zm11.427 0a.772.772 0 100-1.545.772.772 0 000 1.544zm-5.714-2.626a.772.772 0 100-1.544.772.772 0 000 1.544zm3.706 10.964H7.18a.618.618 0 010-1.236h7.411a.618.618 0 110 1.236z"})]}),Yr=()=>(0,W.jsx)("svg",{width:"12",height:"15",fill:"none",viewBox:"0 0 12 15",xmlns:"http://www.w3.org/2000/svg",children:(0,W.jsx)("path",{fill:"#7A8B9A",d:"M2.25 12h7.5A2.25 2.25 0 0012 9.75v-7.5A2.25 2.25 0 009.75 0h-7.5A2.25 2.25 0 000 2.25v10.5A2.25 2.25 0 002.25 15h9a.75.75 0 100-1.5h-9a.75.75 0 110-1.5zM1.5 2.25a.75.75 0 01.75-.75h7.5a.75.75 0 01.75.75v7.5a.75.75 0 01-.75.75h-7.5c-.255 0-.51.043-.75.128V2.25zm3.75 6V6a.75.75 0 011.5 0v2.25a.75.75 0 01-1.5 0zm0-4.5a.75.75 0 111.5 0 .75.75 0 01-1.5 0z"})}),qr=()=>(0,W.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,W.jsxs)("g",{clipPath:"url(#wpfnl-warning-clip)",children:[(0,W.jsx)("path",{d:"M8 0C3.57803 0 0 3.57834 0 8C0 12.422 3.57834 16 8 16C12.422 16 16 12.4217 16 8C16 3.57803 12.4217 0 8 0ZM8 14.75C4.26897 14.75 1.25 11.7308 1.25 8C1.25 4.26897 4.26922 1.25 8 1.25C11.731 1.25 14.75 4.26922 14.75 8C14.75 11.731 11.7308 14.75 8 14.75Z",fill:"#F69220"}),(0,W.jsx)("path",{d:"M8 4.02734C7.65481 4.02734 7.375 4.30716 7.375 4.65234V8.67712C7.375 9.02231 7.65481 9.30212 8 9.30212C8.34519 9.30212 8.625 9.02231 8.625 8.67712V4.65234C8.625 4.30716 8.34519 4.02734 8 4.02734Z",fill:"#F69220"}),(0,W.jsx)("path",{d:"M8 11.7549C8.46599 11.7549 8.84375 11.3771 8.84375 10.9111C8.84375 10.4451 8.46599 10.0674 8 10.0674C7.53401 10.0674 7.15625 10.4451 7.15625 10.9111C7.15625 11.3771 7.53401 11.7549 8 11.7549Z",fill:"#F69220"})]}),(0,W.jsx)("defs",{children:(0,W.jsx)("clipPath",{id:"wpfnl-warning-clip",children:(0,W.jsx)("rect",{width:"16",height:"16",fill:"white"})})})]}),Kr=()=>(0,W.jsx)("svg",{width:"48",height:"48",viewBox:"0 0 49 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,W.jsx)("path",{d:"M44.5 16.4211C44.5 22.1764 39.8097 26.8421 34.0238 26.8421C28.238 26.8421 23.5476 22.1764 23.5476 16.4211C23.5476 10.6657 28.238 6 34.0238 6C39.8097 6 44.5 10.6657 44.5 16.4211ZM33.0714 13.024V22.1053C33.0714 22.6285 33.4978 23.0526 34.0238 23.0526C34.5498 23.0526 34.9762 22.6285 34.9762 22.1053V13.024L38.1123 16.1436C38.4842 16.5135 39.0872 16.5135 39.4591 16.1436C39.8311 15.7736 39.8311 15.1738 39.4591 14.8038L34.6972 10.067C34.3253 9.69698 33.7223 9.69698 33.3504 10.067L28.5885 14.8038C28.2165 15.1738 28.2165 15.7736 28.5885 16.1436C28.9604 16.5135 29.5634 16.5135 29.9353 16.1436L33.0714 13.024ZM39.7381 35.8421V27.3495C40.7877 26.8054 41.749 26.116 42.5952 25.3082V35.8421C42.5952 39.1257 40.0114 41.809 36.756 41.9903L36.4048 42H10.6905C7.38947 42 4.6919 39.4298 4.50979 36.1915L4.5 35.8421V17.8421C4.5 14.5585 7.08371 11.8751 10.3392 11.6939L10.6905 11.6842H22.5917C22.2151 12.5826 21.9424 13.535 21.7885 14.5263H10.6905C8.94158 14.5263 7.50726 15.8661 7.36819 17.5702L7.35714 17.8421V18.6549L23.5476 27.1311L26.0337 25.8292C26.869 26.5319 27.7991 27.1264 28.8022 27.5912L24.213 29.9944C23.856 30.1812 23.4392 30.2079 23.0653 30.0745L22.8823 29.9944L7.35714 21.8665V35.8421C7.35714 37.5819 8.70402 39.0086 10.4171 39.1469L10.6905 39.1579H36.4048C38.1537 39.1579 39.588 37.8181 39.727 36.114L39.7381 35.8421Z",fill:"#353030"})}),Qr=()=>(0,W.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"9",viewBox:"0 0 12 12",fill:"none",children:[(0,W.jsx)("path",{d:"M11 1L1 11",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,W.jsx)("path",{d:"M11 11V1H1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Gr=[{id:"general",label:"General"},{id:"integrations",label:"Integrations"},{id:"ai",label:"AI & Automation"},{id:"tools",label:"Tools & Utilities"}],Xr=[{path:"general",label:"General",title:"General",group:"general",Icon:()=>(0,W.jsxs)("svg",{width:"20",height:"20",fill:"none",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("path",{stroke:"#7A8B9A",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",strokeWidth:"1.4",d:"M11.8 3.027c.66.17 1.284.432 1.857.77l.586-.585a1.2 1.2 0 011.697 0l.848.848a1.2 1.2 0 010 1.697l-.586.586c.339.573.6 1.197.77 1.857h.828A1.2 1.2 0 0119 9.4v1.2a1.2 1.2 0 01-1.2 1.2h-.827a7.162 7.162 0 01-.77 1.857l.585.586a1.2 1.2 0 010 1.697l-.848.848a1.2 1.2 0 01-1.697 0l-.586-.586c-.573.339-1.197.6-1.857.77v.828a1.2 1.2 0 01-1.2 1.2H9.4a1.2 1.2 0 01-1.2-1.2v-.827a7.162 7.162 0 01-1.857-.77l-.586.585a1.2 1.2 0 01-1.697 0l-.848-.848a1.2 1.2 0 010-1.697l.586-.586a7.163 7.163 0 01-.77-1.857H2.2A1.2 1.2 0 011 10.6V9.4a1.2 1.2 0 011.2-1.2h.827c.17-.66.432-1.284.77-1.857l-.585-.586a1.2 1.2 0 010-1.697l.848-.848a1.2 1.2 0 011.697 0l.586.586a7.162 7.162 0 011.857-.77V2.2A1.2 1.2 0 019.4 1h1.2a1.2 1.2 0 011.2 1.2v.827z"}),(0,W.jsx)("path",{stroke:"#7A8B9A",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",strokeWidth:"1.4",d:"M9.993 6.4a3.6 3.6 0 010 7.2 3.602 3.602 0 01-3.6-3.6 3.6 3.6 0 013.6-3.6z"})]})},{path:"permalink",label:"Permalink",title:"Permalink",group:"general",Icon:()=>(0,W.jsxs)("svg",{width:"18",height:"18",fill:"none",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsxs)("g",{fill:"#7A8B9A",stroke:"#FAF9FF",strokeWidth:".3",clipPath:"url(#wpfnl-permalink-clip)",children:[(0,W.jsx)("path",{d:"M3.956 6.544A.975.975 0 015.402 7.85l-.067.074L3.18 10.08a3.534 3.534 0 00-1.06 2.1v.002a3.333 3.333 0 001.131 2.883l.003.003a3.444 3.444 0 004.66-.272l2.146-2.147a.976.976 0 011.38 1.379l-2.256 2.256A5.294 5.294 0 01.172 12.06a5.571 5.571 0 011.67-3.401l.003-.002 2.111-2.113zM8.69 1.81a5.42 5.42 0 017.09-.592v.001a5.298 5.298 0 01.525 7.941l-2.257 2.258a.976.976 0 01-1.38-1.38l2.258-2.256a3.345 3.345 0 00-.248-4.947l-.004-.003-.131-.097a3.438 3.438 0 00-4.442.424L7.943 5.314a.975.975 0 01-1.379-1.379l2.124-2.124.001-.002z"}),(0,W.jsx)("path",{d:"M10.06 6.544a.975.975 0 011.38 1.38l-3.497 3.495a.975.975 0 11-1.379-1.379l3.496-3.496z"})]}),(0,W.jsx)("defs",{children:(0,W.jsx)("clipPath",{id:"wpfnl-permalink-clip",children:(0,W.jsx)("path",{fill:"#fff",d:"M0 0h18v18H0z"})})})]})},{path:"optin",label:"Opt-in Settings",title:"Opt-in Settings",group:"general",Icon:()=>(0,W.jsx)("svg",{width:"20",height:"16",fill:"none",viewBox:"0 0 20 16",xmlns:"http://www.w3.org/2000/svg",children:(0,W.jsx)("path",{fill:"#7A8B9A",fillRule:"evenodd",stroke:"#7A8B9A",strokeWidth:".2",d:"M17.852 11.007c0 1.59-1.334 2.881-2.973 2.881H5.12c-1.639 0-2.973-1.291-2.973-2.88V4.992c0-.53.15-1.03.41-1.457l4.76 4.612A3.825 3.825 0 0010 9.221a3.823 3.823 0 002.68-1.074l4.761-4.612c.26.428.41.926.41 1.457v6.014h0zM14.88 2.112H5.12c-.676 0-1.301.222-1.801.59l4.809 4.661A2.68 2.68 0 0010 8.11c.708 0 1.373-.266 1.87-.747l4.809-4.66a3.026 3.026 0 00-1.801-.591zm0-1.112H5.12C2.85 1 1 2.792 1 4.993v6.014C1 13.21 2.85 15 5.122 15h9.757C17.15 15 19 13.21 19 11.007V4.993C19 2.792 17.15 1 14.879 1z",clipRule:"evenodd"})})},{path:"offer",label:"Offer Settings",title:"Offer Settings",group:"general",Icon:()=>(0,W.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",stroke:"#7A8B9A",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,W.jsx)("path",{d:"M12 8V21",stroke:"#7A8B9A",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,W.jsx)("path",{d:"M19 12V19C19 20.1046 18.1046 21 17 21H7C5.89543 21 5 20.1046 5 19V12",stroke:"#7A8B9A",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,W.jsx)("path",{d:"M7.5 7.99994C6.11929 7.99994 5 6.88065 5 5.49994C5 4.11923 6.11929 2.99994 7.5 2.99994C9.474 2.96594 11.26 4.94894 12 7.99994C12.74 4.94894 14.526 2.96594 16.5 2.99994C17.8807 2.99994 19 4.11923 19 5.49994C19 6.88065 17.8807 7.99994 16.5 7.99994",stroke:"#7A8B9A",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),visible:e=>e.isWcActive},{path:"integrations",label:"Events & Other Integrations",title:"Events & Other Integrations",group:"integrations",Icon:()=>(0,W.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[(0,W.jsx)("circle",{cx:"2",cy:"2",r:"2",transform:"translate(4 4)",fill:"none",stroke:"#7a8b9a",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),(0,W.jsx)("circle",{cx:"2",cy:"2",r:"2",transform:"translate(16 16)",fill:"none",stroke:"#7a8b9a",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),(0,W.jsx)("path",{d:"M11,6h5a2,2,0,0,1,2,2v8",fill:"none",stroke:"#7a8b9a",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),(0,W.jsx)("path",{d:"M14,9,11,6l3-3",fill:"none",stroke:"#7a8b9a",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),(0,W.jsx)("path",{d:"M13,18H8a2,2,0,0,1-2-2V8",fill:"none",stroke:"#7a8b9a",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),(0,W.jsx)("path",{d:"M10,15l3,3-3,3",fill:"none",stroke:"#7a8b9a",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})]})},{path:"lms",label:"LMS Settings",title:"LMS Settings",group:"integrations",Icon:()=>(0,W.jsx)("svg",{width:"20",height:"20",fill:"none",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:(0,W.jsx)("path",{fill:"#7A8B9A",d:"M10 2L2 7v6c0 4.97 3.5 9 8 10 4.5-1 8-5.03 8-10V7l-8-5zm0 2.18l5.5 3.3V13c0 3.5-2.45 6.58-5.5 7.71-3.05-1.13-5.5-4.21-5.5-7.71V7.48l5.5-3.3zm-1.5 5.32v5h2v-5h-2zm-1-3v2h4V6.5h-4z"})}),visible:e=>e.isLmsAddonActive},{path:"ai-assistant",label:"AI Assistant",title:"AI Assistant",group:"ai",Icon:()=>(0,W.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 21 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("path",{d:"m2.7627 16.096c-1.0955-1.4027-1.7749-3.085-1.9608-4.8551-0.18583-1.77 0.12939-3.5567 0.90974-5.1564 0.78034-1.5996 1.9944-2.9478 3.5038-3.8909 1.5094-0.94309 3.2534-1.4431 5.0332-1.4431 1.7798 0 3.5238 0.50005 5.0332 1.4431 1.5094 0.9431 2.7235 2.2913 3.5038 3.8909s1.0956 3.3863 0.9097 5.1564c-0.1858 1.7701-0.8652 3.4524-1.9607 4.8551",stroke:"#7A8B9A",strokeLinecap:"round",strokeWidth:"1.5"}),(0,W.jsx)("path",{d:"m4.6016 16.096v-4.3078c0-3.9364 1.8826-5.9046 5.6478-5.9046 3.7653 0 5.6479 1.9682 5.6479 5.9046v4.3078",stroke:"#7A8B9A",strokeLinecap:"round",strokeWidth:"1.5"}),(0,W.jsx)("path",{className:"rwpfnl-ai-nav-icon-eye",d:"m7.6806 12.506c0.53877 0 0.97554-0.4368 0.97554-0.9755 0-0.5388-0.43677-0.9756-0.97554-0.9756-0.53878 0-0.97554 0.4368-0.97554 0.9756 0 0.5387 0.43676 0.9755 0.97554 0.9755z",fill:"#7A8B9A"}),(0,W.jsx)("path",{className:"rwpfnl-ai-nav-icon-eye",d:"m12.815 12.506c0.5388 0 0.9755-0.4368 0.9755-0.9755 0-0.5388-0.4367-0.9756-0.9755-0.9756s-0.9756 0.4368-0.9756 0.9756c0 0.5387 0.4368 0.9755 0.9756 0.9755z",fill:"#7A8B9A"})]}),saves:!1,wide:!0},{path:"mcp",label:"MCP for AI Agents",title:"MCP for AI Agents",group:"ai",Icon:()=>(0,W.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 22 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("path",{d:"M9.32781 2.31781L10.6625 9.61166L17.9564 10.9464L10.6625 12.2811L9.32781 19.575L7.99307 12.2811L0.699219 10.9464L7.99307 9.61166L9.32781 2.31781Z",stroke:"#7A8B9A",strokeWidth:"1.4",strokeLinejoin:"round"}),(0,W.jsx)("path",{d:"M16.8785 0.700012L17.4504 3.90311L20.6535 4.47502L17.4504 5.04693L16.8785 8.25003L16.3066 5.04693L13.1035 4.47502L16.3066 3.90311L16.8785 0.700012Z",stroke:"#7A8B9A",strokeWidth:"1.4",strokeLinejoin:"round"})]}),saves:!1,wide:!0},{path:"notifications",label:"Notifications",title:"Notifications",group:"tools",Icon:()=>(0,W.jsx)("svg",{width:"20",height:"20",fill:"none",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:(0,W.jsx)("path",{stroke:"#7A8B9A",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.4",d:"M15 6.667A5 5 0 005 6.667c0 5.833-2.5 7.5-2.5 7.5h15s-2.5-1.667-2.5-7.5zM11.442 17.5a1.667 1.667 0 01-2.884 0"})})},{path:"advanced",label:"Advanced",title:"Advanced",group:"tools",Icon:()=>(0,W.jsx)("svg",{width:"18",height:"18",fill:"none",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",children:(0,W.jsx)("path",{fill:"#7A8B9A",d:"M.75 3.563h2.052a2.796 2.796 0 005.396 0h9.052a.75.75 0 100-1.5H8.198a2.796 2.796 0 00-5.396 0H.75a.75.75 0 000 1.5zM5.5 1.5a1.313 1.313 0 110 2.625 1.313 1.313 0 010-2.625zm11.75 6.75h-2.052a2.796 2.796 0 00-5.396 0H.75a.75.75 0 000 1.5h9.053a2.796 2.796 0 005.395 0h2.052a.75.75 0 100-1.5zm-4.75 2.063a1.312 1.312 0 110-2.624 1.312 1.312 0 010 2.624zm4.75 4.125H8.198a2.796 2.796 0 00-5.396 0H.75a.75.75 0 100 1.5h2.052a2.796 2.796 0 005.396 0h9.052a.75.75 0 100-1.5zM5.5 16.501a1.313 1.313 0 110-2.626 1.313 1.313 0 010 2.626z"})})},{path:"rollback",label:"Rollback Settings",title:"Rollback Settings",group:"tools",Icon:()=>(0,W.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("path",{fill:"#7A8B9A",d:"M9 1.5a7.5 7.5 0 11-7.06 4.95.75.75 0 111.41.51A6 6 0 109 3a5.96 5.96 0 00-3.65 1.24l1.28 1.28a.45.45 0 01-.32.77H2.45a.45.45 0 01-.45-.45V1.99a.45.45 0 01.77-.32L4.29 3.2A7.46 7.46 0 019 1.5z"}),(0,W.jsx)("path",{fill:"#7A8B9A",d:"M9 4.87c.41 0 .75.34.75.75v3.07l1.96 1.96a.75.75 0 11-1.06 1.06L8.47 9.53A.75.75 0 018.25 9V5.62c0-.41.34-.75.75-.75z"})]}),saves:!1},{path:"role-management",label:"Role Management",title:"Role Management",group:"tools",Icon:()=>(0,W.jsxs)("svg",{width:"19",height:"18",fill:"none",viewBox:"0 0 19 18",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("path",{fill:"#7A8B9A",d:"M6.134 13.435h5.732a1.57 1.57 0 001.474-2.096 4.594 4.594 0 00-2.588-2.706 2.401 2.401 0 00.663-1.652A2.418 2.418 0 009 4.566 2.418 2.418 0 006.585 6.98c0 .64.255 1.22.663 1.652A4.595 4.595 0 004.66 11.34a1.57 1.57 0 001.474 2.095zM7.71 6.98a1.291 1.291 0 012.58 0c0 .711-.579 1.29-1.29 1.29-.711 0-1.29-.579-1.29-1.29zm-1.988 4.733A3.482 3.482 0 019 9.396c1.472 0 2.79.932 3.279 2.318a.443.443 0 01-.413.596H6.134a.443.443 0 01-.412-.596z"}),(0,W.jsx)("path",{fill:"#7A8B9A",d:"M1.144 11.078l.992.189c.11.335.247.665.41.988l-.567.837a1.408 1.408 0 00.167 1.782l.98.983a1.408 1.408 0 001.782.174l.844-.569c.312.158.64.295.983.407l.191.992c.128.66.709 1.139 1.38 1.139h1.398c.673 0 1.254-.479 1.38-1.14l.192-.99c.342-.113.67-.25.982-.407l.834.564a1.406 1.406 0 001.782-.168l.987-.984c.478-.476.55-1.227.171-1.785l-.566-.835c.162-.323.298-.654.409-.989l.992-.188a1.408 1.408 0 001.145-1.381v-1.39c0-.673-.48-1.253-1.14-1.38l-.997-.192a7.344 7.344 0 00-.409-.984l.567-.836a1.41 1.41 0 00-.17-1.784l-.987-.987a1.409 1.409 0 00-1.787-.168l-.832.567a6.964 6.964 0 00-.98-.407l-.192-.995A1.408 1.408 0 009.705 0H8.306c-.673 0-1.253.48-1.38 1.14l-.192.996c-.342.113-.67.25-.982.407l-.843-.57a1.407 1.407 0 00-1.785.173l-.981.987a1.409 1.409 0 00-.166 1.78l.568.837c-.163.324-.3.653-.41.985l-.996.191A1.41 1.41 0 000 8.307v1.39c0 .674.48 1.255 1.144 1.381zm-.019-2.77c0-.135.096-.251.228-.277l1.33-.257a.56.56 0 00.436-.403c.127-.466.32-.93.572-1.38a.562.562 0 00-.024-.591l-.758-1.12a.282.282 0 01.033-.356l.98-.986a.282.282 0 01.358-.034l1.125.762c.179.12.411.129.597.02a5.848 5.848 0 011.37-.569.562.562 0 00.402-.435l.258-1.33a.281.281 0 01.275-.228h1.397c.135 0 .25.096.276.229l.256 1.329c.04.21.197.378.403.435.491.136.952.328 1.37.57.187.108.42.099.599-.022l1.115-.76a.28.28 0 01.357.033l.987.987c.096.096.11.246.034.358L14.345 5.4a.563.563 0 00-.025.59c.252.45.445.916.573 1.381a.56.56 0 00.436.403l1.33.258a.281.281 0 01.228.275v1.39a.282.282 0 01-.23.276l-1.327.252a.562.562 0 00-.437.404 6.25 6.25 0 01-.573 1.388.563.563 0 00.025.59l.756 1.115a.282.282 0 01-.034.356l-.988.985a.281.281 0 01-.355.033l-1.117-.757a.566.566 0 00-.597-.021 5.91 5.91 0 01-1.372.57.562.562 0 00-.402.435l-.256 1.325a.28.28 0 01-.276.227H8.307a.282.282 0 01-.277-.227l-.256-1.325a.562.562 0 00-.401-.435 5.884 5.884 0 01-1.371-.57.565.565 0 00-.596.02l-1.127.76a.281.281 0 01-.356-.035l-.98-.984a.281.281 0 01-.033-.355l.757-1.117a.564.564 0 00.025-.59 6.175 6.175 0 01-.573-1.388.563.563 0 00-.438-.404l-1.327-.252a.282.282 0 01-.229-.276v-1.39z"})]}),wide:!0,visible:e=>e.canManageOptions},{path:"logs",label:"Logs",title:"Logs",group:"tools",Icon:()=>(0,W.jsx)("svg",{width:"14",height:"18",fill:"none",viewBox:"0 0 14 18",xmlns:"http://www.w3.org/2000/svg",children:(0,W.jsx)("path",{fill:"#7A8B9A",d:"M4.705 13.775c0 .26-.196.47-.438.471l-1.027.003c-.243 0-.44-.21-.44-.47l-.004-3.558c0-.26.197-.471.44-.471.242 0 .438.21.438.47l.003 3.087c.497 0 .414-.002.586-.003.244-.001.442.21.442.471zm3.33-2.526l.006 1.5v.012c0 .82-.631 1.488-1.409 1.488-.76 0-1.376-.66-1.376-1.475l-.006-1.55c0-.814.617-1.474 1.377-1.474.776 0 1.408.668 1.408 1.488v.011zm-.87 1.512L7.16 11.25v-.012a.55.55 0 00-.525-.55c-.281.006-.507.25-.506.553l.005 1.518c0 .302.225.546.507.551a.549.549 0 00.525-.55zM11.1 12l-.536.002c-.242 0-.438.21-.438.47 0 .261.199.473.443.47h.06a.54.54 0 01-.489.368c-.281-.005-.507-.25-.507-.552l-.005-1.518c0-.302.225-.546.507-.552a.54.54 0 01.468.307.428.428 0 00.383.243c.332 0 .544-.378.388-.69-.236-.475-.707-.799-1.248-.799-.76 0-1.377.661-1.377 1.476l.006 1.549c0 .814.617 1.475 1.377 1.475.777 0 1.408-.668 1.408-1.489v-.291c-.002-.26-.199-.469-.44-.468V12zM14 7.864v6.386c0 2.068-1.57 3.75-3.5 3.75h-7C1.57 18 0 16.318 0 14.25V3.75C0 1.682 1.57 0 3.5 0h3.16c1.31 0 2.54.546 3.466 1.537l2.439 2.614C13.49 5.143 14 6.461 14 7.863v.001zM9.135 2.598a3.517 3.517 0 00-.735-.586V5.25c0 .413.314.75.7.75h3.022a3.731 3.731 0 00-.547-.788L9.135 2.6v-.001zM12.6 7.863c0-.123-.022-.242-.033-.363H9.1C7.942 7.5 7 6.49 7 5.25V1.535c-.113-.012-.224-.035-.34-.035H3.5c-1.158 0-2.1 1.01-2.1 2.25v10.5c0 1.24.942 2.25 2.1 2.25h7c1.158 0 2.1-1.01 2.1-2.25V7.862z"})}),wide:!0}],Jr="general",ea=e=>"on"===e?"on":"off",ta=e=>"yes"===e?"yes":"no",na=e=>{const t=e.general||{},n=e.permalink||{},l=e.optin||{},r=e.offer||{},a=e.recaptcha||{},s=e.gtm||{},i=e.pixel||{},o=e.notification||{},c=e.options||{},u=e.capabilities||{};return{builder:t.builder||"gutenberg",funnel_builder_mode:c.canvasMode||"vertical",permalink_settings:n.structure||"default",permalink_step_base:n.step_base||c.defaultStepBase||"wpfunnels",permalink_funnel_base:n.funnel_base||c.defaultFunnelBase||"step",sender_name:l.sender_name||"",sender_email:l.sender_email||"",email_subject:l.email_subject||"",enable_recaptcha:ea(a.enable_recaptcha),recaptcha_site_key:a.recaptcha_site_key||"",recaptcha_site_secret:a.recaptcha_site_secret||"",enable_skip_cart:ea(t.enable_skip_cart),skip_cart_for:t.skip_cart_for||"whole",offer_orders:r.offer_orders||"main-order",show_supported_payment_gateway:ea(r.show_supported_payment_gateway),skip_offer_step:ea(r.skip_offer_step),skip_offer_step_for_free:ea(r.skip_offer_step_for_free),skip_offer_for_recurring_buyer:ea(r.skip_offer_for_recurring_buyer),skip_offer_for_recurring_buyer_within_year:ea(r.skip_offer_for_recurring_buyer_within_year),enable_global_thankyou:ea(r.enable_global_thankyou),enable_fb_pixel:ea(i.enable_fb_pixel),fb_tracking_code:i.facebook_pixel_id||"",fb_tracking_events:{...i.facebook_tracking_events||{}},gtm_enable:ea(s.gtm_enable),gtm_container_id:s.gtm_container_id||"",gtm_events:{...s.gtm_events||{}},google_map_api_key:e.googleMapKey||"",lms_provider:e.lms&&e.lms.selected||"",enable_revenue_report:ta(o.enable_revenue_report),revenue_report_frequency:o.revenue_report_frequency||"weekly",revenue_report_recipient:o.revenue_report_recipient||c.adminEmail||"",revenue_report_subject:o.revenue_report_subject||"Store Revenue Report - {period}",send_time:o.send_time||"10:00",disable_theme_style:ea(t.disable_theme_style),uninstall_cleanup:ea(t.uninstall_cleanup),allow_tracking:ta(u.trackingConsent),enable_log_status:ea(t.enable_log_status),user_role_management:{...e.userRoles||{}},analytics_roles:{...t.disable_analytics||{}},paypal_reference:ea(t.paypal_reference),order_bump:ea(t.order_bump),ab_testing:ea(t.ab_testing),permission_role:t.allow_funnels||{}}},la=(e,t)=>{const n=e&&(e.message||e.code);return n?`${t} ${n}`:t},ra=()=>{const{pathname:e}=(0,s.zy)(),t=e.replace(/^\/settings\/?/,"").split("/")[0],{notify:n}=fn(),[l,r]=(0,i.useState)(null),[o,c]=(0,i.useState)({}),[u,d]=(0,i.useState)(""),[p,f]=(0,i.useState)(!1),h=(0,i.useRef)({}),m=(0,i.useCallback)(()=>(d(""),v("settings/page").then(e=>{const t=na(e);h.current=t,r(e),c(t)}).catch(e=>{d(la(e,"Settings could not be loaded."))})),[]);(0,i.useEffect)(()=>{m()},[m]);const w=(0,i.useCallback)((e,t)=>{c(n=>({...n,[e]:t}))},[]),x=(0,i.useCallback)(e=>{c(t=>({...t,...e}))},[]),b=l?.capabilities||{},y=l?.options||{},j=(0,i.useMemo)(()=>(e=>Xr.filter(t=>!t.visible||t.visible(e)))(b),[b]),k=(C=t,Xr.find(e=>e.path===C));var C;const _=(0,i.useCallback)(()=>{return f(!0),(e=((e,t)=>{const n={...e,set_permalink:e.permalink_settings,user_role_management:{roles:e.user_role_management||{}}};return e.lms_provider||delete n.lms_provider,t&&e.allow_tracking!==t.allow_tracking||delete n.allow_tracking,n})(o,h.current),g("settings/page",e)).then(e=>{const t=na(e);h.current=t,r(e),c(t),n("Saved Successfully")}).catch(e=>{n(la(e,"Settings could not be saved."),{type:"error"})}).finally(()=>f(!1));var e},[o,n]),N=(0,i.useMemo)(()=>({values:o,set:w,patch:x,data:l,capabilities:b,options:y,isSaving:p,reload:m}),[o,w,x,l,b,y,p,m]);return u?(0,W.jsx)("div",{className:"rwpfnl-settings rwpfnl-settings--error",children:(0,W.jsxs)("p",{className:"rwpfnl-settings-error",children:[u,(0,W.jsx)("button",{type:"button",className:"rwpfnl-btn",onClick:m,children:"Try again"})]})}):l?k&&j.includes(k)?(0,W.jsx)(Dr.Provider,{value:N,children:(0,W.jsxs)("div",{className:"rwpfnl-settings",children:[(0,W.jsx)("nav",{className:"rwpfnl-settings-nav",children:Gr.map(e=>{const t=j.filter(t=>t.group===e.id);return t.length?(0,W.jsxs)("div",{className:"rwpfnl-settings-nav__group",children:[(0,W.jsx)("span",{className:"rwpfnl-settings-nav__group-label",children:e.label}),(0,W.jsx)("ul",{children:t.map(e=>(0,W.jsx)("li",{children:(0,W.jsxs)(a.k2,{to:`/settings/${e.path}`,className:e=>{let{isActive:t}=e;return"rwpfnl-settings-nav__item"+(t?" active":"")},children:[(0,W.jsx)(e.Icon,{}),(0,W.jsx)("span",{children:e.label})]})},e.path))})]},e.id):null})}),(0,W.jsxs)("div",{className:"rwpfnl-settings-content",children:[(0,W.jsxs)("header",{className:"rwpfnl-settings-header",children:[(0,W.jsxs)("h2",{className:"rwpfnl-settings-header__title",children:[(0,W.jsx)("span",{className:"rwpfnl-settings-header__icon",children:(0,W.jsx)(k.Icon,{})}),(0,W.jsx)("span",{children:k.title})]}),!1!==k.saves&&(0,W.jsx)("div",{className:"rwpfnl-settings-header__actions",children:(0,W.jsx)("button",{type:"button",className:"rwpfnl-btn rwpfnl-settings-save",disabled:p,onClick:_,children:p?"Saving…":"Save changes"})})]}),(0,W.jsx)("div",{className:"rwpfnl-settings-panels",children:(0,W.jsx)("div",{className:"rwpfnl-settings-panel"+(k.wide?" rwpfnl-settings-panel--wide":""),children:(0,W.jsx)(s.sv,{context:{save:_}})})})]})]})}):(0,W.jsx)(s.C5,{to:`/settings/${Jr}`,replace:!0}):(0,W.jsx)(Br,{})},aa=e=>{let{text:t,variant:n="info"}=e;return(0,W.jsxs)("span",{className:"rwpfnl-settings-tooltip",children:["question"===n?(0,W.jsx)(Ir,{}):(0,W.jsx)($r,{}),(0,W.jsx)("p",{children:t})]})},sa=e=>{let{label:t,tooltip:n,description:l,className:r="",stacked:a=!1,children:s}=e;return(0,W.jsxs)("div",{className:`rwpfnl-field${a?" rwpfnl-field--stacked":""}${r?` ${r}`:""}`,children:[t&&(0,W.jsxs)("label",{className:"rwpfnl-field__label",children:[(0,W.jsx)("span",{className:"rwpfnl-field__label-text",children:t}),n&&(0,W.jsx)(aa,{text:n}),l&&(0,W.jsx)("span",{className:"rwpfnl-field__description",children:l})]}),(0,W.jsx)("div",{className:"rwpfnl-field__control",children:s})]})},ia=e=>{let{checked:t,onChange:n,disabled:l=!1,label:r}=e;const a=(0,i.useId)();return(0,W.jsxs)("span",{className:"rwpfnl-switcher"+(l?" is-disabled":""),children:[(0,W.jsx)("input",{type:"checkbox",id:a,checked:!!t,disabled:l,"aria-label":r,onChange:e=>n(e.target.checked)}),(0,W.jsx)("label",{htmlFor:a})]})},oa=e=>{let{checked:t,onChange:n,disabled:l=!1,name:r,label:a}=e;const s=(0,i.useId)();return(0,W.jsxs)("span",{className:"rwpfnl-radio"+(l?" is-disabled":""),children:[(0,W.jsx)("input",{type:"radio",id:s,name:r,checked:!!t,disabled:l,"aria-label":a,onChange:()=>n()}),(0,W.jsx)("label",{htmlFor:s})]})},ca=e=>{let{checked:t,onChange:n,disabled:l=!1,label:r}=e;const a=(0,i.useId)();return(0,W.jsxs)("span",{className:"rwpfnl-checkbox"+(l?" is-disabled":""),children:[(0,W.jsx)("input",{type:"checkbox",id:a,checked:!!t,disabled:l,onChange:e=>n(e.target.checked)}),(0,W.jsx)("label",{htmlFor:a,children:r})]})},ua=e=>{let{value:t,onChange:n,type:l="text",placeholder:r="",disabled:a=!1}=e;return(0,W.jsx)("input",{type:l,className:"rwpfnl-input",value:t??"",placeholder:r,disabled:a,onChange:e=>n(e.target.value)})},da=e=>{let{value:t,onChange:n}=e;const[l,r]=(0,i.useState)(!1);return(0,W.jsxs)("div",{className:"rwpfnl-secret-field",children:[(0,W.jsx)("input",{type:l?"text":"password",className:"rwpfnl-input",value:t??"",onChange:e=>n(e.target.value)}),(0,W.jsx)("button",{type:"button",className:"rwpfnl-secret-field__toggle","aria-label":l?"Hide key":"Show key",onClick:()=>r(e=>!e),children:l?(0,W.jsx)(Ur,{}):(0,W.jsx)(Vr,{})})]})},pa=e=>{let{value:t,onChange:n,options:l,placeholder:r,disabled:a=!1,className:s=""}=e;return(0,W.jsxs)("select",{className:"rwpfnl-select"+(s?` ${s}`:""),value:t??"",disabled:a,onChange:e=>n(e.target.value),children:[r&&(0,W.jsx)("option",{value:"",children:r}),l.map(e=>(0,W.jsx)("option",{value:e.value,children:e.label},e.value))]})},fa=e=>{let{tabs:t,active:n,onChange:l}=e;return(0,W.jsx)("div",{className:"rwpfnl-settings-tabs",children:(0,W.jsx)("ul",{className:"rwpfnl-settings-tabs__nav",children:t.map(e=>(0,W.jsx)("li",{className:"rwpfnl-settings-tabs__tab"+(n===e.id?" active":""),role:"button",tabIndex:0,onClick:()=>l(e.id),onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),l(e.id))},children:e.label},e.id))})})},ha=e=>{let{text:t,utm:n,pricingUrl:l}=e;const r=`wpfnl-plugin-${n||"settings"}`,a=new URLSearchParams({utm_source:`${r}-pro-button`,utm_medium:r,utm_campaign:`${r}-pro-CTA`,utm_id:`${r}-pro-CTA`});return(0,W.jsxs)("p",{className:"rwpfnl-pro-note",children:[(0,W.jsx)("span",{className:"rwpfnl-pro-note__text",children:t}),(0,W.jsxs)("a",{className:"rwpfnl-pro-note__link",href:`${l}?${a.toString()}#price`,target:"_blank",rel:"noopener noreferrer",title:"Click to Upgrade Pro",children:["Go Pro",(0,W.jsx)(Qr,{})]})]})},ma=e=>{let{url:t}=e;return(0,W.jsx)("div",{className:"rwpfnl-pro-overlay",children:(0,W.jsxs)("a",{className:"rwpfnl-btn rwpfnl-btn--pro",target:"_blank",rel:"noopener noreferrer",href:t,children:[(0,W.jsx)(Zr,{}),"Upgrade To Pro Now"]})})},va=e=>{let{tone:t="info",children:n}=e;return(0,W.jsx)("div",{className:`rwpfnl-settings-notice rwpfnl-settings-notice--${t}`,children:n})},ga=[{id:"builder",label:"Page Builder"},{id:"canvas",label:"Canvas Mode"}],wa={gutenberg:"gutenberg.png",elementor:"elementor.png","divi-builder":"divi.png",oxygen:"oxygen.png",bricks:"bricks.png",other:"others.png"},xa=[{value:"horizontal",label:"Horizontal",Icon:()=>(0,W.jsxs)("svg",{width:"30",height:"30",viewBox:"0 0 60 60",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("rect",{x:"2",y:"18",width:"16",height:"24",rx:"4",fill:"#7c3aed",opacity:"0.85"}),(0,W.jsx)("path",{d:"M18 30h8",stroke:"#7c3aed",strokeWidth:"2.5",strokeLinecap:"round"}),(0,W.jsx)("rect",{x:"26",y:"18",width:"16",height:"24",rx:"4",fill:"#7c3aed",opacity:"0.55"}),(0,W.jsx)("path",{d:"M42 30h8",stroke:"#7c3aed",strokeWidth:"2.5",strokeLinecap:"round"}),(0,W.jsx)("rect",{x:"50",y:"18",width:"10",height:"24",rx:"4",fill:"#7c3aed",opacity:"0.25"})]})},{value:"vertical",label:"Vertical",Icon:()=>(0,W.jsxs)("svg",{width:"30",height:"30",viewBox:"0 0 60 60",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,W.jsx)("rect",{x:"10",y:"2",width:"40",height:"14",rx:"4",fill:"#7c3aed",opacity:"0.85"}),(0,W.jsx)("path",{d:"M30 16v8",stroke:"#7c3aed",strokeWidth:"2.5",strokeLinecap:"round"}),(0,W.jsx)("rect",{x:"10",y:"24",width:"40",height:"14",rx:"4",fill:"#7c3aed",opacity:"0.55"}),(0,W.jsx)("path",{d:"M30 38v8",stroke:"#7c3aed",strokeWidth:"2.5",strokeLinecap:"round"}),(0,W.jsx)("rect",{x:"10",y:"46",width:"40",height:"12",rx:"4",fill:"#7c3aed",opacity:"0.25"})]})}],ba=[{id:"pixel",label:"Facebook Pixel"},{id:"gtm",label:"Google Tag Manager"},{id:"maps",label:"Google Maps API"}],ya=e=>{let{label:t,isPro:n,checked:l,onChange:r,docUrl:a,docTitle:s}=e;return(0,W.jsxs)("div",{className:"rwpfnl-tracker-header",children:[(0,W.jsxs)("div",{className:"rwpfnl-field rwpfnl-field--inline",children:[(0,W.jsxs)("label",{className:"rwpfnl-field__label",children:[(0,W.jsx)("span",{className:"rwpfnl-field__label-text",children:t}),!n&&(0,W.jsx)("span",{className:"rwpfnl-pro-tag-icon",children:(0,W.jsx)(Zr,{})})]}),(0,W.jsx)("div",{className:"rwpfnl-field__control",children:(0,W.jsx)(ia,{label:t,checked:l,disabled:!n,onChange:r})})]}),(0,W.jsxs)("a",{className:"rwpfnl-guide-btn",href:a,target:"_blank",rel:"noreferrer",title:s,children:[(0,W.jsx)(Yr,{}),(0,W.jsx)("span",{children:"Doc"})]})]})},ja=[{id:"revenue",label:"Store Revenue Report"}],ka=[{value:"weekly",label:"Weekly"},{value:"monthly",label:"Monthly"}],Ca=[{id:"skip-cart",label:"Skip Cart Settings"},{id:"orders",label:"Order Management"},{id:"payments",label:"Payment Management"},{id:"thank-you",label:"Global Thank You"}],_a=[{id:"email",label:"Opt-in Email"},{id:"recaptcha",label:"reCAPTCHA"}],Na=[{id:"preference",label:"Preference Link"},{id:"base",label:"Post Type Permalink Base"}],Sa=[{value:"default",label:"Default Permalink"},{value:"funnel-step",label:"Funnel and Step Slug"},{value:"funnel",label:"Funnel Slug"},{value:"step",label:"Step Slug"}],La=(e,t,n,l)=>{const r=(0,W.jsx)("code",{children:n||"step"}),a=(0,W.jsx)("code",{children:l||"wpfunnels"});switch(e){case"funnel-step":return(0,W.jsxs)(W.Fragment,{children:[t,"/",r,"/%funnelname%/",a,"/%stepname%/"]});case"funnel":return(0,W.jsxs)(W.Fragment,{children:[t,"/",r,"/%funnelname%/%stepname%/"]});case"step":return(0,W.jsxs)(W.Fragment,{children:[t,"/%funnelname%/",a,"/%stepname%/"]});default:return(0,W.jsx)(W.Fragment,{children:"Default WordPress Permalink"})}},Ma=[{id:"roles",label:"User Role Manager"},{id:"analytics",label:"Analytics"}],za=["editor","author","contributor","shop_manager","group_leader"],Ea=["administrator","editor","author","contributor","subscriber","customer","shop_manager"],Aa=e=>{const t=e.replace(/_/g," ");return t.charAt(0).toUpperCase()+t.slice(1)},Pa=new Map,Fa=e=>{let{app:t,mounter:n,label:l}=e;const r=(0,i.useRef)(null),[a,s]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{const e=d.settingsPanelApps[t]||{};let l=null,a=!1;if(e.script)return(e=>{if(!e||Pa.has(e))return;const t=document.createElement("link");t.rel="stylesheet",t.href=e,document.head.appendChild(t),Pa.set(e,Promise.resolve())})(e.style),(e=>{if(Pa.has(e))return Pa.get(e);const t=new Promise((t,n)=>{const l=document.createElement("script");l.src=e,l.async=!0,l.onload=t,l.onerror=()=>n(new Error(`Could not load ${e}`)),document.head.appendChild(l)});return Pa.set(e,t),t})(e.script).then(()=>{if(a||!r.current)return;const e=window[n];"function"==typeof e?l=e(r.current):s(!0)}).catch(()=>{a||(Pa.delete(e.script),s(!0))}),()=>{a=!0,l&&"function"==typeof l.unmount&&l.unmount()};s(!0)},[t,n]),a?(0,W.jsxs)("p",{className:"rwpfnl-settings-error",children:[l," could not be loaded. Reload the page to try again."]}):(0,W.jsx)("div",{className:"rwpfnl-vue-panel",ref:r})},Da={general:()=>{const{values:e,set:t,options:n}=Tr(),{notify:l}=fn(),[r,a]=(0,i.useState)("builder"),[s,o]=(0,i.useState)("idle"),c=n.builders||{},u=n.imagePath||"";return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(fa,{tabs:ga,active:r,onChange:a}),"builder"===r&&(0,W.jsxs)("div",{className:"rwpfnl-settings-tab",children:[(0,W.jsx)("div",{className:"rwpfnl-choice-grid",children:Object.entries(c).map(n=>{let[l,r]=n;return(0,W.jsxs)("div",{className:"rwpfnl-choice"+(e.builder===l?" checked":""),role:"button",tabIndex:0,onClick:()=>t("builder",l),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t("builder",l))},children:[wa[l]&&(0,W.jsx)("img",{src:`${u}/${wa[l]}`,alt:""}),(0,W.jsx)("p",{className:"rwpfnl-choice__title",children:r})]},l)})}),(0,W.jsx)("hr",{}),(0,W.jsxs)("div",{className:"rwpfnl-field rwpfnl-field--sync",children:[(0,W.jsxs)("label",{className:"rwpfnl-field__label",children:[(0,W.jsx)("span",{className:"rwpfnl-field__label-text",children:"Sync Template"}),(0,W.jsx)(aa,{variant:"question",text:"Click to get the updated funnel templates, made using your preferred page builder, when creating funnels."})]}),(0,W.jsx)("div",{className:"rwpfnl-field__control",children:(0,W.jsx)("div",{className:"rwpfnl-sync-box",style:u?{backgroundImage:`url(${u}/sync-template-img.png)`}:void 0,children:(0,W.jsxs)("button",{type:"button",className:"rwpfnl-btn rwpfnl-btn--outline rwpfnl-sync-btn"+("done"===s?" is-done":""),disabled:"syncing"===s,onClick:()=>{o("syncing"),g("settings/clear-templates").then(()=>{o("done"),setTimeout(()=>o("idle"),2e3)}).catch(()=>{o("idle"),l("Templates could not be synced.",{type:"error"})})},children:[(0,W.jsx)("span",{className:"rwpfnl-sync-btn__icon"+("syncing"===s?" is-spinning":""),children:"done"===s?(0,W.jsx)(Wr,{}):(0,W.jsx)(Or,{})}),(0,W.jsx)("span",{className:"rwpfnl-sync-btn__text",children:"done"===s?"Templates synced successfully":"Sync Templates"})]})})})]})]}),"canvas"===r&&(0,W.jsx)("div",{className:"rwpfnl-settings-tab",children:(0,W.jsx)("div",{className:"rwpfnl-choice-grid",children:xa.map(n=>(0,W.jsxs)("div",{className:"rwpfnl-choice"+(e.funnel_builder_mode===n.value?" checked":""),role:"button",tabIndex:0,onClick:()=>t("funnel_builder_mode",n.value),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t("funnel_builder_mode",n.value))},children:[(0,W.jsx)(n.Icon,{}),(0,W.jsx)("p",{className:"rwpfnl-choice__title",children:n.label})]},n.value))})})]})},permalink:()=>{const{values:e,set:t,options:n}=Tr(),[l,r]=(0,i.useState)("preference"),a=n.homeUrl||"";return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(fa,{tabs:Na,active:l,onChange:r}),"preference"===l&&(0,W.jsx)("div",{className:"rwpfnl-settings-tab",children:(0,W.jsx)("div",{className:"rwpfnl-permalink-options",children:Sa.map(n=>(0,W.jsxs)("label",{className:"rwpfnl-permalink-option"+(e.permalink_settings===n.value?" checked":""),children:[(0,W.jsx)("input",{type:"radio",name:"rwpfnl-permalink-structure",value:n.value,checked:e.permalink_settings===n.value,onChange:()=>t("permalink_settings",n.value)}),(0,W.jsxs)("span",{className:"rwpfnl-permalink-option__body",children:[(0,W.jsx)("span",{className:"rwpfnl-permalink-option__title",children:n.label}),(0,W.jsx)("span",{className:"rwpfnl-permalink-option__url",children:La(n.value,a,e.permalink_funnel_base,e.permalink_step_base)})]})]},n.value))})}),"base"===l&&(0,W.jsx)("div",{className:"rwpfnl-settings-tab",children:(0,W.jsxs)("div",{className:"rwpfnl-permalink-bases",children:[(0,W.jsxs)("div",{className:"rwpfnl-field rwpfnl-field--stacked",children:[(0,W.jsx)("label",{className:"rwpfnl-field__label",children:(0,W.jsx)("span",{className:"rwpfnl-field__label-text",children:"Funnel Base"})}),(0,W.jsx)("div",{className:"rwpfnl-field__control",children:(0,W.jsx)(ua,{value:e.permalink_funnel_base,onChange:e=>t("permalink_funnel_base",e)})})]}),(0,W.jsxs)("div",{className:"rwpfnl-field rwpfnl-field--stacked",children:[(0,W.jsx)("label",{className:"rwpfnl-field__label",children:(0,W.jsx)("span",{className:"rwpfnl-field__label-text",children:"Step Base"})}),(0,W.jsx)("div",{className:"rwpfnl-field__control",children:(0,W.jsx)(ua,{value:e.permalink_step_base,onChange:e=>t("permalink_step_base",e)})})]})]})})]})},optin:()=>{const{values:e,set:t}=Tr(),[n,l]=(0,i.useState)("email"),r="on"===e.enable_recaptcha;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(fa,{tabs:_a,active:n,onChange:l}),"email"===n&&(0,W.jsx)("div",{className:"rwpfnl-settings-tab",children:(0,W.jsxs)("div",{className:"rwpfnl-settings-box rwpfnl-settings-box--narrow",children:[(0,W.jsx)(sa,{label:"Admin Email",tooltip:"Enter the email address where you would like to receive leads from opt-in.",stacked:!0,children:(0,W.jsx)(ua,{value:e.sender_email,onChange:e=>t("sender_email",e)})}),(0,W.jsx)(sa,{label:"Email Subject",tooltip:"Enter the email subject for the opt-in email.",stacked:!0,children:(0,W.jsx)(ua,{value:e.email_subject,onChange:e=>t("email_subject",e)})})]})}),"recaptcha"===n&&(0,W.jsx)("div",{className:"rwpfnl-settings-tab",children:(0,W.jsxs)("div",{className:"rwpfnl-settings-box rwpfnl-settings-box--narrow",children:[(0,W.jsx)(sa,{label:"Connect reCAPTCHA (v3)",className:"rwpfnl-field--inline",children:(0,W.jsx)(ia,{label:"Connect reCAPTCHA",checked:r,onChange:e=>t("enable_recaptcha",e?"on":"off")})}),r&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(sa,{label:"Site Key",tooltip:"Collect the Site Key from your Google reCAPTCHA site settings under the reCAPTCHA keys.",stacked:!0,children:(0,W.jsx)(ua,{value:e.recaptcha_site_key,onChange:e=>t("recaptcha_site_key",e)})}),(0,W.jsx)(sa,{label:"Site Secret",tooltip:"Collect the Secrect Key from your Google reCAPTCHA site settings under the reCAPTCHA keys.",stacked:!0,children:(0,W.jsx)(ua,{value:e.recaptcha_site_secret,onChange:e=>t("recaptcha_site_secret",e)})})]})]})})]})},offer:()=>{const{values:e,set:t,capabilities:n,options:l}=Tr(),[r,a]=(0,i.useState)("skip-cart"),s=!!n.isGlobalFunnel,o=!!n.isProActivated,c=l.pricingUrl||"https://getwpfunnels.com/pricing/",u="on"===e.enable_skip_cart,d=(e,t,n)=>e?{tooltip:t}:{description:n||t};return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(fa,{tabs:Ca,active:r,onChange:a}),"skip-cart"===r&&(0,W.jsx)("div",{className:"rwpfnl-settings-tab",children:(0,W.jsxs)("div",{className:"rwpfnl-settings-box",children:[(0,W.jsx)(sa,{label:"Enable Skip Cart",className:"rwpfnl-field--inline",...s?{}:{description:"Send buyers straight from the product to the checkout page by skipping the cart."},children:(0,W.jsx)(ia,{label:"Enable Skip Cart",checked:u,disabled:!s,onChange:e=>t("enable_skip_cart",e?"on":"off")})}),u&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(sa,{label:"Skip Cart For The Entire Store",...d(s,"Select this option to enable Skip Cart for all products in your entire WooCommerce store and your funnels."),children:(0,W.jsx)(oa,{name:"rwpfnl-skip-cart-for",label:"Skip cart for the entire store",checked:"whole"===e.skip_cart_for,disabled:!s,onChange:()=>t("skip_cart_for","whole")})}),(0,W.jsx)(sa,{label:"Skip Cart for Global Funnels Only",...d(s,"Select this option to enable Skip Cart only for products that meet your global funnels' conditions."),children:(0,W.jsx)(oa,{name:"rwpfnl-skip-cart-for",label:"Skip cart for global funnels only",checked:"gbf"===e.skip_cart_for,disabled:!s,onChange:()=>t("skip_cart_for","gbf")})})]}),!s&&(0,W.jsx)(ha,{text:"Skip Cart comes with the WPFunnels Global Funnel plan.",utm:"settings-offer-skip-cart",pricingUrl:c})]})}),"orders"===r&&(0,W.jsx)("div",{className:"rwpfnl-settings-tab",children:(0,W.jsxs)("div",{className:"rwpfnl-settings-box",children:[(0,W.jsx)(sa,{label:"Create a new child order for every accepted Upsell/Downsell offer",...d(o,"Enabling this will create separate orders for every post-purchase offers you make."),children:(0,W.jsx)(oa,{name:"rwpfnl-offer-orders",label:"Create a child order",checked:"child-order"===e.offer_orders,disabled:!o,onChange:()=>t("offer_orders","child-order")})}),(0,W.jsx)(sa,{label:"Add all accepted offers (Upsell/Downsell) to the main order",...d(o,"All purchases including main product, order bump, upsell(s), and downsell(s), will be included as part of a single order in WooCommerce."),children:(0,W.jsx)(oa,{name:"rwpfnl-offer-orders",label:"Add offers to the main order",checked:"main-order"===e.offer_orders,disabled:!o,onChange:()=>t("offer_orders","main-order")})}),!o&&(0,W.jsx)(ha,{text:"Order Management comes with WPFunnels Pro.",utm:"settings-offer-order-management",pricingUrl:c})]})}),"payments"===r&&(0,W.jsx)("div",{className:"rwpfnl-settings-tab",children:(0,W.jsxs)("div",{className:"rwpfnl-settings-box",children:[(0,W.jsx)(sa,{label:"Only show supported payment gateways during funnel checkout",...d(o,"You may have several payment gateways in your site. But since we have limited supported payment gateways for post purchase offers, you can use this option to only view supported payment gateways during the funnel checkout page. This means, you do not have to disable other payment gateways for the funnel.","Show only the payment gateways that support post-purchase offers on your funnel checkout."),children:(0,W.jsx)(ia,{label:"Only show supported payment gateways",checked:"on"===e.show_supported_payment_gateway,disabled:!o,onChange:e=>t("show_supported_payment_gateway",e?"on":"off")})}),(0,W.jsx)(sa,{label:"Skip upsell/downsell for unsupported payment gateways",...d(o,"Use this option so that if a buyer chooses to use a payment option that is not supported by WPFunnels, they will not get the post-purchase offers. This means, all payment options will be shown at the checkout page.","Keep every payment option at checkout and skip the offers when the buyer picks an unsupported one."),children:(0,W.jsx)(ia,{label:"Skip offers for unsupported gateways",checked:"on"===e.skip_offer_step,disabled:!o,onChange:e=>t("skip_offer_step",e?"on":"off")})}),(0,W.jsx)(sa,{label:"Skip upsell/downsell for free products",...d(o,"Enable this option in case you want to use a $0 product as the main funnel product. In this case, Upsell and downsell steps will be skipped since they won't work without a successful payment during checkout.","Skip the upsell and downsell steps when the main funnel product is free."),children:(0,W.jsx)(ia,{label:"Skip offers for free products",checked:"on"===e.skip_offer_step_for_free,disabled:!o,onChange:e=>t("skip_offer_step_for_free",e?"on":"off")})}),!o&&(0,W.jsx)(ha,{text:"Payment Management comes with WPFunnels Pro.",utm:"settings-offer-payment-management",pricingUrl:c})]})}),"thank-you"===r&&(0,W.jsx)("div",{className:"rwpfnl-settings-tab",children:(0,W.jsxs)("div",{className:"rwpfnl-settings-box",children:[(0,W.jsx)(sa,{label:"Enable global thank you",...d(o,"Enable this option to redirect users to the WooCommerce order confirmation page for all funnels. If disabled, each funnel will use its own thank you page.","Send buyers of every funnel to the WooCommerce order confirmation page instead of a per-funnel thank you page."),children:(0,W.jsx)(ia,{label:"Enable global thank you",checked:"on"===e.enable_global_thankyou,disabled:!o,onChange:e=>t("enable_global_thankyou",e?"on":"off")})}),!o&&(0,W.jsx)(ha,{text:"Global Thank You comes with WPFunnels Pro.",utm:"settings-offer-global-thank-you",pricingUrl:c})]})})]})},integrations:()=>{const{values:e,set:t,capabilities:n,options:l}=Tr(),[r,a]=(0,i.useState)("pixel"),s=!!n.isProLicenseActive,o=l.pixelEvents||{},c=l.gtmEvents||{},u=(n,l,r)=>{const a={...e[n]||{}};r?a[l]="true":delete a[l],t(n,a)};return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(fa,{tabs:ba,active:r,onChange:a}),"pixel"===r&&(0,W.jsx)("div",{className:"rwpfnl-settings-tab",children:(0,W.jsxs)("div",{className:"rwpfnl-settings-box",children:[(0,W.jsx)(ya,{label:"Track Events Using Facebook Pixel",isPro:s,checked:"on"===e.enable_fb_pixel,onChange:e=>t("enable_fb_pixel",e?"on":"off"),docUrl:"https://getwpfunnels.com/docs/funnel-integrations/facebook-pixel-integration/",docTitle:"Guide On Facebook Pixel Integration"}),"on"===e.enable_fb_pixel&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(sa,{label:"Facebook Pixel ID",tooltip:"Add your Facebook Pixel ID to start tracking events from your funnels.",stacked:!0,children:(0,W.jsx)(ua,{value:e.fb_tracking_code,onChange:e=>t("fb_tracking_code",e)})}),(0,W.jsx)(sa,{label:"Facebook Pixel Events",tooltip:"Choose what events to track in your funnels via Facebook Pixel.",stacked:!0,className:"rwpfnl-field--events",children:(0,W.jsx)("div",{className:"rwpfnl-event-list",children:Object.entries(o).map(t=>{let[n,l]=t;return(0,W.jsx)(ca,{label:l,checked:"true"===(e.fb_tracking_events||{})[n],onChange:e=>u("fb_tracking_events",n,e)},n)})})})]})]})}),"gtm"===r&&(0,W.jsx)("div",{className:"rwpfnl-settings-tab",children:(0,W.jsxs)("div",{className:"rwpfnl-settings-box",children:[(0,W.jsx)(ya,{label:"Track Events Using Google Tag Manager",isPro:s,checked:"on"===e.gtm_enable,onChange:e=>t("gtm_enable",e?"on":"off"),docUrl:"https://getwpfunnels.com/docs/funnel-integrations/google-tag-manager-integration/",docTitle:"Guide On Google Tag Manager Integration"}),"on"===e.gtm_enable&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(sa,{label:"GTM Container ID",tooltip:"In your Google Tab Manager Workspace, near the top of the window, you will find your container ID, formatted as “GTM-XXXXXX“.",stacked:!0,children:(0,W.jsx)(ua,{value:e.gtm_container_id,onChange:e=>t("gtm_container_id",e)})}),(0,W.jsx)(sa,{label:"GTM Events",tooltip:"Choose what events to track in your funnels via Google Tag Manager.",stacked:!0,className:"rwpfnl-field--events",children:(0,W.jsx)("div",{className:"rwpfnl-event-list",children:Object.entries(c).map(t=>{let[n,l]=t;return(0,W.jsx)(ca,{label:l,checked:"true"===(e.gtm_events||{})[n],onChange:e=>u("gtm_events",n,e)},n)})})})]})]})}),"maps"===r&&(0,W.jsx)("div",{className:"rwpfnl-settings-tab",children:(0,W.jsx)("div",{className:"rwpfnl-settings-box rwpfnl-settings-box--narrow",children:(0,W.jsx)(sa,{label:"Google Map API Key",tooltip:"Connect with Google Autocomplete to allow customers to go through checkout faster. When a customer types in the Street address, Google will suggest a full address that the customer can add with one click.",stacked:!0,children:(0,W.jsx)(da,{value:e.google_map_api_key,onChange:e=>t("google_map_api_key",e)})})})})]})},lms:()=>{const{values:e,set:t,data:n}=Tr(),l=n?.lms?.providers||[];return l.length?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(sa,{label:"LMS Provider",tooltip:"Choose your LMS platform. This will be used for LMS funnels and course enrollment.",stacked:!0,children:(0,W.jsx)(pa,{value:e.lms_provider,onChange:e=>t("lms_provider",e),options:l,placeholder:"Select LMS Provider"})}),l.length>1&&(0,W.jsxs)(va,{children:[(0,W.jsx)(qr,{}),(0,W.jsx)("div",{className:"rwpfnl-settings-notice__content",children:(0,W.jsxs)("p",{children:[(0,W.jsx)("strong",{children:"Multiple LMS Plugins Detected"}),"You have ",l.map(e=>e.label).join(" and ")," ","installed. Select the one you want to use with WPFunnels."]})})]})]}):(0,W.jsx)(va,{tone:"warning",children:(0,W.jsxs)("p",{children:[(0,W.jsx)("strong",{children:"No LMS Plugin Detected"}),"Please install and activate either LearnDash or CreatorLMS to use LMS funnels."]})})},"ai-assistant":()=>(0,W.jsx)(Fa,{app:"aiAssistant",mounter:"wpfnlMountAiAssistantSettings",label:"The AI Assistant settings"}),mcp:()=>(0,W.jsx)(Fa,{app:"mcp",mounter:"wpfnlMountMcpSettings",label:"The MCP settings"}),notifications:()=>{const{values:e,set:t,options:n}=Tr(),{notify:l}=fn(),[r,a]=(0,i.useState)("revenue"),[s,o]=(0,i.useState)(n.adminEmail||""),[c,u]=(0,i.useState)(!1),d="yes"===e.enable_revenue_report;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(fa,{tabs:ja,active:r,onChange:a}),(0,W.jsxs)("div",{className:"rwpfnl-settings-tab",children:[(0,W.jsx)("div",{className:"rwpfnl-settings-box",children:(0,W.jsx)(sa,{label:"Enable Store Revenue Report Emails",tooltip:"Enable or disable automated store revenue report emails.",className:"rwpfnl-field--inline",children:(0,W.jsx)(ia,{label:"Enable store revenue report emails",checked:d,onChange:e=>t("enable_revenue_report",e?"yes":"no")})})}),d&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)("div",{className:"rwpfnl-settings-box",children:[(0,W.jsx)(sa,{label:"Report Frequency",tooltip:"Select how often you want to receive revenue reports.",children:(0,W.jsx)("div",{className:"rwpfnl-radio-row",children:ka.map(n=>(0,W.jsxs)("label",{className:"rwpfnl-radio-inline",children:[(0,W.jsx)("input",{type:"radio",name:"rwpfnl-revenue-frequency",value:n.value,checked:e.revenue_report_frequency===n.value,onChange:()=>t("revenue_report_frequency",n.value)}),(0,W.jsx)("span",{children:n.label})]},n.value))})}),(0,W.jsx)(sa,{label:"Recipient Email Address",tooltip:"Enter the email address where you want to receive store revenue reports. You can add multiple emails separated by commas.",children:(0,W.jsx)(ua,{value:e.revenue_report_recipient,placeholder:"[email protected], [email protected]",onChange:e=>t("revenue_report_recipient",e)})}),(0,W.jsxs)(sa,{label:"Report Subject",tooltip:"Customize the subject line for your revenue report emails.",children:[(0,W.jsx)(ua,{value:e.revenue_report_subject,placeholder:"Store Revenue Report - {period}",onChange:e=>t("revenue_report_subject",e)}),(0,W.jsxs)("p",{className:"rwpfnl-hint",children:["Use ","{period}"," to show the date range (e.g., January 6, 2026 - January 12, 2026)"]})]}),(0,W.jsx)(sa,{label:"Send Time",tooltip:"Select the time when you want to receive the revenue report emails.",children:(0,W.jsx)(ua,{type:"time",value:e.send_time,onChange:e=>t("send_time",e)})})]}),(0,W.jsxs)("div",{className:"rwpfnl-test-notification",children:[(0,W.jsxs)("div",{className:"rwpfnl-test-notification__intro",children:[(0,W.jsx)(Kr,{}),(0,W.jsxs)("div",{children:[(0,W.jsx)("h4",{children:"Test Notification"}),(0,W.jsx)("p",{children:"Test the notifications to ensure that emails are arriving in your inbox."})]})]}),(0,W.jsxs)("div",{className:"rwpfnl-test-notification__action",children:[(0,W.jsx)("input",{type:"email",className:"rwpfnl-input",placeholder:"[email protected]",value:s,onChange:e=>o(e.target.value)}),(0,W.jsx)("button",{type:"button",className:"rwpfnl-btn",disabled:c,onClick:()=>{var e;/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s)?(u(!0),(e=s,g("settings/test-notification",{email:e})).then(e=>{e&&e.success?l(e.message||"Test email sent successfully!"):l(e&&e.message||"Test email could not be sent.",{type:"error"})}).catch(()=>l("Error occurred while sending test email",{type:"error"})).finally(()=>u(!1))):l("Please enter a valid email address",{type:"error"})},children:c?"Sending…":"Send"})]})]})]})]})]})},advanced:()=>{const{values:e,set:t}=Tr(),{notify:n}=fn(),[l,r]=(0,i.useState)(!1);return(0,W.jsxs)("div",{className:"rwpfnl-settings-list",children:[(0,W.jsxs)("div",{className:"rwpfnl-settings-list__row",children:[(0,W.jsxs)("div",{className:"rwpfnl-settings-list__info",children:[(0,W.jsx)("h5",{className:"rwpfnl-settings-list__title",children:"Remove WPF Transient Cache"}),(0,W.jsx)("p",{className:"rwpfnl-settings-list__desc",children:"If you are facing issues such as not getting plugin updates or your license not working, clear the transient cache and try again."})]}),(0,W.jsx)("div",{className:"rwpfnl-settings-list__action",children:(0,W.jsx)("button",{type:"button",className:"rwpfnl-clear-transients",title:"Clear transient cache",disabled:l,onClick:()=>{window.confirm("Are you sure you want to run this tool?")&&(r(!0),g("settings/clear-transients").then(()=>n("Transient cache cleared.")).catch(()=>n("Transient cache could not be cleared.",{type:"error"})).finally(()=>r(!1)))},children:(0,W.jsx)(Hr,{})})})]}),(0,W.jsxs)("div",{className:"rwpfnl-settings-list__row",children:[(0,W.jsxs)("div",{className:"rwpfnl-settings-list__info",children:[(0,W.jsx)("h5",{className:"rwpfnl-settings-list__title",children:"Disable Theme Styles in Funnel Pages"}),(0,W.jsx)("p",{className:"rwpfnl-settings-list__desc",children:"When enabled, your theme styles will not be loaded while editing funnel pages. WPFunnels will load its own default styles instead."})]}),(0,W.jsx)("div",{className:"rwpfnl-settings-list__action",children:(0,W.jsx)(ia,{label:"Disable theme styles in funnel pages",checked:"on"===e.disable_theme_style,onChange:e=>t("disable_theme_style",e?"on":"off")})})]}),(0,W.jsxs)("div",{className:"rwpfnl-settings-list__row",children:[(0,W.jsxs)("div",{className:"rwpfnl-settings-list__info",children:[(0,W.jsx)("h5",{className:"rwpfnl-settings-list__title",children:"Clear Funnel Data on Plugin Uninstall"}),(0,W.jsx)("p",{className:"rwpfnl-settings-list__desc",children:"All of your funnel data will be permanently deleted when you uninstall WPFunnels. If you enable this and delete the plugin, you cannot restore your saved data."})]}),(0,W.jsx)("div",{className:"rwpfnl-settings-list__action",children:(0,W.jsx)(ia,{label:"Clear funnel data on plugin uninstall",checked:"on"===e.uninstall_cleanup,onChange:e=>t("uninstall_cleanup",e?"on":"off")})})]}),(0,W.jsxs)("div",{className:"rwpfnl-settings-list__row",children:[(0,W.jsxs)("div",{className:"rwpfnl-settings-list__info",children:[(0,W.jsx)("h5",{className:"rwpfnl-settings-list__title",children:"Help Us Improve Your Experience"}),(0,W.jsxs)("p",{className:"rwpfnl-settings-list__desc",children:["Collect non-sensitive information from your website, such as the PHP version and features used, to help us fix bugs faster, make smarter decisions, and build features that actually matter to you."," ",(0,W.jsx)("a",{href:"https://getwpfunnels.com/privacy-policy/",target:"_blank",rel:"noopener noreferrer",children:"Learn More"}),"."]})]}),(0,W.jsx)("div",{className:"rwpfnl-settings-list__action",children:(0,W.jsx)(ia,{label:"Share usage data",checked:"yes"===e.allow_tracking,onChange:e=>t("allow_tracking",e?"yes":"no")})})]})]})},rollback:()=>{const{options:e}=Tr(),t=e.rollbackVersions||[],[n,l]=(0,i.useState)(t[0]||""),r=(e.rollbackUrl||"").replace("VERSION",n);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)("div",{className:"rwpfnl-settings-list",children:[(0,W.jsxs)("div",{className:"rwpfnl-settings-list__row",children:[(0,W.jsxs)("div",{className:"rwpfnl-settings-list__info",children:[(0,W.jsx)("h5",{className:"rwpfnl-settings-list__title",children:"Current Version"}),(0,W.jsx)("p",{className:"rwpfnl-settings-list__desc",children:"The version of WPFunnels currently running on your site."})]}),(0,W.jsx)("div",{className:"rwpfnl-settings-list__action",children:(0,W.jsxs)("span",{className:"rwpfnl-settings-list__value",children:["v",e.version]})})]}),(0,W.jsxs)("div",{className:"rwpfnl-settings-list__row",children:[(0,W.jsxs)("div",{className:"rwpfnl-settings-list__info",children:[(0,W.jsx)("h5",{className:"rwpfnl-settings-list__title",children:"Rollback to an Older Version"}),(0,W.jsx)("p",{className:"rwpfnl-settings-list__desc",children:"Reinstall a previous release of WPFunnels if the current one is not working as expected. Please back up your database before rolling back."})]}),(0,W.jsx)("div",{className:"rwpfnl-settings-list__action",children:t.length?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)("select",{className:"rwpfnl-select rwpfnl-rollback-select",value:n,onChange:e=>l(e.target.value),children:t.map(e=>(0,W.jsx)("option",{value:e,children:e},e))}),(0,W.jsx)("a",{className:"rwpfnl-rollback-button",href:r,children:"Reinstall"})]}):(0,W.jsx)("span",{className:"rwpfnl-settings-list__value",children:"No older versions available"})})]})]}),(0,W.jsxs)("p",{className:"rwpfnl-settings-hint rwpfnl-settings-hint--warning",children:[(0,W.jsx)(qr,{}),"Warning: Please backup your database before rolling back to an older version of the plugin."]})]})},"role-management":()=>{const{values:e,set:t,capabilities:n,options:l}=Tr(),[r,a]=(0,i.useState)("roles"),s=!!n.isProActivated,o=l.proUrl||"https://getwpfunnels.com/pricing/",c=e.user_role_management||{},u=s?Object.keys(c):za,d=s?l.analyticsRoles||[]:Ea,p=e.analytics_roles||{};return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(fa,{tabs:Ma,active:r,onChange:a}),"roles"===r&&(0,W.jsx)("div",{className:"rwpfnl-settings-tab",children:(0,W.jsxs)("div",{className:"rwpfnl-locked-block",children:[!s&&(0,W.jsx)(ma,{url:o}),(0,W.jsx)("div",{className:"rwpfnl-role-list",children:u.map(e=>(0,W.jsxs)("div",{className:"rwpfnl-role-row"+(s&&"yes"===c[e]?" checked":""),children:[(0,W.jsxs)("div",{className:"rwpfnl-role-row__text",children:[(0,W.jsxs)("div",{className:"rwpfnl-role-row__header",children:[(0,W.jsx)("span",{className:"rwpfnl-role-row__title",children:Aa(e)}),(0,W.jsx)(aa,{text:"Enable or disable WPFunnels access for this role."})]}),(0,W.jsx)("div",{className:"rwpfnl-role-row__desc",children:"Full Access"})]}),(0,W.jsx)(ia,{label:`Allow ${Aa(e)}`,checked:s&&"yes"===c[e],disabled:!s,onChange:n=>((e,n)=>t("user_role_management",{...c,[e]:n?"yes":"no"}))(e,n)})]},e))})]})}),"analytics"===r&&(0,W.jsx)("div",{className:"rwpfnl-settings-tab",children:s&&!n.isAnalyticsVisible?null:(0,W.jsxs)("div",{className:"rwpfnl-locked-block",children:[!s&&(0,W.jsx)(ma,{url:o}),(0,W.jsx)("div",{className:"rwpfnl-settings-box",children:(0,W.jsx)(sa,{label:"Disable Analytics Tracking For",tooltip:"If you want WPFunnels not to track traffic, conversion, & revenue count for Analytics from certain user roles in your site, then you may do so using these options.",stacked:!0,className:"rwpfnl-field--events",children:(0,W.jsx)("div",{className:"rwpfnl-event-list",children:d.map(e=>(0,W.jsx)(ca,{label:Aa(e),checked:s&&"true"===p[e],disabled:!s,onChange:n=>((e,n)=>{const l={...p};n?l[e]="true":delete l[e],t("analytics_roles",l)})(e,n)},e))})})})]})})]})},logs:()=>{const{values:e,set:t,options:n}=Tr(),{notify:l}=fn(),[r,a]=(0,i.useState)(n.logFiles||[]),[s,o]=(0,i.useState)((n.logFiles||[])[0]?.value||""),[c,u]=(0,i.useState)(""),[d,p]=(0,i.useState)(!1),f="on"===e.enable_log_status;return(0,W.jsxs)("div",{className:"rwpfnl-log-panel",children:[(0,W.jsx)("h4",{className:"rwpfnl-settings-box-title",children:"Log Settings"}),(0,W.jsx)("div",{className:"rwpfnl-settings-box",children:(0,W.jsx)(sa,{label:"Enable Logs",tooltip:"Enable logger status to save any log",className:"rwpfnl-field--inline",children:(0,W.jsx)(ia,{label:"Enable logs",checked:f,onChange:e=>t("enable_log_status",e?"on":"off")})})}),f&&(0,W.jsxs)("div",{className:"rwpfnl-settings-box",children:[(0,W.jsxs)("div",{className:"rwpfnl-log-controls",children:[(0,W.jsx)(pa,{value:s,onChange:o,options:r,className:"rwpfnl-log-select",...r.length?{}:{placeholder:"No log files available"}}),!!r.length&&(0,W.jsxs)("div",{className:"rwpfnl-log-actions",children:[(0,W.jsx)("button",{type:"button",className:"rwpfnl-btn",disabled:d||!s,onClick:()=>{s?(p(!0),(e=>v("settings/logs",e?{file:e}:void 0))(s).then(e=>{var t;e&&e.success?u((t=e.content)&&(new DOMParser).parseFromString(t,"text/html").body.textContent||""):(u(""),l("That log file could not be read.",{type:"error"}))}).catch(()=>l("That log file could not be read.",{type:"error"})).finally(()=>p(!1))):u("")},children:"View"}),(0,W.jsx)("button",{type:"button",className:"rwpfnl-btn",disabled:d||!s,onClick:()=>{s&&(p(!0),(e=>w("settings/logs",{file:e}))(s).then(e=>{if(e&&e.success){const t=e.files||[];a(t),o(t[0]?.value||""),u(""),l("Log file deleted.")}else l("That log file could not be deleted.",{type:"error"})}).catch(()=>l("That log file could not be deleted.",{type:"error"})).finally(()=>p(!1)))},children:"Delete"})]})]}),!!c&&(0,W.jsx)("pre",{className:"rwpfnl-log-viewer",children:c})]})]})}},Ta=()=>{const{section:e}=(0,s.g)(),t=Da[e];return t?(0,W.jsx)(t,{}):(0,W.jsx)(s.C5,{to:`/settings/${Jr}`,replace:!0})},Ra=()=>(0,W.jsx)("svg",{width:"20",height:"21",viewBox:"0 0 20 21",fill:"none","aria-hidden":"true",children:(0,W.jsx)("path",{fill:"#6E42D3",d:"M6.66 4.279h6.68l1.442-1.15c.491-.39.674-1.024.467-1.615A1.438 1.438 0 0013.876.54h-7.75a1.44 1.44 0 00-1.374.973 1.433 1.433 0 00.466 1.614l1.443 1.15zm6.794 1.245H6.546C4.27 7.751 2.5 11.658 2.5 14.868c0 2.79 1.482 5.607 4.792 5.607h5.625c2.827 0 4.583-2.149 4.583-5.607 0-3.21-1.77-7.117-4.046-9.344zm-3.77 6.853h.633c.974 0 1.766.79 1.766 1.76 0 .873-.631 1.592-1.458 1.738v.654a.624.624 0 01-1.25 0v-.622h-.833a.624.624 0 01-.625-.623c0-.344.28-.623.625-.623h1.775a.516.516 0 00.516-.515.518.518 0 00-.516-.524h-.634c-.974 0-1.766-.79-1.766-1.76 0-.873.631-1.592 1.458-1.738V9.47a.624.624 0 011.25 0v.622h.833a.624.624 0 110 1.246H9.683a.516.516 0 00-.516.515c0 .293.231.524.516.524z"})}),Ba=()=>(0,W.jsx)("svg",{width:"18",height:"21",viewBox:"0 0 18 21",fill:"none","aria-hidden":"true",children:(0,W.jsx)("path",{fill:"#EE8134",d:"M6.023 20.488a1.253 1.253 0 01-.885-.361 1.244 1.244 0 01.875-2.13h.01a1.243 1.243 0 110 2.492zm9.254-1.246c0-.33-.131-.647-.366-.88a1.253 1.253 0 00-.884-.366h-.01a1.253 1.253 0 00-1.149.776 1.241 1.241 0 00.278 1.355 1.252 1.252 0 002.131-.885zm2.69-12.598l-1.01 6.16a2.564 2.564 0 01-.926 1.882 2.583 2.583 0 01-2.025.57H5.732a2 2 0 01-1.313-.488 1.985 1.985 0 01-.667-1.227L2.25 3.128a1.238 1.238 0 00-1.24-1.079H.75A.752.752 0 010 1.302.746.746 0 01.75.554h.26a2.736 2.736 0 011.808.666c.501.434.827 1.035.916 1.69l.209 1.382h12.063a2.007 2.007 0 011.532.72 1.99 1.99 0 01.43 1.632zm-5.455 1.272a.75.75 0 00-1.061 0l-2.137 2.129-.8-.798a.752.752 0 00-1.272.53.746.746 0 00.21.527l1.334 1.33a.754.754 0 001.061 0l2.665-2.658a.747.747 0 000-1.06z"})}),$a=()=>(0,W.jsxs)("svg",{width:"20",height:"21",viewBox:"0 0 20 21",fill:"none","aria-hidden":"true",children:[(0,W.jsx)("rect",{x:"2",y:"13.54",width:"4",height:"7",rx:"1",fill:"#2E90FA"}),(0,W.jsx)("rect",{x:"8",y:"8.54",width:"4",height:"12",rx:"1",fill:"#2E90FA"}),(0,W.jsx)("rect",{x:"14",y:"3.54",width:"4",height:"17",rx:"1",fill:"#2E90FA"})]}),Ia=()=>(0,W.jsx)("svg",{width:"18",height:"21",viewBox:"0 0 18 21",fill:"none","aria-hidden":"true",children:(0,W.jsx)("path",{fill:"#12B76A",d:"M7.576.554a.678.678 0 00-.69.668c0 1.116-.403 1.77-.924 2.607-.286.458-.742 1.215-.938 1.796-.205-.396-.322-.69-.504-1.324-.148-.528-.859-.669-1.212-.24C.711 7.167-.052 9.498.003 11.855c.11 4.748 4.037 8.632 9 8.632 4.961 0 8.997-3.879 8.997-8.646 0-1.225-.295-2.815-.905-4.31-.61-1.495-1.529-2.915-2.938-3.639-.397-.202-.888.008-.996.428a9.852 9.852 0 01-.347 1.15 7.633 7.633 0 00-1.037-2.496C10.905 1.63 9.467.555 7.576.555zm-.888 8.793c.573 0 1.038.447 1.038.998 0 .55-.465.997-1.038.997s-1.039-.447-1.039-.997.466-.998 1.039-.998zm4.912.007a.634.634 0 01.514.16c.286.242.316.66.066.937L6.86 16.27a.712.712 0 01-.975.064.647.647 0 01-.061-.941l5.314-5.819c.106-.117.28-.2.462-.22zm-.288 5.148c.573 0 1.039.446 1.039.997 0 .55-.466.998-1.039.998s-1.038-.447-1.038-.998c0-.55.464-.997 1.038-.997z"})}),Oa=()=>(0,W.jsxs)("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none","aria-hidden":"true",children:[(0,W.jsx)("rect",{width:"56",height:"56",rx:"14",fill:"#F1EDFB"}),(0,W.jsx)("path",{d:"M18 21.5h20a1.5 1.5 0 011.49 1.677l-1.4 11.5A3 3 0 0135.11 37.5H20.89a3 3 0 01-2.98-2.823l-1.4-11.5A1.5 1.5 0 0118 21.5z",stroke:"#6E42D3",strokeWidth:"2",strokeLinejoin:"round"}),(0,W.jsx)("path",{d:"M23 24v-4a5 5 0 0110 0v4",stroke:"#6E42D3",strokeWidth:"2",strokeLinecap:"round"})]}),Wa=e=>{let{analytics:t,formatPrice:n,loading:l}=e;const r=[{key:"orders",label:"Total Orders",tone:"purple",Icon:Ra,value:Number(t.totalOrders||0).toLocaleString()},{key:"revenue",label:"Total Revenue",tone:"orange",Icon:Ba,value:n(t.totalRevenue)},{key:"aov",label:"Avg. Order Value",tone:"blue",Icon:$a,value:n(t.aov)},{key:"bump",label:"Bump Offer Revenue",tone:"green",Icon:Ia,value:n(t.orderBumpRevenue)}];return(0,W.jsx)("div",{className:"rwpfnl-sc-analytics","aria-busy":l?"true":"false",children:r.map(e=>(0,W.jsxs)("div",{className:"rwpfnl-sc-analytics-card",children:[(0,W.jsx)("span",{className:`rwpfnl-sc-analytics-icon is-${e.tone}`,children:(0,W.jsx)(e.Icon,{})}),(0,W.jsxs)("span",{className:"rwpfnl-sc-analytics-body",children:[(0,W.jsx)("span",{className:"rwpfnl-sc-analytics-label",children:e.label}),l?(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--number"}):(0,W.jsx)("span",{className:"rwpfnl-sc-analytics-value",children:e.value})]})]},e.key))})},Ha=["Custom checkout pages","Order bumps","Conditional checkout routing","Conversion templates"],Va=e=>{let{search:t,statusFilter:n,meta:l,onClearFilter:r}=e;return"trash"===n?(0,W.jsxs)("div",{className:"rwpfnl-funnel-empty",children:[(0,W.jsx)(Oa,{}),(0,W.jsx)("h3",{children:"Trash is empty"}),(0,W.jsx)("p",{children:"Store checkouts you move to trash show up here until you delete them for good."}),(0,W.jsx)("div",{className:"rwpfnl-funnel-empty-actions",children:(0,W.jsx)("button",{type:"button",className:"rwpfnl-btn-secondary",onClick:r,children:"Show all store checkouts"})})]}):n&&"all"!==n?(0,W.jsxs)("div",{className:"rwpfnl-funnel-empty",children:[(0,W.jsx)(Oa,{}),(0,W.jsxs)("h3",{children:["No ","draft"===n?"disabled":"enabled"," store checkout"]}),(0,W.jsxs)("p",{children:["None of your store checkouts are","draft"===n?" disabled":" enabled"," right now."]}),(0,W.jsx)("div",{className:"rwpfnl-funnel-empty-actions",children:(0,W.jsx)("button",{type:"button",className:"rwpfnl-btn-secondary",onClick:r,children:"Show all store checkouts"})})]}):t?(0,W.jsxs)("div",{className:"rwpfnl-funnel-empty",children:[(0,W.jsx)(Oa,{}),(0,W.jsxs)("h3",{children:["No store checkout matches “",t,"”"]}),(0,W.jsx)("p",{children:"Try a different name, or clear the search to see every store checkout."})]}):(0,W.jsxs)("div",{className:"rwpfnl-funnel-empty rwpfnl-sc-empty",children:[(0,W.jsx)(Oa,{}),(0,W.jsx)("h3",{children:"Create your first Store Checkout"}),(0,W.jsx)("p",{children:"Replace the default WooCommerce checkout with a checkout funnel of your own to boost conversions."}),(0,W.jsx)("ul",{className:"rwpfnl-sc-empty-features",children:Ha.map(e=>(0,W.jsx)("li",{children:e},e))}),(0,W.jsx)("div",{className:"rwpfnl-funnel-empty-actions",children:l.limitReached?(0,W.jsx)("a",{className:"rwpfnl-btn-primary",href:l.upgradeUrl,target:"_blank",rel:"noreferrer",children:"Upgrade to Pro"}):(0,W.jsxs)(a.N_,{className:"rwpfnl-btn-primary",to:"/store-checkout/templates",children:[(0,W.jsx)(Yt,{}),"Store Checkout"]})})]})},Ua=e=>{let{checkout:t,selected:n,busy:l,trashed:a,onSelect:s,onStatusChange:i,onTrash:o,onRestore:c,onDelete:u}=e;const{open:d,toggle:p,runAction:f,triggerRef:h,menuRef:m,style:v,isAbove:g}=kr(),w="publish"===t.status,x=["rwpfnl-funnel-row",n?"is-selected":"",l?"is-busy":""].filter(Boolean).join(" ");return(0,W.jsxs)("div",{className:x,children:[(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-select",children:(0,W.jsxs)("span",{className:"rwpfnl-checkbox",children:[(0,W.jsx)("input",{type:"checkbox",id:`rwpfnl-sc-${t.id}`,checked:n,onChange:()=>s(t.id)}),(0,W.jsx)("label",{htmlFor:`rwpfnl-sc-${t.id}`})]})}),(0,W.jsxs)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-name",children:[(0,W.jsx)(yr,{builder:t.builder}),(0,W.jsxs)("span",{className:"rwpfnl-funnel-name-group",children:[t.editUrl?(0,W.jsx)("a",{className:"rwpfnl-funnel-name",href:t.editUrl,children:t.name}):(0,W.jsx)("span",{className:"rwpfnl-funnel-name is-plain",children:t.name}),(0,W.jsx)("span",{className:"rwpfnl-sc-condition"+(t.hasCondition?" is-active":""),"data-tooltip":t.conditionTooltip,children:t.conditionSummary})]})]}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-priority",children:(0,W.jsx)("span",{className:`rwpfnl-sc-priority is-${t.priorityTone}`,"data-tooltip":t.priorityTooltip,children:t.priorityLabel})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-created",children:t.createdLabel}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-status",children:(0,W.jsx)("span",{className:`rwpfnl-status-pill is-${t.status}`,children:t.statusLabel})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-action",children:a?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)("button",{type:"button",className:"rwpfnl-icon-btn","aria-label":"Restore","data-tooltip":"Restore",disabled:l,onClick:()=>c(t),children:(0,W.jsx)(Ut,{})}),(0,W.jsx)("button",{type:"button",className:"rwpfnl-icon-btn is-destructive","aria-label":"Delete permanently","data-tooltip":"Delete permanently",disabled:l,onClick:()=>u(t),children:(0,W.jsx)(Vt,{})})]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)("a",{className:"rwpfnl-icon-btn",href:t.editUrl,"aria-label":"Edit","data-tooltip":"Edit",children:(0,W.jsx)(It,{})}),t.viewUrl?(0,W.jsx)("a",{className:"rwpfnl-icon-btn",href:t.viewUrl,target:"_blank",rel:"noreferrer","aria-label":"View","data-tooltip":"View",children:(0,W.jsx)(Jt,{})}):(0,W.jsx)("span",{className:"rwpfnl-icon-btn is-off","data-tooltip":"This checkout has no page to preview yet",children:(0,W.jsx)(Jt,{})}),(0,W.jsxs)("div",{className:"rwpfnl-row-menu",children:[(0,W.jsx)("button",{type:"button",ref:h,className:"rwpfnl-icon-btn"+(d?" is-open":""),"aria-label":"More actions","aria-expanded":d,disabled:l,onClick:p,children:(0,W.jsx)(Ot,{})}),d&&(0,r.createPortal)((0,W.jsxs)("ul",{ref:m,style:v,className:"rwpfnl-dropdown rwpfnl-row-dropdown"+(g?" is-above":""),children:[(0,W.jsx)("li",{children:(0,W.jsxs)("a",{href:"#",onClick:e=>f(e,()=>i(t,w?"draft":"publish")),children:[w?(0,W.jsx)(Wt,{}):(0,W.jsx)(Ht,{}),w?"Disable":"Enable"]})}),(0,W.jsx)("li",{className:"rwpfnl-dropdown-sep",children:(0,W.jsxs)("a",{href:"#",className:"rwpfnl-dropdown-delete",onClick:e=>f(e,()=>o(t)),children:[(0,W.jsx)(Vt,{}),"Trash"]})})]}),jr())]})]})})]})},Za=5,Ya=e=>{let{rows:t=Za}=e;return(0,W.jsxs)("div",{className:"rwpfnl-funnel-table rwpfnl-sc-table rwpfnl-funnel-table--loading","aria-busy":"true",children:[(0,W.jsxs)("div",{className:"rwpfnl-funnel-row rwpfnl-funnel-row--head",children:[(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-select",children:(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--box"})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-name",children:(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--label"})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-priority",children:(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--label"})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-created",children:(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--label"})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-status",children:(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--label"})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-action",children:(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--label"})})]}),Array.from({length:t}).map((e,t)=>(0,W.jsxs)("div",{className:"rwpfnl-funnel-row",children:[(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-select",children:(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--box"})}),(0,W.jsxs)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-name",children:[(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--builder"}),(0,W.jsxs)("span",{className:"rwpfnl-funnel-name-group",children:[(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--title"}),(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--subtitle"})]})]}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-priority",children:(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--pill"})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-created",children:(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--text"})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-status",children:(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--pill"})}),(0,W.jsxs)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-action",children:[(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--icon"}),(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--icon"}),(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--icon"})]})]},t)),(0,W.jsxs)("div",{className:"rwpfnl-table-footer",children:[(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--text"}),(0,W.jsx)("span",{className:"rwpfnl-skeleton rwpfnl-skeleton--text"})]})]})},qa={basename:"woocommerce/woocommerce.php",slug:"woocommerce"},Ka=()=>{const[e,t]=(0,i.useState)(!1),[n,l]=(0,i.useState)(""),r=d.canInstallPlugins||d.canActivatePlugins;return(0,W.jsx)("div",{className:"rwpfnl-dashboard-body rwpfnl-funnel-list rwpfnl-store-checkout",children:(0,W.jsxs)("div",{className:"rwpfnl-funnel-empty",children:[(0,W.jsx)(Oa,{}),(0,W.jsx)("h3",{children:"Store Checkout needs WooCommerce"}),(0,W.jsx)("p",{children:"A store checkout replaces the WooCommerce checkout, so WooCommerce has to be installed and active before you can build one."}),n&&(0,W.jsx)("p",{className:"rwpfnl-templates-alert",children:n}),r&&(0,W.jsx)("div",{className:"rwpfnl-funnel-empty-actions",children:(0,W.jsx)("button",{type:"button",className:"rwpfnl-btn-primary",disabled:e,onClick:()=>{t(!0),l(""),x(qa).then(()=>window.location.reload()).catch(e=>{l(e&&(e.message||e.code)||"WooCommerce could not be installed."),t(!1)})},children:e?"Installing WooCommerce...":"Install WooCommerce"})})]})})},Qa={isProActive:!1,isWooActive:!0,storeCheckoutCount:0,maxStoreCheckouts:3,limitReached:!1,upgradeUrl:"https://getwpfunnels.com/pricing/"},Ga={totalOrders:0,totalRevenue:0,aov:0,orderBumpRevenue:0},Xa=[{value:"all",label:"All"},{value:"publish",label:"Enabled"},{value:"draft",label:"Disabled"},{value:"trash",label:"Trash"}],Ja=(e,t)=>{const n=e&&(e.message||e.code);return n?`${t} ${n}`:t},es=()=>{const[e,t]=(0,i.useState)([]),[n,l]=(0,i.useState)(Qa),[r,s]=(0,i.useState)(Ga),[o,c]=(0,i.useState)({}),[u,p]=(0,i.useState)(0),[f,h]=(0,i.useState)(1),[m,v]=(0,i.useState)(1),[g,w]=(0,i.useState)(25),[x,b]=(0,i.useState)(""),[y,S]=(0,i.useState)(""),[M,z]=(0,i.useState)({orderby:"date",order:"desc"}),[E,A]=(0,i.useState)("all"),[P,F]=(0,i.useState)(!1),[D,T]=(0,i.useState)(!0),[R,B]=(0,i.useState)(""),[$,I]=(0,i.useState)([]),[O,H]=(0,i.useState)([]),[V,U]=(0,i.useState)(!1),[Z,Y]=(0,i.useState)(null),[q,K]=(0,i.useState)(!1),{notify:Q}=fn(),G=(0,i.useRef)(null),X=(0,i.useMemo)(()=>Ml(d.priceConfig,{minimumFractionDigits:2,maximumFractionDigits:2}),[]);(0,i.useEffect)(()=>{const e=setTimeout(()=>{S(x),v(1)},400);return()=>clearTimeout(e)},[x]),(0,i.useEffect)(()=>{v(1),I([])},[E]);const J=(0,i.useCallback)(()=>(T(!0),L({page:m,perPage:g,search:y,funnelStatus:E,orderby:M.orderby,order:M.order}).then(e=>{t(e.items||[]),p(e.total||0),h(e.total_pages||1),c(e.counts||{}),s({...Ga,...e.analytics||{}}),l({...Qa,...e.meta||{}}),I([]),B("")}).catch(e=>{console.error("WPFunnels: loading store checkouts failed.",e),B(Ja(e,"Could not load your store checkouts."))}).finally(()=>T(!1))),[m,g,y,M,E]);(0,i.useEffect)(()=>{J()},[J]),(0,i.useEffect)(()=>{!D&&m>1&&!e.length&&u>0&&v(Math.min(m-1,Math.max(1,f)))},[e.length,D,m,u,f]),(0,i.useEffect)(()=>{if(!P)return;const e=e=>{G.current&&!G.current.contains(e.target)&&F(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[P]);const ee=(e,t)=>(H(t=>[...t,e]),Promise.resolve(t()).finally(()=>H(t=>t.filter(t=>t!==e)))),te=(e,t)=>Q(Ja(e,t),{type:"error"}),ne=e=>I(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),le=e=>{v(1),z(t=>({orderby:e,order:t.orderby===e&&"desc"===t.order?"asc":"desc"}))},re=(e,t)=>ee(e.id,()=>j(e.id,t).then(()=>(Q(`“${e.name}” has been ${"publish"===t?"enabled":"disabled"}.`),J())).catch(e=>te(e,"Could not update this store checkout."))),ae=e=>Y({title:"Move this store checkout to trash?",message:`“${e.name}” will stop taking over the WooCommerce checkout. You can restore it from the Trash filter.`,confirmLabel:"Move to trash",onConfirm:()=>ee(e.id,()=>k(e.id).then(()=>(Q(`“${e.name}” has been moved to trash.`),J())).catch(e=>te(e,"Could not trash this store checkout.")))}),se=e=>ee(e.id,()=>C(e.id).then(()=>(Q(`“${e.name}” has been restored.`),J())).catch(e=>te(e,"Could not restore this store checkout."))),ie=e=>Y({title:"Delete this store checkout permanently?",message:`“${e.name}” and every step in it will be deleted. This cannot be undone.`,confirmLabel:"Delete",onConfirm:()=>ee(e.id,()=>_(e.id).then(()=>(Q(`“${e.name}” has been deleted.`),J())).catch(e=>te(e,"Could not delete this store checkout.")))}),oe=e=>{const t=$.length;return U(!0),N(e,$).then(e=>(Q(e?.message||`${t} store checkout${1===t?"":"s"} updated.`),J())).catch(e=>te(e,"Could not apply that to every store checkout.")).finally(()=>U(!1))},ce=(e,t)=>{if(e.preventDefault(),!$.length)return;const n=$.length;["restore","draft","publish"].includes(t)?oe(t):Y("delete"===t?{title:`Delete ${n} store checkout(s) permanently?`,message:"They and every step in them will be deleted. This cannot be undone.",confirmLabel:`Delete ${n}`,onConfirm:()=>oe("delete")}:{title:`Move ${n} store checkout(s) to trash?`,message:"You can restore them from the Trash filter.",confirmLabel:"Move to trash",onConfirm:()=>oe("trash")})},ue=e.length>0&&$.length===e.length,de="trash"===E,pe=e.filter(e=>$.includes(e.id)),fe=pe.length>0&&pe.every(e=>"trash"===e.status),he=pe.some(e=>"publish"===e.status);return D||n.isWooActive?(0,W.jsxs)("div",{className:"rwpfnl-dashboard-body rwpfnl-funnel-list rwpfnl-store-checkout",children:[(0,W.jsx)(Wa,{analytics:r,formatPrice:X,loading:D}),(0,W.jsxs)("div",{className:"rwpfnl-list-header",children:[!D&&$.length>0&&(0,W.jsxs)("div",{className:"rwpfnl-selection-bar",children:[(0,W.jsxs)("p",{className:"rwpfnl-bulk-summary",children:[(0,W.jsxs)("span",{className:"rwpfnl-selected-count",children:[$.length," ",1===$.length?"item":"items"]})," ","selected in the list"]}),(0,W.jsxs)("button",{type:"button",className:"rwpfnl-bulk-clear",onClick:()=>I([]),children:[(0,W.jsx)(xt,{}),"Clear All"]}),(0,W.jsx)("span",{className:"rwpfnl-bulk-divider"}),(0,W.jsx)("div",{className:"rwpfnl-bulk-buttons",children:fe?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)("button",{type:"button",className:"rwpfnl-bulk-btn",disabled:V,onClick:e=>ce(e,"restore"),children:[(0,W.jsx)(Ut,{}),"Restore"]}),(0,W.jsxs)("button",{type:"button",className:"rwpfnl-bulk-btn is-destructive",disabled:V,onClick:e=>ce(e,"delete"),children:[(0,W.jsx)(Vt,{}),"Delete"]})]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)("button",{type:"button",className:"rwpfnl-bulk-btn",disabled:V,onClick:e=>ce(e,he?"draft":"publish"),children:[he?(0,W.jsx)(Wt,{}):(0,W.jsx)(Ht,{}),he?"Disable":"Enable"]}),(0,W.jsxs)("button",{type:"button",className:"rwpfnl-bulk-btn is-destructive",disabled:V,onClick:e=>ce(e,"trash"),children:[(0,W.jsx)(Vt,{}),"Trash"]})]})})]}),(0,W.jsxs)("div",{className:"rwpfnl-list-header-right",children:[(0,W.jsxs)("div",{className:"rwpfnl-search-group",children:[(0,W.jsx)(qt,{}),(0,W.jsx)("input",{type:"search",value:x,placeholder:"Search for a store checkout...",onChange:e=>b(e.target.value)})]}),(0,W.jsx)("button",{type:"button",className:"rwpfnl-btn-icon"+(D?" is-busy":""),"aria-label":"Refresh the list","data-tooltip":"Refresh the list",disabled:D,onClick:()=>J(),children:(0,W.jsx)(Zt,{})}),!de&&(n.limitReached?(0,W.jsxs)("a",{className:"rwpfnl-btn-primary is-locked",href:n.upgradeUrl,target:"_blank",rel:"noreferrer",title:`You have reached the ${n.maxStoreCheckouts} store checkout limit of the free plan — upgrade for unlimited store checkouts`,children:[(0,W.jsx)(un,{}),"Store Checkout"]}):(0,W.jsxs)(a.N_,{className:"rwpfnl-btn-primary",to:"/store-checkout/templates",children:[(0,W.jsx)(Yt,{}),"Store Checkout"]}))]})]}),n.limitReached&&!de&&(0,W.jsxs)("div",{className:"rwpfnl-upgrade-banner",children:[(0,W.jsx)("span",{className:"rwpfnl-upgrade-icon",children:(0,W.jsx)(cn,{})}),(0,W.jsxs)("div",{className:"rwpfnl-upgrade-copy",children:[(0,W.jsx)("h3",{children:"You have hit the limit! Upgrade to Pro for unlimited store checkouts!"}),(0,W.jsxs)("p",{children:["The free version of WPFunnels allows up to ",n.maxStoreCheckouts," ","store checkouts. To build more, move one to trash or upgrade to Pro."]})]}),(0,W.jsx)("a",{className:"rwpfnl-btn-primary",href:n.upgradeUrl,target:"_blank",rel:"noreferrer",children:"Upgrade to Pro"})]}),R&&(0,W.jsxs)("div",{className:"rwpfnl-list-error",children:[(0,W.jsx)("span",{children:R}),(0,W.jsx)("button",{type:"button",className:"rwpfnl-retry",onClick:()=>J(),children:"Try again"})]}),D&&(0,W.jsx)(Ya,{rows:Math.min(g,5)}),!D&&(0,W.jsxs)("div",{className:"rwpfnl-funnel-table rwpfnl-sc-table",children:[(0,W.jsxs)("div",{className:"rwpfnl-funnel-row rwpfnl-funnel-row--head",children:[(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-select",children:(0,W.jsxs)("span",{className:"rwpfnl-checkbox",children:[(0,W.jsx)("input",{type:"checkbox",id:"rwpfnl-sc-select-all",checked:ue,disabled:!e.length,onChange:t=>I(t.target.checked?e.map(e=>e.id):[])}),(0,W.jsx)("label",{htmlFor:"rwpfnl-sc-select-all"})]})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-name",children:(0,W.jsxs)("button",{type:"button",className:"rwpfnl-sort-btn"+("title"===M.orderby?" is-sorted":""),onClick:()=>le("title"),children:["Name",(0,W.jsx)(rn,{direction:"title"===M.orderby?M.order:null})]})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-priority",children:"Priority"}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-created",children:(0,W.jsxs)("button",{type:"button",className:"rwpfnl-sort-btn"+("date"===M.orderby?" is-sorted":""),onClick:()=>le("date"),children:["Creation Date",(0,W.jsx)(rn,{direction:"date"===M.orderby?M.order:null})]})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-status",children:(0,W.jsxs)("div",{className:"rwpfnl-status-filter",ref:G,children:[(0,W.jsxs)("button",{type:"button",className:"rwpfnl-sort-btn","aria-expanded":P,onClick:()=>F(e=>!e),children:["Status",(0,W.jsx)(an,{})]}),P&&(0,W.jsx)("ul",{className:"rwpfnl-dropdown rwpfnl-status-dropdown",children:Xa.map(e=>(0,W.jsx)("li",{children:(0,W.jsxs)("a",{href:"#",className:E===e.value?"is-active":void 0,onClick:t=>{t.preventDefault(),A(e.value),F(!1)},children:[e.label,(0,W.jsx)("span",{className:"rwpfnl-option-count",children:o[e.value]??0})]})},e.value))})]})}),(0,W.jsx)("div",{className:"rwpfnl-funnel-cell rwpfnl-cell-action",children:"Action"})]}),!e.length&&(0,W.jsx)("div",{className:"rwpfnl-funnel-empty-row",children:(0,W.jsx)(Va,{search:y,statusFilter:E,meta:n,onClearFilter:()=>A("all")})}),e.map(e=>(0,W.jsx)(Ua,{checkout:e,trashed:"trash"===e.status,selected:$.includes(e.id),busy:O.includes(e.id),onSelect:ne,onStatusChange:re,onTrash:ae,onRestore:se,onDelete:ie},e.id)),u>0&&(0,W.jsx)(Bn,{page:m,perPage:g,total:u,totalPages:f,onPageChange:v,onPerPageChange:e=>{w(e),v(1)}})]}),Z&&(0,W.jsx)(Tn,{title:Z.title,message:Z.message,confirmLabel:Z.confirmLabel,busy:q,onConfirm:()=>{K(!0),Promise.resolve(Z.onConfirm()).finally(()=>{K(!1),Y(null)})},onCancel:()=>Y(null)})]}):(0,W.jsx)(Ka,{})},ts=()=>(0,W.jsx)(a.I9,{children:(0,W.jsx)(s.BV,{children:(0,W.jsxs)(s.qh,{element:(0,W.jsx)(yn,{}),children:[(0,W.jsx)(s.qh,{index:!0,element:(0,W.jsx)(Yl,{})}),(0,W.jsx)(s.qh,{path:"funnels",element:(0,W.jsx)(Fr,{})}),(0,W.jsx)(s.qh,{path:"funnels/trash",element:(0,W.jsx)(Fr,{initialStatus:"trash"})}),(0,W.jsx)(s.qh,{path:"funnel-templates",element:(0,W.jsx)(gr,{})}),(0,W.jsx)(s.qh,{path:"store-checkout",element:(0,W.jsx)(es,{})}),(0,W.jsx)(s.qh,{path:"store-checkout/templates",element:(0,W.jsx)(gr,{storeCheckout:!0})}),(0,W.jsx)(s.qh,{path:"automation",element:(0,W.jsx)(Xn,{})}),(0,W.jsx)(s.qh,{path:"automation/:automationId",element:(0,W.jsx)(ll,{})}),(0,W.jsx)(s.qh,{path:"ai-assistant",element:(0,W.jsx)(Xe,{})}),(0,W.jsxs)(s.qh,{path:"settings",element:(0,W.jsx)(ra,{}),children:[(0,W.jsx)(s.qh,{index:!0,element:(0,W.jsx)(s.C5,{to:"general",replace:!0})}),(0,W.jsx)(s.qh,{path:":section",element:(0,W.jsx)(Ta,{})})]}),(0,W.jsx)(s.qh,{path:"*",element:(0,W.jsx)(s.C5,{to:"/",replace:!0})})]})})}),ns=document.getElementById("rwpfnl-admin-root");if(ns){const e=(0,l.H)(ns);(0,r.flushSync)(()=>{e.render((0,W.jsx)(ts,{}))})}},16586(e,t,n){const l="undefined"!=typeof window&&window.RWPFNLAdmin&&window.RWPFNLAdmin.dist_url||"";l&&(n.p=l)},89431(e){e.exports=function(e,t,n,l){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");const r=isFinite(+e)?+e:0,a=isFinite(+t)?Math.abs(t):0,s=void 0===l?",":l,i=void 0===n?".":n;let o="";return o=(a?function(e,t){if(-1===(""+e).indexOf("e"))return+(Math.round(e+"e+"+t)+"e-"+t);{const n=(""+e).split("e");let l="";return+n[1]+t>0&&(l="+"),(+(Math.round(+n[0]+"e"+l+(+n[1]+t))+"e-"+t)).toFixed(t)}}(r,a).toString():""+Math.round(r)).split("."),o[0].length>3&&(o[0]=o[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,s)),(o[1]||"").length<a&&(o[1]=o[1]||"",o[1]+=new Array(a-o[1].length+1).join("0")),o.join(i)}},22551(e,t,n){"use strict";var l=n(96540),r=n(69982);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,i={};function o(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(i[e]=t,e=0;e<t.length;e++)s.add(t[e])}var u=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),d=Object.prototype.hasOwnProperty,p=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},h={};function m(e,t,n,l,r,a,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=l,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=s}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){v[e]=new m(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];v[t]=new m(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){v[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){v[e]=new m(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){v[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){v[e]=new m(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){v[e]=new m(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){v[e]=new m(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){v[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)});var g=/[\-:]([a-z])/g;function w(e){return e[1].toUpperCase()}function x(e,t,n,l){var r=v.hasOwnProperty(t)?v[t]:null;(null!==r?0!==r.type:l||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,l){if(null==t||function(e,t,n,l){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!l&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,l))return!0;if(l)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,r,l)&&(n=null),l||null===r?function(e){return!!d.call(h,e)||!d.call(f,e)&&(p.test(e)?h[e]=!0:(f[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):r.mustUseProperty?e[r.propertyName]=null===n?3!==r.type&&"":n:(t=r.attributeName,l=r.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(r=r.type)||4===r&&!0===n?"":""+n,l?e.setAttributeNS(l,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(g,w);v[t]=new m(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(g,w);v[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(g,w);v[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){v[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)}),v.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){v[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)});var b=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,y=Symbol.for("react.element"),j=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),N=Symbol.for("react.provider"),S=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),A=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var P=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var F=Symbol.iterator;function D(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=F&&e[F]||e["@@iterator"])?e:null}var T,R=Object.assign;function B(e){if(void 0===T)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);T=t&&t[1]||""}return"\n"+T+e}var $=!1;function I(e,t){if(!e||$)return"";$=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var l=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){l=e}e.call(t.prototype)}else{try{throw Error()}catch(e){l=e}e()}}catch(t){if(t&&l&&"string"==typeof t.stack){for(var r=t.stack.split("\n"),a=l.stack.split("\n"),s=r.length-1,i=a.length-1;1<=s&&0<=i&&r[s]!==a[i];)i--;for(;1<=s&&0<=i;s--,i--)if(r[s]!==a[i]){if(1!==s||1!==i)do{if(s--,0>--i||r[s]!==a[i]){var o="\n"+r[s].replace(" at new "," at ");return e.displayName&&o.includes("<anonymous>")&&(o=o.replace("<anonymous>",e.displayName)),o}}while(1<=s&&0<=i);break}}}finally{$=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?B(e):""}function O(e){switch(e.tag){case 5:return B(e.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return I(e.type,!1);case 11:return I(e.type.render,!1);case 1:return I(e.type,!0);default:return""}}function W(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case k:return"Fragment";case j:return"Portal";case _:return"Profiler";case C:return"StrictMode";case M:return"Suspense";case z:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case S:return(e.displayName||"Context")+".Consumer";case N:return(e._context.displayName||"Context")+".Provider";case L:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case E:return null!==(t=e.displayName||null)?t:W(e.type)||"Memo";case A:t=e._payload,e=e._init;try{return W(e(t))}catch(e){}}return null}function H(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return W(t);case 8:return t===C?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function V(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function U(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Z(e){e._valueTracker||(e._valueTracker=function(e){var t=U(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),l=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var r=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(e){l=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(e){l=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Y(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=U(e)?e.checked?"true":"false":e.value),(e=l)!==n&&(t.setValue(e),!0)}function q(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function K(e,t){var n=t.checked;return R({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Q(e,t){var n=null==t.defaultValue?"":t.defaultValue,l=null!=t.checked?t.checked:t.defaultChecked;n=V(null!=t.value?t.value:n),e._wrapperState={initialChecked:l,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function G(e,t){null!=(t=t.checked)&&x(e,"checked",t,!1)}function X(e,t){G(e,t);var n=V(t.value),l=t.type;if(null!=n)"number"===l?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===l||"reset"===l)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,V(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function J(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var l=t.type;if(!("submit"!==l&&"reset"!==l||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&q(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,l){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&l&&(e[n].defaultSelected=!0)}else{for(n=""+V(n),t=null,r=0;r<e.length;r++){if(e[r].value===n)return e[r].selected=!0,void(l&&(e[r].defaultSelected=!0));null!==t||e[r].disabled||(t=e[r])}null!==t&&(t.selected=!0)}}function le(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return R({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function re(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(te(n)){if(1<n.length)throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:V(n)}}function ae(e,t){var n=V(t.value),l=V(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=l&&(e.defaultValue=""+l)}function se(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function ie(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function oe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?ie(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,ue,de=(ue=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,l){MSApp.execUnsafeLocalFunction(function(){return ue(e,t)})}:ue);function pe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var fe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},he=["Webkit","ms","Moz","O"];function me(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||fe.hasOwnProperty(e)&&fe[e]?(""+t).trim():t+"px"}function ve(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var l=0===n.indexOf("--"),r=me(n,t[n],l);"float"===n&&(n="cssFloat"),l?e.setProperty(n,r):e[n]=r}}Object.keys(fe).forEach(function(e){he.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fe[t]=fe[e]})});var ge=R({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function we(e,t){if(t){if(ge[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62))}}function xe(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var be=null;function ye(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var je=null,ke=null,Ce=null;function _e(e){if(e=xr(e)){if("function"!=typeof je)throw Error(a(280));var t=e.stateNode;t&&(t=yr(t),je(e.stateNode,e.type,t))}}function Ne(e){ke?Ce?Ce.push(e):Ce=[e]:ke=e}function Se(){if(ke){var e=ke,t=Ce;if(Ce=ke=null,_e(e),t)for(e=0;e<t.length;e++)_e(t[e])}}function Le(e,t){return e(t)}function Me(){}var ze=!1;function Ee(e,t,n){if(ze)return e(t,n);ze=!0;try{return Le(e,t,n)}finally{ze=!1,(null!==ke||null!==Ce)&&(Me(),Se())}}function Ae(e,t){var n=e.stateNode;if(null===n)return null;var l=yr(n);if(null===l)return null;n=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(l=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!l;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}var Pe=!1;if(u)try{var Fe={};Object.defineProperty(Fe,"passive",{get:function(){Pe=!0}}),window.addEventListener("test",Fe,Fe),window.removeEventListener("test",Fe,Fe)}catch(ue){Pe=!1}function De(e,t,n,l,r,a,s,i,o){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var Te=!1,Re=null,Be=!1,$e=null,Ie={onError:function(e){Te=!0,Re=e}};function Oe(e,t,n,l,r,a,s,i,o){Te=!1,Re=null,De.apply(Ie,arguments)}function We(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function He(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function Ve(e){if(We(e)!==e)throw Error(a(188))}function Ue(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=We(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,l=t;;){var r=n.return;if(null===r)break;var s=r.alternate;if(null===s){if(null!==(l=r.return)){n=l;continue}break}if(r.child===s.child){for(s=r.child;s;){if(s===n)return Ve(r),e;if(s===l)return Ve(r),t;s=s.sibling}throw Error(a(188))}if(n.return!==l.return)n=r,l=s;else{for(var i=!1,o=r.child;o;){if(o===n){i=!0,n=r,l=s;break}if(o===l){i=!0,l=r,n=s;break}o=o.sibling}if(!i){for(o=s.child;o;){if(o===n){i=!0,n=s,l=r;break}if(o===l){i=!0,l=s,n=r;break}o=o.sibling}if(!i)throw Error(a(189))}}if(n.alternate!==l)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e))?Ze(e):null}function Ze(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ze(e);if(null!==t)return t;e=e.sibling}return null}var Ye=r.unstable_scheduleCallback,qe=r.unstable_cancelCallback,Ke=r.unstable_shouldYield,Qe=r.unstable_requestPaint,Ge=r.unstable_now,Xe=r.unstable_getCurrentPriorityLevel,Je=r.unstable_ImmediatePriority,et=r.unstable_UserBlockingPriority,tt=r.unstable_NormalPriority,nt=r.unstable_LowPriority,lt=r.unstable_IdlePriority,rt=null,at=null,st=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(it(e)/ot|0)|0},it=Math.log,ot=Math.LN2,ct=64,ut=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function pt(e,t){var n=e.pendingLanes;if(0===n)return 0;var l=0,r=e.suspendedLanes,a=e.pingedLanes,s=268435455&n;if(0!==s){var i=s&~r;0!==i?l=dt(i):0!==(a&=s)&&(l=dt(a))}else 0!==(s=n&~r)?l=dt(s):0!==a&&(l=dt(a));if(0===l)return 0;if(0!==t&&t!==l&&0===(t&r)&&((r=l&-l)>=(a=t&-t)||16===r&&4194240&a))return t;if(4&l&&(l|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=l;0<t;)r=1<<(n=31-st(t)),l|=e[n],t&=~r;return l}function ft(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function ht(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function mt(){var e=ct;return!(4194240&(ct<<=1))&&(ct=64),e}function vt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function gt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-st(t)]=n}function wt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-st(n),r=1<<l;r&t|e[l]&t&&(e[l]|=t),n&=~r}}var xt=0;function bt(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var yt,jt,kt,Ct,_t,Nt=!1,St=[],Lt=null,Mt=null,zt=null,Et=new Map,At=new Map,Pt=[],Ft="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Dt(e,t){switch(e){case"focusin":case"focusout":Lt=null;break;case"dragenter":case"dragleave":Mt=null;break;case"mouseover":case"mouseout":zt=null;break;case"pointerover":case"pointerout":Et.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":At.delete(t.pointerId)}}function Tt(e,t,n,l,r,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:a,targetContainers:[r]},null!==t&&null!==(t=xr(t))&&jt(t),e):(e.eventSystemFlags|=l,t=e.targetContainers,null!==r&&-1===t.indexOf(r)&&t.push(r),e)}function Rt(e){var t=wr(e.target);if(null!==t){var n=We(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=He(n)))return e.blockedOn=t,void _t(e.priority,function(){kt(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Bt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Kt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=xr(n))&&jt(t),e.blockedOn=n,!1;var l=new(n=e.nativeEvent).constructor(n.type,n);be=l,n.target.dispatchEvent(l),be=null,t.shift()}return!0}function $t(e,t,n){Bt(e)&&n.delete(t)}function It(){Nt=!1,null!==Lt&&Bt(Lt)&&(Lt=null),null!==Mt&&Bt(Mt)&&(Mt=null),null!==zt&&Bt(zt)&&(zt=null),Et.forEach($t),At.forEach($t)}function Ot(e,t){e.blockedOn===t&&(e.blockedOn=null,Nt||(Nt=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,It)))}function Wt(e){function t(t){return Ot(t,e)}if(0<St.length){Ot(St[0],e);for(var n=1;n<St.length;n++){var l=St[n];l.blockedOn===e&&(l.blockedOn=null)}}for(null!==Lt&&Ot(Lt,e),null!==Mt&&Ot(Mt,e),null!==zt&&Ot(zt,e),Et.forEach(t),At.forEach(t),n=0;n<Pt.length;n++)(l=Pt[n]).blockedOn===e&&(l.blockedOn=null);for(;0<Pt.length&&null===(n=Pt[0]).blockedOn;)Rt(n),null===n.blockedOn&&Pt.shift()}var Ht=b.ReactCurrentBatchConfig,Vt=!0;function Ut(e,t,n,l){var r=xt,a=Ht.transition;Ht.transition=null;try{xt=1,Yt(e,t,n,l)}finally{xt=r,Ht.transition=a}}function Zt(e,t,n,l){var r=xt,a=Ht.transition;Ht.transition=null;try{xt=4,Yt(e,t,n,l)}finally{xt=r,Ht.transition=a}}function Yt(e,t,n,l){if(Vt){var r=Kt(e,t,n,l);if(null===r)Vl(e,t,l,qt,n),Dt(e,l);else if(function(e,t,n,l,r){switch(t){case"focusin":return Lt=Tt(Lt,e,t,n,l,r),!0;case"dragenter":return Mt=Tt(Mt,e,t,n,l,r),!0;case"mouseover":return zt=Tt(zt,e,t,n,l,r),!0;case"pointerover":var a=r.pointerId;return Et.set(a,Tt(Et.get(a)||null,e,t,n,l,r)),!0;case"gotpointercapture":return a=r.pointerId,At.set(a,Tt(At.get(a)||null,e,t,n,l,r)),!0}return!1}(r,e,t,n,l))l.stopPropagation();else if(Dt(e,l),4&t&&-1<Ft.indexOf(e)){for(;null!==r;){var a=xr(r);if(null!==a&&yt(a),null===(a=Kt(e,t,n,l))&&Vl(e,t,l,qt,n),a===r)break;r=a}null!==r&&l.stopPropagation()}else Vl(e,t,l,null,n)}}var qt=null;function Kt(e,t,n,l){if(qt=null,null!==(e=wr(e=ye(l))))if(null===(t=We(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=He(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return qt=e,null}function Qt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Xe()){case Je:return 1;case et:return 4;case tt:case nt:return 16;case lt:return 536870912;default:return 16}default:return 16}}var Gt=null,Xt=null,Jt=null;function en(){if(Jt)return Jt;var e,t,n=Xt,l=n.length,r="value"in Gt?Gt.value:Gt.textContent,a=r.length;for(e=0;e<l&&n[e]===r[e];e++);var s=l-e;for(t=1;t<=s&&n[l-t]===r[a-t];t++);return Jt=r.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function ln(){return!1}function rn(e){function t(t,n,l,r,a){for(var s in this._reactName=t,this._targetInst=l,this.type=n,this.nativeEvent=r,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(s)&&(t=e[s],this[s]=t?t(r):r[s]);return this.isDefaultPrevented=(null!=r.defaultPrevented?r.defaultPrevented:!1===r.returnValue)?nn:ln,this.isPropagationStopped=ln,this}return R(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var an,sn,on,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=rn(cn),dn=R({},cn,{view:0,detail:0}),pn=rn(dn),fn=R({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_n,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==on&&(on&&"mousemove"===e.type?(an=e.screenX-on.screenX,sn=e.screenY-on.screenY):sn=an=0,on=e),an)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),hn=rn(fn),mn=rn(R({},fn,{dataTransfer:0})),vn=rn(R({},dn,{relatedTarget:0})),gn=rn(R({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=R({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xn=rn(wn),bn=rn(R({},cn,{data:0})),yn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},kn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=kn[e])&&!!t[e]}function _n(){return Cn}var Nn=R({},dn,{key:function(e){if(e.key){var t=yn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?jn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_n,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Sn=rn(Nn),Ln=rn(R({},fn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Mn=rn(R({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_n})),zn=rn(R({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),En=R({},fn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),An=rn(En),Pn=[9,13,27,32],Fn=u&&"CompositionEvent"in window,Dn=null;u&&"documentMode"in document&&(Dn=document.documentMode);var Tn=u&&"TextEvent"in window&&!Dn,Rn=u&&(!Fn||Dn&&8<Dn&&11>=Dn),Bn=String.fromCharCode(32),$n=!1;function In(e,t){switch(e){case"keyup":return-1!==Pn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function On(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Wn=!1,Hn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Vn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Hn[e.type]:"textarea"===t}function Un(e,t,n,l){Ne(l),0<(t=Zl(t,"onChange")).length&&(n=new un("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var Zn=null,Yn=null;function qn(e){Bl(e,0)}function Kn(e){if(Y(br(e)))return e}function Qn(e,t){if("change"===e)return t}var Gn=!1;if(u){var Xn;if(u){var Jn="oninput"in document;if(!Jn){var el=document.createElement("div");el.setAttribute("oninput","return;"),Jn="function"==typeof el.oninput}Xn=Jn}else Xn=!1;Gn=Xn&&(!document.documentMode||9<document.documentMode)}function tl(){Zn&&(Zn.detachEvent("onpropertychange",nl),Yn=Zn=null)}function nl(e){if("value"===e.propertyName&&Kn(Yn)){var t=[];Un(t,Yn,e,ye(e)),Ee(qn,t)}}function ll(e,t,n){"focusin"===e?(tl(),Yn=n,(Zn=t).attachEvent("onpropertychange",nl)):"focusout"===e&&tl()}function rl(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Kn(Yn)}function al(e,t){if("click"===e)return Kn(t)}function sl(e,t){if("input"===e||"change"===e)return Kn(t)}var il="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function ol(e,t){if(il(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var r=n[l];if(!d.call(t,r)||!il(e[r],t[r]))return!1}return!0}function cl(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ul(e,t){var n,l=cl(e);for(e=0;l;){if(3===l.nodeType){if(n=e+l.textContent.length,e<=t&&n>=t)return{node:l,offset:t-e};e=n}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=cl(l)}}function dl(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dl(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function pl(){for(var e=window,t=q();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=q((e=t.contentWindow).document)}return t}function fl(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function hl(e){var t=pl(),n=e.focusedElem,l=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dl(n.ownerDocument.documentElement,n)){if(null!==l&&fl(n))if(t=l.start,void 0===(e=l.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var r=n.textContent.length,a=Math.min(l.start,r);l=void 0===l.end?a:Math.min(l.end,r),!e.extend&&a>l&&(r=l,l=a,a=r),r=ul(n,a);var s=ul(n,l);r&&s&&(1!==e.rangeCount||e.anchorNode!==r.node||e.anchorOffset!==r.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&((t=t.createRange()).setStart(r.node,r.offset),e.removeAllRanges(),a>l?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var ml=u&&"documentMode"in document&&11>=document.documentMode,vl=null,gl=null,wl=null,xl=!1;function bl(e,t,n){var l=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;xl||null==vl||vl!==q(l)||(l="selectionStart"in(l=vl)&&fl(l)?{start:l.selectionStart,end:l.selectionEnd}:{anchorNode:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset},wl&&ol(wl,l)||(wl=l,0<(l=Zl(gl,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=vl)))}function yl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var jl={animationend:yl("Animation","AnimationEnd"),animationiteration:yl("Animation","AnimationIteration"),animationstart:yl("Animation","AnimationStart"),transitionend:yl("Transition","TransitionEnd")},kl={},Cl={};function _l(e){if(kl[e])return kl[e];if(!jl[e])return e;var t,n=jl[e];for(t in n)if(n.hasOwnProperty(t)&&t in Cl)return kl[e]=n[t];return e}u&&(Cl=document.createElement("div").style,"AnimationEvent"in window||(delete jl.animationend.animation,delete jl.animationiteration.animation,delete jl.animationstart.animation),"TransitionEvent"in window||delete jl.transitionend.transition);var Nl=_l("animationend"),Sl=_l("animationiteration"),Ll=_l("animationstart"),Ml=_l("transitionend"),zl=new Map,El="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Al(e,t){zl.set(e,t),o(t,[e])}for(var Pl=0;Pl<El.length;Pl++){var Fl=El[Pl];Al(Fl.toLowerCase(),"on"+(Fl[0].toUpperCase()+Fl.slice(1)))}Al(Nl,"onAnimationEnd"),Al(Sl,"onAnimationIteration"),Al(Ll,"onAnimationStart"),Al("dblclick","onDoubleClick"),Al("focusin","onFocus"),Al("focusout","onBlur"),Al(Ml,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Dl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Tl=new Set("cancel close invalid load scroll toggle".split(" ").concat(Dl));function Rl(e,t,n){var l=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,l,r,s,i,o,c){if(Oe.apply(this,arguments),Te){if(!Te)throw Error(a(198));var u=Re;Te=!1,Re=null,Be||(Be=!0,$e=u)}}(l,t,void 0,e),e.currentTarget=null}function Bl(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var l=e[n],r=l.event;l=l.listeners;e:{var a=void 0;if(t)for(var s=l.length-1;0<=s;s--){var i=l[s],o=i.instance,c=i.currentTarget;if(i=i.listener,o!==a&&r.isPropagationStopped())break e;Rl(r,i,c),a=o}else for(s=0;s<l.length;s++){if(o=(i=l[s]).instance,c=i.currentTarget,i=i.listener,o!==a&&r.isPropagationStopped())break e;Rl(r,i,c),a=o}}}if(Be)throw e=$e,Be=!1,$e=null,e}function $l(e,t){var n=t[mr];void 0===n&&(n=t[mr]=new Set);var l=e+"__bubble";n.has(l)||(Hl(t,e,2,!1),n.add(l))}function Il(e,t,n){var l=0;t&&(l|=4),Hl(n,e,l,t)}var Ol="_reactListening"+Math.random().toString(36).slice(2);function Wl(e){if(!e[Ol]){e[Ol]=!0,s.forEach(function(t){"selectionchange"!==t&&(Tl.has(t)||Il(t,!1,e),Il(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Ol]||(t[Ol]=!0,Il("selectionchange",!1,t))}}function Hl(e,t,n,l){switch(Qt(t)){case 1:var r=Ut;break;case 4:r=Zt;break;default:r=Yt}n=r.bind(null,t,n,e),r=void 0,!Pe||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(r=!0),l?void 0!==r?e.addEventListener(t,n,{capture:!0,passive:r}):e.addEventListener(t,n,!0):void 0!==r?e.addEventListener(t,n,{passive:r}):e.addEventListener(t,n,!1)}function Vl(e,t,n,l,r){var a=l;if(!(1&t||2&t||null===l))e:for(;;){if(null===l)return;var s=l.tag;if(3===s||4===s){var i=l.stateNode.containerInfo;if(i===r||8===i.nodeType&&i.parentNode===r)break;if(4===s)for(s=l.return;null!==s;){var o=s.tag;if((3===o||4===o)&&((o=s.stateNode.containerInfo)===r||8===o.nodeType&&o.parentNode===r))return;s=s.return}for(;null!==i;){if(null===(s=wr(i)))return;if(5===(o=s.tag)||6===o){l=a=s;continue e}i=i.parentNode}}l=l.return}Ee(function(){var l=a,r=ye(n),s=[];e:{var i=zl.get(e);if(void 0!==i){var o=un,c=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":o=Sn;break;case"focusin":c="focus",o=vn;break;case"focusout":c="blur",o=vn;break;case"beforeblur":case"afterblur":o=vn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":o=hn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":o=mn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":o=Mn;break;case Nl:case Sl:case Ll:o=gn;break;case Ml:o=zn;break;case"scroll":o=pn;break;case"wheel":o=An;break;case"copy":case"cut":case"paste":o=xn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":o=Ln}var u=!!(4&t),d=!u&&"scroll"===e,p=u?null!==i?i+"Capture":null:i;u=[];for(var f,h=l;null!==h;){var m=(f=h).stateNode;if(5===f.tag&&null!==m&&(f=m,null!==p&&null!=(m=Ae(h,p))&&u.push(Ul(h,m,f))),d)break;h=h.return}0<u.length&&(i=new o(i,c,null,n,r),s.push({event:i,listeners:u}))}}if(!(7&t)){if(o="mouseout"===e||"pointerout"===e,(!(i="mouseover"===e||"pointerover"===e)||n===be||!(c=n.relatedTarget||n.fromElement)||!wr(c)&&!c[hr])&&(o||i)&&(i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window,o?(o=l,null!==(c=(c=n.relatedTarget||n.toElement)?wr(c):null)&&(c!==(d=We(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(o=null,c=l),o!==c)){if(u=hn,m="onMouseLeave",p="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(u=Ln,m="onPointerLeave",p="onPointerEnter",h="pointer"),d=null==o?i:br(o),f=null==c?i:br(c),(i=new u(m,h+"leave",o,n,r)).target=d,i.relatedTarget=f,m=null,wr(r)===l&&((u=new u(p,h+"enter",c,n,r)).target=f,u.relatedTarget=d,m=u),d=m,o&&c)e:{for(p=c,h=0,f=u=o;f;f=Yl(f))h++;for(f=0,m=p;m;m=Yl(m))f++;for(;0<h-f;)u=Yl(u),h--;for(;0<f-h;)p=Yl(p),f--;for(;h--;){if(u===p||null!==p&&u===p.alternate)break e;u=Yl(u),p=Yl(p)}u=null}else u=null;null!==o&&ql(s,i,o,u,!1),null!==c&&null!==d&&ql(s,d,c,u,!0)}if("select"===(o=(i=l?br(l):window).nodeName&&i.nodeName.toLowerCase())||"input"===o&&"file"===i.type)var v=Qn;else if(Vn(i))if(Gn)v=sl;else{v=rl;var g=ll}else(o=i.nodeName)&&"input"===o.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(v=al);switch(v&&(v=v(e,l))?Un(s,v,n,r):(g&&g(e,i,l),"focusout"===e&&(g=i._wrapperState)&&g.controlled&&"number"===i.type&&ee(i,"number",i.value)),g=l?br(l):window,e){case"focusin":(Vn(g)||"true"===g.contentEditable)&&(vl=g,gl=l,wl=null);break;case"focusout":wl=gl=vl=null;break;case"mousedown":xl=!0;break;case"contextmenu":case"mouseup":case"dragend":xl=!1,bl(s,n,r);break;case"selectionchange":if(ml)break;case"keydown":case"keyup":bl(s,n,r)}var w;if(Fn)e:{switch(e){case"compositionstart":var x="onCompositionStart";break e;case"compositionend":x="onCompositionEnd";break e;case"compositionupdate":x="onCompositionUpdate";break e}x=void 0}else Wn?In(e,n)&&(x="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(x="onCompositionStart");x&&(Rn&&"ko"!==n.locale&&(Wn||"onCompositionStart"!==x?"onCompositionEnd"===x&&Wn&&(w=en()):(Xt="value"in(Gt=r)?Gt.value:Gt.textContent,Wn=!0)),0<(g=Zl(l,x)).length&&(x=new bn(x,e,null,n,r),s.push({event:x,listeners:g}),(w||null!==(w=On(n)))&&(x.data=w))),(w=Tn?function(e,t){switch(e){case"compositionend":return On(t);case"keypress":return 32!==t.which?null:($n=!0,Bn);case"textInput":return(e=t.data)===Bn&&$n?null:e;default:return null}}(e,n):function(e,t){if(Wn)return"compositionend"===e||!Fn&&In(e,t)?(e=en(),Jt=Xt=Gt=null,Wn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Rn&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(l=Zl(l,"onBeforeInput")).length&&(r=new bn("onBeforeInput","beforeinput",null,n,r),s.push({event:r,listeners:l}),r.data=w)}Bl(s,t)})}function Ul(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Zl(e,t){for(var n=t+"Capture",l=[];null!==e;){var r=e,a=r.stateNode;5===r.tag&&null!==a&&(r=a,null!=(a=Ae(e,n))&&l.unshift(Ul(e,a,r)),null!=(a=Ae(e,t))&&l.push(Ul(e,a,r))),e=e.return}return l}function Yl(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function ql(e,t,n,l,r){for(var a=t._reactName,s=[];null!==n&&n!==l;){var i=n,o=i.alternate,c=i.stateNode;if(null!==o&&o===l)break;5===i.tag&&null!==c&&(i=c,r?null!=(o=Ae(n,a))&&s.unshift(Ul(n,o,i)):r||null!=(o=Ae(n,a))&&s.push(Ul(n,o,i))),n=n.return}0!==s.length&&e.push({event:t,listeners:s})}var Kl=/\r\n?/g,Ql=/\u0000|\uFFFD/g;function Gl(e){return("string"==typeof e?e:""+e).replace(Kl,"\n").replace(Ql,"")}function Xl(e,t,n){if(t=Gl(t),Gl(e)!==t&&n)throw Error(a(425))}function Jl(){}var er=null,tr=null;function nr(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var lr="function"==typeof setTimeout?setTimeout:void 0,rr="function"==typeof clearTimeout?clearTimeout:void 0,ar="function"==typeof Promise?Promise:void 0,sr="function"==typeof queueMicrotask?queueMicrotask:void 0!==ar?function(e){return ar.resolve(null).then(e).catch(ir)}:lr;function ir(e){setTimeout(function(){throw e})}function or(e,t){var n=t,l=0;do{var r=n.nextSibling;if(e.removeChild(n),r&&8===r.nodeType)if("/$"===(n=r.data)){if(0===l)return e.removeChild(r),void Wt(t);l--}else"$"!==n&&"$?"!==n&&"$!"!==n||l++;n=r}while(n);Wt(t)}function cr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ur(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var dr=Math.random().toString(36).slice(2),pr="__reactFiber$"+dr,fr="__reactProps$"+dr,hr="__reactContainer$"+dr,mr="__reactEvents$"+dr,vr="__reactListeners$"+dr,gr="__reactHandles$"+dr;function wr(e){var t=e[pr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[hr]||n[pr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ur(e);null!==e;){if(n=e[pr])return n;e=ur(e)}return t}n=(e=n).parentNode}return null}function xr(e){return!(e=e[pr]||e[hr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function br(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function yr(e){return e[fr]||null}var jr=[],kr=-1;function Cr(e){return{current:e}}function _r(e){0>kr||(e.current=jr[kr],jr[kr]=null,kr--)}function Nr(e,t){kr++,jr[kr]=e.current,e.current=t}var Sr={},Lr=Cr(Sr),Mr=Cr(!1),zr=Sr;function Er(e,t){var n=e.type.contextTypes;if(!n)return Sr;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===t)return l.__reactInternalMemoizedMaskedChildContext;var r,a={};for(r in n)a[r]=t[r];return l&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Ar(e){return null!=e.childContextTypes}function Pr(){_r(Mr),_r(Lr)}function Fr(e,t,n){if(Lr.current!==Sr)throw Error(a(168));Nr(Lr,t),Nr(Mr,n)}function Dr(e,t,n){var l=e.stateNode;if(t=t.childContextTypes,"function"!=typeof l.getChildContext)return n;for(var r in l=l.getChildContext())if(!(r in t))throw Error(a(108,H(e)||"Unknown",r));return R({},n,l)}function Tr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Sr,zr=Lr.current,Nr(Lr,e),Nr(Mr,Mr.current),!0}function Rr(e,t,n){var l=e.stateNode;if(!l)throw Error(a(169));n?(e=Dr(e,t,zr),l.__reactInternalMemoizedMergedChildContext=e,_r(Mr),_r(Lr),Nr(Lr,e)):_r(Mr),Nr(Mr,n)}var Br=null,$r=!1,Ir=!1;function Or(e){null===Br?Br=[e]:Br.push(e)}function Wr(){if(!Ir&&null!==Br){Ir=!0;var e=0,t=xt;try{var n=Br;for(xt=1;e<n.length;e++){var l=n[e];do{l=l(!0)}while(null!==l)}Br=null,$r=!1}catch(t){throw null!==Br&&(Br=Br.slice(e+1)),Ye(Je,Wr),t}finally{xt=t,Ir=!1}}return null}var Hr=[],Vr=0,Ur=null,Zr=0,Yr=[],qr=0,Kr=null,Qr=1,Gr="";function Xr(e,t){Hr[Vr++]=Zr,Hr[Vr++]=Ur,Ur=e,Zr=t}function Jr(e,t,n){Yr[qr++]=Qr,Yr[qr++]=Gr,Yr[qr++]=Kr,Kr=e;var l=Qr;e=Gr;var r=32-st(l)-1;l&=~(1<<r),n+=1;var a=32-st(t)+r;if(30<a){var s=r-r%5;a=(l&(1<<s)-1).toString(32),l>>=s,r-=s,Qr=1<<32-st(t)+r|n<<r|l,Gr=a+e}else Qr=1<<a|n<<r|l,Gr=e}function ea(e){null!==e.return&&(Xr(e,1),Jr(e,1,0))}function ta(e){for(;e===Ur;)Ur=Hr[--Vr],Hr[Vr]=null,Zr=Hr[--Vr],Hr[Vr]=null;for(;e===Kr;)Kr=Yr[--qr],Yr[qr]=null,Gr=Yr[--qr],Yr[qr]=null,Qr=Yr[--qr],Yr[qr]=null}var na=null,la=null,ra=!1,aa=null;function sa(e,t){var n=zc(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function ia(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,na=e,la=cr(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,na=e,la=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Kr?{id:Qr,overflow:Gr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=zc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,na=e,la=null,!0);default:return!1}}function oa(e){return!(!(1&e.mode)||128&e.flags)}function ca(e){if(ra){var t=la;if(t){var n=t;if(!ia(e,t)){if(oa(e))throw Error(a(418));t=cr(n.nextSibling);var l=na;t&&ia(e,t)?sa(l,n):(e.flags=-4097&e.flags|2,ra=!1,na=e)}}else{if(oa(e))throw Error(a(418));e.flags=-4097&e.flags|2,ra=!1,na=e}}}function ua(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;na=e}function da(e){if(e!==na)return!1;if(!ra)return ua(e),ra=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!nr(e.type,e.memoizedProps)),t&&(t=la)){if(oa(e))throw pa(),Error(a(418));for(;t;)sa(e,t),t=cr(t.nextSibling)}if(ua(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){la=cr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}la=null}}else la=na?cr(e.stateNode.nextSibling):null;return!0}function pa(){for(var e=la;e;)e=cr(e.nextSibling)}function fa(){la=na=null,ra=!1}function ha(e){null===aa?aa=[e]:aa.push(e)}var ma=b.ReactCurrentBatchConfig;function va(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var l=n.stateNode}if(!l)throw Error(a(147,e));var r=l,s=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===s?t.ref:(t=function(e){var t=r.refs;null===e?delete t[s]:t[s]=e},t._stringRef=s,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function ga(e,t){throw e=Object.prototype.toString.call(t),Error(a(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function wa(e){return(0,e._init)(e._payload)}function xa(e){function t(t,n){if(e){var l=t.deletions;null===l?(t.deletions=[n],t.flags|=16):l.push(n)}}function n(n,l){if(!e)return null;for(;null!==l;)t(n,l),l=l.sibling;return null}function l(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function r(e,t){return(e=Ac(e,t)).index=0,e.sibling=null,e}function s(t,n,l){return t.index=l,e?null!==(l=t.alternate)?(l=l.index)<n?(t.flags|=2,n):l:(t.flags|=2,n):(t.flags|=1048576,n)}function i(t){return e&&null===t.alternate&&(t.flags|=2),t}function o(e,t,n,l){return null===t||6!==t.tag?((t=Tc(n,e.mode,l)).return=e,t):((t=r(t,n)).return=e,t)}function c(e,t,n,l){var a=n.type;return a===k?d(e,t,n.props.children,l,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===A&&wa(a)===t.type)?((l=r(t,n.props)).ref=va(e,t,n),l.return=e,l):((l=Pc(n.type,n.key,n.props,null,e.mode,l)).ref=va(e,t,n),l.return=e,l)}function u(e,t,n,l){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Rc(n,e.mode,l)).return=e,t):((t=r(t,n.children||[])).return=e,t)}function d(e,t,n,l,a){return null===t||7!==t.tag?((t=Fc(n,e.mode,l,a)).return=e,t):((t=r(t,n)).return=e,t)}function p(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Tc(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case y:return(n=Pc(t.type,t.key,t.props,null,e.mode,n)).ref=va(e,null,t),n.return=e,n;case j:return(t=Rc(t,e.mode,n)).return=e,t;case A:return p(e,(0,t._init)(t._payload),n)}if(te(t)||D(t))return(t=Fc(t,e.mode,n,null)).return=e,t;ga(e,t)}return null}function f(e,t,n,l){var r=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==r?null:o(e,t,""+n,l);if("object"==typeof n&&null!==n){switch(n.$$typeof){case y:return n.key===r?c(e,t,n,l):null;case j:return n.key===r?u(e,t,n,l):null;case A:return f(e,t,(r=n._init)(n._payload),l)}if(te(n)||D(n))return null!==r?null:d(e,t,n,l,null);ga(e,n)}return null}function h(e,t,n,l,r){if("string"==typeof l&&""!==l||"number"==typeof l)return o(t,e=e.get(n)||null,""+l,r);if("object"==typeof l&&null!==l){switch(l.$$typeof){case y:return c(t,e=e.get(null===l.key?n:l.key)||null,l,r);case j:return u(t,e=e.get(null===l.key?n:l.key)||null,l,r);case A:return h(e,t,n,(0,l._init)(l._payload),r)}if(te(l)||D(l))return d(t,e=e.get(n)||null,l,r,null);ga(t,l)}return null}function m(r,a,i,o){for(var c=null,u=null,d=a,m=a=0,v=null;null!==d&&m<i.length;m++){d.index>m?(v=d,d=null):v=d.sibling;var g=f(r,d,i[m],o);if(null===g){null===d&&(d=v);break}e&&d&&null===g.alternate&&t(r,d),a=s(g,a,m),null===u?c=g:u.sibling=g,u=g,d=v}if(m===i.length)return n(r,d),ra&&Xr(r,m),c;if(null===d){for(;m<i.length;m++)null!==(d=p(r,i[m],o))&&(a=s(d,a,m),null===u?c=d:u.sibling=d,u=d);return ra&&Xr(r,m),c}for(d=l(r,d);m<i.length;m++)null!==(v=h(d,r,m,i[m],o))&&(e&&null!==v.alternate&&d.delete(null===v.key?m:v.key),a=s(v,a,m),null===u?c=v:u.sibling=v,u=v);return e&&d.forEach(function(e){return t(r,e)}),ra&&Xr(r,m),c}function v(r,i,o,c){var u=D(o);if("function"!=typeof u)throw Error(a(150));if(null==(o=u.call(o)))throw Error(a(151));for(var d=u=null,m=i,v=i=0,g=null,w=o.next();null!==m&&!w.done;v++,w=o.next()){m.index>v?(g=m,m=null):g=m.sibling;var x=f(r,m,w.value,c);if(null===x){null===m&&(m=g);break}e&&m&&null===x.alternate&&t(r,m),i=s(x,i,v),null===d?u=x:d.sibling=x,d=x,m=g}if(w.done)return n(r,m),ra&&Xr(r,v),u;if(null===m){for(;!w.done;v++,w=o.next())null!==(w=p(r,w.value,c))&&(i=s(w,i,v),null===d?u=w:d.sibling=w,d=w);return ra&&Xr(r,v),u}for(m=l(r,m);!w.done;v++,w=o.next())null!==(w=h(m,r,v,w.value,c))&&(e&&null!==w.alternate&&m.delete(null===w.key?v:w.key),i=s(w,i,v),null===d?u=w:d.sibling=w,d=w);return e&&m.forEach(function(e){return t(r,e)}),ra&&Xr(r,v),u}return function e(l,a,s,o){if("object"==typeof s&&null!==s&&s.type===k&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case y:e:{for(var c=s.key,u=a;null!==u;){if(u.key===c){if((c=s.type)===k){if(7===u.tag){n(l,u.sibling),(a=r(u,s.props.children)).return=l,l=a;break e}}else if(u.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===A&&wa(c)===u.type){n(l,u.sibling),(a=r(u,s.props)).ref=va(l,u,s),a.return=l,l=a;break e}n(l,u);break}t(l,u),u=u.sibling}s.type===k?((a=Fc(s.props.children,l.mode,o,s.key)).return=l,l=a):((o=Pc(s.type,s.key,s.props,null,l.mode,o)).ref=va(l,a,s),o.return=l,l=o)}return i(l);case j:e:{for(u=s.key;null!==a;){if(a.key===u){if(4===a.tag&&a.stateNode.containerInfo===s.containerInfo&&a.stateNode.implementation===s.implementation){n(l,a.sibling),(a=r(a,s.children||[])).return=l,l=a;break e}n(l,a);break}t(l,a),a=a.sibling}(a=Rc(s,l.mode,o)).return=l,l=a}return i(l);case A:return e(l,a,(u=s._init)(s._payload),o)}if(te(s))return m(l,a,s,o);if(D(s))return v(l,a,s,o);ga(l,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==a&&6===a.tag?(n(l,a.sibling),(a=r(a,s)).return=l,l=a):(n(l,a),(a=Tc(s,l.mode,o)).return=l,l=a),i(l)):n(l,a)}}var ba=xa(!0),ya=xa(!1),ja=Cr(null),ka=null,Ca=null,_a=null;function Na(){_a=Ca=ka=null}function Sa(e){var t=ja.current;_r(ja),e._currentValue=t}function La(e,t,n){for(;null!==e;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==l&&(l.childLanes|=t)):null!==l&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function Ma(e,t){ka=e,_a=Ca=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(wi=!0),e.firstContext=null)}function za(e){var t=e._currentValue;if(_a!==e)if(e={context:e,memoizedValue:t,next:null},null===Ca){if(null===ka)throw Error(a(308));Ca=e,ka.dependencies={lanes:0,firstContext:e}}else Ca=Ca.next=e;return t}var Ea=null;function Aa(e){null===Ea?Ea=[e]:Ea.push(e)}function Pa(e,t,n,l){var r=t.interleaved;return null===r?(n.next=n,Aa(t)):(n.next=r.next,r.next=n),t.interleaved=n,Fa(e,l)}function Fa(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Da=!1;function Ta(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ra(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ba(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function $a(e,t,n){var l=e.updateQueue;if(null===l)return null;if(l=l.shared,2&So){var r=l.pending;return null===r?t.next=t:(t.next=r.next,r.next=t),l.pending=t,Fa(e,n)}return null===(r=l.interleaved)?(t.next=t,Aa(l)):(t.next=r.next,r.next=t),l.interleaved=t,Fa(e,n)}function Ia(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var l=t.lanes;n|=l&=e.pendingLanes,t.lanes=n,wt(e,n)}}function Oa(e,t){var n=e.updateQueue,l=e.alternate;if(null!==l&&n===(l=l.updateQueue)){var r=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?r=a=s:a=a.next=s,n=n.next}while(null!==n);null===a?r=a=t:a=a.next=t}else r=a=t;return n={baseState:l.baseState,firstBaseUpdate:r,lastBaseUpdate:a,shared:l.shared,effects:l.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Wa(e,t,n,l){var r=e.updateQueue;Da=!1;var a=r.firstBaseUpdate,s=r.lastBaseUpdate,i=r.shared.pending;if(null!==i){r.shared.pending=null;var o=i,c=o.next;o.next=null,null===s?a=c:s.next=c,s=o;var u=e.alternate;null!==u&&(i=(u=u.updateQueue).lastBaseUpdate)!==s&&(null===i?u.firstBaseUpdate=c:i.next=c,u.lastBaseUpdate=o)}if(null!==a){var d=r.baseState;for(s=0,u=c=o=null,i=a;;){var p=i.lane,f=i.eventTime;if((l&p)===p){null!==u&&(u=u.next={eventTime:f,lane:0,tag:i.tag,payload:i.payload,callback:i.callback,next:null});e:{var h=e,m=i;switch(p=t,f=n,m.tag){case 1:if("function"==typeof(h=m.payload)){d=h.call(f,d,p);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(p="function"==typeof(h=m.payload)?h.call(f,d,p):h))break e;d=R({},d,p);break e;case 2:Da=!0}}null!==i.callback&&0!==i.lane&&(e.flags|=64,null===(p=r.effects)?r.effects=[i]:p.push(i))}else f={eventTime:f,lane:p,tag:i.tag,payload:i.payload,callback:i.callback,next:null},null===u?(c=u=f,o=d):u=u.next=f,s|=p;if(null===(i=i.next)){if(null===(i=r.shared.pending))break;i=(p=i).next,p.next=null,r.lastBaseUpdate=p,r.shared.pending=null}}if(null===u&&(o=d),r.baseState=o,r.firstBaseUpdate=c,r.lastBaseUpdate=u,null!==(t=r.shared.interleaved)){r=t;do{s|=r.lane,r=r.next}while(r!==t)}else null===a&&(r.shared.lanes=0);Do|=s,e.lanes=s,e.memoizedState=d}}function Ha(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var l=e[t],r=l.callback;if(null!==r){if(l.callback=null,l=n,"function"!=typeof r)throw Error(a(191,r));r.call(l)}}}var Va={},Ua=Cr(Va),Za=Cr(Va),Ya=Cr(Va);function qa(e){if(e===Va)throw Error(a(174));return e}function Ka(e,t){switch(Nr(Ya,t),Nr(Za,e),Nr(Ua,Va),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:oe(null,"");break;default:t=oe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}_r(Ua),Nr(Ua,t)}function Qa(){_r(Ua),_r(Za),_r(Ya)}function Ga(e){qa(Ya.current);var t=qa(Ua.current),n=oe(t,e.type);t!==n&&(Nr(Za,e),Nr(Ua,n))}function Xa(e){Za.current===e&&(_r(Ua),_r(Za))}var Ja=Cr(0);function es(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ts=[];function ns(){for(var e=0;e<ts.length;e++)ts[e]._workInProgressVersionPrimary=null;ts.length=0}var ls=b.ReactCurrentDispatcher,rs=b.ReactCurrentBatchConfig,as=0,ss=null,is=null,os=null,cs=!1,us=!1,ds=0,ps=0;function fs(){throw Error(a(321))}function hs(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!il(e[n],t[n]))return!1;return!0}function ms(e,t,n,l,r,s){if(as=s,ss=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ls.current=null===e||null===e.memoizedState?Xs:Js,e=n(l,r),us){s=0;do{if(us=!1,ds=0,25<=s)throw Error(a(301));s+=1,os=is=null,t.updateQueue=null,ls.current=ei,e=n(l,r)}while(us)}if(ls.current=Gs,t=null!==is&&null!==is.next,as=0,os=is=ss=null,cs=!1,t)throw Error(a(300));return e}function vs(){var e=0!==ds;return ds=0,e}function gs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===os?ss.memoizedState=os=e:os=os.next=e,os}function ws(){if(null===is){var e=ss.alternate;e=null!==e?e.memoizedState:null}else e=is.next;var t=null===os?ss.memoizedState:os.next;if(null!==t)os=t,is=e;else{if(null===e)throw Error(a(310));e={memoizedState:(is=e).memoizedState,baseState:is.baseState,baseQueue:is.baseQueue,queue:is.queue,next:null},null===os?ss.memoizedState=os=e:os=os.next=e}return os}function xs(e,t){return"function"==typeof t?t(e):t}function bs(e){var t=ws(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var l=is,r=l.baseQueue,s=n.pending;if(null!==s){if(null!==r){var i=r.next;r.next=s.next,s.next=i}l.baseQueue=r=s,n.pending=null}if(null!==r){s=r.next,l=l.baseState;var o=i=null,c=null,u=s;do{var d=u.lane;if((as&d)===d)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),l=u.hasEagerState?u.eagerState:e(l,u.action);else{var p={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(o=c=p,i=l):c=c.next=p,ss.lanes|=d,Do|=d}u=u.next}while(null!==u&&u!==s);null===c?i=l:c.next=o,il(l,t.memoizedState)||(wi=!0),t.memoizedState=l,t.baseState=i,t.baseQueue=c,n.lastRenderedState=l}if(null!==(e=n.interleaved)){r=e;do{s=r.lane,ss.lanes|=s,Do|=s,r=r.next}while(r!==e)}else null===r&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ys(e){var t=ws(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var l=n.dispatch,r=n.pending,s=t.memoizedState;if(null!==r){n.pending=null;var i=r=r.next;do{s=e(s,i.action),i=i.next}while(i!==r);il(s,t.memoizedState)||(wi=!0),t.memoizedState=s,null===t.baseQueue&&(t.baseState=s),n.lastRenderedState=s}return[s,l]}function js(){}function ks(e,t){var n=ss,l=ws(),r=t(),s=!il(l.memoizedState,r);if(s&&(l.memoizedState=r,wi=!0),l=l.queue,Ds(Ns.bind(null,n,l,e),[e]),l.getSnapshot!==t||s||null!==os&&1&os.memoizedState.tag){if(n.flags|=2048,zs(9,_s.bind(null,n,l,r,t),void 0,null),null===Lo)throw Error(a(349));30&as||Cs(n,t,r)}return r}function Cs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=ss.updateQueue)?(t={lastEffect:null,stores:null},ss.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function _s(e,t,n,l){t.value=n,t.getSnapshot=l,Ss(t)&&Ls(e)}function Ns(e,t,n){return n(function(){Ss(t)&&Ls(e)})}function Ss(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!il(e,n)}catch(e){return!0}}function Ls(e){var t=Fa(e,1);null!==t&&tc(t,e,1,-1)}function Ms(e){var t=gs();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:xs,lastRenderedState:e},t.queue=e,e=e.dispatch=Ys.bind(null,ss,e),[t.memoizedState,e]}function zs(e,t,n,l){return e={tag:e,create:t,destroy:n,deps:l,next:null},null===(t=ss.updateQueue)?(t={lastEffect:null,stores:null},ss.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function Es(){return ws().memoizedState}function As(e,t,n,l){var r=gs();ss.flags|=e,r.memoizedState=zs(1|t,n,void 0,void 0===l?null:l)}function Ps(e,t,n,l){var r=ws();l=void 0===l?null:l;var a=void 0;if(null!==is){var s=is.memoizedState;if(a=s.destroy,null!==l&&hs(l,s.deps))return void(r.memoizedState=zs(t,n,a,l))}ss.flags|=e,r.memoizedState=zs(1|t,n,a,l)}function Fs(e,t){return As(8390656,8,e,t)}function Ds(e,t){return Ps(2048,8,e,t)}function Ts(e,t){return Ps(4,2,e,t)}function Rs(e,t){return Ps(4,4,e,t)}function Bs(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function $s(e,t,n){return n=null!=n?n.concat([e]):null,Ps(4,4,Bs.bind(null,t,e),n)}function Is(){}function Os(e,t){var n=ws();t=void 0===t?null:t;var l=n.memoizedState;return null!==l&&null!==t&&hs(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function Ws(e,t){var n=ws();t=void 0===t?null:t;var l=n.memoizedState;return null!==l&&null!==t&&hs(t,l[1])?l[0]:(e=e(),n.memoizedState=[e,t],e)}function Hs(e,t,n){return 21&as?(il(n,t)||(n=mt(),ss.lanes|=n,Do|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,wi=!0),e.memoizedState=n)}function Vs(e,t){var n=xt;xt=0!==n&&4>n?n:4,e(!0);var l=rs.transition;rs.transition={};try{e(!1),t()}finally{xt=n,rs.transition=l}}function Us(){return ws().memoizedState}function Zs(e,t,n){var l=ec(e);n={lane:l,action:n,hasEagerState:!1,eagerState:null,next:null},qs(e)?Ks(t,n):null!==(n=Pa(e,t,n,l))&&(tc(n,e,l,Jo()),Qs(n,t,l))}function Ys(e,t,n){var l=ec(e),r={lane:l,action:n,hasEagerState:!1,eagerState:null,next:null};if(qs(e))Ks(t,r);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,i=a(s,n);if(r.hasEagerState=!0,r.eagerState=i,il(i,s)){var o=t.interleaved;return null===o?(r.next=r,Aa(t)):(r.next=o.next,o.next=r),void(t.interleaved=r)}}catch(e){}null!==(n=Pa(e,t,r,l))&&(tc(n,e,l,r=Jo()),Qs(n,t,l))}}function qs(e){var t=e.alternate;return e===ss||null!==t&&t===ss}function Ks(e,t){us=cs=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Qs(e,t,n){if(4194240&n){var l=t.lanes;n|=l&=e.pendingLanes,t.lanes=n,wt(e,n)}}var Gs={readContext:za,useCallback:fs,useContext:fs,useEffect:fs,useImperativeHandle:fs,useInsertionEffect:fs,useLayoutEffect:fs,useMemo:fs,useReducer:fs,useRef:fs,useState:fs,useDebugValue:fs,useDeferredValue:fs,useTransition:fs,useMutableSource:fs,useSyncExternalStore:fs,useId:fs,unstable_isNewReconciler:!1},Xs={readContext:za,useCallback:function(e,t){return gs().memoizedState=[e,void 0===t?null:t],e},useContext:za,useEffect:Fs,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,As(4194308,4,Bs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return As(4194308,4,e,t)},useInsertionEffect:function(e,t){return As(4,2,e,t)},useMemo:function(e,t){var n=gs();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var l=gs();return t=void 0!==n?n(t):t,l.memoizedState=l.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},l.queue=e,e=e.dispatch=Zs.bind(null,ss,e),[l.memoizedState,e]},useRef:function(e){return e={current:e},gs().memoizedState=e},useState:Ms,useDebugValue:Is,useDeferredValue:function(e){return gs().memoizedState=e},useTransition:function(){var e=Ms(!1),t=e[0];return e=Vs.bind(null,e[1]),gs().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var l=ss,r=gs();if(ra){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===Lo)throw Error(a(349));30&as||Cs(l,t,n)}r.memoizedState=n;var s={value:n,getSnapshot:t};return r.queue=s,Fs(Ns.bind(null,l,s,e),[e]),l.flags|=2048,zs(9,_s.bind(null,l,s,n,t),void 0,null),n},useId:function(){var e=gs(),t=Lo.identifierPrefix;if(ra){var n=Gr;t=":"+t+"R"+(n=(Qr&~(1<<32-st(Qr)-1)).toString(32)+n),0<(n=ds++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=ps++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Js={readContext:za,useCallback:Os,useContext:za,useEffect:Ds,useImperativeHandle:$s,useInsertionEffect:Ts,useLayoutEffect:Rs,useMemo:Ws,useReducer:bs,useRef:Es,useState:function(){return bs(xs)},useDebugValue:Is,useDeferredValue:function(e){return Hs(ws(),is.memoizedState,e)},useTransition:function(){return[bs(xs)[0],ws().memoizedState]},useMutableSource:js,useSyncExternalStore:ks,useId:Us,unstable_isNewReconciler:!1},ei={readContext:za,useCallback:Os,useContext:za,useEffect:Ds,useImperativeHandle:$s,useInsertionEffect:Ts,useLayoutEffect:Rs,useMemo:Ws,useReducer:ys,useRef:Es,useState:function(){return ys(xs)},useDebugValue:Is,useDeferredValue:function(e){var t=ws();return null===is?t.memoizedState=e:Hs(t,is.memoizedState,e)},useTransition:function(){return[ys(xs)[0],ws().memoizedState]},useMutableSource:js,useSyncExternalStore:ks,useId:Us,unstable_isNewReconciler:!1};function ti(e,t){if(e&&e.defaultProps){for(var n in t=R({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function ni(e,t,n,l){n=null==(n=n(l,t=e.memoizedState))?t:R({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var li={isMounted:function(e){return!!(e=e._reactInternals)&&We(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var l=Jo(),r=ec(e),a=Ba(l,r);a.payload=t,null!=n&&(a.callback=n),null!==(t=$a(e,a,r))&&(tc(t,e,r,l),Ia(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=Jo(),r=ec(e),a=Ba(l,r);a.tag=1,a.payload=t,null!=n&&(a.callback=n),null!==(t=$a(e,a,r))&&(tc(t,e,r,l),Ia(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Jo(),l=ec(e),r=Ba(n,l);r.tag=2,null!=t&&(r.callback=t),null!==(t=$a(e,r,l))&&(tc(t,e,l,n),Ia(t,e,l))}};function ri(e,t,n,l,r,a,s){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(l,a,s):!(t.prototype&&t.prototype.isPureReactComponent&&ol(n,l)&&ol(r,a))}function ai(e,t,n){var l=!1,r=Sr,a=t.contextType;return"object"==typeof a&&null!==a?a=za(a):(r=Ar(t)?zr:Lr.current,a=(l=null!=(l=t.contextTypes))?Er(e,r):Sr),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=li,e.stateNode=t,t._reactInternals=e,l&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=a),t}function si(e,t,n,l){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,l),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&li.enqueueReplaceState(t,t.state,null)}function ii(e,t,n,l){var r=e.stateNode;r.props=n,r.state=e.memoizedState,r.refs={},Ta(e);var a=t.contextType;"object"==typeof a&&null!==a?r.context=za(a):(a=Ar(t)?zr:Lr.current,r.context=Er(e,a)),r.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(ni(e,t,a,n),r.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof r.getSnapshotBeforeUpdate||"function"!=typeof r.UNSAFE_componentWillMount&&"function"!=typeof r.componentWillMount||(t=r.state,"function"==typeof r.componentWillMount&&r.componentWillMount(),"function"==typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),t!==r.state&&li.enqueueReplaceState(r,r.state,null),Wa(e,n,r,l),r.state=e.memoizedState),"function"==typeof r.componentDidMount&&(e.flags|=4194308)}function oi(e,t){try{var n="",l=t;do{n+=O(l),l=l.return}while(l);var r=n}catch(e){r="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:r,digest:null}}function ci(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ui(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var di="function"==typeof WeakMap?WeakMap:Map;function pi(e,t,n){(n=Ba(-1,n)).tag=3,n.payload={element:null};var l=t.value;return n.callback=function(){Ho||(Ho=!0,Vo=l),ui(0,t)},n}function fi(e,t,n){(n=Ba(-1,n)).tag=3;var l=e.type.getDerivedStateFromError;if("function"==typeof l){var r=t.value;n.payload=function(){return l(r)},n.callback=function(){ui(0,t)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){ui(0,t),"function"!=typeof l&&(null===Uo?Uo=new Set([this]):Uo.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function hi(e,t,n){var l=e.pingCache;if(null===l){l=e.pingCache=new di;var r=new Set;l.set(t,r)}else void 0===(r=l.get(t))&&(r=new Set,l.set(t,r));r.has(n)||(r.add(n),e=Cc.bind(null,e,t,n),t.then(e,e))}function mi(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function vi(e,t,n,l,r){return 1&e.mode?(e.flags|=65536,e.lanes=r,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Ba(-1,1)).tag=2,$a(n,t,1))),n.lanes|=1),e)}var gi=b.ReactCurrentOwner,wi=!1;function xi(e,t,n,l){t.child=null===e?ya(t,null,n,l):ba(t,e.child,n,l)}function bi(e,t,n,l,r){n=n.render;var a=t.ref;return Ma(t,r),l=ms(e,t,n,l,a,r),n=vs(),null===e||wi?(ra&&n&&ea(t),t.flags|=1,xi(e,t,l,r),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,Wi(e,t,r))}function yi(e,t,n,l,r){if(null===e){var a=n.type;return"function"!=typeof a||Ec(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Pc(n.type,null,l,t,t.mode,r)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,ji(e,t,a,l,r))}if(a=e.child,0===(e.lanes&r)){var s=a.memoizedProps;if((n=null!==(n=n.compare)?n:ol)(s,l)&&e.ref===t.ref)return Wi(e,t,r)}return t.flags|=1,(e=Ac(a,l)).ref=t.ref,e.return=t,t.child=e}function ji(e,t,n,l,r){if(null!==e){var a=e.memoizedProps;if(ol(a,l)&&e.ref===t.ref){if(wi=!1,t.pendingProps=l=a,0===(e.lanes&r))return t.lanes=e.lanes,Wi(e,t,r);131072&e.flags&&(wi=!0)}}return _i(e,t,n,l,r)}function ki(e,t,n){var l=t.pendingProps,r=l.children,a=null!==e?e.memoizedState:null;if("hidden"===l.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Nr(Ao,Eo),Eo|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},l=null!==a?a.baseLanes:n,Nr(Ao,Eo),Eo|=l}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Nr(Ao,Eo),Eo|=n;else null!==a?(l=a.baseLanes|n,t.memoizedState=null):l=n,Nr(Ao,Eo),Eo|=l;return xi(e,t,r,n),t.child}function Ci(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function _i(e,t,n,l,r){var a=Ar(n)?zr:Lr.current;return a=Er(t,a),Ma(t,r),n=ms(e,t,n,l,a,r),l=vs(),null===e||wi?(ra&&l&&ea(t),t.flags|=1,xi(e,t,n,r),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,Wi(e,t,r))}function Ni(e,t,n,l,r){if(Ar(n)){var a=!0;Tr(t)}else a=!1;if(Ma(t,r),null===t.stateNode)Oi(e,t),ai(t,n,l),ii(t,n,l,r),l=!0;else if(null===e){var s=t.stateNode,i=t.memoizedProps;s.props=i;var o=s.context,c=n.contextType;c="object"==typeof c&&null!==c?za(c):Er(t,c=Ar(n)?zr:Lr.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof s.getSnapshotBeforeUpdate;d||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(i!==l||o!==c)&&si(t,s,l,c),Da=!1;var p=t.memoizedState;s.state=p,Wa(t,l,s,r),o=t.memoizedState,i!==l||p!==o||Mr.current||Da?("function"==typeof u&&(ni(t,n,u,l),o=t.memoizedState),(i=Da||ri(t,n,i,l,p,o,c))?(d||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||("function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"==typeof s.componentDidMount&&(t.flags|=4194308)):("function"==typeof s.componentDidMount&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=o),s.props=l,s.state=o,s.context=c,l=i):("function"==typeof s.componentDidMount&&(t.flags|=4194308),l=!1)}else{s=t.stateNode,Ra(e,t),i=t.memoizedProps,c=t.type===t.elementType?i:ti(t.type,i),s.props=c,d=t.pendingProps,p=s.context,o="object"==typeof(o=n.contextType)&&null!==o?za(o):Er(t,o=Ar(n)?zr:Lr.current);var f=n.getDerivedStateFromProps;(u="function"==typeof f||"function"==typeof s.getSnapshotBeforeUpdate)||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(i!==d||p!==o)&&si(t,s,l,o),Da=!1,p=t.memoizedState,s.state=p,Wa(t,l,s,r);var h=t.memoizedState;i!==d||p!==h||Mr.current||Da?("function"==typeof f&&(ni(t,n,f,l),h=t.memoizedState),(c=Da||ri(t,n,c,l,p,h,o)||!1)?(u||"function"!=typeof s.UNSAFE_componentWillUpdate&&"function"!=typeof s.componentWillUpdate||("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(l,h,o),"function"==typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(l,h,o)),"function"==typeof s.componentDidUpdate&&(t.flags|=4),"function"==typeof s.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof s.componentDidUpdate||i===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||i===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=h),s.props=l,s.state=h,s.context=o,l=c):("function"!=typeof s.componentDidUpdate||i===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||i===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),l=!1)}return Si(e,t,n,l,a,r)}function Si(e,t,n,l,r,a){Ci(e,t);var s=!!(128&t.flags);if(!l&&!s)return r&&Rr(t,n,!1),Wi(e,t,a);l=t.stateNode,gi.current=t;var i=s&&"function"!=typeof n.getDerivedStateFromError?null:l.render();return t.flags|=1,null!==e&&s?(t.child=ba(t,e.child,null,a),t.child=ba(t,null,i,a)):xi(e,t,i,a),t.memoizedState=l.state,r&&Rr(t,n,!0),t.child}function Li(e){var t=e.stateNode;t.pendingContext?Fr(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Fr(0,t.context,!1),Ka(e,t.containerInfo)}function Mi(e,t,n,l,r){return fa(),ha(r),t.flags|=256,xi(e,t,n,l),t.child}var zi,Ei,Ai,Pi={dehydrated:null,treeContext:null,retryLane:0};function Fi(e){return{baseLanes:e,cachePool:null,transitions:null}}function Di(e,t,n){var l,r=t.pendingProps,s=Ja.current,i=!1,o=!!(128&t.flags);if((l=o)||(l=(null===e||null!==e.memoizedState)&&!!(2&s)),l?(i=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(s|=1),Nr(Ja,1&s),null===e)return ca(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},1&r||null===i?i=Dc(o,r,0,null):(i.childLanes=0,i.pendingProps=o),e=Fc(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Fi(n),t.memoizedState=Pi,e):Ti(t,o));if(null!==(s=e.memoizedState)&&null!==(l=s.dehydrated))return function(e,t,n,l,r,s,i){if(n)return 256&t.flags?(t.flags&=-257,Ri(e,t,i,l=ci(Error(a(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(s=l.fallback,r=t.mode,l=Dc({mode:"visible",children:l.children},r,0,null),(s=Fc(s,r,i,null)).flags|=2,l.return=t,s.return=t,l.sibling=s,t.child=l,1&t.mode&&ba(t,e.child,null,i),t.child.memoizedState=Fi(i),t.memoizedState=Pi,s);if(!(1&t.mode))return Ri(e,t,i,null);if("$!"===r.data){if(l=r.nextSibling&&r.nextSibling.dataset)var o=l.dgst;return l=o,Ri(e,t,i,l=ci(s=Error(a(419)),l,void 0))}if(o=0!==(i&e.childLanes),wi||o){if(null!==(l=Lo)){switch(i&-i){case 4:r=2;break;case 16:r=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:r=32;break;case 536870912:r=268435456;break;default:r=0}0!==(r=0!==(r&(l.suspendedLanes|i))?0:r)&&r!==s.retryLane&&(s.retryLane=r,Fa(e,r),tc(l,e,r,-1))}return hc(),Ri(e,t,i,l=ci(Error(a(421))))}return"$?"===r.data?(t.flags|=128,t.child=e.child,t=Nc.bind(null,e),r._reactRetry=t,null):(e=s.treeContext,la=cr(r.nextSibling),na=t,ra=!0,aa=null,null!==e&&(Yr[qr++]=Qr,Yr[qr++]=Gr,Yr[qr++]=Kr,Qr=e.id,Gr=e.overflow,Kr=t),(t=Ti(t,l.children)).flags|=4096,t)}(e,t,o,r,l,s,n);if(i){i=r.fallback,o=t.mode,l=(s=e.child).sibling;var c={mode:"hidden",children:r.children};return 1&o||t.child===s?(r=Ac(s,c)).subtreeFlags=14680064&s.subtreeFlags:((r=t.child).childLanes=0,r.pendingProps=c,t.deletions=null),null!==l?i=Ac(l,i):(i=Fc(i,o,n,null)).flags|=2,i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=null===(o=e.child.memoizedState)?Fi(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=Pi,r}return e=(i=e.child).sibling,r=Ac(i,{mode:"visible",children:r.children}),!(1&t.mode)&&(r.lanes=n),r.return=t,r.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Ti(e,t){return(t=Dc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Ri(e,t,n,l){return null!==l&&ha(l),ba(t,e.child,null,n),(e=Ti(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Bi(e,t,n){e.lanes|=t;var l=e.alternate;null!==l&&(l.lanes|=t),La(e.return,t,n)}function $i(e,t,n,l,r){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:r}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=l,a.tail=n,a.tailMode=r)}function Ii(e,t,n){var l=t.pendingProps,r=l.revealOrder,a=l.tail;if(xi(e,t,l.children,n),2&(l=Ja.current))l=1&l|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Bi(e,n,t);else if(19===e.tag)Bi(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}l&=1}if(Nr(Ja,l),1&t.mode)switch(r){case"forwards":for(n=t.child,r=null;null!==n;)null!==(e=n.alternate)&&null===es(e)&&(r=n),n=n.sibling;null===(n=r)?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),$i(t,!1,r,n,a);break;case"backwards":for(n=null,r=t.child,t.child=null;null!==r;){if(null!==(e=r.alternate)&&null===es(e)){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}$i(t,!0,n,null,a);break;case"together":$i(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Oi(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Wi(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Do|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Ac(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ac(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Hi(e,t){if(!ra)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var l=null;null!==n;)null!==n.alternate&&(l=n),n=n.sibling;null===l?t||null===e.tail?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Vi(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,l=0;if(t)for(var r=e.child;null!==r;)n|=r.lanes|r.childLanes,l|=14680064&r.subtreeFlags,l|=14680064&r.flags,r.return=e,r=r.sibling;else for(r=e.child;null!==r;)n|=r.lanes|r.childLanes,l|=r.subtreeFlags,l|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function Ui(e,t,n){var l=t.pendingProps;switch(ta(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Vi(t),null;case 1:case 17:return Ar(t.type)&&Pr(),Vi(t),null;case 3:return l=t.stateNode,Qa(),_r(Mr),_r(Lr),ns(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),null!==e&&null!==e.child||(da(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==aa&&(ac(aa),aa=null))),Vi(t),null;case 5:Xa(t);var r=qa(Ya.current);if(n=t.type,null!==e&&null!=t.stateNode)Ei(e,t,n,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!l){if(null===t.stateNode)throw Error(a(166));return Vi(t),null}if(e=qa(Ua.current),da(t)){l=t.stateNode,n=t.type;var s=t.memoizedProps;switch(l[pr]=t,l[fr]=s,e=!!(1&t.mode),n){case"dialog":$l("cancel",l),$l("close",l);break;case"iframe":case"object":case"embed":$l("load",l);break;case"video":case"audio":for(r=0;r<Dl.length;r++)$l(Dl[r],l);break;case"source":$l("error",l);break;case"img":case"image":case"link":$l("error",l),$l("load",l);break;case"details":$l("toggle",l);break;case"input":Q(l,s),$l("invalid",l);break;case"select":l._wrapperState={wasMultiple:!!s.multiple},$l("invalid",l);break;case"textarea":re(l,s),$l("invalid",l)}for(var o in we(n,s),r=null,s)if(s.hasOwnProperty(o)){var c=s[o];"children"===o?"string"==typeof c?l.textContent!==c&&(!0!==s.suppressHydrationWarning&&Xl(l.textContent,c,e),r=["children",c]):"number"==typeof c&&l.textContent!==""+c&&(!0!==s.suppressHydrationWarning&&Xl(l.textContent,c,e),r=["children",""+c]):i.hasOwnProperty(o)&&null!=c&&"onScroll"===o&&$l("scroll",l)}switch(n){case"input":Z(l),J(l,s,!0);break;case"textarea":Z(l),se(l);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(l.onclick=Jl)}l=r,t.updateQueue=l,null!==l&&(t.flags|=4)}else{o=9===r.nodeType?r:r.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=ie(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=o.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof l.is?e=o.createElement(n,{is:l.is}):(e=o.createElement(n),"select"===n&&(o=e,l.multiple?o.multiple=!0:l.size&&(o.size=l.size))):e=o.createElementNS(e,n),e[pr]=t,e[fr]=l,zi(e,t),t.stateNode=e;e:{switch(o=xe(n,l),n){case"dialog":$l("cancel",e),$l("close",e),r=l;break;case"iframe":case"object":case"embed":$l("load",e),r=l;break;case"video":case"audio":for(r=0;r<Dl.length;r++)$l(Dl[r],e);r=l;break;case"source":$l("error",e),r=l;break;case"img":case"image":case"link":$l("error",e),$l("load",e),r=l;break;case"details":$l("toggle",e),r=l;break;case"input":Q(e,l),r=K(e,l),$l("invalid",e);break;case"option":default:r=l;break;case"select":e._wrapperState={wasMultiple:!!l.multiple},r=R({},l,{value:void 0}),$l("invalid",e);break;case"textarea":re(e,l),r=le(e,l),$l("invalid",e)}for(s in we(n,r),c=r)if(c.hasOwnProperty(s)){var u=c[s];"style"===s?ve(e,u):"dangerouslySetInnerHTML"===s?null!=(u=u?u.__html:void 0)&&de(e,u):"children"===s?"string"==typeof u?("textarea"!==n||""!==u)&&pe(e,u):"number"==typeof u&&pe(e,""+u):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(i.hasOwnProperty(s)?null!=u&&"onScroll"===s&&$l("scroll",e):null!=u&&x(e,s,u,o))}switch(n){case"input":Z(e),J(e,l,!1);break;case"textarea":Z(e),se(e);break;case"option":null!=l.value&&e.setAttribute("value",""+V(l.value));break;case"select":e.multiple=!!l.multiple,null!=(s=l.value)?ne(e,!!l.multiple,s,!1):null!=l.defaultValue&&ne(e,!!l.multiple,l.defaultValue,!0);break;default:"function"==typeof r.onClick&&(e.onclick=Jl)}switch(n){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}}l&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Vi(t),null;case 6:if(e&&null!=t.stateNode)Ai(0,t,e.memoizedProps,l);else{if("string"!=typeof l&&null===t.stateNode)throw Error(a(166));if(n=qa(Ya.current),qa(Ua.current),da(t)){if(l=t.stateNode,n=t.memoizedProps,l[pr]=t,(s=l.nodeValue!==n)&&null!==(e=na))switch(e.tag){case 3:Xl(l.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Xl(l.nodeValue,n,!!(1&e.mode))}s&&(t.flags|=4)}else(l=(9===n.nodeType?n:n.ownerDocument).createTextNode(l))[pr]=t,t.stateNode=l}return Vi(t),null;case 13:if(_r(Ja),l=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ra&&null!==la&&1&t.mode&&!(128&t.flags))pa(),fa(),t.flags|=98560,s=!1;else if(s=da(t),null!==l&&null!==l.dehydrated){if(null===e){if(!s)throw Error(a(318));if(!(s=null!==(s=t.memoizedState)?s.dehydrated:null))throw Error(a(317));s[pr]=t}else fa(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Vi(t),s=!1}else null!==aa&&(ac(aa),aa=null),s=!0;if(!s)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((l=null!==l)!=(null!==e&&null!==e.memoizedState)&&l&&(t.child.flags|=8192,1&t.mode&&(null===e||1&Ja.current?0===Po&&(Po=3):hc())),null!==t.updateQueue&&(t.flags|=4),Vi(t),null);case 4:return Qa(),null===e&&Wl(t.stateNode.containerInfo),Vi(t),null;case 10:return Sa(t.type._context),Vi(t),null;case 19:if(_r(Ja),null===(s=t.memoizedState))return Vi(t),null;if(l=!!(128&t.flags),null===(o=s.rendering))if(l)Hi(s,!1);else{if(0!==Po||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(o=es(e))){for(t.flags|=128,Hi(s,!1),null!==(l=o.updateQueue)&&(t.updateQueue=l,t.flags|=4),t.subtreeFlags=0,l=n,n=t.child;null!==n;)e=l,(s=n).flags&=14680066,null===(o=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Nr(Ja,1&Ja.current|2),t.child}e=e.sibling}null!==s.tail&&Ge()>Oo&&(t.flags|=128,l=!0,Hi(s,!1),t.lanes=4194304)}else{if(!l)if(null!==(e=es(o))){if(t.flags|=128,l=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Hi(s,!0),null===s.tail&&"hidden"===s.tailMode&&!o.alternate&&!ra)return Vi(t),null}else 2*Ge()-s.renderingStartTime>Oo&&1073741824!==n&&(t.flags|=128,l=!0,Hi(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(null!==(n=s.last)?n.sibling=o:t.child=o,s.last=o)}return null!==s.tail?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ge(),t.sibling=null,n=Ja.current,Nr(Ja,l?1&n|2:1&n),t):(Vi(t),null);case 22:case 23:return uc(),l=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==l&&(t.flags|=8192),l&&1&t.mode?!!(1073741824&Eo)&&(Vi(t),6&t.subtreeFlags&&(t.flags|=8192)):Vi(t),null;case 24:case 25:return null}throw Error(a(156,t.tag))}function Zi(e,t){switch(ta(t),t.tag){case 1:return Ar(t.type)&&Pr(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Qa(),_r(Mr),_r(Lr),ns(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Xa(t),null;case 13:if(_r(Ja),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));fa()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return _r(Ja),null;case 4:return Qa(),null;case 10:return Sa(t.type._context),null;case 22:case 23:return uc(),null;default:return null}}zi=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ei=function(e,t,n,l){var r=e.memoizedProps;if(r!==l){e=t.stateNode,qa(Ua.current);var a,s=null;switch(n){case"input":r=K(e,r),l=K(e,l),s=[];break;case"select":r=R({},r,{value:void 0}),l=R({},l,{value:void 0}),s=[];break;case"textarea":r=le(e,r),l=le(e,l),s=[];break;default:"function"!=typeof r.onClick&&"function"==typeof l.onClick&&(e.onclick=Jl)}for(u in we(n,l),n=null,r)if(!l.hasOwnProperty(u)&&r.hasOwnProperty(u)&&null!=r[u])if("style"===u){var o=r[u];for(a in o)o.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(i.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in l){var c=l[u];if(o=null!=r?r[u]:void 0,l.hasOwnProperty(u)&&c!==o&&(null!=c||null!=o))if("style"===u)if(o){for(a in o)!o.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&o[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(s||(s=[]),s.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,o=o?o.__html:void 0,null!=c&&o!==c&&(s=s||[]).push(u,c)):"children"===u?"string"!=typeof c&&"number"!=typeof c||(s=s||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(i.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&$l("scroll",e),s||o===c||(s=[])):(s=s||[]).push(u,c))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}},Ai=function(e,t,n,l){n!==l&&(t.flags|=4)};var Yi=!1,qi=!1,Ki="function"==typeof WeakSet?WeakSet:Set,Qi=null;function Gi(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){kc(e,t,n)}else n.current=null}function Xi(e,t,n){try{n()}catch(n){kc(e,t,n)}}var Ji=!1;function eo(e,t,n){var l=t.updateQueue;if(null!==(l=null!==l?l.lastEffect:null)){var r=l=l.next;do{if((r.tag&e)===e){var a=r.destroy;r.destroy=void 0,void 0!==a&&Xi(t,n,a)}r=r.next}while(r!==l)}}function to(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var l=n.create;n.destroy=l()}n=n.next}while(n!==t)}}function no(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function lo(e){var t=e.alternate;null!==t&&(e.alternate=null,lo(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&(delete t[pr],delete t[fr],delete t[mr],delete t[vr],delete t[gr]),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ro(e){return 5===e.tag||3===e.tag||4===e.tag}function ao(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||ro(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function so(e,t,n){var l=e.tag;if(5===l||6===l)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Jl));else if(4!==l&&null!==(e=e.child))for(so(e,t,n),e=e.sibling;null!==e;)so(e,t,n),e=e.sibling}function io(e,t,n){var l=e.tag;if(5===l||6===l)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==l&&null!==(e=e.child))for(io(e,t,n),e=e.sibling;null!==e;)io(e,t,n),e=e.sibling}var oo=null,co=!1;function uo(e,t,n){for(n=n.child;null!==n;)po(e,t,n),n=n.sibling}function po(e,t,n){if(at&&"function"==typeof at.onCommitFiberUnmount)try{at.onCommitFiberUnmount(rt,n)}catch(e){}switch(n.tag){case 5:qi||Gi(n,t);case 6:var l=oo,r=co;oo=null,uo(e,t,n),co=r,null!==(oo=l)&&(co?(e=oo,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):oo.removeChild(n.stateNode));break;case 18:null!==oo&&(co?(e=oo,n=n.stateNode,8===e.nodeType?or(e.parentNode,n):1===e.nodeType&&or(e,n),Wt(e)):or(oo,n.stateNode));break;case 4:l=oo,r=co,oo=n.stateNode.containerInfo,co=!0,uo(e,t,n),oo=l,co=r;break;case 0:case 11:case 14:case 15:if(!qi&&null!==(l=n.updateQueue)&&null!==(l=l.lastEffect)){r=l=l.next;do{var a=r,s=a.destroy;a=a.tag,void 0!==s&&(2&a||4&a)&&Xi(n,t,s),r=r.next}while(r!==l)}uo(e,t,n);break;case 1:if(!qi&&(Gi(n,t),"function"==typeof(l=n.stateNode).componentWillUnmount))try{l.props=n.memoizedProps,l.state=n.memoizedState,l.componentWillUnmount()}catch(e){kc(n,t,e)}uo(e,t,n);break;case 21:uo(e,t,n);break;case 22:1&n.mode?(qi=(l=qi)||null!==n.memoizedState,uo(e,t,n),qi=l):uo(e,t,n);break;default:uo(e,t,n)}}function fo(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Ki),t.forEach(function(t){var l=Sc.bind(null,e,t);n.has(t)||(n.add(t),t.then(l,l))})}}function ho(e,t){var n=t.deletions;if(null!==n)for(var l=0;l<n.length;l++){var r=n[l];try{var s=e,i=t,o=i;e:for(;null!==o;){switch(o.tag){case 5:oo=o.stateNode,co=!1;break e;case 3:case 4:oo=o.stateNode.containerInfo,co=!0;break e}o=o.return}if(null===oo)throw Error(a(160));po(s,i,r),oo=null,co=!1;var c=r.alternate;null!==c&&(c.return=null),r.return=null}catch(e){kc(r,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)mo(t,e),t=t.sibling}function mo(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ho(t,e),vo(e),4&l){try{eo(3,e,e.return),to(3,e)}catch(t){kc(e,e.return,t)}try{eo(5,e,e.return)}catch(t){kc(e,e.return,t)}}break;case 1:ho(t,e),vo(e),512&l&&null!==n&&Gi(n,n.return);break;case 5:if(ho(t,e),vo(e),512&l&&null!==n&&Gi(n,n.return),32&e.flags){var r=e.stateNode;try{pe(r,"")}catch(t){kc(e,e.return,t)}}if(4&l&&null!=(r=e.stateNode)){var s=e.memoizedProps,i=null!==n?n.memoizedProps:s,o=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===o&&"radio"===s.type&&null!=s.name&&G(r,s),xe(o,i);var u=xe(o,s);for(i=0;i<c.length;i+=2){var d=c[i],p=c[i+1];"style"===d?ve(r,p):"dangerouslySetInnerHTML"===d?de(r,p):"children"===d?pe(r,p):x(r,d,p,u)}switch(o){case"input":X(r,s);break;case"textarea":ae(r,s);break;case"select":var f=r._wrapperState.wasMultiple;r._wrapperState.wasMultiple=!!s.multiple;var h=s.value;null!=h?ne(r,!!s.multiple,h,!1):f!==!!s.multiple&&(null!=s.defaultValue?ne(r,!!s.multiple,s.defaultValue,!0):ne(r,!!s.multiple,s.multiple?[]:"",!1))}r[fr]=s}catch(t){kc(e,e.return,t)}}break;case 6:if(ho(t,e),vo(e),4&l){if(null===e.stateNode)throw Error(a(162));r=e.stateNode,s=e.memoizedProps;try{r.nodeValue=s}catch(t){kc(e,e.return,t)}}break;case 3:if(ho(t,e),vo(e),4&l&&null!==n&&n.memoizedState.isDehydrated)try{Wt(t.containerInfo)}catch(t){kc(e,e.return,t)}break;case 4:default:ho(t,e),vo(e);break;case 13:ho(t,e),vo(e),8192&(r=e.child).flags&&(s=null!==r.memoizedState,r.stateNode.isHidden=s,!s||null!==r.alternate&&null!==r.alternate.memoizedState||(Io=Ge())),4&l&&fo(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(qi=(u=qi)||d,ho(t,e),qi=u):ho(t,e),vo(e),8192&l){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!d&&1&e.mode)for(Qi=e,d=e.child;null!==d;){for(p=Qi=d;null!==Qi;){switch(h=(f=Qi).child,f.tag){case 0:case 11:case 14:case 15:eo(4,f,f.return);break;case 1:Gi(f,f.return);var m=f.stateNode;if("function"==typeof m.componentWillUnmount){l=f,n=f.return;try{t=l,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(e){kc(l,n,e)}}break;case 5:Gi(f,f.return);break;case 22:if(null!==f.memoizedState){bo(p);continue}}null!==h?(h.return=f,Qi=h):bo(p)}d=d.sibling}e:for(d=null,p=e;;){if(5===p.tag){if(null===d){d=p;try{r=p.stateNode,u?"function"==typeof(s=r.style).setProperty?s.setProperty("display","none","important"):s.display="none":(o=p.stateNode,i=null!=(c=p.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,o.style.display=me("display",i))}catch(t){kc(e,e.return,t)}}}else if(6===p.tag){if(null===d)try{p.stateNode.nodeValue=u?"":p.memoizedProps}catch(t){kc(e,e.return,t)}}else if((22!==p.tag&&23!==p.tag||null===p.memoizedState||p===e)&&null!==p.child){p.child.return=p,p=p.child;continue}if(p===e)break e;for(;null===p.sibling;){if(null===p.return||p.return===e)break e;d===p&&(d=null),p=p.return}d===p&&(d=null),p.sibling.return=p.return,p=p.sibling}}break;case 19:ho(t,e),vo(e),4&l&&fo(e);case 21:}}function vo(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(ro(n)){var l=n;break e}n=n.return}throw Error(a(160))}switch(l.tag){case 5:var r=l.stateNode;32&l.flags&&(pe(r,""),l.flags&=-33),io(e,ao(e),r);break;case 3:case 4:var s=l.stateNode.containerInfo;so(e,ao(e),s);break;default:throw Error(a(161))}}catch(t){kc(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function go(e,t,n){Qi=e,wo(e,t,n)}function wo(e,t,n){for(var l=!!(1&e.mode);null!==Qi;){var r=Qi,a=r.child;if(22===r.tag&&l){var s=null!==r.memoizedState||Yi;if(!s){var i=r.alternate,o=null!==i&&null!==i.memoizedState||qi;i=Yi;var c=qi;if(Yi=s,(qi=o)&&!c)for(Qi=r;null!==Qi;)o=(s=Qi).child,22===s.tag&&null!==s.memoizedState?yo(r):null!==o?(o.return=s,Qi=o):yo(r);for(;null!==a;)Qi=a,wo(a,t,n),a=a.sibling;Qi=r,Yi=i,qi=c}xo(e)}else 8772&r.subtreeFlags&&null!==a?(a.return=r,Qi=a):xo(e)}}function xo(e){for(;null!==Qi;){var t=Qi;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:qi||to(5,t);break;case 1:var l=t.stateNode;if(4&t.flags&&!qi)if(null===n)l.componentDidMount();else{var r=t.elementType===t.type?n.memoizedProps:ti(t.type,n.memoizedProps);l.componentDidUpdate(r,n.memoizedState,l.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;null!==s&&Ha(t,s,l);break;case 3:var i=t.updateQueue;if(null!==i){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Ha(t,i,n)}break;case 5:var o=t.stateNode;if(null===n&&4&t.flags){n=o;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var d=u.memoizedState;if(null!==d){var p=d.dehydrated;null!==p&&Wt(p)}}}break;default:throw Error(a(163))}qi||512&t.flags&&no(t)}catch(e){kc(t,t.return,e)}}if(t===e){Qi=null;break}if(null!==(n=t.sibling)){n.return=t.return,Qi=n;break}Qi=t.return}}function bo(e){for(;null!==Qi;){var t=Qi;if(t===e){Qi=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Qi=n;break}Qi=t.return}}function yo(e){for(;null!==Qi;){var t=Qi;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{to(4,t)}catch(e){kc(t,n,e)}break;case 1:var l=t.stateNode;if("function"==typeof l.componentDidMount){var r=t.return;try{l.componentDidMount()}catch(e){kc(t,r,e)}}var a=t.return;try{no(t)}catch(e){kc(t,a,e)}break;case 5:var s=t.return;try{no(t)}catch(e){kc(t,s,e)}}}catch(e){kc(t,t.return,e)}if(t===e){Qi=null;break}var i=t.sibling;if(null!==i){i.return=t.return,Qi=i;break}Qi=t.return}}var jo,ko=Math.ceil,Co=b.ReactCurrentDispatcher,_o=b.ReactCurrentOwner,No=b.ReactCurrentBatchConfig,So=0,Lo=null,Mo=null,zo=0,Eo=0,Ao=Cr(0),Po=0,Fo=null,Do=0,To=0,Ro=0,Bo=null,$o=null,Io=0,Oo=1/0,Wo=null,Ho=!1,Vo=null,Uo=null,Zo=!1,Yo=null,qo=0,Ko=0,Qo=null,Go=-1,Xo=0;function Jo(){return 6&So?Ge():-1!==Go?Go:Go=Ge()}function ec(e){return 1&e.mode?2&So&&0!==zo?zo&-zo:null!==ma.transition?(0===Xo&&(Xo=mt()),Xo):0!==(e=xt)?e:e=void 0===(e=window.event)?16:Qt(e.type):1}function tc(e,t,n,l){if(50<Ko)throw Ko=0,Qo=null,Error(a(185));gt(e,n,l),2&So&&e===Lo||(e===Lo&&(!(2&So)&&(To|=n),4===Po&&sc(e,zo)),nc(e,l),1===n&&0===So&&!(1&t.mode)&&(Oo=Ge()+500,$r&&Wr()))}function nc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,r=e.expirationTimes,a=e.pendingLanes;0<a;){var s=31-st(a),i=1<<s,o=r[s];-1===o?0!==(i&n)&&0===(i&l)||(r[s]=ft(i,t)):o<=t&&(e.expiredLanes|=i),a&=~i}}(e,t);var l=pt(e,e===Lo?zo:0);if(0===l)null!==n&&qe(n),e.callbackNode=null,e.callbackPriority=0;else if(t=l&-l,e.callbackPriority!==t){if(null!=n&&qe(n),1===t)0===e.tag?function(e){$r=!0,Or(e)}(ic.bind(null,e)):Or(ic.bind(null,e)),sr(function(){!(6&So)&&Wr()}),n=null;else{switch(bt(l)){case 1:n=Je;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=lt}n=Lc(n,lc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function lc(e,t){if(Go=-1,Xo=0,6&So)throw Error(a(327));var n=e.callbackNode;if(yc()&&e.callbackNode!==n)return null;var l=pt(e,e===Lo?zo:0);if(0===l)return null;if(30&l||0!==(l&e.expiredLanes)||t)t=mc(e,l);else{t=l;var r=So;So|=2;var s=fc();for(Lo===e&&zo===t||(Wo=null,Oo=Ge()+500,dc(e,t));;)try{gc();break}catch(t){pc(e,t)}Na(),Co.current=s,So=r,null!==Mo?t=0:(Lo=null,zo=0,t=Po)}if(0!==t){if(2===t&&0!==(r=ht(e))&&(l=r,t=rc(e,r)),1===t)throw n=Fo,dc(e,0),sc(e,l),nc(e,Ge()),n;if(6===t)sc(e,l);else{if(r=e.current.alternate,!(30&l||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var l=0;l<n.length;l++){var r=n[l],a=r.getSnapshot;r=r.value;try{if(!il(a(),r))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(r)||(t=mc(e,l),2===t&&(s=ht(e),0!==s&&(l=s,t=rc(e,s))),1!==t)))throw n=Fo,dc(e,0),sc(e,l),nc(e,Ge()),n;switch(e.finishedWork=r,e.finishedLanes=l,t){case 0:case 1:throw Error(a(345));case 2:case 5:bc(e,$o,Wo);break;case 3:if(sc(e,l),(130023424&l)===l&&10<(t=Io+500-Ge())){if(0!==pt(e,0))break;if(((r=e.suspendedLanes)&l)!==l){Jo(),e.pingedLanes|=e.suspendedLanes&r;break}e.timeoutHandle=lr(bc.bind(null,e,$o,Wo),t);break}bc(e,$o,Wo);break;case 4:if(sc(e,l),(4194240&l)===l)break;for(t=e.eventTimes,r=-1;0<l;){var i=31-st(l);s=1<<i,(i=t[i])>r&&(r=i),l&=~s}if(l=r,10<(l=(120>(l=Ge()-l)?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*ko(l/1960))-l)){e.timeoutHandle=lr(bc.bind(null,e,$o,Wo),l);break}bc(e,$o,Wo);break;default:throw Error(a(329))}}}return nc(e,Ge()),e.callbackNode===n?lc.bind(null,e):null}function rc(e,t){var n=Bo;return e.current.memoizedState.isDehydrated&&(dc(e,t).flags|=256),2!==(e=mc(e,t))&&(t=$o,$o=n,null!==t&&ac(t)),e}function ac(e){null===$o?$o=e:$o.push.apply($o,e)}function sc(e,t){for(t&=~Ro,t&=~To,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-st(t),l=1<<n;e[n]=-1,t&=~l}}function ic(e){if(6&So)throw Error(a(327));yc();var t=pt(e,0);if(!(1&t))return nc(e,Ge()),null;var n=mc(e,t);if(0!==e.tag&&2===n){var l=ht(e);0!==l&&(t=l,n=rc(e,l))}if(1===n)throw n=Fo,dc(e,0),sc(e,t),nc(e,Ge()),n;if(6===n)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,bc(e,$o,Wo),nc(e,Ge()),null}function oc(e,t){var n=So;So|=1;try{return e(t)}finally{0===(So=n)&&(Oo=Ge()+500,$r&&Wr())}}function cc(e){null!==Yo&&0===Yo.tag&&!(6&So)&&yc();var t=So;So|=1;var n=No.transition,l=xt;try{if(No.transition=null,xt=1,e)return e()}finally{xt=l,No.transition=n,!(6&(So=t))&&Wr()}}function uc(){Eo=Ao.current,_r(Ao)}function dc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,rr(n)),null!==Mo)for(n=Mo.return;null!==n;){var l=n;switch(ta(l),l.tag){case 1:null!=(l=l.type.childContextTypes)&&Pr();break;case 3:Qa(),_r(Mr),_r(Lr),ns();break;case 5:Xa(l);break;case 4:Qa();break;case 13:case 19:_r(Ja);break;case 10:Sa(l.type._context);break;case 22:case 23:uc()}n=n.return}if(Lo=e,Mo=e=Ac(e.current,null),zo=Eo=t,Po=0,Fo=null,Ro=To=Do=0,$o=Bo=null,null!==Ea){for(t=0;t<Ea.length;t++)if(null!==(l=(n=Ea[t]).interleaved)){n.interleaved=null;var r=l.next,a=n.pending;if(null!==a){var s=a.next;a.next=r,l.next=s}n.pending=l}Ea=null}return e}function pc(e,t){for(;;){var n=Mo;try{if(Na(),ls.current=Gs,cs){for(var l=ss.memoizedState;null!==l;){var r=l.queue;null!==r&&(r.pending=null),l=l.next}cs=!1}if(as=0,os=is=ss=null,us=!1,ds=0,_o.current=null,null===n||null===n.return){Po=1,Fo=t,Mo=null;break}e:{var s=e,i=n.return,o=n,c=t;if(t=zo,o.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var u=c,d=o,p=d.tag;if(!(1&d.mode||0!==p&&11!==p&&15!==p)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var h=mi(i);if(null!==h){h.flags&=-257,vi(h,i,o,0,t),1&h.mode&&hi(s,u,t),c=u;var m=(t=h).updateQueue;if(null===m){var v=new Set;v.add(c),t.updateQueue=v}else m.add(c);break e}if(!(1&t)){hi(s,u,t),hc();break e}c=Error(a(426))}else if(ra&&1&o.mode){var g=mi(i);if(null!==g){!(65536&g.flags)&&(g.flags|=256),vi(g,i,o,0,t),ha(oi(c,o));break e}}s=c=oi(c,o),4!==Po&&(Po=2),null===Bo?Bo=[s]:Bo.push(s),s=i;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t,Oa(s,pi(0,c,t));break e;case 1:o=c;var w=s.type,x=s.stateNode;if(!(128&s.flags||"function"!=typeof w.getDerivedStateFromError&&(null===x||"function"!=typeof x.componentDidCatch||null!==Uo&&Uo.has(x)))){s.flags|=65536,t&=-t,s.lanes|=t,Oa(s,fi(s,o,t));break e}}s=s.return}while(null!==s)}xc(n)}catch(e){t=e,Mo===n&&null!==n&&(Mo=n=n.return);continue}break}}function fc(){var e=Co.current;return Co.current=Gs,null===e?Gs:e}function hc(){0!==Po&&3!==Po&&2!==Po||(Po=4),null===Lo||!(268435455&Do)&&!(268435455&To)||sc(Lo,zo)}function mc(e,t){var n=So;So|=2;var l=fc();for(Lo===e&&zo===t||(Wo=null,dc(e,t));;)try{vc();break}catch(t){pc(e,t)}if(Na(),So=n,Co.current=l,null!==Mo)throw Error(a(261));return Lo=null,zo=0,Po}function vc(){for(;null!==Mo;)wc(Mo)}function gc(){for(;null!==Mo&&!Ke();)wc(Mo)}function wc(e){var t=jo(e.alternate,e,Eo);e.memoizedProps=e.pendingProps,null===t?xc(e):Mo=t,_o.current=null}function xc(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Zi(n,t)))return n.flags&=32767,void(Mo=n);if(null===e)return Po=6,void(Mo=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Ui(n,t,Eo)))return void(Mo=n);if(null!==(t=t.sibling))return void(Mo=t);Mo=t=e}while(null!==t);0===Po&&(Po=5)}function bc(e,t,n){var l=xt,r=No.transition;try{No.transition=null,xt=1,function(e,t,n,l){do{yc()}while(null!==Yo);if(6&So)throw Error(a(327));n=e.finishedWork;var r=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var l=e.eventTimes;for(e=e.expirationTimes;0<n;){var r=31-st(n),a=1<<r;t[r]=0,l[r]=-1,e[r]=-1,n&=~a}}(e,s),e===Lo&&(Mo=Lo=null,zo=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||Zo||(Zo=!0,Lc(tt,function(){return yc(),null})),s=!!(15990&n.flags),15990&n.subtreeFlags||s){s=No.transition,No.transition=null;var i=xt;xt=1;var o=So;So|=4,_o.current=null,function(e,t){if(er=Vt,fl(e=pl())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var l=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(l&&0!==l.rangeCount){n=l.anchorNode;var r=l.anchorOffset,s=l.focusNode;l=l.focusOffset;try{n.nodeType,s.nodeType}catch(e){n=null;break e}var i=0,o=-1,c=-1,u=0,d=0,p=e,f=null;t:for(;;){for(var h;p!==n||0!==r&&3!==p.nodeType||(o=i+r),p!==s||0!==l&&3!==p.nodeType||(c=i+l),3===p.nodeType&&(i+=p.nodeValue.length),null!==(h=p.firstChild);)f=p,p=h;for(;;){if(p===e)break t;if(f===n&&++u===r&&(o=i),f===s&&++d===l&&(c=i),null!==(h=p.nextSibling))break;f=(p=f).parentNode}p=h}n=-1===o||-1===c?null:{start:o,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(tr={focusedElem:e,selectionRange:n},Vt=!1,Qi=t;null!==Qi;)if(e=(t=Qi).child,1028&t.subtreeFlags&&null!==e)e.return=t,Qi=e;else for(;null!==Qi;){t=Qi;try{var m=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var v=m.memoizedProps,g=m.memoizedState,w=t.stateNode,x=w.getSnapshotBeforeUpdate(t.elementType===t.type?v:ti(t.type,v),g);w.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(a(163))}}catch(e){kc(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Qi=e;break}Qi=t.return}m=Ji,Ji=!1}(e,n),mo(n,e),hl(tr),Vt=!!er,tr=er=null,e.current=n,go(n,e,r),Qe(),So=o,xt=i,No.transition=s}else e.current=n;if(Zo&&(Zo=!1,Yo=e,qo=r),0===(s=e.pendingLanes)&&(Uo=null),function(e){if(at&&"function"==typeof at.onCommitFiberRoot)try{at.onCommitFiberRoot(rt,e,void 0,!(128&~e.current.flags))}catch(e){}}(n.stateNode),nc(e,Ge()),null!==t)for(l=e.onRecoverableError,n=0;n<t.length;n++)l((r=t[n]).value,{componentStack:r.stack,digest:r.digest});if(Ho)throw Ho=!1,e=Vo,Vo=null,e;!!(1&qo)&&0!==e.tag&&yc(),1&(s=e.pendingLanes)?e===Qo?Ko++:(Ko=0,Qo=e):Ko=0,Wr()}(e,t,n,l)}finally{No.transition=r,xt=l}return null}function yc(){if(null!==Yo){var e=bt(qo),t=No.transition,n=xt;try{if(No.transition=null,xt=16>e?16:e,null===Yo)var l=!1;else{if(e=Yo,Yo=null,qo=0,6&So)throw Error(a(331));var r=So;for(So|=4,Qi=e.current;null!==Qi;){var s=Qi,i=s.child;if(16&Qi.flags){var o=s.deletions;if(null!==o){for(var c=0;c<o.length;c++){var u=o[c];for(Qi=u;null!==Qi;){var d=Qi;switch(d.tag){case 0:case 11:case 15:eo(8,d,s)}var p=d.child;if(null!==p)p.return=d,Qi=p;else for(;null!==Qi;){var f=(d=Qi).sibling,h=d.return;if(lo(d),d===u){Qi=null;break}if(null!==f){f.return=h,Qi=f;break}Qi=h}}}var m=s.alternate;if(null!==m){var v=m.child;if(null!==v){m.child=null;do{var g=v.sibling;v.sibling=null,v=g}while(null!==v)}}Qi=s}}if(2064&s.subtreeFlags&&null!==i)i.return=s,Qi=i;else e:for(;null!==Qi;){if(2048&(s=Qi).flags)switch(s.tag){case 0:case 11:case 15:eo(9,s,s.return)}var w=s.sibling;if(null!==w){w.return=s.return,Qi=w;break e}Qi=s.return}}var x=e.current;for(Qi=x;null!==Qi;){var b=(i=Qi).child;if(2064&i.subtreeFlags&&null!==b)b.return=i,Qi=b;else e:for(i=x;null!==Qi;){if(2048&(o=Qi).flags)try{switch(o.tag){case 0:case 11:case 15:to(9,o)}}catch(e){kc(o,o.return,e)}if(o===i){Qi=null;break e}var y=o.sibling;if(null!==y){y.return=o.return,Qi=y;break e}Qi=o.return}}if(So=r,Wr(),at&&"function"==typeof at.onPostCommitFiberRoot)try{at.onPostCommitFiberRoot(rt,e)}catch(e){}l=!0}return l}finally{xt=n,No.transition=t}}return!1}function jc(e,t,n){e=$a(e,t=pi(0,t=oi(n,t),1),1),t=Jo(),null!==e&&(gt(e,1,t),nc(e,t))}function kc(e,t,n){if(3===e.tag)jc(e,e,n);else for(;null!==t;){if(3===t.tag){jc(t,e,n);break}if(1===t.tag){var l=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof l.componentDidCatch&&(null===Uo||!Uo.has(l))){t=$a(t,e=fi(t,e=oi(n,e),1),1),e=Jo(),null!==t&&(gt(t,1,e),nc(t,e));break}}t=t.return}}function Cc(e,t,n){var l=e.pingCache;null!==l&&l.delete(t),t=Jo(),e.pingedLanes|=e.suspendedLanes&n,Lo===e&&(zo&n)===n&&(4===Po||3===Po&&(130023424&zo)===zo&&500>Ge()-Io?dc(e,0):Ro|=n),nc(e,t)}function _c(e,t){0===t&&(1&e.mode?(t=ut,!(130023424&(ut<<=1))&&(ut=4194304)):t=1);var n=Jo();null!==(e=Fa(e,t))&&(gt(e,t,n),nc(e,n))}function Nc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),_c(e,n)}function Sc(e,t){var n=0;switch(e.tag){case 13:var l=e.stateNode,r=e.memoizedState;null!==r&&(n=r.retryLane);break;case 19:l=e.stateNode;break;default:throw Error(a(314))}null!==l&&l.delete(t),_c(e,n)}function Lc(e,t){return Ye(e,t)}function Mc(e,t,n,l){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zc(e,t,n,l){return new Mc(e,t,n,l)}function Ec(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ac(e,t){var n=e.alternate;return null===n?((n=zc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Pc(e,t,n,l,r,s){var i=2;if(l=e,"function"==typeof e)Ec(e)&&(i=1);else if("string"==typeof e)i=5;else e:switch(e){case k:return Fc(n.children,r,s,t);case C:i=8,r|=8;break;case _:return(e=zc(12,n,t,2|r)).elementType=_,e.lanes=s,e;case M:return(e=zc(13,n,t,r)).elementType=M,e.lanes=s,e;case z:return(e=zc(19,n,t,r)).elementType=z,e.lanes=s,e;case P:return Dc(n,r,s,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case N:i=10;break e;case S:i=9;break e;case L:i=11;break e;case E:i=14;break e;case A:i=16,l=null;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=zc(i,n,t,r)).elementType=e,t.type=l,t.lanes=s,t}function Fc(e,t,n,l){return(e=zc(7,e,l,t)).lanes=n,e}function Dc(e,t,n,l){return(e=zc(22,e,l,t)).elementType=P,e.lanes=n,e.stateNode={isHidden:!1},e}function Tc(e,t,n){return(e=zc(6,e,null,t)).lanes=n,e}function Rc(e,t,n){return(t=zc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Bc(e,t,n,l,r){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=vt(0),this.expirationTimes=vt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vt(0),this.identifierPrefix=l,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function $c(e,t,n,l,r,a,s,i,o){return e=new Bc(e,t,n,i,o),1===t?(t=1,!0===a&&(t|=8)):t=0,a=zc(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:l,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ta(a),e}function Ic(e){if(!e)return Sr;e:{if(We(e=e._reactInternals)!==e||1!==e.tag)throw Error(a(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ar(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(a(171))}if(1===e.tag){var n=e.type;if(Ar(n))return Dr(e,n,t)}return t}function Oc(e,t,n,l,r,a,s,i,o){return(e=$c(n,l,!0,e,0,a,0,i,o)).context=Ic(null),n=e.current,(a=Ba(l=Jo(),r=ec(n))).callback=null!=t?t:null,$a(n,a,r),e.current.lanes=r,gt(e,r,l),nc(e,l),e}function Wc(e,t,n,l){var r=t.current,a=Jo(),s=ec(r);return n=Ic(n),null===t.context?t.context=n:t.pendingContext=n,(t=Ba(a,s)).payload={element:e},null!==(l=void 0===l?null:l)&&(t.callback=l),null!==(e=$a(r,t,s))&&(tc(e,r,s,a),Ia(e,r,s)),s}function Hc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Vc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Uc(e,t){Vc(e,t),(e=e.alternate)&&Vc(e,t)}jo=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Mr.current)wi=!0;else{if(0===(e.lanes&n)&&!(128&t.flags))return wi=!1,function(e,t,n){switch(t.tag){case 3:Li(t),fa();break;case 5:Ga(t);break;case 1:Ar(t.type)&&Tr(t);break;case 4:Ka(t,t.stateNode.containerInfo);break;case 10:var l=t.type._context,r=t.memoizedProps.value;Nr(ja,l._currentValue),l._currentValue=r;break;case 13:if(null!==(l=t.memoizedState))return null!==l.dehydrated?(Nr(Ja,1&Ja.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Di(e,t,n):(Nr(Ja,1&Ja.current),null!==(e=Wi(e,t,n))?e.sibling:null);Nr(Ja,1&Ja.current);break;case 19:if(l=0!==(n&t.childLanes),128&e.flags){if(l)return Ii(e,t,n);t.flags|=128}if(null!==(r=t.memoizedState)&&(r.rendering=null,r.tail=null,r.lastEffect=null),Nr(Ja,Ja.current),l)break;return null;case 22:case 23:return t.lanes=0,ki(e,t,n)}return Wi(e,t,n)}(e,t,n);wi=!!(131072&e.flags)}else wi=!1,ra&&1048576&t.flags&&Jr(t,Zr,t.index);switch(t.lanes=0,t.tag){case 2:var l=t.type;Oi(e,t),e=t.pendingProps;var r=Er(t,Lr.current);Ma(t,n),r=ms(null,t,l,e,r,n);var s=vs();return t.flags|=1,"object"==typeof r&&null!==r&&"function"==typeof r.render&&void 0===r.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ar(l)?(s=!0,Tr(t)):s=!1,t.memoizedState=null!==r.state&&void 0!==r.state?r.state:null,Ta(t),r.updater=li,t.stateNode=r,r._reactInternals=t,ii(t,l,e,n),t=Si(null,t,l,!0,s,n)):(t.tag=0,ra&&s&&ea(t),xi(null,t,r,n),t=t.child),t;case 16:l=t.elementType;e:{switch(Oi(e,t),e=t.pendingProps,l=(r=l._init)(l._payload),t.type=l,r=t.tag=function(e){if("function"==typeof e)return Ec(e)?1:0;if(null!=e){if((e=e.$$typeof)===L)return 11;if(e===E)return 14}return 2}(l),e=ti(l,e),r){case 0:t=_i(null,t,l,e,n);break e;case 1:t=Ni(null,t,l,e,n);break e;case 11:t=bi(null,t,l,e,n);break e;case 14:t=yi(null,t,l,ti(l.type,e),n);break e}throw Error(a(306,l,""))}return t;case 0:return l=t.type,r=t.pendingProps,_i(e,t,l,r=t.elementType===l?r:ti(l,r),n);case 1:return l=t.type,r=t.pendingProps,Ni(e,t,l,r=t.elementType===l?r:ti(l,r),n);case 3:e:{if(Li(t),null===e)throw Error(a(387));l=t.pendingProps,r=(s=t.memoizedState).element,Ra(e,t),Wa(t,l,null,n);var i=t.memoizedState;if(l=i.element,s.isDehydrated){if(s={element:l,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=s,t.memoizedState=s,256&t.flags){t=Mi(e,t,l,n,r=oi(Error(a(423)),t));break e}if(l!==r){t=Mi(e,t,l,n,r=oi(Error(a(424)),t));break e}for(la=cr(t.stateNode.containerInfo.firstChild),na=t,ra=!0,aa=null,n=ya(t,null,l,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(fa(),l===r){t=Wi(e,t,n);break e}xi(e,t,l,n)}t=t.child}return t;case 5:return Ga(t),null===e&&ca(t),l=t.type,r=t.pendingProps,s=null!==e?e.memoizedProps:null,i=r.children,nr(l,r)?i=null:null!==s&&nr(l,s)&&(t.flags|=32),Ci(e,t),xi(e,t,i,n),t.child;case 6:return null===e&&ca(t),null;case 13:return Di(e,t,n);case 4:return Ka(t,t.stateNode.containerInfo),l=t.pendingProps,null===e?t.child=ba(t,null,l,n):xi(e,t,l,n),t.child;case 11:return l=t.type,r=t.pendingProps,bi(e,t,l,r=t.elementType===l?r:ti(l,r),n);case 7:return xi(e,t,t.pendingProps,n),t.child;case 8:case 12:return xi(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(l=t.type._context,r=t.pendingProps,s=t.memoizedProps,i=r.value,Nr(ja,l._currentValue),l._currentValue=i,null!==s)if(il(s.value,i)){if(s.children===r.children&&!Mr.current){t=Wi(e,t,n);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){var o=s.dependencies;if(null!==o){i=s.child;for(var c=o.firstContext;null!==c;){if(c.context===l){if(1===s.tag){(c=Ba(-1,n&-n)).tag=2;var u=s.updateQueue;if(null!==u){var d=(u=u.shared).pending;null===d?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}s.lanes|=n,null!==(c=s.alternate)&&(c.lanes|=n),La(s.return,n,t),o.lanes|=n;break}c=c.next}}else if(10===s.tag)i=s.type===t.type?null:s.child;else if(18===s.tag){if(null===(i=s.return))throw Error(a(341));i.lanes|=n,null!==(o=i.alternate)&&(o.lanes|=n),La(i,n,t),i=s.sibling}else i=s.child;if(null!==i)i.return=s;else for(i=s;null!==i;){if(i===t){i=null;break}if(null!==(s=i.sibling)){s.return=i.return,i=s;break}i=i.return}s=i}xi(e,t,r.children,n),t=t.child}return t;case 9:return r=t.type,l=t.pendingProps.children,Ma(t,n),l=l(r=za(r)),t.flags|=1,xi(e,t,l,n),t.child;case 14:return r=ti(l=t.type,t.pendingProps),yi(e,t,l,r=ti(l.type,r),n);case 15:return ji(e,t,t.type,t.pendingProps,n);case 17:return l=t.type,r=t.pendingProps,r=t.elementType===l?r:ti(l,r),Oi(e,t),t.tag=1,Ar(l)?(e=!0,Tr(t)):e=!1,Ma(t,n),ai(t,l,r),ii(t,l,r,n),Si(null,t,l,!0,e,n);case 19:return Ii(e,t,n);case 22:return ki(e,t,n)}throw Error(a(156,t.tag))};var Zc="function"==typeof reportError?reportError:function(e){console.error(e)};function Yc(e){this._internalRoot=e}function qc(e){this._internalRoot=e}function Kc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Qc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Gc(){}function Xc(e,t,n,l,r){var a=n._reactRootContainer;if(a){var s=a;if("function"==typeof r){var i=r;r=function(){var e=Hc(s);i.call(e)}}Wc(t,s,e,r)}else s=function(e,t,n,l,r){if(r){if("function"==typeof l){var a=l;l=function(){var e=Hc(s);a.call(e)}}var s=Oc(t,l,e,0,null,!1,0,"",Gc);return e._reactRootContainer=s,e[hr]=s.current,Wl(8===e.nodeType?e.parentNode:e),cc(),s}for(;r=e.lastChild;)e.removeChild(r);if("function"==typeof l){var i=l;l=function(){var e=Hc(o);i.call(e)}}var o=$c(e,0,!1,null,0,!1,0,"",Gc);return e._reactRootContainer=o,e[hr]=o.current,Wl(8===e.nodeType?e.parentNode:e),cc(function(){Wc(t,o,n,l)}),o}(n,t,e,r,l);return Hc(s)}qc.prototype.render=Yc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(a(409));Wc(e,t,null,null)},qc.prototype.unmount=Yc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;cc(function(){Wc(null,e,null,null)}),t[hr]=null}},qc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Pt.length&&0!==t&&t<Pt[n].priority;n++);Pt.splice(n,0,e),0===n&&Rt(e)}},yt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(wt(t,1|n),nc(t,Ge()),!(6&So)&&(Oo=Ge()+500,Wr()))}break;case 13:cc(function(){var t=Fa(e,1);if(null!==t){var n=Jo();tc(t,e,1,n)}}),Uc(e,1)}},jt=function(e){if(13===e.tag){var t=Fa(e,134217728);null!==t&&tc(t,e,134217728,Jo()),Uc(e,134217728)}},kt=function(e){if(13===e.tag){var t=ec(e),n=Fa(e,t);null!==n&&tc(n,e,t,Jo()),Uc(e,t)}},Ct=function(){return xt},_t=function(e,t){var n=xt;try{return xt=e,t()}finally{xt=n}},je=function(e,t,n){switch(t){case"input":if(X(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var r=yr(l);if(!r)throw Error(a(90));Y(l),X(l,r)}}}break;case"textarea":ae(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Le=oc,Me=cc;var Jc={usingClientEntryPoint:!1,Events:[xr,br,yr,Ne,Se,oc]},eu={findFiberByHostInstance:wr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},tu={bundleType:eu.bundleType,version:eu.version,rendererPackageName:eu.rendererPackageName,rendererConfig:eu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:b.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ue(e))?null:e.stateNode},findFiberByHostInstance:eu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var nu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!nu.isDisabled&&nu.supportsFiber)try{rt=nu.inject(tu),at=nu}catch(ue){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Jc,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Kc(t))throw Error(a(200));return function(e,t,n){var l=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:j,key:null==l?null:""+l,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Kc(e))throw Error(a(299));var n=!1,l="",r=Zc;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(l=t.identifierPrefix),void 0!==t.onRecoverableError&&(r=t.onRecoverableError)),t=$c(e,1,!1,null,0,n,0,l,r),e[hr]=t.current,Wl(8===e.nodeType?e.parentNode:e),new Yc(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw e=Object.keys(e).join(","),Error(a(268,e))}return null===(e=Ue(t))?null:e.stateNode},t.flushSync=function(e){return cc(e)},t.hydrate=function(e,t,n){if(!Qc(t))throw Error(a(200));return Xc(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Kc(e))throw Error(a(405));var l=null!=n&&n.hydratedSources||null,r=!1,s="",i=Zc;if(null!=n&&(!0===n.unstable_strictMode&&(r=!0),void 0!==n.identifierPrefix&&(s=n.identifierPrefix),void 0!==n.onRecoverableError&&(i=n.onRecoverableError)),t=Oc(t,null,e,1,null!=n?n:null,r,0,s,i),e[hr]=t.current,Wl(e),l)for(e=0;e<l.length;e++)r=(r=(n=l[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,r]:t.mutableSourceEagerHydrationData.push(n,r);return new qc(t)},t.render=function(e,t,n){if(!Qc(t))throw Error(a(200));return Xc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Qc(e))throw Error(a(40));return!!e._reactRootContainer&&(cc(function(){Xc(null,null,e,!1,function(){e._reactRootContainer=null,e[hr]=null})}),!0)},t.unstable_batchedUpdates=oc,t.unstable_renderSubtreeIntoContainer=function(e,t,n,l){if(!Qc(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return Xc(e,t,n,!1,l)},t.version="18.3.1-next-f1338f8080-20240426"},5338(e,t,n){"use strict";var l=n(40961);t.H=l.createRoot,l.hydrateRoot},40961(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(22551)},84976(e,t,n){"use strict";var l,r;n.d(t,{I9:()=>g,Kd:()=>v,N_:()=>b,k2:()=>y,ok:()=>C});var a=n(96540),s=n(40961),i=n(47767),o=n(45588);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e},c.apply(this,arguments)}function u(e,t){if(null==e)return{};var n,l,r={},a=Object.keys(e);for(l=0;l<a.length;l++)n=a[l],t.indexOf(n)>=0||(r[n]=e[n]);return r}function d(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let l=e[n];return t.concat(Array.isArray(l)?l.map(e=>[n,e]):[[n,l]])},[]))}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const p=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],f=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"];try{window.__reactRouterVersion="6"}catch(e){}const h=a.createContext({isTransitioning:!1});new Map;const m=(l||(l=n.t(a,2))).startTransition;function v(e){let{basename:t,children:n,future:l,window:r}=e,s=a.useRef();null==s.current&&(s.current=(0,o.zR)({window:r,v5Compat:!0}));let c=s.current,[u,d]=a.useState({action:c.action,location:c.location}),{v7_startTransition:p}=l||{},f=a.useCallback(e=>{p&&m?m(()=>d(e)):d(e)},[d,p]);return a.useLayoutEffect(()=>c.listen(f),[c,f]),a.useEffect(()=>(0,i.V8)(l),[l]),a.createElement(i.Ix,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:c,future:l})}function g(e){let{basename:t,children:n,future:l,window:r}=e,s=a.useRef();null==s.current&&(s.current=(0,o.TM)({window:r,v5Compat:!0}));let c=s.current,[u,d]=a.useState({action:c.action,location:c.location}),{v7_startTransition:p}=l||{},f=a.useCallback(e=>{p&&m?m(()=>d(e)):d(e)},[d,p]);return a.useLayoutEffect(()=>c.listen(f),[c,f]),a.useEffect(()=>(0,i.V8)(l),[l]),a.createElement(i.Ix,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:c,future:l})}(r||(r=n.t(s,2))).flushSync,(l||(l=n.t(a,2))).useId;const w="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,x=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,b=a.forwardRef(function(e,t){let n,{onClick:l,relative:r,reloadDocument:s,replace:d,state:f,target:h,to:m,preventScrollReset:v,viewTransition:g}=e,b=u(e,p),{basename:y}=a.useContext(i.jb),j=!1;if("string"==typeof m&&x.test(m)&&(n=m,w))try{let e=new URL(window.location.href),t=m.startsWith("//")?new URL(e.protocol+m):new URL(m),n=(0,o.pb)(t.pathname,y);t.origin===e.origin&&null!=n?m=n+t.search+t.hash:j=!0}catch(e){}let k=(0,i.$P)(m,{relative:r}),C=function(e,t){let{target:n,replace:l,state:r,preventScrollReset:s,relative:c,viewTransition:u}=void 0===t?{}:t,d=(0,i.Zp)(),p=(0,i.zy)(),f=(0,i.x$)(e,{relative:c});return a.useCallback(t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==l?l:(0,o.AO)(p)===(0,o.AO)(f);d(e,{replace:n,state:r,preventScrollReset:s,relative:c,viewTransition:u})}},[p,d,f,l,r,n,e,s,c,u])}(m,{replace:d,state:f,target:h,preventScrollReset:v,relative:r,viewTransition:g});return a.createElement("a",c({},b,{href:n||k,onClick:j||s?l:function(e){l&&l(e),e.defaultPrevented||C(e)},ref:t,target:h}))}),y=a.forwardRef(function(e,t){let{"aria-current":n="page",caseSensitive:l=!1,className:r="",end:s=!1,style:d,to:p,viewTransition:m,children:v}=e,g=u(e,f),w=(0,i.x$)(p,{relative:g.relative}),x=(0,i.zy)(),y=a.useContext(i.Rq),{navigator:k,basename:C}=a.useContext(i.jb),_=null!=y&&function(e,t){void 0===t&&(t={});let n=a.useContext(h);null==n&&(0,o.Oi)(!1);let{basename:l}=function(){let e=a.useContext(i.sp);return e||(0,o.Oi)(!1),e}(j.useViewTransitionState),r=(0,i.x$)(e,{relative:t.relative});if(!n.isTransitioning)return!1;let s=(0,o.pb)(n.currentLocation.pathname,l)||n.currentLocation.pathname,c=(0,o.pb)(n.nextLocation.pathname,l)||n.nextLocation.pathname;return null!=(0,o.B6)(r.pathname,c)||null!=(0,o.B6)(r.pathname,s)}(w)&&!0===m,N=k.encodeLocation?k.encodeLocation(w).pathname:w.pathname,S=x.pathname,L=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;l||(S=S.toLowerCase(),L=L?L.toLowerCase():null,N=N.toLowerCase()),L&&C&&(L=(0,o.pb)(L,C)||L);const M="/"!==N&&N.endsWith("/")?N.length-1:N.length;let z,E=S===N||!s&&S.startsWith(N)&&"/"===S.charAt(M),A=null!=L&&(L===N||!s&&L.startsWith(N)&&"/"===L.charAt(N.length)),P={isActive:E,isPending:A,isTransitioning:_},F=E?n:void 0;z="function"==typeof r?r(P):[r,E?"active":null,A?"pending":null,_?"transitioning":null].filter(Boolean).join(" ");let D="function"==typeof d?d(P):d;return a.createElement(b,c({},g,{"aria-current":F,className:z,ref:t,style:D,to:p,viewTransition:m}),"function"==typeof v?v(P):v)});var j,k;function C(e){let t=a.useRef(d(e)),n=a.useRef(!1),l=(0,i.zy)(),r=a.useMemo(()=>function(e,t){let n=d(e);return t&&t.forEach((e,l)=>{n.has(l)||t.getAll(l).forEach(e=>{n.append(l,e)})}),n}(l.search,n.current?null:t.current),[l.search]),s=(0,i.Zp)(),o=a.useCallback((e,t)=>{const l=d("function"==typeof e?e(r):e);n.current=!0,s("?"+l,t)},[s,r]);return[r,o]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(j||(j={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(k||(k={}))},47767(e,t,n){"use strict";var l;n.d(t,{$P:()=>f,BV:()=>T,C5:()=>A,Ix:()=>D,RQ:()=>v,Rq:()=>o,V8:()=>E,Zp:()=>w,g:()=>b,jb:()=>c,qh:()=>F,sp:()=>i,sv:()=>P,x$:()=>y,zy:()=>m});var r=n(96540),a=n(45588);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e},s.apply(this,arguments)}const i=r.createContext(null),o=r.createContext(null),c=r.createContext(null),u=r.createContext(null),d=r.createContext({outlet:null,matches:[],isDataRoute:!1}),p=r.createContext(null);function f(e,t){let{relative:n}=void 0===t?{}:t;h()||(0,a.Oi)(!1);let{basename:l,navigator:s}=r.useContext(c),{hash:i,pathname:o,search:u}=y(e,{relative:n}),d=o;return"/"!==l&&(d="/"===o?l:(0,a.HS)([l,o])),s.createHref({pathname:d,search:u,hash:i})}function h(){return null!=r.useContext(u)}function m(){return h()||(0,a.Oi)(!1),r.useContext(u).location}function v(e){h()||(0,a.Oi)(!1);let{pathname:t}=m();return r.useMemo(()=>(0,a.B6)(e,(0,a.RO)(t)),[t,e])}function g(e){r.useContext(c).static||r.useLayoutEffect(e)}function w(){let{isDataRoute:e}=r.useContext(d);return e?function(){let{router:e}=function(){let e=r.useContext(i);return e||(0,a.Oi)(!1),e}(S.UseNavigateStable),t=M(L.UseNavigateStable),n=r.useRef(!1);return g(()=>{n.current=!0}),r.useCallback(function(l,r){void 0===r&&(r={}),n.current&&("number"==typeof l?e.navigate(l):e.navigate(l,s({fromRouteId:t},r)))},[e,t])}():function(){h()||(0,a.Oi)(!1);let e=r.useContext(i),{basename:t,future:n,navigator:l}=r.useContext(c),{matches:s}=r.useContext(d),{pathname:o}=m(),u=JSON.stringify((0,a.yD)(s,n.v7_relativeSplatPath)),p=r.useRef(!1);return g(()=>{p.current=!0}),r.useCallback(function(n,r){if(void 0===r&&(r={}),!p.current)return;if("number"==typeof n)return void l.go(n);let s=(0,a.Gh)(n,JSON.parse(u),o,"path"===r.relative);null==e&&"/"!==t&&(s.pathname="/"===s.pathname?t:(0,a.HS)([t,s.pathname])),(r.replace?l.replace:l.push)(s,r.state,r)},[t,l,u,o,e])}()}const x=r.createContext(null);function b(){let{matches:e}=r.useContext(d),t=e[e.length-1];return t?t.params:{}}function y(e,t){let{relative:n}=void 0===t?{}:t,{future:l}=r.useContext(c),{matches:s}=r.useContext(d),{pathname:i}=m(),o=JSON.stringify((0,a.yD)(s,l.v7_relativeSplatPath));return r.useMemo(()=>(0,a.Gh)(e,JSON.parse(o),i,"path"===n),[e,o,i,n])}function j(e,t,n,l){h()||(0,a.Oi)(!1);let{navigator:i}=r.useContext(c),{matches:o}=r.useContext(d),p=o[o.length-1],f=p?p.params:{},v=(p&&p.pathname,p?p.pathnameBase:"/");p&&p.route;let g,w=m();if(t){var x;let e="string"==typeof t?(0,a.Rr)(t):t;"/"===v||(null==(x=e.pathname)?void 0:x.startsWith(v))||(0,a.Oi)(!1),g=e}else g=w;let b=g.pathname||"/",y=b;if("/"!==v){let e=v.replace(/^\//,"").split("/");y="/"+b.replace(/^\//,"").split("/").slice(e.length).join("/")}let j=(0,a.ue)(e,{pathname:y}),k=function(e,t,n,l){var s;if(void 0===t&&(t=[]),void 0===n&&(n=null),void 0===l&&(l=null),null==e){var i;if(!n)return null;if(n.errors)e=n.matches;else{if(!(null!=(i=l)&&i.v7_partialHydration&&0===t.length&&!n.initialized&&n.matches.length>0))return null;e=n.matches}}let o=e,c=null==(s=n)?void 0:s.errors;if(null!=c){let e=o.findIndex(e=>e.route.id&&void 0!==(null==c?void 0:c[e.route.id]));e>=0||(0,a.Oi)(!1),o=o.slice(0,Math.min(o.length,e+1))}let u=!1,d=-1;if(n&&l&&l.v7_partialHydration)for(let e=0;e<o.length;e++){let t=o[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(d=e),t.route.id){let{loaderData:e,errors:l}=n,r=t.route.loader&&void 0===e[t.route.id]&&(!l||void 0===l[t.route.id]);if(t.route.lazy||r){u=!0,o=d>=0?o.slice(0,d+1):[o[0]];break}}}return o.reduceRight((e,l,a)=>{let s,i=!1,p=null,f=null;var h;n&&(s=c&&l.route.id?c[l.route.id]:void 0,p=l.route.errorElement||C,u&&(d<0&&0===a?(z[h="route-fallback"]||(z[h]=!0),i=!0,f=null):d===a&&(i=!0,f=l.route.hydrateFallbackElement||null)));let m=t.concat(o.slice(0,a+1)),v=()=>{let t;return t=s?p:i?f:l.route.Component?r.createElement(l.route.Component,null):l.route.element?l.route.element:e,r.createElement(N,{match:l,routeContext:{outlet:e,matches:m,isDataRoute:null!=n},children:t})};return n&&(l.route.ErrorBoundary||l.route.errorElement||0===a)?r.createElement(_,{location:n.location,revalidation:n.revalidation,component:p,error:s,children:v(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):v()},null)}(j&&j.map(e=>Object.assign({},e,{params:Object.assign({},f,e.params),pathname:(0,a.HS)([v,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?v:(0,a.HS)([v,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),o,n,l);return t&&k?r.createElement(u.Provider,{value:{location:s({pathname:"/",search:"",hash:"",state:null,key:"default"},g),navigationType:a.rc.Pop}},k):k}function k(){let e=function(){var e;let t=r.useContext(p),n=function(){let e=r.useContext(o);return e||(0,a.Oi)(!1),e}(L.UseRouteError),l=M(L.UseRouteError);return void 0!==t?t:null==(e=n.errors)?void 0:e[l]}(),t=(0,a.pX)(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return r.createElement(r.Fragment,null,r.createElement("h2",null,"Unexpected Application Error!"),r.createElement("h3",{style:{fontStyle:"italic"}},t),n?r.createElement("pre",{style:l},n):null,null)}const C=r.createElement(k,null);class _ extends r.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?r.createElement(d.Provider,{value:this.props.routeContext},r.createElement(p.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function N(e){let{routeContext:t,match:n,children:l}=e,a=r.useContext(i);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),r.createElement(d.Provider,{value:t},l)}var S=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(S||{}),L=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(L||{});function M(e){let t=function(){let e=r.useContext(d);return e||(0,a.Oi)(!1),e}(),n=t.matches[t.matches.length-1];return n.route.id||(0,a.Oi)(!1),n.route.id}const z={};function E(e,t){null==e||e.v7_startTransition,void 0===(null==e?void 0:e.v7_relativeSplatPath)&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}function A(e){let{to:t,replace:n,state:l,relative:s}=e;h()||(0,a.Oi)(!1);let{future:i,static:o}=r.useContext(c),{matches:u}=r.useContext(d),{pathname:p}=m(),f=w(),v=(0,a.Gh)(t,(0,a.yD)(u,i.v7_relativeSplatPath),p,"path"===s),g=JSON.stringify(v);return r.useEffect(()=>f(JSON.parse(g),{replace:n,state:l,relative:s}),[f,g,s,n,l]),null}function P(e){return function(e){let t=r.useContext(d).outlet;return t?r.createElement(x.Provider,{value:e},t):t}(e.context)}function F(e){(0,a.Oi)(!1)}function D(e){let{basename:t="/",children:n=null,location:l,navigationType:i=a.rc.Pop,navigator:o,static:d=!1,future:p}=e;h()&&(0,a.Oi)(!1);let f=t.replace(/^\/*/,"/"),m=r.useMemo(()=>({basename:f,navigator:o,static:d,future:s({v7_relativeSplatPath:!1},p)}),[f,p,o,d]);"string"==typeof l&&(l=(0,a.Rr)(l));let{pathname:v="/",search:g="",hash:w="",state:x=null,key:b="default"}=l,y=r.useMemo(()=>{let e=(0,a.pb)(v,f);return null==e?null:{location:{pathname:e,search:g,hash:w,state:x,key:b},navigationType:i}},[f,v,g,w,x,b,i]);return null==y?null:r.createElement(c.Provider,{value:m},r.createElement(u.Provider,{children:n,value:y}))}function T(e){let{children:t,location:n}=e;return j(R(t),n)}function R(e,t){void 0===t&&(t=[]);let n=[];return r.Children.forEach(e,(e,l)=>{if(!r.isValidElement(e))return;let s=[...t,l];if(e.type===r.Fragment)return void n.push.apply(n,R(e.props.children,s));e.type!==F&&(0,a.Oi)(!1),e.props.index&&e.props.children&&(0,a.Oi)(!1);let i={id:e.props.id||s.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(i.children=R(e.props.children,s)),n.push(i)}),n}(l||(l=n.t(r,2))).startTransition,new Promise(()=>{}),r.Component},21020(e,t,n){"use strict";var l=n(96540),r=Symbol.for("react.element"),a=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,i=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var l,a={},c=null,u=null;for(l in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,l)&&!o.hasOwnProperty(l)&&(a[l]=t[l]);if(e&&e.defaultProps)for(l in t=e.defaultProps)void 0===a[l]&&(a[l]=t[l]);return{$$typeof:r,type:e,key:c,ref:u,props:a,_owner:i.current}}t.Fragment=a,t.jsx=c,t.jsxs=c},15287(e,t){"use strict";var n=Symbol.for("react.element"),l=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),o=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.iterator,h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,v={};function g(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||h}function w(){}function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||h}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},w.prototype=g.prototype;var b=x.prototype=new w;b.constructor=x,m(b,g.prototype),b.isPureReactComponent=!0;var y=Array.isArray,j=Object.prototype.hasOwnProperty,k={current:null},C={key:!0,ref:!0,__self:!0,__source:!0};function _(e,t,l){var r,a={},s=null,i=null;if(null!=t)for(r in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(s=""+t.key),t)j.call(t,r)&&!C.hasOwnProperty(r)&&(a[r]=t[r]);var o=arguments.length-2;if(1===o)a.children=l;else if(1<o){for(var c=Array(o),u=0;u<o;u++)c[u]=arguments[u+2];a.children=c}if(e&&e.defaultProps)for(r in o=e.defaultProps)void 0===a[r]&&(a[r]=o[r]);return{$$typeof:n,type:e,key:s,ref:i,props:a,_owner:k.current}}function N(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var S=/\/+/g;function L(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function M(e,t,r,a,s){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var o=!1;if(null===e)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case n:case l:o=!0}}if(o)return s=s(o=e),e=""===a?"."+L(o,0):a,y(s)?(r="",null!=e&&(r=e.replace(S,"$&/")+"/"),M(s,t,r,"",function(e){return e})):null!=s&&(N(s)&&(s=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(s,r+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(S,"$&/")+"/")+e)),t.push(s)),1;if(o=0,a=""===a?".":a+":",y(e))for(var c=0;c<e.length;c++){var u=a+L(i=e[c],c);o+=M(i,t,r,u,s)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=f&&e[f]||e["@@iterator"])?e:null}(e),"function"==typeof u)for(e=u.call(e),c=0;!(i=e.next()).done;)o+=M(i=i.value,t,r,u=a+L(i,c++),s);else if("object"===i)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function z(e,t,n){if(null==e)return e;var l=[],r=0;return M(e,l,"","",function(e){return t.call(n,e,r++)}),l}function E(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var A={current:null},P={transition:null},F={ReactCurrentDispatcher:A,ReactCurrentBatchConfig:P,ReactCurrentOwner:k};function D(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:z,forEach:function(e,t,n){z(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return z(e,function(){t++}),t},toArray:function(e){return z(e,function(e){return e})||[]},only:function(e){if(!N(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=g,t.Fragment=r,t.Profiler=s,t.PureComponent=x,t.StrictMode=a,t.Suspense=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=F,t.act=D,t.cloneElement=function(e,t,l){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=m({},e.props),a=e.key,s=e.ref,i=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,i=k.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(c in t)j.call(t,c)&&!C.hasOwnProperty(c)&&(r[c]=void 0===t[c]&&void 0!==o?o[c]:t[c])}var c=arguments.length-2;if(1===c)r.children=l;else if(1<c){o=Array(c);for(var u=0;u<c;u++)o[u]=arguments[u+2];r.children=o}return{$$typeof:n,type:e.type,key:a,ref:s,props:r,_owner:i}},t.createContext=function(e){return(e={$$typeof:o,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:i,_context:e},e.Consumer=e},t.createElement=_,t.createFactory=function(e){var t=_.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=N,t.lazy=function(e){return{$$typeof:p,_payload:{_status:-1,_result:e},_init:E}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=P.transition;P.transition={};try{e()}finally{P.transition=t}},t.unstable_act=D,t.useCallback=function(e,t){return A.current.useCallback(e,t)},t.useContext=function(e){return A.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return A.current.useDeferredValue(e)},t.useEffect=function(e,t){return A.current.useEffect(e,t)},t.useId=function(){return A.current.useId()},t.useImperativeHandle=function(e,t,n){return A.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return A.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return A.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return A.current.useMemo(e,t)},t.useReducer=function(e,t,n){return A.current.useReducer(e,t,n)},t.useRef=function(e){return A.current.useRef(e)},t.useState=function(e){return A.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return A.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return A.current.useTransition()},t.version="18.3.1"},96540(e,t,n){"use strict";e.exports=n(15287)},74848(e,t,n){"use strict";e.exports=n(21020)},7463(e,t){"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var l=n-1>>>1,r=e[l];if(!(0<a(r,t)))break e;e[l]=t,e[n]=r,n=l}}function l(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var l=0,r=e.length,s=r>>>1;l<s;){var i=2*(l+1)-1,o=e[i],c=i+1,u=e[c];if(0>a(o,n))c<r&&0>a(u,o)?(e[l]=u,e[c]=n,l=c):(e[l]=o,e[i]=n,l=i);else{if(!(c<r&&0>a(u,n)))break e;e[l]=u,e[c]=n,l=c}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var i=Date,o=i.now();t.unstable_now=function(){return i.now()-o}}var c=[],u=[],d=1,p=null,f=3,h=!1,m=!1,v=!1,g="function"==typeof setTimeout?setTimeout:null,w="function"==typeof clearTimeout?clearTimeout:null,x="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var t=l(u);null!==t;){if(null===t.callback)r(u);else{if(!(t.startTime<=e))break;r(u),t.sortIndex=t.expirationTime,n(c,t)}t=l(u)}}function y(e){if(v=!1,b(e),!m)if(null!==l(c))m=!0,P(j);else{var t=l(u);null!==t&&F(y,t.startTime-e)}}function j(e,n){m=!1,v&&(v=!1,w(N),N=-1),h=!0;var a=f;try{for(b(n),p=l(c);null!==p&&(!(p.expirationTime>n)||e&&!M());){var s=p.callback;if("function"==typeof s){p.callback=null,f=p.priorityLevel;var i=s(p.expirationTime<=n);n=t.unstable_now(),"function"==typeof i?p.callback=i:p===l(c)&&r(c),b(n)}else r(c);p=l(c)}if(null!==p)var o=!0;else{var d=l(u);null!==d&&F(y,d.startTime-n),o=!1}return o}finally{p=null,f=a,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k,C=!1,_=null,N=-1,S=5,L=-1;function M(){return!(t.unstable_now()-L<S)}function z(){if(null!==_){var e=t.unstable_now();L=e;var n=!0;try{n=_(!0,e)}finally{n?k():(C=!1,_=null)}}else C=!1}if("function"==typeof x)k=function(){x(z)};else if("undefined"!=typeof MessageChannel){var E=new MessageChannel,A=E.port2;E.port1.onmessage=z,k=function(){A.postMessage(null)}}else k=function(){g(z,0)};function P(e){_=e,C||(C=!0,k())}function F(e,n){N=g(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||h||(m=!0,P(j))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):S=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return l(c)},t.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},t.unstable_scheduleCallback=function(e,r,a){var s=t.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?s+a:s,e){case 1:var i=-1;break;case 2:i=250;break;case 5:i=1073741823;break;case 4:i=1e4;break;default:i=5e3}return e={id:d++,callback:r,priorityLevel:e,startTime:a,expirationTime:i=a+i,sortIndex:-1},a>s?(e.sortIndex=a,n(u,e),null===l(c)&&e===l(u)&&(v?(w(N),N=-1):v=!0,F(y,a-s))):(e.sortIndex=i,n(c,e),m||h||(m=!0,P(j))),e},t.unstable_shouldYield=M,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},69982(e,t,n){"use strict";e.exports=n(7463)},93729(e,t,n){"use strict";var l,r,a,s;n.d(t,{A:()=>c}),l={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},r=["(","?"],a={")":["("],":":["?","?:"]},s=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var i={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};var o={contextDelimiter:"",onMissingKey:null};function c(e,t){var n;for(n in this.data=e,this.pluralForms={},this.options={},o)this.options[n]=void 0!==t&&n in t?t[n]:o[n]}c.prototype.getPluralForm=function(e,t){var n,o,c,u,d=this.pluralForms[e];return d||("function"!=typeof(c=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(o=function(e){var t,n,l;for(t=e.split(";"),n=0;n<t.length;n++)if(0===(l=t[n].trim()).indexOf("plural="))return l.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),u=function(e){var t=function(e){for(var t,n,i,o,c=[],u=[];t=e.match(s);){for(n=t[0],(i=e.substr(0,t.index).trim())&&c.push(i);o=u.pop();){if(a[n]){if(a[n][0]===o){n=a[n][1]||n;break}}else if(r.indexOf(o)>=0||l[o]<l[n]){u.push(o);break}c.push(o)}a[n]||u.push(n),e=e.substr(t.index+n.length)}return(e=e.trim())&&c.push(e),c.concat(u.reverse())}(e);return function(e){return function(e,t){var n,l,r,a,s,o,c=[];for(n=0;n<e.length;n++){if(s=e[n],a=i[s]){for(l=a.length,r=Array(l);l--;)r[l]=c.pop();try{o=a.apply(null,r)}catch(e){return e}}else o=t.hasOwnProperty(s)?t[s]:+s;c.push(o)}return c[0]}(t,e)}}(o),c=function(e){return+u({n:e})}),d=this.pluralForms[e]=c),d(t)},c.prototype.dcnpgettext=function(e,t,n,l,r){var a,s,i;return a=void 0===r?0:this.getPluralForm(e,r),s=n,t&&(s=t+this.options.contextDelimiter+n),(i=this.data[e][s])&&i[a]?i[a]:(this.options.onMissingKey&&this.options.onMissingKey(n,e),0===a?n:l)}},33718(e,t,n){"use strict";n.d(t,{A:()=>oe});var l=n(93729),r={plural_forms:e=>1===e?0:1},a=/^i18n\.(n?gettext|has_translation)(_|$)/,s=function(e){return"string"!=typeof e||""===e?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)},i=function(e){return"string"!=typeof e||""===e?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)},o=function(e,t){return function(n,l,r,a=10){const o=e[t];if(!i(n))return;if(!s(l))return;if("function"!=typeof r)return void console.error("The hook callback must be a function.");if("number"!=typeof a)return void console.error("If specified, the hook priority must be a number.");const c={callback:r,priority:a,namespace:l};if(o[n]){const e=o[n].handlers;let t;for(t=e.length;t>0&&!(a>=e[t-1].priority);t--);t===e.length?e[t]=c:e.splice(t,0,c),o.__current.forEach(e=>{e.name===n&&e.currentIndex>=t&&e.currentIndex++})}else o[n]={handlers:[c],runs:0};"hookAdded"!==n&&e.doAction("hookAdded",n,l,r,a)}},c=function(e,t,n=!1){return function(l,r){const a=e[t];if(!i(l))return;if(!n&&!s(r))return;if(!a[l])return 0;let o=0;if(n)o=a[l].handlers.length,a[l]={runs:a[l].runs,handlers:[]};else{const e=a[l].handlers;for(let t=e.length-1;t>=0;t--)e[t].namespace===r&&(e.splice(t,1),o++,a.__current.forEach(e=>{e.name===l&&e.currentIndex>=t&&e.currentIndex--}))}return"hookRemoved"!==l&&e.doAction("hookRemoved",l,r),o}},u=function(e,t){return function(n,l){const r=e[t];return void 0!==l?n in r&&r[n].handlers.some(e=>e.namespace===l):n in r}},d=function(e,t,n,l){return function(r,...a){const s=e[t];s[r]||(s[r]={handlers:[],runs:0}),s[r].runs++;const i=s[r].handlers;if(!i||!i.length)return n?a[0]:void 0;const o={name:r,currentIndex:0};return(l?async function(){try{s.__current.add(o);let e=n?a[0]:void 0;for(;o.currentIndex<i.length;){const t=i[o.currentIndex];e=await t.callback.apply(null,a),n&&(a[0]=e),o.currentIndex++}return n?e:void 0}finally{s.__current.delete(o)}}:function(){try{s.__current.add(o);let e=n?a[0]:void 0;for(;o.currentIndex<i.length;)e=i[o.currentIndex].callback.apply(null,a),n&&(a[0]=e),o.currentIndex++;return n?e:void 0}finally{s.__current.delete(o)}})()}},p=function(e,t){return function(){const n=e[t],l=Array.from(n.__current);return l.at(-1)?.name??null}},f=function(e,t){return function(n){const l=e[t];return void 0===n?l.__current.size>0:Array.from(l.__current).some(e=>e.name===n)}},h=function(e,t){return function(n){const l=e[t];if(i(n))return l[n]&&l[n].runs?l[n].runs:0}},m=new class{actions;filters;addAction;addFilter;removeAction;removeFilter;hasAction;hasFilter;removeAllActions;removeAllFilters;doAction;doActionAsync;applyFilters;applyFiltersAsync;currentAction;currentFilter;doingAction;doingFilter;didAction;didFilter;constructor(){this.actions=Object.create(null),this.actions.__current=new Set,this.filters=Object.create(null),this.filters.__current=new Set,this.addAction=o(this,"actions"),this.addFilter=o(this,"filters"),this.removeAction=c(this,"actions"),this.removeFilter=c(this,"filters"),this.hasAction=u(this,"actions"),this.hasFilter=u(this,"filters"),this.removeAllActions=c(this,"actions",!0),this.removeAllFilters=c(this,"filters",!0),this.doAction=d(this,"actions",!1,!1),this.doActionAsync=d(this,"actions",!1,!0),this.applyFilters=d(this,"filters",!0,!1),this.applyFiltersAsync=d(this,"filters",!0,!0),this.currentAction=p(this,"actions"),this.currentFilter=p(this,"filters"),this.doingAction=f(this,"actions"),this.doingFilter=f(this,"filters"),this.didAction=h(this,"actions"),this.didFilter=h(this,"filters")}},{addAction:v,addFilter:g,removeAction:w,removeFilter:x,hasAction:b,hasFilter:y,removeAllActions:j,removeAllFilters:k,doAction:C,doActionAsync:_,applyFilters:N,applyFiltersAsync:S,currentAction:L,currentFilter:M,doingAction:z,doingFilter:E,didAction:A,didFilter:P,actions:F,filters:D}=m,T=((e,t,n)=>{const s=new l.A({}),i=new Set,o=()=>{i.forEach(e=>e())},c=(e,t="default")=>{s.data[t]={...s.data[t],...e},s.data[t][""]={...r,...s.data[t]?.[""]},delete s.pluralForms[t]},u=(e,t)=>{c(e,t),o()},d=(e="default",t,n,l,r)=>(s.data[e]||c(void 0,e),s.dcnpgettext(e,t,n,l,r)),p=e=>e||"default",f=(e,t,l)=>{let r=d(l,t,e);return n?(r=n.applyFilters("i18n.gettext_with_context",r,e,t,l),n.applyFilters("i18n.gettext_with_context_"+p(l),r,e,t,l)):r};if(n){const e=e=>{a.test(e)&&o()};n.addAction("hookAdded","core/i18n",e),n.addAction("hookRemoved","core/i18n",e)}return{getLocaleData:(e="default")=>s.data[e],setLocaleData:u,addLocaleData:(e,t="default")=>{s.data[t]={...s.data[t],...e,"":{...r,...s.data[t]?.[""],...e?.[""]}},delete s.pluralForms[t],o()},resetLocaleData:(e,t)=>{s.data={},s.pluralForms={},u(e,t)},subscribe:e=>(i.add(e),()=>i.delete(e)),__:(e,t)=>{let l=d(t,void 0,e);return n?(l=n.applyFilters("i18n.gettext",l,e,t),n.applyFilters("i18n.gettext_"+p(t),l,e,t)):l},_x:f,_n:(e,t,l,r)=>{let a=d(r,void 0,e,t,l);return n?(a=n.applyFilters("i18n.ngettext",a,e,t,l,r),n.applyFilters("i18n.ngettext_"+p(r),a,e,t,l,r)):a},_nx:(e,t,l,r,a)=>{let s=d(a,r,e,t,l);return n?(s=n.applyFilters("i18n.ngettext_with_context",s,e,t,l,r,a),n.applyFilters("i18n.ngettext_with_context_"+p(a),s,e,t,l,r,a)):s},isRTL:()=>"rtl"===f("ltr","text direction"),hasTranslation:(e,t,l)=>{const r=t?t+""+e:e;let a=!!s.data?.[l??"default"]?.[r];return n&&(a=n.applyFilters("i18n.has_translation",a,e,t,l),a=n.applyFilters("i18n.has_translation_"+p(l),a,e,t,l)),a}}})(0,0,m),R=(T.getLocaleData.bind(T),T.setLocaleData.bind(T),T.resetLocaleData.bind(T),T.subscribe.bind(T),T.__.bind(T));T._x.bind(T),T._n.bind(T),T._nx.bind(T),T.isRTL.bind(T),T.hasTranslation.bind(T);var B=(e,t)=>{let n,l,r=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(n=e.namespace.replace(/^\/|\/$/g,""),l=e.endpoint.replace(/^\//,""),r=l?n+"/"+l:n),delete e.namespace,delete e.endpoint,t({...e,path:r})};function $(e){const t=e.split("?"),n=t[1],l=t[0];return n?l+"?"+n.split("&").map(e=>e.split("=")).map(e=>e.map(decodeURIComponent)).sort((e,t)=>e[0].localeCompare(t[0])).map(e=>e.map(encodeURIComponent)).map(e=>e.join("=")).join("&"):l}function I(e){try{return decodeURIComponent(e)}catch{return e}}function O(e){return(function(e){let t;try{t=new URL(e,"http://example.com").search.substring(1)}catch{}if(t)return t}(e)||"").replace(/\+/g,"%20").split("&").reduce((e,t)=>{const[n,l=""]=t.split("=").filter(Boolean).map(I);return n&&function(e,t,n){const l=t.length,r=l-1;for(let a=0;a<l;a++){let l=t[a];!l&&Array.isArray(e)&&(l=e.length.toString()),l=["__proto__","constructor","prototype"].includes(l)?l.toUpperCase():l;const s=!isNaN(Number(t[a+1]));e[l]=a===r?n:e[l]||(s?[]:{}),Array.isArray(e[l])&&!s&&(e[l]={...e[l]}),e=e[l]}}(e,n.replace(/\]/g,"").split("["),l),e},Object.create(null))}function W(e){let t="";const n=Object.entries(e);let l;for(;l=n.shift();){let[e,r]=l;if(Array.isArray(r)||r&&r.constructor===Object){const t=Object.entries(r).reverse();for(const[l,r]of t)n.unshift([`${e}[${l}]`,r])}else void 0!==r&&(null===r&&(r=""),t+="&"+[e,String(r)].map(encodeURIComponent).join("="))}return t.substr(1)}function H(e="",t){if(!t||!Object.keys(t).length)return e;const n=function(e){const t=/^\S+?(#[^\s\?]*)/.exec(e);if(t)return t[1]}(e)||"";let l=e.replace(n,"");const r=e.indexOf("?");return-1!==r&&(t=Object.assign(O(e),t),l=l.substr(0,r)),l+"?"+W(t)+n}function V(e,t){if(t)return Promise.resolve(e.body);try{return Promise.resolve(new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}catch{return Object.entries(e.headers).forEach(([t,n])=>{"link"===t.toLowerCase()&&(e.headers[t]=n.replace(/<([^>]+)>/,(e,t)=>`<${encodeURI(t)}>`))}),Promise.resolve(t?e.body:new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}}var U=({path:e,url:t,...n},l)=>({...n,url:t&&H(t,l),path:e&&H(e,l)}),Z=e=>e.json?e.json():Promise.reject(e),Y=e=>{const{next:t}=(e=>{if(!e)return{};const t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}})(e.headers.get("link"));return t},q=async(e,t)=>{if(!1===e.parse)return t(e);if(!(e=>{const t=!!e.path&&-1!==e.path.indexOf("per_page=-1"),n=!!e.url&&-1!==e.url.indexOf("per_page=-1");return t||n})(e))return t(e);const n=await oe({...U(e,{per_page:100}),parse:!1}),l=await Z(n);if(!Array.isArray(l))return l;let r=Y(n);if(!r)return l;let a=[].concat(l);for(;r;){const t=await oe({...e,path:void 0,url:r,parse:!1}),n=await Z(t);a=a.concat(n),r=Y(t)}return a},K=new Set(["PATCH","PUT","DELETE"]),Q="GET";function G(e,t){return O(e)[t]}function X(e,t){return void 0!==G(e,t)}async function J(e){try{return await e.json()}catch{throw{code:"invalid_json",message:R("The response is not a valid JSON response.")}}}async function ee(e,t=!0){return t?204===e.status?null:await J(e):e}async function te(e,t=!0){if(!t)throw e;throw await J(e)}function ne(e,...t){const n=e.replace(/^[^#]*/,""),l=(e=e.replace(/#.*/,"")).indexOf("?");if(-1===l)return e+n;const r=O(e),a=e.substr(0,l);t.forEach(e=>delete r[e]);const s=W(r);return(s?a+"?"+s:a)+n}var le={Accept:"application/json, */*;q=0.1"},re={credentials:"include"},ae=[(e,t)=>("string"!=typeof e.url||X(e.url,"_locale")||(e.url=H(e.url,{_locale:"user"})),"string"!=typeof e.path||X(e.path,"_locale")||(e.path=H(e.path,{_locale:"user"})),t(e)),B,(e,t)=>{const{method:n=Q}=e;return K.has(n.toUpperCase())&&(e={...e,headers:{"Content-Type":"application/json",...e.headers,"X-HTTP-Method-Override":n},method:"POST"}),t(e)},q],se=e=>{const{url:t,path:n,data:l,parse:r=!0,...a}=e;let{body:s,headers:i}=e;return i={...le,...i},l&&(s=JSON.stringify(l),i["Content-Type"]="application/json"),globalThis.fetch(t||n||window.location.href,{...re,...a,body:s,headers:i}).then(e=>e.ok?ee(e,r):te(e,r),e=>{if(e&&"AbortError"===e.name)throw e;if(!globalThis.navigator.onLine)throw{code:"offline_error",message:R("Unable to connect. Please check your Internet connection.")};throw{code:"fetch_error",message:R("Could not get a valid response from the server.")}})},ie=e=>ae.reduceRight((e,t)=>n=>t(n,e),se)(e).catch(t=>"rest_cookie_invalid_nonce"!==t.code?Promise.reject(t):globalThis.fetch(ie.nonceEndpoint).then(e=>e.ok?e.text():Promise.reject(t)).then(t=>(ie.nonceMiddleware.nonce=t,ie(e))));ie.use=function(e){ae.unshift(e)},ie.setFetchHandler=function(e){se=e},ie.createNonceMiddleware=function(e){const t=(e,n)=>{const{headers:l={}}=e;for(const r in l)if("x-wp-nonce"===r.toLowerCase()&&l[r]===t.nonce)return n(e);return n({...e,headers:{...l,"X-WP-Nonce":t.nonce}})};return t.nonce=e,t},ie.createPreloadingMiddleware=function(e){const t=Object.fromEntries(Object.entries(e).map(([e,t])=>[$(e),t]));return(e,n)=>{const{parse:l=!0}=e;let r=e.path;if(!r&&e.url){const{rest_route:t,...n}=O(e.url);"string"==typeof t&&(r=H(t,n))}if("string"!=typeof r)return n(e);const a=e.method||"GET",s=$(r);if("GET"===a&&t[s]){const e=t[s];return delete t[s],V(e,!!l)}if("OPTIONS"===a&&t[a]&&t[a][s]){const e=t[a][s];return delete t[a][s],V(e,!!l)}return n(e)}},ie.createRootURLMiddleware=e=>(t,n)=>B(t,t=>{let l,r=t.url,a=t.path;return"string"==typeof a&&(l=e,-1!==e.indexOf("?")&&(a=a.replace("?","&")),a=a.replace(/^\//,""),"string"==typeof l&&-1!==l.indexOf("?")&&(a=a.replace("?","&")),r=l+a),n({...t,url:r})}),ie.fetchAllMiddleware=q,ie.mediaUploadMiddleware=(e,t)=>{if(!function(e){const t=!!e.method&&"POST"===e.method;return(!!e.path&&-1!==e.path.indexOf("/wp/v2/media")||!!e.url&&-1!==e.url.indexOf("/wp/v2/media"))&&t}(e))return t(e);let n=0;const l=e=>(n++,t({path:`/wp/v2/media/${e}/post-process`,method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch(()=>n<5?l(e):(t({path:`/wp/v2/media/${e}?force=true`,method:"DELETE"}),Promise.reject())));return t({...e,parse:!1}).catch(t=>{if(!(t instanceof globalThis.Response))return Promise.reject(t);const n=t.headers.get("x-wp-upload-attachment-id");return t.status>=500&&t.status<600&&n?l(n).catch(()=>!1!==e.parse?Promise.reject({code:"post_process",message:R("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(t)):te(t,e.parse)}).then(t=>ee(t,e.parse))},ie.createThemePreviewMiddleware=e=>(t,n)=>{if("string"==typeof t.url){const n=G(t.url,"wp_theme_preview");void 0===n?t.url=H(t.url,{wp_theme_preview:e}):""===n&&(t.url=ne(t.url,"wp_theme_preview"))}if("string"==typeof t.path){const n=G(t.path,"wp_theme_preview");void 0===n?t.path=H(t.path,{wp_theme_preview:e}):""===n&&(t.path=ne(t.path,"wp_theme_preview"))}return n(t)};var oe=ie}},e=>{var t=e(e.s=19792);(wpfunnels=void 0===wpfunnels?{}:wpfunnels)["[modulename]"]=t}]);