@billgangcom/theme-lib 1.116.1 → 1.116.2

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.
Files changed (42) hide show
  1. package/dist/{builder-DqDtctC5.cjs → builder-C7KDCjPK.cjs} +10 -10
  2. package/dist/{builder-components-DzvQc6D4.js → builder-components-C8GR-K0b.js} +4 -4
  3. package/dist/{builder-components-D3Bb10J8.cjs → builder-components-DTCH52Zj.cjs} +1 -1
  4. package/dist/{builder-DUFJOYbB.js → builder-q7_i-usP.js} +15 -9
  5. package/dist/builder.cjs.js +1 -1
  6. package/dist/builder.es.js +22 -22
  7. package/dist/{charge-I1l9O9oW.cjs → charge-CjJu8ZCC.cjs} +2 -2
  8. package/dist/{charge-JAW-QeMZ.js → charge-D5cvaKFj.js} +8 -7
  9. package/dist/{checkout-BvcF30gE.js → checkout-CsTsjmHG.js} +5 -5
  10. package/dist/{checkout-CwhyZ4zD.cjs → checkout-Dbu7YMSx.cjs} +1 -1
  11. package/dist/exports.cjs.js +1 -1
  12. package/dist/exports.es.js +6 -6
  13. package/dist/{index-Bfh9GkFs.cjs → index-2oIkoScp.cjs} +1 -1
  14. package/dist/{index-Cdm3FwGu.cjs → index-B-z0PneZ.cjs} +1 -1
  15. package/dist/{index-DjnhbFh9.cjs → index-B1UP_MbR.cjs} +1 -1
  16. package/dist/{index-CyaRCiT9.js → index-BLeoCjpE.js} +5 -5
  17. package/dist/{index-bsPNagUY.js → index-BbZMD5la.js} +5 -5
  18. package/dist/{index-DcWpxbHI.js → index-C9TT9z5B.js} +5 -5
  19. package/dist/{index-EjVO3qce.js → index-DU5z0tPJ.js} +5 -5
  20. package/dist/{index-dp4B_uob.cjs → index-DXroLqaD.cjs} +1 -1
  21. package/dist/{index-BGpMbUmG.js → index-d8l00Hpw.js} +1 -1
  22. package/dist/{index-BsM2kPyQ.cjs → index-r9HLobSy.cjs} +1 -1
  23. package/dist/index.cjs.js +1 -1
  24. package/dist/index.es.js +6 -6
  25. package/dist/{order-BLPHbRzn.js → order-Cveqw4gC.js} +5 -5
  26. package/dist/{order-DN9oIA9o.cjs → order-d9OX_gLP.cjs} +1 -1
  27. package/dist/src/abstractions/PageContext.d.ts +7 -0
  28. package/dist/src/abstractions/Variable.d.ts +1 -0
  29. package/dist/src/builder/api/fetchData.d.ts +3 -0
  30. package/dist/{subscription-r7qA65EX.cjs → subscription-BvsNAnoC.cjs} +1 -1
  31. package/dist/{subscription-D0TYbXFf.js → subscription-Bz6FRE3J.js} +5 -5
  32. package/dist/{ticket-BivnxhDp.cjs → ticket-B90nYD05.cjs} +1 -1
  33. package/dist/{ticket--uOANXoZ.js → ticket-DU1t1M0h.js} +9 -7
  34. package/dist/{top-up-u1oUf64a.js → top-up-2OMBI611.js} +5 -5
  35. package/dist/{top-up-C13wralR.cjs → top-up-CFc0wZAg.cjs} +1 -1
  36. package/dist/{ui-components-CC9DRvrZ.cjs → ui-components-B79-9qoP.cjs} +1 -1
  37. package/dist/{ui-components-CqwUR9GH.js → ui-components-BxH-lR8m.js} +4 -4
  38. package/dist/ui.cjs.js +1 -1
  39. package/dist/ui.es.js +1 -1
  40. package/dist/{validation-BtrRWzoi.cjs → validation-Crn-70HH.cjs} +1 -1
  41. package/dist/{validation-ekksqWOd.js → validation-DpREFoxz.js} +5 -5
  42. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- "use strict";const we=require("react"),Va=require("react-dom"),N=require("react/jsx-runtime"),je=require("./ui-components-CC9DRvrZ.cjs"),Dt=require("./builder-components-D3Bb10J8.cjs");require("./charge-I1l9O9oW.cjs");require("./ticket-BivnxhDp.cjs");function Oo(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 C=Oo(we),$a=Oo(Va);/**
1
+ "use strict";const we=require("react"),Va=require("react-dom"),N=require("react/jsx-runtime"),je=require("./ui-components-B79-9qoP.cjs"),Dt=require("./builder-components-DTCH52Zj.cjs");require("./charge-CjJu8ZCC.cjs");require("./ticket-B90nYD05.cjs");function Oo(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 C=Oo(we),$a=Oo(Va);/**
2
2
  * @remix-run/router v1.23.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
@@ -7,8 +7,8 @@
7
7
  * LICENSE.md file in the root directory of this source tree.
8
8
  *
9
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 Jr="popstate";function za(e){e===void 0&&(e={});function t(r,o){let{pathname:a,search:s,hash:i}=r.location;return qt("",{pathname:a,search:s,hash:i},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 Ja(){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||Ja()})}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,s=o.history,i=ve.Pop,l=null,c=u();c==null&&(c=0,s.replaceState(fe({},s.state,{idx:c}),""));function u(){return(s.state||{idx:null}).idx}function d(){i=ve.Pop;let y=u(),R=y==null?null:y-c;c=y,l&&l({action:i,location:h.location,delta:R})}function m(y,R){i=ve.Push;let b=qt(h.location,y,R);c=u()+1;let k=qr(b,c),L=h.createHref(b);try{s.pushState(k,"",L)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;o.location.assign(L)}a&&l&&l({action:i,location:h.location,delta:1})}function v(y,R){i=ve.Replace;let b=qt(h.location,y,R);c=u();let k=qr(b,c),L=h.createHref(b);s.replaceState(k,"",L),a&&l&&l({action:i,location:h.location,delta:0})}function p(y){let R=o.location.origin!=="null"?o.location.origin:o.location.href,b=typeof y=="string"?y:ct(y);return b=b.replace(/ $/,"%20"),I(R,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,R)}let h={get action(){return i},get location(){return e(o,s)},listen(y){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(Jr,d),l=y,()=>{o.removeEventListener(Jr,d),l=null}},createHref(y){return t(o,y)},createURL:p,encodeLocation(y){let R=p(y);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:m,replace:v,go(y){return s.go(y)}};return h}var oe;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(oe||(oe={}));const Wa=new Set(["lazy","caseSensitive","path","id","index","children"]);function Za(e){return e.index===!0}function xn(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((o,a)=>{let s=[...n,String(a)],i=typeof o.id=="string"?o.id:s.join("-");if(I(o.index!==!0||!o.children,"Cannot specify children on an index route"),I(!r[i],'Found a route id collision on id "'+i+`". Route id's must be globally unique within Data Router usages`),Za(o)){let l=fe({},o,t(o),{id:i});return r[i]=l,l}else{let l=fe({},o,t(o),{id:i,children:void 0});return r[i]=l,o.children&&(l.children=xn(o.children,t,s,r)),l}})}function mt(e,t,n){return n===void 0&&(n="/"),vn(e,t,n,!1)}function vn(e,t,n,r){let o=typeof t=="string"?dt(t):t,a=$e(o.pathname||"/",n);if(a==null)return null;let s=Mo(e);Ka(s);let i=null;for(let l=0;i==null&&l<s.length;++l){let c=is(a);i=as(s[l],c,r)}return i}function Ga(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 Mo(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let o=(a,s,i)=>{let l={relativePath:i===void 0?a.path||"":i,caseSensitive:a.caseSensitive===!0,childrenIndex:s,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=Xe([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+'".')),Mo(a.children,t,u,c)),!(a.path==null&&!a.index)&&t.push({path:c,score:rs(c,a.index),routesMeta:u})};return e.forEach((a,s)=>{var i;if(a.path===""||!((i=a.path)!=null&&i.includes("?")))o(a,s);else for(let l of Ao(a.path))o(a,s,l)}),t}function Ao(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 s=Ao(r.join("/")),i=[];return i.push(...s.map(l=>l===""?a:[a,l].join("/"))),o&&i.push(...s),i.map(l=>e.startsWith("/")&&l===""?"/":l)}function Ka(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:os(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Ya=/^:[\w-]+$/,Xa=3,Qa=2,es=1,ts=10,ns=-2,Wr=e=>e==="*";function rs(e,t){let n=e.split("/"),r=n.length;return n.some(Wr)&&(r+=ns),t&&(r+=Qa),n.filter(o=>!Wr(o)).reduce((o,a)=>o+(Ya.test(a)?Xa:a===""?es:ts),r)}function os(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 as(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,o={},a="/",s=[];for(let i=0;i<r.length;++i){let l=r[i],c=i===r.length-1,u=a==="/"?t:t.slice(a.length)||"/",d=Rn({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),m=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),s.push({params:o,pathname:Xe([a,d.pathname]),pathnameBase:us(Xe([a,d.pathnameBase])),route:m}),d.pathnameBase!=="/"&&(a=Xe([a,d.pathnameBase]))}return s}function Rn(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=ss(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],s=a.replace(/(.)\/+$/,"$1"),i=o.slice(1);return{params:r.reduce((c,u,d)=>{let{paramName:m,isOptional:v}=u;if(m==="*"){let h=i[d]||"";s=a.slice(0,a.length-h.length).replace(/(.)\/+$/,"$1")}const p=i[d];return v&&!p?c[m]=void 0:c[m]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:a,pathnameBase:s,pattern:e}}function ss(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,(s,i,l)=>(r.push({paramName:i,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 is(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 $e(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 ls(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:cs(n,t):t,search:ds(r),hash:fs(o)}}function cs(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 Zn(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 Do(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function br(e,t){let n=Do(e);return t?n.map((r,o)=>o===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Sr(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("?"),Zn("?","pathname","search",o)),I(!o.pathname||!o.pathname.includes("#"),Zn("#","pathname","hash",o)),I(!o.search||!o.search.includes("#"),Zn("#","search","hash",o)));let a=e===""||o.pathname==="",s=a?"/":o.pathname,i;if(s==null)i=n;else{let d=t.length-1;if(!r&&s.startsWith("..")){let m=s.split("/");for(;m[0]==="..";)m.shift(),d-=1;o.pathname=m.join("/")}i=d>=0?t[d]:"/"}let l=ls(o,i),c=s&&s!=="/"&&s.endsWith("/"),u=(a||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Xe=e=>e.join("/").replace(/\/\/+/g,"/"),us=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),ds=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,fs=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 Wt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Fo=["post","put","patch","delete"],hs=new Set(Fo),ps=["get",...Fo],ms=new Set(ps),gs=new Set([301,302,303,307,308]),ys=new Set([307,308]),Gn={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},vs={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ft={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Er=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ws=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Io="remix-router-transitions";function bs(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=ws;let a={},s=xn(e.routes,o,void 0,a),i,l=e.basename||"/",c=e.dataStrategy||xs,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),m=null,v=new Set,p=null,h=null,y=null,R=e.hydrationData!=null,b=mt(s,e.history.location,l),k=!1,L=null;if(b==null&&!u){let f=Ae(404,{pathname:e.history.location.pathname}),{matches:g,route:S}=oo(s);b=g,L={[S.id]:f}}b&&!e.hydrationData&&cn(b,s,e.history.location.pathname).active&&(b=null);let _;if(b)if(b.some(f=>f.route.lazy))_=!1;else if(!b.some(f=>f.route.loader))_=!0;else if(d.v7_partialHydration){let f=e.hydrationData?e.hydrationData.loaderData:null,g=e.hydrationData?e.hydrationData.errors:null;if(g){let S=b.findIndex(x=>g[x.route.id]!==void 0);_=b.slice(0,S+1).every(x=>!ir(x.route,f,g))}else _=b.every(S=>!ir(S.route,f,g))}else _=e.hydrationData!=null;else if(_=!1,b=[],d.v7_partialHydration){let f=cn(null,s,e.history.location.pathname);f.active&&f.matches&&(k=!0,b=f.matches)}let H,w={historyAction:e.history.action,location:e.history.location,matches:b,initialized:_,navigation:Gn,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||L,fetchers:new Map,blockers:new Map},P=ve.Pop,G=!1,B,ae=!1,ee=new Map,te=null,he=!1,Oe=!1,_e=[],We=new Set,ue=new Map,Re=0,Ee=-1,be=new Map,Le=new Set,Ue=new Map,se=new Map,pe=new Set,Me=new Map,Ce=new Map,ft;function nn(){if(m=e.history.listen(f=>{let{action:g,location:S,delta:x}=f;if(ft){ft(),ft=void 0;return}Se(Ce.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 T=Ur({currentLocation:w.location,nextLocation:S,historyAction:g});if(T&&x!=null){let F=new Promise(j=>{ft=j});e.history.go(x*-1),ln(T,{state:"blocked",location:S,proceed(){ln(T,{state:"proceeding",proceed:void 0,reset:void 0,location:S}),F.then(()=>e.history.go(x))},reset(){let j=new Map(w.blockers);j.set(T,Ft),xe({blockers:j})}});return}return Ze(g,S)}),n){Bs(t,ee);let f=()=>js(t,ee);t.addEventListener("pagehide",f),te=()=>t.removeEventListener("pagehide",f)}return w.initialized||Ze(ve.Pop,w.location,{initialHydration:!0}),H}function zn(){m&&m(),te&&te(),v.clear(),B&&B.abort(),w.fetchers.forEach((f,g)=>sn(g)),w.blockers.forEach((f,g)=>Hr(g))}function rn(f){return v.add(f),()=>v.delete(f)}function xe(f,g){g===void 0&&(g={}),w=fe({},w,f);let S=[],x=[];d.v7_fetcherPersist&&w.fetchers.forEach((T,F)=>{T.state==="idle"&&(pe.has(F)?x.push(F):S.push(F))}),pe.forEach(T=>{!w.fetchers.has(T)&&!ue.has(T)&&x.push(T)}),[...v].forEach(T=>T(w,{deletedFetchers:x,viewTransitionOpts:g.viewTransitionOpts,flushSync:g.flushSync===!0})),d.v7_fetcherPersist?(S.forEach(T=>w.fetchers.delete(T)),x.forEach(T=>sn(T))):x.forEach(T=>pe.delete(T))}function et(f,g,S){var x,T;let{flushSync:F}=S===void 0?{}:S,j=w.actionData!=null&&w.navigation.formMethod!=null&&Ve(w.navigation.formMethod)&&w.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=w.actionData:M=null;let A=g.loaderData?no(w.loaderData,g.loaderData,g.matches||[],g.errors):w.loaderData,O=w.blockers;O.size>0&&(O=new Map(O),O.forEach((Y,ke)=>O.set(ke,Ft)));let D=G===!0||w.navigation.formMethod!=null&&Ve(w.navigation.formMethod)&&((T=f.state)==null?void 0:T._isRedirect)!==!0;i&&(s=i,i=void 0),he||P===ve.Pop||(P===ve.Push?e.history.push(f,f.state):P===ve.Replace&&e.history.replace(f,f.state));let J;if(P===ve.Pop){let Y=ee.get(w.location.pathname);Y&&Y.has(f.pathname)?J={currentLocation:w.location,nextLocation:f}:ee.has(f.pathname)&&(J={currentLocation:f,nextLocation:w.location})}else if(ae){let Y=ee.get(w.location.pathname);Y?Y.add(f.pathname):(Y=new Set([f.pathname]),ee.set(w.location.pathname,Y)),J={currentLocation:w.location,nextLocation:f}}xe(fe({},g,{actionData:M,loaderData:A,historyAction:P,location:f,initialized:!0,navigation:Gn,revalidation:"idle",restoreScrollPosition:$r(f,g.matches||w.matches),preventScrollReset:D,blockers:O}),{viewTransitionOpts:J,flushSync:F===!0}),P=ve.Pop,G=!1,ae=!1,he=!1,Oe=!1,_e=[]}async function on(f,g){if(typeof f=="number"){e.history.go(f);return}let S=sr(w.location,w.matches,l,d.v7_prependBasename,f,d.v7_relativeSplatPath,g==null?void 0:g.fromRouteId,g==null?void 0:g.relative),{path:x,submission:T,error:F}=Zr(d.v7_normalizeFormMethod,!1,S,g),j=w.location,M=qt(w.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||T!=null&&Ve(T.formMethod)&&T.formAction===w.location.pathname+w.location.search&&(O=ve.Replace);let D=g&&"preventScrollReset"in g?g.preventScrollReset===!0:void 0,J=(g&&g.flushSync)===!0,Y=Ur({currentLocation:j,nextLocation:M,historyAction:O});if(Y){ln(Y,{state:"blocked",location:M,proceed(){ln(Y,{state:"proceeding",proceed:void 0,reset:void 0,location:M}),on(f,g)},reset(){let ke=new Map(w.blockers);ke.set(Y,Ft),xe({blockers:ke})}});return}return await Ze(O,M,{submission:T,pendingError:F,preventScrollReset:D,replace:g&&g.replace,enableViewTransition:g&&g.viewTransition,flushSync:J})}function an(){if(ht(),xe({revalidation:"loading"}),w.navigation.state!=="submitting"){if(w.navigation.state==="idle"){Ze(w.historyAction,w.location,{startUninterruptedRevalidation:!0});return}Ze(P||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation,enableViewTransition:ae===!0})}}async function Ze(f,g,S){B&&B.abort(),B=null,P=f,he=(S&&S.startUninterruptedRevalidation)===!0,Ba(w.location,w.matches),G=(S&&S.preventScrollReset)===!0,ae=(S&&S.enableViewTransition)===!0;let x=i||s,T=S&&S.overrideNavigation,F=S!=null&&S.initialHydration&&w.matches&&w.matches.length>0&&!k?w.matches:mt(x,g,l),j=(S&&S.flushSync)===!0;if(F&&w.initialized&&!Oe&&Ls(w.location,g)&&!(S&&S.submission&&Ve(S.submission.formMethod))){et(g,{matches:F},{flushSync:j});return}let M=cn(F,x,g.pathname);if(M.active&&M.matches&&(F=M.matches),!F){let{error:le,notFoundMatches:Q,route:me}=Jn(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,S&&S.submission),O;if(S&&S.pendingError)O=[gt(F).route.id,{type:oe.error,error:S.pendingError}];else if(S&&S.submission&&Ve(S.submission.formMethod)){let le=await V(A,g,S.submission,F,M.active,{replace:S.replace,flushSync:j});if(le.shortCircuited)return;if(le.pendingActionResult){let[Q,me]=le.pendingActionResult;if(Ie(me)&&Wt(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,T=Kn(g,S.submission),j=!1,M.active=!1,A=xt(e.history,A.url,A.signal)}let{shortCircuited:D,matches:J,loaderData:Y,errors:ke}=await U(A,g,F,M.active,T,S&&S.submission,S&&S.fetcherSubmission,S&&S.replace,S&&S.initialHydration===!0,j,O);D||(B=null,et(g,fe({matches:J||F},ro(O),{loaderData:Y,errors:ke})))}async function V(f,g,S,x,T,F){F===void 0&&(F={}),ht();let j=Fs(g,S);if(xe({navigation:j},{flushSync:F.flushSync===!0}),T){let O=await un(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}=Jn(g.pathname);return{matches:D,pendingActionResult:[Y.id,{type:oe.error,error:J}]}}}let M,A=$t(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",w,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=Qr(M.response.headers.get("Location"),new URL(f.url),l)===w.location.pathname+w.location.search,await Z(f,M,!0,{submission:S,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&&(P=ve.Push),{matches:x,pendingActionResult:[O.route.id,M]}}return{matches:x,pendingActionResult:[A.route.id,M]}}async function U(f,g,S,x,T,F,j,M,A,O,D){let J=T||Kn(g,F),Y=F||j||so(J),ke=!he&&(!d.v7_partialHydration||!A);if(x){if(ke){let ge=ne(D);xe(fe({navigation:J},ge!==void 0?{actionData:ge}:{}),{flushSync:O})}let X=await un(S,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)S=X.matches;else{let{error:ge,notFoundMatches:Et,route:At}=Jn(g.pathname);return{matches:Et,loaderData:{},errors:{[At.id]:ge}}}}let le=i||s,[Q,me]=Kr(e.history,w,S,Y,g,d.v7_partialHydration&&A===!0,d.v7_skipActionErrorRevalidation,Oe,_e,We,pe,Ue,Le,le,l,D);if(qn(X=>!(S&&S.some(ge=>ge.route.id===X))||Q&&Q.some(ge=>ge.route.id===X)),Ee=++Re,Q.length===0&&me.length===0){let X=Br();return et(g,fe({matches:S,loaderData:{},errors:D&&Ie(D[1])?{[D[0]]:D[1].error}:null},ro(D),X?{fetchers:new Map(w.fetchers)}:{}),{flushSync:O}),{shortCircuited:!0}}if(ke){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=>{st(X.key),X.controller&&ue.set(X.key,X.controller)});let St=()=>me.forEach(X=>st(X.key));B&&B.signal.addEventListener("abort",St);let{loaderResults:Ot,fetcherResults:rt}=await tt(w,S,Q,me,f);if(f.signal.aborted)return{shortCircuited:!0};B&&B.signal.removeEventListener("abort",St),me.forEach(X=>ue.delete(X.key));let Ke=hn(Ot);if(Ke)return await Z(f,Ke.result,!0,{replace:M}),{shortCircuited:!0};if(Ke=hn(rt),Ke)return Le.add(Ke.key),await Z(f,Ke.result,!0,{replace:M}),{shortCircuited:!0};let{loaderData:Wn,errors:Mt}=to(w,S,Ot,D,me,rt,Me);Me.forEach((X,ge)=>{X.subscribe(Et=>{(Et||X.done)&&Me.delete(ge)})}),d.v7_partialHydration&&A&&w.errors&&(Mt=fe({},w.errors,Mt));let pt=Br(),dn=jr(Ee),fn=pt||dn||me.length>0;return fe({matches:S,loaderData:Wn,errors:Mt},fn?{fetchers:new Map(w.fetchers)}:{})}function ne(f){if(f&&!Ie(f[1]))return{[f[0]]:f[1].data};if(w.actionData)return Object.keys(w.actionData).length===0?null:w.actionData}function z(f){return f.forEach(g=>{let S=w.fetchers.get(g.key),x=It(void 0,S?S.data:void 0);w.fetchers.set(g.key,x)}),new Map(w.fetchers)}function K(f,g,S,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.");st(f);let T=(x&&x.flushSync)===!0,F=i||s,j=sr(w.location,w.matches,l,d.v7_prependBasename,S,d.v7_relativeSplatPath,g,x==null?void 0:x.relative),M=mt(F,j,l),A=cn(M,F,j);if(A.active&&A.matches&&(M=A.matches),!M){nt(f,g,Ae(404,{pathname:j}),{flushSync:T});return}let{path:O,submission:D,error:J}=Zr(d.v7_normalizeFormMethod,!0,j,x);if(J){nt(f,g,J,{flushSync:T});return}let Y=$t(M,O),ke=(x&&x.preventScrollReset)===!0;if(D&&Ve(D.formMethod)){q(f,g,O,Y,M,A.active,T,ke,D);return}Ue.set(f,{routeId:g,path:O}),re(f,g,O,Y,M,A.active,T,ke,D)}async function q(f,g,S,x,T,F,j,M,A){ht(),Ue.delete(f);function O(ye){if(!ye.route.action&&!ye.route.lazy){let Ct=Ae(405,{method:A.formMethod,pathname:S,routeId:g});return nt(f,g,Ct,{flushSync:j}),!0}return!1}if(!F&&O(x))return;let D=w.fetchers.get(f);Ge(f,Is(A,D),{flushSync:j});let J=new AbortController,Y=xt(e.history,S,J.signal,A);if(F){let ye=await un(T,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(T=ye.matches,x=$t(T,S),O(x))return}else{nt(f,g,Ae(404,{pathname:S}),{flushSync:j});return}}ue.set(f,J);let ke=Re,Q=(await de("action",w,Y,[x],T,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)){Ge(f,it(void 0));return}}else{if(yt(Q))if(ue.delete(f),Ee>ke){Ge(f,it(void 0));return}else return Le.add(f),Ge(f,It(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=w.navigation.location||w.location,St=xt(e.history,me,J.signal),Ot=i||s,rt=w.navigation.state!=="idle"?mt(Ot,w.navigation.location,l):w.matches;I(rt,"Didn't find any matches after fetcher action");let Ke=++Re;be.set(f,Ke);let Wn=It(A,Q.data);w.fetchers.set(f,Wn);let[Mt,pt]=Kr(e.history,w,rt,A,me,!1,d.v7_skipActionErrorRevalidation,Oe,_e,We,pe,Ue,Le,Ot,l,[x.route.id,Q]);pt.filter(ye=>ye.key!==f).forEach(ye=>{let Ct=ye.key,zr=w.fetchers.get(Ct),Ua=It(void 0,zr?zr.data:void 0);w.fetchers.set(Ct,Ua),st(Ct),ye.controller&&ue.set(Ct,ye.controller)}),xe({fetchers:new Map(w.fetchers)});let dn=()=>pt.forEach(ye=>st(ye.key));J.signal.addEventListener("abort",dn);let{loaderResults:fn,fetcherResults:X}=await tt(w,rt,Mt,pt,St);if(J.signal.aborted)return;J.signal.removeEventListener("abort",dn),be.delete(f),ue.delete(f),pt.forEach(ye=>ue.delete(ye.key));let ge=hn(fn);if(ge)return Z(St,ge.result,!1,{preventScrollReset:M});if(ge=hn(X),ge)return Le.add(ge.key),Z(St,ge.result,!1,{preventScrollReset:M});let{loaderData:Et,errors:At}=to(w,rt,fn,void 0,pt,X,Me);if(w.fetchers.has(f)){let ye=it(Q.data);w.fetchers.set(f,ye)}jr(Ke),w.navigation.state==="loading"&&Ke>Ee?(I(P,"Expected pending action"),B&&B.abort(),et(w.navigation.location,{matches:rt,loaderData:Et,errors:At,fetchers:new Map(w.fetchers)})):(xe({errors:At,loaderData:no(w.loaderData,Et,rt,At),fetchers:new Map(w.fetchers)}),Oe=!1)}async function re(f,g,S,x,T,F,j,M,A){let O=w.fetchers.get(f);Ge(f,It(A,O?O.data:void 0),{flushSync:j});let D=new AbortController,J=xt(e.history,S,D.signal);if(F){let Q=await un(T,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)T=Q.matches,x=$t(T,S);else{nt(f,g,Ae(404,{pathname:S}),{flushSync:j});return}}ue.set(f,D);let Y=Re,le=(await de("loader",w,J,[x],T,f))[x.route.id];if(lt(le)&&(le=await Cr(le,J.signal,!0)||le),ue.get(f)===D&&ue.delete(f),!J.signal.aborted){if(pe.has(f)){Ge(f,it(void 0));return}if(yt(le))if(Ee>Y){Ge(f,it(void 0));return}else{Le.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"),Ge(f,it(le.data))}}async function Z(f,g,S,x){let{submission:T,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=Qr(A,new URL(f.url),l);let O=qt(w.location,A,{_isRedirect:!0});if(n){let Q=!1;if(g.response.headers.has("X-Remix-Reload-Document"))Q=!0;else if(Er.test(A)){const me=e.history.createURL(A);Q=me.origin!==t.location.origin||$e(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:ke}=w.navigation;!T&&!F&&J&&Y&&ke&&(T=so(w.navigation));let le=T||F;if(ys.has(g.response.status)&&le&&Ve(le.formMethod))await Ze(D,O,{submission:fe({},le,{formAction:A}),preventScrollReset:j||G,enableViewTransition:S?ae:void 0});else{let Q=Kn(O,T);await Ze(D,O,{overrideNavigation:Q,fetcherSubmission:F,preventScrollReset:j||G,enableViewTransition:S?ae:void 0})}}async function de(f,g,S,x,T,F){let j,M={};try{j=await Rs(c,f,g,S,x,T,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(Ps(O)){let D=O.result;M[A]={type:oe.redirect,response:Ts(D,S,A,T,l,d.v7_relativeSplatPath)}}else M[A]=await Ns(O);return M}async function tt(f,g,S,x,T){let F=f.matches,j=de("loader",f,T,S,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([As(g,A,T.signal,F,f.loaderData),Ds(g,O,x)]),{loaderResults:A,fetcherResults:O}}function ht(){Oe=!0,_e.push(...qn()),Ue.forEach((f,g)=>{ue.has(g)&&We.add(g),st(g)})}function Ge(f,g,S){S===void 0&&(S={}),w.fetchers.set(f,g),xe({fetchers:new Map(w.fetchers)},{flushSync:(S&&S.flushSync)===!0})}function nt(f,g,S,x){x===void 0&&(x={});let T=gt(w.matches,g);sn(f),xe({errors:{[T.route.id]:S},fetchers:new Map(w.fetchers)},{flushSync:(x&&x.flushSync)===!0})}function Fr(f){return se.set(f,(se.get(f)||0)+1),pe.has(f)&&pe.delete(f),w.fetchers.get(f)||vs}function sn(f){let g=w.fetchers.get(f);ue.has(f)&&!(g&&g.state==="loading"&&be.has(f))&&st(f),Ue.delete(f),be.delete(f),Le.delete(f),d.v7_fetcherPersist&&pe.delete(f),We.delete(f),w.fetchers.delete(f)}function Da(f){let g=(se.get(f)||0)-1;g<=0?(se.delete(f),pe.add(f),d.v7_fetcherPersist||sn(f)):se.set(f,g),xe({fetchers:new Map(w.fetchers)})}function st(f){let g=ue.get(f);g&&(g.abort(),ue.delete(f))}function Ir(f){for(let g of f){let S=Fr(g),x=it(S.data);w.fetchers.set(g,x)}}function Br(){let f=[],g=!1;for(let S of Le){let x=w.fetchers.get(S);I(x,"Expected fetcher: "+S),x.state==="loading"&&(Le.delete(S),f.push(S),g=!0)}return Ir(f),g}function jr(f){let g=[];for(let[S,x]of be)if(x<f){let T=w.fetchers.get(S);I(T,"Expected fetcher: "+S),T.state==="loading"&&(st(S),be.delete(S),g.push(S))}return Ir(g),g.length>0}function Fa(f,g){let S=w.blockers.get(f)||Ft;return Ce.get(f)!==g&&Ce.set(f,g),S}function Hr(f){w.blockers.delete(f),Ce.delete(f)}function ln(f,g){let S=w.blockers.get(f)||Ft;I(S.state==="unblocked"&&g.state==="blocked"||S.state==="blocked"&&g.state==="blocked"||S.state==="blocked"&&g.state==="proceeding"||S.state==="blocked"&&g.state==="unblocked"||S.state==="proceeding"&&g.state==="unblocked","Invalid blocker state transition: "+S.state+" -> "+g.state);let x=new Map(w.blockers);x.set(f,g),xe({blockers:x})}function Ur(f){let{currentLocation:g,nextLocation:S,historyAction:x}=f;if(Ce.size===0)return;Ce.size>1&&Se(!1,"A router only supports one blocker at a time");let T=Array.from(Ce.entries()),[F,j]=T[T.length-1],M=w.blockers.get(F);if(!(M&&M.state==="proceeding")&&j({currentLocation:g,nextLocation:S,historyAction:x}))return F}function Jn(f){let g=Ae(404,{pathname:f}),S=i||s,{matches:x,route:T}=oo(S);return qn(),{notFoundMatches:x,route:T,error:g}}function qn(f){let g=[];return Me.forEach((S,x)=>{(!f||f(x))&&(S.cancel(),g.push(x),Me.delete(x))}),g}function Ia(f,g,S){if(p=f,y=g,h=S||null,!R&&w.navigation===Gn){R=!0;let x=$r(w.location,w.matches);x!=null&&xe({restoreScrollPosition:x})}return()=>{p=null,y=null,h=null}}function Vr(f,g){return h&&h(f,g.map(x=>Ga(x,w.loaderData)))||f.key}function Ba(f,g){if(p&&y){let S=Vr(f,g);p[S]=y()}}function $r(f,g){if(p){let S=Vr(f,g),x=p[S];if(typeof x=="number")return x}return null}function cn(f,g,S){if(u)if(f){if(Object.keys(f[0].params).length>0)return{active:!0,matches:vn(g,S,l,!0)}}else return{active:!0,matches:vn(g,S,l,!0)||[]};return{active:!1,matches:null}}async function un(f,g,S,x){if(!u)return{type:"success",matches:f};let T=f;for(;;){let F=i==null,j=i||s,M=a;try{await u({signal:S,path:g,matches:T,fetcherKey:x,patch:(D,J)=>{S.aborted||Xr(D,J,j,M,o)}})}catch(D){return{type:"error",error:D,partialMatches:T}}finally{F&&!S.aborted&&(s=[...s])}if(S.aborted)return{type:"aborted"};let A=mt(j,g,l);if(A)return{type:"success",matches:A};let O=vn(j,g,l,!0);if(!O||T.length===O.length&&T.every((D,J)=>D.route.id===O[J].route.id))return{type:"success",matches:null};T=O}}function ja(f){a={},i=xn(f,o,void 0,a)}function Ha(f,g){let S=i==null;Xr(f,g,i||s,a,o),S&&(s=[...s],xe({}))}return H={get basename(){return l},get future(){return d},get state(){return w},get routes(){return s},get window(){return t},initialize:nn,subscribe:rn,enableScrollRestoration:Ia,navigate:on,fetch:K,revalidate:an,createHref:f=>e.history.createHref(f),encodeLocation:f=>e.history.encodeLocation(f),getFetcher:Fr,deleteFetcher:Da,dispose:zn,getBlocker:Fa,deleteBlocker:Hr,patchRoutes:Ha,_internalFetchControllers:ue,_internalActiveDeferreds:Me,_internalSetRoutes:ja},H}function Ss(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function sr(e,t,n,r,o,a,s,i){let l,c;if(s){l=[];for(let d of t)if(l.push(d),d.route.id===s){c=d;break}}else l=t,c=t[t.length-1];let u=Sr(o||".",br(l,a),$e(e.pathname,n)||e.pathname,i==="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 m=new URLSearchParams(u.search),v=m.getAll("index");m.delete("index"),v.filter(h=>h).forEach(h=>m.append("index",h));let p=m.toString();u.search=p?"?"+p:""}}return r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:Xe([n,u.pathname])),ct(u)}function Zr(e,t,n,r){if(!r||!Ss(r))return{path:n};if(r.formMethod&&!Ms(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",s=e?a.toUpperCase():a.toLowerCase(),i=Ho(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Ve(s))return o();let m=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((v,p)=>{let[h,y]=p;return""+v+h+"="+y+`
11
- `},""):String(r.body);return{path:n,submission:{formMethod:s,formAction:i,formEncType:r.formEncType,formData:void 0,json:void 0,text:m}}}else if(r.formEncType==="application/json"){if(!Ve(s))return o();try{let m=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:s,formAction:i,formEncType:r.formEncType,formData:void 0,json:m,text:void 0}}}catch{return o()}}}I(typeof FormData=="function","FormData is not available in this environment");let l,c;if(r.formData)l=lr(r.formData),c=r.formData;else if(r.body instanceof FormData)l=lr(r.body),c=r.body;else if(r.body instanceof URLSearchParams)l=r.body,c=eo(l);else if(r.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(r.body),c=eo(l)}catch{return o()}let u={formMethod:s,formAction:i,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(Ve(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 Gr(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 Kr(e,t,n,r,o,a,s,i,l,c,u,d,m,v,p,h){let y=h?Ie(h[1])?h[1].error:h[1].data:void 0,R=e.createURL(t.location),b=e.createURL(o),k=n;a&&t.errors?k=Gr(n,Object.keys(t.errors)[0],!0):h&&Ie(h[1])&&(k=Gr(n,h[0]));let L=h?h[1].statusCode:void 0,_=s&&L&&L>=400,H=k.filter((P,G)=>{let{route:B}=P;if(B.lazy)return!0;if(B.loader==null)return!1;if(a)return ir(B,t.loaderData,t.errors);if(Es(t.loaderData,t.matches[G],P)||l.some(te=>te===P.route.id))return!0;let ae=t.matches[G],ee=P;return Yr(P,fe({currentUrl:R,currentParams:ae.params,nextUrl:b,nextParams:ee.params},r,{actionResult:y,actionStatus:L,defaultShouldRevalidate:_?!1:i||R.pathname+R.search===b.pathname+b.search||R.search!==b.search||Bo(ae,ee)}))}),w=[];return d.forEach((P,G)=>{if(a||!n.some(he=>he.route.id===P.routeId)||u.has(G))return;let B=mt(v,P.path,p);if(!B){w.push({key:G,routeId:P.routeId,path:P.path,matches:null,match:null,controller:null});return}let ae=t.fetchers.get(G),ee=$t(B,P.path),te=!1;m.has(G)?te=!1:c.has(G)?(c.delete(G),te=!0):ae&&ae.state!=="idle"&&ae.data===void 0?te=i:te=Yr(ee,fe({currentUrl:R,currentParams:t.matches[t.matches.length-1].params,nextUrl:b,nextParams:n[n.length-1].params},r,{actionResult:y,actionStatus:L,defaultShouldRevalidate:_?!1:i})),te&&w.push({key:G,routeId:P.routeId,path:P.path,matches:B,match:ee,controller:new AbortController})}),[H,w]}function ir(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 Es(e,t,n){let r=!t||n.route.id!==t.route.id,o=e[n.route.id]===void 0;return r||o}function Bo(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Yr(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function Xr(e,t,n,r,o){var a;let s;if(e){let c=r[e];I(c,"No route found to patch children into: routeId = "+e),c.children||(c.children=[]),s=c.children}else s=n;let i=t.filter(c=>!s.some(u=>jo(c,u))),l=xn(i,o,[e||"_","patch",String(((a=s)==null?void 0:a.length)||"0")],r);s.push(...l)}function jo(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=>jo(n,a))}):!1}async function Cs(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 s in r){let l=o[s]!==void 0&&s!=="hasErrorBoundary";Se(!l,'Route "'+o.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!l&&!Wa.has(s)&&(a[s]=r[s])}Object.assign(o,a),Object.assign(o,fe({},t(o),{lazy:void 0}))}async function xs(e){let{matches:t}=e,n=t.filter(o=>o.shouldLoad);return(await Promise.all(n.map(o=>o.resolve()))).reduce((o,a,s)=>Object.assign(o,{[n[s].route.id]:a}),{})}async function Rs(e,t,n,r,o,a,s,i,l,c){let u=a.map(v=>v.route.lazy?Cs(v.route,l,i):void 0),d=a.map((v,p)=>{let h=u[p],y=o.some(b=>b.route.id===v.route.id);return fe({},v,{shouldLoad:y,resolve:async b=>(b&&r.method==="GET"&&(v.route.lazy||v.route.loader)&&(y=!0),y?ks(t,r,v,h,b,c):Promise.resolve({type:oe.data,result:void 0}))})}),m=await e({matches:d,request:r,params:a[0].params,fetcherKey:s,context:c});try{await Promise.all(u)}catch{}return m}async function ks(e,t,n,r,o,a){let s,i,l=c=>{let u,d=new Promise((p,h)=>u=h);i=()=>u(),t.signal.addEventListener("abort",i);let m=p=>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},...p!==void 0?[p]:[]),v=(async()=>{try{return{type:"data",result:await(o?o(h=>m(h)):m())}}catch(p){return{type:"error",result:p}}})();return Promise.race([v,d])};try{let c=n.route[e];if(r)if(c){let u,[d]=await Promise.all([l(c).catch(m=>{u=m}),r]);if(u!==void 0)throw u;s=d}else if(await r,c=n.route[e],c)s=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)s=await l(c);else{let u=new URL(t.url),d=u.pathname+u.search;throw Ae(404,{pathname:d})}I(s.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{i&&t.signal.removeEventListener("abort",i)}return s}async function Ns(e){let{result:t,type:n}=e;if(Uo(t)){let d;try{let m=t.headers.get("Content-Type");m&&/\bapplication\/json\b/.test(m)?t.body==null?d=null:d=await t.json():d=await t.text()}catch(m){return{type:oe.error,error:m}}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(ao(t)){var r,o;if(t.data instanceof Error){var a,s;return{type:oe.error,error:t.data,statusCode:(a=t.init)==null?void 0:a.status,headers:(s=t.init)!=null&&s.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:Wt(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:Wt(t)?t.status:void 0}}if(Os(t)){var i,l;return{type:oe.deferred,deferredData:t,statusCode:(i=t.init)==null?void 0:i.status,headers:((l=t.init)==null?void 0:l.headers)&&new Headers(t.init.headers)}}if(ao(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 Ts(e,t,n,r,o,a){let s=e.headers.get("Location");if(I(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!Er.test(s)){let i=r.slice(0,r.findIndex(l=>l.route.id===n)+1);s=sr(new URL(t.url),i,o,!0,s,a),e.headers.set("Location",s)}return e}function Qr(e,t,n){if(Er.test(e)){let r=e,o=r.startsWith("//")?new URL(t.protocol+r):new URL(r),a=$e(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(Ho(t)).toString(),a={signal:n};if(r&&Ve(r.formMethod)){let{formMethod:s,formEncType:i}=r;a.method=s.toUpperCase(),i==="application/json"?(a.headers=new Headers({"Content-Type":i}),a.body=JSON.stringify(r.json)):i==="text/plain"?a.body=r.text:i==="application/x-www-form-urlencoded"&&r.formData?a.body=lr(r.formData):a.body=r.formData}return new Request(o,a)}function lr(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function eo(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function _s(e,t,n,r,o){let a={},s=null,i,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 m=d.route.id,v=t[m];if(I(!yt(v),"Cannot handle redirect results in processLoaderData"),Ie(v)){let p=v.error;u!==void 0&&(p=u,u=void 0),s=s||{};{let h=gt(e,m);s[h.route.id]==null&&(s[h.route.id]=p)}a[m]=void 0,l||(l=!0,i=Wt(v.error)?v.error.status:500),v.headers&&(c[m]=v.headers)}else lt(v)?(r.set(m,v.deferredData),a[m]=v.deferredData.data,v.statusCode!=null&&v.statusCode!==200&&!l&&(i=v.statusCode),v.headers&&(c[m]=v.headers)):(a[m]=v.data,v.statusCode&&v.statusCode!==200&&!l&&(i=v.statusCode),v.headers&&(c[m]=v.headers))}),u!==void 0&&n&&(s={[n[0]]:u},a[n[0]]=void 0),{loaderData:a,errors:s,statusCode:i||200,loaderHeaders:c}}function to(e,t,n,r,o,a,s){let{loaderData:i,errors:l}=_s(t,n,r,s);return o.forEach(c=>{let{key:u,match:d,controller:m}=c,v=a[u];if(I(v,"Did not find corresponding fetcher result"),!(m&&m.signal.aborted))if(Ie(v)){let p=gt(e.matches,d==null?void 0:d.route.id);l&&l[p.route.id]||(l=fe({},l,{[p.route.id]:v.error})),e.fetchers.delete(u)}else if(yt(v))I(!1,"Unhandled fetcher revalidation redirect");else if(lt(v))I(!1,"Unhandled fetcher deferred data");else{let p=it(v.data);e.fetchers.set(u,p)}}),{loaderData:i,errors:l}}function no(e,t,n,r){let o=fe({},t);for(let a of n){let s=a.route.id;if(t.hasOwnProperty(s)?t[s]!==void 0&&(o[s]=t[s]):e[s]!==void 0&&a.route.loader&&(o[s]=e[s]),r&&r.hasOwnProperty(s))break}return o}function ro(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 oo(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:s}=t===void 0?{}:t,i="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(i="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?(i="Forbidden",l='Route "'+r+'" does not match URL "'+n+'"'):e===404?(i="Not Found",l='No route matches URL "'+n+'"'):e===405&&(i="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,i,new Error(l),!0)}function hn(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 Ho(e){let t=typeof e=="string"?dt(e):e;return ct(fe({},t,{hash:""}))}function Ls(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Ps(e){return Uo(e.result)&&gs.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 ao(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Os(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 Uo(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Ms(e){return ms.has(e.toLowerCase())}function Ve(e){return hs.has(e.toLowerCase())}async function As(e,t,n,r,o){let a=Object.entries(t);for(let s=0;s<a.length;s++){let[i,l]=a[s],c=e.find(m=>(m==null?void 0:m.route.id)===i);if(!c)continue;let u=r.find(m=>m.route.id===c.route.id),d=u!=null&&!Bo(u,c)&&(o&&o[c.route.id])!==void 0;lt(l)&&d&&await Cr(l,n,!1).then(m=>{m&&(t[i]=m)})}}async function Ds(e,t,n){for(let r=0;r<n.length;r++){let{key:o,routeId:a,controller:s}=n[r],i=t[o];e.find(c=>(c==null?void 0:c.route.id)===a)&&lt(i)&&(I(s,"Expected an AbortController for revalidating fetcher deferred result"),await Cr(i,s.signal,!0).then(c=>{c&&(t[o]=c)}))}}async function Cr(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 $t(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=Do(e);return r[r.length-1]}function so(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:a,json:s}=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(s!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:s,text:void 0}}}function Kn(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 Fs(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 It(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 Is(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 it(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 Bs(e,t){try{let n=e.sessionStorage.getItem(Io);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 js(e,t){if(t.size>0){let n={};for(let[r,o]of t)n[r]=[...o];try{e.sessionStorage.setItem(Io,JSON.stringify(n))}catch(r){Se(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
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 ye;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ye||(ye={}));const Jr="popstate";function za(e){e===void 0&&(e={});function t(r,o){let{pathname:a,search:s,hash:i}=r.location;return qt("",{pathname:a,search:s,hash:i},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 Ja(){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||Ja()})}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,s=o.history,i=ye.Pop,l=null,c=u();c==null&&(c=0,s.replaceState(fe({},s.state,{idx:c}),""));function u(){return(s.state||{idx:null}).idx}function d(){i=ye.Pop;let v=u(),R=v==null?null:v-c;c=v,l&&l({action:i,location:h.location,delta:R})}function m(v,R){i=ye.Push;let b=qt(h.location,v,R);c=u()+1;let k=qr(b,c),L=h.createHref(b);try{s.pushState(k,"",L)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;o.location.assign(L)}a&&l&&l({action:i,location:h.location,delta:1})}function y(v,R){i=ye.Replace;let b=qt(h.location,v,R);c=u();let k=qr(b,c),L=h.createHref(b);s.replaceState(k,"",L),a&&l&&l({action:i,location:h.location,delta:0})}function p(v){let R=o.location.origin!=="null"?o.location.origin:o.location.href,b=typeof v=="string"?v:ct(v);return b=b.replace(/ $/,"%20"),I(R,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,R)}let h={get action(){return i},get location(){return e(o,s)},listen(v){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(Jr,d),l=v,()=>{o.removeEventListener(Jr,d),l=null}},createHref(v){return t(o,v)},createURL:p,encodeLocation(v){let R=p(v);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:m,replace:y,go(v){return s.go(v)}};return h}var oe;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(oe||(oe={}));const Wa=new Set(["lazy","caseSensitive","path","id","index","children"]);function Za(e){return e.index===!0}function xn(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((o,a)=>{let s=[...n,String(a)],i=typeof o.id=="string"?o.id:s.join("-");if(I(o.index!==!0||!o.children,"Cannot specify children on an index route"),I(!r[i],'Found a route id collision on id "'+i+`". Route id's must be globally unique within Data Router usages`),Za(o)){let l=fe({},o,t(o),{id:i});return r[i]=l,l}else{let l=fe({},o,t(o),{id:i,children:void 0});return r[i]=l,o.children&&(l.children=xn(o.children,t,s,r)),l}})}function mt(e,t,n){return n===void 0&&(n="/"),yn(e,t,n,!1)}function yn(e,t,n,r){let o=typeof t=="string"?dt(t):t,a=$e(o.pathname||"/",n);if(a==null)return null;let s=Mo(e);Ka(s);let i=null;for(let l=0;i==null&&l<s.length;++l){let c=is(a);i=as(s[l],c,r)}return i}function Ga(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 Mo(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let o=(a,s,i)=>{let l={relativePath:i===void 0?a.path||"":i,caseSensitive:a.caseSensitive===!0,childrenIndex:s,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=Xe([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+'".')),Mo(a.children,t,u,c)),!(a.path==null&&!a.index)&&t.push({path:c,score:rs(c,a.index),routesMeta:u})};return e.forEach((a,s)=>{var i;if(a.path===""||!((i=a.path)!=null&&i.includes("?")))o(a,s);else for(let l of Ao(a.path))o(a,s,l)}),t}function Ao(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 s=Ao(r.join("/")),i=[];return i.push(...s.map(l=>l===""?a:[a,l].join("/"))),o&&i.push(...s),i.map(l=>e.startsWith("/")&&l===""?"/":l)}function Ka(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:os(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Ya=/^:[\w-]+$/,Xa=3,Qa=2,es=1,ts=10,ns=-2,Wr=e=>e==="*";function rs(e,t){let n=e.split("/"),r=n.length;return n.some(Wr)&&(r+=ns),t&&(r+=Qa),n.filter(o=>!Wr(o)).reduce((o,a)=>o+(Ya.test(a)?Xa:a===""?es:ts),r)}function os(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 as(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,o={},a="/",s=[];for(let i=0;i<r.length;++i){let l=r[i],c=i===r.length-1,u=a==="/"?t:t.slice(a.length)||"/",d=Rn({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),m=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),s.push({params:o,pathname:Xe([a,d.pathname]),pathnameBase:us(Xe([a,d.pathnameBase])),route:m}),d.pathnameBase!=="/"&&(a=Xe([a,d.pathnameBase]))}return s}function Rn(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=ss(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],s=a.replace(/(.)\/+$/,"$1"),i=o.slice(1);return{params:r.reduce((c,u,d)=>{let{paramName:m,isOptional:y}=u;if(m==="*"){let h=i[d]||"";s=a.slice(0,a.length-h.length).replace(/(.)\/+$/,"$1")}const p=i[d];return y&&!p?c[m]=void 0:c[m]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:a,pathnameBase:s,pattern:e}}function ss(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,(s,i,l)=>(r.push({paramName:i,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 is(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 $e(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 ls(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:cs(n,t):t,search:ds(r),hash:fs(o)}}function cs(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 Zn(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 Do(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function br(e,t){let n=Do(e);return t?n.map((r,o)=>o===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Sr(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("?"),Zn("?","pathname","search",o)),I(!o.pathname||!o.pathname.includes("#"),Zn("#","pathname","hash",o)),I(!o.search||!o.search.includes("#"),Zn("#","search","hash",o)));let a=e===""||o.pathname==="",s=a?"/":o.pathname,i;if(s==null)i=n;else{let d=t.length-1;if(!r&&s.startsWith("..")){let m=s.split("/");for(;m[0]==="..";)m.shift(),d-=1;o.pathname=m.join("/")}i=d>=0?t[d]:"/"}let l=ls(o,i),c=s&&s!=="/"&&s.endsWith("/"),u=(a||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Xe=e=>e.join("/").replace(/\/\/+/g,"/"),us=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),ds=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,fs=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 Wt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Fo=["post","put","patch","delete"],hs=new Set(Fo),ps=["get",...Fo],ms=new Set(ps),gs=new Set([301,302,303,307,308]),vs=new Set([307,308]),Gn={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ys={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ft={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Er=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ws=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Io="remix-router-transitions";function bs(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=ws;let a={},s=xn(e.routes,o,void 0,a),i,l=e.basename||"/",c=e.dataStrategy||xs,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),m=null,y=new Set,p=null,h=null,v=null,R=e.hydrationData!=null,b=mt(s,e.history.location,l),k=!1,L=null;if(b==null&&!u){let f=Ae(404,{pathname:e.history.location.pathname}),{matches:g,route:S}=oo(s);b=g,L={[S.id]:f}}b&&!e.hydrationData&&cn(b,s,e.history.location.pathname).active&&(b=null);let _;if(b)if(b.some(f=>f.route.lazy))_=!1;else if(!b.some(f=>f.route.loader))_=!0;else if(d.v7_partialHydration){let f=e.hydrationData?e.hydrationData.loaderData:null,g=e.hydrationData?e.hydrationData.errors:null;if(g){let S=b.findIndex(x=>g[x.route.id]!==void 0);_=b.slice(0,S+1).every(x=>!ir(x.route,f,g))}else _=b.every(S=>!ir(S.route,f,g))}else _=e.hydrationData!=null;else if(_=!1,b=[],d.v7_partialHydration){let f=cn(null,s,e.history.location.pathname);f.active&&f.matches&&(k=!0,b=f.matches)}let H,w={historyAction:e.history.action,location:e.history.location,matches:b,initialized:_,navigation:Gn,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||L,fetchers:new Map,blockers:new Map},P=ye.Pop,G=!1,B,ae=!1,ee=new Map,te=null,he=!1,Oe=!1,_e=[],We=new Set,ue=new Map,Re=0,Ee=-1,be=new Map,Le=new Set,Ue=new Map,se=new Map,pe=new Set,Me=new Map,Ce=new Map,ft;function nn(){if(m=e.history.listen(f=>{let{action:g,location:S,delta:x}=f;if(ft){ft(),ft=void 0;return}Se(Ce.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 T=Ur({currentLocation:w.location,nextLocation:S,historyAction:g});if(T&&x!=null){let F=new Promise(j=>{ft=j});e.history.go(x*-1),ln(T,{state:"blocked",location:S,proceed(){ln(T,{state:"proceeding",proceed:void 0,reset:void 0,location:S}),F.then(()=>e.history.go(x))},reset(){let j=new Map(w.blockers);j.set(T,Ft),xe({blockers:j})}});return}return Ze(g,S)}),n){Bs(t,ee);let f=()=>js(t,ee);t.addEventListener("pagehide",f),te=()=>t.removeEventListener("pagehide",f)}return w.initialized||Ze(ye.Pop,w.location,{initialHydration:!0}),H}function zn(){m&&m(),te&&te(),y.clear(),B&&B.abort(),w.fetchers.forEach((f,g)=>sn(g)),w.blockers.forEach((f,g)=>Hr(g))}function rn(f){return y.add(f),()=>y.delete(f)}function xe(f,g){g===void 0&&(g={}),w=fe({},w,f);let S=[],x=[];d.v7_fetcherPersist&&w.fetchers.forEach((T,F)=>{T.state==="idle"&&(pe.has(F)?x.push(F):S.push(F))}),pe.forEach(T=>{!w.fetchers.has(T)&&!ue.has(T)&&x.push(T)}),[...y].forEach(T=>T(w,{deletedFetchers:x,viewTransitionOpts:g.viewTransitionOpts,flushSync:g.flushSync===!0})),d.v7_fetcherPersist?(S.forEach(T=>w.fetchers.delete(T)),x.forEach(T=>sn(T))):x.forEach(T=>pe.delete(T))}function et(f,g,S){var x,T;let{flushSync:F}=S===void 0?{}:S,j=w.actionData!=null&&w.navigation.formMethod!=null&&Ve(w.navigation.formMethod)&&w.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=w.actionData:M=null;let A=g.loaderData?no(w.loaderData,g.loaderData,g.matches||[],g.errors):w.loaderData,O=w.blockers;O.size>0&&(O=new Map(O),O.forEach((Y,ke)=>O.set(ke,Ft)));let D=G===!0||w.navigation.formMethod!=null&&Ve(w.navigation.formMethod)&&((T=f.state)==null?void 0:T._isRedirect)!==!0;i&&(s=i,i=void 0),he||P===ye.Pop||(P===ye.Push?e.history.push(f,f.state):P===ye.Replace&&e.history.replace(f,f.state));let J;if(P===ye.Pop){let Y=ee.get(w.location.pathname);Y&&Y.has(f.pathname)?J={currentLocation:w.location,nextLocation:f}:ee.has(f.pathname)&&(J={currentLocation:f,nextLocation:w.location})}else if(ae){let Y=ee.get(w.location.pathname);Y?Y.add(f.pathname):(Y=new Set([f.pathname]),ee.set(w.location.pathname,Y)),J={currentLocation:w.location,nextLocation:f}}xe(fe({},g,{actionData:M,loaderData:A,historyAction:P,location:f,initialized:!0,navigation:Gn,revalidation:"idle",restoreScrollPosition:$r(f,g.matches||w.matches),preventScrollReset:D,blockers:O}),{viewTransitionOpts:J,flushSync:F===!0}),P=ye.Pop,G=!1,ae=!1,he=!1,Oe=!1,_e=[]}async function on(f,g){if(typeof f=="number"){e.history.go(f);return}let S=sr(w.location,w.matches,l,d.v7_prependBasename,f,d.v7_relativeSplatPath,g==null?void 0:g.fromRouteId,g==null?void 0:g.relative),{path:x,submission:T,error:F}=Zr(d.v7_normalizeFormMethod,!1,S,g),j=w.location,M=qt(w.location,x,g&&g.state);M=fe({},M,e.history.encodeLocation(M));let A=g&&g.replace!=null?g.replace:void 0,O=ye.Push;A===!0?O=ye.Replace:A===!1||T!=null&&Ve(T.formMethod)&&T.formAction===w.location.pathname+w.location.search&&(O=ye.Replace);let D=g&&"preventScrollReset"in g?g.preventScrollReset===!0:void 0,J=(g&&g.flushSync)===!0,Y=Ur({currentLocation:j,nextLocation:M,historyAction:O});if(Y){ln(Y,{state:"blocked",location:M,proceed(){ln(Y,{state:"proceeding",proceed:void 0,reset:void 0,location:M}),on(f,g)},reset(){let ke=new Map(w.blockers);ke.set(Y,Ft),xe({blockers:ke})}});return}return await Ze(O,M,{submission:T,pendingError:F,preventScrollReset:D,replace:g&&g.replace,enableViewTransition:g&&g.viewTransition,flushSync:J})}function an(){if(ht(),xe({revalidation:"loading"}),w.navigation.state!=="submitting"){if(w.navigation.state==="idle"){Ze(w.historyAction,w.location,{startUninterruptedRevalidation:!0});return}Ze(P||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation,enableViewTransition:ae===!0})}}async function Ze(f,g,S){B&&B.abort(),B=null,P=f,he=(S&&S.startUninterruptedRevalidation)===!0,Ba(w.location,w.matches),G=(S&&S.preventScrollReset)===!0,ae=(S&&S.enableViewTransition)===!0;let x=i||s,T=S&&S.overrideNavigation,F=S!=null&&S.initialHydration&&w.matches&&w.matches.length>0&&!k?w.matches:mt(x,g,l),j=(S&&S.flushSync)===!0;if(F&&w.initialized&&!Oe&&Ls(w.location,g)&&!(S&&S.submission&&Ve(S.submission.formMethod))){et(g,{matches:F},{flushSync:j});return}let M=cn(F,x,g.pathname);if(M.active&&M.matches&&(F=M.matches),!F){let{error:le,notFoundMatches:Q,route:me}=Jn(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,S&&S.submission),O;if(S&&S.pendingError)O=[gt(F).route.id,{type:oe.error,error:S.pendingError}];else if(S&&S.submission&&Ve(S.submission.formMethod)){let le=await V(A,g,S.submission,F,M.active,{replace:S.replace,flushSync:j});if(le.shortCircuited)return;if(le.pendingActionResult){let[Q,me]=le.pendingActionResult;if(Ie(me)&&Wt(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,T=Kn(g,S.submission),j=!1,M.active=!1,A=xt(e.history,A.url,A.signal)}let{shortCircuited:D,matches:J,loaderData:Y,errors:ke}=await U(A,g,F,M.active,T,S&&S.submission,S&&S.fetcherSubmission,S&&S.replace,S&&S.initialHydration===!0,j,O);D||(B=null,et(g,fe({matches:J||F},ro(O),{loaderData:Y,errors:ke})))}async function V(f,g,S,x,T,F){F===void 0&&(F={}),ht();let j=Fs(g,S);if(xe({navigation:j},{flushSync:F.flushSync===!0}),T){let O=await un(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}=Jn(g.pathname);return{matches:D,pendingActionResult:[Y.id,{type:oe.error,error:J}]}}}let M,A=$t(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",w,f,[A],x,null))[A.route.id],f.signal.aborted)return{shortCircuited:!0};if(vt(M)){let O;return F&&F.replace!=null?O=F.replace:O=Qr(M.response.headers.get("Location"),new URL(f.url),l)===w.location.pathname+w.location.search,await Z(f,M,!0,{submission:S,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&&(P=ye.Push),{matches:x,pendingActionResult:[O.route.id,M]}}return{matches:x,pendingActionResult:[A.route.id,M]}}async function U(f,g,S,x,T,F,j,M,A,O,D){let J=T||Kn(g,F),Y=F||j||so(J),ke=!he&&(!d.v7_partialHydration||!A);if(x){if(ke){let ge=ne(D);xe(fe({navigation:J},ge!==void 0?{actionData:ge}:{}),{flushSync:O})}let X=await un(S,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)S=X.matches;else{let{error:ge,notFoundMatches:Et,route:At}=Jn(g.pathname);return{matches:Et,loaderData:{},errors:{[At.id]:ge}}}}let le=i||s,[Q,me]=Kr(e.history,w,S,Y,g,d.v7_partialHydration&&A===!0,d.v7_skipActionErrorRevalidation,Oe,_e,We,pe,Ue,Le,le,l,D);if(qn(X=>!(S&&S.some(ge=>ge.route.id===X))||Q&&Q.some(ge=>ge.route.id===X)),Ee=++Re,Q.length===0&&me.length===0){let X=Br();return et(g,fe({matches:S,loaderData:{},errors:D&&Ie(D[1])?{[D[0]]:D[1].error}:null},ro(D),X?{fetchers:new Map(w.fetchers)}:{}),{flushSync:O}),{shortCircuited:!0}}if(ke){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=>{st(X.key),X.controller&&ue.set(X.key,X.controller)});let St=()=>me.forEach(X=>st(X.key));B&&B.signal.addEventListener("abort",St);let{loaderResults:Ot,fetcherResults:rt}=await tt(w,S,Q,me,f);if(f.signal.aborted)return{shortCircuited:!0};B&&B.signal.removeEventListener("abort",St),me.forEach(X=>ue.delete(X.key));let Ke=hn(Ot);if(Ke)return await Z(f,Ke.result,!0,{replace:M}),{shortCircuited:!0};if(Ke=hn(rt),Ke)return Le.add(Ke.key),await Z(f,Ke.result,!0,{replace:M}),{shortCircuited:!0};let{loaderData:Wn,errors:Mt}=to(w,S,Ot,D,me,rt,Me);Me.forEach((X,ge)=>{X.subscribe(Et=>{(Et||X.done)&&Me.delete(ge)})}),d.v7_partialHydration&&A&&w.errors&&(Mt=fe({},w.errors,Mt));let pt=Br(),dn=jr(Ee),fn=pt||dn||me.length>0;return fe({matches:S,loaderData:Wn,errors:Mt},fn?{fetchers:new Map(w.fetchers)}:{})}function ne(f){if(f&&!Ie(f[1]))return{[f[0]]:f[1].data};if(w.actionData)return Object.keys(w.actionData).length===0?null:w.actionData}function z(f){return f.forEach(g=>{let S=w.fetchers.get(g.key),x=It(void 0,S?S.data:void 0);w.fetchers.set(g.key,x)}),new Map(w.fetchers)}function K(f,g,S,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.");st(f);let T=(x&&x.flushSync)===!0,F=i||s,j=sr(w.location,w.matches,l,d.v7_prependBasename,S,d.v7_relativeSplatPath,g,x==null?void 0:x.relative),M=mt(F,j,l),A=cn(M,F,j);if(A.active&&A.matches&&(M=A.matches),!M){nt(f,g,Ae(404,{pathname:j}),{flushSync:T});return}let{path:O,submission:D,error:J}=Zr(d.v7_normalizeFormMethod,!0,j,x);if(J){nt(f,g,J,{flushSync:T});return}let Y=$t(M,O),ke=(x&&x.preventScrollReset)===!0;if(D&&Ve(D.formMethod)){q(f,g,O,Y,M,A.active,T,ke,D);return}Ue.set(f,{routeId:g,path:O}),re(f,g,O,Y,M,A.active,T,ke,D)}async function q(f,g,S,x,T,F,j,M,A){ht(),Ue.delete(f);function O(ve){if(!ve.route.action&&!ve.route.lazy){let Ct=Ae(405,{method:A.formMethod,pathname:S,routeId:g});return nt(f,g,Ct,{flushSync:j}),!0}return!1}if(!F&&O(x))return;let D=w.fetchers.get(f);Ge(f,Is(A,D),{flushSync:j});let J=new AbortController,Y=xt(e.history,S,J.signal,A);if(F){let ve=await un(T,new URL(Y.url).pathname,Y.signal,f);if(ve.type==="aborted")return;if(ve.type==="error"){nt(f,g,ve.error,{flushSync:j});return}else if(ve.matches){if(T=ve.matches,x=$t(T,S),O(x))return}else{nt(f,g,Ae(404,{pathname:S}),{flushSync:j});return}}ue.set(f,J);let ke=Re,Q=(await de("action",w,Y,[x],T,f))[x.route.id];if(Y.signal.aborted){ue.get(f)===J&&ue.delete(f);return}if(d.v7_fetcherPersist&&pe.has(f)){if(vt(Q)||Ie(Q)){Ge(f,it(void 0));return}}else{if(vt(Q))if(ue.delete(f),Ee>ke){Ge(f,it(void 0));return}else return Le.add(f),Ge(f,It(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=w.navigation.location||w.location,St=xt(e.history,me,J.signal),Ot=i||s,rt=w.navigation.state!=="idle"?mt(Ot,w.navigation.location,l):w.matches;I(rt,"Didn't find any matches after fetcher action");let Ke=++Re;be.set(f,Ke);let Wn=It(A,Q.data);w.fetchers.set(f,Wn);let[Mt,pt]=Kr(e.history,w,rt,A,me,!1,d.v7_skipActionErrorRevalidation,Oe,_e,We,pe,Ue,Le,Ot,l,[x.route.id,Q]);pt.filter(ve=>ve.key!==f).forEach(ve=>{let Ct=ve.key,zr=w.fetchers.get(Ct),Ua=It(void 0,zr?zr.data:void 0);w.fetchers.set(Ct,Ua),st(Ct),ve.controller&&ue.set(Ct,ve.controller)}),xe({fetchers:new Map(w.fetchers)});let dn=()=>pt.forEach(ve=>st(ve.key));J.signal.addEventListener("abort",dn);let{loaderResults:fn,fetcherResults:X}=await tt(w,rt,Mt,pt,St);if(J.signal.aborted)return;J.signal.removeEventListener("abort",dn),be.delete(f),ue.delete(f),pt.forEach(ve=>ue.delete(ve.key));let ge=hn(fn);if(ge)return Z(St,ge.result,!1,{preventScrollReset:M});if(ge=hn(X),ge)return Le.add(ge.key),Z(St,ge.result,!1,{preventScrollReset:M});let{loaderData:Et,errors:At}=to(w,rt,fn,void 0,pt,X,Me);if(w.fetchers.has(f)){let ve=it(Q.data);w.fetchers.set(f,ve)}jr(Ke),w.navigation.state==="loading"&&Ke>Ee?(I(P,"Expected pending action"),B&&B.abort(),et(w.navigation.location,{matches:rt,loaderData:Et,errors:At,fetchers:new Map(w.fetchers)})):(xe({errors:At,loaderData:no(w.loaderData,Et,rt,At),fetchers:new Map(w.fetchers)}),Oe=!1)}async function re(f,g,S,x,T,F,j,M,A){let O=w.fetchers.get(f);Ge(f,It(A,O?O.data:void 0),{flushSync:j});let D=new AbortController,J=xt(e.history,S,D.signal);if(F){let Q=await un(T,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)T=Q.matches,x=$t(T,S);else{nt(f,g,Ae(404,{pathname:S}),{flushSync:j});return}}ue.set(f,D);let Y=Re,le=(await de("loader",w,J,[x],T,f))[x.route.id];if(lt(le)&&(le=await Cr(le,J.signal,!0)||le),ue.get(f)===D&&ue.delete(f),!J.signal.aborted){if(pe.has(f)){Ge(f,it(void 0));return}if(vt(le))if(Ee>Y){Ge(f,it(void 0));return}else{Le.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"),Ge(f,it(le.data))}}async function Z(f,g,S,x){let{submission:T,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=Qr(A,new URL(f.url),l);let O=qt(w.location,A,{_isRedirect:!0});if(n){let Q=!1;if(g.response.headers.has("X-Remix-Reload-Document"))Q=!0;else if(Er.test(A)){const me=e.history.createURL(A);Q=me.origin!==t.location.origin||$e(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")?ye.Replace:ye.Push,{formMethod:J,formAction:Y,formEncType:ke}=w.navigation;!T&&!F&&J&&Y&&ke&&(T=so(w.navigation));let le=T||F;if(vs.has(g.response.status)&&le&&Ve(le.formMethod))await Ze(D,O,{submission:fe({},le,{formAction:A}),preventScrollReset:j||G,enableViewTransition:S?ae:void 0});else{let Q=Kn(O,T);await Ze(D,O,{overrideNavigation:Q,fetcherSubmission:F,preventScrollReset:j||G,enableViewTransition:S?ae:void 0})}}async function de(f,g,S,x,T,F){let j,M={};try{j=await Rs(c,f,g,S,x,T,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(Ps(O)){let D=O.result;M[A]={type:oe.redirect,response:Ts(D,S,A,T,l,d.v7_relativeSplatPath)}}else M[A]=await Ns(O);return M}async function tt(f,g,S,x,T){let F=f.matches,j=de("loader",f,T,S,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([As(g,A,T.signal,F,f.loaderData),Ds(g,O,x)]),{loaderResults:A,fetcherResults:O}}function ht(){Oe=!0,_e.push(...qn()),Ue.forEach((f,g)=>{ue.has(g)&&We.add(g),st(g)})}function Ge(f,g,S){S===void 0&&(S={}),w.fetchers.set(f,g),xe({fetchers:new Map(w.fetchers)},{flushSync:(S&&S.flushSync)===!0})}function nt(f,g,S,x){x===void 0&&(x={});let T=gt(w.matches,g);sn(f),xe({errors:{[T.route.id]:S},fetchers:new Map(w.fetchers)},{flushSync:(x&&x.flushSync)===!0})}function Fr(f){return se.set(f,(se.get(f)||0)+1),pe.has(f)&&pe.delete(f),w.fetchers.get(f)||ys}function sn(f){let g=w.fetchers.get(f);ue.has(f)&&!(g&&g.state==="loading"&&be.has(f))&&st(f),Ue.delete(f),be.delete(f),Le.delete(f),d.v7_fetcherPersist&&pe.delete(f),We.delete(f),w.fetchers.delete(f)}function Da(f){let g=(se.get(f)||0)-1;g<=0?(se.delete(f),pe.add(f),d.v7_fetcherPersist||sn(f)):se.set(f,g),xe({fetchers:new Map(w.fetchers)})}function st(f){let g=ue.get(f);g&&(g.abort(),ue.delete(f))}function Ir(f){for(let g of f){let S=Fr(g),x=it(S.data);w.fetchers.set(g,x)}}function Br(){let f=[],g=!1;for(let S of Le){let x=w.fetchers.get(S);I(x,"Expected fetcher: "+S),x.state==="loading"&&(Le.delete(S),f.push(S),g=!0)}return Ir(f),g}function jr(f){let g=[];for(let[S,x]of be)if(x<f){let T=w.fetchers.get(S);I(T,"Expected fetcher: "+S),T.state==="loading"&&(st(S),be.delete(S),g.push(S))}return Ir(g),g.length>0}function Fa(f,g){let S=w.blockers.get(f)||Ft;return Ce.get(f)!==g&&Ce.set(f,g),S}function Hr(f){w.blockers.delete(f),Ce.delete(f)}function ln(f,g){let S=w.blockers.get(f)||Ft;I(S.state==="unblocked"&&g.state==="blocked"||S.state==="blocked"&&g.state==="blocked"||S.state==="blocked"&&g.state==="proceeding"||S.state==="blocked"&&g.state==="unblocked"||S.state==="proceeding"&&g.state==="unblocked","Invalid blocker state transition: "+S.state+" -> "+g.state);let x=new Map(w.blockers);x.set(f,g),xe({blockers:x})}function Ur(f){let{currentLocation:g,nextLocation:S,historyAction:x}=f;if(Ce.size===0)return;Ce.size>1&&Se(!1,"A router only supports one blocker at a time");let T=Array.from(Ce.entries()),[F,j]=T[T.length-1],M=w.blockers.get(F);if(!(M&&M.state==="proceeding")&&j({currentLocation:g,nextLocation:S,historyAction:x}))return F}function Jn(f){let g=Ae(404,{pathname:f}),S=i||s,{matches:x,route:T}=oo(S);return qn(),{notFoundMatches:x,route:T,error:g}}function qn(f){let g=[];return Me.forEach((S,x)=>{(!f||f(x))&&(S.cancel(),g.push(x),Me.delete(x))}),g}function Ia(f,g,S){if(p=f,v=g,h=S||null,!R&&w.navigation===Gn){R=!0;let x=$r(w.location,w.matches);x!=null&&xe({restoreScrollPosition:x})}return()=>{p=null,v=null,h=null}}function Vr(f,g){return h&&h(f,g.map(x=>Ga(x,w.loaderData)))||f.key}function Ba(f,g){if(p&&v){let S=Vr(f,g);p[S]=v()}}function $r(f,g){if(p){let S=Vr(f,g),x=p[S];if(typeof x=="number")return x}return null}function cn(f,g,S){if(u)if(f){if(Object.keys(f[0].params).length>0)return{active:!0,matches:yn(g,S,l,!0)}}else return{active:!0,matches:yn(g,S,l,!0)||[]};return{active:!1,matches:null}}async function un(f,g,S,x){if(!u)return{type:"success",matches:f};let T=f;for(;;){let F=i==null,j=i||s,M=a;try{await u({signal:S,path:g,matches:T,fetcherKey:x,patch:(D,J)=>{S.aborted||Xr(D,J,j,M,o)}})}catch(D){return{type:"error",error:D,partialMatches:T}}finally{F&&!S.aborted&&(s=[...s])}if(S.aborted)return{type:"aborted"};let A=mt(j,g,l);if(A)return{type:"success",matches:A};let O=yn(j,g,l,!0);if(!O||T.length===O.length&&T.every((D,J)=>D.route.id===O[J].route.id))return{type:"success",matches:null};T=O}}function ja(f){a={},i=xn(f,o,void 0,a)}function Ha(f,g){let S=i==null;Xr(f,g,i||s,a,o),S&&(s=[...s],xe({}))}return H={get basename(){return l},get future(){return d},get state(){return w},get routes(){return s},get window(){return t},initialize:nn,subscribe:rn,enableScrollRestoration:Ia,navigate:on,fetch:K,revalidate:an,createHref:f=>e.history.createHref(f),encodeLocation:f=>e.history.encodeLocation(f),getFetcher:Fr,deleteFetcher:Da,dispose:zn,getBlocker:Fa,deleteBlocker:Hr,patchRoutes:Ha,_internalFetchControllers:ue,_internalActiveDeferreds:Me,_internalSetRoutes:ja},H}function Ss(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function sr(e,t,n,r,o,a,s,i){let l,c;if(s){l=[];for(let d of t)if(l.push(d),d.route.id===s){c=d;break}}else l=t,c=t[t.length-1];let u=Sr(o||".",br(l,a),$e(e.pathname,n)||e.pathname,i==="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 m=new URLSearchParams(u.search),y=m.getAll("index");m.delete("index"),y.filter(h=>h).forEach(h=>m.append("index",h));let p=m.toString();u.search=p?"?"+p:""}}return r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:Xe([n,u.pathname])),ct(u)}function Zr(e,t,n,r){if(!r||!Ss(r))return{path:n};if(r.formMethod&&!Ms(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",s=e?a.toUpperCase():a.toLowerCase(),i=Ho(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Ve(s))return o();let m=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((y,p)=>{let[h,v]=p;return""+y+h+"="+v+`
11
+ `},""):String(r.body);return{path:n,submission:{formMethod:s,formAction:i,formEncType:r.formEncType,formData:void 0,json:void 0,text:m}}}else if(r.formEncType==="application/json"){if(!Ve(s))return o();try{let m=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:s,formAction:i,formEncType:r.formEncType,formData:void 0,json:m,text:void 0}}}catch{return o()}}}I(typeof FormData=="function","FormData is not available in this environment");let l,c;if(r.formData)l=lr(r.formData),c=r.formData;else if(r.body instanceof FormData)l=lr(r.body),c=r.body;else if(r.body instanceof URLSearchParams)l=r.body,c=eo(l);else if(r.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(r.body),c=eo(l)}catch{return o()}let u={formMethod:s,formAction:i,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(Ve(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 Gr(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 Kr(e,t,n,r,o,a,s,i,l,c,u,d,m,y,p,h){let v=h?Ie(h[1])?h[1].error:h[1].data:void 0,R=e.createURL(t.location),b=e.createURL(o),k=n;a&&t.errors?k=Gr(n,Object.keys(t.errors)[0],!0):h&&Ie(h[1])&&(k=Gr(n,h[0]));let L=h?h[1].statusCode:void 0,_=s&&L&&L>=400,H=k.filter((P,G)=>{let{route:B}=P;if(B.lazy)return!0;if(B.loader==null)return!1;if(a)return ir(B,t.loaderData,t.errors);if(Es(t.loaderData,t.matches[G],P)||l.some(te=>te===P.route.id))return!0;let ae=t.matches[G],ee=P;return Yr(P,fe({currentUrl:R,currentParams:ae.params,nextUrl:b,nextParams:ee.params},r,{actionResult:v,actionStatus:L,defaultShouldRevalidate:_?!1:i||R.pathname+R.search===b.pathname+b.search||R.search!==b.search||Bo(ae,ee)}))}),w=[];return d.forEach((P,G)=>{if(a||!n.some(he=>he.route.id===P.routeId)||u.has(G))return;let B=mt(y,P.path,p);if(!B){w.push({key:G,routeId:P.routeId,path:P.path,matches:null,match:null,controller:null});return}let ae=t.fetchers.get(G),ee=$t(B,P.path),te=!1;m.has(G)?te=!1:c.has(G)?(c.delete(G),te=!0):ae&&ae.state!=="idle"&&ae.data===void 0?te=i:te=Yr(ee,fe({currentUrl:R,currentParams:t.matches[t.matches.length-1].params,nextUrl:b,nextParams:n[n.length-1].params},r,{actionResult:v,actionStatus:L,defaultShouldRevalidate:_?!1:i})),te&&w.push({key:G,routeId:P.routeId,path:P.path,matches:B,match:ee,controller:new AbortController})}),[H,w]}function ir(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 Es(e,t,n){let r=!t||n.route.id!==t.route.id,o=e[n.route.id]===void 0;return r||o}function Bo(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Yr(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function Xr(e,t,n,r,o){var a;let s;if(e){let c=r[e];I(c,"No route found to patch children into: routeId = "+e),c.children||(c.children=[]),s=c.children}else s=n;let i=t.filter(c=>!s.some(u=>jo(c,u))),l=xn(i,o,[e||"_","patch",String(((a=s)==null?void 0:a.length)||"0")],r);s.push(...l)}function jo(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=>jo(n,a))}):!1}async function Cs(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 s in r){let l=o[s]!==void 0&&s!=="hasErrorBoundary";Se(!l,'Route "'+o.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!l&&!Wa.has(s)&&(a[s]=r[s])}Object.assign(o,a),Object.assign(o,fe({},t(o),{lazy:void 0}))}async function xs(e){let{matches:t}=e,n=t.filter(o=>o.shouldLoad);return(await Promise.all(n.map(o=>o.resolve()))).reduce((o,a,s)=>Object.assign(o,{[n[s].route.id]:a}),{})}async function Rs(e,t,n,r,o,a,s,i,l,c){let u=a.map(y=>y.route.lazy?Cs(y.route,l,i):void 0),d=a.map((y,p)=>{let h=u[p],v=o.some(b=>b.route.id===y.route.id);return fe({},y,{shouldLoad:v,resolve:async b=>(b&&r.method==="GET"&&(y.route.lazy||y.route.loader)&&(v=!0),v?ks(t,r,y,h,b,c):Promise.resolve({type:oe.data,result:void 0}))})}),m=await e({matches:d,request:r,params:a[0].params,fetcherKey:s,context:c});try{await Promise.all(u)}catch{}return m}async function ks(e,t,n,r,o,a){let s,i,l=c=>{let u,d=new Promise((p,h)=>u=h);i=()=>u(),t.signal.addEventListener("abort",i);let m=p=>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},...p!==void 0?[p]:[]),y=(async()=>{try{return{type:"data",result:await(o?o(h=>m(h)):m())}}catch(p){return{type:"error",result:p}}})();return Promise.race([y,d])};try{let c=n.route[e];if(r)if(c){let u,[d]=await Promise.all([l(c).catch(m=>{u=m}),r]);if(u!==void 0)throw u;s=d}else if(await r,c=n.route[e],c)s=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)s=await l(c);else{let u=new URL(t.url),d=u.pathname+u.search;throw Ae(404,{pathname:d})}I(s.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{i&&t.signal.removeEventListener("abort",i)}return s}async function Ns(e){let{result:t,type:n}=e;if(Uo(t)){let d;try{let m=t.headers.get("Content-Type");m&&/\bapplication\/json\b/.test(m)?t.body==null?d=null:d=await t.json():d=await t.text()}catch(m){return{type:oe.error,error:m}}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(ao(t)){var r,o;if(t.data instanceof Error){var a,s;return{type:oe.error,error:t.data,statusCode:(a=t.init)==null?void 0:a.status,headers:(s=t.init)!=null&&s.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:Wt(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:Wt(t)?t.status:void 0}}if(Os(t)){var i,l;return{type:oe.deferred,deferredData:t,statusCode:(i=t.init)==null?void 0:i.status,headers:((l=t.init)==null?void 0:l.headers)&&new Headers(t.init.headers)}}if(ao(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 Ts(e,t,n,r,o,a){let s=e.headers.get("Location");if(I(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!Er.test(s)){let i=r.slice(0,r.findIndex(l=>l.route.id===n)+1);s=sr(new URL(t.url),i,o,!0,s,a),e.headers.set("Location",s)}return e}function Qr(e,t,n){if(Er.test(e)){let r=e,o=r.startsWith("//")?new URL(t.protocol+r):new URL(r),a=$e(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(Ho(t)).toString(),a={signal:n};if(r&&Ve(r.formMethod)){let{formMethod:s,formEncType:i}=r;a.method=s.toUpperCase(),i==="application/json"?(a.headers=new Headers({"Content-Type":i}),a.body=JSON.stringify(r.json)):i==="text/plain"?a.body=r.text:i==="application/x-www-form-urlencoded"&&r.formData?a.body=lr(r.formData):a.body=r.formData}return new Request(o,a)}function lr(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function eo(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function _s(e,t,n,r,o){let a={},s=null,i,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 m=d.route.id,y=t[m];if(I(!vt(y),"Cannot handle redirect results in processLoaderData"),Ie(y)){let p=y.error;u!==void 0&&(p=u,u=void 0),s=s||{};{let h=gt(e,m);s[h.route.id]==null&&(s[h.route.id]=p)}a[m]=void 0,l||(l=!0,i=Wt(y.error)?y.error.status:500),y.headers&&(c[m]=y.headers)}else lt(y)?(r.set(m,y.deferredData),a[m]=y.deferredData.data,y.statusCode!=null&&y.statusCode!==200&&!l&&(i=y.statusCode),y.headers&&(c[m]=y.headers)):(a[m]=y.data,y.statusCode&&y.statusCode!==200&&!l&&(i=y.statusCode),y.headers&&(c[m]=y.headers))}),u!==void 0&&n&&(s={[n[0]]:u},a[n[0]]=void 0),{loaderData:a,errors:s,statusCode:i||200,loaderHeaders:c}}function to(e,t,n,r,o,a,s){let{loaderData:i,errors:l}=_s(t,n,r,s);return o.forEach(c=>{let{key:u,match:d,controller:m}=c,y=a[u];if(I(y,"Did not find corresponding fetcher result"),!(m&&m.signal.aborted))if(Ie(y)){let p=gt(e.matches,d==null?void 0:d.route.id);l&&l[p.route.id]||(l=fe({},l,{[p.route.id]:y.error})),e.fetchers.delete(u)}else if(vt(y))I(!1,"Unhandled fetcher revalidation redirect");else if(lt(y))I(!1,"Unhandled fetcher deferred data");else{let p=it(y.data);e.fetchers.set(u,p)}}),{loaderData:i,errors:l}}function no(e,t,n,r){let o=fe({},t);for(let a of n){let s=a.route.id;if(t.hasOwnProperty(s)?t[s]!==void 0&&(o[s]=t[s]):e[s]!==void 0&&a.route.loader&&(o[s]=e[s]),r&&r.hasOwnProperty(s))break}return o}function ro(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 oo(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:s}=t===void 0?{}:t,i="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(i="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?(i="Forbidden",l='Route "'+r+'" does not match URL "'+n+'"'):e===404?(i="Not Found",l='No route matches URL "'+n+'"'):e===405&&(i="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,i,new Error(l),!0)}function hn(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,o]=t[n];if(vt(o))return{key:r,result:o}}}function Ho(e){let t=typeof e=="string"?dt(e):e;return ct(fe({},t,{hash:""}))}function Ls(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Ps(e){return Uo(e.result)&&gs.has(e.result.status)}function lt(e){return e.type===oe.deferred}function Ie(e){return e.type===oe.error}function vt(e){return(e&&e.type)===oe.redirect}function ao(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Os(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 Uo(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Ms(e){return ms.has(e.toLowerCase())}function Ve(e){return hs.has(e.toLowerCase())}async function As(e,t,n,r,o){let a=Object.entries(t);for(let s=0;s<a.length;s++){let[i,l]=a[s],c=e.find(m=>(m==null?void 0:m.route.id)===i);if(!c)continue;let u=r.find(m=>m.route.id===c.route.id),d=u!=null&&!Bo(u,c)&&(o&&o[c.route.id])!==void 0;lt(l)&&d&&await Cr(l,n,!1).then(m=>{m&&(t[i]=m)})}}async function Ds(e,t,n){for(let r=0;r<n.length;r++){let{key:o,routeId:a,controller:s}=n[r],i=t[o];e.find(c=>(c==null?void 0:c.route.id)===a)&&lt(i)&&(I(s,"Expected an AbortController for revalidating fetcher deferred result"),await Cr(i,s.signal,!0).then(c=>{c&&(t[o]=c)}))}}async function Cr(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 $t(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=Do(e);return r[r.length-1]}function so(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:a,json:s}=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(s!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:s,text:void 0}}}function Kn(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 Fs(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 It(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 Is(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 it(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 Bs(e,t){try{let n=e.sessionStorage.getItem(Io);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 js(e,t){if(t.size>0){let n={};for(let[r,o]of t)n[r]=[...o];try{e.sessionStorage.setItem(Io,JSON.stringify(n))}catch(r){Se(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
12
12
  * React Router v6.30.0
13
13
  *
14
14
  * Copyright (c) Remix Software Inc.
@@ -19,7 +19,7 @@
19
19
  * @license MIT
20
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 _t=C.createContext(null);process.env.NODE_ENV!=="production"&&(_t.displayName="DataRouter");const Mn=C.createContext(null);process.env.NODE_ENV!=="production"&&(Mn.displayName="DataRouterState");const Hs=C.createContext(null);process.env.NODE_ENV!=="production"&&(Hs.displayName="Await");const ze=C.createContext(null);process.env.NODE_ENV!=="production"&&(ze.displayName="Navigation");const An=C.createContext(null);process.env.NODE_ENV!=="production"&&(An.displayName="Location");const Je=C.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&(Je.displayName="Route");const Rr=C.createContext(null);process.env.NODE_ENV!=="production"&&(Rr.displayName="RouteError");function Us(e,t){let{relative:n}=t===void 0?{}:t;Yt()||(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}=C.useContext(ze),{hash:a,pathname:s,search:i}=Xt(e,{relative:n}),l=s;return r!=="/"&&(l=s==="/"?r:Xe([r,s])),o.createHref({pathname:l,search:i,hash:a})}function Yt(){return C.useContext(An)!=null}function Qe(){return Yt()||(process.env.NODE_ENV!=="production"?I(!1,"useLocation() may be used only in the context of a <Router> component."):I(!1)),C.useContext(An).location}const Vo="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function $o(e){C.useContext(ze).static||C.useLayoutEffect(e)}function Dn(){let{isDataRoute:e}=C.useContext(Je);return e?ni():Vs()}function Vs(){Yt()||(process.env.NODE_ENV!=="production"?I(!1,"useNavigate() may be used only in the context of a <Router> component."):I(!1));let e=C.useContext(_t),{basename:t,future:n,navigator:r}=C.useContext(ze),{matches:o}=C.useContext(Je),{pathname:a}=Qe(),s=JSON.stringify(br(o,n.v7_relativeSplatPath)),i=C.useRef(!1);return $o(()=>{i.current=!0}),C.useCallback(function(c,u){if(u===void 0&&(u={}),process.env.NODE_ENV!=="production"&&Se(i.current,Vo),!i.current)return;if(typeof c=="number"){r.go(c);return}let d=Sr(c,JSON.parse(s),a,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Xe([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,s,a,e])}const $s=C.createContext(null);function zs(e){let t=C.useContext(Je).outlet;return t&&C.createElement($s.Provider,{value:e},t)}function Js(){let{matches:e}=C.useContext(Je),t=e[e.length-1];return t?t.params:{}}function Xt(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=C.useContext(ze),{matches:o}=C.useContext(Je),{pathname:a}=Qe(),s=JSON.stringify(br(o,r.v7_relativeSplatPath));return C.useMemo(()=>Sr(e,JSON.parse(s),a,n==="path"),[e,s,a,n])}function qs(e,t,n,r){Yt()||(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}=C.useContext(ze),{matches:s}=C.useContext(Je),i=s[s.length-1],l=i?i.params:{},c=i?i.pathname:"/",u=i?i.pathnameBase:"/",d=i&&i.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
21
 
22
- `+('Please change the parent <Route path="'+b+'"> to <Route ')+('path="'+(b==="/"?"*":b+"/*")+'">.'))}let m=Qe(),v;v=m;let p=v.pathname||"/",h=p;if(u!=="/"){let b=u.replace(/^\//,"").split("/");h="/"+p.replace(/^\//,"").split("/").slice(b.length).join("/")}let y=!a&&n&&n.matches&&n.matches.length>0?n.matches:mt(e,{pathname:h});return process.env.NODE_ENV!=="production"&&(process.env.NODE_ENV!=="production"&&Se(d||y!=null,'No routes matched location "'+v.pathname+v.search+v.hash+'" '),process.env.NODE_ENV!=="production"&&Se(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,'Matched leaf route at location "'+v.pathname+v.search+v.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.')),Ys(y&&y.map(b=>Object.assign({},b,{params:Object.assign({},l,b.params),pathname:Xe([u,o.encodeLocation?o.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?u:Xe([u,o.encodeLocation?o.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,n,r)}function Ws(){let e=Jo(),t=Wt(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},s=null;return process.env.NODE_ENV!=="production"&&(console.error("Error handled by React Router default ErrorBoundary:",e),s=C.createElement(C.Fragment,null,C.createElement("p",null,"💿 Hey developer 👋"),C.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",C.createElement("code",{style:a},"ErrorBoundary")," or"," ",C.createElement("code",{style:a},"errorElement")," prop on your route."))),C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},t),n?C.createElement("pre",{style:o},n):null,s)}const Zs=C.createElement(Ws,null);class Gs extends C.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?C.createElement(Je.Provider,{value:this.props.routeContext},C.createElement(Rr.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Ks(e){let{routeContext:t,match:n,children:r}=e,o=C.useContext(_t);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),C.createElement(Je.Provider,{value:t},r)}function Ys(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 s=e,i=(o=n)==null?void 0:o.errors;if(i!=null){let u=s.findIndex(d=>d.route.id&&(i==null?void 0:i[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(i).join(",")):I(!1)),s=s.slice(0,Math.min(s.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u<s.length;u++){let d=s[u];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(c=u),d.route.id){let{loaderData:m,errors:v}=n,p=d.route.loader&&m[d.route.id]===void 0&&(!v||v[d.route.id]===void 0);if(d.route.lazy||p){l=!0,c>=0?s=s.slice(0,c+1):s=[s[0]];break}}}return s.reduceRight((u,d,m)=>{let v,p=!1,h=null,y=null;n&&(v=i&&d.route.id?i[d.route.id]:void 0,h=d.route.errorElement||Zs,l&&(c<0&&m===0?(qo("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,y=null):c===m&&(p=!0,y=d.route.hydrateFallbackElement||null)));let R=t.concat(s.slice(0,m+1)),b=()=>{let k;return v?k=h:p?k=y:d.route.Component?k=C.createElement(d.route.Component,null):d.route.element?k=d.route.element:k=u,C.createElement(Ks,{match:d,routeContext:{outlet:u,matches:R,isDataRoute:n!=null},children:k})};return n&&(d.route.ErrorBoundary||d.route.errorElement||m===0)?C.createElement(Gs,{location:n.location,revalidation:n.revalidation,component:h,error:v,children:b(),routeContext:{outlet:null,matches:R,isDataRoute:!0}}):b()},null)}var zo=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(zo||{}),Zt=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}(Zt||{});function kr(e){return e+" must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router."}function Xs(e){let t=C.useContext(_t);return t||(process.env.NODE_ENV!=="production"?I(!1,kr(e)):I(!1)),t}function Qs(e){let t=C.useContext(Mn);return t||(process.env.NODE_ENV!=="production"?I(!1,kr(e)):I(!1)),t}function ei(e){let t=C.useContext(Je);return t||(process.env.NODE_ENV!=="production"?I(!1,kr(e)):I(!1)),t}function Nr(e){let t=ei(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 ti(){return Nr(Zt.UseRouteId)}function Jo(){var e;let t=C.useContext(Rr),n=Qs(Zt.UseRouteError),r=Nr(Zt.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function ni(){let{router:e}=Xs(zo.UseNavigateStable),t=Nr(Zt.UseNavigateStable),n=C.useRef(!1);return $o(()=>{n.current=!0}),C.useCallback(function(o,a){a===void 0&&(a={}),process.env.NODE_ENV!=="production"&&Se(n.current,Vo),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Nn({fromRouteId:t},a)))},[e,t])}const io={};function qo(e,t,n){!t&&!io[e]&&(io[e]=!0,process.env.NODE_ENV!=="production"&&Se(!1,n))}const lo={};function ri(e,t){process.env.NODE_ENV!=="production"&&!lo[t]&&(lo[t]=!0,console.warn(t))}const Rt=(e,t,n)=>ri(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function oi(e,t){(e==null?void 0:e.v7_startTransition)===void 0&&Rt("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)&&Rt("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&&Rt("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),t.v7_normalizeFormMethod===void 0&&Rt("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&&Rt("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),t.v7_skipActionErrorRevalidation===void 0&&Rt("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation"))}function ai(e){return zs(e.context)}function si(e){let{basename:t="/",children:n=null,location:r,navigationType:o=ve.Pop,navigator:a,static:s=!1,future:i}=e;Yt()&&(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=C.useMemo(()=>({basename:l,navigator:a,static:s,future:Nn({v7_relativeSplatPath:!1},i)}),[l,i,a,s]);typeof r=="string"&&(r=dt(r));let{pathname:u="/",search:d="",hash:m="",state:v=null,key:p="default"}=r,h=C.useMemo(()=>{let y=$e(u,l);return y==null?null:{location:{pathname:y,search:d,hash:m,state:v,key:p},navigationType:o}},[l,u,d,m,v,p,o]);return process.env.NODE_ENV!=="production"&&Se(h!=null,'<Router basename="'+l+'"> is not able to match the URL '+('"'+u+d+m+'" because it does not start with the ')+"basename, so the <Router> won't render anything."),h==null?null:C.createElement(ze.Provider,{value:c},C.createElement(An.Provider,{children:n,value:h}))}new Promise(()=>{});function ii(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:C.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:C.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:C.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}/**
22
+ `+('Please change the parent <Route path="'+b+'"> to <Route ')+('path="'+(b==="/"?"*":b+"/*")+'">.'))}let m=Qe(),y;y=m;let p=y.pathname||"/",h=p;if(u!=="/"){let b=u.replace(/^\//,"").split("/");h="/"+p.replace(/^\//,"").split("/").slice(b.length).join("/")}let v=!a&&n&&n.matches&&n.matches.length>0?n.matches:mt(e,{pathname:h});return process.env.NODE_ENV!=="production"&&(process.env.NODE_ENV!=="production"&&Se(d||v!=null,'No routes matched location "'+y.pathname+y.search+y.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 "'+y.pathname+y.search+y.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.')),Ys(v&&v.map(b=>Object.assign({},b,{params:Object.assign({},l,b.params),pathname:Xe([u,o.encodeLocation?o.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?u:Xe([u,o.encodeLocation?o.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,n,r)}function Ws(){let e=Jo(),t=Wt(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},s=null;return process.env.NODE_ENV!=="production"&&(console.error("Error handled by React Router default ErrorBoundary:",e),s=C.createElement(C.Fragment,null,C.createElement("p",null,"💿 Hey developer 👋"),C.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",C.createElement("code",{style:a},"ErrorBoundary")," or"," ",C.createElement("code",{style:a},"errorElement")," prop on your route."))),C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},t),n?C.createElement("pre",{style:o},n):null,s)}const Zs=C.createElement(Ws,null);class Gs extends C.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?C.createElement(Je.Provider,{value:this.props.routeContext},C.createElement(Rr.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Ks(e){let{routeContext:t,match:n,children:r}=e,o=C.useContext(_t);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),C.createElement(Je.Provider,{value:t},r)}function Ys(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 s=e,i=(o=n)==null?void 0:o.errors;if(i!=null){let u=s.findIndex(d=>d.route.id&&(i==null?void 0:i[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(i).join(",")):I(!1)),s=s.slice(0,Math.min(s.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u<s.length;u++){let d=s[u];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(c=u),d.route.id){let{loaderData:m,errors:y}=n,p=d.route.loader&&m[d.route.id]===void 0&&(!y||y[d.route.id]===void 0);if(d.route.lazy||p){l=!0,c>=0?s=s.slice(0,c+1):s=[s[0]];break}}}return s.reduceRight((u,d,m)=>{let y,p=!1,h=null,v=null;n&&(y=i&&d.route.id?i[d.route.id]:void 0,h=d.route.errorElement||Zs,l&&(c<0&&m===0?(qo("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,v=null):c===m&&(p=!0,v=d.route.hydrateFallbackElement||null)));let R=t.concat(s.slice(0,m+1)),b=()=>{let k;return y?k=h:p?k=v:d.route.Component?k=C.createElement(d.route.Component,null):d.route.element?k=d.route.element:k=u,C.createElement(Ks,{match:d,routeContext:{outlet:u,matches:R,isDataRoute:n!=null},children:k})};return n&&(d.route.ErrorBoundary||d.route.errorElement||m===0)?C.createElement(Gs,{location:n.location,revalidation:n.revalidation,component:h,error:y,children:b(),routeContext:{outlet:null,matches:R,isDataRoute:!0}}):b()},null)}var zo=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(zo||{}),Zt=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}(Zt||{});function kr(e){return e+" must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router."}function Xs(e){let t=C.useContext(_t);return t||(process.env.NODE_ENV!=="production"?I(!1,kr(e)):I(!1)),t}function Qs(e){let t=C.useContext(Mn);return t||(process.env.NODE_ENV!=="production"?I(!1,kr(e)):I(!1)),t}function ei(e){let t=C.useContext(Je);return t||(process.env.NODE_ENV!=="production"?I(!1,kr(e)):I(!1)),t}function Nr(e){let t=ei(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 ti(){return Nr(Zt.UseRouteId)}function Jo(){var e;let t=C.useContext(Rr),n=Qs(Zt.UseRouteError),r=Nr(Zt.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function ni(){let{router:e}=Xs(zo.UseNavigateStable),t=Nr(Zt.UseNavigateStable),n=C.useRef(!1);return $o(()=>{n.current=!0}),C.useCallback(function(o,a){a===void 0&&(a={}),process.env.NODE_ENV!=="production"&&Se(n.current,Vo),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Nn({fromRouteId:t},a)))},[e,t])}const io={};function qo(e,t,n){!t&&!io[e]&&(io[e]=!0,process.env.NODE_ENV!=="production"&&Se(!1,n))}const lo={};function ri(e,t){process.env.NODE_ENV!=="production"&&!lo[t]&&(lo[t]=!0,console.warn(t))}const Rt=(e,t,n)=>ri(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function oi(e,t){(e==null?void 0:e.v7_startTransition)===void 0&&Rt("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)&&Rt("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&&Rt("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),t.v7_normalizeFormMethod===void 0&&Rt("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&&Rt("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),t.v7_skipActionErrorRevalidation===void 0&&Rt("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation"))}function ai(e){return zs(e.context)}function si(e){let{basename:t="/",children:n=null,location:r,navigationType:o=ye.Pop,navigator:a,static:s=!1,future:i}=e;Yt()&&(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=C.useMemo(()=>({basename:l,navigator:a,static:s,future:Nn({v7_relativeSplatPath:!1},i)}),[l,i,a,s]);typeof r=="string"&&(r=dt(r));let{pathname:u="/",search:d="",hash:m="",state:y=null,key:p="default"}=r,h=C.useMemo(()=>{let v=$e(u,l);return v==null?null:{location:{pathname:v,search:d,hash:m,state:y,key:p},navigationType:o}},[l,u,d,m,y,p,o]);return process.env.NODE_ENV!=="production"&&Se(h!=null,'<Router basename="'+l+'"> is not able to match the URL '+('"'+u+d+m+'" because it does not start with the ')+"basename, so the <Router> won't render anything."),h==null?null:C.createElement(ze.Provider,{value:c},C.createElement(An.Provider,{children:n,value:h}))}new Promise(()=>{});function ii(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:C.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:C.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:C.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}/**
23
23
  * React Router DOM v6.30.0
24
24
  *
25
25
  * Copyright (c) Remix Software Inc.
@@ -28,16 +28,16 @@
28
28
  * LICENSE.md file in the root directory of this source tree.
29
29
  *
30
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 Tr(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 wn="get",bn="application/x-www-form-urlencoded";function Fn(e){return e!=null&&typeof e.tagName=="string"}function li(e){return Fn(e)&&e.tagName.toLowerCase()==="button"}function ci(e){return Fn(e)&&e.tagName.toLowerCase()==="form"}function ui(e){return Fn(e)&&e.tagName.toLowerCase()==="input"}function di(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function fi(e,t){return e.button===0&&(!t||t==="_self")&&!di(e)}function cr(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 hi(e,t){let n=cr(e);return t&&t.forEach((r,o)=>{n.has(o)||t.getAll(o).forEach(a=>{n.append(o,a)})}),n}let pn=null;function pi(){if(pn===null)try{new FormData(document.createElement("form"),0),pn=!1}catch{pn=!0}return pn}const mi=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Yn(e){return e!=null&&!mi.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 gi(e,t){let n,r,o,a,s;if(ci(e)){let i=e.getAttribute("action");r=i?$e(i,t):null,n=e.getAttribute("method")||wn,o=Yn(e.getAttribute("enctype"))||bn,a=new FormData(e)}else if(li(e)||ui(e)&&(e.type==="submit"||e.type==="image")){let i=e.form;if(i==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||i.getAttribute("action");if(r=l?$e(l,t):null,n=e.getAttribute("formmethod")||i.getAttribute("method")||wn,o=Yn(e.getAttribute("formenctype"))||Yn(i.getAttribute("enctype"))||bn,a=new FormData(i,e),!pi()){let{name:c,type:u,value:d}=e;if(u==="image"){let m=c?c+".":"";a.append(m+"x","0"),a.append(m+"y","0")}else c&&a.append(c,d)}}else{if(Fn(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=wn,r=null,o=bn,s=e}return a&&o==="text/plain"&&(s=a,a=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:a,body:s}}const yi=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],vi=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],wi=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","viewTransition"],bi="6";try{window.__reactRouterVersion=bi}catch{}function Si(e,t){return bs({basename:void 0,future:ut({},void 0,{v7_prependBasename:!0}),history:za({window:void 0}),hydrationData:Ei(),routes:e,mapRouteProperties:ii,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function Ei(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=ut({},t,{errors:Ci(t.errors)})),t}function Ci(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 s=new a(o.message);s.stack="",n[r]=s}catch{}}if(n[r]==null){let a=new Error(o.message);a.stack="",n[r]=a}}else n[r]=o;return n}const _r=C.createContext({isTransitioning:!1});process.env.NODE_ENV!=="production"&&(_r.displayName="ViewTransition");const Wo=C.createContext(new Map);process.env.NODE_ENV!=="production"&&(Wo.displayName="Fetchers");const xi="startTransition",co=C[xi],Ri="flushSync",uo=$a[Ri];function ki(e){co?co(e):e()}function Bt(e){uo?uo(e):e()}class Ni{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 Ti(e){let{fallbackElement:t,router:n,future:r}=e,[o,a]=C.useState(n.state),[s,i]=C.useState(),[l,c]=C.useState({isTransitioning:!1}),[u,d]=C.useState(),[m,v]=C.useState(),[p,h]=C.useState(),y=C.useRef(new Map),{v7_startTransition:R}=r||{},b=C.useCallback(P=>{R?ki(P):P()},[R]),k=C.useCallback((P,G)=>{let{deletedFetchers:B,flushSync:ae,viewTransitionOpts:ee}=G;P.fetchers.forEach((he,Oe)=>{he.data!==void 0&&y.current.set(Oe,he.data)}),B.forEach(he=>y.current.delete(he));let te=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!ee||te){ae?Bt(()=>a(P)):b(()=>a(P));return}if(ae){Bt(()=>{m&&(u&&u.resolve(),m.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:ee.currentLocation,nextLocation:ee.nextLocation})});let he=n.window.document.startViewTransition(()=>{Bt(()=>a(P))});he.finished.finally(()=>{Bt(()=>{d(void 0),v(void 0),i(void 0),c({isTransitioning:!1})})}),Bt(()=>v(he));return}m?(u&&u.resolve(),m.skipTransition(),h({state:P,currentLocation:ee.currentLocation,nextLocation:ee.nextLocation})):(i(P),c({isTransitioning:!0,flushSync:!1,currentLocation:ee.currentLocation,nextLocation:ee.nextLocation}))},[n.window,m,u,y,b]);C.useLayoutEffect(()=>n.subscribe(k),[n,k]),C.useEffect(()=>{l.isTransitioning&&!l.flushSync&&d(new Ni)},[l]),C.useEffect(()=>{if(u&&s&&n.window){let P=s,G=u.promise,B=n.window.document.startViewTransition(async()=>{b(()=>a(P)),await G});B.finished.finally(()=>{d(void 0),v(void 0),i(void 0),c({isTransitioning:!1})}),v(B)}},[b,s,u,n.window]),C.useEffect(()=>{u&&s&&o.location.key===s.location.key&&u.resolve()},[u,m,o.location,s]),C.useEffect(()=>{!l.isTransitioning&&p&&(i(p.state),c({isTransitioning:!0,flushSync:!1,currentLocation:p.currentLocation,nextLocation:p.nextLocation}),h(void 0))},[l.isTransitioning,p]),C.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 L=C.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:P=>n.navigate(P),push:(P,G,B)=>n.navigate(P,{state:G,preventScrollReset:B==null?void 0:B.preventScrollReset}),replace:(P,G,B)=>n.navigate(P,{replace:!0,state:G,preventScrollReset:B==null?void 0:B.preventScrollReset})}),[n]),_=n.basename||"/",H=C.useMemo(()=>({router:n,navigator:L,static:!1,basename:_}),[n,L,_]),w=C.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return C.useEffect(()=>oi(r,n.future),[r,n.future]),C.createElement(C.Fragment,null,C.createElement(_t.Provider,{value:H},C.createElement(Mn.Provider,{value:o},C.createElement(Wo.Provider,{value:y.current},C.createElement(_r.Provider,{value:l},C.createElement(si,{basename:_,location:o.location,navigationType:o.historyAction,navigator:L,future:w},o.initialized||n.future.v7_partialHydration?C.createElement(_i,{routes:n.routes,future:n.future,state:o}):t))))),null)}const _i=C.memo(Li);function Li(e){let{routes:t,future:n,state:r}=e;return qs(t,void 0,r,n)}process.env.NODE_ENV;const Pi=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Oi=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Zo=C.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:a,replace:s,state:i,target:l,to:c,preventScrollReset:u,viewTransition:d}=t,m=Tr(t,yi),{basename:v}=C.useContext(ze),p,h=!1;if(typeof c=="string"&&Oi.test(c)&&(p=c,Pi))try{let k=new URL(window.location.href),L=c.startsWith("//")?new URL(k.protocol+c):new URL(c),_=$e(L.pathname,v);L.origin===k.origin&&_!=null?c=_+L.search+L.hash:h=!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 y=Us(c,{relative:o}),R=Di(c,{replace:s,state:i,target:l,preventScrollReset:u,relative:o,viewTransition:d});function b(k){r&&r(k),k.defaultPrevented||R(k)}return C.createElement("a",ut({},m,{href:p||y,onClick:h||a?r:b,ref:n,target:l}))});process.env.NODE_ENV!=="production"&&(Zo.displayName="Link");const Go=C.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:o=!1,className:a="",end:s=!1,style:i,to:l,viewTransition:c,children:u}=t,d=Tr(t,vi),m=Xt(l,{relative:d.relative}),v=Qe(),p=C.useContext(Mn),{navigator:h,basename:y}=C.useContext(ze),R=p!=null&&Vi(m)&&c===!0,b=h.encodeLocation?h.encodeLocation(m).pathname:m.pathname,k=v.pathname,L=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;o||(k=k.toLowerCase(),L=L?L.toLowerCase():null,b=b.toLowerCase()),L&&y&&(L=$e(L,y)||L);const _=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let H=k===b||!s&&k.startsWith(b)&&k.charAt(_)==="/",w=L!=null&&(L===b||!s&&L.startsWith(b)&&L.charAt(b.length)==="/"),P={isActive:H,isPending:w,isTransitioning:R},G=H?r:void 0,B;typeof a=="function"?B=a(P):B=[a,H?"active":null,w?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let ae=typeof i=="function"?i(P):i;return C.createElement(Zo,ut({},d,{"aria-current":G,className:B,ref:n,style:ae,to:l,viewTransition:c}),typeof u=="function"?u(P):u)});process.env.NODE_ENV!=="production"&&(Go.displayName="NavLink");const Mi=C.forwardRef((e,t)=>{let{fetcherKey:n,navigate:r,reloadDocument:o,replace:a,state:s,method:i=wn,action:l,onSubmit:c,relative:u,preventScrollReset:d,viewTransition:m}=e,v=Tr(e,wi),p=Hi(),h=Ui(l,{relative:u}),y=i.toLowerCase()==="get"?"get":"post",R=b=>{if(c&&c(b),b.defaultPrevented)return;b.preventDefault();let k=b.nativeEvent.submitter,L=(k==null?void 0:k.getAttribute("formmethod"))||i;p(k||b.currentTarget,{fetcherKey:n,method:L,navigate:r,replace:a,state:s,relative:u,preventScrollReset:d,viewTransition:m})};return C.createElement("form",ut({ref:t,method:y,action:h,onSubmit:o?c:R},v))});process.env.NODE_ENV!=="production"&&(Mi.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 fo;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(fo||(fo={}));function Ai(e){return e+" must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router."}function Ko(e){let t=C.useContext(_t);return t||(process.env.NODE_ENV!=="production"?I(!1,Ai(e)):I(!1)),t}function Di(e,t){let{target:n,replace:r,state:o,preventScrollReset:a,relative:s,viewTransition:i}=t===void 0?{}:t,l=Dn(),c=Qe(),u=Xt(e,{relative:s});return C.useCallback(d=>{if(fi(d,n)){d.preventDefault();let m=r!==void 0?r:ct(c)===ct(u);l(e,{replace:m,state:o,preventScrollReset:a,relative:s,viewTransition:i})}},[c,l,u,r,o,n,e,a,s,i])}function Fi(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=C.useRef(cr(e)),n=C.useRef(!1),r=Qe(),o=C.useMemo(()=>hi(r.search,n.current?null:t.current),[r.search]),a=Dn(),s=C.useCallback((i,l)=>{const c=cr(typeof i=="function"?i(o):i);n.current=!0,a("?"+c,l)},[a,o]);return[o,s]}function Ii(){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 Bi=0,ji=()=>"__"+String(++Bi)+"__";function Hi(){let{router:e}=Ko(Tn.UseSubmit),{basename:t}=C.useContext(ze),n=ti();return C.useCallback(function(r,o){o===void 0&&(o={}),Ii();let{action:a,method:s,encType:i,formData:l,body:c}=gi(r,t);if(o.navigate===!1){let u=o.fetcherKey||ji();e.fetch(u,n,o.action||a,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||s,formEncType:o.encType||i,flushSync:o.flushSync})}else e.navigate(o.action||a,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||s,formEncType:o.encType||i,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[e,t,n])}function Ui(e,t){let{relative:n}=t===void 0?{}:t,{basename:r}=C.useContext(ze),o=C.useContext(Je);o||(process.env.NODE_ENV!=="production"?I(!1,"useFormAction must be used inside a RouteContext"):I(!1));let[a]=o.matches.slice(-1),s=ut({},Xt(e||".",{relative:n})),i=Qe();if(e==null){s.search=i.search;let l=new URLSearchParams(s.search),c=l.getAll("index");if(c.some(d=>d==="")){l.delete("index"),c.filter(m=>m).forEach(m=>l.append("index",m));let d=l.toString();s.search=d?"?"+d:""}}return(!e||e===".")&&a.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(s.pathname=s.pathname==="/"?r:Xe([r,s.pathname])),ct(s)}function Vi(e,t){t===void 0&&(t={});let n=C.useContext(_r);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}=Ko(Tn.useViewTransitionState),o=Xt(e,{relative:t.relative});if(!n.isTransitioning)return!1;let a=$e(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=$e(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Rn(o.pathname,s)!=null||Rn(o.pathname,a)!=null}var Lr=(e=>(e.Home="Home",e.Orders="Orders",e.Rewards="Rewards",e.Balance="Balance",e.Subscriptions="Subscriptions",e.Tickets="Tickets",e))(Lr||{}),Yo=(e=>(e.Home="Home",e.Orders="Orders",e.Rewards="Rewards",e.Balance="Balance",e.Tickets="Tickets",e))(Yo||{});const $i=[{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"}],ho=e=>{let t;const n=new Set,r=(c,u)=>{const d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){const m=t;t=u??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(v=>v(t,m))}},o=()=>t,i={setState:r,getState:o,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c))},l=t=e(r,o,i);return i},zi=e=>e?ho(e):ho,Ji=e=>e;function qi(e,t=Ji){const n=we.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return we.useDebugValue(n),n}const po=e=>{const t=zi(e),n=r=>qi(t,r);return Object.assign(n,t),n},ie=e=>e?po(e):po,Wi=ie(e=>({action:null,setAction:t=>e(()=>({action:t})),route:Lr.Home,setRoute:t=>e(()=>({route:t})),dashInfo:null,setDashInfo:t=>e(()=>({dashInfo: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}))})),Zi=ie(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 zt extends Error{}zt.prototype.name="InvalidTokenError";function Gi(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 Ki(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 Gi(t)}catch{return atob(t)}}function Xo(e,t){if(typeof e!="string")throw new zt("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 zt(`Invalid token specified: missing part #${n+1}`);let o;try{o=Ki(r)}catch(a){throw new zt(`Invalid token specified: invalid base64 for part #${n+1} (${a.message})`)}try{return JSON.parse(o)}catch(a){throw new zt(`Invalid token specified: invalid json for part #${n+1} (${a.message})`)}}function Qo(e,t){return function(){return e.apply(t,arguments)}}const{toString:Yi}=Object.prototype,{getPrototypeOf:Pr}=Object,In=(e=>t=>{const n=Yi.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),qe=e=>(e=e.toLowerCase(),t=>In(t)===e),Bn=e=>t=>typeof t===e,{isArray:Lt}=Array,Gt=Bn("undefined");function Xi(e){return e!==null&&!Gt(e)&&e.constructor!==null&&!Gt(e.constructor)&&He(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ea=qe("ArrayBuffer");function Qi(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ea(e.buffer),t}const el=Bn("string"),He=Bn("function"),ta=Bn("number"),jn=e=>e!==null&&typeof e=="object",tl=e=>e===!0||e===!1,Sn=e=>{if(In(e)!=="object")return!1;const t=Pr(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},nl=qe("Date"),rl=qe("File"),ol=qe("Blob"),al=qe("FileList"),sl=e=>jn(e)&&He(e.pipe),il=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||He(e.append)&&((t=In(e))==="formdata"||t==="object"&&He(e.toString)&&e.toString()==="[object FormData]"))},ll=qe("URLSearchParams"),[cl,ul,dl,fl]=["ReadableStream","Request","Response","Headers"].map(qe),hl=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Qt(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Lt(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),s=a.length;let i;for(r=0;r<s;r++)i=a[r],t.call(null,e[i],i,e)}}function na(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,ra=e=>!Gt(e)&&e!==vt;function ur(){const{caseless:e}=ra(this)&&this||{},t={},n=(r,o)=>{const a=e&&na(t,o)||o;Sn(t[a])&&Sn(r)?t[a]=ur(t[a],r):Sn(r)?t[a]=ur({},r):Lt(r)?t[a]=r.slice():t[a]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&Qt(arguments[r],n);return t}const pl=(e,t,n,{allOwnKeys:r}={})=>(Qt(t,(o,a)=>{n&&He(o)?e[a]=Qo(o,n):e[a]=o},{allOwnKeys:r}),e),ml=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),gl=(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)},yl=(e,t,n,r)=>{let o,a,s;const i={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)s=o[a],(!r||r(s,e,t))&&!i[s]&&(t[s]=e[s],i[s]=!0);e=n!==!1&&Pr(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},vl=(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},wl=e=>{if(!e)return null;if(Lt(e))return e;let t=e.length;if(!ta(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},bl=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Pr(Uint8Array)),Sl=(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])}},El=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Cl=qe("HTMLFormElement"),xl=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),mo=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Rl=qe("RegExp"),oa=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Qt(n,(o,a)=>{let s;(s=t(o,a,e))!==!1&&(r[a]=s||o)}),Object.defineProperties(e,r)},kl=e=>{oa(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+"'")})}})},Nl=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return Lt(e)?r(e):r(String(e).split(t)),n},Tl=()=>{},_l=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Ll(e){return!!(e&&He(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Pl=e=>{const t=new Array(10),n=(r,o)=>{if(jn(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const a=Lt(r)?[]:{};return Qt(r,(s,i)=>{const l=n(s,o+1);!Gt(l)&&(a[i]=l)}),t[o]=void 0,a}}return r};return n(e,0)},Ol=qe("AsyncFunction"),Ml=e=>e&&(jn(e)||He(e))&&He(e.then)&&He(e.catch),aa=((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)),Al=typeof queueMicrotask<"u"?queueMicrotask.bind(vt):typeof process<"u"&&process.nextTick||aa,E={isArray:Lt,isArrayBuffer:ea,isBuffer:Xi,isFormData:il,isArrayBufferView:Qi,isString:el,isNumber:ta,isBoolean:tl,isObject:jn,isPlainObject:Sn,isReadableStream:cl,isRequest:ul,isResponse:dl,isHeaders:fl,isUndefined:Gt,isDate:nl,isFile:rl,isBlob:ol,isRegExp:Rl,isFunction:He,isStream:sl,isURLSearchParams:ll,isTypedArray:bl,isFileList:al,forEach:Qt,merge:ur,extend:pl,trim:hl,stripBOM:ml,inherits:gl,toFlatObject:yl,kindOf:In,kindOfTest:qe,endsWith:vl,toArray:wl,forEachEntry:Sl,matchAll:El,isHTMLForm:Cl,hasOwnProperty:mo,hasOwnProp:mo,reduceDescriptors:oa,freezeMethods:kl,toObjectSet:Nl,toCamelCase:xl,noop:Tl,toFiniteNumber:_l,findKey:na,global:vt,isContextDefined:ra,isSpecCompliantForm:Ll,toJSONObject:Pl,isAsyncFn:Ol,isThenable:Ml,setImmediate:aa,asap:Al};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,ia={};["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=>{ia[e]={value:e}});Object.defineProperties($,ia);Object.defineProperty(sa,"isAxiosError",{value:!0});$.from=(e,t,n,r,o,a)=>{const s=Object.create(sa);return E.toFlatObject(e,s,function(l){return l!==Error.prototype},i=>i!=="isAxiosError"),$.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,a&&Object.assign(s,a),s};const Dl=null;function dr(e){return E.isPlainObject(e)||E.isArray(e)}function la(e){return E.endsWith(e,"[]")?e.slice(0,-2):e}function go(e,t,n){return e?e.concat(t).map(function(o,a){return o=la(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function Fl(e){return E.isArray(e)&&!e.some(dr)}const Il=E.toFlatObject(E,{},null,function(t){return/^is[A-Z]/.test(t)});function Hn(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(h,y){return!E.isUndefined(y[h])});const r=n.metaTokens,o=n.visitor||u,a=n.dots,s=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(p){if(p===null)return"";if(E.isDate(p))return p.toISOString();if(!l&&E.isBlob(p))throw new $("Blob is not supported. Use a Buffer instead.");return E.isArrayBuffer(p)||E.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,h,y){let R=p;if(p&&!y&&typeof p=="object"){if(E.endsWith(h,"{}"))h=r?h:h.slice(0,-2),p=JSON.stringify(p);else if(E.isArray(p)&&Fl(p)||(E.isFileList(p)||E.endsWith(h,"[]"))&&(R=E.toArray(p)))return h=la(h),R.forEach(function(k,L){!(E.isUndefined(k)||k===null)&&t.append(s===!0?go([h],L,a):s===null?h:h+"[]",c(k))}),!1}return dr(p)?!0:(t.append(go(y,h,a),c(p)),!1)}const d=[],m=Object.assign(Il,{defaultVisitor:u,convertValue:c,isVisitable:dr});function v(p,h){if(!E.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+h.join("."));d.push(p),E.forEach(p,function(R,b){(!(E.isUndefined(R)||R===null)&&o.call(t,R,E.isString(b)?b.trim():b,h,m))===!0&&v(R,h?h.concat(b):[b])}),d.pop()}}if(!E.isObject(e))throw new TypeError("data must be an object");return v(e),t}function yo(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&&Hn(e,this,t)}const ca=Or.prototype;ca.append=function(t,n){this._pairs.push([t,n])};ca.toString=function(t){const n=t?function(r){return t.call(this,r,yo)}:yo;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Bl(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ua(e,t,n){if(!t)return e;const r=n&&n.encode||Bl;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 s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class vo{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 da={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},jl=typeof URLSearchParams<"u"?URLSearchParams:Or,Hl=typeof FormData<"u"?FormData:null,Ul=typeof Blob<"u"?Blob:null,Vl={isBrowser:!0,classes:{URLSearchParams:jl,FormData:Hl,Blob:Ul},protocols:["http","https","file","blob","url","data"]},Mr=typeof window<"u"&&typeof document<"u",fr=typeof navigator=="object"&&navigator||void 0,$l=Mr&&(!fr||["ReactNative","NativeScript","NS"].indexOf(fr.product)<0),zl=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Jl=Mr&&window.location.href||"http://localhost",ql=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Mr,hasStandardBrowserEnv:$l,hasStandardBrowserWebWorkerEnv:zl,navigator:fr,origin:Jl},Symbol.toStringTag,{value:"Module"})),Te={...ql,...Vl};function Wl(e,t){return Hn(e,new Te.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,a){return Te.isNode&&E.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function Zl(e){return E.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Gl(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 fa(e){function t(n,r,o,a){let s=n[a++];if(s==="__proto__")return!0;const i=Number.isFinite(+s),l=a>=n.length;return s=!s&&E.isArray(o)?o.length:s,l?(E.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!i):((!o[s]||!E.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],a)&&E.isArray(o[s])&&(o[s]=Gl(o[s])),!i)}if(E.isFormData(e)&&E.isFunction(e.entries)){const n={};return E.forEachEntry(e,(r,o)=>{t(Zl(r),o,n,0)}),n}return null}function Kl(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 en={transitional:da,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(fa(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 i;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Wl(t,this.formSerializer).toString();if((i=E.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Hn(i?{"files[]":t}:t,l&&new l,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),Kl(t)):t}],transformResponse:[function(t){const n=this.transitional||en.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 s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(i){if(s)throw i.name==="SyntaxError"?$.from(i,$.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Te.classes.FormData,Blob:Te.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=>{en.headers[e]={}});const Yl=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"]),Xl=e=>{const t={};let n,r,o;return e&&e.split(`
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 Tr(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 wn="get",bn="application/x-www-form-urlencoded";function Fn(e){return e!=null&&typeof e.tagName=="string"}function li(e){return Fn(e)&&e.tagName.toLowerCase()==="button"}function ci(e){return Fn(e)&&e.tagName.toLowerCase()==="form"}function ui(e){return Fn(e)&&e.tagName.toLowerCase()==="input"}function di(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function fi(e,t){return e.button===0&&(!t||t==="_self")&&!di(e)}function cr(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 hi(e,t){let n=cr(e);return t&&t.forEach((r,o)=>{n.has(o)||t.getAll(o).forEach(a=>{n.append(o,a)})}),n}let pn=null;function pi(){if(pn===null)try{new FormData(document.createElement("form"),0),pn=!1}catch{pn=!0}return pn}const mi=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Yn(e){return e!=null&&!mi.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 gi(e,t){let n,r,o,a,s;if(ci(e)){let i=e.getAttribute("action");r=i?$e(i,t):null,n=e.getAttribute("method")||wn,o=Yn(e.getAttribute("enctype"))||bn,a=new FormData(e)}else if(li(e)||ui(e)&&(e.type==="submit"||e.type==="image")){let i=e.form;if(i==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||i.getAttribute("action");if(r=l?$e(l,t):null,n=e.getAttribute("formmethod")||i.getAttribute("method")||wn,o=Yn(e.getAttribute("formenctype"))||Yn(i.getAttribute("enctype"))||bn,a=new FormData(i,e),!pi()){let{name:c,type:u,value:d}=e;if(u==="image"){let m=c?c+".":"";a.append(m+"x","0"),a.append(m+"y","0")}else c&&a.append(c,d)}}else{if(Fn(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=wn,r=null,o=bn,s=e}return a&&o==="text/plain"&&(s=a,a=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:a,body:s}}const vi=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],yi=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],wi=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","viewTransition"],bi="6";try{window.__reactRouterVersion=bi}catch{}function Si(e,t){return bs({basename:void 0,future:ut({},void 0,{v7_prependBasename:!0}),history:za({window:void 0}),hydrationData:Ei(),routes:e,mapRouteProperties:ii,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function Ei(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=ut({},t,{errors:Ci(t.errors)})),t}function Ci(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 s=new a(o.message);s.stack="",n[r]=s}catch{}}if(n[r]==null){let a=new Error(o.message);a.stack="",n[r]=a}}else n[r]=o;return n}const _r=C.createContext({isTransitioning:!1});process.env.NODE_ENV!=="production"&&(_r.displayName="ViewTransition");const Wo=C.createContext(new Map);process.env.NODE_ENV!=="production"&&(Wo.displayName="Fetchers");const xi="startTransition",co=C[xi],Ri="flushSync",uo=$a[Ri];function ki(e){co?co(e):e()}function Bt(e){uo?uo(e):e()}class Ni{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 Ti(e){let{fallbackElement:t,router:n,future:r}=e,[o,a]=C.useState(n.state),[s,i]=C.useState(),[l,c]=C.useState({isTransitioning:!1}),[u,d]=C.useState(),[m,y]=C.useState(),[p,h]=C.useState(),v=C.useRef(new Map),{v7_startTransition:R}=r||{},b=C.useCallback(P=>{R?ki(P):P()},[R]),k=C.useCallback((P,G)=>{let{deletedFetchers:B,flushSync:ae,viewTransitionOpts:ee}=G;P.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?Bt(()=>a(P)):b(()=>a(P));return}if(ae){Bt(()=>{m&&(u&&u.resolve(),m.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:ee.currentLocation,nextLocation:ee.nextLocation})});let he=n.window.document.startViewTransition(()=>{Bt(()=>a(P))});he.finished.finally(()=>{Bt(()=>{d(void 0),y(void 0),i(void 0),c({isTransitioning:!1})})}),Bt(()=>y(he));return}m?(u&&u.resolve(),m.skipTransition(),h({state:P,currentLocation:ee.currentLocation,nextLocation:ee.nextLocation})):(i(P),c({isTransitioning:!0,flushSync:!1,currentLocation:ee.currentLocation,nextLocation:ee.nextLocation}))},[n.window,m,u,v,b]);C.useLayoutEffect(()=>n.subscribe(k),[n,k]),C.useEffect(()=>{l.isTransitioning&&!l.flushSync&&d(new Ni)},[l]),C.useEffect(()=>{if(u&&s&&n.window){let P=s,G=u.promise,B=n.window.document.startViewTransition(async()=>{b(()=>a(P)),await G});B.finished.finally(()=>{d(void 0),y(void 0),i(void 0),c({isTransitioning:!1})}),y(B)}},[b,s,u,n.window]),C.useEffect(()=>{u&&s&&o.location.key===s.location.key&&u.resolve()},[u,m,o.location,s]),C.useEffect(()=>{!l.isTransitioning&&p&&(i(p.state),c({isTransitioning:!0,flushSync:!1,currentLocation:p.currentLocation,nextLocation:p.nextLocation}),h(void 0))},[l.isTransitioning,p]),C.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 L=C.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:P=>n.navigate(P),push:(P,G,B)=>n.navigate(P,{state:G,preventScrollReset:B==null?void 0:B.preventScrollReset}),replace:(P,G,B)=>n.navigate(P,{replace:!0,state:G,preventScrollReset:B==null?void 0:B.preventScrollReset})}),[n]),_=n.basename||"/",H=C.useMemo(()=>({router:n,navigator:L,static:!1,basename:_}),[n,L,_]),w=C.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return C.useEffect(()=>oi(r,n.future),[r,n.future]),C.createElement(C.Fragment,null,C.createElement(_t.Provider,{value:H},C.createElement(Mn.Provider,{value:o},C.createElement(Wo.Provider,{value:v.current},C.createElement(_r.Provider,{value:l},C.createElement(si,{basename:_,location:o.location,navigationType:o.historyAction,navigator:L,future:w},o.initialized||n.future.v7_partialHydration?C.createElement(_i,{routes:n.routes,future:n.future,state:o}):t))))),null)}const _i=C.memo(Li);function Li(e){let{routes:t,future:n,state:r}=e;return qs(t,void 0,r,n)}process.env.NODE_ENV;const Pi=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Oi=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Zo=C.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:a,replace:s,state:i,target:l,to:c,preventScrollReset:u,viewTransition:d}=t,m=Tr(t,vi),{basename:y}=C.useContext(ze),p,h=!1;if(typeof c=="string"&&Oi.test(c)&&(p=c,Pi))try{let k=new URL(window.location.href),L=c.startsWith("//")?new URL(k.protocol+c):new URL(c),_=$e(L.pathname,y);L.origin===k.origin&&_!=null?c=_+L.search+L.hash:h=!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=Us(c,{relative:o}),R=Di(c,{replace:s,state:i,target:l,preventScrollReset:u,relative:o,viewTransition:d});function b(k){r&&r(k),k.defaultPrevented||R(k)}return C.createElement("a",ut({},m,{href:p||v,onClick:h||a?r:b,ref:n,target:l}))});process.env.NODE_ENV!=="production"&&(Zo.displayName="Link");const Go=C.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:o=!1,className:a="",end:s=!1,style:i,to:l,viewTransition:c,children:u}=t,d=Tr(t,yi),m=Xt(l,{relative:d.relative}),y=Qe(),p=C.useContext(Mn),{navigator:h,basename:v}=C.useContext(ze),R=p!=null&&Vi(m)&&c===!0,b=h.encodeLocation?h.encodeLocation(m).pathname:m.pathname,k=y.pathname,L=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;o||(k=k.toLowerCase(),L=L?L.toLowerCase():null,b=b.toLowerCase()),L&&v&&(L=$e(L,v)||L);const _=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let H=k===b||!s&&k.startsWith(b)&&k.charAt(_)==="/",w=L!=null&&(L===b||!s&&L.startsWith(b)&&L.charAt(b.length)==="/"),P={isActive:H,isPending:w,isTransitioning:R},G=H?r:void 0,B;typeof a=="function"?B=a(P):B=[a,H?"active":null,w?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let ae=typeof i=="function"?i(P):i;return C.createElement(Zo,ut({},d,{"aria-current":G,className:B,ref:n,style:ae,to:l,viewTransition:c}),typeof u=="function"?u(P):u)});process.env.NODE_ENV!=="production"&&(Go.displayName="NavLink");const Mi=C.forwardRef((e,t)=>{let{fetcherKey:n,navigate:r,reloadDocument:o,replace:a,state:s,method:i=wn,action:l,onSubmit:c,relative:u,preventScrollReset:d,viewTransition:m}=e,y=Tr(e,wi),p=Hi(),h=Ui(l,{relative:u}),v=i.toLowerCase()==="get"?"get":"post",R=b=>{if(c&&c(b),b.defaultPrevented)return;b.preventDefault();let k=b.nativeEvent.submitter,L=(k==null?void 0:k.getAttribute("formmethod"))||i;p(k||b.currentTarget,{fetcherKey:n,method:L,navigate:r,replace:a,state:s,relative:u,preventScrollReset:d,viewTransition:m})};return C.createElement("form",ut({ref:t,method:v,action:h,onSubmit:o?c:R},y))});process.env.NODE_ENV!=="production"&&(Mi.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 fo;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(fo||(fo={}));function Ai(e){return e+" must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router."}function Ko(e){let t=C.useContext(_t);return t||(process.env.NODE_ENV!=="production"?I(!1,Ai(e)):I(!1)),t}function Di(e,t){let{target:n,replace:r,state:o,preventScrollReset:a,relative:s,viewTransition:i}=t===void 0?{}:t,l=Dn(),c=Qe(),u=Xt(e,{relative:s});return C.useCallback(d=>{if(fi(d,n)){d.preventDefault();let m=r!==void 0?r:ct(c)===ct(u);l(e,{replace:m,state:o,preventScrollReset:a,relative:s,viewTransition:i})}},[c,l,u,r,o,n,e,a,s,i])}function Fi(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=C.useRef(cr(e)),n=C.useRef(!1),r=Qe(),o=C.useMemo(()=>hi(r.search,n.current?null:t.current),[r.search]),a=Dn(),s=C.useCallback((i,l)=>{const c=cr(typeof i=="function"?i(o):i);n.current=!0,a("?"+c,l)},[a,o]);return[o,s]}function Ii(){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 Bi=0,ji=()=>"__"+String(++Bi)+"__";function Hi(){let{router:e}=Ko(Tn.UseSubmit),{basename:t}=C.useContext(ze),n=ti();return C.useCallback(function(r,o){o===void 0&&(o={}),Ii();let{action:a,method:s,encType:i,formData:l,body:c}=gi(r,t);if(o.navigate===!1){let u=o.fetcherKey||ji();e.fetch(u,n,o.action||a,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||s,formEncType:o.encType||i,flushSync:o.flushSync})}else e.navigate(o.action||a,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||s,formEncType:o.encType||i,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[e,t,n])}function Ui(e,t){let{relative:n}=t===void 0?{}:t,{basename:r}=C.useContext(ze),o=C.useContext(Je);o||(process.env.NODE_ENV!=="production"?I(!1,"useFormAction must be used inside a RouteContext"):I(!1));let[a]=o.matches.slice(-1),s=ut({},Xt(e||".",{relative:n})),i=Qe();if(e==null){s.search=i.search;let l=new URLSearchParams(s.search),c=l.getAll("index");if(c.some(d=>d==="")){l.delete("index"),c.filter(m=>m).forEach(m=>l.append("index",m));let d=l.toString();s.search=d?"?"+d:""}}return(!e||e===".")&&a.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(s.pathname=s.pathname==="/"?r:Xe([r,s.pathname])),ct(s)}function Vi(e,t){t===void 0&&(t={});let n=C.useContext(_r);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}=Ko(Tn.useViewTransitionState),o=Xt(e,{relative:t.relative});if(!n.isTransitioning)return!1;let a=$e(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=$e(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Rn(o.pathname,s)!=null||Rn(o.pathname,a)!=null}var Lr=(e=>(e.Home="Home",e.Orders="Orders",e.Rewards="Rewards",e.Balance="Balance",e.Subscriptions="Subscriptions",e.Tickets="Tickets",e))(Lr||{}),Yo=(e=>(e.Home="Home",e.Orders="Orders",e.Rewards="Rewards",e.Balance="Balance",e.Tickets="Tickets",e))(Yo||{});const $i=[{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"}],ho=e=>{let t;const n=new Set,r=(c,u)=>{const d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){const m=t;t=u??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(y=>y(t,m))}},o=()=>t,i={setState:r,getState:o,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c))},l=t=e(r,o,i);return i},zi=e=>e?ho(e):ho,Ji=e=>e;function qi(e,t=Ji){const n=we.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return we.useDebugValue(n),n}const po=e=>{const t=zi(e),n=r=>qi(t,r);return Object.assign(n,t),n},ie=e=>e?po(e):po,Wi=ie(e=>({action:null,setAction:t=>e(()=>({action:t})),route:Lr.Home,setRoute:t=>e(()=>({route:t})),dashInfo:null,setDashInfo:t=>e(()=>({dashInfo: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}))})),Zi=ie(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 zt extends Error{}zt.prototype.name="InvalidTokenError";function Gi(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 Ki(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 Gi(t)}catch{return atob(t)}}function Xo(e,t){if(typeof e!="string")throw new zt("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 zt(`Invalid token specified: missing part #${n+1}`);let o;try{o=Ki(r)}catch(a){throw new zt(`Invalid token specified: invalid base64 for part #${n+1} (${a.message})`)}try{return JSON.parse(o)}catch(a){throw new zt(`Invalid token specified: invalid json for part #${n+1} (${a.message})`)}}function Qo(e,t){return function(){return e.apply(t,arguments)}}const{toString:Yi}=Object.prototype,{getPrototypeOf:Pr}=Object,In=(e=>t=>{const n=Yi.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),qe=e=>(e=e.toLowerCase(),t=>In(t)===e),Bn=e=>t=>typeof t===e,{isArray:Lt}=Array,Gt=Bn("undefined");function Xi(e){return e!==null&&!Gt(e)&&e.constructor!==null&&!Gt(e.constructor)&&He(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ea=qe("ArrayBuffer");function Qi(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ea(e.buffer),t}const el=Bn("string"),He=Bn("function"),ta=Bn("number"),jn=e=>e!==null&&typeof e=="object",tl=e=>e===!0||e===!1,Sn=e=>{if(In(e)!=="object")return!1;const t=Pr(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},nl=qe("Date"),rl=qe("File"),ol=qe("Blob"),al=qe("FileList"),sl=e=>jn(e)&&He(e.pipe),il=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||He(e.append)&&((t=In(e))==="formdata"||t==="object"&&He(e.toString)&&e.toString()==="[object FormData]"))},ll=qe("URLSearchParams"),[cl,ul,dl,fl]=["ReadableStream","Request","Response","Headers"].map(qe),hl=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Qt(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Lt(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),s=a.length;let i;for(r=0;r<s;r++)i=a[r],t.call(null,e[i],i,e)}}function na(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 yt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ra=e=>!Gt(e)&&e!==yt;function ur(){const{caseless:e}=ra(this)&&this||{},t={},n=(r,o)=>{const a=e&&na(t,o)||o;Sn(t[a])&&Sn(r)?t[a]=ur(t[a],r):Sn(r)?t[a]=ur({},r):Lt(r)?t[a]=r.slice():t[a]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&Qt(arguments[r],n);return t}const pl=(e,t,n,{allOwnKeys:r}={})=>(Qt(t,(o,a)=>{n&&He(o)?e[a]=Qo(o,n):e[a]=o},{allOwnKeys:r}),e),ml=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),gl=(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)},vl=(e,t,n,r)=>{let o,a,s;const i={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)s=o[a],(!r||r(s,e,t))&&!i[s]&&(t[s]=e[s],i[s]=!0);e=n!==!1&&Pr(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},yl=(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},wl=e=>{if(!e)return null;if(Lt(e))return e;let t=e.length;if(!ta(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},bl=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Pr(Uint8Array)),Sl=(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])}},El=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Cl=qe("HTMLFormElement"),xl=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),mo=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Rl=qe("RegExp"),oa=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Qt(n,(o,a)=>{let s;(s=t(o,a,e))!==!1&&(r[a]=s||o)}),Object.defineProperties(e,r)},kl=e=>{oa(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+"'")})}})},Nl=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return Lt(e)?r(e):r(String(e).split(t)),n},Tl=()=>{},_l=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Ll(e){return!!(e&&He(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Pl=e=>{const t=new Array(10),n=(r,o)=>{if(jn(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const a=Lt(r)?[]:{};return Qt(r,(s,i)=>{const l=n(s,o+1);!Gt(l)&&(a[i]=l)}),t[o]=void 0,a}}return r};return n(e,0)},Ol=qe("AsyncFunction"),Ml=e=>e&&(jn(e)||He(e))&&He(e.then)&&He(e.catch),aa=((e,t)=>e?setImmediate:t?((n,r)=>(yt.addEventListener("message",({source:o,data:a})=>{o===yt&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),yt.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",He(yt.postMessage)),Al=typeof queueMicrotask<"u"?queueMicrotask.bind(yt):typeof process<"u"&&process.nextTick||aa,E={isArray:Lt,isArrayBuffer:ea,isBuffer:Xi,isFormData:il,isArrayBufferView:Qi,isString:el,isNumber:ta,isBoolean:tl,isObject:jn,isPlainObject:Sn,isReadableStream:cl,isRequest:ul,isResponse:dl,isHeaders:fl,isUndefined:Gt,isDate:nl,isFile:rl,isBlob:ol,isRegExp:Rl,isFunction:He,isStream:sl,isURLSearchParams:ll,isTypedArray:bl,isFileList:al,forEach:Qt,merge:ur,extend:pl,trim:hl,stripBOM:ml,inherits:gl,toFlatObject:vl,kindOf:In,kindOfTest:qe,endsWith:yl,toArray:wl,forEachEntry:Sl,matchAll:El,isHTMLForm:Cl,hasOwnProperty:mo,hasOwnProp:mo,reduceDescriptors:oa,freezeMethods:kl,toObjectSet:Nl,toCamelCase:xl,noop:Tl,toFiniteNumber:_l,findKey:na,global:yt,isContextDefined:ra,isSpecCompliantForm:Ll,toJSONObject:Pl,isAsyncFn:Ol,isThenable:Ml,setImmediate:aa,asap:Al};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,ia={};["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=>{ia[e]={value:e}});Object.defineProperties($,ia);Object.defineProperty(sa,"isAxiosError",{value:!0});$.from=(e,t,n,r,o,a)=>{const s=Object.create(sa);return E.toFlatObject(e,s,function(l){return l!==Error.prototype},i=>i!=="isAxiosError"),$.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,a&&Object.assign(s,a),s};const Dl=null;function dr(e){return E.isPlainObject(e)||E.isArray(e)}function la(e){return E.endsWith(e,"[]")?e.slice(0,-2):e}function go(e,t,n){return e?e.concat(t).map(function(o,a){return o=la(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function Fl(e){return E.isArray(e)&&!e.some(dr)}const Il=E.toFlatObject(E,{},null,function(t){return/^is[A-Z]/.test(t)});function Hn(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(h,v){return!E.isUndefined(v[h])});const r=n.metaTokens,o=n.visitor||u,a=n.dots,s=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(p){if(p===null)return"";if(E.isDate(p))return p.toISOString();if(!l&&E.isBlob(p))throw new $("Blob is not supported. Use a Buffer instead.");return E.isArrayBuffer(p)||E.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,h,v){let R=p;if(p&&!v&&typeof p=="object"){if(E.endsWith(h,"{}"))h=r?h:h.slice(0,-2),p=JSON.stringify(p);else if(E.isArray(p)&&Fl(p)||(E.isFileList(p)||E.endsWith(h,"[]"))&&(R=E.toArray(p)))return h=la(h),R.forEach(function(k,L){!(E.isUndefined(k)||k===null)&&t.append(s===!0?go([h],L,a):s===null?h:h+"[]",c(k))}),!1}return dr(p)?!0:(t.append(go(v,h,a),c(p)),!1)}const d=[],m=Object.assign(Il,{defaultVisitor:u,convertValue:c,isVisitable:dr});function y(p,h){if(!E.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+h.join("."));d.push(p),E.forEach(p,function(R,b){(!(E.isUndefined(R)||R===null)&&o.call(t,R,E.isString(b)?b.trim():b,h,m))===!0&&y(R,h?h.concat(b):[b])}),d.pop()}}if(!E.isObject(e))throw new TypeError("data must be an object");return y(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&&Hn(e,this,t)}const ca=Or.prototype;ca.append=function(t,n){this._pairs.push([t,n])};ca.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 Bl(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ua(e,t,n){if(!t)return e;const r=n&&n.encode||Bl;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 s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class yo{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 da={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},jl=typeof URLSearchParams<"u"?URLSearchParams:Or,Hl=typeof FormData<"u"?FormData:null,Ul=typeof Blob<"u"?Blob:null,Vl={isBrowser:!0,classes:{URLSearchParams:jl,FormData:Hl,Blob:Ul},protocols:["http","https","file","blob","url","data"]},Mr=typeof window<"u"&&typeof document<"u",fr=typeof navigator=="object"&&navigator||void 0,$l=Mr&&(!fr||["ReactNative","NativeScript","NS"].indexOf(fr.product)<0),zl=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Jl=Mr&&window.location.href||"http://localhost",ql=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Mr,hasStandardBrowserEnv:$l,hasStandardBrowserWebWorkerEnv:zl,navigator:fr,origin:Jl},Symbol.toStringTag,{value:"Module"})),Te={...ql,...Vl};function Wl(e,t){return Hn(e,new Te.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,a){return Te.isNode&&E.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function Zl(e){return E.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Gl(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 fa(e){function t(n,r,o,a){let s=n[a++];if(s==="__proto__")return!0;const i=Number.isFinite(+s),l=a>=n.length;return s=!s&&E.isArray(o)?o.length:s,l?(E.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!i):((!o[s]||!E.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],a)&&E.isArray(o[s])&&(o[s]=Gl(o[s])),!i)}if(E.isFormData(e)&&E.isFunction(e.entries)){const n={};return E.forEachEntry(e,(r,o)=>{t(Zl(r),o,n,0)}),n}return null}function Kl(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 en={transitional:da,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(fa(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 i;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Wl(t,this.formSerializer).toString();if((i=E.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Hn(i?{"files[]":t}:t,l&&new l,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),Kl(t)):t}],transformResponse:[function(t){const n=this.transitional||en.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 s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(i){if(s)throw i.name==="SyntaxError"?$.from(i,$.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Te.classes.FormData,Blob:Te.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=>{en.headers[e]={}});const Yl=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"]),Xl=e=>{const t={};let n,r,o;return e&&e.split(`
32
32
  `).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||t[n]&&Yl[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},wo=Symbol("internals");function jt(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 Ql(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 ec=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Xn(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 tc(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function nc(e,t){const n=E.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,a,s){return this[r].call(this,t,o,a,s)},configurable:!0})})}let De=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(i,l,c){const u=jt(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(i))}const s=(i,l)=>E.forEach(i,(c,u)=>a(c,u,l));if(E.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(E.isString(t)&&(t=t.trim())&&!ec(t))s(Xl(t),n);else if(E.isHeaders(t))for(const[i,l]of t.entries())a(l,i,r);else t!=null&&a(n,t,r);return this}get(t,n){if(t=jt(t),t){const r=E.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Ql(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=jt(t),t){const r=E.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Xn(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(s){if(s=jt(s),s){const i=E.findKey(r,s);i&&(!n||Xn(r,r[i],i,n))&&(delete r[i],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||Xn(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 s=E.findKey(r,a);if(s){n[s]=En(o),delete n[a];return}const i=t?tc(a):String(a).trim();i!==a&&delete n[a],n[i]=En(o),r[i]=!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[wo]=this[wo]={accessors:{}}).accessors,o=this.prototype;function a(s){const i=jt(s);r[i]||(nc(o,s),r[i]=!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 Qn(e,t){const n=this||en,r=t||n,o=De.from(r.headers);let a=r.data;return E.forEach(e,function(i){a=i.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function ha(e){return!!(e&&e.__CANCEL__)}function Pt(e,t,n){$.call(this,e??"canceled",$.ERR_CANCELED,t,n),this.name="CanceledError"}E.inherits(Pt,$,{__CANCEL__:!0});function pa(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 rc(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function oc(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,s;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[a];s||(s=c),n[o]=l,r[o]=c;let d=a,m=0;for(;d!==o;)m+=n[d++],d=d%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),c-s<t)return;const v=u&&c-u;return v?Math.round(m*1e3/v):void 0}}function ac(e,t){let n=0,r=1e3/t,o,a;const s=(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?s(c,u):(o=c,a||(a=setTimeout(()=>{a=null,s(o)},r-d)))},()=>o&&s(o)]}const _n=(e,t,n=3)=>{let r=0;const o=oc(50,250);return ac(a=>{const s=a.loaded,i=a.lengthComputable?a.total:void 0,l=s-r,c=o(l),u=s<=i;r=s;const d={loaded:s,total:i,progress:i?s/i:void 0,bytes:l,rate:c||void 0,estimated:c&&i&&u?(i-s)/c:void 0,event:a,lengthComputable:i!=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]]},So=e=>(...t)=>E.asap(()=>e(...t)),sc=Te.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Te.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Te.origin),Te.navigator&&/(msie|trident)/i.test(Te.navigator.userAgent)):()=>!0,ic=Te.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const s=[e+"="+encodeURIComponent(t)];E.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),E.isString(r)&&s.push("path="+r),E.isString(o)&&s.push("domain="+o),a===!0&&s.push("secure"),document.cookie=s.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 lc(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function cc(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ma(e,t,n){let r=!lc(t);return e&&r||n==!1?cc(e,t):t}const Eo=e=>e instanceof De?{...e}:e;function bt(e,t){t=t||{};const n={};function r(c,u,d,m){return E.isPlainObject(c)&&E.isPlainObject(u)?E.merge.call({caseless:m},c,u):E.isPlainObject(u)?E.merge({},u):E.isArray(u)?u.slice():u}function o(c,u,d,m){if(E.isUndefined(u)){if(!E.isUndefined(c))return r(void 0,c,d,m)}else return r(c,u,d,m)}function a(c,u){if(!E.isUndefined(u))return r(void 0,u)}function s(c,u){if(E.isUndefined(u)){if(!E.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function i(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:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:i,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,m=d(e[u],t[u],u);E.isUndefined(m)&&d!==i||(n[u]=m)}),n}const ga=e=>{const t=bt({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:s,auth:i}=t;t.headers=s=De.from(s),t.url=ua(ma(t.baseURL,t.url),e.params,e.paramsSerializer),i&&s.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):"")));let l;if(E.isFormData(n)){if(Te.hasStandardBrowserEnv||Te.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[c,...u]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];s.setContentType([c||"multipart/form-data",...u].join("; "))}}if(Te.hasStandardBrowserEnv&&(r&&E.isFunction(r)&&(r=r(t)),r||r!==!1&&sc(t.url))){const c=o&&a&&ic.read(a);c&&s.set(o,c)}return t},uc=typeof XMLHttpRequest<"u",dc=uc&&function(e){return new Promise(function(n,r){const o=ga(e);let a=o.data;const s=De.from(o.headers).normalize();let{responseType:i,onUploadProgress:l,onDownloadProgress:c}=o,u,d,m,v,p;function h(){v&&v(),p&&p(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let y=new XMLHttpRequest;y.open(o.method.toUpperCase(),o.url,!0),y.timeout=o.timeout;function R(){if(!y)return;const k=De.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),_={data:!i||i==="text"||i==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:k,config:e,request:y};pa(function(w){n(w),h()},function(w){r(w),h()},_),y=null}"onloadend"in y?y.onloadend=R:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(R)},y.onabort=function(){y&&(r(new $("Request aborted",$.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new $("Network Error",$.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let L=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const _=o.transitional||da;o.timeoutErrorMessage&&(L=o.timeoutErrorMessage),r(new $(L,_.clarifyTimeoutError?$.ETIMEDOUT:$.ECONNABORTED,e,y)),y=null},a===void 0&&s.setContentType(null),"setRequestHeader"in y&&E.forEach(s.toJSON(),function(L,_){y.setRequestHeader(_,L)}),E.isUndefined(o.withCredentials)||(y.withCredentials=!!o.withCredentials),i&&i!=="json"&&(y.responseType=o.responseType),c&&([m,p]=_n(c,!0),y.addEventListener("progress",m)),l&&y.upload&&([d,v]=_n(l),y.upload.addEventListener("progress",d),y.upload.addEventListener("loadend",v)),(o.cancelToken||o.signal)&&(u=k=>{y&&(r(!k||k.type?new Pt(null,e,y):k),y.abort(),y=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const b=rc(o.url);if(b&&Te.protocols.indexOf(b)===-1){r(new $("Unsupported protocol "+b+":",$.ERR_BAD_REQUEST,e));return}y.send(a||null)})},fc=(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,i();const u=c instanceof Error?c:this.reason;r.abort(u instanceof $?u:new Pt(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,a(new $(`timeout ${t} of ms exceeded`,$.ETIMEDOUT))},t);const i=()=>{e&&(s&&clearTimeout(s),s=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(i),l}},hc=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},pc=async function*(e,t){for await(const n of mc(e))yield*hc(n,t)},mc=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()}},Co=(e,t,n,r)=>{const o=pc(e,t);let a=0,s,i=l=>{s||(s=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await o.next();if(c){i(),l.close();return}let d=u.byteLength;if(n){let m=a+=d;n(m)}l.enqueue(new Uint8Array(u))}catch(c){throw i(c),c}},cancel(l){return i(l),o.return()}},{highWaterMark:2})},Un=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ya=Un&&typeof ReadableStream=="function",gc=Un&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),va=(e,...t)=>{try{return!!e(...t)}catch{return!1}},yc=ya&&va(()=>{let e=!1;const t=new Request(Te.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),xo=64*1024,hr=ya&&va(()=>E.isReadableStream(new Response("").body)),Ln={stream:hr&&(e=>e.body)};Un&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ln[t]&&(Ln[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 vc=async e=>{if(e==null)return 0;if(E.isBlob(e))return e.size;if(E.isSpecCompliantForm(e))return(await new Request(Te.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 gc(e)).byteLength},wc=async(e,t)=>{const n=E.toFiniteNumber(e.getContentLength());return n??vc(t)},bc=Un&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:a,timeout:s,onDownloadProgress:i,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:m}=ga(e);c=c?(c+"").toLowerCase():"text";let v=fc([o,a&&a.toAbortSignal()],s),p;const h=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let y;try{if(l&&yc&&n!=="get"&&n!=="head"&&(y=await wc(u,r))!==0){let _=new Request(t,{method:"POST",body:r,duplex:"half"}),H;if(E.isFormData(r)&&(H=_.headers.get("content-type"))&&u.setContentType(H),_.body){const[w,P]=bo(y,_n(So(l)));r=Co(_.body,xo,w,P)}}E.isString(d)||(d=d?"include":"omit");const R="credentials"in Request.prototype;p=new Request(t,{...m,signal:v,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:R?d:void 0});let b=await fetch(p);const k=hr&&(c==="stream"||c==="response");if(hr&&(i||k&&h)){const _={};["status","statusText","headers"].forEach(G=>{_[G]=b[G]});const H=E.toFiniteNumber(b.headers.get("content-length")),[w,P]=i&&bo(H,_n(So(i),!0))||[];b=new Response(Co(b.body,xo,w,()=>{P&&P(),h&&h()}),_)}c=c||"text";let L=await Ln[E.findKey(Ln,c)||"text"](b,e);return!k&&h&&h(),await new Promise((_,H)=>{pa(_,H,{data:L,headers:De.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:p})})}catch(R){throw h&&h(),R&&R.name==="TypeError"&&/fetch/i.test(R.message)?Object.assign(new $("Network Error",$.ERR_NETWORK,e,p),{cause:R.cause||R}):$.from(R,R&&R.code,e,p)}}),pr={http:Dl,xhr:dc,fetch:bc};E.forEach(pr,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ro=e=>`- ${e}`,Sc=e=>E.isFunction(e)||e===null||e===!1,wa={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 s;if(r=n,!Sc(n)&&(r=pr[(s=String(n)).toLowerCase()],r===void 0))throw new $(`Unknown adapter '${s}'`);if(r)break;o[s||"#"+a]=r}if(!r){const a=Object.entries(o).map(([i,l])=>`adapter ${i} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=t?a.length>1?`since :
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[wo]=this[wo]={accessors:{}}).accessors,o=this.prototype;function a(s){const i=jt(s);r[i]||(nc(o,s),r[i]=!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 Qn(e,t){const n=this||en,r=t||n,o=De.from(r.headers);let a=r.data;return E.forEach(e,function(i){a=i.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function ha(e){return!!(e&&e.__CANCEL__)}function Pt(e,t,n){$.call(this,e??"canceled",$.ERR_CANCELED,t,n),this.name="CanceledError"}E.inherits(Pt,$,{__CANCEL__:!0});function pa(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 rc(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function oc(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,s;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[a];s||(s=c),n[o]=l,r[o]=c;let d=a,m=0;for(;d!==o;)m+=n[d++],d=d%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),c-s<t)return;const y=u&&c-u;return y?Math.round(m*1e3/y):void 0}}function ac(e,t){let n=0,r=1e3/t,o,a;const s=(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?s(c,u):(o=c,a||(a=setTimeout(()=>{a=null,s(o)},r-d)))},()=>o&&s(o)]}const _n=(e,t,n=3)=>{let r=0;const o=oc(50,250);return ac(a=>{const s=a.loaded,i=a.lengthComputable?a.total:void 0,l=s-r,c=o(l),u=s<=i;r=s;const d={loaded:s,total:i,progress:i?s/i:void 0,bytes:l,rate:c||void 0,estimated:c&&i&&u?(i-s)/c:void 0,event:a,lengthComputable:i!=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]]},So=e=>(...t)=>E.asap(()=>e(...t)),sc=Te.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Te.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Te.origin),Te.navigator&&/(msie|trident)/i.test(Te.navigator.userAgent)):()=>!0,ic=Te.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const s=[e+"="+encodeURIComponent(t)];E.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),E.isString(r)&&s.push("path="+r),E.isString(o)&&s.push("domain="+o),a===!0&&s.push("secure"),document.cookie=s.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 lc(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function cc(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ma(e,t,n){let r=!lc(t);return e&&r||n==!1?cc(e,t):t}const Eo=e=>e instanceof De?{...e}:e;function bt(e,t){t=t||{};const n={};function r(c,u,d,m){return E.isPlainObject(c)&&E.isPlainObject(u)?E.merge.call({caseless:m},c,u):E.isPlainObject(u)?E.merge({},u):E.isArray(u)?u.slice():u}function o(c,u,d,m){if(E.isUndefined(u)){if(!E.isUndefined(c))return r(void 0,c,d,m)}else return r(c,u,d,m)}function a(c,u){if(!E.isUndefined(u))return r(void 0,u)}function s(c,u){if(E.isUndefined(u)){if(!E.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function i(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:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:i,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,m=d(e[u],t[u],u);E.isUndefined(m)&&d!==i||(n[u]=m)}),n}const ga=e=>{const t=bt({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:s,auth:i}=t;t.headers=s=De.from(s),t.url=ua(ma(t.baseURL,t.url),e.params,e.paramsSerializer),i&&s.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):"")));let l;if(E.isFormData(n)){if(Te.hasStandardBrowserEnv||Te.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[c,...u]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];s.setContentType([c||"multipart/form-data",...u].join("; "))}}if(Te.hasStandardBrowserEnv&&(r&&E.isFunction(r)&&(r=r(t)),r||r!==!1&&sc(t.url))){const c=o&&a&&ic.read(a);c&&s.set(o,c)}return t},uc=typeof XMLHttpRequest<"u",dc=uc&&function(e){return new Promise(function(n,r){const o=ga(e);let a=o.data;const s=De.from(o.headers).normalize();let{responseType:i,onUploadProgress:l,onDownloadProgress:c}=o,u,d,m,y,p;function h(){y&&y(),p&&p(),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 R(){if(!v)return;const k=De.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),_={data:!i||i==="text"||i==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:k,config:e,request:v};pa(function(w){n(w),h()},function(w){r(w),h()},_),v=null}"onloadend"in v?v.onloadend=R:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(R)},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 L=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const _=o.transitional||da;o.timeoutErrorMessage&&(L=o.timeoutErrorMessage),r(new $(L,_.clarifyTimeoutError?$.ETIMEDOUT:$.ECONNABORTED,e,v)),v=null},a===void 0&&s.setContentType(null),"setRequestHeader"in v&&E.forEach(s.toJSON(),function(L,_){v.setRequestHeader(_,L)}),E.isUndefined(o.withCredentials)||(v.withCredentials=!!o.withCredentials),i&&i!=="json"&&(v.responseType=o.responseType),c&&([m,p]=_n(c,!0),v.addEventListener("progress",m)),l&&v.upload&&([d,y]=_n(l),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(u=k=>{v&&(r(!k||k.type?new Pt(null,e,v):k),v.abort(),v=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const b=rc(o.url);if(b&&Te.protocols.indexOf(b)===-1){r(new $("Unsupported protocol "+b+":",$.ERR_BAD_REQUEST,e));return}v.send(a||null)})},fc=(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,i();const u=c instanceof Error?c:this.reason;r.abort(u instanceof $?u:new Pt(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,a(new $(`timeout ${t} of ms exceeded`,$.ETIMEDOUT))},t);const i=()=>{e&&(s&&clearTimeout(s),s=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(i),l}},hc=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},pc=async function*(e,t){for await(const n of mc(e))yield*hc(n,t)},mc=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()}},Co=(e,t,n,r)=>{const o=pc(e,t);let a=0,s,i=l=>{s||(s=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await o.next();if(c){i(),l.close();return}let d=u.byteLength;if(n){let m=a+=d;n(m)}l.enqueue(new Uint8Array(u))}catch(c){throw i(c),c}},cancel(l){return i(l),o.return()}},{highWaterMark:2})},Un=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",va=Un&&typeof ReadableStream=="function",gc=Un&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),ya=(e,...t)=>{try{return!!e(...t)}catch{return!1}},vc=va&&ya(()=>{let e=!1;const t=new Request(Te.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),xo=64*1024,hr=va&&ya(()=>E.isReadableStream(new Response("").body)),Ln={stream:hr&&(e=>e.body)};Un&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ln[t]&&(Ln[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 yc=async e=>{if(e==null)return 0;if(E.isBlob(e))return e.size;if(E.isSpecCompliantForm(e))return(await new Request(Te.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 gc(e)).byteLength},wc=async(e,t)=>{const n=E.toFiniteNumber(e.getContentLength());return n??yc(t)},bc=Un&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:a,timeout:s,onDownloadProgress:i,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:m}=ga(e);c=c?(c+"").toLowerCase():"text";let y=fc([o,a&&a.toAbortSignal()],s),p;const h=y&&y.unsubscribe&&(()=>{y.unsubscribe()});let v;try{if(l&&vc&&n!=="get"&&n!=="head"&&(v=await wc(u,r))!==0){let _=new Request(t,{method:"POST",body:r,duplex:"half"}),H;if(E.isFormData(r)&&(H=_.headers.get("content-type"))&&u.setContentType(H),_.body){const[w,P]=bo(v,_n(So(l)));r=Co(_.body,xo,w,P)}}E.isString(d)||(d=d?"include":"omit");const R="credentials"in Request.prototype;p=new Request(t,{...m,signal:y,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:R?d:void 0});let b=await fetch(p);const k=hr&&(c==="stream"||c==="response");if(hr&&(i||k&&h)){const _={};["status","statusText","headers"].forEach(G=>{_[G]=b[G]});const H=E.toFiniteNumber(b.headers.get("content-length")),[w,P]=i&&bo(H,_n(So(i),!0))||[];b=new Response(Co(b.body,xo,w,()=>{P&&P(),h&&h()}),_)}c=c||"text";let L=await Ln[E.findKey(Ln,c)||"text"](b,e);return!k&&h&&h(),await new Promise((_,H)=>{pa(_,H,{data:L,headers:De.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:p})})}catch(R){throw h&&h(),R&&R.name==="TypeError"&&/fetch/i.test(R.message)?Object.assign(new $("Network Error",$.ERR_NETWORK,e,p),{cause:R.cause||R}):$.from(R,R&&R.code,e,p)}}),pr={http:Dl,xhr:dc,fetch:bc};E.forEach(pr,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ro=e=>`- ${e}`,Sc=e=>E.isFunction(e)||e===null||e===!1,wa={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 s;if(r=n,!Sc(n)&&(r=pr[(s=String(n)).toLowerCase()],r===void 0))throw new $(`Unknown adapter '${s}'`);if(r)break;o[s||"#"+a]=r}if(!r){const a=Object.entries(o).map(([i,l])=>`adapter ${i} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=t?a.length>1?`since :
34
34
  `+a.map(Ro).join(`
35
- `):" "+Ro(a[0]):"as no adapter specified";throw new $("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:pr};function er(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Pt(null,e)}function ko(e){return er(e),e.headers=De.from(e.headers),e.data=Qn.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),wa.getAdapter(e.adapter||en.adapter)(e).then(function(r){return er(e),r.data=Qn.call(e,e.transformResponse,r),r.headers=De.from(r.headers),r},function(r){return ha(r)||(er(e),r&&r.response&&(r.response.data=Qn.call(e,e.transformResponse,r.response),r.response.headers=De.from(r.response.headers))),Promise.reject(r)})}const ba="1.8.1",Vn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Vn[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const No={};Vn.transitional=function(t,n,r){function o(a,s){return"[Axios v"+ba+"] Transitional option '"+a+"'"+s+(r?". "+r:"")}return(a,s,i)=>{if(t===!1)throw new $(o(s," has been removed"+(n?" in "+n:"")),$.ERR_DEPRECATED);return n&&!No[s]&&(No[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,s,i):!0}};Vn.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Ec(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],s=t[a];if(s){const i=e[a],l=i===void 0||s(i,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 Cn={assertOptions:Ec,validators:Vn},Ye=Cn.validators;let wt=class{constructor(t){this.defaults=t,this.interceptors={request:new vo,response:new vo}}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=bt(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&Cn.assertOptions(r,{silentJSONParsing:Ye.transitional(Ye.boolean),forcedJSONParsing:Ye.transitional(Ye.boolean),clarifyTimeoutError:Ye.transitional(Ye.boolean)},!1),o!=null&&(E.isFunction(o)?n.paramsSerializer={serialize:o}:Cn.assertOptions(o,{encode:Ye.function,serialize:Ye.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Cn.assertOptions(n,{baseUrl:Ye.spelling("baseURL"),withXsrfToken:Ye.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=a&&E.merge(a.common,a[n.method]);a&&E.forEach(["delete","get","head","post","put","patch","common"],p=>{delete a[p]}),n.headers=De.concat(s,a);const i=[];let l=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(l=l&&h.synchronous,i.unshift(h.fulfilled,h.rejected))});const c=[];this.interceptors.response.forEach(function(h){c.push(h.fulfilled,h.rejected)});let u,d=0,m;if(!l){const p=[ko.bind(this),void 0];for(p.unshift.apply(p,i),p.push.apply(p,c),m=p.length,u=Promise.resolve(n);d<m;)u=u.then(p[d++],p[d++]);return u}m=i.length;let v=n;for(d=0;d<m;){const p=i[d++],h=i[d++];try{v=p(v)}catch(y){h.call(this,y);break}}try{u=ko.call(this,v)}catch(p){return Promise.reject(p)}for(d=0,m=c.length;d<m;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=bt(this.defaults,t);const n=ma(t.baseURL,t.url,t.allowAbsoluteUrls);return ua(n,t.params,t.paramsSerializer)}};E.forEach(["delete","get","head","options"],function(t){wt.prototype[t]=function(n,r){return this.request(bt(r||{},{method:t,url:n,data:(r||{}).data}))}});E.forEach(["post","put","patch"],function(t){function n(r){return function(a,s,i){return this.request(bt(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:s}))}}wt.prototype[t]=n(),wt.prototype[t+"Form"]=n(!0)});let Cc=class Sa{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 s=new Promise(i=>{r.subscribe(i),a=i}).then(o);return s.cancel=function(){r.unsubscribe(a)},s},t(function(a,s,i){r.reason||(r.reason=new Pt(a,s,i),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 Sa(function(o){t=o}),cancel:t}}};function xc(e){return function(n){return e.apply(null,n)}}function Rc(e){return E.isObject(e)&&e.isAxiosError===!0}const mr={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(mr).forEach(([e,t])=>{mr[t]=e});function Ea(e){const t=new wt(e),n=Qo(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(bt(e,o))},n}const ce=Ea(en);ce.Axios=wt;ce.CanceledError=Pt;ce.CancelToken=Cc;ce.isCancel=ha;ce.VERSION=ba;ce.toFormData=Hn;ce.AxiosError=$;ce.Cancel=ce.CanceledError;ce.all=function(t){return Promise.all(t)};ce.spread=xc;ce.isAxiosError=Rc;ce.mergeConfig=bt;ce.AxiosHeaders=De;ce.formToJSON=e=>fa(E.isHTMLForm(e)?new FormData(e):e);ce.getAdapter=wa.getAdapter;ce.HttpStatusCode=mr;ce.default=ce;const{Axios:rf,AxiosError:kc,CanceledError:of,isCancel:af,CancelToken:sf,VERSION:lf,all:cf,Cancel:uf,isAxiosError:df,spread:ff,toFormData:hf,AxiosHeaders:pf,HttpStatusCode:mf,formToJSON:gf,getAdapter:yf,mergeConfig:vf}=ce,mn="https://localhost:5043",at=async e=>{var m,v;const{url:t,withToken:n,method:r,body:o,contentType:a,typeToken:s="seller"}=e,i=n?localStorage.getItem("sellerAccessToken"):null,l=n?localStorage.getItem("token"):null,c=s==="seller"?i: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 p=null;switch(r){case"get":p=await ce.get(u?mn:t,{headers:d});break;case"post":p=await ce.post(u?mn:t,o,{headers:d});break;case"put":p=await ce.put(u?mn:t,o,{headers:d});break;case"delete":p=await ce.delete(u?mn:t,{headers:d});break}return{data:p==null?void 0:p.data,status:p==null?void 0:p.status,headers:p==null?void 0:p.headers}}catch(p){const h=p,y=(m=h.response)==null?void 0:m.data;let R="Something Went Wrong";y&&(R=y.errors[0]);const b=(v=h.response)==null?void 0:v.status;if(b===401)try{const L=await Promise.resolve().then(()=>require("./charge-I1l9O9oW.cjs")).then(_=>_.auth);L&&L.logoutCustomer?await L.logoutCustomer():localStorage.removeItem("token"),window.location.reload()}catch(L){console.error("Failed to import logoutCustomer:",L),localStorage.removeItem("token"),window.location.reload()}const k=new kc(R,(b==null?void 0:b.toString())||"400");throw k.response=h.response,k}},Nc="https://g-api.billgang.com",Tc="https://www.googleapis.com/webfonts/v1/webfonts",_c="https://stores-api.billgang.com",Lc="https://sl-api.billgang.com",Pc="https://customers-api.billgang.com",Oc="https://cashapp-api.billgang.com",Mc={api:Nc,googleFonts:Tc,storeApi:_c,slApi:Lc,customersApi:Pc,cashappApi:Oc},Ac=(e,t="300")=>e==="not found"?"empty":`https://imagedelivery.net/${e}/w=${t}`,Dc=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)},Fc=(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},Ic=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`},Bc=e=>new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),jc=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]},gr=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)},tr="f10120ab-7ebb-4785-b240-7428edaa3c4e",Ht="https://t-api.billgang.com",Ut="https://internal-t-api.antistock.io",Jt="I",Hc=10*1e3,Uc=15*1e3,Vc=15*60*1e3,Ca=()=>{var t;const e=gr(Jt);return((t=e==null?void 0:e.s)==null?void 0:t.i)||null},$c=(e,t="production",n)=>{const{pathname:r}=Qe(),o=we.useRef(),a=we.useRef(document.visibilityState);we.useEffect(()=>{if(!e)return;const s=()=>Date.now(),i=async()=>(await at({url:`${n?Ut:Ht}/${e}/t/p`,method:"post",withToken:!1})).data.data.id,l=async p=>(await at({url:`${n?Ut:Ht}/${e}/t/p/${t==="development"?tr:p}/s`,method:"post",withToken:!1})).data.data.id,c=async(p,h,y,R)=>{const b=t==="development"?tr:p;try{return(await at({url:`${n?Ut:Ht}/${e}/t/p/${b}/s/${h}/e`,method:"post",withToken:!1,body:{url:y,oldEventId:R},contentType:"application/json"})).data.data.id}catch{return h=await l(p),(await at({url:`${n?Ut:Ht}/${e}/t/p/${b}/s/${h}/e`,method:"post",withToken:!1,body:{url:y},contentType:"application/json"})).data.data.id}},u=async(p,h,y)=>{await at({url:`${n?Ut:Ht}/${e}/t/p/${t==="development"?tr:p}/s/${h}/e/${y}/h`,method:"post",withToken:!1});const b=gr(Jt);b&&(b.s.u=s().toString(),b.lu=s().toString(),To(Jt,b))},d=(p,h,y)=>{o.current&&clearInterval(o.current),o.current=setInterval(async()=>{if(document.visibilityState==="visible")try{await u(p,h,y)}catch{await m()}},Hc)},m=async()=>{var R,b,k,L;const p=`${window.location.hostname}${r}`,h=gr(Jt),y=s();try{let _=h==null?void 0:h.p;_||(_=await i());let H=(R=h==null?void 0:h.s)==null?void 0:R.i;const w=Number(((b=h==null?void 0:h.s)==null?void 0:b.u)||((k=h==null?void 0:h.s)==null?void 0:k.c)),P=!H||y-w>Vc;(!H||P)&&(H=await l(_));const G=Number((h==null?void 0:h.lu)||0),B=y-G>Uc,ae=await c(_,H,p,h!=null&&h.l&&!B?h.l:void 0),ee={p:_,s:{i:H,c:((L=h==null?void 0:h.s)==null?void 0:L.c)??y.toString(),u:y.toString()},l:ae,lu:y.toString()};To(Jt,ee),d(_,H,ae)}catch(_){console.error("[TrackingAnalytics] error",_)}};m();const v=()=>{document.visibilityState==="visible"&&a.current!=="visible"&&m(),a.current=document.visibilityState};return document.addEventListener("visibilitychange",v),()=>{o.current&&clearInterval(o.current),document.removeEventListener("visibilitychange",v)}},[r,e,t])},zc={customerEmail:"",recaptcha:"",gateway:"",paymentMethod:"",parts:[],customFields:{},discordSocialConnectId:null,coupon:null,tsId:Ca()};let Tt=null;const _o=localStorage.getItem("token");if(_o)try{Tt=Xo(JSON.parse(_o)||"")}catch{Tt=null}const Jc=ie(e=>({cart:{...zc,customerEmail:Tt?Tt.email:""},products:[],coupon:null,pending:!1,applyCouponPending:!1,customerEmail:Tt?Tt.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}}))})),qc=ie(e=>({page:1,setPage:t=>e(()=>({page:t})),resetPage:()=>e(()=>({page:1}))})),Wc=ie(e=>({discordInfo:null,setDiscordInfo:t=>e(()=>({discordInfo:t}))})),Zc=ie(e=>({subscription:null,setSubscription:t=>e({subscription:t})})),tn=ie(e=>({apiUrls:Mc,setApiUrls:t=>e(()=>({apiUrls:t}))})),xa=ie(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}))})),Gc=ie(e=>({general:null,setGeneral:t=>e(()=>({general:t})),isAntistock:!1,setIsAntistock:t=>e(()=>({isAntistock:t}))})),yr=ie(e=>({settings:null,setSettings:t=>{e(()=>({settings:t}))},isLoadingSettings:!0,setIsLoadingSettings:t=>e(()=>({isLoadingSettings:t}))})),Pn=ie((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 s=JSON.parse(JSON.stringify(t().themeSettings));Pe.getState().addHistory({themeSettings:s});const i={...a.themeSettings.colors,[n]:{...a.themeSettings.colors[n],[r]:o}};return{themeSettings:{...a.themeSettings,colors:i}}}),updateFont:(n,r,o,a,s)=>e(i=>{const l=JSON.parse(JSON.stringify(t().themeSettings));Pe.getState().addHistory({themeSettings:l});const c={...i.themeSettings.fonts,[n]:{...i.themeSettings.fonts[n],[r]:{...i.themeSettings.fonts[n][r],[o]:{...i.themeSettings.fonts[n][r][o],[a]:s}}}};return{themeSettings:{...i.themeSettings,fonts:c}}}),updateFontSizePercentage:(n,r)=>e(o=>{const a=JSON.parse(JSON.stringify(t().themeSettings));Pe.getState().addHistory({themeSettings:a});const s={...o.themeSettings.fonts,[n]:{...o.themeSettings.fonts[n],fontSizePercentage:r}};return{themeSettings:{...o.themeSettings,fonts:s}}}),updateBorder:(n,r)=>e(o=>{const a=JSON.parse(JSON.stringify(t().themeSettings));Pe.getState().addHistory({themeSettings:a});const s={...o.themeSettings.borders,[n]:r};return{themeSettings:{...o.themeSettings,borders:s}}}),updateButton:(n,r,o)=>e(a=>{const s=JSON.parse(JSON.stringify(t().themeSettings));Pe.getState().addHistory({themeSettings:s});const i={...a.themeSettings.buttons[n],[r]:o},l={...a.themeSettings.buttons,[n]:i};return{themeSettings:{...a.themeSettings,buttons:l}}}),updateInput:(n,r,o)=>e(a=>{const s=JSON.parse(JSON.stringify(t().themeSettings));return Pe.getState().addHistory({themeSettings:s}),{themeSettings:{...a.themeSettings,inputs:{...a.themeSettings.inputs,[n]:{...a.themeSettings.inputs[n],[o]:r}}}}}),isLoadingThemeSettings:!1,setIsLoadingThemeSettings:n=>e(()=>({isLoadingThemeSettings:n}))})),Fe=ie(e=>({notifications:[],setNotifications:t=>e(()=>({notifications:t}))})),Kc=ie(e=>({isOpen:!0,setIsOpen:t=>e(()=>({isOpen:t}))}));var Ne=[];for(var nr=0;nr<256;++nr)Ne.push((nr+256).toString(16).slice(1));function Yc(e,t=0){return(Ne[e[t+0]]+Ne[e[t+1]]+Ne[e[t+2]]+Ne[e[t+3]]+"-"+Ne[e[t+4]]+Ne[e[t+5]]+"-"+Ne[e[t+6]]+Ne[e[t+7]]+"-"+Ne[e[t+8]]+Ne[e[t+9]]+"-"+Ne[e[t+10]]+Ne[e[t+11]]+Ne[e[t+12]]+Ne[e[t+13]]+Ne[e[t+14]]+Ne[e[t+15]]).toLowerCase()}var gn,Xc=new Uint8Array(16);function Qc(){if(!gn&&(gn=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!gn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return gn(Xc)}var eu=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Lo={randomUUID:eu};function ot(e,t,n){if(Lo.randomUUID&&!e)return Lo.randomUUID();e=e||{};var r=e.random||(e.rng||Qc)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Yc(r)}function tu(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var a;const s=l=>l===null?null:JSON.parse(l,void 0),i=(a=n.getItem(o))!=null?a:null;return i instanceof Promise?i.then(s):s(i)},setItem:(o,a)=>n.setItem(o,JSON.stringify(a,void 0)),removeItem:o=>n.removeItem(o)}}const vr=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return vr(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return vr(r)(n)}}}},nu=(e,t)=>(n,r,o)=>{let a={storage:tu(()=>localStorage),partialize:h=>h,version:0,merge:(h,y)=>({...y,...h}),...t},s=!1;const i=new Set,l=new Set;let c=a.storage;if(!c)return e((...h)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...h)},r,o);const u=()=>{const h=a.partialize({...r()});return c.setItem(a.name,{state:h,version:a.version})},d=o.setState;o.setState=(h,y)=>{d(h,y),u()};const m=e((...h)=>{n(...h),u()},r,o);o.getInitialState=()=>m;let v;const p=()=>{var h,y;if(!c)return;s=!1,i.forEach(b=>{var k;return b((k=r())!=null?k:m)});const R=((y=a.onRehydrateStorage)==null?void 0:y.call(a,(h=r())!=null?h:m))||void 0;return vr(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 k;const[L,_]=b;if(v=a.merge(_,(k=r())!=null?k:m),n(v,!0),L)return u()}).then(()=>{R==null||R(v,void 0),v=r(),s=!0,l.forEach(b=>b(v))}).catch(b=>{R==null||R(void 0,b)})};return o.persist={setOptions:h=>{a={...a,...h},h.storage&&(c=h.storage)},clearStorage:()=>{c==null||c.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>p(),hasHydrated:()=>s,onHydrate:h=>(i.add(h),()=>{i.delete(h)}),onFinishHydration:h=>(l.add(h),()=>{l.delete(h)})},a.skipHydration||p(),v||m},$n=nu,Kt=ie($n((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},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 s=t().pages;s[o]=n,e({pages:s})}},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}}})),ru=ie(e=>({isOpenModal:!1,setIsOpenModal:t=>e(()=>({isOpenModal:t}))})),On=ie($n((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&&Pe.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&&Pe.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&&Pe.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:s}=Kt.getState();if(!a||!s||!s[a]||!o[s[a].path]){console.error("Cannot set position: invalid page or block data");return}const i=s[a].path,l=o[i],c=n?l.order.indexOf(n):-1;if(c===-1&&n){console.error(`Block with ID "${n}" not found in page "${i}"`);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));Pe.getState().addHistory({layers:o});const a={...t().blocks},s=a[n]||{data:{},order:[]},i=t().positionBlock,l=ot(),c={name:r.name,value:r.value};return s.data[l]=c,i===null||i>=s.order.length?s.order.push(l):s.order.splice(i,0,l),e({blocks:{...a,[n]:{data:s.data,order:s.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));Pe.getState().addHistory({layers:a});const s=t().blocks,i=s[n]||{};i.data[r]={name:o.name,value:{...o.value}},e({blocks:{...s,[n]:i}})},removeBlock:(n,r)=>{const o=JSON.parse(JSON.stringify(t().blocks));Pe.getState().addHistory({layers:o});const a=JSON.parse(JSON.stringify(t().blocks)),s=a[n];if(!s){console.error(`Page at path "${n}" does not exist.`);return}delete s.data[r],s.order=s.order.filter(i=>i!==r),e({blocks:{...a,[n]:s}}),Fe.getState().setNotifications([...Fe.getState().notifications,{id:ot(),message:"Block successfully deleted",status:"success"}])},moveBlock:(n,r,o)=>e(a=>{const s=JSON.parse(JSON.stringify(t().blocks));if(Pe.getState().addHistory({layers:s}),!a.blocks[n])return console.error(`Path ${n} does not exist in blocks`),a;const i={...a.blocks[n]},l=[...i.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]:{...i,order:l}}}}),duplicateBlock:(n,r)=>{const o=JSON.parse(JSON.stringify(t().blocks));Pe.getState().addHistory({layers:o});const a=JSON.parse(JSON.stringify(t().blocks)),s=a[n];if(!s||!s.data[r]){console.error(`Block with ID "${r}" not found in page "${n}"`);return}const i=ot(),l=s.data[r],c={name:l.name,value:JSON.parse(JSON.stringify({...l.value}))};s.data[i]={...c};const u=s.order.indexOf(r);if(u===-1){console.error(`Block ID "${r}" not found in order array`);return}s.order.splice(u+1,0,i),e({blocks:{...a,[n]:s},currentBlock:i}),Ra.getState().setActiveBlock({id:i,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}}})),Pe=ie((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:s,header:i,footer:l,announcement:c,setBlocks:u,setHeader:d,setFooter:m,setAnnouncement:v}=On.getState(),{themeSettings:p,setThemeSettings:h}=Pn.getState(),y={themeSettings:JSON.parse(JSON.stringify(p)),layers:JSON.parse(JSON.stringify(s)),header:JSON.parse(JSON.stringify(i)),footer:JSON.parse(JSON.stringify(l)),announcement:JSON.parse(JSON.stringify(c))};e({past:a,future:[y,...r]}),o.themeSettings&&h(o.themeSettings),o.layers&&u(o.layers),o.header&&d(o.header,!1),o.footer&&m(o.footer,!1),o.announcement&&v(o.announcement,!1)},redo:()=>{const{past:n,future:r}=t();if(r.length===0)return;const{blocks:o,header:a,footer:s,announcement:i,setBlocks:l,setHeader:c,setFooter:u,setAnnouncement:d}=On.getState(),{themeSettings:m,setThemeSettings:v}=Pn.getState(),p=r[0],h=r.slice(1),y={themeSettings:JSON.parse(JSON.stringify(m)),layers:JSON.parse(JSON.stringify(o)),header:JSON.parse(JSON.stringify(a)),footer:JSON.parse(JSON.stringify(s)),announcement:JSON.parse(JSON.stringify(i))};e({past:[...n,y],future:h}),p.themeSettings&&v(p.themeSettings),p.layers&&l(p.layers),p.header&&c(p.header,!1),p.footer&&u(p.footer,!1),p.announcement&&d(p.announcement,!1)}})),Ra=ie($n(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"}],ou=[{icon:"Desktop",value:"desktop"},{icon:"DeviceTabletCamera",value:"tablet"},{icon:"DeviceMobileCamera",value:"mobile"}],au=[{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)),iu=["/","/reviews","/faqs","/contact","/products","/ticket","/login"],Vt={"/":{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"}},lu=typeof window<"u"&&(window.location.hostname.includes("localhost")||window.location.hostname.includes("192")||window.location.hostname.includes("local-rst.sp-internal.work")),cu={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)"},uu={None:"var(--border-none)",1:"var(--border-sm)",2:"var(--border-md)",4:"var(--border-lg)"},du={"1:1":"1:1","4:3":"4:3","16:9":"16:9","9:16":"9:16"},fu=[{value:"4:3",addon:N.jsx("div",{style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:N.jsx("div",{style:{width:18.5,height:14.5,border:"1.5px solid #252525",borderRadius:3}})})},{value:"16:9",addon:N.jsx("div",{style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:N.jsx("div",{style:{width:20.5,height:12.5,border:"1.5px solid #252525",borderRadius:3}})})},{value:"9:16",addon:N.jsx("div",{style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:N.jsx("div",{style:{width:14.5,height:18.5,border:"1.5px solid #252525",borderRadius:3}})})},{value:"1:1",addon:N.jsx("div",{style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:N.jsx("div",{style:{width:16.5,height:16.5,border:"1.5px solid #252525",borderRadius:3}})})}],hu={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"},pu=ie(e=>({activeBlock:ka[0],setActiveBlock:t=>e(()=>({activeBlock:t}))})),Na=ie(e=>({openModal:!1,setOpenModal:t=>e(()=>({openModal:t})),onChange:null,setOnChange:t=>e(()=>({onChange:t})),tip:"",setTip:t=>e(()=>({tip:t}))})),mu=ie(e=>({error:null,setError:t=>e(()=>({error:t}))})),Ta=ie(e=>({title:null,description:null,onConfirm:null,setTitle:t=>e(()=>({title:t})),setDescription:t=>e(()=>({description:t})),setOnConfirm:t=>e(()=>({onConfirm:t}))}));var gu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var La={exports:{}};/*!
35
+ `):" "+Ro(a[0]):"as no adapter specified";throw new $("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:pr};function er(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Pt(null,e)}function ko(e){return er(e),e.headers=De.from(e.headers),e.data=Qn.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),wa.getAdapter(e.adapter||en.adapter)(e).then(function(r){return er(e),r.data=Qn.call(e,e.transformResponse,r),r.headers=De.from(r.headers),r},function(r){return ha(r)||(er(e),r&&r.response&&(r.response.data=Qn.call(e,e.transformResponse,r.response),r.response.headers=De.from(r.response.headers))),Promise.reject(r)})}const ba="1.8.1",Vn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Vn[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const No={};Vn.transitional=function(t,n,r){function o(a,s){return"[Axios v"+ba+"] Transitional option '"+a+"'"+s+(r?". "+r:"")}return(a,s,i)=>{if(t===!1)throw new $(o(s," has been removed"+(n?" in "+n:"")),$.ERR_DEPRECATED);return n&&!No[s]&&(No[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,s,i):!0}};Vn.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Ec(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],s=t[a];if(s){const i=e[a],l=i===void 0||s(i,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 Cn={assertOptions:Ec,validators:Vn},Ye=Cn.validators;let wt=class{constructor(t){this.defaults=t,this.interceptors={request:new yo,response:new yo}}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=bt(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&Cn.assertOptions(r,{silentJSONParsing:Ye.transitional(Ye.boolean),forcedJSONParsing:Ye.transitional(Ye.boolean),clarifyTimeoutError:Ye.transitional(Ye.boolean)},!1),o!=null&&(E.isFunction(o)?n.paramsSerializer={serialize:o}:Cn.assertOptions(o,{encode:Ye.function,serialize:Ye.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Cn.assertOptions(n,{baseUrl:Ye.spelling("baseURL"),withXsrfToken:Ye.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=a&&E.merge(a.common,a[n.method]);a&&E.forEach(["delete","get","head","post","put","patch","common"],p=>{delete a[p]}),n.headers=De.concat(s,a);const i=[];let l=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(l=l&&h.synchronous,i.unshift(h.fulfilled,h.rejected))});const c=[];this.interceptors.response.forEach(function(h){c.push(h.fulfilled,h.rejected)});let u,d=0,m;if(!l){const p=[ko.bind(this),void 0];for(p.unshift.apply(p,i),p.push.apply(p,c),m=p.length,u=Promise.resolve(n);d<m;)u=u.then(p[d++],p[d++]);return u}m=i.length;let y=n;for(d=0;d<m;){const p=i[d++],h=i[d++];try{y=p(y)}catch(v){h.call(this,v);break}}try{u=ko.call(this,y)}catch(p){return Promise.reject(p)}for(d=0,m=c.length;d<m;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=bt(this.defaults,t);const n=ma(t.baseURL,t.url,t.allowAbsoluteUrls);return ua(n,t.params,t.paramsSerializer)}};E.forEach(["delete","get","head","options"],function(t){wt.prototype[t]=function(n,r){return this.request(bt(r||{},{method:t,url:n,data:(r||{}).data}))}});E.forEach(["post","put","patch"],function(t){function n(r){return function(a,s,i){return this.request(bt(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:s}))}}wt.prototype[t]=n(),wt.prototype[t+"Form"]=n(!0)});let Cc=class Sa{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 s=new Promise(i=>{r.subscribe(i),a=i}).then(o);return s.cancel=function(){r.unsubscribe(a)},s},t(function(a,s,i){r.reason||(r.reason=new Pt(a,s,i),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 Sa(function(o){t=o}),cancel:t}}};function xc(e){return function(n){return e.apply(null,n)}}function Rc(e){return E.isObject(e)&&e.isAxiosError===!0}const mr={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(mr).forEach(([e,t])=>{mr[t]=e});function Ea(e){const t=new wt(e),n=Qo(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(bt(e,o))},n}const ce=Ea(en);ce.Axios=wt;ce.CanceledError=Pt;ce.CancelToken=Cc;ce.isCancel=ha;ce.VERSION=ba;ce.toFormData=Hn;ce.AxiosError=$;ce.Cancel=ce.CanceledError;ce.all=function(t){return Promise.all(t)};ce.spread=xc;ce.isAxiosError=Rc;ce.mergeConfig=bt;ce.AxiosHeaders=De;ce.formToJSON=e=>fa(E.isHTMLForm(e)?new FormData(e):e);ce.getAdapter=wa.getAdapter;ce.HttpStatusCode=mr;ce.default=ce;const{Axios:rf,AxiosError:kc,CanceledError:of,isCancel:af,CancelToken:sf,VERSION:lf,all:cf,Cancel:uf,isAxiosError:df,spread:ff,toFormData:hf,AxiosHeaders:pf,HttpStatusCode:mf,formToJSON:gf,getAdapter:vf,mergeConfig:yf}=ce,mn="https://localhost:5043",at=async e=>{var m,y;const{url:t,withToken:n,method:r,body:o,contentType:a,typeToken:s="seller"}=e,i=n?localStorage.getItem("sellerAccessToken"):null,l=n?localStorage.getItem("token"):null,c=s==="seller"?i: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 p=null;switch(r){case"get":p=await ce.get(u?mn:t,{headers:d});break;case"post":p=await ce.post(u?mn:t,o,{headers:d});break;case"put":p=await ce.put(u?mn:t,o,{headers:d});break;case"delete":p=await ce.delete(u?mn:t,{headers:d});break}return{data:p==null?void 0:p.data,status:p==null?void 0:p.status,headers:p==null?void 0:p.headers}}catch(p){const h=p,v=(m=h.response)==null?void 0:m.data;let R="Something Went Wrong";v&&(R=v.errors[0]);const b=(y=h.response)==null?void 0:y.status;if(b===401)try{const L=await Promise.resolve().then(()=>require("./charge-CjJu8ZCC.cjs")).then(_=>_.auth);L&&L.logoutCustomer?await L.logoutCustomer():localStorage.removeItem("token"),window.location.reload()}catch(L){console.error("Failed to import logoutCustomer:",L),localStorage.removeItem("token"),window.location.reload()}const k=new kc(R,(b==null?void 0:b.toString())||"400");throw k.response=h.response,k}},Nc="https://g-api.billgang.com",Tc="https://www.googleapis.com/webfonts/v1/webfonts",_c="https://stores-api.billgang.com",Lc="https://sl-api.billgang.com",Pc="https://customers-api.billgang.com",Oc="https://cashapp-api.billgang.com",Mc={api:Nc,googleFonts:Tc,storeApi:_c,slApi:Lc,customersApi:Pc,cashappApi:Oc},Ac=(e,t="300")=>e==="not found"?"empty":`https://imagedelivery.net/${e}/w=${t}`,Dc=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)},Fc=(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},Ic=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`},Bc=e=>new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),jc=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]},gr=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)},tr="f10120ab-7ebb-4785-b240-7428edaa3c4e",Ht="https://t-api.billgang.com",Ut="https://internal-t-api.antistock.io",Jt="I",Hc=10*1e3,Uc=15*1e3,Vc=15*60*1e3,Ca=()=>{var t;const e=gr(Jt);return((t=e==null?void 0:e.s)==null?void 0:t.i)||null},$c=(e,t="production",n)=>{const{pathname:r}=Qe(),o=we.useRef(),a=we.useRef(document.visibilityState);we.useEffect(()=>{if(!e)return;const s=()=>Date.now(),i=async()=>(await at({url:`${n?Ut:Ht}/${e}/t/p`,method:"post",withToken:!1})).data.data.id,l=async p=>(await at({url:`${n?Ut:Ht}/${e}/t/p/${t==="development"?tr:p}/s`,method:"post",withToken:!1})).data.data.id,c=async(p,h,v,R)=>{const b=t==="development"?tr:p;try{return(await at({url:`${n?Ut:Ht}/${e}/t/p/${b}/s/${h}/e`,method:"post",withToken:!1,body:{url:v,oldEventId:R},contentType:"application/json"})).data.data.id}catch{return h=await l(p),(await at({url:`${n?Ut:Ht}/${e}/t/p/${b}/s/${h}/e`,method:"post",withToken:!1,body:{url:v},contentType:"application/json"})).data.data.id}},u=async(p,h,v)=>{await at({url:`${n?Ut:Ht}/${e}/t/p/${t==="development"?tr:p}/s/${h}/e/${v}/h`,method:"post",withToken:!1});const b=gr(Jt);b&&(b.s.u=s().toString(),b.lu=s().toString(),To(Jt,b))},d=(p,h,v)=>{o.current&&clearInterval(o.current),o.current=setInterval(async()=>{if(document.visibilityState==="visible")try{await u(p,h,v)}catch{await m()}},Hc)},m=async()=>{var R,b,k,L;const p=`${window.location.hostname}${r}`,h=gr(Jt),v=s();try{let _=h==null?void 0:h.p;_||(_=await i());let H=(R=h==null?void 0:h.s)==null?void 0:R.i;const w=Number(((b=h==null?void 0:h.s)==null?void 0:b.u)||((k=h==null?void 0:h.s)==null?void 0:k.c)),P=!H||v-w>Vc;(!H||P)&&(H=await l(_));const G=Number((h==null?void 0:h.lu)||0),B=v-G>Uc,ae=await c(_,H,p,h!=null&&h.l&&!B?h.l:void 0),ee={p:_,s:{i:H,c:((L=h==null?void 0:h.s)==null?void 0:L.c)??v.toString(),u:v.toString()},l:ae,lu:v.toString()};To(Jt,ee),d(_,H,ae)}catch(_){console.error("[TrackingAnalytics] error",_)}};m();const y=()=>{document.visibilityState==="visible"&&a.current!=="visible"&&m(),a.current=document.visibilityState};return document.addEventListener("visibilitychange",y),()=>{o.current&&clearInterval(o.current),document.removeEventListener("visibilitychange",y)}},[r,e,t])},zc={customerEmail:"",recaptcha:"",gateway:"",paymentMethod:"",parts:[],customFields:{},discordSocialConnectId:null,coupon:null,tsId:Ca()};let Tt=null;const _o=localStorage.getItem("token");if(_o)try{Tt=Xo(JSON.parse(_o)||"")}catch{Tt=null}const Jc=ie(e=>({cart:{...zc,customerEmail:Tt?Tt.email:""},products:[],coupon:null,pending:!1,applyCouponPending:!1,customerEmail:Tt?Tt.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}}))})),qc=ie(e=>({page:1,setPage:t=>e(()=>({page:t})),resetPage:()=>e(()=>({page:1}))})),Wc=ie(e=>({discordInfo:null,setDiscordInfo:t=>e(()=>({discordInfo:t}))})),Zc=ie(e=>({subscription:null,setSubscription:t=>e({subscription:t})})),tn=ie(e=>({apiUrls:Mc,setApiUrls:t=>e(()=>({apiUrls:t}))})),xa=ie(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}))})),Gc=ie(e=>({general:null,setGeneral:t=>e(()=>({general:t})),isAntistock:!1,setIsAntistock:t=>e(()=>({isAntistock:t}))})),vr=ie(e=>({settings:null,setSettings:t=>{e(()=>({settings:t}))},isLoadingSettings:!0,setIsLoadingSettings:t=>e(()=>({isLoadingSettings:t}))})),Pn=ie((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 s=JSON.parse(JSON.stringify(t().themeSettings));Pe.getState().addHistory({themeSettings:s});const i={...a.themeSettings.colors,[n]:{...a.themeSettings.colors[n],[r]:o}};return{themeSettings:{...a.themeSettings,colors:i}}}),updateFont:(n,r,o,a,s)=>e(i=>{const l=JSON.parse(JSON.stringify(t().themeSettings));Pe.getState().addHistory({themeSettings:l});const c={...i.themeSettings.fonts,[n]:{...i.themeSettings.fonts[n],[r]:{...i.themeSettings.fonts[n][r],[o]:{...i.themeSettings.fonts[n][r][o],[a]:s}}}};return{themeSettings:{...i.themeSettings,fonts:c}}}),updateFontSizePercentage:(n,r)=>e(o=>{const a=JSON.parse(JSON.stringify(t().themeSettings));Pe.getState().addHistory({themeSettings:a});const s={...o.themeSettings.fonts,[n]:{...o.themeSettings.fonts[n],fontSizePercentage:r}};return{themeSettings:{...o.themeSettings,fonts:s}}}),updateBorder:(n,r)=>e(o=>{const a=JSON.parse(JSON.stringify(t().themeSettings));Pe.getState().addHistory({themeSettings:a});const s={...o.themeSettings.borders,[n]:r};return{themeSettings:{...o.themeSettings,borders:s}}}),updateButton:(n,r,o)=>e(a=>{const s=JSON.parse(JSON.stringify(t().themeSettings));Pe.getState().addHistory({themeSettings:s});const i={...a.themeSettings.buttons[n],[r]:o},l={...a.themeSettings.buttons,[n]:i};return{themeSettings:{...a.themeSettings,buttons:l}}}),updateInput:(n,r,o)=>e(a=>{const s=JSON.parse(JSON.stringify(t().themeSettings));return Pe.getState().addHistory({themeSettings:s}),{themeSettings:{...a.themeSettings,inputs:{...a.themeSettings.inputs,[n]:{...a.themeSettings.inputs[n],[o]:r}}}}}),isLoadingThemeSettings:!1,setIsLoadingThemeSettings:n=>e(()=>({isLoadingThemeSettings:n}))})),Fe=ie(e=>({notifications:[],setNotifications:t=>e(()=>({notifications:t}))})),Kc=ie(e=>({isOpen:!0,setIsOpen:t=>e(()=>({isOpen:t}))}));var Ne=[];for(var nr=0;nr<256;++nr)Ne.push((nr+256).toString(16).slice(1));function Yc(e,t=0){return(Ne[e[t+0]]+Ne[e[t+1]]+Ne[e[t+2]]+Ne[e[t+3]]+"-"+Ne[e[t+4]]+Ne[e[t+5]]+"-"+Ne[e[t+6]]+Ne[e[t+7]]+"-"+Ne[e[t+8]]+Ne[e[t+9]]+"-"+Ne[e[t+10]]+Ne[e[t+11]]+Ne[e[t+12]]+Ne[e[t+13]]+Ne[e[t+14]]+Ne[e[t+15]]).toLowerCase()}var gn,Xc=new Uint8Array(16);function Qc(){if(!gn&&(gn=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!gn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return gn(Xc)}var eu=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Lo={randomUUID:eu};function ot(e,t,n){if(Lo.randomUUID&&!e)return Lo.randomUUID();e=e||{};var r=e.random||(e.rng||Qc)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Yc(r)}function tu(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var a;const s=l=>l===null?null:JSON.parse(l,void 0),i=(a=n.getItem(o))!=null?a:null;return i instanceof Promise?i.then(s):s(i)},setItem:(o,a)=>n.setItem(o,JSON.stringify(a,void 0)),removeItem:o=>n.removeItem(o)}}const yr=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return yr(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return yr(r)(n)}}}},nu=(e,t)=>(n,r,o)=>{let a={storage:tu(()=>localStorage),partialize:h=>h,version:0,merge:(h,v)=>({...v,...h}),...t},s=!1;const i=new Set,l=new Set;let c=a.storage;if(!c)return e((...h)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...h)},r,o);const u=()=>{const h=a.partialize({...r()});return c.setItem(a.name,{state:h,version:a.version})},d=o.setState;o.setState=(h,v)=>{d(h,v),u()};const m=e((...h)=>{n(...h),u()},r,o);o.getInitialState=()=>m;let y;const p=()=>{var h,v;if(!c)return;s=!1,i.forEach(b=>{var k;return b((k=r())!=null?k:m)});const R=((v=a.onRehydrateStorage)==null?void 0:v.call(a,(h=r())!=null?h:m))||void 0;return yr(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 k;const[L,_]=b;if(y=a.merge(_,(k=r())!=null?k:m),n(y,!0),L)return u()}).then(()=>{R==null||R(y,void 0),y=r(),s=!0,l.forEach(b=>b(y))}).catch(b=>{R==null||R(void 0,b)})};return o.persist={setOptions:h=>{a={...a,...h},h.storage&&(c=h.storage)},clearStorage:()=>{c==null||c.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>p(),hasHydrated:()=>s,onHydrate:h=>(i.add(h),()=>{i.delete(h)}),onFinishHydration:h=>(l.add(h),()=>{l.delete(h)})},a.skipHydration||p(),y||m},$n=nu,Kt=ie($n((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 s=t().pages;s[o]=n,e({pages:s})}},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}}})),ru=ie(e=>({isOpenModal:!1,setIsOpenModal:t=>e(()=>({isOpenModal:t}))})),On=ie($n((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&&Pe.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&&Pe.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&&Pe.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:s}=Kt.getState();if(!a||!s||!s[a]||!o[s[a].path]){console.error("Cannot set position: invalid page or block data");return}const i=s[a].path,l=o[i],c=n?l.order.indexOf(n):-1;if(c===-1&&n){console.error(`Block with ID "${n}" not found in page "${i}"`);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));Pe.getState().addHistory({layers:o});const a={...t().blocks},s=a[n]||{data:{},order:[]},i=t().positionBlock,l=ot(),c={name:r.name,value:r.value};return s.data[l]=c,i===null||i>=s.order.length?s.order.push(l):s.order.splice(i,0,l),e({blocks:{...a,[n]:{data:s.data,order:s.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));Pe.getState().addHistory({layers:a});const s=t().blocks,i=s[n]||{};i.data[r]={name:o.name,value:{...o.value}},e({blocks:{...s,[n]:i}})},removeBlock:(n,r)=>{const o=JSON.parse(JSON.stringify(t().blocks));Pe.getState().addHistory({layers:o});const a=JSON.parse(JSON.stringify(t().blocks)),s=a[n];if(!s){console.error(`Page at path "${n}" does not exist.`);return}delete s.data[r],s.order=s.order.filter(i=>i!==r),e({blocks:{...a,[n]:s}}),Fe.getState().setNotifications([...Fe.getState().notifications,{id:ot(),message:"Block successfully deleted",status:"success"}])},moveBlock:(n,r,o)=>e(a=>{const s=JSON.parse(JSON.stringify(t().blocks));if(Pe.getState().addHistory({layers:s}),!a.blocks[n])return console.error(`Path ${n} does not exist in blocks`),a;const i={...a.blocks[n]},l=[...i.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]:{...i,order:l}}}}),duplicateBlock:(n,r)=>{const o=JSON.parse(JSON.stringify(t().blocks));Pe.getState().addHistory({layers:o});const a=JSON.parse(JSON.stringify(t().blocks)),s=a[n];if(!s||!s.data[r]){console.error(`Block with ID "${r}" not found in page "${n}"`);return}const i=ot(),l=s.data[r],c={name:l.name,value:JSON.parse(JSON.stringify({...l.value}))};s.data[i]={...c};const u=s.order.indexOf(r);if(u===-1){console.error(`Block ID "${r}" not found in order array`);return}s.order.splice(u+1,0,i),e({blocks:{...a,[n]:s},currentBlock:i}),Ra.getState().setActiveBlock({id:i,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}}})),Pe=ie((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:s,header:i,footer:l,announcement:c,setBlocks:u,setHeader:d,setFooter:m,setAnnouncement:y}=On.getState(),{themeSettings:p,setThemeSettings:h}=Pn.getState(),v={themeSettings:JSON.parse(JSON.stringify(p)),layers:JSON.parse(JSON.stringify(s)),header:JSON.parse(JSON.stringify(i)),footer:JSON.parse(JSON.stringify(l)),announcement:JSON.parse(JSON.stringify(c))};e({past:a,future:[v,...r]}),o.themeSettings&&h(o.themeSettings),o.layers&&u(o.layers),o.header&&d(o.header,!1),o.footer&&m(o.footer,!1),o.announcement&&y(o.announcement,!1)},redo:()=>{const{past:n,future:r}=t();if(r.length===0)return;const{blocks:o,header:a,footer:s,announcement:i,setBlocks:l,setHeader:c,setFooter:u,setAnnouncement:d}=On.getState(),{themeSettings:m,setThemeSettings:y}=Pn.getState(),p=r[0],h=r.slice(1),v={themeSettings:JSON.parse(JSON.stringify(m)),layers:JSON.parse(JSON.stringify(o)),header:JSON.parse(JSON.stringify(a)),footer:JSON.parse(JSON.stringify(s)),announcement:JSON.parse(JSON.stringify(i))};e({past:[...n,v],future:h}),p.themeSettings&&y(p.themeSettings),p.layers&&l(p.layers),p.header&&c(p.header,!1),p.footer&&u(p.footer,!1),p.announcement&&d(p.announcement,!1)}})),Ra=ie($n(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"}],ou=[{icon:"Desktop",value:"desktop"},{icon:"DeviceTabletCamera",value:"tablet"},{icon:"DeviceMobileCamera",value:"mobile"}],au=[{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)),iu=["/","/reviews","/faqs","/contact","/products","/ticket","/login"],Vt={"/":{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"}},lu=typeof window<"u"&&(window.location.hostname.includes("localhost")||window.location.hostname.includes("192")||window.location.hostname.includes("local-rst.sp-internal.work")),cu={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)"},uu={None:"var(--border-none)",1:"var(--border-sm)",2:"var(--border-md)",4:"var(--border-lg)"},du={"1:1":"1:1","4:3":"4:3","16:9":"16:9","9:16":"9:16"},fu=[{value:"4:3",addon:N.jsx("div",{style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:N.jsx("div",{style:{width:18.5,height:14.5,border:"1.5px solid #252525",borderRadius:3}})})},{value:"16:9",addon:N.jsx("div",{style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:N.jsx("div",{style:{width:20.5,height:12.5,border:"1.5px solid #252525",borderRadius:3}})})},{value:"9:16",addon:N.jsx("div",{style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:N.jsx("div",{style:{width:14.5,height:18.5,border:"1.5px solid #252525",borderRadius:3}})})},{value:"1:1",addon:N.jsx("div",{style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:N.jsx("div",{style:{width:16.5,height:16.5,border:"1.5px solid #252525",borderRadius:3}})})}],hu={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"},pu=ie(e=>({activeBlock:ka[0],setActiveBlock:t=>e(()=>({activeBlock:t}))})),Na=ie(e=>({openModal:!1,setOpenModal:t=>e(()=>({openModal:t})),onChange:null,setOnChange:t=>e(()=>({onChange:t})),tip:"",setTip:t=>e(()=>({tip:t}))})),mu=ie(e=>({error:null,setError:t=>e(()=>({error:t}))})),Ta=ie(e=>({title:null,description:null,onConfirm:null,setTitle:t=>e(()=>({title:t})),setDescription:t=>e(()=>({description:t})),setOnConfirm:t=>e(()=>({onConfirm:t}))}));var gu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var La={exports:{}};/*!
37
37
  Copyright (c) 2018 Jed Watson.
38
38
  Licensed under the MIT License (MIT), see
39
39
  http://jedwatson.github.io/classnames
40
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var a="",s=0;s<arguments.length;s++){var i=arguments[s];i&&(a=o(a,r(i)))}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 s="";for(var i in a)t.call(a,i)&&a[i]&&(s=o(s,i));return s}function o(a,s){return s?a?a+" "+s:a+s:a}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(La);var yu=La.exports;const Be=_a(yu),vu=ie(e=>({currentDevice:{icon:"Desktop",value:"desktop"},setCurrentDevice:t=>e(()=>({currentDevice:t}))}));ie(e=>({pageData:null,setPageData:t=>e(()=>({pageData:t}))}));const Ar=ie((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})}})),Pa=ie($n(e=>({fonts:[],setFonts:t=>e(()=>({fonts:t}))}),{name:"fonts-storage"})),Dr=ie()(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}))})),Oa=ie(e=>({showTooltip:!1,setShowTooltip:t=>e({showTooltip:t})})),wu="_loader_jr7a4_1",bu={loader:wu},Su=()=>N.jsx("div",{className:bu.loader}),Eu="_tooltip_4hruj_1",Cu={tooltip:Eu},xu=e=>{const{text:t}=e,{setShowTooltip:n}=Oa();return we.useEffect(()=>(n(!0),()=>{n(!1)}),[]),N.jsx("div",{className:Cu.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 Ma=(e,t,n,r,o,a,s)=>{const i=e.currentTarget.getBoundingClientRect(),l=window.innerHeight-i.bottom,c=i.top,u=window.innerWidth-i.right,d=i.left;let m,v;return m=i.bottom+r+window.scrollY,v=i.left,(l<t||l<o)&&(c>=t+s?m=i.top-t-r+window.scrollY:m=window.scrollY+s),m-window.scrollY<s&&(m=window.scrollY+s),(u<n||u<a)&&(d>=n?v=i.right-n:v=(window.innerWidth-n)/2),v<i.right+a&&(v=i.right+a),v<i.right&&v+n>i.left&&m<i.bottom&&m+t>i.top&&(u>=n+a?v=i.right+r+a:l>=t?m=i.bottom+r+window.scrollY:(m=window.scrollY+s,v=(window.innerWidth-n)/2)),{top:m,left:v}},Nu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20.25%2015.45V8.55C20.25%206.86984%2020.25%206.02976%2019.923%205.38803C19.6354%204.82354%2019.1765%204.3646%2018.612%204.07698C17.9702%203.75%2017.1302%203.75%2015.45%203.75H8.55C6.86984%203.75%206.02976%203.75%205.38803%204.07698C4.82354%204.3646%204.3646%204.82354%204.07698%205.38803C3.75%206.02976%203.75%206.86984%203.75%208.55V15.45C3.75%2017.1302%203.75%2017.9702%204.07698%2018.612C4.3646%2019.1765%204.82354%2019.6354%205.38803%2019.923C6.02976%2020.25%206.86984%2020.25%208.55%2020.25H15.45C17.1302%2020.25%2017.9702%2020.25%2018.612%2019.923C19.1765%2019.6354%2019.6354%2019.1765%2019.923%2018.612C20.25%2017.9702%2020.25%2017.1302%2020.25%2015.45Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Tu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.0002%2012V20.5M12.0002%2012L4.5%207.78125M12.0002%2012L19.2627%207.91474M20.25%209.11392V14.8861C20.25%2015.9699%2019.6654%2016.9695%2018.7208%2017.5008L13.4708%2020.4539C12.5575%2020.9676%2011.4425%2020.9676%2010.5292%2020.4539L5.27922%2017.5008C4.33459%2016.9695%203.75%2015.9699%203.75%2014.8861V9.11392C3.75%208.0301%204.33459%207.03055%205.27922%206.49919L10.5292%203.54607C11.4425%203.03237%2012.5575%203.03237%2013.4708%203.54607L18.7208%206.4992C19.6654%207.03055%2020.25%208.0301%2020.25%209.11392Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",_u="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.25%2020.25H6.75C5.09315%2020.25%203.75%2018.9069%203.75%2017.25V15.75M15.75%2020.25H17.25C18.9069%2020.25%2020.25%2018.9069%2020.25%2017.25V15.75M3.75%208.25V6.75C3.75%205.09315%205.09315%203.75%206.75%203.75H8.25M15.75%203.75H17.25C18.9069%203.75%2020.25%205.09315%2020.25%206.75V8.25M15.25%2010.3571L12%2011.9999M12%2011.9999L8.75%2010.3571M12%2011.9999V15.2856M11.0077%208.28125L9.25772%209.28125C8.63457%209.63733%208.25%2010.3%208.25%2011.0177V12.9822C8.25%2013.6999%208.63457%2014.3626%209.25772%2014.7186L11.0077%2015.7186C11.6226%2016.07%2012.3774%2016.07%2012.9923%2015.7186L14.7423%2014.7186C15.3654%2014.3626%2015.75%2013.6999%2015.75%2012.9822V11.0177C15.75%2010.3%2015.3654%209.63733%2014.7423%209.28125L12.9923%208.28125C12.3774%207.9299%2011.6226%207.9299%2011.0077%208.28125Z'%20stroke='%23252525'%20stroke-width='1.40625'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Lu="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.125%203.125H16.875'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.9167%205.625C12.1113%205.625%2011.4583%206.27792%2011.4583%207.08333V12.0833C11.4583%2012.8887%2012.1113%2013.5417%2012.9167%2013.5417C13.7221%2013.5417%2014.375%2012.8887%2014.375%2012.0833V7.08333C14.375%206.27792%2013.7221%205.625%2012.9167%205.625Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.08333%205.625C6.27792%205.625%205.625%206.27792%205.625%207.08333V15.4167C5.625%2016.2221%206.27792%2016.875%207.08333%2016.875C7.88875%2016.875%208.54167%2016.2221%208.54167%2015.4167V7.08333C8.54167%206.27792%207.88875%205.625%207.08333%205.625Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Pu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.1073%2017.1577C17.1073%2018.8655%2015.7213%2020.25%2014.0116%2020.25C12.3019%2020.25%2010.9159%2018.8655%2010.9159%2017.1577C10.9159%2015.4499%2012.3019%2014.0654%2014.0116%2014.0654C15.7213%2014.0654%2017.1073%2015.4499%2017.1073%2017.1577Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linejoin='round'/%3e%3cpath%20d='M4.99145%206.98598L10.4681%2011.5764L3.75%2014.0189L4.99145%206.98598Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linejoin='round'/%3e%3cpath%20d='M14.0106%204.46532C14.1536%203.9321%2014.7017%203.61567%2015.235%203.75841L19.2835%204.842C19.8172%204.98485%2020.1339%205.53345%2019.9908%206.06708L18.9065%2010.1093C18.7635%2010.6425%2018.2154%2010.9589%2017.6821%2010.8162L13.6336%209.73258C13.0999%209.58973%2012.7832%209.04113%2012.9263%208.50749L14.0106%204.46532Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linejoin='round'/%3e%3c/svg%3e",Ou="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.25%2014.75H10C10%2014.3358%209.66421%2014%209.25%2014V14.75ZM3.75%2020.25H3V21H3.75V20.25ZM14.75%209.25H15.5C15.5%208.83579%2015.1642%208.5%2014.75%208.5V9.25ZM20.25%2020.25V21H21V20.25H20.25ZM1.75%2019.5C1.33579%2019.5%201%2019.8358%201%2020.25C1%2020.6642%201.33579%2021%201.75%2021V19.5ZM22.25%2021C22.6642%2021%2023%2020.6642%2023%2020.25C23%2019.8358%2022.6642%2019.5%2022.25%2019.5V21ZM5.25%2015.5H9.25V14H5.25V15.5ZM8.5%2014.75V20.25H10V14.75H8.5ZM9.25%2019.5H3.75V21H9.25V19.5ZM4.5%2020.25V16.25H3V20.25H4.5ZM5.25%2014C4.00736%2014%203%2015.0074%203%2016.25H4.5C4.5%2015.8358%204.83579%2015.5%205.25%2015.5V14ZM10.75%2010H14.75V8.5H10.75V10ZM14%209.25V20.25H15.5V9.25H14ZM14.75%2019.5H9.25V21H14.75V19.5ZM10%2020.25V10.75H8.5V20.25H10ZM10.75%208.5C9.50736%208.5%208.5%209.50736%208.5%2010.75H10C10%2010.3358%2010.3358%2010%2010.75%2010V8.5ZM16.25%204.5H18.75V3H16.25V4.5ZM19.5%205.25V20.25H21V5.25H19.5ZM20.25%2019.5H14.75V21H20.25V19.5ZM15.5%2020.25V5.25H14V20.25H15.5ZM18.75%204.5C19.1642%204.5%2019.5%204.83579%2019.5%205.25H21C21%204.00736%2019.9926%203%2018.75%203V4.5ZM16.25%203C15.0074%203%2014%204.00736%2014%205.25H15.5C15.5%204.83579%2015.8358%204.5%2016.25%204.5V3ZM1.75%2021H22.25V19.5H1.75V21Z'%20fill='%23252525'/%3e%3c/svg%3e",Mu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4%2014.2105L6.84488%2012.0821C7.66137%2011.5378%208.75215%2011.6663%209.41987%2012.3853C10.9123%2013.9926%2012.6426%2015.4538%2015%2015.4538C17.1727%2015.4538%2018.6125%2014.6485%2020%2013.261M6.75%2020.25H17.25C18.9069%2020.25%2020.25%2018.9069%2020.25%2017.25V6.75C20.25%205.09315%2018.9069%203.75%2017.25%203.75H6.75C5.09315%203.75%203.75%205.09315%203.75%206.75V17.25C3.75%2018.9069%205.09315%2020.25%206.75%2020.25ZM17.25%208.75C17.25%209.85457%2016.3546%2010.75%2015.25%2010.75C14.1454%2010.75%2013.25%209.85457%2013.25%208.75C13.25%207.64543%2014.1454%206.75%2015.25%206.75C16.3546%206.75%2017.25%207.64543%2017.25%208.75Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3c/svg%3e",Au="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.252%2019.25H6.74803C5.26465%2019.25%204.29985%2017.6884%204.96324%2016.3611L10.2152%205.85345C10.9506%204.38218%2013.0494%204.38218%2013.7848%205.85345L19.0368%2016.3611C19.7001%2017.6884%2018.7354%2019.25%2017.252%2019.25Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linejoin='round'/%3e%3c/svg%3e",Du="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11%202.75V4.5M16.9069%205.09326L15.5962%206.40392M6.40381%2015.5962L5.09315%2016.9069M4.5%2011H2.75M6.40381%206.40381L5.09315%205.09315M14.1323%2020.999L10.5777%2011.3226C10.3542%2010.7143%2010.9552%2010.1281%2011.5577%2010.3666L21.0397%2014.1199C21.4283%2014.2737%2021.4679%2014.8081%2021.1062%2015.0175L17.4231%2017.1498C17.3097%2017.2155%2017.2155%2017.3097%2017.1498%2017.4231L15.0343%2021.0771C14.822%2021.4438%2014.2784%2021.3967%2014.1323%2020.999Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Fu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.38803%2019.923L5.72852%2019.2548H5.72852L5.38803%2019.923ZM4.07698%2018.612L3.40873%2018.9525H3.40873L4.07698%2018.612ZM19.923%2018.612L19.2548%2018.2715V18.2715L19.923%2018.612ZM18.612%2019.923L18.2715%2019.2548H18.2715L18.612%2019.923ZM19.923%205.38803L19.2548%205.72852V5.72852L19.923%205.38803ZM18.612%204.07698L18.9525%203.40873V3.40873L18.612%204.07698ZM4.07698%205.38803L4.74524%205.72852L4.07698%205.38803ZM5.38803%204.07698L5.72852%204.74524L5.38803%204.07698ZM19.5%208.55V15.45H21V8.55H19.5ZM15.45%2019.5H8.55V21H15.45V19.5ZM4.5%2015.45V8.55H3V15.45H4.5ZM8.55%204.5H15.45V3H8.55V4.5ZM8.55%2019.5C7.69755%2019.5%207.10331%2019.4994%206.64068%2019.4616C6.1868%2019.4245%205.92604%2019.3554%205.72852%2019.2548L5.04754%2020.5913C5.49175%2020.8176%205.97189%2020.912%206.51853%2020.9566C7.05641%2021.0006%207.7223%2021%208.55%2021V19.5ZM3%2015.45C3%2016.2777%202.99942%2016.9436%203.04336%2017.4815C3.08803%2018.0281%203.18238%2018.5082%203.40873%2018.9525L4.74524%2018.2715C4.6446%2018.074%204.57546%2017.8132%204.53838%2017.3593C4.50058%2016.8967%204.5%2016.3025%204.5%2015.45H3ZM5.72852%2019.2548C5.30516%2019.039%204.96095%2018.6948%204.74524%2018.2715L3.40873%2018.9525C3.76825%2019.6581%204.34193%2020.2317%205.04754%2020.5913L5.72852%2019.2548ZM19.5%2015.45C19.5%2016.3025%2019.4994%2016.8967%2019.4616%2017.3593C19.4245%2017.8132%2019.3554%2018.074%2019.2548%2018.2715L20.5913%2018.9525C20.8176%2018.5082%2020.912%2018.0281%2020.9566%2017.4815C21.0006%2016.9436%2021%2016.2777%2021%2015.45H19.5ZM15.45%2021C16.2777%2021%2016.9436%2021.0006%2017.4815%2020.9566C18.0281%2020.912%2018.5082%2020.8176%2018.9525%2020.5913L18.2715%2019.2548C18.074%2019.3554%2017.8132%2019.4245%2017.3593%2019.4616C16.8967%2019.4994%2016.3025%2019.5%2015.45%2019.5V21ZM19.2548%2018.2715C19.0391%2018.6948%2018.6948%2019.039%2018.2715%2019.2548L18.9525%2020.5913C19.6581%2020.2317%2020.2318%2019.6581%2020.5913%2018.9525L19.2548%2018.2715ZM21%208.55C21%207.7223%2021.0006%207.05641%2020.9566%206.51853C20.912%205.97189%2020.8176%205.49175%2020.5913%205.04754L19.2548%205.72852C19.3554%205.92604%2019.4245%206.1868%2019.4616%206.64068C19.4994%207.10331%2019.5%207.69755%2019.5%208.55H21ZM15.45%204.5C16.3025%204.5%2016.8967%204.50058%2017.3593%204.53838C17.8132%204.57546%2018.074%204.6446%2018.2715%204.74524L18.9525%203.40873C18.5082%203.18238%2018.0281%203.08803%2017.4815%203.04336C16.9436%202.99942%2016.2777%203%2015.45%203V4.5ZM20.5913%205.04754C20.2318%204.34193%2019.6581%203.76825%2018.9525%203.40873L18.2715%204.74524C18.6948%204.96095%2019.0391%205.30516%2019.2548%205.72852L20.5913%205.04754ZM4.5%208.55C4.5%207.69755%204.50058%207.10331%204.53838%206.64068C4.57546%206.1868%204.6446%205.92604%204.74524%205.72852L3.40873%205.04754C3.18238%205.49175%203.08803%205.97189%203.04336%206.51853C2.99942%207.05641%203%207.7223%203%208.55H4.5ZM8.55%203C7.7223%203%207.05641%202.99942%206.51853%203.04336C5.97189%203.08803%205.49175%203.18238%205.04754%203.40873L5.72852%204.74524C5.92604%204.6446%206.1868%204.57546%206.64068%204.53838C7.10331%204.50058%207.69755%204.5%208.55%204.5V3ZM4.74524%205.72852C4.96095%205.30516%205.30516%204.96095%205.72852%204.74524L5.04754%203.40873C4.34193%203.76825%203.76825%204.34193%203.40873%205.04754L4.74524%205.72852Z'%20fill='%23252525'/%3e%3cpath%20d='M20.25%2015H21V13.5H20.25V15ZM3.75%2013.5H3V15H3.75V13.5ZM3.75%2015H20.25V13.5H3.75V15Z'%20fill='%23252525'/%3e%3c/svg%3e",Iu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.0858%202.32272C11.4533%201.55909%2012.5467%201.55909%2012.9142%202.32272L15.0872%206.83907C15.2351%207.14651%2015.5293%207.35876%2015.8692%207.40319L20.8676%208.05664C21.7134%208.16721%2022.0517%209.20388%2021.4322%209.78704L17.779%2013.2263C17.5295%2013.4612%2017.4167%2013.8058%2017.4795%2014.1417L18.3971%2019.0563C18.5526%2019.8892%2017.6676%2020.5294%2016.9183%2020.1261L12.4825%2017.7385C12.1815%2017.5764%2011.8185%2017.5764%2011.5175%2017.7385L7.08174%2020.1261C6.33244%2020.5294%205.44743%2019.8892%205.60294%2019.0563L6.52054%2014.1417C6.58325%2013.8058%206.47048%2013.4612%206.22097%2013.2263L2.56776%209.78704C1.94833%209.20388%202.28661%208.16721%203.13241%208.05664L8.13078%207.40319C8.47066%207.35876%208.7649%207.14651%208.91282%206.83907L11.0858%202.32272Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Bu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.25%204.75H5.75C4.09315%204.75%202.75%206.09315%202.75%207.75V8.25M17.75%204.75H18.25C19.9069%204.75%2021.25%206.09315%2021.25%207.75V8.25M21.25%2015.75V16.25C21.25%2017.9069%2019.9069%2019.25%2018.25%2019.25H17.75M6.25%2019.25H5.75C4.09315%2019.25%202.75%2017.9069%202.75%2016.25V15.75'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.75%209.75H16.25'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.75%2014.25H14.25'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",ju="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20.25%2010.75V6.75C20.25%205.09315%2018.9069%203.75%2017.25%203.75H6.75C5.09315%203.75%203.75%205.09315%203.75%206.75V17.25C3.75%2018.9069%205.09315%2020.25%206.75%2020.25H10.75M14.1879%2020.8366L12.0869%2013.0056C11.9372%2012.4478%2012.4478%2011.9372%2013.0056%2012.0869L20.8366%2014.1879C21.2665%2014.3032%2021.3428%2014.8805%2020.9576%2015.1035L17.4231%2017.1498C17.3097%2017.2155%2017.2155%2017.3097%2017.1498%2017.4231L15.1035%2020.9576C14.8805%2021.3428%2014.3032%2021.2665%2014.1879%2020.8366Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Hu="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.125%2016.875H16.875'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.9167%206.45833C12.1113%206.45833%2011.4583%207.11125%2011.4583%207.91667V12.9167C11.4583%2013.7221%2012.1113%2014.375%2012.9167%2014.375C13.7221%2014.375%2014.375%2013.7221%2014.375%2012.9167V7.91667C14.375%207.11125%2013.7221%206.45833%2012.9167%206.45833Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.08333%203.125C6.27792%203.125%205.625%203.77792%205.625%204.58333V12.9167C5.625%2013.7221%206.27792%2014.375%207.08333%2014.375C7.88875%2014.375%208.54167%2013.7221%208.54167%2012.9167V4.58333C8.54167%203.77792%207.88875%203.125%207.08333%203.125Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Uu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.75%2018.25H7.25M3.75%2012H9.25M3.75%205.75H20.25M17%2010.5L18.5%2013.5L21.5%2015L18.5%2016.5L17%2019.5L15.5%2016.5L12.5%2015L15.5%2013.5L17%2010.5Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Vu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M19.9016%209.48786L10.3899%203.2788C8.39443%201.97623%205.75%203.40798%205.75%205.79094V18.2091C5.75%2020.592%208.39442%2022.0238%2010.3899%2020.7212L19.9016%2014.5121C21.7151%2013.3283%2021.7151%2010.6717%2019.9016%209.48786Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linejoin='round'/%3e%3c/svg%3e",$u={Header:Lu,Announcement:Uu,PrimaryHero:ju,ProductHero:Nu,Items:Tu,FeaturedItems:_u,Content:Pu,Stats:Ou,ImageGallery:Mu,Logos:Au,CTA:Du,FAQ:Fu,Reviews:Iu,ContactUs:Bu,Footer:Hu,Video:Vu},zu="_wrapper_1k1cr_1",Ju="_submodal_1k1cr_14",wr={wrapper:zu,submodal:Ju},qu=({children:e,positionTop:t,positionLeft:n})=>{const{keyBlock:r,startHideTimeout:o,clearHideTimeout:a,setMouseOverModal:s}=Ar();return r?N.jsx("div",{className:wr.wrapper,style:t?{top:t,left:n||void 0}:{},onMouseEnter:()=>{a(),s(!0)},onMouseLeave:()=>{s(!1),o()},children:e}):null},Wu=({children:e})=>{const{hoverBlockId:t,startHideTimeout:n,clearHideTimeout:r,setMouseOverModal:o}=Ar();return t?N.jsx("div",{className:Be(wr.wrapper,wr.submodal),onMouseEnter:()=>{r(),o(!0)},onMouseLeave:()=>{o(!1),n()},children:e}):null},Zu="_applyButton_1a9kh_2",Gu="_content_1a9kh_7",Ku="_title_1a9kh_14",Yu="_label_1a9kh_21",Xu="_colorValue_1a9kh_40",Qu="_colorMap_1a9kh_48",ed="_indicator_1a9kh_57",td="_hueSlider_1a9kh_66",nd="_slider_1a9kh_97",rd="_buttons_1a9kh_102",od="_name_1a9kh_109",ad="_secondary_1a9kh_114",sd="_input_1a9kh_122",id="_modal_1a9kh_160",ld="_alphaSlider_1a9kh_249",cd="_alphaBackground_1a9kh_257",ud="_alphaGradient_1a9kh_268",dd="_chargeTypes_1a9kh_297",fd="_charge_1a9kh_297",hd="_chargeActive_1a9kh_326",pd="_gradient_1a9kh_334",md="_color_1a9kh_40",gd="_colorActive_1a9kh_355",yd="_gradientWrapper_1a9kh_362",vd="_subtitle_1a9kh_368",wd="_colorTypes_1a9kh_375",bd="_colorType_1a9kh_375",Sd="_colorTypeActive_1a9kh_399",Ed="_colorsWrapper_1a9kh_404",Cd="_colors_1a9kh_404",W={applyButton:Zu,content:Gu,title:Ku,label:Yu,colorValue:Xu,colorMap:Qu,indicator:ed,hueSlider:td,slider:nd,buttons:rd,name:od,secondary:ad,input:sd,modal:id,alphaSlider:ld,alphaBackground:cd,alphaGradient:ud,chargeTypes:dd,charge:fd,chargeActive:hd,gradient:pd,color:md,colorActive:gd,gradientWrapper:yd,subtitle:vd,colorTypes:wd,colorType:bd,colorTypeActive:Sd,colorsWrapper:Ed,colors:Cd};function rr(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 Aa=e=>{const{initialColor:t,onChange:n,title:r,labelStyle:o="primary",isGradientActive:a=!0,isBlockSettings:s}=e,[i,l]=we.useState(t);we.useEffect(()=>{l(t)},[t]);const{setActiveLabel:c,setModalPosition:u,setInitialColor:d,setShowModal:m,setUpdate:v,setColor:p,setColorChange:h,setIsGradientActive:y,colorChange:R}=Dr();we.useEffect(()=>{const _=()=>{m(!1),c(null),d(t),v(()=>{}),p(t),h(()=>{})};return document.body.addEventListener("click",_),()=>{document.body.removeEventListener("click",_)}},[t]);const b=_=>{_.stopPropagation(),m(!0),h(l),v(n),d(t),p(i),y(a);const{top:H,left:w}=Ma(_,600,288,10,20,230,80);u({top:H,left:w})},k=_=>{const H=_.target.value;l(H),rr(H)&&(n(H),p(H),h(R))},L=()=>{rr(i)||l(t)};return N.jsxs("div",{className:W.content,children:[N.jsx("span",{className:Be(W.name,{[W.secondary]:o==="secondary"}),children:r}),N.jsxs("label",{className:W.label,onClick:_=>_.stopPropagation(),children:[N.jsx("div",{className:W.colorValue,style:{background:rr(i)?i:t},onClick:s?void 0:b}),N.jsx("input",{type:"text",value:i.includes("linear-gradient")?i:i.toUpperCase(),onChange:k,onBlur:L,className:W.input,style:{textTransform:i.includes("linear-gradient")?"none":"uppercase"}})]})]})},xd=()=>{const{modalPosition:e,color:t,initialColor:n,setShowModal:r,hue:o,saturation:a,brightness:s,alpha:i,dragging:l,setDragging:c,setHue:u,setSaturation:d,setBrightness:m,setAlpha:v,colorChange:p,setColor:h,update:y,isGradient:R,setIsGradient:b,gradientDirection:k,setGradientDirection:L,hue2:_,saturation2:H,brightness2:w,alpha2:P,setHue2:G,setSaturation2:B,setBrightness2:ae,setAlpha2:ee,activeColorIndex:te,setActiveColorIndex:he,isGradientActive:Oe,isBlockSettings:_e}=Dr(),We=(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))),q=Math.round(255*K(5)),re=Math.round(255*K(3)),Z=Math.round(255*K(1));return{r:q,g:re,b:Z}},ue=V=>V.toString(16).padStart(2,"0"),Re=(V,U,ne,z)=>{const{r:K,g:q,b:re}=We(V,U,ne),Z=Math.round(z/100*255);return`#${ue(K)}${ue(q)}${ue(re)}${ue(Z)}`},Ee=(V,U,ne,z)=>{if(R)if(te===1){u(V),d(U),m(ne),v(z);const K=Re(V,U,ne,z),q=Re(_,H,w,P),Z=`linear-gradient(${k==="vertical"?"0deg":"90deg"}, ${K} 0%, ${q} 100%)`;p(Z),h(Z)}else{G(V),B(U),ae(ne),ee(z);const K=Re(V,U,ne,z),q=Re(o,a,s,i),Z=`linear-gradient(${k==="vertical"?"0deg":"90deg"}, ${q} 0%, ${K} 100%)`;p(Z),h(Z)}else{const K=Re(V,U,ne,z);p(K),h(K)}},be=(V,U,ne)=>{const{width:z,height:K}=ne.getBoundingClientRect(),q=Math.max(0,Math.min(V/z*100,100)),re=Math.max(0,Math.min(100-U/K*100,100));R?te===1?(d(q),m(re),Ee(o,q,re,i)):(B(q),ae(re),Ee(_,q,re,P)):(d(q),m(re),Ee(o,q,re,i))},Le=V=>{const{offsetX:U,offsetY:ne}=V.nativeEvent;c(!0),be(U,ne,V.currentTarget)},Ue=V=>{if(l){const U=document.querySelector(`.${W.colorMap}`),{left:ne,top:z}=U.getBoundingClientRect(),K=V.clientX-ne,q=V.clientY-z;be(K,q,U)}},se=()=>{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%\)/,q=z.match(K);if(q){const re=q[1],Z=q[2],de=q[3];return{angle:re,col1:Z,col2:de}}return null}function U(z){const K=parseInt(z.slice(1,3),16),q=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,q,re);return{h:de,s:tt,b:ht,a:Z}}function ne(z,K,q){z/=255,K/=255,q/=255;const re=Math.max(z,K,q),Z=Math.min(z,K,q);let de=0;const tt=re-Z,ht=(re===0?0:tt/re)*100,Ge=re*100;if(re===Z)de=0;else switch(re){case z:de=((K-q)/tt+(K<q?6:0))*60;break;case K:de=((q-z)/tt+2)*60;break;case q:de=((z-K)/tt+4)*60;break}return{h:de,s:ht,b:Ge}}if(n&&n.startsWith("linear-gradient")){const z=V(n);if(z){const{angle:K,col1:q,col2:re}=z,Z=U(q),de=U(re);b(!0),L(K==="0deg"?"vertical":"horizontal"),u(Z.h),d(Z.s),m(Z.b),v(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),q=U(K);b(!1),u(q.h),d(q.s),m(q.b),v(q.a)}},[n,b,L,u,d,m,v,G,B,ae,ee,he]),we.useEffect(()=>{let V,U,ne,z;R?te===1?(V=o,U=a,ne=s,z=i):(V=_,U=H,ne=w,z=P):(V=o,U=a,ne=s,z=i),Ee(V,U,ne,z)},[R,k,te,o,a,s,i,_,H,w,P]),we.useEffect(()=>{const V=ne=>Ue(ne),U=()=>se();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,R,k]);function pe(){if(!R)y(t);else{const V=Re(o,a,s,i),U=Re(_,H,w,P),z=`linear-gradient(${k==="vertical"?"0deg":"90deg"}, ${V} 0%, ${U} 100%)`;y(z)}r(!1)}function Me(){r(!1),p(n)}const Ce=R?te===1?o:_:o,ft=R?te===1?a:H:a,nn=R?te===1?s:w:s,zn=R?te===1?i:P:i,{r:rn,g:xe,b:et}=We(Ce,ft,nn),on=`linear-gradient(to right, rgba(${rn}, ${xe}, ${et}, 0), rgba(${rn}, ${xe}, ${et}, 1))`,an=Re(o,a,s,i),Ze=Re(_,H,w,P);return N.jsxs("div",{className:W.modal,onClick:V=>V.stopPropagation(),style:{top:`${e.top}px`,left:`${e.left}px`},children:[N.jsx("h2",{className:W.title,children:"Color"}),Oe&&N.jsxs("div",{className:W.colorTypes,children:[N.jsxs("div",{className:Be(W.colorType,{[W.colorTypeActive]:!R}),onClick:()=>b(!1),children:[N.jsx("div",{style:{background:"#757575",width:"16px",height:"16px",borderRadius:"50%"}}),"Solid"]}),N.jsxs("div",{className:Be(W.colorType,{[W.colorTypeActive]:R}),onClick:()=>b(!0),children:[N.jsx("div",{style:{background:"linear-gradient(to bottom, #757575 0%, #DBDBDB 100%)",width:"16px",height:"16px",borderRadius:"50%"}}),"Linear"]})]}),R&&Oe&&N.jsxs("div",{className:W.colorsWrapper,children:[N.jsx("div",{className:W.colors,style:{background:`linear-gradient(90deg, ${an} 0%, ${Ze} 100%)`}}),N.jsx("div",{className:Be(W.color,{[W.colorActive]:te===1}),onClick:()=>he(1),style:{background:an}}),N.jsx("div",{className:Be(W.color,{[W.colorActive]:te===2}),onClick:()=>he(2),style:{background:Ze}})]}),N.jsx("div",{className:W.colorMap,onMouseDown:Le,style:{background:`
40
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var a="",s=0;s<arguments.length;s++){var i=arguments[s];i&&(a=o(a,r(i)))}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 s="";for(var i in a)t.call(a,i)&&a[i]&&(s=o(s,i));return s}function o(a,s){return s?a?a+" "+s:a+s:a}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(La);var vu=La.exports;const Be=_a(vu),yu=ie(e=>({currentDevice:{icon:"Desktop",value:"desktop"},setCurrentDevice:t=>e(()=>({currentDevice:t}))}));ie(e=>({pageData:null,setPageData:t=>e(()=>({pageData:t}))}));const Ar=ie((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})}})),Pa=ie($n(e=>({fonts:[],setFonts:t=>e(()=>({fonts:t}))}),{name:"fonts-storage"})),Dr=ie()(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}))})),Oa=ie(e=>({showTooltip:!1,setShowTooltip:t=>e({showTooltip:t})})),wu="_loader_jr7a4_1",bu={loader:wu},Su=()=>N.jsx("div",{className:bu.loader}),Eu="_tooltip_4hruj_1",Cu={tooltip:Eu},xu=e=>{const{text:t}=e,{setShowTooltip:n}=Oa();return we.useEffect(()=>(n(!0),()=>{n(!1)}),[]),N.jsx("div",{className:Cu.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 Ma=(e,t,n,r,o,a,s)=>{const i=e.currentTarget.getBoundingClientRect(),l=window.innerHeight-i.bottom,c=i.top,u=window.innerWidth-i.right,d=i.left;let m,y;return m=i.bottom+r+window.scrollY,y=i.left,(l<t||l<o)&&(c>=t+s?m=i.top-t-r+window.scrollY:m=window.scrollY+s),m-window.scrollY<s&&(m=window.scrollY+s),(u<n||u<a)&&(d>=n?y=i.right-n:y=(window.innerWidth-n)/2),y<i.right+a&&(y=i.right+a),y<i.right&&y+n>i.left&&m<i.bottom&&m+t>i.top&&(u>=n+a?y=i.right+r+a:l>=t?m=i.bottom+r+window.scrollY:(m=window.scrollY+s,y=(window.innerWidth-n)/2)),{top:m,left:y}},Nu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20.25%2015.45V8.55C20.25%206.86984%2020.25%206.02976%2019.923%205.38803C19.6354%204.82354%2019.1765%204.3646%2018.612%204.07698C17.9702%203.75%2017.1302%203.75%2015.45%203.75H8.55C6.86984%203.75%206.02976%203.75%205.38803%204.07698C4.82354%204.3646%204.3646%204.82354%204.07698%205.38803C3.75%206.02976%203.75%206.86984%203.75%208.55V15.45C3.75%2017.1302%203.75%2017.9702%204.07698%2018.612C4.3646%2019.1765%204.82354%2019.6354%205.38803%2019.923C6.02976%2020.25%206.86984%2020.25%208.55%2020.25H15.45C17.1302%2020.25%2017.9702%2020.25%2018.612%2019.923C19.1765%2019.6354%2019.6354%2019.1765%2019.923%2018.612C20.25%2017.9702%2020.25%2017.1302%2020.25%2015.45Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Tu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.0002%2012V20.5M12.0002%2012L4.5%207.78125M12.0002%2012L19.2627%207.91474M20.25%209.11392V14.8861C20.25%2015.9699%2019.6654%2016.9695%2018.7208%2017.5008L13.4708%2020.4539C12.5575%2020.9676%2011.4425%2020.9676%2010.5292%2020.4539L5.27922%2017.5008C4.33459%2016.9695%203.75%2015.9699%203.75%2014.8861V9.11392C3.75%208.0301%204.33459%207.03055%205.27922%206.49919L10.5292%203.54607C11.4425%203.03237%2012.5575%203.03237%2013.4708%203.54607L18.7208%206.4992C19.6654%207.03055%2020.25%208.0301%2020.25%209.11392Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",_u="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.25%2020.25H6.75C5.09315%2020.25%203.75%2018.9069%203.75%2017.25V15.75M15.75%2020.25H17.25C18.9069%2020.25%2020.25%2018.9069%2020.25%2017.25V15.75M3.75%208.25V6.75C3.75%205.09315%205.09315%203.75%206.75%203.75H8.25M15.75%203.75H17.25C18.9069%203.75%2020.25%205.09315%2020.25%206.75V8.25M15.25%2010.3571L12%2011.9999M12%2011.9999L8.75%2010.3571M12%2011.9999V15.2856M11.0077%208.28125L9.25772%209.28125C8.63457%209.63733%208.25%2010.3%208.25%2011.0177V12.9822C8.25%2013.6999%208.63457%2014.3626%209.25772%2014.7186L11.0077%2015.7186C11.6226%2016.07%2012.3774%2016.07%2012.9923%2015.7186L14.7423%2014.7186C15.3654%2014.3626%2015.75%2013.6999%2015.75%2012.9822V11.0177C15.75%2010.3%2015.3654%209.63733%2014.7423%209.28125L12.9923%208.28125C12.3774%207.9299%2011.6226%207.9299%2011.0077%208.28125Z'%20stroke='%23252525'%20stroke-width='1.40625'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Lu="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.125%203.125H16.875'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.9167%205.625C12.1113%205.625%2011.4583%206.27792%2011.4583%207.08333V12.0833C11.4583%2012.8887%2012.1113%2013.5417%2012.9167%2013.5417C13.7221%2013.5417%2014.375%2012.8887%2014.375%2012.0833V7.08333C14.375%206.27792%2013.7221%205.625%2012.9167%205.625Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.08333%205.625C6.27792%205.625%205.625%206.27792%205.625%207.08333V15.4167C5.625%2016.2221%206.27792%2016.875%207.08333%2016.875C7.88875%2016.875%208.54167%2016.2221%208.54167%2015.4167V7.08333C8.54167%206.27792%207.88875%205.625%207.08333%205.625Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Pu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.1073%2017.1577C17.1073%2018.8655%2015.7213%2020.25%2014.0116%2020.25C12.3019%2020.25%2010.9159%2018.8655%2010.9159%2017.1577C10.9159%2015.4499%2012.3019%2014.0654%2014.0116%2014.0654C15.7213%2014.0654%2017.1073%2015.4499%2017.1073%2017.1577Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linejoin='round'/%3e%3cpath%20d='M4.99145%206.98598L10.4681%2011.5764L3.75%2014.0189L4.99145%206.98598Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linejoin='round'/%3e%3cpath%20d='M14.0106%204.46532C14.1536%203.9321%2014.7017%203.61567%2015.235%203.75841L19.2835%204.842C19.8172%204.98485%2020.1339%205.53345%2019.9908%206.06708L18.9065%2010.1093C18.7635%2010.6425%2018.2154%2010.9589%2017.6821%2010.8162L13.6336%209.73258C13.0999%209.58973%2012.7832%209.04113%2012.9263%208.50749L14.0106%204.46532Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linejoin='round'/%3e%3c/svg%3e",Ou="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.25%2014.75H10C10%2014.3358%209.66421%2014%209.25%2014V14.75ZM3.75%2020.25H3V21H3.75V20.25ZM14.75%209.25H15.5C15.5%208.83579%2015.1642%208.5%2014.75%208.5V9.25ZM20.25%2020.25V21H21V20.25H20.25ZM1.75%2019.5C1.33579%2019.5%201%2019.8358%201%2020.25C1%2020.6642%201.33579%2021%201.75%2021V19.5ZM22.25%2021C22.6642%2021%2023%2020.6642%2023%2020.25C23%2019.8358%2022.6642%2019.5%2022.25%2019.5V21ZM5.25%2015.5H9.25V14H5.25V15.5ZM8.5%2014.75V20.25H10V14.75H8.5ZM9.25%2019.5H3.75V21H9.25V19.5ZM4.5%2020.25V16.25H3V20.25H4.5ZM5.25%2014C4.00736%2014%203%2015.0074%203%2016.25H4.5C4.5%2015.8358%204.83579%2015.5%205.25%2015.5V14ZM10.75%2010H14.75V8.5H10.75V10ZM14%209.25V20.25H15.5V9.25H14ZM14.75%2019.5H9.25V21H14.75V19.5ZM10%2020.25V10.75H8.5V20.25H10ZM10.75%208.5C9.50736%208.5%208.5%209.50736%208.5%2010.75H10C10%2010.3358%2010.3358%2010%2010.75%2010V8.5ZM16.25%204.5H18.75V3H16.25V4.5ZM19.5%205.25V20.25H21V5.25H19.5ZM20.25%2019.5H14.75V21H20.25V19.5ZM15.5%2020.25V5.25H14V20.25H15.5ZM18.75%204.5C19.1642%204.5%2019.5%204.83579%2019.5%205.25H21C21%204.00736%2019.9926%203%2018.75%203V4.5ZM16.25%203C15.0074%203%2014%204.00736%2014%205.25H15.5C15.5%204.83579%2015.8358%204.5%2016.25%204.5V3ZM1.75%2021H22.25V19.5H1.75V21Z'%20fill='%23252525'/%3e%3c/svg%3e",Mu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4%2014.2105L6.84488%2012.0821C7.66137%2011.5378%208.75215%2011.6663%209.41987%2012.3853C10.9123%2013.9926%2012.6426%2015.4538%2015%2015.4538C17.1727%2015.4538%2018.6125%2014.6485%2020%2013.261M6.75%2020.25H17.25C18.9069%2020.25%2020.25%2018.9069%2020.25%2017.25V6.75C20.25%205.09315%2018.9069%203.75%2017.25%203.75H6.75C5.09315%203.75%203.75%205.09315%203.75%206.75V17.25C3.75%2018.9069%205.09315%2020.25%206.75%2020.25ZM17.25%208.75C17.25%209.85457%2016.3546%2010.75%2015.25%2010.75C14.1454%2010.75%2013.25%209.85457%2013.25%208.75C13.25%207.64543%2014.1454%206.75%2015.25%206.75C16.3546%206.75%2017.25%207.64543%2017.25%208.75Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3c/svg%3e",Au="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.252%2019.25H6.74803C5.26465%2019.25%204.29985%2017.6884%204.96324%2016.3611L10.2152%205.85345C10.9506%204.38218%2013.0494%204.38218%2013.7848%205.85345L19.0368%2016.3611C19.7001%2017.6884%2018.7354%2019.25%2017.252%2019.25Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linejoin='round'/%3e%3c/svg%3e",Du="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11%202.75V4.5M16.9069%205.09326L15.5962%206.40392M6.40381%2015.5962L5.09315%2016.9069M4.5%2011H2.75M6.40381%206.40381L5.09315%205.09315M14.1323%2020.999L10.5777%2011.3226C10.3542%2010.7143%2010.9552%2010.1281%2011.5577%2010.3666L21.0397%2014.1199C21.4283%2014.2737%2021.4679%2014.8081%2021.1062%2015.0175L17.4231%2017.1498C17.3097%2017.2155%2017.2155%2017.3097%2017.1498%2017.4231L15.0343%2021.0771C14.822%2021.4438%2014.2784%2021.3967%2014.1323%2020.999Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Fu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.38803%2019.923L5.72852%2019.2548H5.72852L5.38803%2019.923ZM4.07698%2018.612L3.40873%2018.9525H3.40873L4.07698%2018.612ZM19.923%2018.612L19.2548%2018.2715V18.2715L19.923%2018.612ZM18.612%2019.923L18.2715%2019.2548H18.2715L18.612%2019.923ZM19.923%205.38803L19.2548%205.72852V5.72852L19.923%205.38803ZM18.612%204.07698L18.9525%203.40873V3.40873L18.612%204.07698ZM4.07698%205.38803L4.74524%205.72852L4.07698%205.38803ZM5.38803%204.07698L5.72852%204.74524L5.38803%204.07698ZM19.5%208.55V15.45H21V8.55H19.5ZM15.45%2019.5H8.55V21H15.45V19.5ZM4.5%2015.45V8.55H3V15.45H4.5ZM8.55%204.5H15.45V3H8.55V4.5ZM8.55%2019.5C7.69755%2019.5%207.10331%2019.4994%206.64068%2019.4616C6.1868%2019.4245%205.92604%2019.3554%205.72852%2019.2548L5.04754%2020.5913C5.49175%2020.8176%205.97189%2020.912%206.51853%2020.9566C7.05641%2021.0006%207.7223%2021%208.55%2021V19.5ZM3%2015.45C3%2016.2777%202.99942%2016.9436%203.04336%2017.4815C3.08803%2018.0281%203.18238%2018.5082%203.40873%2018.9525L4.74524%2018.2715C4.6446%2018.074%204.57546%2017.8132%204.53838%2017.3593C4.50058%2016.8967%204.5%2016.3025%204.5%2015.45H3ZM5.72852%2019.2548C5.30516%2019.039%204.96095%2018.6948%204.74524%2018.2715L3.40873%2018.9525C3.76825%2019.6581%204.34193%2020.2317%205.04754%2020.5913L5.72852%2019.2548ZM19.5%2015.45C19.5%2016.3025%2019.4994%2016.8967%2019.4616%2017.3593C19.4245%2017.8132%2019.3554%2018.074%2019.2548%2018.2715L20.5913%2018.9525C20.8176%2018.5082%2020.912%2018.0281%2020.9566%2017.4815C21.0006%2016.9436%2021%2016.2777%2021%2015.45H19.5ZM15.45%2021C16.2777%2021%2016.9436%2021.0006%2017.4815%2020.9566C18.0281%2020.912%2018.5082%2020.8176%2018.9525%2020.5913L18.2715%2019.2548C18.074%2019.3554%2017.8132%2019.4245%2017.3593%2019.4616C16.8967%2019.4994%2016.3025%2019.5%2015.45%2019.5V21ZM19.2548%2018.2715C19.0391%2018.6948%2018.6948%2019.039%2018.2715%2019.2548L18.9525%2020.5913C19.6581%2020.2317%2020.2318%2019.6581%2020.5913%2018.9525L19.2548%2018.2715ZM21%208.55C21%207.7223%2021.0006%207.05641%2020.9566%206.51853C20.912%205.97189%2020.8176%205.49175%2020.5913%205.04754L19.2548%205.72852C19.3554%205.92604%2019.4245%206.1868%2019.4616%206.64068C19.4994%207.10331%2019.5%207.69755%2019.5%208.55H21ZM15.45%204.5C16.3025%204.5%2016.8967%204.50058%2017.3593%204.53838C17.8132%204.57546%2018.074%204.6446%2018.2715%204.74524L18.9525%203.40873C18.5082%203.18238%2018.0281%203.08803%2017.4815%203.04336C16.9436%202.99942%2016.2777%203%2015.45%203V4.5ZM20.5913%205.04754C20.2318%204.34193%2019.6581%203.76825%2018.9525%203.40873L18.2715%204.74524C18.6948%204.96095%2019.0391%205.30516%2019.2548%205.72852L20.5913%205.04754ZM4.5%208.55C4.5%207.69755%204.50058%207.10331%204.53838%206.64068C4.57546%206.1868%204.6446%205.92604%204.74524%205.72852L3.40873%205.04754C3.18238%205.49175%203.08803%205.97189%203.04336%206.51853C2.99942%207.05641%203%207.7223%203%208.55H4.5ZM8.55%203C7.7223%203%207.05641%202.99942%206.51853%203.04336C5.97189%203.08803%205.49175%203.18238%205.04754%203.40873L5.72852%204.74524C5.92604%204.6446%206.1868%204.57546%206.64068%204.53838C7.10331%204.50058%207.69755%204.5%208.55%204.5V3ZM4.74524%205.72852C4.96095%205.30516%205.30516%204.96095%205.72852%204.74524L5.04754%203.40873C4.34193%203.76825%203.76825%204.34193%203.40873%205.04754L4.74524%205.72852Z'%20fill='%23252525'/%3e%3cpath%20d='M20.25%2015H21V13.5H20.25V15ZM3.75%2013.5H3V15H3.75V13.5ZM3.75%2015H20.25V13.5H3.75V15Z'%20fill='%23252525'/%3e%3c/svg%3e",Iu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.0858%202.32272C11.4533%201.55909%2012.5467%201.55909%2012.9142%202.32272L15.0872%206.83907C15.2351%207.14651%2015.5293%207.35876%2015.8692%207.40319L20.8676%208.05664C21.7134%208.16721%2022.0517%209.20388%2021.4322%209.78704L17.779%2013.2263C17.5295%2013.4612%2017.4167%2013.8058%2017.4795%2014.1417L18.3971%2019.0563C18.5526%2019.8892%2017.6676%2020.5294%2016.9183%2020.1261L12.4825%2017.7385C12.1815%2017.5764%2011.8185%2017.5764%2011.5175%2017.7385L7.08174%2020.1261C6.33244%2020.5294%205.44743%2019.8892%205.60294%2019.0563L6.52054%2014.1417C6.58325%2013.8058%206.47048%2013.4612%206.22097%2013.2263L2.56776%209.78704C1.94833%209.20388%202.28661%208.16721%203.13241%208.05664L8.13078%207.40319C8.47066%207.35876%208.7649%207.14651%208.91282%206.83907L11.0858%202.32272Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Bu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.25%204.75H5.75C4.09315%204.75%202.75%206.09315%202.75%207.75V8.25M17.75%204.75H18.25C19.9069%204.75%2021.25%206.09315%2021.25%207.75V8.25M21.25%2015.75V16.25C21.25%2017.9069%2019.9069%2019.25%2018.25%2019.25H17.75M6.25%2019.25H5.75C4.09315%2019.25%202.75%2017.9069%202.75%2016.25V15.75'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.75%209.75H16.25'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.75%2014.25H14.25'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",ju="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20.25%2010.75V6.75C20.25%205.09315%2018.9069%203.75%2017.25%203.75H6.75C5.09315%203.75%203.75%205.09315%203.75%206.75V17.25C3.75%2018.9069%205.09315%2020.25%206.75%2020.25H10.75M14.1879%2020.8366L12.0869%2013.0056C11.9372%2012.4478%2012.4478%2011.9372%2013.0056%2012.0869L20.8366%2014.1879C21.2665%2014.3032%2021.3428%2014.8805%2020.9576%2015.1035L17.4231%2017.1498C17.3097%2017.2155%2017.2155%2017.3097%2017.1498%2017.4231L15.1035%2020.9576C14.8805%2021.3428%2014.3032%2021.2665%2014.1879%2020.8366Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Hu="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.125%2016.875H16.875'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.9167%206.45833C12.1113%206.45833%2011.4583%207.11125%2011.4583%207.91667V12.9167C11.4583%2013.7221%2012.1113%2014.375%2012.9167%2014.375C13.7221%2014.375%2014.375%2013.7221%2014.375%2012.9167V7.91667C14.375%207.11125%2013.7221%206.45833%2012.9167%206.45833Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.08333%203.125C6.27792%203.125%205.625%203.77792%205.625%204.58333V12.9167C5.625%2013.7221%206.27792%2014.375%207.08333%2014.375C7.88875%2014.375%208.54167%2013.7221%208.54167%2012.9167V4.58333C8.54167%203.77792%207.88875%203.125%207.08333%203.125Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Uu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.75%2018.25H7.25M3.75%2012H9.25M3.75%205.75H20.25M17%2010.5L18.5%2013.5L21.5%2015L18.5%2016.5L17%2019.5L15.5%2016.5L12.5%2015L15.5%2013.5L17%2010.5Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Vu="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M19.9016%209.48786L10.3899%203.2788C8.39443%201.97623%205.75%203.40798%205.75%205.79094V18.2091C5.75%2020.592%208.39442%2022.0238%2010.3899%2020.7212L19.9016%2014.5121C21.7151%2013.3283%2021.7151%2010.6717%2019.9016%209.48786Z'%20stroke='%23252525'%20stroke-width='1.5'%20stroke-linejoin='round'/%3e%3c/svg%3e",$u={Header:Lu,Announcement:Uu,PrimaryHero:ju,ProductHero:Nu,Items:Tu,FeaturedItems:_u,Content:Pu,Stats:Ou,ImageGallery:Mu,Logos:Au,CTA:Du,FAQ:Fu,Reviews:Iu,ContactUs:Bu,Footer:Hu,Video:Vu},zu="_wrapper_1k1cr_1",Ju="_submodal_1k1cr_14",wr={wrapper:zu,submodal:Ju},qu=({children:e,positionTop:t,positionLeft:n})=>{const{keyBlock:r,startHideTimeout:o,clearHideTimeout:a,setMouseOverModal:s}=Ar();return r?N.jsx("div",{className:wr.wrapper,style:t?{top:t,left:n||void 0}:{},onMouseEnter:()=>{a(),s(!0)},onMouseLeave:()=>{s(!1),o()},children:e}):null},Wu=({children:e})=>{const{hoverBlockId:t,startHideTimeout:n,clearHideTimeout:r,setMouseOverModal:o}=Ar();return t?N.jsx("div",{className:Be(wr.wrapper,wr.submodal),onMouseEnter:()=>{r(),o(!0)},onMouseLeave:()=>{o(!1),n()},children:e}):null},Zu="_applyButton_1a9kh_2",Gu="_content_1a9kh_7",Ku="_title_1a9kh_14",Yu="_label_1a9kh_21",Xu="_colorValue_1a9kh_40",Qu="_colorMap_1a9kh_48",ed="_indicator_1a9kh_57",td="_hueSlider_1a9kh_66",nd="_slider_1a9kh_97",rd="_buttons_1a9kh_102",od="_name_1a9kh_109",ad="_secondary_1a9kh_114",sd="_input_1a9kh_122",id="_modal_1a9kh_160",ld="_alphaSlider_1a9kh_249",cd="_alphaBackground_1a9kh_257",ud="_alphaGradient_1a9kh_268",dd="_chargeTypes_1a9kh_297",fd="_charge_1a9kh_297",hd="_chargeActive_1a9kh_326",pd="_gradient_1a9kh_334",md="_color_1a9kh_40",gd="_colorActive_1a9kh_355",vd="_gradientWrapper_1a9kh_362",yd="_subtitle_1a9kh_368",wd="_colorTypes_1a9kh_375",bd="_colorType_1a9kh_375",Sd="_colorTypeActive_1a9kh_399",Ed="_colorsWrapper_1a9kh_404",Cd="_colors_1a9kh_404",W={applyButton:Zu,content:Gu,title:Ku,label:Yu,colorValue:Xu,colorMap:Qu,indicator:ed,hueSlider:td,slider:nd,buttons:rd,name:od,secondary:ad,input:sd,modal:id,alphaSlider:ld,alphaBackground:cd,alphaGradient:ud,chargeTypes:dd,charge:fd,chargeActive:hd,gradient:pd,color:md,colorActive:gd,gradientWrapper:vd,subtitle:yd,colorTypes:wd,colorType:bd,colorTypeActive:Sd,colorsWrapper:Ed,colors:Cd};function rr(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 Aa=e=>{const{initialColor:t,onChange:n,title:r,labelStyle:o="primary",isGradientActive:a=!0,isBlockSettings:s}=e,[i,l]=we.useState(t);we.useEffect(()=>{l(t)},[t]);const{setActiveLabel:c,setModalPosition:u,setInitialColor:d,setShowModal:m,setUpdate:y,setColor:p,setColorChange:h,setIsGradientActive:v,colorChange:R}=Dr();we.useEffect(()=>{const _=()=>{m(!1),c(null),d(t),y(()=>{}),p(t),h(()=>{})};return document.body.addEventListener("click",_),()=>{document.body.removeEventListener("click",_)}},[t]);const b=_=>{_.stopPropagation(),m(!0),h(l),y(n),d(t),p(i),v(a);const{top:H,left:w}=Ma(_,600,288,10,20,230,80);u({top:H,left:w})},k=_=>{const H=_.target.value;l(H),rr(H)&&(n(H),p(H),h(R))},L=()=>{rr(i)||l(t)};return N.jsxs("div",{className:W.content,children:[N.jsx("span",{className:Be(W.name,{[W.secondary]:o==="secondary"}),children:r}),N.jsxs("label",{className:W.label,onClick:_=>_.stopPropagation(),children:[N.jsx("div",{className:W.colorValue,style:{background:rr(i)?i:t},onClick:s?void 0:b}),N.jsx("input",{type:"text",value:i.includes("linear-gradient")?i:i.toUpperCase(),onChange:k,onBlur:L,className:W.input,style:{textTransform:i.includes("linear-gradient")?"none":"uppercase"}})]})]})},xd=()=>{const{modalPosition:e,color:t,initialColor:n,setShowModal:r,hue:o,saturation:a,brightness:s,alpha:i,dragging:l,setDragging:c,setHue:u,setSaturation:d,setBrightness:m,setAlpha:y,colorChange:p,setColor:h,update:v,isGradient:R,setIsGradient:b,gradientDirection:k,setGradientDirection:L,hue2:_,saturation2:H,brightness2:w,alpha2:P,setHue2:G,setSaturation2:B,setBrightness2:ae,setAlpha2:ee,activeColorIndex:te,setActiveColorIndex:he,isGradientActive:Oe,isBlockSettings:_e}=Dr(),We=(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))),q=Math.round(255*K(5)),re=Math.round(255*K(3)),Z=Math.round(255*K(1));return{r:q,g:re,b:Z}},ue=V=>V.toString(16).padStart(2,"0"),Re=(V,U,ne,z)=>{const{r:K,g:q,b:re}=We(V,U,ne),Z=Math.round(z/100*255);return`#${ue(K)}${ue(q)}${ue(re)}${ue(Z)}`},Ee=(V,U,ne,z)=>{if(R)if(te===1){u(V),d(U),m(ne),y(z);const K=Re(V,U,ne,z),q=Re(_,H,w,P),Z=`linear-gradient(${k==="vertical"?"0deg":"90deg"}, ${K} 0%, ${q} 100%)`;p(Z),h(Z)}else{G(V),B(U),ae(ne),ee(z);const K=Re(V,U,ne,z),q=Re(o,a,s,i),Z=`linear-gradient(${k==="vertical"?"0deg":"90deg"}, ${q} 0%, ${K} 100%)`;p(Z),h(Z)}else{const K=Re(V,U,ne,z);p(K),h(K)}},be=(V,U,ne)=>{const{width:z,height:K}=ne.getBoundingClientRect(),q=Math.max(0,Math.min(V/z*100,100)),re=Math.max(0,Math.min(100-U/K*100,100));R?te===1?(d(q),m(re),Ee(o,q,re,i)):(B(q),ae(re),Ee(_,q,re,P)):(d(q),m(re),Ee(o,q,re,i))},Le=V=>{const{offsetX:U,offsetY:ne}=V.nativeEvent;c(!0),be(U,ne,V.currentTarget)},Ue=V=>{if(l){const U=document.querySelector(`.${W.colorMap}`),{left:ne,top:z}=U.getBoundingClientRect(),K=V.clientX-ne,q=V.clientY-z;be(K,q,U)}},se=()=>{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%\)/,q=z.match(K);if(q){const re=q[1],Z=q[2],de=q[3];return{angle:re,col1:Z,col2:de}}return null}function U(z){const K=parseInt(z.slice(1,3),16),q=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,q,re);return{h:de,s:tt,b:ht,a:Z}}function ne(z,K,q){z/=255,K/=255,q/=255;const re=Math.max(z,K,q),Z=Math.min(z,K,q);let de=0;const tt=re-Z,ht=(re===0?0:tt/re)*100,Ge=re*100;if(re===Z)de=0;else switch(re){case z:de=((K-q)/tt+(K<q?6:0))*60;break;case K:de=((q-z)/tt+2)*60;break;case q:de=((z-K)/tt+4)*60;break}return{h:de,s:ht,b:Ge}}if(n&&n.startsWith("linear-gradient")){const z=V(n);if(z){const{angle:K,col1:q,col2:re}=z,Z=U(q),de=U(re);b(!0),L(K==="0deg"?"vertical":"horizontal"),u(Z.h),d(Z.s),m(Z.b),y(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),q=U(K);b(!1),u(q.h),d(q.s),m(q.b),y(q.a)}},[n,b,L,u,d,m,y,G,B,ae,ee,he]),we.useEffect(()=>{let V,U,ne,z;R?te===1?(V=o,U=a,ne=s,z=i):(V=_,U=H,ne=w,z=P):(V=o,U=a,ne=s,z=i),Ee(V,U,ne,z)},[R,k,te,o,a,s,i,_,H,w,P]),we.useEffect(()=>{const V=ne=>Ue(ne),U=()=>se();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,R,k]);function pe(){if(!R)v(t);else{const V=Re(o,a,s,i),U=Re(_,H,w,P),z=`linear-gradient(${k==="vertical"?"0deg":"90deg"}, ${V} 0%, ${U} 100%)`;v(z)}r(!1)}function Me(){r(!1),p(n)}const Ce=R?te===1?o:_:o,ft=R?te===1?a:H:a,nn=R?te===1?s:w:s,zn=R?te===1?i:P:i,{r:rn,g:xe,b:et}=We(Ce,ft,nn),on=`linear-gradient(to right, rgba(${rn}, ${xe}, ${et}, 0), rgba(${rn}, ${xe}, ${et}, 1))`,an=Re(o,a,s,i),Ze=Re(_,H,w,P);return N.jsxs("div",{className:W.modal,onClick:V=>V.stopPropagation(),style:{top:`${e.top}px`,left:`${e.left}px`},children:[N.jsx("h2",{className:W.title,children:"Color"}),Oe&&N.jsxs("div",{className:W.colorTypes,children:[N.jsxs("div",{className:Be(W.colorType,{[W.colorTypeActive]:!R}),onClick:()=>b(!1),children:[N.jsx("div",{style:{background:"#757575",width:"16px",height:"16px",borderRadius:"50%"}}),"Solid"]}),N.jsxs("div",{className:Be(W.colorType,{[W.colorTypeActive]:R}),onClick:()=>b(!0),children:[N.jsx("div",{style:{background:"linear-gradient(to bottom, #757575 0%, #DBDBDB 100%)",width:"16px",height:"16px",borderRadius:"50%"}}),"Linear"]})]}),R&&Oe&&N.jsxs("div",{className:W.colorsWrapper,children:[N.jsx("div",{className:W.colors,style:{background:`linear-gradient(90deg, ${an} 0%, ${Ze} 100%)`}}),N.jsx("div",{className:Be(W.color,{[W.colorActive]:te===1}),onClick:()=>he(1),style:{background:an}}),N.jsx("div",{className:Be(W.color,{[W.colorActive]:te===2}),onClick:()=>he(2),style:{background:Ze}})]}),N.jsx("div",{className:W.colorMap,onMouseDown:Le,style:{background:`
41
41
  linear-gradient(to top, black, transparent),
42
42
  linear-gradient(to right, hsl(${Ce}, 100%, 100%), hsl(${Ce}, 100%, 50%))
43
- `},children:N.jsx("div",{className:W.indicator,style:{position:"absolute",left:`${ft}%`,top:`${100-nn}%`,transform:"translate(-50%, -50%)"}})}),N.jsx("div",{className:W.hueSlider,style:{bottom:_e?R?"225px":"150px":R?"175px":"100px"},children:N.jsx("input",{type:"range",min:"0",max:"360",value:Ce,onChange:V=>{const U=Number(V.target.value);R?te===1?Ee(U,a,s,i):Ee(U,H,w,P):(u(U),Ee(U,a,s,i))},className:W.slider})}),N.jsxs("div",{className:W.alphaSlider,style:{bottom:_e?R?"200px":"125px":R?"150px":"75px"},children:[N.jsx("div",{className:W.alphaBackground}),N.jsx("div",{className:W.alphaGradient,style:{background:on}}),N.jsx("input",{type:"range",min:"0",max:"100",value:zn,onChange:V=>{const U=Number(V.target.value);R?te===1?Ee(o,a,s,U):Ee(_,H,w,U):(v(U),Ee(o,a,s,U))},className:W.slider})]}),R&&Oe&&N.jsxs("div",{className:W.gradientWrapper,children:[N.jsx("h3",{className:W.subtitle,children:"Rotation"}),N.jsx("div",{className:W.gradient,children:N.jsxs("div",{className:W.chargeTypes,children:[N.jsxs("div",{className:Be(W.charge,{[W.chargeActive]:k==="horizontal"}),onClick:()=>L("horizontal"),children:[N.jsx(je.Icon,{name:"ArrowsHorizontal",width:20,height:20}),"Horizontal"]}),N.jsxs("div",{className:Be(W.charge,{[W.chargeActive]:k==="vertical"}),onClick:()=>L("vertical"),children:[N.jsx(je.Icon,{name:"ArrowsVertical",width:20,height:20}),"Vertical"]})]})})]}),_e&&N.jsx(Aa,{initialColor:t,onChange:V=>h(V),title:"",isBlockSettings:_e}),N.jsxs("div",{className:W.buttons,children:[N.jsx(je.ButtonSettings,{onClick:Me,className:Be(W.applyButton,W.cancelButton),type:"Secondary",children:"Cancel"}),N.jsx(je.ButtonSettings,{onClick:pe,className:W.applyButton,children:"Apply"})]})]})},Rd="_wrapper_kzokw_1",kd="_open_kzokw_16",Nd="_close_kzokw_20",or={wrapper:Rd,open:kd,close:Nd},Td=e=>{const{isOpen:t,isClose:n,children:r}=e;return N.jsx("div",{className:Be(or.wrapper,{[or.open]:t,[or.close]:n}),children:r})},_d="_blocks_emecf_1",Ld="_block_emecf_1",Pd="_active_emecf_21",ar={blocks:_d,block:Ld,active:Pd},Od=e=>{const{items:t,selectedItem:n,onSelect:r,getIconName:o}=e;return N.jsx("div",{className:ar.blocks,children:t.map(a=>N.jsx("div",{className:Be(ar.block,{[ar.active]:n===a}),onClick:()=>r(a),children:N.jsx(je.Icon,{name:o(a),fill:n===a?"#252525":"#757575"})},String(a)))})},Md="_layout_1pjho_1",Ad="_main_1pjho_10",Dd="_content_1pjho_18",Fd="_notifications_1pjho_26",yn={layout:Md,main:Ad,content:Dd,notifications:Fd},Id="_notification_2jmah_1",Bd="_text_2jmah_22",jd="_timer_2jmah_27",Hd="_warning_2jmah_32",Ud="_error_2jmah_37",Vd="_success_2jmah_42",kt={notification:Id,text:Bd,timer:jd,warning:Hd,error:Ud,success:Vd},Po={warning:"#C1972A",error:"#FF3F19",success:"#338B13"},$d=e=>{const{type:t,message:n,style:r,padding:o,timer:a,id:s,element:i}=e,[l,c]=we.useState(a),{setNotifications:u}=Fe();function d(){const v=Fe.getState().notifications.filter(p=>p.id!==s);u([...v])}return we.useEffect(()=>{const m=setTimeout(()=>{d()},a*1e3);return()=>clearTimeout(m)},[a]),we.useEffect(()=>{const m=setInterval(()=>c(v=>v-1),1e3);return()=>clearInterval(m)},[l]),i?i({type:t,message:n,style:r,padding:o,timer:a,id:s}):N.jsx("div",{style:{padding:o,position:"relative"},children:N.jsxs("div",{className:Be(kt.notification,{[kt.warning]:t==="warning",[kt.error]:t==="error",[kt.success]:t==="success"}),style:r,children:[N.jsx("div",{children:N.jsx(je.Icon,{name:"Info",fill:Po[t],width:20,height:20})}),N.jsx("div",{className:kt.text,children:n}),a&&N.jsx("div",{className:kt.timer,children:l}),N.jsx("div",{style:{display:"flex"},children:N.jsx(je.Icon,{name:"X",fill:Po[t],width:20,height:20,hoverable:!0,onClick:()=>d()})})]})})},zd=()=>{const{isOpenModal:e,setIsOpenModal:t}=Kt(),{openModal:n,setOpenModal:r}=Na(),{notifications:o}=Fe(),{title:a,description:s,setTitle:i,setDescription:l,setOnConfirm:c}=Ta();return N.jsxs("div",{id:"builder",children:[N.jsxs("div",{className:yn.layout,children:[N.jsx(Dt.Navbar,{}),N.jsxs("main",{className:yn.main,children:[N.jsx(Dt.Header,{}),N.jsxs("div",{className:yn.content,children:[N.jsx(Dt.Sidebar,{}),N.jsx(Dt.Preview,{})]})]})]}),a&&s&&N.jsx(je.BuilderModal,{close:()=>{i(null),l(null),c(null)},children:N.jsx(je.ConfirmationModal,{})}),e&&N.jsx(je.BuilderModal,{close:t,children:N.jsx(Dt.ModifyPage,{})}),n&&N.jsx(je.BuilderModal,{close:r,children:N.jsx(je.ChooseImageModal,{})}),o.length>0&&N.jsx("div",{className:yn.notifications,children:o.map(u=>N.jsx($d,{type:u.status,message:u.message,timer:u.timer||10,id:u.id,element:u.component},u.id))})]})};async function Nt(e,t){const n=localStorage.getItem("shopId")||void 0,o=`${tn.getState().apiUrls.api}/${e}/builder/shops/${n}/${t}`;return(await at({url:o,withToken:!0,method:"get"})).data}async function Jd(){try{const[e,t,n,r,o,a,s,i]=await Promise.allSettled([Nt("v1","general"),Nt("v1","faqs"),Nt("v1","listings"),Nt("v1","products"),Nt("v1","reviews"),Nt("v1","categories"),{data:null},{data:null}]);return{general:e,faqs:t,listings:n,products:r,reviews:o,categories:a,fullPosts:s,posts:i}}catch(e){throw console.error("Error fetching page data:",e),e}}async function qd(){const e=tn.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 Wd(){var o;const e=localStorage.getItem("shopId"),t=localStorage.getItem("draftId"),r=`${tn.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 Zd(){const e=localStorage.getItem("shopId")||void 0,t=localStorage.getItem("draftId")||void 0,r=`${tn.getState().apiUrls.api}/v2/builder/shops/${e}/drafts/${t}/all`;return(await at({url:r,withToken:!0,method:"get"})).data}const Gd=e=>{const{blocks:t,settings:n,header:r,footer:o,announcement:a}=e,{setBlocks:s,setSourceBlocks:i,setHeader:l,setFooter:c,setAnnouncement:u,setSettings:d}=xa(),{fonts:m,setFonts:v}=Pa(),{setSettings:p}=yr(),{setPageContext:h}=Kt(),{setThemeSettings:y,setIsLoadingThemeSettings:R}=Pn(),{setIsLoadingSettings:b}=yr(),{notifications:k,setNotifications:L}=Fe(),{setBlocks:_,blocks:H,createPage:w,setIsLoadingLayers:P,setHeader:G,setAnnouncement:B,setFooter:ae}=On(),{setPages:ee,setCurrentPage:te}=Kt();return we.useEffect(()=>{R(!0),P(!0),b(!0);const he={};Object.keys(t).forEach(_e=>{he[_e]=t[_e]}),i(he),s(he),l(r),c(o),u(a),d(n),(async()=>{const _e={listings:null,products:null,reviews:null,categories:null,faqs:null,general:null,fullPosts:null,posts:null,preserveContent:!1},We=await Jd();Object.keys(We).map(se=>{const pe=se;_e[pe]=We[pe].value.data}),h(_e);const{data:ue}=await Zd(),{themeSettings:Re,layers:Ee,settings:be}=ue||{};if(be){if(be.settings){const se=new n;se.blockSettings={displayName:"Settings",isAddable:!1,...be.settings},p(se.blockSettings)}be.header&&G(be.header),be.footer&&ae(be.footer),be.announcement&&B(be.announcement)}else{const se=new n;p(se.blockSettings)}Re&&y(Re);const Le=await Wd(),Ue={};if(Le.status>=400&&L([...k,{id:ot(),message:"Error fetching pages",status:"error"}]),Le.data.length>0?(Le.data.forEach(se=>{var pe,Me;H[se.path]||w(se.path),Ue[se.id||se.path]={...se,icon:Vt[se.path]?Vt[se.path].icon:"File",name:se.name||((pe=se.seo)==null?void 0:pe.pageTitle)||((Me=Vt[se.path])==null?void 0:Me.name)||se.path}}),ee(Ue),te(Object.keys(Ue)[0])):(ee(Vt),te(Object.keys(Vt)[0])),m.length===0){const se=await qd();v([...se.map(pe=>{const Me=pe.variants.map(Ce=>{if(!Ce.includes("italic"))return Ce==="regular"?"400":Ce}).filter(Ce=>Ce!==void 0);return{name:pe.family,weights:Me}})])}_(Ee),R(!1),P(!1),b(!1)})()},[]),N.jsx(zd,{})};function Kd(){const e=new URL(window.location.href);window.history.replaceState(null,"",e.pathname+e.hash)}function Yd(){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 Kd(),n&&localStorage.setItem("sellerAccessToken",n),t&&localStorage.setItem("shopId",t),r&&localStorage.setItem("draftId",r),!!(n&&t&&r)}const Xd="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",Qd=e=>{const{blocks:t,settings:n,header:r,footer:o,announcement:a}=e,[s,i]=we.useState(!0),l=Dn(),c=Qe();return we.useEffect(()=>{const u=c.pathname;if(u.startsWith("/admin/builder")){u==="/admin/builder/add"?document.title="Add Section | Builder":u==="/admin/builder/theme"?document.title="Theme Settings | Builder":u==="/admin/builder/settings"?document.title="Settings | Builder":document.title="Builder | Billgang";let d=document.querySelector("link[rel~='icon']");d||(d=document.createElement("link"),d.rel="icon",document.head.appendChild(d)),d&&(d.href=Xd)}},[c]),we.useEffect(()=>{i(!0),Yd()?i(!1):l("/")},[]),N.jsx(N.Fragment,{children:s?N.jsx(je.LoaderBuilder,{}):N.jsx(Gd,{blocks:t,settings:n,header:r,footer:o,announcement:a})})},ef=Object.freeze(Object.defineProperty({__proto__:null,BuilderPage:Qd},Symbol.toStringTag,{value:"Module"}));exports.AddSectionSubmodal=Wu;exports.AnimatedPanel=Td;exports.AntistockRoutes=Yo;exports.ColorPicker=Aa;exports.ColorPickerModal=xd;exports.IS_LOCAL_HOST=lu;exports.Loader=Su;exports.NavLink=Go;exports.Outlet=ai;exports.Picker=Od;exports.RadiusVariables=cu;exports.RouterProvider=Ti;exports.Routes=Lr;exports.Submodal=qu;exports.ThicknessVariables=uu;exports.Tooltip=xu;exports.aspectRatio=du;exports.aspectRatioOptions=fu;exports.axios=ce;exports.blockIcons=$u;exports.clx=Be;exports.commonjsGlobal=gu;exports.convertCfImageIdToUrl=Ac;exports.createBrowserRouter=Si;exports.defaultPagePaths=iu;exports.devices=ou;exports.extractDateAndTime=jc;exports.formatLabel=Ru;exports.formatPrice=Dc;exports.formatTimestamp=Bc;exports.getDefaultExportFromCjs=_a;exports.getDisplayName=ku;exports.getModalPosition=Ma;exports.index=ef;exports.jwtDecode=Xo;exports.navbarBlocks=ka;exports.normalizeInterval=Ic;exports.percentageDifference=Fc;exports.referralSteps=$i;exports.request=at;exports.sizeOptions=su;exports.themeSettingsBlocks=au;exports.typeFontOptions=hu;exports.useApiStore=tn;exports.useBlocksStore=xa;exports.useCartStore=Jc;exports.useChooseImageStore=Na;exports.useColorPickerStore=Dr;exports.useConfirmationModalStore=Ta;exports.useCustomerDashboardStore=Wi;exports.useDeviceStore=vu;exports.useDiscordStore=Wc;exports.useErrorStore=mu;exports.useFontsStore=Pa;exports.useGeneralStore=Gc;exports.useGetTsId=Ca;exports.useHistoryStore=Pe;exports.useLayersStore=On;exports.useLocation=Qe;exports.useModalStore=Kc;exports.useNavbarStore=pu;exports.useNavigate=Dn;exports.useNotificationStore=Fe;exports.usePagesStore=Kt;exports.usePaginationPagesStore=qc;exports.useParams=Js;exports.usePreviewStore=Ra;exports.useRouteError=Jo;exports.useSearchParams=Fi;exports.useSettingsStore=yr;exports.useShareLinkStore=ru;exports.useStorefrontStore=Zi;exports.useSubmodalStore=Ar;exports.useSubscriptionStore=Zc;exports.useThemeSettingsStore=Pn;exports.useTooltipStore=Oa;exports.useTrackingAnalytics=$c;exports.v4=ot;
43
+ `},children:N.jsx("div",{className:W.indicator,style:{position:"absolute",left:`${ft}%`,top:`${100-nn}%`,transform:"translate(-50%, -50%)"}})}),N.jsx("div",{className:W.hueSlider,style:{bottom:_e?R?"225px":"150px":R?"175px":"100px"},children:N.jsx("input",{type:"range",min:"0",max:"360",value:Ce,onChange:V=>{const U=Number(V.target.value);R?te===1?Ee(U,a,s,i):Ee(U,H,w,P):(u(U),Ee(U,a,s,i))},className:W.slider})}),N.jsxs("div",{className:W.alphaSlider,style:{bottom:_e?R?"200px":"125px":R?"150px":"75px"},children:[N.jsx("div",{className:W.alphaBackground}),N.jsx("div",{className:W.alphaGradient,style:{background:on}}),N.jsx("input",{type:"range",min:"0",max:"100",value:zn,onChange:V=>{const U=Number(V.target.value);R?te===1?Ee(o,a,s,U):Ee(_,H,w,U):(y(U),Ee(o,a,s,U))},className:W.slider})]}),R&&Oe&&N.jsxs("div",{className:W.gradientWrapper,children:[N.jsx("h3",{className:W.subtitle,children:"Rotation"}),N.jsx("div",{className:W.gradient,children:N.jsxs("div",{className:W.chargeTypes,children:[N.jsxs("div",{className:Be(W.charge,{[W.chargeActive]:k==="horizontal"}),onClick:()=>L("horizontal"),children:[N.jsx(je.Icon,{name:"ArrowsHorizontal",width:20,height:20}),"Horizontal"]}),N.jsxs("div",{className:Be(W.charge,{[W.chargeActive]:k==="vertical"}),onClick:()=>L("vertical"),children:[N.jsx(je.Icon,{name:"ArrowsVertical",width:20,height:20}),"Vertical"]})]})})]}),_e&&N.jsx(Aa,{initialColor:t,onChange:V=>h(V),title:"",isBlockSettings:_e}),N.jsxs("div",{className:W.buttons,children:[N.jsx(je.ButtonSettings,{onClick:Me,className:Be(W.applyButton,W.cancelButton),type:"Secondary",children:"Cancel"}),N.jsx(je.ButtonSettings,{onClick:pe,className:W.applyButton,children:"Apply"})]})]})},Rd="_wrapper_kzokw_1",kd="_open_kzokw_16",Nd="_close_kzokw_20",or={wrapper:Rd,open:kd,close:Nd},Td=e=>{const{isOpen:t,isClose:n,children:r}=e;return N.jsx("div",{className:Be(or.wrapper,{[or.open]:t,[or.close]:n}),children:r})},_d="_blocks_emecf_1",Ld="_block_emecf_1",Pd="_active_emecf_21",ar={blocks:_d,block:Ld,active:Pd},Od=e=>{const{items:t,selectedItem:n,onSelect:r,getIconName:o}=e;return N.jsx("div",{className:ar.blocks,children:t.map(a=>N.jsx("div",{className:Be(ar.block,{[ar.active]:n===a}),onClick:()=>r(a),children:N.jsx(je.Icon,{name:o(a),fill:n===a?"#252525":"#757575"})},String(a)))})},Md="_layout_1pjho_1",Ad="_main_1pjho_10",Dd="_content_1pjho_18",Fd="_notifications_1pjho_26",vn={layout:Md,main:Ad,content:Dd,notifications:Fd},Id="_notification_2jmah_1",Bd="_text_2jmah_22",jd="_timer_2jmah_27",Hd="_warning_2jmah_32",Ud="_error_2jmah_37",Vd="_success_2jmah_42",kt={notification:Id,text:Bd,timer:jd,warning:Hd,error:Ud,success:Vd},Po={warning:"#C1972A",error:"#FF3F19",success:"#338B13"},$d=e=>{const{type:t,message:n,style:r,padding:o,timer:a,id:s,element:i}=e,[l,c]=we.useState(a),{setNotifications:u}=Fe();function d(){const y=Fe.getState().notifications.filter(p=>p.id!==s);u([...y])}return we.useEffect(()=>{const m=setTimeout(()=>{d()},a*1e3);return()=>clearTimeout(m)},[a]),we.useEffect(()=>{const m=setInterval(()=>c(y=>y-1),1e3);return()=>clearInterval(m)},[l]),i?i({type:t,message:n,style:r,padding:o,timer:a,id:s}):N.jsx("div",{style:{padding:o,position:"relative"},children:N.jsxs("div",{className:Be(kt.notification,{[kt.warning]:t==="warning",[kt.error]:t==="error",[kt.success]:t==="success"}),style:r,children:[N.jsx("div",{children:N.jsx(je.Icon,{name:"Info",fill:Po[t],width:20,height:20})}),N.jsx("div",{className:kt.text,children:n}),a&&N.jsx("div",{className:kt.timer,children:l}),N.jsx("div",{style:{display:"flex"},children:N.jsx(je.Icon,{name:"X",fill:Po[t],width:20,height:20,hoverable:!0,onClick:()=>d()})})]})})},zd=()=>{const{isOpenModal:e,setIsOpenModal:t}=Kt(),{openModal:n,setOpenModal:r}=Na(),{notifications:o}=Fe(),{title:a,description:s,setTitle:i,setDescription:l,setOnConfirm:c}=Ta();return N.jsxs("div",{id:"builder",children:[N.jsxs("div",{className:vn.layout,children:[N.jsx(Dt.Navbar,{}),N.jsxs("main",{className:vn.main,children:[N.jsx(Dt.Header,{}),N.jsxs("div",{className:vn.content,children:[N.jsx(Dt.Sidebar,{}),N.jsx(Dt.Preview,{})]})]})]}),a&&s&&N.jsx(je.BuilderModal,{close:()=>{i(null),l(null),c(null)},children:N.jsx(je.ConfirmationModal,{})}),e&&N.jsx(je.BuilderModal,{close:t,children:N.jsx(Dt.ModifyPage,{})}),n&&N.jsx(je.BuilderModal,{close:r,children:N.jsx(je.ChooseImageModal,{})}),o.length>0&&N.jsx("div",{className:vn.notifications,children:o.map(u=>N.jsx($d,{type:u.status,message:u.message,timer:u.timer||10,id:u.id,element:u.component},u.id))})]})};async function Nt(e,t){const n=localStorage.getItem("shopId")||void 0,o=`${tn.getState().apiUrls.api}/${e}/builder/shops/${n}/${t}`;return(await at({url:o,withToken:!0,method:"get"})).data}async function Jd(){try{const[e,t,n,r,o,a,s,i,l]=await Promise.allSettled([Nt("v1","general"),Nt("v1","faqs"),Nt("v1","listings"),Nt("v1","products"),Nt("v1","reviews"),Nt("v1","categories"),{data:null},{data:null},{data:null}]);return{general:e,faqs:t,listings:n,products:r,reviews:o,categories:a,fullPosts:s,posts:i,vouches:l}}catch(e){throw console.error("Error fetching page data:",e),e}}async function qd(){const e=tn.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 Wd(){var o;const e=localStorage.getItem("shopId"),t=localStorage.getItem("draftId"),r=`${tn.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 Zd(){const e=localStorage.getItem("shopId")||void 0,t=localStorage.getItem("draftId")||void 0,r=`${tn.getState().apiUrls.api}/v2/builder/shops/${e}/drafts/${t}/all`;return(await at({url:r,withToken:!0,method:"get"})).data}const Gd=e=>{const{blocks:t,settings:n,header:r,footer:o,announcement:a}=e,{setBlocks:s,setSourceBlocks:i,setHeader:l,setFooter:c,setAnnouncement:u,setSettings:d}=xa(),{fonts:m,setFonts:y}=Pa(),{setSettings:p}=vr(),{setPageContext:h}=Kt(),{setThemeSettings:v,setIsLoadingThemeSettings:R}=Pn(),{setIsLoadingSettings:b}=vr(),{notifications:k,setNotifications:L}=Fe(),{setBlocks:_,blocks:H,createPage:w,setIsLoadingLayers:P,setHeader:G,setAnnouncement:B,setFooter:ae}=On(),{setPages:ee,setCurrentPage:te}=Kt();return we.useEffect(()=>{R(!0),P(!0),b(!0);const he={};Object.keys(t).forEach(_e=>{he[_e]=t[_e]}),i(he),s(he),l(r),c(o),u(a),d(n),(async()=>{const _e={listings:null,products:null,reviews:null,categories:null,faqs:null,general:null,fullPosts:null,posts:null,preserveContent:!1,vouches:null},We=await Jd();Object.keys(We).map(se=>{const pe=se;_e[pe]=We[pe].value.data}),h(_e);const{data:ue}=await Zd(),{themeSettings:Re,layers:Ee,settings:be}=ue||{};if(be){if(be.settings){const se=new n;se.blockSettings={displayName:"Settings",isAddable:!1,...be.settings},p(se.blockSettings)}be.header&&G(be.header),be.footer&&ae(be.footer),be.announcement&&B(be.announcement)}else{const se=new n;p(se.blockSettings)}Re&&v(Re);const Le=await Wd(),Ue={};if(Le.status>=400&&L([...k,{id:ot(),message:"Error fetching pages",status:"error"}]),Le.data.length>0?(Le.data.forEach(se=>{var pe,Me;H[se.path]||w(se.path),Ue[se.id||se.path]={...se,icon:Vt[se.path]?Vt[se.path].icon:"File",name:se.name||((pe=se.seo)==null?void 0:pe.pageTitle)||((Me=Vt[se.path])==null?void 0:Me.name)||se.path}}),ee(Ue),te(Object.keys(Ue)[0])):(ee(Vt),te(Object.keys(Vt)[0])),m.length===0){const se=await qd();y([...se.map(pe=>{const Me=pe.variants.map(Ce=>{if(!Ce.includes("italic"))return Ce==="regular"?"400":Ce}).filter(Ce=>Ce!==void 0);return{name:pe.family,weights:Me}})])}_(Ee),R(!1),P(!1),b(!1)})()},[]),N.jsx(zd,{})};function Kd(){const e=new URL(window.location.href);window.history.replaceState(null,"",e.pathname+e.hash)}function Yd(){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 Kd(),n&&localStorage.setItem("sellerAccessToken",n),t&&localStorage.setItem("shopId",t),r&&localStorage.setItem("draftId",r),!!(n&&t&&r)}const Xd="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",Qd=e=>{const{blocks:t,settings:n,header:r,footer:o,announcement:a}=e,[s,i]=we.useState(!0),l=Dn(),c=Qe();return we.useEffect(()=>{const u=c.pathname;if(u.startsWith("/admin/builder")){u==="/admin/builder/add"?document.title="Add Section | Builder":u==="/admin/builder/theme"?document.title="Theme Settings | Builder":u==="/admin/builder/settings"?document.title="Settings | Builder":document.title="Builder | Billgang";let d=document.querySelector("link[rel~='icon']");d||(d=document.createElement("link"),d.rel="icon",document.head.appendChild(d)),d&&(d.href=Xd)}},[c]),we.useEffect(()=>{i(!0),Yd()?i(!1):l("/")},[]),N.jsx(N.Fragment,{children:s?N.jsx(je.LoaderBuilder,{}):N.jsx(Gd,{blocks:t,settings:n,header:r,footer:o,announcement:a})})},ef=Object.freeze(Object.defineProperty({__proto__:null,BuilderPage:Qd},Symbol.toStringTag,{value:"Module"}));exports.AddSectionSubmodal=Wu;exports.AnimatedPanel=Td;exports.AntistockRoutes=Yo;exports.ColorPicker=Aa;exports.ColorPickerModal=xd;exports.IS_LOCAL_HOST=lu;exports.Loader=Su;exports.NavLink=Go;exports.Outlet=ai;exports.Picker=Od;exports.RadiusVariables=cu;exports.RouterProvider=Ti;exports.Routes=Lr;exports.Submodal=qu;exports.ThicknessVariables=uu;exports.Tooltip=xu;exports.aspectRatio=du;exports.aspectRatioOptions=fu;exports.axios=ce;exports.blockIcons=$u;exports.clx=Be;exports.commonjsGlobal=gu;exports.convertCfImageIdToUrl=Ac;exports.createBrowserRouter=Si;exports.defaultPagePaths=iu;exports.devices=ou;exports.extractDateAndTime=jc;exports.formatLabel=Ru;exports.formatPrice=Dc;exports.formatTimestamp=Bc;exports.getDefaultExportFromCjs=_a;exports.getDisplayName=ku;exports.getModalPosition=Ma;exports.index=ef;exports.jwtDecode=Xo;exports.navbarBlocks=ka;exports.normalizeInterval=Ic;exports.percentageDifference=Fc;exports.referralSteps=$i;exports.request=at;exports.sizeOptions=su;exports.themeSettingsBlocks=au;exports.typeFontOptions=hu;exports.useApiStore=tn;exports.useBlocksStore=xa;exports.useCartStore=Jc;exports.useChooseImageStore=Na;exports.useColorPickerStore=Dr;exports.useConfirmationModalStore=Ta;exports.useCustomerDashboardStore=Wi;exports.useDeviceStore=yu;exports.useDiscordStore=Wc;exports.useErrorStore=mu;exports.useFontsStore=Pa;exports.useGeneralStore=Gc;exports.useGetTsId=Ca;exports.useHistoryStore=Pe;exports.useLayersStore=On;exports.useLocation=Qe;exports.useModalStore=Kc;exports.useNavbarStore=pu;exports.useNavigate=Dn;exports.useNotificationStore=Fe;exports.usePagesStore=Kt;exports.usePaginationPagesStore=qc;exports.useParams=Js;exports.usePreviewStore=Ra;exports.useRouteError=Jo;exports.useSearchParams=Fi;exports.useSettingsStore=vr;exports.useShareLinkStore=ru;exports.useStorefrontStore=Zi;exports.useSubmodalStore=Ar;exports.useSubscriptionStore=Zc;exports.useThemeSettingsStore=Pn;exports.useTooltipStore=Oa;exports.useTrackingAnalytics=$c;exports.v4=ot;