@billgangcom/theme-lib 1.124.7 → 1.125.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{builder-BGSGUvbw.js → builder-BK0JYGiC.js} +1186 -1170
- package/dist/builder-DG_YlZHR.cjs +43 -0
- package/dist/{builder-components-Ce-GvvbU.cjs → builder-components-CPKR2dhR.cjs} +2 -2
- package/dist/{builder-components-uIH6kfbb.js → builder-components-g5oMQefu.js} +293 -287
- package/dist/builder.cjs.js +1 -1
- package/dist/builder.es.js +23 -23
- package/dist/{charge-BlJi0xCO.js → charge-CV4AQEC_.js} +3405 -3407
- package/dist/{charge-w4kIp324.cjs → charge-CYaXl_RD.cjs} +38 -38
- package/dist/{checkout-B32zo5ao.js → checkout-B9qJmekA.js} +5 -5
- package/dist/{checkout-CtUeXuTx.cjs → checkout-Bb1a58D4.cjs} +1 -1
- package/dist/exports.cjs.js +1 -1
- package/dist/exports.es.js +6 -6
- package/dist/{index-CoCTJ62P.js → index-B4NVLzvB.js} +5 -5
- package/dist/{index-BNJDqT-0.js → index-BhSez1jo.js} +5 -5
- package/dist/{index-fnVhuwC_.cjs → index-C01pM2yU.cjs} +1 -1
- package/dist/{index-BRdmeZZl.cjs → index-CbF_oFj_.cjs} +1 -1
- package/dist/{index-TvJTXZf9.js → index-Cc--vowQ.js} +1 -1
- package/dist/{index-BTyOlaxG.cjs → index-DDxrB9fg.cjs} +1 -1
- package/dist/{index-BuxbXdLp.js → index-DVBnv_Xy.js} +5 -5
- package/dist/{index-DAKSB_F0.js → index-DkwoNeqf.js} +2 -2
- package/dist/{index-z_-C0z77.js → index-DmDPPcot.js} +5 -5
- package/dist/{index-B3eXZddH.cjs → index-EY0xBilX.cjs} +1 -1
- package/dist/{index-SyO84kfM.cjs → index-oTiFfxGm.cjs} +1 -1
- package/dist/{index-RtcNex9r.cjs → index-pDrfjE_u.cjs} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +6 -6
- package/dist/{order-Amk-Jg5s.cjs → order-D5jY3dbd.cjs} +1 -1
- package/dist/{order-Nvdr1Xpq.js → order-Dzc05Ain.js} +5 -5
- package/dist/src/abstractions/PageContext.d.ts +1 -0
- package/dist/src/builder/api/fetchData.d.ts +3 -4
- package/dist/{subscription-BtN0ZLhW.js → subscription-BMypjr4e.js} +5 -5
- package/dist/{subscription-Dke5SI7x.cjs → subscription-DbBXmikF.cjs} +1 -1
- package/dist/{ticket-DR1de6DJ.js → ticket-DE_zreWv.js} +9 -7
- package/dist/{ticket-DpkxSuxR.cjs → ticket-xoHN8vwB.cjs} +3 -3
- package/dist/{top-up-Cma1nW3z.cjs → top-up-CZnSdOQk.cjs} +1 -1
- package/dist/{top-up-D2COqVbe.js → top-up-DaJ8rpm3.js} +5 -5
- package/dist/{ui-components-CaI7HLsm.cjs → ui-components-1V4PUnGv.cjs} +1 -1
- package/dist/{ui-components-BQyCaYte.js → ui-components-BQc66P4w.js} +4 -4
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +1 -1
- package/dist/{validation-CYN2gbtD.cjs → validation-D5oSu3j3.cjs} +1 -1
- package/dist/{validation-BBKKW104.js → validation-DznfDY3X.js} +5 -5
- package/package.json +1 -1
- package/dist/builder-BoZFTb7G.cjs +0 -43
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";const we=require("react"),$a=require("react-dom"),k=require("react/jsx-runtime"),je=require("./ui-components-CaI7HLsm.cjs");require("./charge-w4kIp324.cjs");const Ft=require("./builder-components-Ce-GvvbU.cjs");require("./ticket-DpkxSuxR.cjs");function Mo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const y=Mo(we),za=Mo($a);/**
|
|
2
|
-
* @remix-run/router v1.23.0
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) Remix Software Inc.
|
|
5
|
-
*
|
|
6
|
-
* This source code is licensed under the MIT license found in the
|
|
7
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
8
|
-
*
|
|
9
|
-
* @license MIT
|
|
10
|
-
*/function fe(){return fe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fe.apply(this,arguments)}var ve;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ve||(ve={}));const Wr="popstate";function Ja(e){e===void 0&&(e={});function t(r,o){let{pathname:a,search:i,hash:s}=r.location;return qt("",{pathname:a,search:i,hash:s},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:ct(o)}return qa(t,n,null,e)}function I(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Se(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Wa(){return Math.random().toString(36).substr(2,8)}function qr(e,t){return{usr:e.state,key:e.key,idx:t}}function qt(e,t,n,r){return n===void 0&&(n=null),fe({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?dt(t):t,{state:n,key:t&&t.key||r||Wa()})}function ct(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function dt(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function qa(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:a=!1}=r,i=o.history,s=ve.Pop,l=null,c=u();c==null&&(c=0,i.replaceState(fe({},i.state,{idx:c}),""));function u(){return(i.state||{idx:null}).idx}function d(){s=ve.Pop;let v=u(),L=v==null?null:v-c;c=v,l&&l({action:s,location:p.location,delta:L})}function h(v,L){s=ve.Push;let b=qt(p.location,v,L);c=u()+1;let R=qr(b,c),P=p.createHref(b);try{i.pushState(R,"",P)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;o.location.assign(P)}a&&l&&l({action:s,location:p.location,delta:1})}function w(v,L){s=ve.Replace;let b=qt(p.location,v,L);c=u();let R=qr(b,c),P=p.createHref(b);i.replaceState(R,"",P),a&&l&&l({action:s,location:p.location,delta:0})}function m(v){let L=o.location.origin!=="null"?o.location.origin:o.location.href,b=typeof v=="string"?v:ct(v);return b=b.replace(/ $/,"%20"),I(L,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,L)}let p={get action(){return s},get location(){return e(o,i)},listen(v){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(Wr,d),l=v,()=>{o.removeEventListener(Wr,d),l=null}},createHref(v){return t(o,v)},createURL:m,encodeLocation(v){let L=m(v);return{pathname:L.pathname,search:L.search,hash:L.hash}},push:h,replace:w,go(v){return i.go(v)}};return p}var oe;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(oe||(oe={}));const Za=new Set(["lazy","caseSensitive","path","id","index","children"]);function Ga(e){return e.index===!0}function Ln(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((o,a)=>{let i=[...n,String(a)],s=typeof o.id=="string"?o.id:i.join("-");if(I(o.index!==!0||!o.children,"Cannot specify children on an index route"),I(!r[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),Ga(o)){let l=fe({},o,t(o),{id:s});return r[s]=l,l}else{let l=fe({},o,t(o),{id:s,children:void 0});return r[s]=l,o.children&&(l.children=Ln(o.children,t,i,r)),l}})}function mt(e,t,n){return n===void 0&&(n="/"),wn(e,t,n,!1)}function wn(e,t,n,r){let o=typeof t=="string"?dt(t):t,a=Je(o.pathname||"/",n);if(a==null)return null;let i=Ao(e);Ya(i);let s=null;for(let l=0;s==null&&l<i.length;++l){let c=li(a);s=ii(i[l],c,r)}return s}function Ka(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],handle:n.handle}}function Ao(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let o=(a,i,s)=>{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:i,route:a};l.relativePath.startsWith("/")&&(I(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Qe([r,l.relativePath]),u=n.concat(l);a.children&&a.children.length>0&&(I(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Ao(a.children,t,u,c)),!(a.path==null&&!a.index)&&t.push({path:c,score:oi(c,a.index),routesMeta:u})};return e.forEach((a,i)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))o(a,i);else for(let l of Do(a.path))o(a,i,l)}),t}function Do(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return o?[a,""]:[a];let i=Do(r.join("/")),s=[];return s.push(...i.map(l=>l===""?a:[a,l].join("/"))),o&&s.push(...i),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function Ya(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:ai(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Xa=/^:[\w-]+$/,Qa=3,ei=2,ti=1,ni=10,ri=-2,Zr=e=>e==="*";function oi(e,t){let n=e.split("/"),r=n.length;return n.some(Zr)&&(r+=ri),t&&(r+=ei),n.filter(o=>!Zr(o)).reduce((o,a)=>o+(Xa.test(a)?Qa:a===""?ti:ni),r)}function ai(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function ii(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,o={},a="/",i=[];for(let s=0;s<r.length;++s){let l=r[s],c=s===r.length-1,u=a==="/"?t:t.slice(a.length)||"/",d=Rn({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),h=l.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Rn({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!d)return null;Object.assign(o,d.params),i.push({params:o,pathname:Qe([a,d.pathname]),pathnameBase:di(Qe([a,d.pathnameBase])),route:h}),d.pathnameBase!=="/"&&(a=Qe([a,d.pathnameBase]))}return i}function Rn(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=si(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce((c,u,d)=>{let{paramName:h,isOptional:w}=u;if(h==="*"){let p=s[d]||"";i=a.slice(0,a.length-p.length).replace(/(.)\/+$/,"$1")}const m=s[d];return w&&!m?c[h]=void 0:c[h]=(m||"").replace(/%2F/g,"/"),c},{}),pathname:a,pathnameBase:i,pattern:e}}function si(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Se(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 r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,s,l)=>(r.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function li(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Se(!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 Je(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function ci(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?dt(e):e;return{pathname:n?n.startsWith("/")?n:ui(n,t):t,search:fi(r),hash:hi(o)}}function ui(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Kn(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. 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 Fo(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function An(e,t){let n=Fo(e);return t?n.map((r,o)=>o===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Dn(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=dt(e):(o=fe({},e),I(!o.pathname||!o.pathname.includes("?"),Kn("?","pathname","search",o)),I(!o.pathname||!o.pathname.includes("#"),Kn("#","pathname","hash",o)),I(!o.search||!o.search.includes("#"),Kn("#","search","hash",o)));let a=e===""||o.pathname==="",i=a?"/":o.pathname,s;if(i==null)s=n;else{let d=t.length-1;if(!r&&i.startsWith("..")){let h=i.split("/");for(;h[0]==="..";)h.shift(),d-=1;o.pathname=h.join("/")}s=d>=0?t[d]:"/"}let l=ci(o,s),c=i&&i!=="/"&&i.endsWith("/"),u=(a||i===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Qe=e=>e.join("/").replace(/\/\/+/g,"/"),di=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),fi=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,hi=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class kn{constructor(t,n,r,o){o===void 0&&(o=!1),this.status=t,this.statusText=n||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Zt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Io=["post","put","patch","delete"],pi=new Set(Io),mi=["get",...Io],gi=new Set(mi),yi=new Set([301,302,303,307,308]),vi=new Set([307,308]),Yn={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},wi={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},It={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Cr=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Si=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Bo="remix-router-transitions";function bi(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;I(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o;if(e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let f=e.detectErrorBoundary;o=g=>({hasErrorBoundary:f(g)})}else o=Si;let a={},i=Ln(e.routes,o,void 0,a),s,l=e.basename||"/",c=e.dataStrategy||Li,u=e.patchRoutesOnNavigation,d=fe({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),h=null,w=new Set,m=null,p=null,v=null,L=e.hydrationData!=null,b=mt(i,e.history.location,l),R=!1,P=null;if(b==null&&!u){let f=Ae(404,{pathname:e.history.location.pathname}),{matches:g,route:C}=ao(i);b=g,P={[C.id]:f}}b&&!e.hydrationData&&un(b,i,e.history.location.pathname).active&&(b=null);let T;if(b)if(b.some(f=>f.route.lazy))T=!1;else if(!b.some(f=>f.route.loader))T=!0;else if(d.v7_partialHydration){let f=e.hydrationData?e.hydrationData.loaderData:null,g=e.hydrationData?e.hydrationData.errors:null;if(g){let C=b.findIndex(x=>g[x.route.id]!==void 0);T=b.slice(0,C+1).every(x=>!cr(x.route,f,g))}else T=b.every(C=>!cr(C.route,f,g))}else T=e.hydrationData!=null;else if(T=!1,b=[],d.v7_partialHydration){let f=un(null,i,e.history.location.pathname);f.active&&f.matches&&(R=!0,b=f.matches)}let H,S={historyAction:e.history.action,location:e.history.location,matches:b,initialized:T,navigation:Yn,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||P,fetchers:new Map,blockers:new Map},_=ve.Pop,G=!1,B,ae=!1,ee=new Map,te=null,he=!1,Oe=!1,Te=[],Ze=new Set,ue=new Map,Le=0,Ce=-1,be=new Map,Pe=new Set,Ue=new Map,ie=new Map,pe=new Set,Me=new Map,Ee=new Map,ft;function rn(){if(h=e.history.listen(f=>{let{action:g,location:C,delta:x}=f;if(ft){ft(),ft=void 0;return}Se(Ee.size===0||x!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let N=Vr({currentLocation:S.location,nextLocation:C,historyAction:g});if(N&&x!=null){let F=new Promise(j=>{ft=j});e.history.go(x*-1),cn(N,{state:"blocked",location:C,proceed(){cn(N,{state:"proceeding",proceed:void 0,reset:void 0,location:C}),F.then(()=>e.history.go(x))},reset(){let j=new Map(S.blockers);j.set(N,It),xe({blockers:j})}});return}return Ge(g,C)}),n){ji(t,ee);let f=()=>Hi(t,ee);t.addEventListener("pagehide",f),te=()=>t.removeEventListener("pagehide",f)}return S.initialized||Ge(ve.Pop,S.location,{initialHydration:!0}),H}function Wn(){h&&h(),te&&te(),w.clear(),B&&B.abort(),S.fetchers.forEach((f,g)=>ln(g)),S.blockers.forEach((f,g)=>Ur(g))}function on(f){return w.add(f),()=>w.delete(f)}function xe(f,g){g===void 0&&(g={}),S=fe({},S,f);let C=[],x=[];d.v7_fetcherPersist&&S.fetchers.forEach((N,F)=>{N.state==="idle"&&(pe.has(F)?x.push(F):C.push(F))}),pe.forEach(N=>{!S.fetchers.has(N)&&!ue.has(N)&&x.push(N)}),[...w].forEach(N=>N(S,{deletedFetchers:x,viewTransitionOpts:g.viewTransitionOpts,flushSync:g.flushSync===!0})),d.v7_fetcherPersist?(C.forEach(N=>S.fetchers.delete(N)),x.forEach(N=>ln(N))):x.forEach(N=>pe.delete(N))}function et(f,g,C){var x,N;let{flushSync:F}=C===void 0?{}:C,j=S.actionData!=null&&S.navigation.formMethod!=null&&ze(S.navigation.formMethod)&&S.navigation.state==="loading"&&((x=f.state)==null?void 0:x._isRedirect)!==!0,M;g.actionData?Object.keys(g.actionData).length>0?M=g.actionData:M=null:j?M=S.actionData:M=null;let A=g.loaderData?ro(S.loaderData,g.loaderData,g.matches||[],g.errors):S.loaderData,O=S.blockers;O.size>0&&(O=new Map(O),O.forEach((Y,Re)=>O.set(Re,It)));let D=G===!0||S.navigation.formMethod!=null&&ze(S.navigation.formMethod)&&((N=f.state)==null?void 0:N._isRedirect)!==!0;s&&(i=s,s=void 0),he||_===ve.Pop||(_===ve.Push?e.history.push(f,f.state):_===ve.Replace&&e.history.replace(f,f.state));let J;if(_===ve.Pop){let Y=ee.get(S.location.pathname);Y&&Y.has(f.pathname)?J={currentLocation:S.location,nextLocation:f}:ee.has(f.pathname)&&(J={currentLocation:f,nextLocation:S.location})}else if(ae){let Y=ee.get(S.location.pathname);Y?Y.add(f.pathname):(Y=new Set([f.pathname]),ee.set(S.location.pathname,Y)),J={currentLocation:S.location,nextLocation:f}}xe(fe({},g,{actionData:M,loaderData:A,historyAction:_,location:f,initialized:!0,navigation:Yn,revalidation:"idle",restoreScrollPosition:zr(f,g.matches||S.matches),preventScrollReset:D,blockers:O}),{viewTransitionOpts:J,flushSync:F===!0}),_=ve.Pop,G=!1,ae=!1,he=!1,Oe=!1,Te=[]}async function an(f,g){if(typeof f=="number"){e.history.go(f);return}let C=lr(S.location,S.matches,l,d.v7_prependBasename,f,d.v7_relativeSplatPath,g==null?void 0:g.fromRouteId,g==null?void 0:g.relative),{path:x,submission:N,error:F}=Gr(d.v7_normalizeFormMethod,!1,C,g),j=S.location,M=qt(S.location,x,g&&g.state);M=fe({},M,e.history.encodeLocation(M));let A=g&&g.replace!=null?g.replace:void 0,O=ve.Push;A===!0?O=ve.Replace:A===!1||N!=null&&ze(N.formMethod)&&N.formAction===S.location.pathname+S.location.search&&(O=ve.Replace);let D=g&&"preventScrollReset"in g?g.preventScrollReset===!0:void 0,J=(g&&g.flushSync)===!0,Y=Vr({currentLocation:j,nextLocation:M,historyAction:O});if(Y){cn(Y,{state:"blocked",location:M,proceed(){cn(Y,{state:"proceeding",proceed:void 0,reset:void 0,location:M}),an(f,g)},reset(){let Re=new Map(S.blockers);Re.set(Y,It),xe({blockers:Re})}});return}return await Ge(O,M,{submission:N,pendingError:F,preventScrollReset:D,replace:g&&g.replace,enableViewTransition:g&&g.viewTransition,flushSync:J})}function sn(){if(ht(),xe({revalidation:"loading"}),S.navigation.state!=="submitting"){if(S.navigation.state==="idle"){Ge(S.historyAction,S.location,{startUninterruptedRevalidation:!0});return}Ge(_||S.historyAction,S.navigation.location,{overrideNavigation:S.navigation,enableViewTransition:ae===!0})}}async function Ge(f,g,C){B&&B.abort(),B=null,_=f,he=(C&&C.startUninterruptedRevalidation)===!0,ja(S.location,S.matches),G=(C&&C.preventScrollReset)===!0,ae=(C&&C.enableViewTransition)===!0;let x=s||i,N=C&&C.overrideNavigation,F=C!=null&&C.initialHydration&&S.matches&&S.matches.length>0&&!R?S.matches:mt(x,g,l),j=(C&&C.flushSync)===!0;if(F&&S.initialized&&!Oe&&_i(S.location,g)&&!(C&&C.submission&&ze(C.submission.formMethod))){et(g,{matches:F},{flushSync:j});return}let M=un(F,x,g.pathname);if(M.active&&M.matches&&(F=M.matches),!F){let{error:le,notFoundMatches:Q,route:me}=qn(g.pathname);et(g,{matches:Q,loaderData:{},errors:{[me.id]:le}},{flushSync:j});return}B=new AbortController;let A=xt(e.history,g,B.signal,C&&C.submission),O;if(C&&C.pendingError)O=[gt(F).route.id,{type:oe.error,error:C.pendingError}];else if(C&&C.submission&&ze(C.submission.formMethod)){let le=await V(A,g,C.submission,F,M.active,{replace:C.replace,flushSync:j});if(le.shortCircuited)return;if(le.pendingActionResult){let[Q,me]=le.pendingActionResult;if(Ie(me)&&Zt(me.error)&&me.error.status===404){B=null,et(g,{matches:le.matches,loaderData:{},errors:{[Q]:me.error}});return}}F=le.matches||F,O=le.pendingActionResult,N=Xn(g,C.submission),j=!1,M.active=!1,A=xt(e.history,A.url,A.signal)}let{shortCircuited:D,matches:J,loaderData:Y,errors:Re}=await U(A,g,F,M.active,N,C&&C.submission,C&&C.fetcherSubmission,C&&C.replace,C&&C.initialHydration===!0,j,O);D||(B=null,et(g,fe({matches:J||F},oo(O),{loaderData:Y,errors:Re})))}async function V(f,g,C,x,N,F){F===void 0&&(F={}),ht();let j=Ii(g,C);if(xe({navigation:j},{flushSync:F.flushSync===!0}),N){let O=await dn(x,g.pathname,f.signal);if(O.type==="aborted")return{shortCircuited:!0};if(O.type==="error"){let D=gt(O.partialMatches).route.id;return{matches:O.partialMatches,pendingActionResult:[D,{type:oe.error,error:O.error}]}}else if(O.matches)x=O.matches;else{let{notFoundMatches:D,error:J,route:Y}=qn(g.pathname);return{matches:D,pendingActionResult:[Y.id,{type:oe.error,error:J}]}}}let M,A=zt(x,g);if(!A.route.action&&!A.route.lazy)M={type:oe.error,error:Ae(405,{method:f.method,pathname:g.pathname,routeId:A.route.id})};else if(M=(await de("action",S,f,[A],x,null))[A.route.id],f.signal.aborted)return{shortCircuited:!0};if(yt(M)){let O;return F&&F.replace!=null?O=F.replace:O=eo(M.response.headers.get("Location"),new URL(f.url),l)===S.location.pathname+S.location.search,await Z(f,M,!0,{submission:C,replace:O}),{shortCircuited:!0}}if(lt(M))throw Ae(400,{type:"defer-action"});if(Ie(M)){let O=gt(x,A.route.id);return(F&&F.replace)!==!0&&(_=ve.Push),{matches:x,pendingActionResult:[O.route.id,M]}}return{matches:x,pendingActionResult:[A.route.id,M]}}async function U(f,g,C,x,N,F,j,M,A,O,D){let J=N||Xn(g,F),Y=F||j||so(J),Re=!he&&(!d.v7_partialHydration||!A);if(x){if(Re){let ge=ne(D);xe(fe({navigation:J},ge!==void 0?{actionData:ge}:{}),{flushSync:O})}let X=await dn(C,g.pathname,f.signal);if(X.type==="aborted")return{shortCircuited:!0};if(X.type==="error"){let ge=gt(X.partialMatches).route.id;return{matches:X.partialMatches,loaderData:{},errors:{[ge]:X.error}}}else if(X.matches)C=X.matches;else{let{error:ge,notFoundMatches:Ct,route:Dt}=qn(g.pathname);return{matches:Ct,loaderData:{},errors:{[Dt.id]:ge}}}}let le=s||i,[Q,me]=Yr(e.history,S,C,Y,g,d.v7_partialHydration&&A===!0,d.v7_skipActionErrorRevalidation,Oe,Te,Ze,pe,Ue,Pe,le,l,D);if(Zn(X=>!(C&&C.some(ge=>ge.route.id===X))||Q&&Q.some(ge=>ge.route.id===X)),Ce=++Le,Q.length===0&&me.length===0){let X=jr();return et(g,fe({matches:C,loaderData:{},errors:D&&Ie(D[1])?{[D[0]]:D[1].error}:null},oo(D),X?{fetchers:new Map(S.fetchers)}:{}),{flushSync:O}),{shortCircuited:!0}}if(Re){let X={};if(!x){X.navigation=J;let ge=ne(D);ge!==void 0&&(X.actionData=ge)}me.length>0&&(X.fetchers=z(me)),xe(X,{flushSync:O})}me.forEach(X=>{it(X.key),X.controller&&ue.set(X.key,X.controller)});let bt=()=>me.forEach(X=>it(X.key));B&&B.signal.addEventListener("abort",bt);let{loaderResults:Mt,fetcherResults:rt}=await tt(S,C,Q,me,f);if(f.signal.aborted)return{shortCircuited:!0};B&&B.signal.removeEventListener("abort",bt),me.forEach(X=>ue.delete(X.key));let Ye=pn(Mt);if(Ye)return await Z(f,Ye.result,!0,{replace:M}),{shortCircuited:!0};if(Ye=pn(rt),Ye)return Pe.add(Ye.key),await Z(f,Ye.result,!0,{replace:M}),{shortCircuited:!0};let{loaderData:Gn,errors:At}=no(S,C,Mt,D,me,rt,Me);Me.forEach((X,ge)=>{X.subscribe(Ct=>{(Ct||X.done)&&Me.delete(ge)})}),d.v7_partialHydration&&A&&S.errors&&(At=fe({},S.errors,At));let pt=jr(),fn=Hr(Ce),hn=pt||fn||me.length>0;return fe({matches:C,loaderData:Gn,errors:At},hn?{fetchers:new Map(S.fetchers)}:{})}function ne(f){if(f&&!Ie(f[1]))return{[f[0]]:f[1].data};if(S.actionData)return Object.keys(S.actionData).length===0?null:S.actionData}function z(f){return f.forEach(g=>{let C=S.fetchers.get(g.key),x=Bt(void 0,C?C.data:void 0);S.fetchers.set(g.key,x)}),new Map(S.fetchers)}function K(f,g,C,x){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");it(f);let N=(x&&x.flushSync)===!0,F=s||i,j=lr(S.location,S.matches,l,d.v7_prependBasename,C,d.v7_relativeSplatPath,g,x==null?void 0:x.relative),M=mt(F,j,l),A=un(M,F,j);if(A.active&&A.matches&&(M=A.matches),!M){nt(f,g,Ae(404,{pathname:j}),{flushSync:N});return}let{path:O,submission:D,error:J}=Gr(d.v7_normalizeFormMethod,!0,j,x);if(J){nt(f,g,J,{flushSync:N});return}let Y=zt(M,O),Re=(x&&x.preventScrollReset)===!0;if(D&&ze(D.formMethod)){W(f,g,O,Y,M,A.active,N,Re,D);return}Ue.set(f,{routeId:g,path:O}),re(f,g,O,Y,M,A.active,N,Re,D)}async function W(f,g,C,x,N,F,j,M,A){ht(),Ue.delete(f);function O(ye){if(!ye.route.action&&!ye.route.lazy){let Et=Ae(405,{method:A.formMethod,pathname:C,routeId:g});return nt(f,g,Et,{flushSync:j}),!0}return!1}if(!F&&O(x))return;let D=S.fetchers.get(f);Ke(f,Bi(A,D),{flushSync:j});let J=new AbortController,Y=xt(e.history,C,J.signal,A);if(F){let ye=await dn(N,new URL(Y.url).pathname,Y.signal,f);if(ye.type==="aborted")return;if(ye.type==="error"){nt(f,g,ye.error,{flushSync:j});return}else if(ye.matches){if(N=ye.matches,x=zt(N,C),O(x))return}else{nt(f,g,Ae(404,{pathname:C}),{flushSync:j});return}}ue.set(f,J);let Re=Le,Q=(await de("action",S,Y,[x],N,f))[x.route.id];if(Y.signal.aborted){ue.get(f)===J&&ue.delete(f);return}if(d.v7_fetcherPersist&&pe.has(f)){if(yt(Q)||Ie(Q)){Ke(f,st(void 0));return}}else{if(yt(Q))if(ue.delete(f),Ce>Re){Ke(f,st(void 0));return}else return Pe.add(f),Ke(f,Bt(A)),Z(Y,Q,!1,{fetcherSubmission:A,preventScrollReset:M});if(Ie(Q)){nt(f,g,Q.error);return}}if(lt(Q))throw Ae(400,{type:"defer-action"});let me=S.navigation.location||S.location,bt=xt(e.history,me,J.signal),Mt=s||i,rt=S.navigation.state!=="idle"?mt(Mt,S.navigation.location,l):S.matches;I(rt,"Didn't find any matches after fetcher action");let Ye=++Le;be.set(f,Ye);let Gn=Bt(A,Q.data);S.fetchers.set(f,Gn);let[At,pt]=Yr(e.history,S,rt,A,me,!1,d.v7_skipActionErrorRevalidation,Oe,Te,Ze,pe,Ue,Pe,Mt,l,[x.route.id,Q]);pt.filter(ye=>ye.key!==f).forEach(ye=>{let Et=ye.key,Jr=S.fetchers.get(Et),Va=Bt(void 0,Jr?Jr.data:void 0);S.fetchers.set(Et,Va),it(Et),ye.controller&&ue.set(Et,ye.controller)}),xe({fetchers:new Map(S.fetchers)});let fn=()=>pt.forEach(ye=>it(ye.key));J.signal.addEventListener("abort",fn);let{loaderResults:hn,fetcherResults:X}=await tt(S,rt,At,pt,bt);if(J.signal.aborted)return;J.signal.removeEventListener("abort",fn),be.delete(f),ue.delete(f),pt.forEach(ye=>ue.delete(ye.key));let ge=pn(hn);if(ge)return Z(bt,ge.result,!1,{preventScrollReset:M});if(ge=pn(X),ge)return Pe.add(ge.key),Z(bt,ge.result,!1,{preventScrollReset:M});let{loaderData:Ct,errors:Dt}=no(S,rt,hn,void 0,pt,X,Me);if(S.fetchers.has(f)){let ye=st(Q.data);S.fetchers.set(f,ye)}Hr(Ye),S.navigation.state==="loading"&&Ye>Ce?(I(_,"Expected pending action"),B&&B.abort(),et(S.navigation.location,{matches:rt,loaderData:Ct,errors:Dt,fetchers:new Map(S.fetchers)})):(xe({errors:Dt,loaderData:ro(S.loaderData,Ct,rt,Dt),fetchers:new Map(S.fetchers)}),Oe=!1)}async function re(f,g,C,x,N,F,j,M,A){let O=S.fetchers.get(f);Ke(f,Bt(A,O?O.data:void 0),{flushSync:j});let D=new AbortController,J=xt(e.history,C,D.signal);if(F){let Q=await dn(N,new URL(J.url).pathname,J.signal,f);if(Q.type==="aborted")return;if(Q.type==="error"){nt(f,g,Q.error,{flushSync:j});return}else if(Q.matches)N=Q.matches,x=zt(N,C);else{nt(f,g,Ae(404,{pathname:C}),{flushSync:j});return}}ue.set(f,D);let Y=Le,le=(await de("loader",S,J,[x],N,f))[x.route.id];if(lt(le)&&(le=await Er(le,J.signal,!0)||le),ue.get(f)===D&&ue.delete(f),!J.signal.aborted){if(pe.has(f)){Ke(f,st(void 0));return}if(yt(le))if(Ce>Y){Ke(f,st(void 0));return}else{Pe.add(f),await Z(J,le,!1,{preventScrollReset:M});return}if(Ie(le)){nt(f,g,le.error);return}I(!lt(le),"Unhandled fetcher deferred data"),Ke(f,st(le.data))}}async function Z(f,g,C,x){let{submission:N,fetcherSubmission:F,preventScrollReset:j,replace:M}=x===void 0?{}:x;g.response.headers.has("X-Remix-Revalidate")&&(Oe=!0);let A=g.response.headers.get("Location");I(A,"Expected a Location header on the redirect Response"),A=eo(A,new URL(f.url),l);let O=qt(S.location,A,{_isRedirect:!0});if(n){let Q=!1;if(g.response.headers.has("X-Remix-Reload-Document"))Q=!0;else if(Cr.test(A)){const me=e.history.createURL(A);Q=me.origin!==t.location.origin||Je(me.pathname,l)==null}if(Q){M?t.location.replace(A):t.location.assign(A);return}}B=null;let D=M===!0||g.response.headers.has("X-Remix-Replace")?ve.Replace:ve.Push,{formMethod:J,formAction:Y,formEncType:Re}=S.navigation;!N&&!F&&J&&Y&&Re&&(N=so(S.navigation));let le=N||F;if(vi.has(g.response.status)&&le&&ze(le.formMethod))await Ge(D,O,{submission:fe({},le,{formAction:A}),preventScrollReset:j||G,enableViewTransition:C?ae:void 0});else{let Q=Xn(O,N);await Ge(D,O,{overrideNavigation:Q,fetcherSubmission:F,preventScrollReset:j||G,enableViewTransition:C?ae:void 0})}}async function de(f,g,C,x,N,F){let j,M={};try{j=await Ri(c,f,g,C,x,N,F,a,o)}catch(A){return x.forEach(O=>{M[O.route.id]={type:oe.error,error:A}}),M}for(let[A,O]of Object.entries(j))if(Oi(O)){let D=O.result;M[A]={type:oe.redirect,response:Ti(D,C,A,N,l,d.v7_relativeSplatPath)}}else M[A]=await Ni(O);return M}async function tt(f,g,C,x,N){let F=f.matches,j=de("loader",f,N,C,g,null),M=Promise.all(x.map(async D=>{if(D.matches&&D.match&&D.controller){let Y=(await de("loader",f,xt(e.history,D.path,D.controller.signal),[D.match],D.matches,D.key))[D.match.route.id];return{[D.key]:Y}}else return Promise.resolve({[D.key]:{type:oe.error,error:Ae(404,{pathname:D.path})}})})),A=await j,O=(await M).reduce((D,J)=>Object.assign(D,J),{});return await Promise.all([Di(g,A,N.signal,F,f.loaderData),Fi(g,O,x)]),{loaderResults:A,fetcherResults:O}}function ht(){Oe=!0,Te.push(...Zn()),Ue.forEach((f,g)=>{ue.has(g)&&Ze.add(g),it(g)})}function Ke(f,g,C){C===void 0&&(C={}),S.fetchers.set(f,g),xe({fetchers:new Map(S.fetchers)},{flushSync:(C&&C.flushSync)===!0})}function nt(f,g,C,x){x===void 0&&(x={});let N=gt(S.matches,g);ln(f),xe({errors:{[N.route.id]:C},fetchers:new Map(S.fetchers)},{flushSync:(x&&x.flushSync)===!0})}function Ir(f){return ie.set(f,(ie.get(f)||0)+1),pe.has(f)&&pe.delete(f),S.fetchers.get(f)||wi}function ln(f){let g=S.fetchers.get(f);ue.has(f)&&!(g&&g.state==="loading"&&be.has(f))&&it(f),Ue.delete(f),be.delete(f),Pe.delete(f),d.v7_fetcherPersist&&pe.delete(f),Ze.delete(f),S.fetchers.delete(f)}function Fa(f){let g=(ie.get(f)||0)-1;g<=0?(ie.delete(f),pe.add(f),d.v7_fetcherPersist||ln(f)):ie.set(f,g),xe({fetchers:new Map(S.fetchers)})}function it(f){let g=ue.get(f);g&&(g.abort(),ue.delete(f))}function Br(f){for(let g of f){let C=Ir(g),x=st(C.data);S.fetchers.set(g,x)}}function jr(){let f=[],g=!1;for(let C of Pe){let x=S.fetchers.get(C);I(x,"Expected fetcher: "+C),x.state==="loading"&&(Pe.delete(C),f.push(C),g=!0)}return Br(f),g}function Hr(f){let g=[];for(let[C,x]of be)if(x<f){let N=S.fetchers.get(C);I(N,"Expected fetcher: "+C),N.state==="loading"&&(it(C),be.delete(C),g.push(C))}return Br(g),g.length>0}function Ia(f,g){let C=S.blockers.get(f)||It;return Ee.get(f)!==g&&Ee.set(f,g),C}function Ur(f){S.blockers.delete(f),Ee.delete(f)}function cn(f,g){let C=S.blockers.get(f)||It;I(C.state==="unblocked"&&g.state==="blocked"||C.state==="blocked"&&g.state==="blocked"||C.state==="blocked"&&g.state==="proceeding"||C.state==="blocked"&&g.state==="unblocked"||C.state==="proceeding"&&g.state==="unblocked","Invalid blocker state transition: "+C.state+" -> "+g.state);let x=new Map(S.blockers);x.set(f,g),xe({blockers:x})}function Vr(f){let{currentLocation:g,nextLocation:C,historyAction:x}=f;if(Ee.size===0)return;Ee.size>1&&Se(!1,"A router only supports one blocker at a time");let N=Array.from(Ee.entries()),[F,j]=N[N.length-1],M=S.blockers.get(F);if(!(M&&M.state==="proceeding")&&j({currentLocation:g,nextLocation:C,historyAction:x}))return F}function qn(f){let g=Ae(404,{pathname:f}),C=s||i,{matches:x,route:N}=ao(C);return Zn(),{notFoundMatches:x,route:N,error:g}}function Zn(f){let g=[];return Me.forEach((C,x)=>{(!f||f(x))&&(C.cancel(),g.push(x),Me.delete(x))}),g}function Ba(f,g,C){if(m=f,v=g,p=C||null,!L&&S.navigation===Yn){L=!0;let x=zr(S.location,S.matches);x!=null&&xe({restoreScrollPosition:x})}return()=>{m=null,v=null,p=null}}function $r(f,g){return p&&p(f,g.map(x=>Ka(x,S.loaderData)))||f.key}function ja(f,g){if(m&&v){let C=$r(f,g);m[C]=v()}}function zr(f,g){if(m){let C=$r(f,g),x=m[C];if(typeof x=="number")return x}return null}function un(f,g,C){if(u)if(f){if(Object.keys(f[0].params).length>0)return{active:!0,matches:wn(g,C,l,!0)}}else return{active:!0,matches:wn(g,C,l,!0)||[]};return{active:!1,matches:null}}async function dn(f,g,C,x){if(!u)return{type:"success",matches:f};let N=f;for(;;){let F=s==null,j=s||i,M=a;try{await u({signal:C,path:g,matches:N,fetcherKey:x,patch:(D,J)=>{C.aborted||Qr(D,J,j,M,o)}})}catch(D){return{type:"error",error:D,partialMatches:N}}finally{F&&!C.aborted&&(i=[...i])}if(C.aborted)return{type:"aborted"};let A=mt(j,g,l);if(A)return{type:"success",matches:A};let O=wn(j,g,l,!0);if(!O||N.length===O.length&&N.every((D,J)=>D.route.id===O[J].route.id))return{type:"success",matches:null};N=O}}function Ha(f){a={},s=Ln(f,o,void 0,a)}function Ua(f,g){let C=s==null;Qr(f,g,s||i,a,o),C&&(i=[...i],xe({}))}return H={get basename(){return l},get future(){return d},get state(){return S},get routes(){return i},get window(){return t},initialize:rn,subscribe:on,enableScrollRestoration:Ba,navigate:an,fetch:K,revalidate:sn,createHref:f=>e.history.createHref(f),encodeLocation:f=>e.history.encodeLocation(f),getFetcher:Ir,deleteFetcher:Fa,dispose:Wn,getBlocker:Ia,deleteBlocker:Ur,patchRoutes:Ua,_internalFetchControllers:ue,_internalActiveDeferreds:Me,_internalSetRoutes:Ha},H}function Ci(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function lr(e,t,n,r,o,a,i,s){let l,c;if(i){l=[];for(let d of t)if(l.push(d),d.route.id===i){c=d;break}}else l=t,c=t[t.length-1];let u=Dn(o||".",An(l,a),Je(e.pathname,n)||e.pathname,s==="path");if(o==null&&(u.search=e.search,u.hash=e.hash),(o==null||o===""||o===".")&&c){let d=xr(u.search);if(c.route.index&&!d)u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index";else if(!c.route.index&&d){let h=new URLSearchParams(u.search),w=h.getAll("index");h.delete("index"),w.filter(p=>p).forEach(p=>h.append("index",p));let m=h.toString();u.search=m?"?"+m:""}}return r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:Qe([n,u.pathname])),ct(u)}function Gr(e,t,n,r){if(!r||!Ci(r))return{path:n};if(r.formMethod&&!Ai(r.formMethod))return{path:n,error:Ae(405,{method:r.formMethod})};let o=()=>({path:n,error:Ae(400,{type:"invalid-body"})}),a=r.formMethod||"get",i=e?a.toUpperCase():a.toLowerCase(),s=Uo(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!ze(i))return o();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((w,m)=>{let[p,v]=m;return""+w+p+"="+v+`
|
|
11
|
-
`},""):String(r.body);return{path:n,submission:{formMethod:i,formAction:s,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!ze(i))return o();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:i,formAction:s,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return o()}}}I(typeof FormData=="function","FormData is not available in this environment");let l,c;if(r.formData)l=ur(r.formData),c=r.formData;else if(r.body instanceof FormData)l=ur(r.body),c=r.body;else if(r.body instanceof URLSearchParams)l=r.body,c=to(l);else if(r.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(r.body),c=to(l)}catch{return o()}let u={formMethod:i,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(ze(u.formMethod))return{path:n,submission:u};let d=dt(n);return t&&d.search&&xr(d.search)&&l.append("index",""),d.search="?"+l,{path:ct(d),submission:u}}function Kr(e,t,n){n===void 0&&(n=!1);let r=e.findIndex(o=>o.route.id===t);return r>=0?e.slice(0,n?r+1:r):e}function Yr(e,t,n,r,o,a,i,s,l,c,u,d,h,w,m,p){let v=p?Ie(p[1])?p[1].error:p[1].data:void 0,L=e.createURL(t.location),b=e.createURL(o),R=n;a&&t.errors?R=Kr(n,Object.keys(t.errors)[0],!0):p&&Ie(p[1])&&(R=Kr(n,p[0]));let P=p?p[1].statusCode:void 0,T=i&&P&&P>=400,H=R.filter((_,G)=>{let{route:B}=_;if(B.lazy)return!0;if(B.loader==null)return!1;if(a)return cr(B,t.loaderData,t.errors);if(Ei(t.loaderData,t.matches[G],_)||l.some(te=>te===_.route.id))return!0;let ae=t.matches[G],ee=_;return Xr(_,fe({currentUrl:L,currentParams:ae.params,nextUrl:b,nextParams:ee.params},r,{actionResult:v,actionStatus:P,defaultShouldRevalidate:T?!1:s||L.pathname+L.search===b.pathname+b.search||L.search!==b.search||jo(ae,ee)}))}),S=[];return d.forEach((_,G)=>{if(a||!n.some(he=>he.route.id===_.routeId)||u.has(G))return;let B=mt(w,_.path,m);if(!B){S.push({key:G,routeId:_.routeId,path:_.path,matches:null,match:null,controller:null});return}let ae=t.fetchers.get(G),ee=zt(B,_.path),te=!1;h.has(G)?te=!1:c.has(G)?(c.delete(G),te=!0):ae&&ae.state!=="idle"&&ae.data===void 0?te=s:te=Xr(ee,fe({currentUrl:L,currentParams:t.matches[t.matches.length-1].params,nextUrl:b,nextParams:n[n.length-1].params},r,{actionResult:v,actionStatus:P,defaultShouldRevalidate:T?!1:s})),te&&S.push({key:G,routeId:_.routeId,path:_.path,matches:B,match:ee,controller:new AbortController})}),[H,S]}function cr(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=t!=null&&t[e.id]!==void 0,o=n!=null&&n[e.id]!==void 0;return!r&&o?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!r&&!o}function Ei(e,t,n){let r=!t||n.route.id!==t.route.id,o=e[n.route.id]===void 0;return r||o}function jo(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Xr(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function Qr(e,t,n,r,o){var a;let i;if(e){let c=r[e];I(c,"No route found to patch children into: routeId = "+e),c.children||(c.children=[]),i=c.children}else i=n;let s=t.filter(c=>!i.some(u=>Ho(c,u))),l=Ln(s,o,[e||"_","patch",String(((a=i)==null?void 0:a.length)||"0")],r);i.push(...l)}function Ho(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,r)=>{var o;return(o=t.children)==null?void 0:o.some(a=>Ho(n,a))}):!1}async function xi(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let o=n[e.id];I(o,"No route found in manifest");let a={};for(let i in r){let l=o[i]!==void 0&&i!=="hasErrorBoundary";Se(!l,'Route "'+o.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!l&&!Za.has(i)&&(a[i]=r[i])}Object.assign(o,a),Object.assign(o,fe({},t(o),{lazy:void 0}))}async function Li(e){let{matches:t}=e,n=t.filter(o=>o.shouldLoad);return(await Promise.all(n.map(o=>o.resolve()))).reduce((o,a,i)=>Object.assign(o,{[n[i].route.id]:a}),{})}async function Ri(e,t,n,r,o,a,i,s,l,c){let u=a.map(w=>w.route.lazy?xi(w.route,l,s):void 0),d=a.map((w,m)=>{let p=u[m],v=o.some(b=>b.route.id===w.route.id);return fe({},w,{shouldLoad:v,resolve:async b=>(b&&r.method==="GET"&&(w.route.lazy||w.route.loader)&&(v=!0),v?ki(t,r,w,p,b,c):Promise.resolve({type:oe.data,result:void 0}))})}),h=await e({matches:d,request:r,params:a[0].params,fetcherKey:i,context:c});try{await Promise.all(u)}catch{}return h}async function ki(e,t,n,r,o,a){let i,s,l=c=>{let u,d=new Promise((m,p)=>u=p);s=()=>u(),t.signal.addEventListener("abort",s);let h=m=>typeof c!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):c({request:t,params:n.params,context:a},...m!==void 0?[m]:[]),w=(async()=>{try{return{type:"data",result:await(o?o(p=>h(p)):h())}}catch(m){return{type:"error",result:m}}})();return Promise.race([w,d])};try{let c=n.route[e];if(r)if(c){let u,[d]=await Promise.all([l(c).catch(h=>{u=h}),r]);if(u!==void 0)throw u;i=d}else if(await r,c=n.route[e],c)i=await l(c);else if(e==="action"){let u=new URL(t.url),d=u.pathname+u.search;throw Ae(405,{method:t.method,pathname:d,routeId:n.route.id})}else return{type:oe.data,result:void 0};else if(c)i=await l(c);else{let u=new URL(t.url),d=u.pathname+u.search;throw Ae(404,{pathname:d})}I(i.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(c){return{type:oe.error,result:c}}finally{s&&t.signal.removeEventListener("abort",s)}return i}async function Ni(e){let{result:t,type:n}=e;if(Vo(t)){let d;try{let h=t.headers.get("Content-Type");h&&/\bapplication\/json\b/.test(h)?t.body==null?d=null:d=await t.json():d=await t.text()}catch(h){return{type:oe.error,error:h}}return n===oe.error?{type:oe.error,error:new kn(t.status,t.statusText,d),statusCode:t.status,headers:t.headers}:{type:oe.data,data:d,statusCode:t.status,headers:t.headers}}if(n===oe.error){if(io(t)){var r,o;if(t.data instanceof Error){var a,i;return{type:oe.error,error:t.data,statusCode:(a=t.init)==null?void 0:a.status,headers:(i=t.init)!=null&&i.headers?new Headers(t.init.headers):void 0}}return{type:oe.error,error:new kn(((r=t.init)==null?void 0:r.status)||500,void 0,t.data),statusCode:Zt(t)?t.status:void 0,headers:(o=t.init)!=null&&o.headers?new Headers(t.init.headers):void 0}}return{type:oe.error,error:t,statusCode:Zt(t)?t.status:void 0}}if(Mi(t)){var s,l;return{type:oe.deferred,deferredData:t,statusCode:(s=t.init)==null?void 0:s.status,headers:((l=t.init)==null?void 0:l.headers)&&new Headers(t.init.headers)}}if(io(t)){var c,u;return{type:oe.data,data:t.data,statusCode:(c=t.init)==null?void 0:c.status,headers:(u=t.init)!=null&&u.headers?new Headers(t.init.headers):void 0}}return{type:oe.data,data:t}}function Ti(e,t,n,r,o,a){let i=e.headers.get("Location");if(I(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!Cr.test(i)){let s=r.slice(0,r.findIndex(l=>l.route.id===n)+1);i=lr(new URL(t.url),s,o,!0,i,a),e.headers.set("Location",i)}return e}function eo(e,t,n){if(Cr.test(e)){let r=e,o=r.startsWith("//")?new URL(t.protocol+r):new URL(r),a=Je(o.pathname,n)!=null;if(o.origin===t.origin&&a)return o.pathname+o.search+o.hash}return e}function xt(e,t,n,r){let o=e.createURL(Uo(t)).toString(),a={signal:n};if(r&&ze(r.formMethod)){let{formMethod:i,formEncType:s}=r;a.method=i.toUpperCase(),s==="application/json"?(a.headers=new Headers({"Content-Type":s}),a.body=JSON.stringify(r.json)):s==="text/plain"?a.body=r.text:s==="application/x-www-form-urlencoded"&&r.formData?a.body=ur(r.formData):a.body=r.formData}return new Request(o,a)}function ur(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function to(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Pi(e,t,n,r,o){let a={},i=null,s,l=!1,c={},u=n&&Ie(n[1])?n[1].error:void 0;return e.forEach(d=>{if(!(d.route.id in t))return;let h=d.route.id,w=t[h];if(I(!yt(w),"Cannot handle redirect results in processLoaderData"),Ie(w)){let m=w.error;u!==void 0&&(m=u,u=void 0),i=i||{};{let p=gt(e,h);i[p.route.id]==null&&(i[p.route.id]=m)}a[h]=void 0,l||(l=!0,s=Zt(w.error)?w.error.status:500),w.headers&&(c[h]=w.headers)}else lt(w)?(r.set(h,w.deferredData),a[h]=w.deferredData.data,w.statusCode!=null&&w.statusCode!==200&&!l&&(s=w.statusCode),w.headers&&(c[h]=w.headers)):(a[h]=w.data,w.statusCode&&w.statusCode!==200&&!l&&(s=w.statusCode),w.headers&&(c[h]=w.headers))}),u!==void 0&&n&&(i={[n[0]]:u},a[n[0]]=void 0),{loaderData:a,errors:i,statusCode:s||200,loaderHeaders:c}}function no(e,t,n,r,o,a,i){let{loaderData:s,errors:l}=Pi(t,n,r,i);return o.forEach(c=>{let{key:u,match:d,controller:h}=c,w=a[u];if(I(w,"Did not find corresponding fetcher result"),!(h&&h.signal.aborted))if(Ie(w)){let m=gt(e.matches,d==null?void 0:d.route.id);l&&l[m.route.id]||(l=fe({},l,{[m.route.id]:w.error})),e.fetchers.delete(u)}else if(yt(w))I(!1,"Unhandled fetcher revalidation redirect");else if(lt(w))I(!1,"Unhandled fetcher deferred data");else{let m=st(w.data);e.fetchers.set(u,m)}}),{loaderData:s,errors:l}}function ro(e,t,n,r){let o=fe({},t);for(let a of n){let i=a.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(o[i]=t[i]):e[i]!==void 0&&a.route.loader&&(o[i]=e[i]),r&&r.hasOwnProperty(i))break}return o}function oo(e){return e?Ie(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function gt(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function ao(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Ae(e,t){let{pathname:n,routeId:r,method:o,type:a,message:i}=t===void 0?{}:t,s="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(s="Bad Request",o&&n&&r?l="You made a "+o+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":a==="defer-action"?l="defer() is not supported in actions":a==="invalid-body"&&(l="Unable to encode submission body")):e===403?(s="Forbidden",l='Route "'+r+'" does not match URL "'+n+'"'):e===404?(s="Not Found",l='No route matches URL "'+n+'"'):e===405&&(s="Method Not Allowed",o&&n&&r?l="You made a "+o.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":o&&(l='Invalid request method "'+o.toUpperCase()+'"')),new kn(e||500,s,new Error(l),!0)}function pn(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,o]=t[n];if(yt(o))return{key:r,result:o}}}function Uo(e){let t=typeof e=="string"?dt(e):e;return ct(fe({},t,{hash:""}))}function _i(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Oi(e){return Vo(e.result)&&yi.has(e.result.status)}function lt(e){return e.type===oe.deferred}function Ie(e){return e.type===oe.error}function yt(e){return(e&&e.type)===oe.redirect}function io(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Mi(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Vo(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Ai(e){return gi.has(e.toLowerCase())}function ze(e){return pi.has(e.toLowerCase())}async function Di(e,t,n,r,o){let a=Object.entries(t);for(let i=0;i<a.length;i++){let[s,l]=a[i],c=e.find(h=>(h==null?void 0:h.route.id)===s);if(!c)continue;let u=r.find(h=>h.route.id===c.route.id),d=u!=null&&!jo(u,c)&&(o&&o[c.route.id])!==void 0;lt(l)&&d&&await Er(l,n,!1).then(h=>{h&&(t[s]=h)})}}async function Fi(e,t,n){for(let r=0;r<n.length;r++){let{key:o,routeId:a,controller:i}=n[r],s=t[o];e.find(c=>(c==null?void 0:c.route.id)===a)&<(s)&&(I(i,"Expected an AbortController for revalidating fetcher deferred result"),await Er(s,i.signal,!0).then(c=>{c&&(t[o]=c)}))}}async function Er(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:oe.data,data:e.deferredData.unwrappedData}}catch(o){return{type:oe.error,error:o}}return{type:oe.data,data:e.deferredData.data}}}function xr(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function zt(e,t){let n=typeof t=="string"?dt(t).search:t.search;if(e[e.length-1].route.index&&xr(n||""))return e[e.length-1];let r=Fo(e);return r[r.length-1]}function so(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:a,json:i}=e;if(!(!t||!n||!r)){if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:i,text:void 0}}}function Xn(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Ii(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Bt(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Bi(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function st(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function ji(e,t){try{let n=e.sessionStorage.getItem(Bo);if(n){let r=JSON.parse(n);for(let[o,a]of Object.entries(r||{}))a&&Array.isArray(a)&&t.set(o,new Set(a||[]))}}catch{}}function Hi(e,t){if(t.size>0){let n={};for(let[r,o]of t)n[r]=[...o];try{e.sessionStorage.setItem(Bo,JSON.stringify(n))}catch(r){Se(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
|
|
12
|
-
* React Router v6.30.0
|
|
13
|
-
*
|
|
14
|
-
* Copyright (c) Remix Software Inc.
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the MIT license found in the
|
|
17
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
18
|
-
*
|
|
19
|
-
* @license MIT
|
|
20
|
-
*/function Nn(){return Nn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nn.apply(this,arguments)}const Tt=y.createContext(null);process.env.NODE_ENV!=="production"&&(Tt.displayName="DataRouter");const Fn=y.createContext(null);process.env.NODE_ENV!=="production"&&(Fn.displayName="DataRouterState");const Ui=y.createContext(null);process.env.NODE_ENV!=="production"&&(Ui.displayName="Await");const Ve=y.createContext(null);process.env.NODE_ENV!=="production"&&(Ve.displayName="Navigation");const In=y.createContext(null);process.env.NODE_ENV!=="production"&&(In.displayName="Location");const $e=y.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&($e.displayName="Route");const Lr=y.createContext(null);process.env.NODE_ENV!=="production"&&(Lr.displayName="RouteError");function Vi(e,t){let{relative:n}=t===void 0?{}:t;Pt()||(process.env.NODE_ENV!=="production"?I(!1,"useHref() may be used only in the context of a <Router> component."):I(!1));let{basename:r,navigator:o}=y.useContext(Ve),{hash:a,pathname:i,search:s}=Qt(e,{relative:n}),l=i;return r!=="/"&&(l=i==="/"?r:Qe([r,i])),o.createHref({pathname:l,search:s,hash:a})}function Pt(){return y.useContext(In)!=null}function We(){return Pt()||(process.env.NODE_ENV!=="production"?I(!1,"useLocation() may be used only in the context of a <Router> component."):I(!1)),y.useContext(In).location}const $o="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function zo(e){y.useContext(Ve).static||y.useLayoutEffect(e)}function Xt(){let{isDataRoute:e}=y.useContext($e);return e?rs():$i()}function $i(){Pt()||(process.env.NODE_ENV!=="production"?I(!1,"useNavigate() may be used only in the context of a <Router> component."):I(!1));let e=y.useContext(Tt),{basename:t,future:n,navigator:r}=y.useContext(Ve),{matches:o}=y.useContext($e),{pathname:a}=We(),i=JSON.stringify(An(o,n.v7_relativeSplatPath)),s=y.useRef(!1);return zo(()=>{s.current=!0}),y.useCallback(function(c,u){if(u===void 0&&(u={}),process.env.NODE_ENV!=="production"&&Se(s.current,$o),!s.current)return;if(typeof c=="number"){r.go(c);return}let d=Dn(c,JSON.parse(i),a,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Qe([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,i,a,e])}const zi=y.createContext(null);function Ji(e){let t=y.useContext($e).outlet;return t&&y.createElement(zi.Provider,{value:e},t)}function Wi(){let{matches:e}=y.useContext($e),t=e[e.length-1];return t?t.params:{}}function Qt(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=y.useContext(Ve),{matches:o}=y.useContext($e),{pathname:a}=We(),i=JSON.stringify(An(o,r.v7_relativeSplatPath));return y.useMemo(()=>Dn(e,JSON.parse(i),a,n==="path"),[e,i,a,n])}function qi(e,t,n,r){Pt()||(process.env.NODE_ENV!=="production"?I(!1,"useRoutes() may be used only in the context of a <Router> component."):I(!1));let{navigator:o,static:a}=y.useContext(Ve),{matches:i}=y.useContext($e),s=i[i.length-1],l=s?s.params:{},c=s?s.pathname:"/",u=s?s.pathnameBase:"/",d=s&&s.route;if(process.env.NODE_ENV!=="production"){let b=d&&d.path||"";qo(c,!d||b.endsWith("*"),"You rendered descendant <Routes> (or called `useRoutes()`) at "+('"'+c+'" (under <Route path="'+b+'">) but the ')+`parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
21
|
-
|
|
22
|
-
`+('Please change the parent <Route path="'+b+'"> to <Route ')+('path="'+(b==="/"?"*":b+"/*")+'">.'))}let h=We(),w;w=h;let m=w.pathname||"/",p=m;if(u!=="/"){let b=u.replace(/^\//,"").split("/");p="/"+m.replace(/^\//,"").split("/").slice(b.length).join("/")}let v=!a&&n&&n.matches&&n.matches.length>0?n.matches:mt(e,{pathname:p});return process.env.NODE_ENV!=="production"&&(process.env.NODE_ENV!=="production"&&Se(d||v!=null,'No routes matched location "'+w.pathname+w.search+w.hash+'" '),process.env.NODE_ENV!=="production"&&Se(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,'Matched leaf route at location "'+w.pathname+w.search+w.hash+'" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.')),Xi(v&&v.map(b=>Object.assign({},b,{params:Object.assign({},l,b.params),pathname:Qe([u,o.encodeLocation?o.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?u:Qe([u,o.encodeLocation?o.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,n,r)}function Zi(){let e=Wo(),t=Zt(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},i=null;return process.env.NODE_ENV!=="production"&&(console.error("Error handled by React Router default ErrorBoundary:",e),i=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:a},"ErrorBoundary")," or"," ",y.createElement("code",{style:a},"errorElement")," prop on your route."))),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:o},n):null,i)}const Gi=y.createElement(Zi,null);class Ki extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?y.createElement($e.Provider,{value:this.props.routeContext},y.createElement(Lr.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Yi(e){let{routeContext:t,match:n,children:r}=e,o=y.useContext(Tt);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),y.createElement($e.Provider,{value:t},r)}function Xi(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var a;if(!n)return null;if(n.errors)e=n.matches;else if((a=r)!=null&&a.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,s=(o=n)==null?void 0:o.errors;if(s!=null){let u=i.findIndex(d=>d.route.id&&(s==null?void 0:s[d.route.id])!==void 0);u>=0||(process.env.NODE_ENV!=="production"?I(!1,"Could not find a matching route for errors on route IDs: "+Object.keys(s).join(",")):I(!1)),i=i.slice(0,Math.min(i.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u<i.length;u++){let d=i[u];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(c=u),d.route.id){let{loaderData:h,errors:w}=n,m=d.route.loader&&h[d.route.id]===void 0&&(!w||w[d.route.id]===void 0);if(d.route.lazy||m){l=!0,c>=0?i=i.slice(0,c+1):i=[i[0]];break}}}return i.reduceRight((u,d,h)=>{let w,m=!1,p=null,v=null;n&&(w=s&&d.route.id?s[d.route.id]:void 0,p=d.route.errorElement||Gi,l&&(c<0&&h===0?(qo("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),m=!0,v=null):c===h&&(m=!0,v=d.route.hydrateFallbackElement||null)));let L=t.concat(i.slice(0,h+1)),b=()=>{let R;return w?R=p:m?R=v:d.route.Component?R=y.createElement(d.route.Component,null):d.route.element?R=d.route.element:R=u,y.createElement(Yi,{match:d,routeContext:{outlet:u,matches:L,isDataRoute:n!=null},children:R})};return n&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?y.createElement(Ki,{location:n.location,revalidation:n.revalidation,component:p,error:w,children:b(),routeContext:{outlet:null,matches:L,isDataRoute:!0}}):b()},null)}var Jo=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Jo||{}),Gt=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}(Gt||{});function Rr(e){return e+" must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router."}function Qi(e){let t=y.useContext(Tt);return t||(process.env.NODE_ENV!=="production"?I(!1,Rr(e)):I(!1)),t}function es(e){let t=y.useContext(Fn);return t||(process.env.NODE_ENV!=="production"?I(!1,Rr(e)):I(!1)),t}function ts(e){let t=y.useContext($e);return t||(process.env.NODE_ENV!=="production"?I(!1,Rr(e)):I(!1)),t}function kr(e){let t=ts(e),n=t.matches[t.matches.length-1];return n.route.id||(process.env.NODE_ENV!=="production"?I(!1,e+' can only be used on routes that contain a unique "id"'):I(!1)),n.route.id}function ns(){return kr(Gt.UseRouteId)}function Wo(){var e;let t=y.useContext(Lr),n=es(Gt.UseRouteError),r=kr(Gt.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function rs(){let{router:e}=Qi(Jo.UseNavigateStable),t=kr(Gt.UseNavigateStable),n=y.useRef(!1);return zo(()=>{n.current=!0}),y.useCallback(function(o,a){a===void 0&&(a={}),process.env.NODE_ENV!=="production"&&Se(n.current,$o),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Nn({fromRouteId:t},a)))},[e,t])}const lo={};function qo(e,t,n){!t&&!lo[e]&&(lo[e]=!0,process.env.NODE_ENV!=="production"&&Se(!1,n))}const co={};function os(e,t){process.env.NODE_ENV!=="production"&&!co[t]&&(co[t]=!0,console.warn(t))}const Lt=(e,t,n)=>os(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function as(e,t){(e==null?void 0:e.v7_startTransition)===void 0&&Lt("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),(e==null?void 0:e.v7_relativeSplatPath)===void 0&&(!t||!t.v7_relativeSplatPath)&&Lt("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath"),t&&(t.v7_fetcherPersist===void 0&&Lt("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),t.v7_normalizeFormMethod===void 0&&Lt("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod"),t.v7_partialHydration===void 0&&Lt("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),t.v7_skipActionErrorRevalidation===void 0&&Lt("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation"))}function is(e){let{to:t,replace:n,state:r,relative:o}=e;Pt()||(process.env.NODE_ENV!=="production"?I(!1,"<Navigate> may be used only in the context of a <Router> component."):I(!1));let{future:a,static:i}=y.useContext(Ve);process.env.NODE_ENV!=="production"&&Se(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=y.useContext($e),{pathname:l}=We(),c=Xt(),u=Dn(t,An(s,a.v7_relativeSplatPath),l,o==="path"),d=JSON.stringify(u);return y.useEffect(()=>c(JSON.parse(d),{replace:n,state:r,relative:o}),[c,d,o,n,r]),null}function ss(e){return Ji(e.context)}function ls(e){let{basename:t="/",children:n=null,location:r,navigationType:o=ve.Pop,navigator:a,static:i=!1,future:s}=e;Pt()&&(process.env.NODE_ENV!=="production"?I(!1,"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."):I(!1));let l=t.replace(/^\/*/,"/"),c=y.useMemo(()=>({basename:l,navigator:a,static:i,future:Nn({v7_relativeSplatPath:!1},s)}),[l,s,a,i]);typeof r=="string"&&(r=dt(r));let{pathname:u="/",search:d="",hash:h="",state:w=null,key:m="default"}=r,p=y.useMemo(()=>{let v=Je(u,l);return v==null?null:{location:{pathname:v,search:d,hash:h,state:w,key:m},navigationType:o}},[l,u,d,h,w,m,o]);return process.env.NODE_ENV!=="production"&&Se(p!=null,'<Router basename="'+l+'"> is not able to match the URL '+('"'+u+d+h+'" because it does not start with the ')+"basename, so the <Router> won't render anything."),p==null?null:y.createElement(Ve.Provider,{value:c},y.createElement(In.Provider,{children:n,value:p}))}new Promise(()=>{});function cs(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(process.env.NODE_ENV!=="production"&&e.element&&process.env.NODE_ENV!=="production"&&Se(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:y.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(process.env.NODE_ENV!=="production"&&e.hydrateFallbackElement&&process.env.NODE_ENV!=="production"&&Se(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:y.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(process.env.NODE_ENV!=="production"&&e.errorElement&&process.env.NODE_ENV!=="production"&&Se(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:y.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}/**
|
|
23
|
-
* React Router DOM v6.30.0
|
|
24
|
-
*
|
|
25
|
-
* Copyright (c) Remix Software Inc.
|
|
26
|
-
*
|
|
27
|
-
* This source code is licensed under the MIT license found in the
|
|
28
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
29
|
-
*
|
|
30
|
-
* @license MIT
|
|
31
|
-
*/function ut(){return ut=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ut.apply(this,arguments)}function Nr(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}const Sn="get",bn="application/x-www-form-urlencoded";function Bn(e){return e!=null&&typeof e.tagName=="string"}function us(e){return Bn(e)&&e.tagName.toLowerCase()==="button"}function ds(e){return Bn(e)&&e.tagName.toLowerCase()==="form"}function fs(e){return Bn(e)&&e.tagName.toLowerCase()==="input"}function hs(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ps(e,t){return e.button===0&&(!t||t==="_self")&&!hs(e)}function dr(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(o=>[n,o]):[[n,r]])},[]))}function ms(e,t){let n=dr(e);return t&&t.forEach((r,o)=>{n.has(o)||t.getAll(o).forEach(a=>{n.append(o,a)})}),n}let mn=null;function gs(){if(mn===null)try{new FormData(document.createElement("form"),0),mn=!1}catch{mn=!0}return mn}const ys=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Qn(e){return e!=null&&!ys.has(e)?(process.env.NODE_ENV!=="production"&&Se(!1,'"'+e+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+bn+'"')),null):e}function vs(e,t){let n,r,o,a,i;if(ds(e)){let s=e.getAttribute("action");r=s?Je(s,t):null,n=e.getAttribute("method")||Sn,o=Qn(e.getAttribute("enctype"))||bn,a=new FormData(e)}else if(us(e)||fs(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||s.getAttribute("action");if(r=l?Je(l,t):null,n=e.getAttribute("formmethod")||s.getAttribute("method")||Sn,o=Qn(e.getAttribute("formenctype"))||Qn(s.getAttribute("enctype"))||bn,a=new FormData(s,e),!gs()){let{name:c,type:u,value:d}=e;if(u==="image"){let h=c?c+".":"";a.append(h+"x","0"),a.append(h+"y","0")}else c&&a.append(c,d)}}else{if(Bn(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Sn,r=null,o=bn,i=e}return a&&o==="text/plain"&&(i=a,a=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:a,body:i}}const ws=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Ss=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],bs=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","viewTransition"],Cs="6";try{window.__reactRouterVersion=Cs}catch{}function Es(e,t){return bi({basename:void 0,future:ut({},void 0,{v7_prependBasename:!0}),history:Ja({window:void 0}),hydrationData:xs(),routes:e,mapRouteProperties:cs,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function xs(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=ut({},t,{errors:Ls(t.errors)})),t}function Ls(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,o]of t)if(o&&o.__type==="RouteErrorResponse")n[r]=new kn(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let a=window[o.__subType];if(typeof a=="function")try{let i=new a(o.message);i.stack="",n[r]=i}catch{}}if(n[r]==null){let a=new Error(o.message);a.stack="",n[r]=a}}else n[r]=o;return n}const Tr=y.createContext({isTransitioning:!1});process.env.NODE_ENV!=="production"&&(Tr.displayName="ViewTransition");const Zo=y.createContext(new Map);process.env.NODE_ENV!=="production"&&(Zo.displayName="Fetchers");const Rs="startTransition",uo=y[Rs],ks="flushSync",fo=za[ks];function Ns(e){uo?uo(e):e()}function jt(e){fo?fo(e):e()}class Ts{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function Ps(e){let{fallbackElement:t,router:n,future:r}=e,[o,a]=y.useState(n.state),[i,s]=y.useState(),[l,c]=y.useState({isTransitioning:!1}),[u,d]=y.useState(),[h,w]=y.useState(),[m,p]=y.useState(),v=y.useRef(new Map),{v7_startTransition:L}=r||{},b=y.useCallback(_=>{L?Ns(_):_()},[L]),R=y.useCallback((_,G)=>{let{deletedFetchers:B,flushSync:ae,viewTransitionOpts:ee}=G;_.fetchers.forEach((he,Oe)=>{he.data!==void 0&&v.current.set(Oe,he.data)}),B.forEach(he=>v.current.delete(he));let te=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!ee||te){ae?jt(()=>a(_)):b(()=>a(_));return}if(ae){jt(()=>{h&&(u&&u.resolve(),h.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:ee.currentLocation,nextLocation:ee.nextLocation})});let he=n.window.document.startViewTransition(()=>{jt(()=>a(_))});he.finished.finally(()=>{jt(()=>{d(void 0),w(void 0),s(void 0),c({isTransitioning:!1})})}),jt(()=>w(he));return}h?(u&&u.resolve(),h.skipTransition(),p({state:_,currentLocation:ee.currentLocation,nextLocation:ee.nextLocation})):(s(_),c({isTransitioning:!0,flushSync:!1,currentLocation:ee.currentLocation,nextLocation:ee.nextLocation}))},[n.window,h,u,v,b]);y.useLayoutEffect(()=>n.subscribe(R),[n,R]),y.useEffect(()=>{l.isTransitioning&&!l.flushSync&&d(new Ts)},[l]),y.useEffect(()=>{if(u&&i&&n.window){let _=i,G=u.promise,B=n.window.document.startViewTransition(async()=>{b(()=>a(_)),await G});B.finished.finally(()=>{d(void 0),w(void 0),s(void 0),c({isTransitioning:!1})}),w(B)}},[b,i,u,n.window]),y.useEffect(()=>{u&&i&&o.location.key===i.location.key&&u.resolve()},[u,h,o.location,i]),y.useEffect(()=>{!l.isTransitioning&&m&&(s(m.state),c({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),p(void 0))},[l.isTransitioning,m]),y.useEffect(()=>{process.env.NODE_ENV!=="production"&&Se(t==null||!n.future.v7_partialHydration,"`<RouterProvider fallbackElement>` is deprecated when using `v7_partialHydration`, use a `HydrateFallback` component instead")},[]);let P=y.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:_=>n.navigate(_),push:(_,G,B)=>n.navigate(_,{state:G,preventScrollReset:B==null?void 0:B.preventScrollReset}),replace:(_,G,B)=>n.navigate(_,{replace:!0,state:G,preventScrollReset:B==null?void 0:B.preventScrollReset})}),[n]),T=n.basename||"/",H=y.useMemo(()=>({router:n,navigator:P,static:!1,basename:T}),[n,P,T]),S=y.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return y.useEffect(()=>as(r,n.future),[r,n.future]),y.createElement(y.Fragment,null,y.createElement(Tt.Provider,{value:H},y.createElement(Fn.Provider,{value:o},y.createElement(Zo.Provider,{value:v.current},y.createElement(Tr.Provider,{value:l},y.createElement(ls,{basename:T,location:o.location,navigationType:o.historyAction,navigator:P,future:S},o.initialized||n.future.v7_partialHydration?y.createElement(_s,{routes:n.routes,future:n.future,state:o}):t))))),null)}const _s=y.memo(Os);function Os(e){let{routes:t,future:n,state:r}=e;return qi(t,void 0,r,n)}process.env.NODE_ENV;const Ms=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",As=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Go=y.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:a,replace:i,state:s,target:l,to:c,preventScrollReset:u,viewTransition:d}=t,h=Nr(t,ws),{basename:w}=y.useContext(Ve),m,p=!1;if(typeof c=="string"&&As.test(c)&&(m=c,Ms))try{let R=new URL(window.location.href),P=c.startsWith("//")?new URL(R.protocol+c):new URL(c),T=Je(P.pathname,w);P.origin===R.origin&&T!=null?c=T+P.search+P.hash:p=!0}catch{process.env.NODE_ENV!=="production"&&Se(!1,'<Link to="'+c+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let v=Vi(c,{relative:o}),L=Is(c,{replace:i,state:s,target:l,preventScrollReset:u,relative:o,viewTransition:d});function b(R){r&&r(R),R.defaultPrevented||L(R)}return y.createElement("a",ut({},h,{href:m||v,onClick:p||a?r:b,ref:n,target:l}))});process.env.NODE_ENV!=="production"&&(Go.displayName="Link");const Ko=y.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:o=!1,className:a="",end:i=!1,style:s,to:l,viewTransition:c,children:u}=t,d=Nr(t,Ss),h=Qt(l,{relative:d.relative}),w=We(),m=y.useContext(Fn),{navigator:p,basename:v}=y.useContext(Ve),L=m!=null&&zs(h)&&c===!0,b=p.encodeLocation?p.encodeLocation(h).pathname:h.pathname,R=w.pathname,P=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;o||(R=R.toLowerCase(),P=P?P.toLowerCase():null,b=b.toLowerCase()),P&&v&&(P=Je(P,v)||P);const T=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let H=R===b||!i&&R.startsWith(b)&&R.charAt(T)==="/",S=P!=null&&(P===b||!i&&P.startsWith(b)&&P.charAt(b.length)==="/"),_={isActive:H,isPending:S,isTransitioning:L},G=H?r:void 0,B;typeof a=="function"?B=a(_):B=[a,H?"active":null,S?"pending":null,L?"transitioning":null].filter(Boolean).join(" ");let ae=typeof s=="function"?s(_):s;return y.createElement(Go,ut({},d,{"aria-current":G,className:B,ref:n,style:ae,to:l,viewTransition:c}),typeof u=="function"?u(_):u)});process.env.NODE_ENV!=="production"&&(Ko.displayName="NavLink");const Ds=y.forwardRef((e,t)=>{let{fetcherKey:n,navigate:r,reloadDocument:o,replace:a,state:i,method:s=Sn,action:l,onSubmit:c,relative:u,preventScrollReset:d,viewTransition:h}=e,w=Nr(e,bs),m=Vs(),p=$s(l,{relative:u}),v=s.toLowerCase()==="get"?"get":"post",L=b=>{if(c&&c(b),b.defaultPrevented)return;b.preventDefault();let R=b.nativeEvent.submitter,P=(R==null?void 0:R.getAttribute("formmethod"))||s;m(R||b.currentTarget,{fetcherKey:n,method:P,navigate:r,replace:a,state:i,relative:u,preventScrollReset:d,viewTransition:h})};return y.createElement("form",ut({ref:t,method:v,action:p,onSubmit:o?c:L},w))});process.env.NODE_ENV!=="production"&&(Ds.displayName="Form");process.env.NODE_ENV;var Tn;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Tn||(Tn={}));var ho;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ho||(ho={}));function Fs(e){return e+" must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router."}function Yo(e){let t=y.useContext(Tt);return t||(process.env.NODE_ENV!=="production"?I(!1,Fs(e)):I(!1)),t}function Is(e,t){let{target:n,replace:r,state:o,preventScrollReset:a,relative:i,viewTransition:s}=t===void 0?{}:t,l=Xt(),c=We(),u=Qt(e,{relative:i});return y.useCallback(d=>{if(ps(d,n)){d.preventDefault();let h=r!==void 0?r:ct(c)===ct(u);l(e,{replace:h,state:o,preventScrollReset:a,relative:i,viewTransition:s})}},[c,l,u,r,o,n,e,a,i,s])}function Bs(e){process.env.NODE_ENV!=="production"&&Se(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=y.useRef(dr(e)),n=y.useRef(!1),r=We(),o=y.useMemo(()=>ms(r.search,n.current?null:t.current),[r.search]),a=Xt(),i=y.useCallback((s,l)=>{const c=dr(typeof s=="function"?s(o):s);n.current=!0,a("?"+c,l)},[a,o]);return[o,i]}function js(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}let Hs=0,Us=()=>"__"+String(++Hs)+"__";function Vs(){let{router:e}=Yo(Tn.UseSubmit),{basename:t}=y.useContext(Ve),n=ns();return y.useCallback(function(r,o){o===void 0&&(o={}),js();let{action:a,method:i,encType:s,formData:l,body:c}=vs(r,t);if(o.navigate===!1){let u=o.fetcherKey||Us();e.fetch(u,n,o.action||a,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||i,formEncType:o.encType||s,flushSync:o.flushSync})}else e.navigate(o.action||a,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||i,formEncType:o.encType||s,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[e,t,n])}function $s(e,t){let{relative:n}=t===void 0?{}:t,{basename:r}=y.useContext(Ve),o=y.useContext($e);o||(process.env.NODE_ENV!=="production"?I(!1,"useFormAction must be used inside a RouteContext"):I(!1));let[a]=o.matches.slice(-1),i=ut({},Qt(e||".",{relative:n})),s=We();if(e==null){i.search=s.search;let l=new URLSearchParams(i.search),c=l.getAll("index");if(c.some(d=>d==="")){l.delete("index"),c.filter(h=>h).forEach(h=>l.append("index",h));let d=l.toString();i.search=d?"?"+d:""}}return(!e||e===".")&&a.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:Qe([r,i.pathname])),ct(i)}function zs(e,t){t===void 0&&(t={});let n=y.useContext(Tr);n==null&&(process.env.NODE_ENV!=="production"?I(!1,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"):I(!1));let{basename:r}=Yo(Tn.useViewTransitionState),o=Qt(e,{relative:t.relative});if(!n.isTransitioning)return!1;let a=Je(n.currentLocation.pathname,r)||n.currentLocation.pathname,i=Je(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Rn(o.pathname,i)!=null||Rn(o.pathname,a)!=null}var Pr=(e=>(e.Home="Home",e.Orders="Orders",e.Rewards="Rewards",e.Balance="Balance",e.Subscriptions="Subscriptions",e.Tickets="Tickets",e.Api="API",e))(Pr||{}),Xo=(e=>(e.Home="Home",e.Orders="Orders",e.Rewards="Rewards",e.Balance="Balance",e.Tickets="Tickets",e.Api="API",e))(Xo||{});const Js=[{caption:"Share link",description:"Send the link to your friends in all convenient ways"},{caption:"Purchase",description:"They buy a product from our store"},{caption:"Percentages",description:"You get rewards"}],po=e=>{let t;const n=new Set,r=(c,u)=>{const d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){const h=t;t=u??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(w=>w(t,h))}},o=()=>t,s={setState:r,getState:o,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c))},l=t=e(r,o,s);return s},Ws=e=>e?po(e):po,qs=e=>e;function Zs(e,t=qs){const n=we.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return we.useDebugValue(n),n}const mo=e=>{const t=Ws(e),n=r=>Zs(t,r);return Object.assign(n,t),n},se=e=>e?mo(e):mo,Gs=se(e=>({action:null,setAction:t=>e(()=>({action:t})),route:Pr.Home,setRoute:t=>e(()=>({route:t})),dashInfo:null,setDashInfo:t=>e(()=>({dashInfo:t})),dashboardSettings:null,setDashboardSettings:t=>e(()=>({dashboardSettings:t})),balance:null,setBalance:t=>e(()=>({balance:t})),otpRequest:{requested:!1,email:""},setOtpRequest:t=>e(()=>({otpRequest:t})),balanceSettings:null,setBalanceSettings:t=>e(()=>({balanceSettings:t})),gatewaysDetail:null,setGatewaysDetail:t=>e(()=>({gatewaysDetail:t})),isBalanceModalOpen:!1,setIsBalanceModalOpen:t=>e(()=>({isBalanceModalOpen:t}))})),Ks=se(e=>({token:localStorage.getItem("token")||null,setToken:t=>e(()=>({token:t})),shopDomain:"",setShopDomain:t=>e(()=>({shopDomain:t})),shopId:"",setShopId:t=>e(()=>({shopId:t})),shopLogo:null,setShopLogo:t=>e(()=>({shopLogo:t})),shopPassword:localStorage.getItem("shopPassword")||"",setShopPassword:t=>e(()=>({shopPassword:t})),shopGeneral:null,setShopGeneral:t=>e(()=>({shopGeneral:t})),shopTerms:null,setShopTerms:t=>e(()=>({shopTerms:t})),shopPrivacyPolicy:null,setShopPrivacyPolicy:t=>e(()=>({shopPrivacyPolicy:t})),shopRefundPolicy:null,setShopRefundPolicy:t=>e(()=>({shopRefundPolicy:t}))}));class Jt extends Error{}Jt.prototype.name="InvalidTokenError";function Ys(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,n)=>{let r=n.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}function Xs(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return Ys(t)}catch{return atob(t)}}function Qo(e,t){if(typeof e!="string")throw new Jt("Invalid token specified: must be a string");t||(t={});const n=t.header===!0?0:1,r=e.split(".")[n];if(typeof r!="string")throw new Jt(`Invalid token specified: missing part #${n+1}`);let o;try{o=Xs(r)}catch(a){throw new Jt(`Invalid token specified: invalid base64 for part #${n+1} (${a.message})`)}try{return JSON.parse(o)}catch(a){throw new Jt(`Invalid token specified: invalid json for part #${n+1} (${a.message})`)}}function ea(e,t){return function(){return e.apply(t,arguments)}}const{toString:Qs}=Object.prototype,{getPrototypeOf:_r}=Object,jn=(e=>t=>{const n=Qs.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),qe=e=>(e=e.toLowerCase(),t=>jn(t)===e),Hn=e=>t=>typeof t===e,{isArray:_t}=Array,Kt=Hn("undefined");function el(e){return e!==null&&!Kt(e)&&e.constructor!==null&&!Kt(e.constructor)&&He(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ta=qe("ArrayBuffer");function tl(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ta(e.buffer),t}const nl=Hn("string"),He=Hn("function"),na=Hn("number"),Un=e=>e!==null&&typeof e=="object",rl=e=>e===!0||e===!1,Cn=e=>{if(jn(e)!=="object")return!1;const t=_r(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},ol=qe("Date"),al=qe("File"),il=qe("Blob"),sl=qe("FileList"),ll=e=>Un(e)&&He(e.pipe),cl=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||He(e.append)&&((t=jn(e))==="formdata"||t==="object"&&He(e.toString)&&e.toString()==="[object FormData]"))},ul=qe("URLSearchParams"),[dl,fl,hl,pl]=["ReadableStream","Request","Response","Headers"].map(qe),ml=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function en(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),_t(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),i=a.length;let s;for(r=0;r<i;r++)s=a[r],t.call(null,e[s],s,e)}}function ra(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const vt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,oa=e=>!Kt(e)&&e!==vt;function fr(){const{caseless:e}=oa(this)&&this||{},t={},n=(r,o)=>{const a=e&&ra(t,o)||o;Cn(t[a])&&Cn(r)?t[a]=fr(t[a],r):Cn(r)?t[a]=fr({},r):_t(r)?t[a]=r.slice():t[a]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&en(arguments[r],n);return t}const gl=(e,t,n,{allOwnKeys:r}={})=>(en(t,(o,a)=>{n&&He(o)?e[a]=ea(o,n):e[a]=o},{allOwnKeys:r}),e),yl=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),vl=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},wl=(e,t,n,r)=>{let o,a,i;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)i=o[a],(!r||r(i,e,t))&&!s[i]&&(t[i]=e[i],s[i]=!0);e=n!==!1&&_r(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Sl=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},bl=e=>{if(!e)return null;if(_t(e))return e;let t=e.length;if(!na(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Cl=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&_r(Uint8Array)),El=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},xl=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Ll=qe("HTMLFormElement"),Rl=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),go=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),kl=qe("RegExp"),aa=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};en(n,(o,a)=>{let i;(i=t(o,a,e))!==!1&&(r[a]=i||o)}),Object.defineProperties(e,r)},Nl=e=>{aa(e,(t,n)=>{if(He(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(He(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Tl=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return _t(e)?r(e):r(String(e).split(t)),n},Pl=()=>{},_l=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Ol(e){return!!(e&&He(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Ml=e=>{const t=new Array(10),n=(r,o)=>{if(Un(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const a=_t(r)?[]:{};return en(r,(i,s)=>{const l=n(i,o+1);!Kt(l)&&(a[s]=l)}),t[o]=void 0,a}}return r};return n(e,0)},Al=qe("AsyncFunction"),Dl=e=>e&&(Un(e)||He(e))&&He(e.then)&&He(e.catch),ia=((e,t)=>e?setImmediate:t?((n,r)=>(vt.addEventListener("message",({source:o,data:a})=>{o===vt&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),vt.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",He(vt.postMessage)),Fl=typeof queueMicrotask<"u"?queueMicrotask.bind(vt):typeof process<"u"&&process.nextTick||ia,E={isArray:_t,isArrayBuffer:ta,isBuffer:el,isFormData:cl,isArrayBufferView:tl,isString:nl,isNumber:na,isBoolean:rl,isObject:Un,isPlainObject:Cn,isReadableStream:dl,isRequest:fl,isResponse:hl,isHeaders:pl,isUndefined:Kt,isDate:ol,isFile:al,isBlob:il,isRegExp:kl,isFunction:He,isStream:ll,isURLSearchParams:ul,isTypedArray:Cl,isFileList:sl,forEach:en,merge:fr,extend:gl,trim:ml,stripBOM:yl,inherits:vl,toFlatObject:wl,kindOf:jn,kindOfTest:qe,endsWith:Sl,toArray:bl,forEachEntry:El,matchAll:xl,isHTMLForm:Ll,hasOwnProperty:go,hasOwnProp:go,reduceDescriptors:aa,freezeMethods:Nl,toObjectSet:Tl,toCamelCase:Rl,noop:Pl,toFiniteNumber:_l,findKey:ra,global:vt,isContextDefined:oa,isSpecCompliantForm:Ol,toJSONObject:Ml,isAsyncFn:Al,isThenable:Dl,setImmediate:ia,asap:Fl};function $(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}E.inherits($,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:E.toJSONObject(this.config),code:this.code,status:this.status}}});const sa=$.prototype,la={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{la[e]={value:e}});Object.defineProperties($,la);Object.defineProperty(sa,"isAxiosError",{value:!0});$.from=(e,t,n,r,o,a)=>{const i=Object.create(sa);return E.toFlatObject(e,i,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),$.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,a&&Object.assign(i,a),i};const Il=null;function hr(e){return E.isPlainObject(e)||E.isArray(e)}function ca(e){return E.endsWith(e,"[]")?e.slice(0,-2):e}function yo(e,t,n){return e?e.concat(t).map(function(o,a){return o=ca(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function Bl(e){return E.isArray(e)&&!e.some(hr)}const jl=E.toFlatObject(E,{},null,function(t){return/^is[A-Z]/.test(t)});function Vn(e,t,n){if(!E.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=E.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,v){return!E.isUndefined(v[p])});const r=n.metaTokens,o=n.visitor||u,a=n.dots,i=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&E.isSpecCompliantForm(t);if(!E.isFunction(o))throw new TypeError("visitor must be a function");function c(m){if(m===null)return"";if(E.isDate(m))return m.toISOString();if(!l&&E.isBlob(m))throw new $("Blob is not supported. Use a Buffer instead.");return E.isArrayBuffer(m)||E.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,p,v){let L=m;if(m&&!v&&typeof m=="object"){if(E.endsWith(p,"{}"))p=r?p:p.slice(0,-2),m=JSON.stringify(m);else if(E.isArray(m)&&Bl(m)||(E.isFileList(m)||E.endsWith(p,"[]"))&&(L=E.toArray(m)))return p=ca(p),L.forEach(function(R,P){!(E.isUndefined(R)||R===null)&&t.append(i===!0?yo([p],P,a):i===null?p:p+"[]",c(R))}),!1}return hr(m)?!0:(t.append(yo(v,p,a),c(m)),!1)}const d=[],h=Object.assign(jl,{defaultVisitor:u,convertValue:c,isVisitable:hr});function w(m,p){if(!E.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+p.join("."));d.push(m),E.forEach(m,function(L,b){(!(E.isUndefined(L)||L===null)&&o.call(t,L,E.isString(b)?b.trim():b,p,h))===!0&&w(L,p?p.concat(b):[b])}),d.pop()}}if(!E.isObject(e))throw new TypeError("data must be an object");return w(e),t}function vo(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Or(e,t){this._pairs=[],e&&Vn(e,this,t)}const ua=Or.prototype;ua.append=function(t,n){this._pairs.push([t,n])};ua.toString=function(t){const n=t?function(r){return t.call(this,r,vo)}:vo;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Hl(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function da(e,t,n){if(!t)return e;const r=n&&n.encode||Hl;E.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let a;if(o?a=o(t,n):a=E.isURLSearchParams(t)?t.toString():new Or(t,n).toString(r),a){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class wo{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){E.forEach(this.handlers,function(r){r!==null&&t(r)})}}const fa={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ul=typeof URLSearchParams<"u"?URLSearchParams:Or,Vl=typeof FormData<"u"?FormData:null,$l=typeof Blob<"u"?Blob:null,zl={isBrowser:!0,classes:{URLSearchParams:Ul,FormData:Vl,Blob:$l},protocols:["http","https","file","blob","url","data"]},Mr=typeof window<"u"&&typeof document<"u",pr=typeof navigator=="object"&&navigator||void 0,Jl=Mr&&(!pr||["ReactNative","NativeScript","NS"].indexOf(pr.product)<0),Wl=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ql=Mr&&window.location.href||"http://localhost",Zl=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Mr,hasStandardBrowserEnv:Jl,hasStandardBrowserWebWorkerEnv:Wl,navigator:pr,origin:ql},Symbol.toStringTag,{value:"Module"})),Ne={...Zl,...zl};function Gl(e,t){return Vn(e,new Ne.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,a){return Ne.isNode&&E.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function Kl(e){return E.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Yl(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function ha(e){function t(n,r,o,a){let i=n[a++];if(i==="__proto__")return!0;const s=Number.isFinite(+i),l=a>=n.length;return i=!i&&E.isArray(o)?o.length:i,l?(E.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!s):((!o[i]||!E.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],a)&&E.isArray(o[i])&&(o[i]=Yl(o[i])),!s)}if(E.isFormData(e)&&E.isFunction(e.entries)){const n={};return E.forEachEntry(e,(r,o)=>{t(Kl(r),o,n,0)}),n}return null}function Xl(e,t,n){if(E.isString(e))try{return(t||JSON.parse)(e),E.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const tn={transitional:fa,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=E.isObject(t);if(a&&E.isHTMLForm(t)&&(t=new FormData(t)),E.isFormData(t))return o?JSON.stringify(ha(t)):t;if(E.isArrayBuffer(t)||E.isBuffer(t)||E.isStream(t)||E.isFile(t)||E.isBlob(t)||E.isReadableStream(t))return t;if(E.isArrayBufferView(t))return t.buffer;if(E.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Gl(t,this.formSerializer).toString();if((s=E.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Vn(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),Xl(t)):t}],transformResponse:[function(t){const n=this.transitional||tn.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(E.isResponse(t)||E.isReadableStream(t))return t;if(t&&E.isString(t)&&(r&&!this.responseType||o)){const i=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(i)throw s.name==="SyntaxError"?$.from(s,$.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ne.classes.FormData,Blob:Ne.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};E.forEach(["delete","get","head","post","put","patch"],e=>{tn.headers[e]={}});const Ql=E.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ec=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
32
|
-
`).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||t[n]&&Ql[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},So=Symbol("internals");function Ht(e){return e&&String(e).trim().toLowerCase()}function En(e){return e===!1||e==null?e:E.isArray(e)?e.map(En):String(e)}function tc(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const nc=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function er(e,t,n,r,o){if(E.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!E.isString(t)){if(E.isString(r))return t.indexOf(r)!==-1;if(E.isRegExp(r))return r.test(t)}}function rc(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function oc(e,t){const n=E.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,a,i){return this[r].call(this,t,o,a,i)},configurable:!0})})}let De=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(s,l,c){const u=Ht(l);if(!u)throw new Error("header name must be a non-empty string");const d=E.findKey(o,u);(!d||o[d]===void 0||c===!0||c===void 0&&o[d]!==!1)&&(o[d||l]=En(s))}const i=(s,l)=>E.forEach(s,(c,u)=>a(c,u,l));if(E.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(E.isString(t)&&(t=t.trim())&&!nc(t))i(ec(t),n);else if(E.isHeaders(t))for(const[s,l]of t.entries())a(l,s,r);else t!=null&&a(n,t,r);return this}get(t,n){if(t=Ht(t),t){const r=E.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return tc(o);if(E.isFunction(n))return n.call(this,o,r);if(E.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ht(t),t){const r=E.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||er(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(i){if(i=Ht(i),i){const s=E.findKey(r,i);s&&(!n||er(r,r[s],s,n))&&(delete r[s],o=!0)}}return E.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||er(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return E.forEach(this,(o,a)=>{const i=E.findKey(r,a);if(i){n[i]=En(o),delete n[a];return}const s=t?rc(a):String(a).trim();s!==a&&delete n[a],n[s]=En(o),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return E.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&E.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
33
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[So]=this[So]={accessors:{}}).accessors,o=this.prototype;function a(i){const s=Ht(i);r[s]||(oc(o,i),r[s]=!0)}return E.isArray(t)?t.forEach(a):a(t),this}};De.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);E.reduceDescriptors(De.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});E.freezeMethods(De);function tr(e,t){const n=this||tn,r=t||n,o=De.from(r.headers);let a=r.data;return E.forEach(e,function(s){a=s.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function pa(e){return!!(e&&e.__CANCEL__)}function Ot(e,t,n){$.call(this,e??"canceled",$.ERR_CANCELED,t,n),this.name="CanceledError"}E.inherits(Ot,$,{__CANCEL__:!0});function ma(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new $("Request failed with status code "+n.status,[$.ERR_BAD_REQUEST,$.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function ac(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function ic(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,i;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[a];i||(i=c),n[o]=l,r[o]=c;let d=a,h=0;for(;d!==o;)h+=n[d++],d=d%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),c-i<t)return;const w=u&&c-u;return w?Math.round(h*1e3/w):void 0}}function sc(e,t){let n=0,r=1e3/t,o,a;const i=(c,u=Date.now())=>{n=u,o=null,a&&(clearTimeout(a),a=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),d=u-n;d>=r?i(c,u):(o=c,a||(a=setTimeout(()=>{a=null,i(o)},r-d)))},()=>o&&i(o)]}const Pn=(e,t,n=3)=>{let r=0;const o=ic(50,250);return sc(a=>{const i=a.loaded,s=a.lengthComputable?a.total:void 0,l=i-r,c=o(l),u=i<=s;r=i;const d={loaded:i,total:s,progress:s?i/s:void 0,bytes:l,rate:c||void 0,estimated:c&&s&&u?(s-i)/c:void 0,event:a,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(d)},n)},bo=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Co=e=>(...t)=>E.asap(()=>e(...t)),lc=Ne.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ne.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ne.origin),Ne.navigator&&/(msie|trident)/i.test(Ne.navigator.userAgent)):()=>!0,cc=Ne.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const i=[e+"="+encodeURIComponent(t)];E.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),E.isString(r)&&i.push("path="+r),E.isString(o)&&i.push("domain="+o),a===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function uc(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function dc(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ga(e,t,n){let r=!uc(t);return e&&r||n==!1?dc(e,t):t}const Eo=e=>e instanceof De?{...e}:e;function St(e,t){t=t||{};const n={};function r(c,u,d,h){return E.isPlainObject(c)&&E.isPlainObject(u)?E.merge.call({caseless:h},c,u):E.isPlainObject(u)?E.merge({},u):E.isArray(u)?u.slice():u}function o(c,u,d,h){if(E.isUndefined(u)){if(!E.isUndefined(c))return r(void 0,c,d,h)}else return r(c,u,d,h)}function a(c,u){if(!E.isUndefined(u))return r(void 0,u)}function i(c,u){if(E.isUndefined(u)){if(!E.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function s(c,u,d){if(d in t)return r(c,u);if(d in e)return r(void 0,c)}const l={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:(c,u,d)=>o(Eo(c),Eo(u),d,!0)};return E.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=l[u]||o,h=d(e[u],t[u],u);E.isUndefined(h)&&d!==s||(n[u]=h)}),n}const ya=e=>{const t=St({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:i,auth:s}=t;t.headers=i=De.from(i),t.url=da(ga(t.baseURL,t.url),e.params,e.paramsSerializer),s&&i.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let l;if(E.isFormData(n)){if(Ne.hasStandardBrowserEnv||Ne.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((l=i.getContentType())!==!1){const[c,...u]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];i.setContentType([c||"multipart/form-data",...u].join("; "))}}if(Ne.hasStandardBrowserEnv&&(r&&E.isFunction(r)&&(r=r(t)),r||r!==!1&&lc(t.url))){const c=o&&a&&cc.read(a);c&&i.set(o,c)}return t},fc=typeof XMLHttpRequest<"u",hc=fc&&function(e){return new Promise(function(n,r){const o=ya(e);let a=o.data;const i=De.from(o.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:c}=o,u,d,h,w,m;function p(){w&&w(),m&&m(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let v=new XMLHttpRequest;v.open(o.method.toUpperCase(),o.url,!0),v.timeout=o.timeout;function L(){if(!v)return;const R=De.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),T={data:!s||s==="text"||s==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:R,config:e,request:v};ma(function(S){n(S),p()},function(S){r(S),p()},T),v=null}"onloadend"in v?v.onloadend=L:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(L)},v.onabort=function(){v&&(r(new $("Request aborted",$.ECONNABORTED,e,v)),v=null)},v.onerror=function(){r(new $("Network Error",$.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let P=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const T=o.transitional||fa;o.timeoutErrorMessage&&(P=o.timeoutErrorMessage),r(new $(P,T.clarifyTimeoutError?$.ETIMEDOUT:$.ECONNABORTED,e,v)),v=null},a===void 0&&i.setContentType(null),"setRequestHeader"in v&&E.forEach(i.toJSON(),function(P,T){v.setRequestHeader(T,P)}),E.isUndefined(o.withCredentials)||(v.withCredentials=!!o.withCredentials),s&&s!=="json"&&(v.responseType=o.responseType),c&&([h,m]=Pn(c,!0),v.addEventListener("progress",h)),l&&v.upload&&([d,w]=Pn(l),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",w)),(o.cancelToken||o.signal)&&(u=R=>{v&&(r(!R||R.type?new Ot(null,e,v):R),v.abort(),v=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const b=ac(o.url);if(b&&Ne.protocols.indexOf(b)===-1){r(new $("Unsupported protocol "+b+":",$.ERR_BAD_REQUEST,e));return}v.send(a||null)})},pc=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const a=function(c){if(!o){o=!0,s();const u=c instanceof Error?c:this.reason;r.abort(u instanceof $?u:new Ot(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,a(new $(`timeout ${t} of ms exceeded`,$.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(a):c.removeEventListener("abort",a)}),e=null)};e.forEach(c=>c.addEventListener("abort",a));const{signal:l}=r;return l.unsubscribe=()=>E.asap(s),l}},mc=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},gc=async function*(e,t){for await(const n of yc(e))yield*mc(n,t)},yc=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},xo=(e,t,n,r)=>{const o=gc(e,t);let a=0,i,s=l=>{i||(i=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await o.next();if(c){s(),l.close();return}let d=u.byteLength;if(n){let h=a+=d;n(h)}l.enqueue(new Uint8Array(u))}catch(c){throw s(c),c}},cancel(l){return s(l),o.return()}},{highWaterMark:2})},$n=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",va=$n&&typeof ReadableStream=="function",vc=$n&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),wa=(e,...t)=>{try{return!!e(...t)}catch{return!1}},wc=va&&wa(()=>{let e=!1;const t=new Request(Ne.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Lo=64*1024,mr=va&&wa(()=>E.isReadableStream(new Response("").body)),_n={stream:mr&&(e=>e.body)};$n&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!_n[t]&&(_n[t]=E.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new $(`Response type '${t}' is not supported`,$.ERR_NOT_SUPPORT,r)})})})(new Response);const Sc=async e=>{if(e==null)return 0;if(E.isBlob(e))return e.size;if(E.isSpecCompliantForm(e))return(await new Request(Ne.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(E.isArrayBufferView(e)||E.isArrayBuffer(e))return e.byteLength;if(E.isURLSearchParams(e)&&(e=e+""),E.isString(e))return(await vc(e)).byteLength},bc=async(e,t)=>{const n=E.toFiniteNumber(e.getContentLength());return n??Sc(t)},Cc=$n&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:a,timeout:i,onDownloadProgress:s,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:h}=ya(e);c=c?(c+"").toLowerCase():"text";let w=pc([o,a&&a.toAbortSignal()],i),m;const p=w&&w.unsubscribe&&(()=>{w.unsubscribe()});let v;try{if(l&&wc&&n!=="get"&&n!=="head"&&(v=await bc(u,r))!==0){let T=new Request(t,{method:"POST",body:r,duplex:"half"}),H;if(E.isFormData(r)&&(H=T.headers.get("content-type"))&&u.setContentType(H),T.body){const[S,_]=bo(v,Pn(Co(l)));r=xo(T.body,Lo,S,_)}}E.isString(d)||(d=d?"include":"omit");const L="credentials"in Request.prototype;m=new Request(t,{...h,signal:w,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:L?d:void 0});let b=await fetch(m);const R=mr&&(c==="stream"||c==="response");if(mr&&(s||R&&p)){const T={};["status","statusText","headers"].forEach(G=>{T[G]=b[G]});const H=E.toFiniteNumber(b.headers.get("content-length")),[S,_]=s&&bo(H,Pn(Co(s),!0))||[];b=new Response(xo(b.body,Lo,S,()=>{_&&_(),p&&p()}),T)}c=c||"text";let P=await _n[E.findKey(_n,c)||"text"](b,e);return!R&&p&&p(),await new Promise((T,H)=>{ma(T,H,{data:P,headers:De.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:m})})}catch(L){throw p&&p(),L&&L.name==="TypeError"&&/fetch/i.test(L.message)?Object.assign(new $("Network Error",$.ERR_NETWORK,e,m),{cause:L.cause||L}):$.from(L,L&&L.code,e,m)}}),gr={http:Il,xhr:hc,fetch:Cc};E.forEach(gr,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ro=e=>`- ${e}`,Ec=e=>E.isFunction(e)||e===null||e===!1,Sa={getAdapter:e=>{e=E.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let a=0;a<t;a++){n=e[a];let i;if(r=n,!Ec(n)&&(r=gr[(i=String(n)).toLowerCase()],r===void 0))throw new $(`Unknown adapter '${i}'`);if(r)break;o[i||"#"+a]=r}if(!r){const a=Object.entries(o).map(([s,l])=>`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let i=t?a.length>1?`since :
|
|
34
|
-
`+a.map(Ro).join(`
|
|
35
|
-
`):" "+Ro(a[0]):"as no adapter specified";throw new $("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:gr};function nr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ot(null,e)}function ko(e){return nr(e),e.headers=De.from(e.headers),e.data=tr.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Sa.getAdapter(e.adapter||tn.adapter)(e).then(function(r){return nr(e),r.data=tr.call(e,e.transformResponse,r),r.headers=De.from(r.headers),r},function(r){return pa(r)||(nr(e),r&&r.response&&(r.response.data=tr.call(e,e.transformResponse,r.response),r.response.headers=De.from(r.response.headers))),Promise.reject(r)})}const ba="1.8.1",zn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{zn[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const No={};zn.transitional=function(t,n,r){function o(a,i){return"[Axios v"+ba+"] Transitional option '"+a+"'"+i+(r?". "+r:"")}return(a,i,s)=>{if(t===!1)throw new $(o(i," has been removed"+(n?" in "+n:"")),$.ERR_DEPRECATED);return n&&!No[i]&&(No[i]=!0,console.warn(o(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,i,s):!0}};zn.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function xc(e,t,n){if(typeof e!="object")throw new $("options must be an object",$.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],i=t[a];if(i){const s=e[a],l=s===void 0||i(s,a,e);if(l!==!0)throw new $("option "+a+" must be "+l,$.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new $("Unknown option "+a,$.ERR_BAD_OPTION)}}const xn={assertOptions:xc,validators:zn},Xe=xn.validators;let wt=class{constructor(t){this.defaults=t,this.interceptors={request:new wo,response:new wo}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
36
|
-
`+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=St(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&xn.assertOptions(r,{silentJSONParsing:Xe.transitional(Xe.boolean),forcedJSONParsing:Xe.transitional(Xe.boolean),clarifyTimeoutError:Xe.transitional(Xe.boolean)},!1),o!=null&&(E.isFunction(o)?n.paramsSerializer={serialize:o}:xn.assertOptions(o,{encode:Xe.function,serialize:Xe.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),xn.assertOptions(n,{baseUrl:Xe.spelling("baseURL"),withXsrfToken:Xe.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=a&&E.merge(a.common,a[n.method]);a&&E.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),n.headers=De.concat(i,a);const s=[];let l=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(l=l&&p.synchronous,s.unshift(p.fulfilled,p.rejected))});const c=[];this.interceptors.response.forEach(function(p){c.push(p.fulfilled,p.rejected)});let u,d=0,h;if(!l){const m=[ko.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,c),h=m.length,u=Promise.resolve(n);d<h;)u=u.then(m[d++],m[d++]);return u}h=s.length;let w=n;for(d=0;d<h;){const m=s[d++],p=s[d++];try{w=m(w)}catch(v){p.call(this,v);break}}try{u=ko.call(this,w)}catch(m){return Promise.reject(m)}for(d=0,h=c.length;d<h;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=St(this.defaults,t);const n=ga(t.baseURL,t.url,t.allowAbsoluteUrls);return da(n,t.params,t.paramsSerializer)}};E.forEach(["delete","get","head","options"],function(t){wt.prototype[t]=function(n,r){return this.request(St(r||{},{method:t,url:n,data:(r||{}).data}))}});E.forEach(["post","put","patch"],function(t){function n(r){return function(a,i,s){return this.request(St(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}wt.prototype[t]=n(),wt.prototype[t+"Form"]=n(!0)});let Lc=class Ca{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const i=new Promise(s=>{r.subscribe(s),a=s}).then(o);return i.cancel=function(){r.unsubscribe(a)},i},t(function(a,i,s){r.reason||(r.reason=new Ot(a,i,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Ca(function(o){t=o}),cancel:t}}};function Rc(e){return function(n){return e.apply(null,n)}}function kc(e){return E.isObject(e)&&e.isAxiosError===!0}const yr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(yr).forEach(([e,t])=>{yr[t]=e});function Ea(e){const t=new wt(e),n=ea(wt.prototype.request,t);return E.extend(n,wt.prototype,t,{allOwnKeys:!0}),E.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Ea(St(e,o))},n}const ce=Ea(tn);ce.Axios=wt;ce.CanceledError=Ot;ce.CancelToken=Lc;ce.isCancel=pa;ce.VERSION=ba;ce.toFormData=Vn;ce.AxiosError=$;ce.Cancel=ce.CanceledError;ce.all=function(t){return Promise.all(t)};ce.spread=Rc;ce.isAxiosError=kc;ce.mergeConfig=St;ce.AxiosHeaders=De;ce.formToJSON=e=>ha(E.isHTMLForm(e)?new FormData(e):e);ce.getAdapter=Sa.getAdapter;ce.HttpStatusCode=yr;ce.default=ce;const{Axios:af,AxiosError:Nc,CanceledError:sf,isCancel:lf,CancelToken:cf,VERSION:uf,all:df,Cancel:ff,isAxiosError:hf,spread:pf,toFormData:mf,AxiosHeaders:gf,HttpStatusCode:yf,formToJSON:vf,getAdapter:wf,mergeConfig:Sf}=ce,gn="https://localhost:5043",at=async e=>{var h,w;const{url:t,withToken:n,method:r,body:o,contentType:a,typeToken:i="seller"}=e,s=n?localStorage.getItem("sellerAccessToken"):null,l=n?localStorage.getItem("token"):null,c=i==="seller"?s:l,u=localStorage.getItem("dv"),d={};a&&!(o instanceof FormData)?d["Content-Type"]=a:o instanceof FormData||(d["Content-Type"]="application/json"),n&&c&&(d.Authorization=`Bearer ${c}`);try{let m=null;switch(r){case"get":m=await ce.get(u?gn:t,{headers:d});break;case"post":m=await ce.post(u?gn:t,o,{headers:d});break;case"put":m=await ce.put(u?gn:t,o,{headers:d});break;case"delete":m=await ce.delete(u?gn:t,{headers:d});break}return{data:m==null?void 0:m.data,status:m==null?void 0:m.status,headers:m==null?void 0:m.headers}}catch(m){const p=m,v=(h=p.response)==null?void 0:h.data;let L="Something Went Wrong";v&&(L=v.errors[0]);const b=(w=p.response)==null?void 0:w.status;if(b===401)try{const P=await Promise.resolve().then(()=>require("./charge-w4kIp324.cjs")).then(T=>T.auth);P&&P.logoutCustomer?await P.logoutCustomer():localStorage.removeItem("token"),window.location.reload()}catch(P){console.error("Failed to import logoutCustomer:",P),localStorage.removeItem("token"),window.location.reload()}const R=new Nc(L,(b==null?void 0:b.toString())||"400");throw R.response=p.response,R}},Tc="https://g-api.billgang.com",Pc="https://www.googleapis.com/webfonts/v1/webfonts",_c="https://stores-api.billgang.com",Oc="https://sl-api.billgang.com",Mc="https://customers-api.billgang.com",Ac="https://cashapp-api.billgang.com",Dc={api:Tc,googleFonts:Pc,storeApi:_c,slApi:Oc,customersApi:Mc,cashappApi:Ac},Fc=(e,t="300")=>e==="not found"?"empty":`https://imagedelivery.net/${e}/w=${t}`,Ic=e=>{const t=new Intl.NumberFormat("en-US",{style:"currency",currency:e.currency||"USD"});let n=e.amount;return e.quantity&&(n=n*e.quantity),t.format(n)},Bc=(e,t)=>{if(e===0)throw new Error("Old value cannot be zero, as it would result in division by zero.");return(t-e)/Math.abs(e)*100},jc=e=>{if(Math.abs(e-365)<=15){const a=Math.round(e/365);return a===1?"year":`${a} years`}else if(Math.abs(e-30)<=5){const a=Math.round(e/30);return a===1?"month":`${a} months`}else return`${e} days`},Hc=e=>new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),Uc=e=>{const t=new Date(e),n={day:"2-digit",month:"2-digit",year:"numeric"},r={hour:"2-digit",minute:"2-digit"},o=t.toLocaleString("en-US",n),a=t.toLocaleString("en-US",r);return[o,a]},vr=e=>{const t=window.localStorage.getItem(e);if(t===null)return null;try{return JSON.parse(t)}catch{return t}},To=(e,t)=>{(t===null||typeof t!="object")&&window.localStorage.setItem(e,String(t));const n=JSON.stringify(t);window.localStorage.setItem(e,n)},rr="f10120ab-7ebb-4785-b240-7428edaa3c4e",Ut="https://t-api.billgang.com",Vt="https://internal-t-api.antistock.io",Wt="I",Vc=10*1e3,$c=15*1e3,zc=15*60*1e3,xa=()=>{var t;const e=vr(Wt);return((t=e==null?void 0:e.s)==null?void 0:t.i)||null},Jc=(e,t="production",n)=>{const{pathname:r}=We(),o=we.useRef(),a=we.useRef(document.visibilityState);we.useEffect(()=>{if(!e)return;const i=()=>Date.now(),s=async()=>(await at({url:`${n?Vt:Ut}/${e}/t/p`,method:"post",withToken:!1})).data.data.id,l=async m=>(await at({url:`${n?Vt:Ut}/${e}/t/p/${t==="development"?rr:m}/s`,method:"post",withToken:!1})).data.data.id,c=async(m,p,v,L)=>{const b=t==="development"?rr:m;try{return(await at({url:`${n?Vt:Ut}/${e}/t/p/${b}/s/${p}/e`,method:"post",withToken:!1,body:{url:v,oldEventId:L},contentType:"application/json"})).data.data.id}catch{return p=await l(m),(await at({url:`${n?Vt:Ut}/${e}/t/p/${b}/s/${p}/e`,method:"post",withToken:!1,body:{url:v},contentType:"application/json"})).data.data.id}},u=async(m,p,v)=>{await at({url:`${n?Vt:Ut}/${e}/t/p/${t==="development"?rr:m}/s/${p}/e/${v}/h`,method:"post",withToken:!1});const b=vr(Wt);b&&(b.s.u=i().toString(),b.lu=i().toString(),To(Wt,b))},d=(m,p,v)=>{o.current&&clearInterval(o.current),o.current=setInterval(async()=>{if(document.visibilityState==="visible")try{await u(m,p,v)}catch{await h()}},Vc)},h=async()=>{var L,b,R,P;const m=`${window.location.hostname}${r}`,p=vr(Wt),v=i();try{let T=p==null?void 0:p.p;T||(T=await s());let H=(L=p==null?void 0:p.s)==null?void 0:L.i;const S=Number(((b=p==null?void 0:p.s)==null?void 0:b.u)||((R=p==null?void 0:p.s)==null?void 0:R.c)),_=!H||v-S>zc;(!H||_)&&(H=await l(T));const G=Number((p==null?void 0:p.lu)||0),B=v-G>$c,ae=await c(T,H,m,p!=null&&p.l&&!B?p.l:void 0),ee={p:T,s:{i:H,c:((P=p==null?void 0:p.s)==null?void 0:P.c)??v.toString(),u:v.toString()},l:ae,lu:v.toString()};To(Wt,ee),d(T,H,ae)}catch(T){console.error("[TrackingAnalytics] error",T)}};h();const w=()=>{document.visibilityState==="visible"&&a.current!=="visible"&&h(),a.current=document.visibilityState};return document.addEventListener("visibilitychange",w),()=>{o.current&&clearInterval(o.current),document.removeEventListener("visibilitychange",w)}},[r,e,t])},Wc={customerEmail:"",recaptcha:"",gateway:"",paymentMethod:"",parts:[],customFields:{},discordSocialConnectId:null,coupon:null,tsId:xa()};let Nt=null;const Po=localStorage.getItem("token");if(Po)try{Nt=Qo(JSON.parse(Po)||"")}catch{Nt=null}const qc=se(e=>({cart:{...Wc,customerEmail:Nt?Nt.email:""},products:[],coupon:null,pending:!1,applyCouponPending:!1,customerEmail:Nt?Nt.email:"",recaptcha:"",priceAdjustment:null,serviceFee:null,replacementConfig:null,setCart:t=>e(n=>({cart:typeof t=="function"?t(n.cart):t})),setProducts:t=>e(n=>({products:typeof t=="function"?t(n.products):t})),setRecaptcha:t=>e({recaptcha:t}),setCoupon:t=>e({coupon:t}),setPending:t=>e({pending:t}),setApplyCouponPending:t=>e({applyCouponPending:t}),setCustomerEmail:t=>e({customerEmail:t}),setPriceAdjustment:t=>e({priceAdjustment:t}),setServiceFee:t=>e({serviceFee:t}),setReplacementConfig:t=>e({replacementConfig:t}),setUsePriorityReplacement:t=>e(n=>({cart:{...n.cart,usePriorityReplacement:t}}))})),Zc=se(e=>({page:1,setPage:t=>e(()=>({page:t})),resetPage:()=>e(()=>({page:1}))})),Gc=se(e=>({discordInfo:null,setDiscordInfo:t=>e(()=>({discordInfo:t}))})),Kc=se(e=>({subscription:null,setSubscription:t=>e({subscription:t})})),nn=se(e=>({apiUrls:Dc,setApiUrls:t=>e(()=>({apiUrls:t}))})),La=se(e=>({header:null,footer:null,announcement:null,setHeader:t=>e(()=>({header:t})),setFooter:t=>e(()=>({footer:t})),setAnnouncement:t=>e(()=>({announcement:t})),blocks:null,setBlocks:t=>e(()=>({blocks:t})),activeBlock:null,setActiveBlock:t=>e(()=>({activeBlock:t})),sourceBlocks:{},setSourceBlocks:t=>e(()=>({sourceBlocks:t})),currentInstance:null,setCurrentInstance:t=>e(()=>({currentInstance:t})),settings:null,setSettings:t=>e(()=>({settings:t})),settingsInstance:null,setSettingsInstance:t=>e(()=>({settingsInstance:t}))})),Ar=se(e=>({general:null,setGeneral:t=>e(()=>({general:t})),isAntistock:!1,setIsAntistock:t=>e(()=>({isAntistock:t}))})),wr=se(e=>({settings:null,setSettings:t=>{e(()=>({settings:t}))},isLoadingSettings:!0,setIsLoadingSettings:t=>e(()=>({isLoadingSettings:t}))})),On=se((e,t)=>({activeBlock:null,setActiveBlock:n=>e(()=>({activeBlock:n})),activeFont:null,setActiveFont:n=>e(()=>({activeFont:n})),setThemeSettings:n=>e(()=>({themeSettings:n})),activeColorCategory:null,setActiveColorCategory:n=>e(()=>({activeColorCategory:n})),themeSettings:{colors:{text:{primary:"#252525",secondary:"#757575",tertiary:"#C2C2C2",inverted:"#FFFFFF",action:"#FF3F19",actionHover:"#DA2400",disabled:"#C2C2C2",warning:"#C1972A",error:"#C12A2A",success:"#338B13",information:"#3683F7",link:"#3683F7"},icon:{primary:"#252525",secondary:"#555555",tertiary:"#C2C2C2",inverted:"#FFFFFF",action:"#FF3F19",actionHover:"#DA2400",disabled:"#C2C2C2",warning:"#C1972A",error:"#C12A2A",success:"#338B13",information:"#3683F7",link:"#3683F7"},border:{primary:"#C2C2C2",secondary:"#E6E6E6",action:"#FF3F19",actionHover:"#DA2400",disabled:"#E6E6E6",warning:"#C1972A",error:"#C12A2A",success:"#338B13",information:"#3683F7",focus:"#FF3F19"},surface:{primary:"#FFFFFF",secondary:"#F8F8F8",action1:"#FF3F19",action1Hover:"#DA2400",action2:"#FFFFFF",action2Hover:"#F8F8F8",disabled:"#C2C2C2",warning:"#FAF4E6",error:"#FAE6E6",success:"#E5FADD",information:"#E9F1FE",modal:"rgba(1, 1, 4, 0.4)"}},fonts:{mobile:{fontSizePercentage:30},tablet:{fontSizePercentage:50},desktop:{heading:{h1:{font:"Archivo",weight:"700",size:48,boldWeight:"900",case:"normal"},h2:{font:"Archivo",weight:"700",size:32,boldWeight:"800",case:"normal"},h3:{font:"Archivo",weight:"600",size:24,boldWeight:"700",case:"normal"},h4:{font:"Archivo",weight:"500",size:20,boldWeight:"700",case:"normal"},h5:{font:"Archivo",weight:"400",size:16,boldWeight:"700",case:"normal"},h6:{font:"Archivo",weight:"400",size:14,boldWeight:"700",case:"uppercase"},h7:{font:"Archivo",weight:"400",size:14,boldWeight:"700",case:"normal"}},body:{lg:{font:"Archivo",size:16,weight:"400",boldWeight:"700",case:"normal"},md:{font:"Archivo",size:14,weight:"400",boldWeight:"700",case:"normal"},sm:{font:"Archivo",size:12,weight:"400",boldWeight:"700",case:"normal"}}}},borders:{radius:"var(--radius-lg)",thickness:"var(--border-none)"},buttons:{primary:{size:26,alignment:"left",radius:32,height:40,background:"#ff3f19",hover:!0,font:"Archivo",boxShadow:{left:0,top:0,blur:0,spread:0,color:"#000000"},color:"#ffffff",colorHover:"#ffffff",backgroundHover:"#ff3f19"},secondary:{size:26,alignment:"left",radius:10,height:20,background:"#c2c2c2",hover:!1,font:"Archivo",boxShadow:{left:0,top:4,blur:10,spread:0,color:"#000000"},color:"#757575",colorHover:"#757575",backgroundHover:"#c2c2c2"},tertiary:{size:12,alignment:"left",radius:30,height:30,background:"#c2c2c2",hover:!0,font:"Archivo",boxShadow:{left:0,top:4,blur:10,spread:0,color:"#000000"},color:"#757575",colorHover:"#757575",backgroundHover:"#c2c2c2"}},inputs:{field:{color:"#f3f3f3",active:!0,opacity:40},label:{size:14,color:"#555555",height:40,alignment:"left"},border:{color:"#f3f3f3",style:"solid",active:!0,radius:14,thickness:0},general:{size:14,color:"#252525",height:40},placeholder:{color:"#C2C2C2"}}},updateColor:(n,r,o)=>e(a=>{const i=JSON.parse(JSON.stringify(t().themeSettings));_e.getState().addHistory({themeSettings:i});const s={...a.themeSettings.colors,[n]:{...a.themeSettings.colors[n],[r]:o}};return{themeSettings:{...a.themeSettings,colors:s}}}),updateFont:(n,r,o,a,i)=>e(s=>{const l=JSON.parse(JSON.stringify(t().themeSettings));_e.getState().addHistory({themeSettings:l});const c={...s.themeSettings.fonts,[n]:{...s.themeSettings.fonts[n],[r]:{...s.themeSettings.fonts[n][r],[o]:{...s.themeSettings.fonts[n][r][o],[a]:i}}}};return{themeSettings:{...s.themeSettings,fonts:c}}}),updateFontSizePercentage:(n,r)=>e(o=>{const a=JSON.parse(JSON.stringify(t().themeSettings));_e.getState().addHistory({themeSettings:a});const i={...o.themeSettings.fonts,[n]:{...o.themeSettings.fonts[n],fontSizePercentage:r}};return{themeSettings:{...o.themeSettings,fonts:i}}}),updateBorder:(n,r)=>e(o=>{const a=JSON.parse(JSON.stringify(t().themeSettings));_e.getState().addHistory({themeSettings:a});const i={...o.themeSettings.borders,[n]:r};return{themeSettings:{...o.themeSettings,borders:i}}}),updateButton:(n,r,o)=>e(a=>{const i=JSON.parse(JSON.stringify(t().themeSettings));_e.getState().addHistory({themeSettings:i});const s={...a.themeSettings.buttons[n],[r]:o},l={...a.themeSettings.buttons,[n]:s};return{themeSettings:{...a.themeSettings,buttons:l}}}),updateInput:(n,r,o)=>e(a=>{const i=JSON.parse(JSON.stringify(t().themeSettings));return _e.getState().addHistory({themeSettings:i}),{themeSettings:{...a.themeSettings,inputs:{...a.themeSettings.inputs,[n]:{...a.themeSettings.inputs[n],[o]:r}}}}}),isLoadingThemeSettings:!1,setIsLoadingThemeSettings:n=>e(()=>({isLoadingThemeSettings:n}))})),Fe=se(e=>({notifications:[],setNotifications:t=>e(()=>({notifications:t}))})),Yc=se(e=>({isOpen:!0,setIsOpen:t=>e(()=>({isOpen:t}))}));var ke=[];for(var or=0;or<256;++or)ke.push((or+256).toString(16).slice(1));function Xc(e,t=0){return(ke[e[t+0]]+ke[e[t+1]]+ke[e[t+2]]+ke[e[t+3]]+"-"+ke[e[t+4]]+ke[e[t+5]]+"-"+ke[e[t+6]]+ke[e[t+7]]+"-"+ke[e[t+8]]+ke[e[t+9]]+"-"+ke[e[t+10]]+ke[e[t+11]]+ke[e[t+12]]+ke[e[t+13]]+ke[e[t+14]]+ke[e[t+15]]).toLowerCase()}var yn,Qc=new Uint8Array(16);function eu(){if(!yn&&(yn=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!yn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return yn(Qc)}var tu=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const _o={randomUUID:tu};function ot(e,t,n){if(_o.randomUUID&&!e)return _o.randomUUID();e=e||{};var r=e.random||(e.rng||eu)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Xc(r)}function nu(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var a;const i=l=>l===null?null:JSON.parse(l,void 0),s=(a=n.getItem(o))!=null?a:null;return s instanceof Promise?s.then(i):i(s)},setItem:(o,a)=>n.setItem(o,JSON.stringify(a,void 0)),removeItem:o=>n.removeItem(o)}}const Sr=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Sr(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Sr(r)(n)}}}},ru=(e,t)=>(n,r,o)=>{let a={storage:nu(()=>localStorage),partialize:p=>p,version:0,merge:(p,v)=>({...v,...p}),...t},i=!1;const s=new Set,l=new Set;let c=a.storage;if(!c)return e((...p)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...p)},r,o);const u=()=>{const p=a.partialize({...r()});return c.setItem(a.name,{state:p,version:a.version})},d=o.setState;o.setState=(p,v)=>{d(p,v),u()};const h=e((...p)=>{n(...p),u()},r,o);o.getInitialState=()=>h;let w;const m=()=>{var p,v;if(!c)return;i=!1,s.forEach(b=>{var R;return b((R=r())!=null?R:h)});const L=((v=a.onRehydrateStorage)==null?void 0:v.call(a,(p=r())!=null?p:h))||void 0;return Sr(c.getItem.bind(c))(a.name).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==a.version){if(a.migrate)return[!0,a.migrate(b.state,b.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,b.state];return[!1,void 0]}).then(b=>{var R;const[P,T]=b;if(w=a.merge(T,(R=r())!=null?R:h),n(w,!0),P)return u()}).then(()=>{L==null||L(w,void 0),w=r(),i=!0,l.forEach(b=>b(w))}).catch(b=>{L==null||L(void 0,b)})};return o.persist={setOptions:p=>{a={...a,...p},p.storage&&(c=p.storage)},clearStorage:()=>{c==null||c.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>m(),hasHydrated:()=>i,onHydrate:p=>(s.add(p),()=>{s.delete(p)}),onFinishHydration:p=>(l.add(p),()=>{l.delete(p)})},a.skipHydration||m(),w||h},Jn=ru,Yt=se(Jn((e,t)=>({pages:null,currentPage:"",setPages:n=>e(()=>({pages:n})),pageContext:{listings:null,products:null,reviews:null,categories:null,faqs:null,general:null,fullPosts:null,posts:null,preserveContent:!1,vouches:null},isOpenModal:!1,isOpenSelectModal:!1,isEdit:!1,editedPage:null,setEditedPage:n=>e(()=>({editedPage:n})),setCurrentPage:n=>e(()=>({currentPage:n})),setPageContext:n=>e(()=>({pageContext:n})),setIsOpenModal:n=>e(()=>({isOpenModal:n})),setIsOpenSelectModal:n=>e(()=>({isOpenSelectModal:n})),setIsEdit:n=>e(()=>({isEdit:n})),createPage:n=>{const r=t().pages,o=ot();if(r)r[o]=n,e({pages:r});else{const a=t().setPages;a({});const i=t().pages;i[o]=n,e({pages:i})}},updatePage:(n,r)=>{const o=t().pages;o&&(o[n]={...r},e({pages:o}))},deletePage:n=>{const r=t().pages;r&&(delete r[n],e({pages:r}))}}),{name:"pages-storage",partialize:e=>{const{pages:t,pageContext:n}=e;return{pages:t,pageContext:n}}})),ou=se(e=>({isOpenModal:!1,setIsOpenModal:t=>e(()=>({isOpenModal:t}))})),Mn=se(Jn((e,t)=>({header:null,blocks:{},announcement:null,footer:null,currentBlock:null,positionBlock:null,setBlocks:n=>{e({blocks:n})},setHeader:(n,r=!0)=>{const o=JSON.parse(JSON.stringify(t().header)),a=JSON.parse(JSON.stringify(n));JSON.stringify(o)!==JSON.stringify(a)&&r&&_e.getState().addHistory({header:o}),e({header:a})},setFooter:(n,r=!0)=>{const o=JSON.parse(JSON.stringify(t().footer)),a=JSON.parse(JSON.stringify(n));JSON.stringify(o)!==JSON.stringify(a)&&r&&_e.getState().addHistory({footer:o}),e({footer:a})},setAnnouncement:(n,r=!0)=>{const o=JSON.parse(JSON.stringify(t().announcement)),a=JSON.parse(JSON.stringify(n));JSON.stringify(o)!==JSON.stringify(a)&&r&&_e.getState().addHistory({announcement:o}),e({announcement:a})},createPage:n=>{const r=t().blocks;r[n]={data:{},order:[]},e({blocks:r})},deletePage:n=>{const r=t().blocks;delete r[n],e({blocks:r})},updatePage:(n,r)=>{const o=t().blocks;if(o[r])return;const a=o[n];delete o[n],o[r]=a,e({blocks:o})},setCurrentBlock:n=>{e({currentBlock:n})},setPositionBlock:(n,r=!1)=>{const{blocks:o}=t(),{currentPage:a,pages:i}=Yt.getState();if(!a||!i||!i[a]||!o[i[a].path]){console.error("Cannot set position: invalid page or block data");return}const s=i[a].path,l=o[s],c=n?l.order.indexOf(n):-1;if(c===-1&&n){console.error(`Block with ID "${n}" not found in page "${s}"`);return}const u=c!==-1?c+(r?1:0):l.order.length;e({positionBlock:u})},addBlock:(n,r)=>{const o=JSON.parse(JSON.stringify(t().blocks));_e.getState().addHistory({layers:o});const a={...t().blocks},i=a[n]||{data:{},order:[]},s=t().positionBlock,l=ot(),c={name:r.name,value:r.value};return i.data[l]=c,s===null||s>=i.order.length?i.order.push(l):i.order.splice(s,0,l),e({blocks:{...a,[n]:{data:i.data,order:i.order}},currentBlock:l,positionBlock:null}),Fe.getState().setNotifications([...Fe.getState().notifications,{id:ot(),message:"Block successfully added",status:"success"}]),l},editBlock:(n,r,o)=>{const a=JSON.parse(JSON.stringify(t().blocks));_e.getState().addHistory({layers:a});const i=t().blocks,s=i[n]||{};s.data[r]={name:o.name,value:{...o.value}},e({blocks:{...i,[n]:s}})},removeBlock:(n,r)=>{const o=JSON.parse(JSON.stringify(t().blocks));_e.getState().addHistory({layers:o});const a=JSON.parse(JSON.stringify(t().blocks)),i=a[n];if(!i){console.error(`Page at path "${n}" does not exist.`);return}delete i.data[r],i.order=i.order.filter(s=>s!==r),e({blocks:{...a,[n]:i}}),Fe.getState().setNotifications([...Fe.getState().notifications,{id:ot(),message:"Block successfully deleted",status:"success"}])},moveBlock:(n,r,o)=>e(a=>{const i=JSON.parse(JSON.stringify(t().blocks));if(_e.getState().addHistory({layers:i}),!a.blocks[n])return console.error(`Path ${n} does not exist in blocks`),a;const s={...a.blocks[n]},l=[...s.order];if(r<0||o<0||r>=l.length||o>=l.length)return console.error(`Invalid indices: fromIndex=${r}, toIndex=${o}`),a;const[c]=l.splice(r,1);return l.splice(o,0,c),Fe.getState().setNotifications([...Fe.getState().notifications,{id:ot(),message:"Block successfully moved",status:"success"}]),{blocks:{...a.blocks,[n]:{...s,order:l}}}}),duplicateBlock:(n,r)=>{const o=JSON.parse(JSON.stringify(t().blocks));_e.getState().addHistory({layers:o});const a=JSON.parse(JSON.stringify(t().blocks)),i=a[n];if(!i||!i.data[r]){console.error(`Block with ID "${r}" not found in page "${n}"`);return}const s=ot(),l=i.data[r],c={name:l.name,value:JSON.parse(JSON.stringify({...l.value}))};i.data[s]={...c};const u=i.order.indexOf(r);if(u===-1){console.error(`Block ID "${r}" not found in order array`);return}i.order.splice(u+1,0,s),e({blocks:{...a,[n]:i},currentBlock:s}),Ra.getState().setActiveBlock({id:s,neededScroll:!0}),Fe.getState().setNotifications([...Fe.getState().notifications,{id:ot(),message:"Block successfully duplicated",status:"success"}])},isLoadingLayers:!1,setIsLoadingLayers:n=>e(()=>({isLoadingLayers:n}))}),{name:"layers-storage",partialize:e=>{const{blocks:t,header:n,footer:r,announcement:o}=e;return{blocks:t,header:n,footer:r,announcement:o}}})),_e=se((e,t)=>({past:[],future:[],addHistory:n=>{e(r=>{const o=r.past[r.past.length-1];return o&&JSON.stringify(o)===JSON.stringify(n)?r:{past:[...r.past,n],future:[]}})},undo:()=>{const{past:n,future:r}=t();if(n.length===0)return;const o=n[n.length-1],a=n.slice(0,-1),{blocks:i,header:s,footer:l,announcement:c,setBlocks:u,setHeader:d,setFooter:h,setAnnouncement:w}=Mn.getState(),{themeSettings:m,setThemeSettings:p}=On.getState(),v={themeSettings:JSON.parse(JSON.stringify(m)),layers:JSON.parse(JSON.stringify(i)),header:JSON.parse(JSON.stringify(s)),footer:JSON.parse(JSON.stringify(l)),announcement:JSON.parse(JSON.stringify(c))};e({past:a,future:[v,...r]}),o.themeSettings&&p(o.themeSettings),o.layers&&u(o.layers),o.header&&d(o.header,!1),o.footer&&h(o.footer,!1),o.announcement&&w(o.announcement,!1)},redo:()=>{const{past:n,future:r}=t();if(r.length===0)return;const{blocks:o,header:a,footer:i,announcement:s,setBlocks:l,setHeader:c,setFooter:u,setAnnouncement:d}=Mn.getState(),{themeSettings:h,setThemeSettings:w}=On.getState(),m=r[0],p=r.slice(1),v={themeSettings:JSON.parse(JSON.stringify(h)),layers:JSON.parse(JSON.stringify(o)),header:JSON.parse(JSON.stringify(a)),footer:JSON.parse(JSON.stringify(i)),announcement:JSON.parse(JSON.stringify(s))};e({past:[...n,v],future:p}),m.themeSettings&&w(m.themeSettings),m.layers&&l(m.layers),m.header&&c(m.header,!1),m.footer&&u(m.footer,!1),m.announcement&&d(m.announcement,!1)}})),Ra=se(Jn(e=>({onPreview:!0,setOnPreview:t=>e(()=>({onPreview:t})),activeBlock:{id:null,neededScroll:!1},setActiveBlock:t=>e(()=>({activeBlock:t})),zoomLevel:1,setZoomLevel:t=>e(()=>({zoomLevel:t}))}),{name:"preview-storage",partialize:e=>{const{onPreview:t}=e;return{onPreview:t}}})),ka=[{icon:"TreeStructure",name:"Layers"},{icon:"Plus",name:"Add"},{icon:"Palette",name:"Theme"},{icon:"Gear",name:"Settings"}],au=[{icon:"Desktop",value:"desktop"},{icon:"DeviceTabletCamera",value:"tablet"},{icon:"DeviceMobileCamera",value:"mobile"}],iu=[{icon:"PaintBrushBroad",name:"Colors"},{icon:"TextAa",name:"Fonts"},{icon:"CornersOut",name:"Borders"},{icon:"ArrowSquareIn",name:"Buttons"},{icon:"Textbox",name:"Inputs"}],su=[12,14,16,18,20,24,28,32,40,48].map(e=>String(e)),lu=["/","/reviews","/faqs","/contact","/products","/ticket","/login"],$t={"/":{path:"/",name:"Home",icon:"HouseSimple",seo:{pageDescription:"",pageTitle:""},visibility:"public"},"/products":{path:"/products",name:"Products",icon:"SquaresFour",seo:{pageDescription:"",pageTitle:""},visibility:"public"},"/faqs":{path:"/faqs",name:"Faqs",icon:"SealQuestion",seo:{pageDescription:"",pageTitle:""},visibility:"public"},"/reviews":{path:"/reviews",name:"Reviews",icon:"Star",seo:{pageDescription:"",pageTitle:""},visibility:"public"},"/contact":{path:"/contact",name:"Contact",icon:"ChatCentered",seo:{pageDescription:"",pageTitle:""},visibility:"public"},"/ticket":{path:"/ticket",name:"Ticket",icon:"Ticket",seo:{pageDescription:"",pageTitle:""},visibility:"public"},"/login":{path:"/login",name:"Login",icon:"UserCircleGear",seo:{pageDescription:"",pageTitle:""},visibility:"public"}},cu=typeof window<"u"&&(window.location.hostname.includes("localhost")||window.location.hostname.includes("192")||window.location.hostname.includes("local-rst.sp-internal.work")),uu={None:"var(--radius-none)",4:"var(--radius-xs)",8:"var(--radius-sm)",12:"var(--radius-md)",16:"var(--radius-lg)",20:"var(--radius-xl)",24:"var(--radius-2xl)"},du={None:"var(--border-none)",1:"var(--border-sm)",2:"var(--border-md)",4:"var(--border-lg)"},fu={"1:1":"1:1","4:3":"4:3","16:9":"16:9","9:16":"9:16"},hu=[{value:"4:3",addon:k.jsx("div",{style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:k.jsx("div",{style:{width:18.5,height:14.5,border:"1.5px solid #252525",borderRadius:3}})})},{value:"16:9",addon:k.jsx("div",{style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:k.jsx("div",{style:{width:20.5,height:12.5,border:"1.5px solid #252525",borderRadius:3}})})},{value:"9:16",addon:k.jsx("div",{style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:k.jsx("div",{style:{width:14.5,height:18.5,border:"1.5px solid #252525",borderRadius:3}})})},{value:"1:1",addon:k.jsx("div",{style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:k.jsx("div",{style:{width:16.5,height:16.5,border:"1.5px solid #252525",borderRadius:3}})})}],pu={h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6",h7:"Heading 7",lg:"Paragraph Large",md:"Paragraph Medium",sm:"Paragraph Small"},mu=se(e=>({activeBlock:ka[0],setActiveBlock:t=>e(()=>({activeBlock:t}))})),Na=se(e=>({openModal:!1,setOpenModal:t=>e(()=>({openModal:t})),onChange:null,setOnChange:t=>e(()=>({onChange:t})),tip:"",setTip:t=>e(()=>({tip:t}))})),gu=se(e=>({error:null,setError:t=>e(()=>({error:t}))})),Ta=se(e=>({title:null,description:null,onConfirm:null,setTitle:t=>e(()=>({title:t})),setDescription:t=>e(()=>({description:t})),setOnConfirm:t=>e(()=>({onConfirm:t}))}));var yu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _a={exports:{}};/*!
|
|
37
|
-
Copyright (c) 2018 Jed Watson.
|
|
38
|
-
Licensed under the MIT License (MIT), see
|
|
39
|
-
http://jedwatson.github.io/classnames
|
|
40
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var a="",i=0;i<arguments.length;i++){var s=arguments[i];s&&(a=o(a,r(s)))}return a}function r(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return n.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var i="";for(var s in a)t.call(a,s)&&a[s]&&(i=o(i,s));return i}function o(a,i){return i?a?a+" "+i:a+i:a}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(_a);var vu=_a.exports;const Be=Pa(vu),wu=se(e=>({currentDevice:{icon:"Desktop",value:"desktop"},setCurrentDevice:t=>e(()=>({currentDevice:t}))}));se(e=>({pageData:null,setPageData:t=>e(()=>({pageData:t}))}));const Dr=se((e,t)=>({isModalVisible:!1,hoverBlockId:null,isMouseOverModal:!1,hideTimeout:null,setHoverBlockId:n=>{e({hoverBlockId:n})},showModal:(n,r="hoverBlockId")=>{t().hideTimeout&&clearTimeout(t().hideTimeout),e({isModalVisible:!0,[r]:n})},hideModal:(n="hoverBlockId")=>{e({isModalVisible:!1,[n]:null})},startHideTimeout:()=>{if(!t().isMouseOverModal){const n=setTimeout(()=>{e({isModalVisible:!1,hoverBlockId:null,keyBlock:null})},500);e({hideTimeout:n})}},clearHideTimeout:()=>{t().hideTimeout&&(clearTimeout(t().hideTimeout),e({hideTimeout:null}))},setMouseOverModal:n=>{e({isMouseOverModal:n})},isPreviewVisible:!1,showPreview:(n,r="hoverBlockId")=>{e({isPreviewVisible:!0,[r]:n})},hidePreview:(n="hoverBlockId")=>{e({isPreviewVisible:!1,[n]:null})},keyBlock:null,setKeyBlock:n=>{e({keyBlock:n})},hoverBlockTopPosition:null,setHoverBlockTopPosition:n=>{e({hoverBlockTopPosition:n})}})),Oa=se(Jn(e=>({fonts:[],setFonts:t=>e(()=>({fonts:t}))}),{name:"fonts-storage"})),Fr=se()(e=>({color:"default",initialColor:"",setInitialColor:t=>e(()=>({initialColor:t})),colorChange:()=>{},update:()=>{},activeLabel:null,modalPosition:{left:0,top:0},showModal:!1,dragging:!1,hue:0,saturation:100,brightness:100,alpha:100,isGradientActive:!0,isBlockSettings:!1,isGradient:!1,setIsGradient:t=>e(()=>({isGradient:t})),gradientDirection:"vertical",setGradientDirection:t=>e(()=>({gradientDirection:t})),hue2:0,saturation2:100,brightness2:100,alpha2:100,setHue2:t=>e(()=>({hue2:t})),setSaturation2:t=>e(()=>({saturation2:t})),setBrightness2:t=>e(()=>({brightness2:t})),setAlpha2:t=>e(()=>({alpha2:t})),activeColorIndex:1,setActiveColorIndex:t=>e(()=>({activeColorIndex:t})),setModalPosition:t=>e(()=>({modalPosition:t})),setHue:t=>e(()=>({hue:t})),setSaturation:t=>e(()=>({saturation:t})),setBrightness:t=>e(()=>({brightness:t})),setIsBlockSettings:t=>e(()=>({isBlockSettings:t})),setShowModal:t=>e({isBlockSettings:!1,showModal:t}),setDragging:t=>e(()=>({dragging:t})),setActiveLabel:t=>e(()=>({activeLabel:t})),setColor:t=>e(()=>({color:t})),setUpdate:t=>e(()=>({update:t})),setColorChange:t=>e(()=>({colorChange:t})),setAlpha:t=>e(()=>({alpha:t})),setIsGradientActive:t=>e(()=>({isGradientActive:t})),resetColors:()=>e(()=>({color:"default",initialColor:"",activeLabel:null,modalPosition:{left:0,top:0},showModal:!1,dragging:!1,hue:0,saturation:100,brightness:100,alpha:100,isGradient:!1,gradientDirection:"vertical",hue2:0,saturation2:100,brightness2:100,alpha2:100,activeColorIndex:1,isGradientActive:!0}))})),Ma=se(e=>({showTooltip:!1,setShowTooltip:t=>e({showTooltip:t})})),Su="_loader_vym63_1",bu={loader:Su},Cu=()=>k.jsx("div",{className:bu.loader}),Eu="_tooltip_7oy60_1",xu={tooltip:Eu},Lu=e=>{const{text:t}=e,{setShowTooltip:n}=Ma();return we.useEffect(()=>(n(!0),()=>{n(!1)}),[]),k.jsx("div",{className:xu.tooltip,children:t})},Ru=e=>e?e.replace(/_/g," ").split(" ").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" and "):"";function ku(e,t){if(!t||!t[e])return"unknown name";const n=new t[e];return!n.blockSettings||!n.blockSettings.displayName?"unknown name":n.blockSettings.displayName}const Aa=(e,t,n,r,o,a,i)=>{const s=e.currentTarget.getBoundingClientRect(),l=window.innerHeight-s.bottom,c=s.top,u=window.innerWidth-s.right,d=s.left;let h,w;return h=s.bottom+r+window.scrollY,w=s.left,(l<t||l<o)&&(c>=t+i?h=s.top-t-r+window.scrollY:h=window.scrollY+i),h-window.scrollY<i&&(h=window.scrollY+i),(u<n||u<a)&&(d>=n?w=s.right-n:w=(window.innerWidth-n)/2),w<s.right+a&&(w=s.right+a),w<s.right&&w+n>s.left&&h<s.bottom&&h+t>s.top&&(u>=n+a?w=s.right+r+a:l>=t?h=s.bottom+r+window.scrollY:(h=window.scrollY+i,w=(window.innerWidth-n)/2)),{top:h,left:w}},Nu=e=>y.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},y.createElement("path",{d:"M20.25 15.45V8.55C20.25 6.86984 20.25 6.02976 19.923 5.38803C19.6354 4.82354 19.1765 4.3646 18.612 4.07698C17.9702 3.75 17.1302 3.75 15.45 3.75H8.55C6.86984 3.75 6.02976 3.75 5.38803 4.07698C4.82354 4.3646 4.3646 4.82354 4.07698 5.38803C3.75 6.02976 3.75 6.86984 3.75 8.55V15.45C3.75 17.1302 3.75 17.9702 4.07698 18.612C4.3646 19.1765 4.82354 19.6354 5.38803 19.923C6.02976 20.25 6.86984 20.25 8.55 20.25H15.45C17.1302 20.25 17.9702 20.25 18.612 19.923C19.1765 19.6354 19.6354 19.1765 19.923 18.612C20.25 17.9702 20.25 17.1302 20.25 15.45Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Tu=e=>y.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},y.createElement("path",{d:"M12.0002 12V20.5M12.0002 12L4.5 7.78125M12.0002 12L19.2627 7.91474M20.25 9.11392V14.8861C20.25 15.9699 19.6654 16.9695 18.7208 17.5008L13.4708 20.4539C12.5575 20.9676 11.4425 20.9676 10.5292 20.4539L5.27922 17.5008C4.33459 16.9695 3.75 15.9699 3.75 14.8861V9.11392C3.75 8.0301 4.33459 7.03055 5.27922 6.49919L10.5292 3.54607C11.4425 3.03237 12.5575 3.03237 13.4708 3.54607L18.7208 6.4992C19.6654 7.03055 20.25 8.0301 20.25 9.11392Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Pu=e=>y.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},y.createElement("path",{d:"M8.25 20.25H6.75C5.09315 20.25 3.75 18.9069 3.75 17.25V15.75M15.75 20.25H17.25C18.9069 20.25 20.25 18.9069 20.25 17.25V15.75M3.75 8.25V6.75C3.75 5.09315 5.09315 3.75 6.75 3.75H8.25M15.75 3.75H17.25C18.9069 3.75 20.25 5.09315 20.25 6.75V8.25M15.25 10.3571L12 11.9999M12 11.9999L8.75 10.3571M12 11.9999V15.2856M11.0077 8.28125L9.25772 9.28125C8.63457 9.63733 8.25 10.3 8.25 11.0177V12.9822C8.25 13.6999 8.63457 14.3626 9.25772 14.7186L11.0077 15.7186C11.6226 16.07 12.3774 16.07 12.9923 15.7186L14.7423 14.7186C15.3654 14.3626 15.75 13.6999 15.75 12.9822V11.0177C15.75 10.3 15.3654 9.63733 14.7423 9.28125L12.9923 8.28125C12.3774 7.9299 11.6226 7.9299 11.0077 8.28125Z",stroke:"#252525",strokeWidth:1.40625,strokeLinecap:"round",strokeLinejoin:"round"})),_u=e=>y.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},y.createElement("path",{d:"M3.125 3.125H16.875",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),y.createElement("path",{d:"M12.9167 5.625C12.1113 5.625 11.4583 6.27792 11.4583 7.08333V12.0833C11.4583 12.8887 12.1113 13.5417 12.9167 13.5417C13.7221 13.5417 14.375 12.8887 14.375 12.0833V7.08333C14.375 6.27792 13.7221 5.625 12.9167 5.625Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),y.createElement("path",{d:"M7.08333 5.625C6.27792 5.625 5.625 6.27792 5.625 7.08333V15.4167C5.625 16.2221 6.27792 16.875 7.08333 16.875C7.88875 16.875 8.54167 16.2221 8.54167 15.4167V7.08333C8.54167 6.27792 7.88875 5.625 7.08333 5.625Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Ou=e=>y.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},y.createElement("path",{d:"M17.1073 17.1577C17.1073 18.8655 15.7213 20.25 14.0116 20.25C12.3019 20.25 10.9159 18.8655 10.9159 17.1577C10.9159 15.4499 12.3019 14.0654 14.0116 14.0654C15.7213 14.0654 17.1073 15.4499 17.1073 17.1577Z",stroke:"#252525",strokeWidth:1.5,strokeLinejoin:"round"}),y.createElement("path",{d:"M4.99145 6.98598L10.4681 11.5764L3.75 14.0189L4.99145 6.98598Z",stroke:"#252525",strokeWidth:1.5,strokeLinejoin:"round"}),y.createElement("path",{d:"M14.0106 4.46532C14.1536 3.9321 14.7017 3.61567 15.235 3.75841L19.2835 4.842C19.8172 4.98485 20.1339 5.53345 19.9908 6.06708L18.9065 10.1093C18.7635 10.6425 18.2154 10.9589 17.6821 10.8162L13.6336 9.73258C13.0999 9.58973 12.7832 9.04113 12.9263 8.50749L14.0106 4.46532Z",stroke:"#252525",strokeWidth:1.5,strokeLinejoin:"round"})),Mu=e=>y.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},y.createElement("path",{d:"M9.25 14.75H10C10 14.3358 9.66421 14 9.25 14V14.75ZM3.75 20.25H3V21H3.75V20.25ZM14.75 9.25H15.5C15.5 8.83579 15.1642 8.5 14.75 8.5V9.25ZM20.25 20.25V21H21V20.25H20.25ZM1.75 19.5C1.33579 19.5 1 19.8358 1 20.25C1 20.6642 1.33579 21 1.75 21V19.5ZM22.25 21C22.6642 21 23 20.6642 23 20.25C23 19.8358 22.6642 19.5 22.25 19.5V21ZM5.25 15.5H9.25V14H5.25V15.5ZM8.5 14.75V20.25H10V14.75H8.5ZM9.25 19.5H3.75V21H9.25V19.5ZM4.5 20.25V16.25H3V20.25H4.5ZM5.25 14C4.00736 14 3 15.0074 3 16.25H4.5C4.5 15.8358 4.83579 15.5 5.25 15.5V14ZM10.75 10H14.75V8.5H10.75V10ZM14 9.25V20.25H15.5V9.25H14ZM14.75 19.5H9.25V21H14.75V19.5ZM10 20.25V10.75H8.5V20.25H10ZM10.75 8.5C9.50736 8.5 8.5 9.50736 8.5 10.75H10C10 10.3358 10.3358 10 10.75 10V8.5ZM16.25 4.5H18.75V3H16.25V4.5ZM19.5 5.25V20.25H21V5.25H19.5ZM20.25 19.5H14.75V21H20.25V19.5ZM15.5 20.25V5.25H14V20.25H15.5ZM18.75 4.5C19.1642 4.5 19.5 4.83579 19.5 5.25H21C21 4.00736 19.9926 3 18.75 3V4.5ZM16.25 3C15.0074 3 14 4.00736 14 5.25H15.5C15.5 4.83579 15.8358 4.5 16.25 4.5V3ZM1.75 21H22.25V19.5H1.75V21Z",fill:"#252525"})),Au=e=>y.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},y.createElement("path",{d:"M4 14.2105L6.84488 12.0821C7.66137 11.5378 8.75215 11.6663 9.41987 12.3853C10.9123 13.9926 12.6426 15.4538 15 15.4538C17.1727 15.4538 18.6125 14.6485 20 13.261M6.75 20.25H17.25C18.9069 20.25 20.25 18.9069 20.25 17.25V6.75C20.25 5.09315 18.9069 3.75 17.25 3.75H6.75C5.09315 3.75 3.75 5.09315 3.75 6.75V17.25C3.75 18.9069 5.09315 20.25 6.75 20.25ZM17.25 8.75C17.25 9.85457 16.3546 10.75 15.25 10.75C14.1454 10.75 13.25 9.85457 13.25 8.75C13.25 7.64543 14.1454 6.75 15.25 6.75C16.3546 6.75 17.25 7.64543 17.25 8.75Z",stroke:"#252525",strokeWidth:1.5,strokeLinecap:"round"})),Du=e=>y.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},y.createElement("path",{d:"M17.252 19.25H6.74803C5.26465 19.25 4.29985 17.6884 4.96324 16.3611L10.2152 5.85345C10.9506 4.38218 13.0494 4.38218 13.7848 5.85345L19.0368 16.3611C19.7001 17.6884 18.7354 19.25 17.252 19.25Z",stroke:"#252525",strokeWidth:1.5,strokeLinejoin:"round"})),Fu=e=>y.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},y.createElement("path",{d:"M11 2.75V4.5M16.9069 5.09326L15.5962 6.40392M6.40381 15.5962L5.09315 16.9069M4.5 11H2.75M6.40381 6.40381L5.09315 5.09315M14.1323 20.999L10.5777 11.3226C10.3542 10.7143 10.9552 10.1281 11.5577 10.3666L21.0397 14.1199C21.4283 14.2737 21.4679 14.8081 21.1062 15.0175L17.4231 17.1498C17.3097 17.2155 17.2155 17.3097 17.1498 17.4231L15.0343 21.0771C14.822 21.4438 14.2784 21.3967 14.1323 20.999Z",stroke:"#252525",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Iu=e=>y.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},y.createElement("path",{d:"M5.38803 19.923L5.72852 19.2548H5.72852L5.38803 19.923ZM4.07698 18.612L3.40873 18.9525H3.40873L4.07698 18.612ZM19.923 18.612L19.2548 18.2715V18.2715L19.923 18.612ZM18.612 19.923L18.2715 19.2548H18.2715L18.612 19.923ZM19.923 5.38803L19.2548 5.72852V5.72852L19.923 5.38803ZM18.612 4.07698L18.9525 3.40873V3.40873L18.612 4.07698ZM4.07698 5.38803L4.74524 5.72852L4.07698 5.38803ZM5.38803 4.07698L5.72852 4.74524L5.38803 4.07698ZM19.5 8.55V15.45H21V8.55H19.5ZM15.45 19.5H8.55V21H15.45V19.5ZM4.5 15.45V8.55H3V15.45H4.5ZM8.55 4.5H15.45V3H8.55V4.5ZM8.55 19.5C7.69755 19.5 7.10331 19.4994 6.64068 19.4616C6.1868 19.4245 5.92604 19.3554 5.72852 19.2548L5.04754 20.5913C5.49175 20.8176 5.97189 20.912 6.51853 20.9566C7.05641 21.0006 7.7223 21 8.55 21V19.5ZM3 15.45C3 16.2777 2.99942 16.9436 3.04336 17.4815C3.08803 18.0281 3.18238 18.5082 3.40873 18.9525L4.74524 18.2715C4.6446 18.074 4.57546 17.8132 4.53838 17.3593C4.50058 16.8967 4.5 16.3025 4.5 15.45H3ZM5.72852 19.2548C5.30516 19.039 4.96095 18.6948 4.74524 18.2715L3.40873 18.9525C3.76825 19.6581 4.34193 20.2317 5.04754 20.5913L5.72852 19.2548ZM19.5 15.45C19.5 16.3025 19.4994 16.8967 19.4616 17.3593C19.4245 17.8132 19.3554 18.074 19.2548 18.2715L20.5913 18.9525C20.8176 18.5082 20.912 18.0281 20.9566 17.4815C21.0006 16.9436 21 16.2777 21 15.45H19.5ZM15.45 21C16.2777 21 16.9436 21.0006 17.4815 20.9566C18.0281 20.912 18.5082 20.8176 18.9525 20.5913L18.2715 19.2548C18.074 19.3554 17.8132 19.4245 17.3593 19.4616C16.8967 19.4994 16.3025 19.5 15.45 19.5V21ZM19.2548 18.2715C19.0391 18.6948 18.6948 19.039 18.2715 19.2548L18.9525 20.5913C19.6581 20.2317 20.2318 19.6581 20.5913 18.9525L19.2548 18.2715ZM21 8.55C21 7.7223 21.0006 7.05641 20.9566 6.51853C20.912 5.97189 20.8176 5.49175 20.5913 5.04754L19.2548 5.72852C19.3554 5.92604 19.4245 6.1868 19.4616 6.64068C19.4994 7.10331 19.5 7.69755 19.5 8.55H21ZM15.45 4.5C16.3025 4.5 16.8967 4.50058 17.3593 4.53838C17.8132 4.57546 18.074 4.6446 18.2715 4.74524L18.9525 3.40873C18.5082 3.18238 18.0281 3.08803 17.4815 3.04336C16.9436 2.99942 16.2777 3 15.45 3V4.5ZM20.5913 5.04754C20.2318 4.34193 19.6581 3.76825 18.9525 3.40873L18.2715 4.74524C18.6948 4.96095 19.0391 5.30516 19.2548 5.72852L20.5913 5.04754ZM4.5 8.55C4.5 7.69755 4.50058 7.10331 4.53838 6.64068C4.57546 6.1868 4.6446 5.92604 4.74524 5.72852L3.40873 5.04754C3.18238 5.49175 3.08803 5.97189 3.04336 6.51853C2.99942 7.05641 3 7.7223 3 8.55H4.5ZM8.55 3C7.7223 3 7.05641 2.99942 6.51853 3.04336C5.97189 3.08803 5.49175 3.18238 5.04754 3.40873L5.72852 4.74524C5.92604 4.6446 6.1868 4.57546 6.64068 4.53838C7.10331 4.50058 7.69755 4.5 8.55 4.5V3ZM4.74524 5.72852C4.96095 5.30516 5.30516 4.96095 5.72852 4.74524L5.04754 3.40873C4.34193 3.76825 3.76825 4.34193 3.40873 5.04754L4.74524 5.72852Z",fill:"currentColor"}),y.createElement("path",{d:"M20.25 15H21V13.5H20.25V15ZM3.75 13.5H3V15H3.75V13.5ZM3.75 15H20.25V13.5H3.75V15Z",fill:"currentColor"})),Bu=e=>y.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},y.createElement("path",{d:"M11.0858 2.32272C11.4533 1.55909 12.5467 1.55909 12.9142 2.32272L15.0872 6.83907C15.2351 7.14651 15.5293 7.35876 15.8692 7.40319L20.8676 8.05664C21.7134 8.16721 22.0517 9.20388 21.4322 9.78704L17.779 13.2263C17.5295 13.4612 17.4167 13.8058 17.4795 14.1417L18.3971 19.0563C18.5526 19.8892 17.6676 20.5294 16.9183 20.1261L12.4825 17.7385C12.1815 17.5764 11.8185 17.5764 11.5175 17.7385L7.08174 20.1261C6.33244 20.5294 5.44743 19.8892 5.60294 19.0563L6.52054 14.1417C6.58325 13.8058 6.47048 13.4612 6.22097 13.2263L2.56776 9.78704C1.94833 9.20388 2.28661 8.16721 3.13241 8.05664L8.13078 7.40319C8.47066 7.35876 8.7649 7.14651 8.91282 6.83907L11.0858 2.32272Z",stroke:"#252525",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),ju=e=>y.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},y.createElement("path",{d:"M6.25 4.75H5.75C4.09315 4.75 2.75 6.09315 2.75 7.75V8.25M17.75 4.75H18.25C19.9069 4.75 21.25 6.09315 21.25 7.75V8.25M21.25 15.75V16.25C21.25 17.9069 19.9069 19.25 18.25 19.25H17.75M6.25 19.25H5.75C4.09315 19.25 2.75 17.9069 2.75 16.25V15.75",stroke:"#252525",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),y.createElement("path",{d:"M7.75 9.75H16.25",stroke:"#252525",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),y.createElement("path",{d:"M7.75 14.25H14.25",stroke:"#252525",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Hu=e=>y.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},y.createElement("path",{d:"M20.25 10.75V6.75C20.25 5.09315 18.9069 3.75 17.25 3.75H6.75C5.09315 3.75 3.75 5.09315 3.75 6.75V17.25C3.75 18.9069 5.09315 20.25 6.75 20.25H10.75M14.1879 20.8366L12.0869 13.0056C11.9372 12.4478 12.4478 11.9372 13.0056 12.0869L20.8366 14.1879C21.2665 14.3032 21.3428 14.8805 20.9576 15.1035L17.4231 17.1498C17.3097 17.2155 17.2155 17.3097 17.1498 17.4231L15.1035 20.9576C14.8805 21.3428 14.3032 21.2665 14.1879 20.8366Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Uu=e=>y.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},y.createElement("path",{d:"M3.125 16.875H16.875",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),y.createElement("path",{d:"M12.9167 6.45833C12.1113 6.45833 11.4583 7.11125 11.4583 7.91667V12.9167C11.4583 13.7221 12.1113 14.375 12.9167 14.375C13.7221 14.375 14.375 13.7221 14.375 12.9167V7.91667C14.375 7.11125 13.7221 6.45833 12.9167 6.45833Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),y.createElement("path",{d:"M7.08333 3.125C6.27792 3.125 5.625 3.77792 5.625 4.58333V12.9167C5.625 13.7221 6.27792 14.375 7.08333 14.375C7.88875 14.375 8.54167 13.7221 8.54167 12.9167V4.58333C8.54167 3.77792 7.88875 3.125 7.08333 3.125Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Vu=e=>y.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},y.createElement("path",{d:"M3.75 18.25H7.25M3.75 12H9.25M3.75 5.75H20.25M17 10.5L18.5 13.5L21.5 15L18.5 16.5L17 19.5L15.5 16.5L12.5 15L15.5 13.5L17 10.5Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),$u=e=>y.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},y.createElement("path",{d:"M19.9016 9.48786L10.3899 3.2788C8.39443 1.97623 5.75 3.40798 5.75 5.79094V18.2091C5.75 20.592 8.39442 22.0238 10.3899 20.7212L19.9016 14.5121C21.7151 13.3283 21.7151 10.6717 19.9016 9.48786Z",stroke:"#252525",strokeWidth:1.5,strokeLinejoin:"round"})),zu={Header:_u,Announcement:Vu,PrimaryHero:Hu,ProductHero:Nu,Items:Tu,FeaturedItems:Pu,Content:Ou,Stats:Mu,ImageGallery:Au,Logos:Du,CTA:Fu,FAQ:Iu,Reviews:Bu,ContactUs:ju,Footer:Uu,Video:$u},Ju="_wrapper_1jz8n_1",Wu="_submodal_1jz8n_14",br={wrapper:Ju,submodal:Wu},qu=({children:e,positionTop:t,positionLeft:n})=>{const{keyBlock:r,startHideTimeout:o,clearHideTimeout:a,setMouseOverModal:i}=Dr();return r?k.jsx("div",{className:br.wrapper,style:t?{top:t,left:n||void 0}:{},onMouseEnter:()=>{a(),i(!0)},onMouseLeave:()=>{i(!1),o()},children:e}):null},Zu=({children:e})=>{const{hoverBlockId:t,startHideTimeout:n,clearHideTimeout:r,setMouseOverModal:o}=Dr();return t?k.jsx("div",{className:Be(br.wrapper,br.submodal),onMouseEnter:()=>{r(),o(!0)},onMouseLeave:()=>{o(!1),n()},children:e}):null},Gu="_applyButton_17aa5_2",Ku="_content_17aa5_7",Yu="_title_17aa5_14",Xu="_label_17aa5_21",Qu="_colorValue_17aa5_40",ed="_colorMap_17aa5_48",td="_indicator_17aa5_57",nd="_hueSlider_17aa5_66",rd="_slider_17aa5_97",od="_buttons_17aa5_102",ad="_name_17aa5_109",id="_secondary_17aa5_114",sd="_input_17aa5_122",ld="_modal_17aa5_160",cd="_alphaSlider_17aa5_249",ud="_alphaBackground_17aa5_257",dd="_alphaGradient_17aa5_268",fd="_chargeTypes_17aa5_297",hd="_charge_17aa5_297",pd="_chargeActive_17aa5_326",md="_gradient_17aa5_334",gd="_color_17aa5_40",yd="_colorActive_17aa5_355",vd="_gradientWrapper_17aa5_362",wd="_subtitle_17aa5_368",Sd="_colorTypes_17aa5_375",bd="_colorType_17aa5_375",Cd="_colorTypeActive_17aa5_399",Ed="_colorsWrapper_17aa5_404",xd="_colors_17aa5_404",q={applyButton:Gu,content:Ku,title:Yu,label:Xu,colorValue:Qu,colorMap:ed,indicator:td,hueSlider:nd,slider:rd,buttons:od,name:ad,secondary:id,input:sd,modal:ld,alphaSlider:cd,alphaBackground:ud,alphaGradient:dd,chargeTypes:fd,charge:hd,chargeActive:pd,gradient:md,color:gd,colorActive:yd,gradientWrapper:vd,subtitle:wd,colorTypes:Sd,colorType:bd,colorTypeActive:Cd,colorsWrapper:Ed,colors:xd};function ar(e){return(e.includes("linear-gradient")||e.includes("radial-gradient"))&&/^linear-gradient\(\d+deg,\s*#[A-Fa-f0-9]{8}\s+\d+%,\s*#[A-Fa-f0-9]{8}\s+\d+%\)$/.test(e)?!0:/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/.test(e)}const Da=e=>{const{initialColor:t,onChange:n,title:r,labelStyle:o="primary",isGradientActive:a=!0,isBlockSettings:i}=e,[s,l]=we.useState(t);we.useEffect(()=>{l(t)},[t]);const{setActiveLabel:c,setModalPosition:u,setInitialColor:d,setShowModal:h,setUpdate:w,setColor:m,setColorChange:p,setIsGradientActive:v,colorChange:L}=Fr();we.useEffect(()=>{const T=()=>{h(!1),c(null),d(t),w(()=>{}),m(t),p(()=>{})};return document.body.addEventListener("click",T),()=>{document.body.removeEventListener("click",T)}},[t]);const b=T=>{T.stopPropagation(),h(!0),p(l),w(n),d(t),m(s),v(a);const{top:H,left:S}=Aa(T,600,288,10,20,230,80);u({top:H,left:S})},R=T=>{const H=T.target.value;l(H),ar(H)&&(n(H),m(H),p(L))},P=()=>{ar(s)||l(t)};return k.jsxs("div",{className:q.content,children:[k.jsx("span",{className:Be(q.name,{[q.secondary]:o==="secondary"}),children:r}),k.jsxs("label",{className:q.label,onClick:T=>T.stopPropagation(),children:[k.jsx("div",{className:q.colorValue,style:{background:ar(s)?s:t},onClick:i?void 0:b}),k.jsx("input",{type:"text",value:s.includes("linear-gradient")?s:s.toUpperCase(),onChange:R,onBlur:P,className:q.input,style:{textTransform:s.includes("linear-gradient")?"none":"uppercase"}})]})]})},Ld=()=>{const{modalPosition:e,color:t,initialColor:n,setShowModal:r,hue:o,saturation:a,brightness:i,alpha:s,dragging:l,setDragging:c,setHue:u,setSaturation:d,setBrightness:h,setAlpha:w,colorChange:m,setColor:p,update:v,isGradient:L,setIsGradient:b,gradientDirection:R,setGradientDirection:P,hue2:T,saturation2:H,brightness2:S,alpha2:_,setHue2:G,setSaturation2:B,setBrightness2:ae,setAlpha2:ee,activeColorIndex:te,setActiveColorIndex:he,isGradientActive:Oe,isBlockSettings:Te}=Fr(),Ze=(V,U,ne)=>{U/=100,ne/=100;const z=de=>(de+V/60)%6,K=de=>ne*(1-U*Math.max(0,Math.min(z(de),4-z(de),1))),W=Math.round(255*K(5)),re=Math.round(255*K(3)),Z=Math.round(255*K(1));return{r:W,g:re,b:Z}},ue=V=>V.toString(16).padStart(2,"0"),Le=(V,U,ne,z)=>{const{r:K,g:W,b:re}=Ze(V,U,ne),Z=Math.round(z/100*255);return`#${ue(K)}${ue(W)}${ue(re)}${ue(Z)}`},Ce=(V,U,ne,z)=>{if(L)if(te===1){u(V),d(U),h(ne),w(z);const K=Le(V,U,ne,z),W=Le(T,H,S,_),Z=`linear-gradient(${R==="vertical"?"0deg":"90deg"}, ${K} 0%, ${W} 100%)`;m(Z),p(Z)}else{G(V),B(U),ae(ne),ee(z);const K=Le(V,U,ne,z),W=Le(o,a,i,s),Z=`linear-gradient(${R==="vertical"?"0deg":"90deg"}, ${W} 0%, ${K} 100%)`;m(Z),p(Z)}else{const K=Le(V,U,ne,z);m(K),p(K)}},be=(V,U,ne)=>{const{width:z,height:K}=ne.getBoundingClientRect(),W=Math.max(0,Math.min(V/z*100,100)),re=Math.max(0,Math.min(100-U/K*100,100));L?te===1?(d(W),h(re),Ce(o,W,re,s)):(B(W),ae(re),Ce(T,W,re,_)):(d(W),h(re),Ce(o,W,re,s))},Pe=V=>{const{offsetX:U,offsetY:ne}=V.nativeEvent;c(!0),be(U,ne,V.currentTarget)},Ue=V=>{if(l){const U=document.querySelector(`.${q.colorMap}`),{left:ne,top:z}=U.getBoundingClientRect(),K=V.clientX-ne,W=V.clientY-z;be(K,W,U)}},ie=()=>{c(!1)};we.useEffect(()=>{function V(z){const K=/linear-gradient\((\d+deg),\s*(#[0-9a-fA-F]{8})\s*0%,\s*(#[0-9a-fA-F]{8})\s*100%\)/,W=z.match(K);if(W){const re=W[1],Z=W[2],de=W[3];return{angle:re,col1:Z,col2:de}}return null}function U(z){const K=parseInt(z.slice(1,3),16),W=parseInt(z.slice(3,5),16),re=parseInt(z.slice(5,7),16),Z=parseInt(z.slice(7,9),16)/255*100,{h:de,s:tt,b:ht}=ne(K,W,re);return{h:de,s:tt,b:ht,a:Z}}function ne(z,K,W){z/=255,K/=255,W/=255;const re=Math.max(z,K,W),Z=Math.min(z,K,W);let de=0;const tt=re-Z,ht=(re===0?0:tt/re)*100,Ke=re*100;if(re===Z)de=0;else switch(re){case z:de=((K-W)/tt+(K<W?6:0))*60;break;case K:de=((W-z)/tt+2)*60;break;case W:de=((z-K)/tt+4)*60;break}return{h:de,s:ht,b:Ke}}if(n&&n.startsWith("linear-gradient")){const z=V(n);if(z){const{angle:K,col1:W,col2:re}=z,Z=U(W),de=U(re);b(!0),P(K==="0deg"?"vertical":"horizontal"),u(Z.h),d(Z.s),h(Z.b),w(Z.a),G(de.h),B(de.s),ae(de.b),ee(de.a),he(1)}}else if(n){const K=function(re){let Z=re;return Z.length===7?Z+"ff":Z.length===9?Z:Z.length===4?Z[0]+Z[1].repeat(2)+Z[2].repeat(2)+Z[3].repeat(2)+"ff":"#000000ff"}(n),W=U(K);b(!1),u(W.h),d(W.s),h(W.b),w(W.a)}},[n,b,P,u,d,h,w,G,B,ae,ee,he]),we.useEffect(()=>{let V,U,ne,z;L?te===1?(V=o,U=a,ne=i,z=s):(V=T,U=H,ne=S,z=_):(V=o,U=a,ne=i,z=s),Ce(V,U,ne,z)},[L,R,te,o,a,i,s,T,H,S,_]),we.useEffect(()=>{const V=ne=>Ue(ne),U=()=>ie();return l?(document.addEventListener("mousemove",V),document.addEventListener("mouseup",U)):(document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",U)),()=>{document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",U)}},[l,L,R]);function pe(){if(!L)v(t);else{const V=Le(o,a,i,s),U=Le(T,H,S,_),z=`linear-gradient(${R==="vertical"?"0deg":"90deg"}, ${V} 0%, ${U} 100%)`;v(z)}r(!1)}function Me(){r(!1),m(n)}const Ee=L?te===1?o:T:o,ft=L?te===1?a:H:a,rn=L?te===1?i:S:i,Wn=L?te===1?s:_:s,{r:on,g:xe,b:et}=Ze(Ee,ft,rn),an=`linear-gradient(to right, rgba(${on}, ${xe}, ${et}, 0), rgba(${on}, ${xe}, ${et}, 1))`,sn=Le(o,a,i,s),Ge=Le(T,H,S,_);return k.jsxs("div",{className:q.modal,onClick:V=>V.stopPropagation(),style:{top:`${e.top}px`,left:`${e.left}px`},children:[k.jsx("h2",{className:q.title,children:"Color"}),Oe&&k.jsxs("div",{className:q.colorTypes,children:[k.jsxs("div",{className:Be(q.colorType,{[q.colorTypeActive]:!L}),onClick:()=>b(!1),children:[k.jsx("div",{style:{background:"#757575",width:"16px",height:"16px",borderRadius:"50%"}}),"Solid"]}),k.jsxs("div",{className:Be(q.colorType,{[q.colorTypeActive]:L}),onClick:()=>b(!0),children:[k.jsx("div",{style:{background:"linear-gradient(to bottom, #757575 0%, #DBDBDB 100%)",width:"16px",height:"16px",borderRadius:"50%"}}),"Linear"]})]}),L&&Oe&&k.jsxs("div",{className:q.colorsWrapper,children:[k.jsx("div",{className:q.colors,style:{background:`linear-gradient(90deg, ${sn} 0%, ${Ge} 100%)`}}),k.jsx("div",{className:Be(q.color,{[q.colorActive]:te===1}),onClick:()=>he(1),style:{background:sn}}),k.jsx("div",{className:Be(q.color,{[q.colorActive]:te===2}),onClick:()=>he(2),style:{background:Ge}})]}),k.jsx("div",{className:q.colorMap,onMouseDown:Pe,style:{background:`
|
|
41
|
-
linear-gradient(to top, black, transparent),
|
|
42
|
-
linear-gradient(to right, hsl(${Ee}, 100%, 100%), hsl(${Ee}, 100%, 50%))
|
|
43
|
-
`},children:k.jsx("div",{className:q.indicator,style:{position:"absolute",left:`${ft}%`,top:`${100-rn}%`,transform:"translate(-50%, -50%)"}})}),k.jsx("div",{className:q.hueSlider,style:{bottom:Te?L?"225px":"150px":L?"175px":"100px"},children:k.jsx("input",{type:"range",min:"0",max:"360",value:Ee,onChange:V=>{const U=Number(V.target.value);L?te===1?Ce(U,a,i,s):Ce(U,H,S,_):(u(U),Ce(U,a,i,s))},className:q.slider})}),k.jsxs("div",{className:q.alphaSlider,style:{bottom:Te?L?"200px":"125px":L?"150px":"75px"},children:[k.jsx("div",{className:q.alphaBackground}),k.jsx("div",{className:q.alphaGradient,style:{background:an}}),k.jsx("input",{type:"range",min:"0",max:"100",value:Wn,onChange:V=>{const U=Number(V.target.value);L?te===1?Ce(o,a,i,U):Ce(T,H,S,U):(w(U),Ce(o,a,i,U))},className:q.slider})]}),L&&Oe&&k.jsxs("div",{className:q.gradientWrapper,children:[k.jsx("h3",{className:q.subtitle,children:"Rotation"}),k.jsx("div",{className:q.gradient,children:k.jsxs("div",{className:q.chargeTypes,children:[k.jsxs("div",{className:Be(q.charge,{[q.chargeActive]:R==="horizontal"}),onClick:()=>P("horizontal"),children:[k.jsx(je.Icon,{name:"ArrowsHorizontal",width:20,height:20}),"Horizontal"]}),k.jsxs("div",{className:Be(q.charge,{[q.chargeActive]:R==="vertical"}),onClick:()=>P("vertical"),children:[k.jsx(je.Icon,{name:"ArrowsVertical",width:20,height:20}),"Vertical"]})]})})]}),Te&&k.jsx(Da,{initialColor:t,onChange:V=>p(V),title:"",isBlockSettings:Te}),k.jsxs("div",{className:q.buttons,children:[k.jsx(je.ButtonSettings,{onClick:Me,className:Be(q.applyButton,q.cancelButton),type:"Secondary",children:"Cancel"}),k.jsx(je.ButtonSettings,{onClick:pe,className:q.applyButton,type:"Primary",children:"Apply"})]})]})},Rd="_wrapper_1bsje_1",kd="_open_1bsje_16",Nd="_close_1bsje_20",ir={wrapper:Rd,open:kd,close:Nd},Td=e=>{const{isOpen:t,isClose:n,children:r}=e;return k.jsx("div",{className:Be(ir.wrapper,{[ir.open]:t,[ir.close]:n}),children:r})},Pd="_blocks_1h216_1",_d="_block_1h216_1",Od="_active_1h216_21",sr={blocks:Pd,block:_d,active:Od},Md=e=>{const{items:t,selectedItem:n,onSelect:r,getIconName:o}=e;return k.jsx("div",{className:sr.blocks,children:t.map(a=>k.jsx("div",{className:Be(sr.block,{[sr.active]:n===a}),onClick:()=>r(a),children:k.jsx(je.Icon,{name:o(a),fill:n===a?"#252525":"#757575"})},String(a)))})},Ad="_layout_1pjho_1",Dd="_main_1pjho_10",Fd="_content_1pjho_18",Id="_notifications_1pjho_26",vn={layout:Ad,main:Dd,content:Fd,notifications:Id},Bd="_notification_rpmz2_1",jd="_text_rpmz2_22",Hd="_timer_rpmz2_27",Ud="_warning_rpmz2_32",Vd="_error_rpmz2_37",$d="_success_rpmz2_42",Rt={notification:Bd,text:jd,timer:Hd,warning:Ud,error:Vd,success:$d},Oo={warning:"#C1972A",error:"#FF3F19",success:"#338B13"},zd=e=>{const{type:t,message:n,style:r,padding:o,timer:a,id:i,element:s}=e,[l,c]=we.useState(a),{setNotifications:u}=Fe();function d(){const w=Fe.getState().notifications.filter(m=>m.id!==i);u([...w])}return we.useEffect(()=>{const h=setTimeout(()=>{d()},a*1e3);return()=>clearTimeout(h)},[a]),we.useEffect(()=>{const h=setInterval(()=>c(w=>w-1),1e3);return()=>clearInterval(h)},[l]),s?s({type:t,message:n,style:r,padding:o,timer:a,id:i}):k.jsx("div",{style:{padding:o,position:"relative"},children:k.jsxs("div",{className:Be(Rt.notification,{[Rt.warning]:t==="warning",[Rt.error]:t==="error",[Rt.success]:t==="success"}),style:r,children:[k.jsx("div",{children:k.jsx(je.Icon,{name:"Info",fill:Oo[t],width:20,height:20})}),k.jsx("div",{className:Rt.text,children:n}),a&&k.jsx("div",{className:Rt.timer,children:l}),k.jsx("div",{style:{display:"flex"},children:k.jsx(je.Icon,{name:"X",fill:Oo[t],width:20,height:20,hoverable:!0,onClick:()=>d()})})]})})},Jd=()=>{const{isOpenModal:e,setIsOpenModal:t}=Yt(),{openModal:n,setOpenModal:r}=Na(),{isAntistock:o}=Ar(),{notifications:a}=Fe(),{title:i,description:s,setTitle:l,setDescription:c,setOnConfirm:u}=Ta();return k.jsxs("div",{id:"builder",className:o?"builder-dark":"",children:[k.jsxs("div",{className:vn.layout,children:[k.jsx(Ft.Navbar,{}),k.jsxs("main",{className:vn.main,children:[k.jsx(Ft.Header,{}),k.jsxs("div",{className:vn.content,children:[k.jsx(Ft.Sidebar,{}),k.jsx(Ft.Preview,{})]})]})]}),i&&s&&k.jsx(je.BuilderModal,{close:()=>{l(null),c(null),u(null)},children:k.jsx(je.ConfirmationModal,{})}),e&&k.jsx(je.BuilderModal,{close:t,children:k.jsx(Ft.ModifyPage,{})}),n&&k.jsx(je.BuilderModal,{close:r,children:k.jsx(je.ChooseImageModal,{})}),a.length>0&&k.jsx("div",{className:vn.notifications,children:a.map(d=>k.jsx(zd,{type:d.status,message:d.message,timer:d.timer||10,id:d.id,element:d.component},d.id))})]})};async function kt(e,t){const n=localStorage.getItem("shopId")||void 0,o=`${nn.getState().apiUrls.api}/${e}/builder/shops/${n}/${t}`;return(await at({url:o,withToken:!0,method:"get"})).data}async function Wd(){try{const[e,t,n,r,o,a,i,s,l]=await Promise.allSettled([kt("v1","general"),kt("v1","faqs"),kt("v1","listings"),kt("v1","products"),kt("v1","reviews"),kt("v1","categories"),{data:null},{data:null},{data:null}]);return{general:e,faqs:t,listings:n,products:r,reviews:o,categories:a,fullPosts:i,posts:s,vouches:l}}catch(e){throw console.error("Error fetching page data:",e),e}}async function qd(){const e=nn.getState().apiUrls;try{const{data:t}=await ce.get(`${e.googleFonts}?key=AIzaSyAEsTbjAPUz_TeuFCq4z4LPK9w_vst0Pfw`);return t.items}catch(t){throw console.error("Error fetching page data:",t),t}}async function Zd(){var o;const e=localStorage.getItem("shopId"),t=localStorage.getItem("draftId"),r=`${nn.getState().apiUrls.api}/v2/builder/shops/${e}/drafts/${t}/pages`;try{return(await at({url:r,withToken:!0,method:"get"})).data}catch(a){return{data:[],status:(o=a.response)==null?void 0:o.status}}}async function Gd(){const e=localStorage.getItem("shopId")||void 0,t=localStorage.getItem("draftId")||void 0,r=`${nn.getState().apiUrls.api}/v2/builder/shops/${e}/drafts/${t}/all`;return(await at({url:r,withToken:!0,method:"get"})).data}const Kd=e=>{const{blocks:t,settings:n,header:r,footer:o,announcement:a}=e,{setBlocks:i,setSourceBlocks:s,setHeader:l,setFooter:c,setAnnouncement:u,setSettings:d}=La(),{fonts:h,setFonts:w}=Oa(),{setSettings:m}=wr(),{setPageContext:p}=Yt(),{setThemeSettings:v,setIsLoadingThemeSettings:L}=On(),{setIsLoadingSettings:b}=wr(),{notifications:R,setNotifications:P}=Fe(),{setBlocks:T,blocks:H,createPage:S,setIsLoadingLayers:_,setHeader:G,setAnnouncement:B,setFooter:ae}=Mn(),{setPages:ee,setCurrentPage:te}=Yt();return we.useEffect(()=>{L(!0),_(!0),b(!0);const he={};Object.keys(t).forEach(Te=>{he[Te]=t[Te]}),s(he),i(he),l(r),c(o),u(a),d(n),(async()=>{const Te={listings:null,products:null,reviews:null,categories:null,faqs:null,general:null,fullPosts:null,posts:null,preserveContent:!1,vouches:null},Ze=await Wd();Object.keys(Ze).map(ie=>{const pe=ie;Te[pe]=Ze[pe].value.data}),p(Te);const{data:ue}=await Gd(),{themeSettings:Le,layers:Ce,settings:be}=ue||{};if(be){if(be.settings){const ie=new n;ie.blockSettings={displayName:"Settings",isAddable:!1,...be.settings},m(ie.blockSettings)}be.header&&G(be.header),be.footer&&ae(be.footer),be.announcement&&B(be.announcement)}else{const ie=new n;m(ie.blockSettings)}Le&&v(Le);const Pe=await Zd(),Ue={};if(Pe.status>=400&&P([...R,{id:ot(),message:"Error fetching pages",status:"error"}]),Pe.data.length>0?(Pe.data.forEach(ie=>{var pe,Me;H[ie.path]||S(ie.path),Ue[ie.id||ie.path]={...ie,icon:$t[ie.path]?$t[ie.path].icon:"File",name:ie.name||((pe=ie.seo)==null?void 0:pe.pageTitle)||((Me=$t[ie.path])==null?void 0:Me.name)||ie.path}}),ee(Ue),te(Object.keys(Ue)[0])):(ee($t),te(Object.keys($t)[0])),h.length===0){const ie=await qd();w([...ie.map(pe=>{const Me=pe.variants.map(Ee=>{if(!Ee.includes("italic"))return Ee==="regular"?"400":Ee}).filter(Ee=>Ee!==void 0);return{name:pe.family,weights:Me}})])}T(Ce),L(!1),_(!1),b(!1)})()},[]),k.jsx(Jd,{})};function Yd(){const e=new URL(window.location.href);window.history.replaceState(null,"",e.pathname+e.hash)}function Xd(){const e=new URLSearchParams(document.location.search),t=e.get("shopId")||localStorage.getItem("shopId"),n=e.get("sellerAccessToken")||localStorage.getItem("sellerAccessToken"),r=e.get("draftId")||localStorage.getItem("draftId");return Yd(),n&&localStorage.setItem("sellerAccessToken",n),t&&localStorage.setItem("shopId",t),r&&localStorage.setItem("draftId",r),!!(n&&t&&r)}const Qd="data:image/svg+xml,%3csvg%20width='204'%20height='241'%20viewBox='0%200%20204%20241'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M204%200V118.282L154.174%20134.707V69.0074L49.7111%20102.77V43.5716L204%200Z'%20fill='%23FF3F19'/%3e%3cpath%20d='M154.174%20134.694V191.155L0%20241V117.471L49.7114%20102.757V169.597L154.174%20134.694Z'%20fill='%23FF3F19'/%3e%3c/svg%3e",ef="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2019%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0.0103662%2023.5362C0.0538052%2022.4425%200.370173%2021.4309%201.08058%2020.6127C1.92699%2019.6379%202.91375%2019.2329%204.14841%2019.1732C4.162%2020.1401%204.15111%2021.1085%204.15091%2022.0756L4.70583%2022.0747L7.42027%2022.0755C7.95952%2022.0752%208.50027%2022.0844%209.03933%2022.0742L9.17755%2022.0731L10.6132%2022.0759C10.8265%2022.0759%2011.0767%2022.1021%2011.2852%2022.0658C11.3052%2022.0703%2011.3534%2022.0735%2011.3625%2022.0928C11.3917%2022.1543%2011.3688%2031.0517%2011.3725%2031.9631C11.1563%2032.0856%2010.2676%2031.8701%2010.0303%2031.7947C9.89866%2031.7528%209.644%2031.6914%209.54946%2031.5874L9.51914%2031.584C9.46943%2031.5736%209.44171%2031.5537%209.40126%2031.5222C9.30218%2031.5131%209.14954%2031.4132%209.07718%2031.343C9.00129%2031.3163%208.92757%2031.2576%208.85921%2031.2134L8.85617%2031.2002C8.5748%2031.0715%208.14929%2030.6244%207.94318%2030.376C7.35205%2029.6639%206.93892%2028.7659%206.83493%2027.8203C6.78763%2027.3904%206.7994%2026.9595%206.80055%2026.5277C6.80084%2026.4202%206.82996%2026.126%206.78242%2026.0387L6.71237%2026.023C6.54382%2026.0528%206.34316%2026.0328%206.17124%2026.0324L1.0194%2026.0325L0.942306%2026.0307C0.74237%2026.0326%200.173082%2026.0689%200.0224192%2026.0192L0.00848581%2026.0029C0.022853%2025.8597%200.0136924%2025.7065%200.013837%2025.562L0.0113299%2024.6651L0.0117161%2024.5253C0.0150266%2024.1956%200.0145767%2023.8659%200.0103662%2023.5362Z'%20fill='currentColor'/%3e%3cpath%20d='M6.79824%200.00127802C6.88001%20-0.000781892%206.96176%20-0.000351703%207.04349%200.00256876C7.12523%200.00549261%207.20682%200.0108998%207.28827%200.0187905C7.36968%200.0266845%207.45082%200.0370518%207.53169%200.0498924C7.61259%200.0627296%207.69305%200.078018%207.77309%200.0957576C7.85312%200.113501%207.93259%200.133663%208.0115%200.156244C8.09044%200.178828%208.16868%200.203796%208.24624%200.231148C8.3238%200.258499%208.40053%200.28819%208.47645%200.32022C8.55237%200.352247%208.62736%200.386559%208.70141%200.423156L8.71428%200.423492C8.76476%200.450874%208.815%200.479135%208.8661%200.50516C8.947%200.550491%209.03065%200.593185%209.10687%200.646856L9.24939%200.733144C9.31674%200.78126%209.38361%200.83049%209.45202%200.87695C10.462%201.67615%2011.1434%202.77146%2011.325%204.10211C11.4076%204.70784%2011.3729%205.34243%2011.372%205.9541C11.4625%205.96599%2011.5526%205.9664%2011.6436%205.96762C12.6033%205.93794%2013.5708%205.96289%2014.5314%205.96294C15.459%205.96305%2016.3927%205.93758%2017.3195%205.9633C17.5874%205.96523%2017.9062%206.00101%2018.1677%205.95273C18.1496%206.13096%2018.1583%206.31472%2018.1585%206.49401L18.1598%207.38388L18.1595%207.51855C18.1591%207.83084%2018.14%208.15609%2018.1607%208.46685C18.109%209.73893%2017.6972%2010.8198%2016.8003%2011.6891C15.9969%2012.4676%2015.0894%2012.76%2014.0228%2012.8194L14.021%2010.9083C14.0209%2010.5892%2014.0389%2010.2573%2014.0163%209.93952C14.0002%209.92849%2013.9879%209.91884%2013.9692%209.9133C13.7941%209.93418%2013.6055%209.92148%2013.4293%209.92133H9.15258L9.04077%209.92082L7.56664%209.92209C7.31676%209.92224%207.04528%209.94526%206.79858%209.90893L6.79824%200.00127802Z'%20fill='currentColor'/%3e%3cpath%20d='M4.13987%205.96279C4.65941%205.9653%205.17894%205.96467%205.69847%205.96091C5.70059%207.27995%205.71757%208.60219%205.69833%209.92082L4.15072%209.92046L4.15106%2011.4065C4.15096%2011.6783%204.1406%2011.9555%204.15443%2012.2266C4.73799%2012.8393%205.31307%2013.4655%205.90921%2014.0644L5.98321%2014.0407C6.25311%2014.0833%206.6928%2014.0501%206.97981%2014.0499L12.7386%2014.0492L13.5943%2014.0482C13.7363%2014.0479%2013.9068%2014.0286%2014.0457%2014.0577L15.8019%2015.9078L15.8915%2015.997L15.9615%2016.0784L15.9955%2016.1093L17.4221%2017.6163C17.6528%2017.8599%2017.9077%2018.0979%2018.1211%2018.3569C18.1463%2018.3875%2018.1599%2018.4086%2018.1691%2018.4477C18.1415%2018.6757%2018.1577%2018.9211%2018.1579%2019.1514L18.1594%2020.4531C18.1597%2021.8112%2018.142%2023.1721%2018.1599%2024.5297L18.1589%2024.6625L18.158%2025.5556C18.158%2025.7089%2018.1437%2025.8808%2018.1676%2026.0315L18.0995%2026.031L17.2568%2026.0329L17.2101%2026.0308C16.2512%2026.0486%2015.2892%2026.0305%2014.3299%2026.0308C13.7488%2026.031%2013.0694%2026.064%2012.4959%2026.0258L12.4831%2026.0202C12.4481%2025.9239%2012.4717%2022.4806%2012.47%2022.075L14.0216%2022.0744C14.0024%2021.3241%2014.0324%2020.5711%2014.0173%2019.8203C13.4629%2019.2116%2012.887%2018.6041%2012.3052%2018.0244L12.293%2017.9978C12.0554%2018.0392%2011.5401%2018.0054%2011.2777%2018.0053L8.9362%2018.0074C7.75375%2017.9793%206.56306%2018.0065%205.37994%2018.0069C5.13497%2018.007%204.32737%2018.0401%204.13472%2017.9962L2.36331%2016.1262L2.29219%2016.0566L2.21959%2015.9758L2.15074%2015.9102C1.93803%2015.6694%201.70849%2015.441%201.48797%2015.2079L0%2013.631C0.0383768%2013.4512%200.014078%2013.2231%200.013837%2013.0369L0.0121494%2011.9198L0.0113299%207.52017L0.0122943%207.34622C0.0134032%206.9143%200.0453199%206.37479%200.00371286%205.95329C0.115854%205.96772%200.229056%205.9664%200.341872%205.96777C0.589393%205.96198%200.836946%205.96042%201.08453%205.9631L3.10905%205.96548C3.44789%205.96554%203.80282%205.98825%204.13987%205.96279Z'%20fill='currentColor'/%3e%3c/svg%3e",tf=e=>{const{blocks:t,settings:n,header:r,footer:o,announcement:a}=e,{isAntistock:i}=Ar(),[s,l]=we.useState(!0),c=Xt(),u=We();return we.useEffect(()=>{const d=u.pathname;if(d.startsWith("/admin/builder")){d==="/admin/builder/add"?document.title="Add Section | Builder":d==="/admin/builder/theme"?document.title="Theme Settings | Builder":d==="/admin/builder/settings"?document.title="Settings | Builder":document.title=`Builder | ${i?"Antistock":"Billgang "}`;let h=document.querySelector("link[rel~='icon']");h||(h=document.createElement("link"),h.rel="icon",document.head.appendChild(h)),h&&(h.href=i?ef:Qd)}},[u]),we.useEffect(()=>{l(!0),Xd()?l(!1):c("/")},[]),k.jsx(k.Fragment,{children:s?k.jsx(je.LoaderBuilder,{}):k.jsx(Kd,{blocks:t,settings:n,header:r,footer:o,announcement:a})})},nf=Object.freeze(Object.defineProperty({__proto__:null,BuilderPage:tf},Symbol.toStringTag,{value:"Module"}));exports.AddSectionSubmodal=Zu;exports.AnimatedPanel=Td;exports.AntistockRoutes=Xo;exports.ColorPicker=Da;exports.ColorPickerModal=Ld;exports.IS_LOCAL_HOST=cu;exports.Loader=Cu;exports.NavLink=Ko;exports.Navigate=is;exports.Outlet=ss;exports.Picker=Md;exports.RadiusVariables=uu;exports.RouterProvider=Ps;exports.Routes=Pr;exports.Submodal=qu;exports.ThicknessVariables=du;exports.Tooltip=Lu;exports.aspectRatio=fu;exports.aspectRatioOptions=hu;exports.axios=ce;exports.blockIcons=zu;exports.clx=Be;exports.commonjsGlobal=yu;exports.convertCfImageIdToUrl=Fc;exports.createBrowserRouter=Es;exports.defaultPagePaths=lu;exports.devices=au;exports.extractDateAndTime=Uc;exports.formatLabel=Ru;exports.formatPrice=Ic;exports.formatTimestamp=Hc;exports.getDefaultExportFromCjs=Pa;exports.getDisplayName=ku;exports.getModalPosition=Aa;exports.index=nf;exports.jwtDecode=Qo;exports.navbarBlocks=ka;exports.normalizeInterval=jc;exports.percentageDifference=Bc;exports.referralSteps=Js;exports.request=at;exports.sizeOptions=su;exports.themeSettingsBlocks=iu;exports.typeFontOptions=pu;exports.useApiStore=nn;exports.useBlocksStore=La;exports.useCartStore=qc;exports.useChooseImageStore=Na;exports.useColorPickerStore=Fr;exports.useConfirmationModalStore=Ta;exports.useCustomerDashboardStore=Gs;exports.useDeviceStore=wu;exports.useDiscordStore=Gc;exports.useErrorStore=gu;exports.useFontsStore=Oa;exports.useGeneralStore=Ar;exports.useGetTsId=xa;exports.useHistoryStore=_e;exports.useLayersStore=Mn;exports.useLocation=We;exports.useModalStore=Yc;exports.useNavbarStore=mu;exports.useNavigate=Xt;exports.useNotificationStore=Fe;exports.usePagesStore=Yt;exports.usePaginationPagesStore=Zc;exports.useParams=Wi;exports.usePreviewStore=Ra;exports.useRouteError=Wo;exports.useSearchParams=Bs;exports.useSettingsStore=wr;exports.useShareLinkStore=ou;exports.useStorefrontStore=Ks;exports.useSubmodalStore=Dr;exports.useSubscriptionStore=Kc;exports.useThemeSettingsStore=On;exports.useTooltipStore=Ma;exports.useTrackingAnalytics=Jc;exports.v4=ot;
|