@omnic/widget-locations 1.1.89 → 1.1.91

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.
@@ -1,4 +1,4 @@
1
- "use strict";var Oo=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var P=(t,e,n)=>(Oo(t,e,"read from private field"),n?n.call(t):e.get(t)),U=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},V=(t,e,n,r)=>(Oo(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);var Ki=(t,e,n,r)=>({set _(i){V(t,e,i,n)},get _(){return P(t,e,r)}}),Z=(t,e,n)=>(Oo(t,e,"access private method"),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react/jsx-runtime"),p=require("react"),Hs=require("react-dom"),Qh=require("react-dom/server");function Jh(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const N=Jh(p),Ju=p.createContext({}),Xu=!0;function Xh({baseColor:t,highlightColor:e,width:n,height:r,borderRadius:i,circle:s,direction:o,duration:a,enableAnimation:c=Xu,customHighlightBackground:l}){const u={};return o==="rtl"&&(u["--animation-direction"]="reverse"),typeof a=="number"&&(u["--animation-duration"]=`${a}s`),c||(u["--pseudo-element-display"]="none"),(typeof n=="string"||typeof n=="number")&&(u.width=n),(typeof r=="string"||typeof r=="number")&&(u.height=r),(typeof i=="string"||typeof i=="number")&&(u.borderRadius=i),s&&(u.borderRadius="50%"),typeof t<"u"&&(u["--base-color"]=t),typeof e<"u"&&(u["--highlight-color"]=e),typeof l=="string"&&(u["--custom-highlight-background"]=l),u}function Ze({count:t=1,wrapper:e,className:n,containerClassName:r,containerTestId:i,circle:s=!1,style:o,...a}){var c,l,u;const d=p.useContext(Ju),h={...a};for(const[b,E]of Object.entries(a))typeof E>"u"&&delete h[b];const v={...d,...h,circle:s},m={...o,...Xh(v)};let f="react-loading-skeleton";n&&(f+=` ${n}`);const w=(c=v.inline)!==null&&c!==void 0?c:!1,y=[],C=Math.ceil(t);for(let b=0;b<C;b++){let E=m;if(C>t&&b===C-1){const g=(l=E.width)!==null&&l!==void 0?l:"100%",_=t%1,O=typeof g=="number"?g*_:`calc(${g} * ${_})`;E={...E,width:O}}const x=p.createElement("span",{className:f,style:E,key:b},"‌");w?y.push(x):y.push(p.createElement(p.Fragment,{key:b},x,p.createElement("br",null)))}return p.createElement("span",{className:r,"data-testid":i,"aria-live":"polite","aria-busy":(u=v.enableAnimation)!==null&&u!==void 0?u:Xu},e?y.map((b,E)=>p.createElement(e,{key:E},b)):y)}function Yh({children:t,...e}){return p.createElement(Ju.Provider,{value:e},t)}var Qi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ao(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ep=function(t,e,n,r,i,s,o,a){if(!t){var c;if(e===void 0)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,s,o,a],u=0;c=new Error(e.replace(/%s/g,function(){return l[u++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}},tp=ep;const xt=ao(tp);let Ji;const np=new Uint8Array(16);function rp(){if(!Ji&&(Ji=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ji))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ji(np)}const Pe=[];for(let t=0;t<256;++t)Pe.push((t+256).toString(16).slice(1));function ip(t,e=0){return Pe[t[e+0]]+Pe[t[e+1]]+Pe[t[e+2]]+Pe[t[e+3]]+"-"+Pe[t[e+4]]+Pe[t[e+5]]+"-"+Pe[t[e+6]]+Pe[t[e+7]]+"-"+Pe[t[e+8]]+Pe[t[e+9]]+"-"+Pe[t[e+10]]+Pe[t[e+11]]+Pe[t[e+12]]+Pe[t[e+13]]+Pe[t[e+14]]+Pe[t[e+15]]}const sp=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),$c={randomUUID:sp};function Yu(t,e,n){if($c.randomUUID&&!e&&!t)return $c.randomUUID();t=t||{};const r=t.random||(t.rng||rp)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){n=n||0;for(let i=0;i<16;++i)e[n+i]=r[i];return e}return ip(r)}const op=Yu(),ed=Yu(),ap=6,na=[49.3478969,14.0983344],td="en",cp=["places","geocoding"],bn={logo:"default",locale:td,map:{provider:"google",center:na,initialZoom:ap}},nd=p.createContext(bn),_e=()=>p.useContext(nd);var jt=(t=>(t[t.All=0]="All",t[t.PickPoint=20]="PickPoint",t[t.PostOffice=30]="PostOffice",t))(jt||{}),ht=(t=>(t[t.PayByCash=0]="PayByCash",t[t.DressingRoom=1]="DressingRoom",t[t.CheckOrder=2]="CheckOrder",t))(ht||{}),pt=(t=>(t[t.Return=0]="Return",t[t.Payment=1]="Payment",t[t.Shipping=2]="Shipping",t))(pt||{}),lp={VITE_API_BASE_URL:"https://ecomgate.omnic.solutions/api/1.0.0/type-1/public/",VITE_GEO_API_BASE_URL:"https://api.geo-data.omnic.solutions/api/1.0/",VITE_YMAPS_KEY:"5298a725-4baa-457a-a2a7-c3abac81db20",VITE_GMAP_KEY:"AIzaSyDsI0AO8VsUrTPoyR9fF7T31FKx1a9TLO0",VITE_GMAP_ID:"e130cd87a3f1b9cbe3cb5de4",VITE_TOKEN:"fa812020-3197-401a-9b39-345999046111",VITE_TOLGEE_API_URL:"https://tms.omnic.solutions",VITE_TOLGEE_API_KEY:"tgpak_gfpwentkga2g4zdngbzwozdinvztezlknu4xmnlpnbrgc",VITE_CJS_IGNORE_WARNING:"true",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const zc=t=>{let e;const n=new Set,r=(u,d)=>{const h=typeof u=="function"?u(e):u;if(!Object.is(h,e)){const v=e;e=d??(typeof h!="object"||h===null)?h:Object.assign({},e,h),n.forEach(m=>m(e,v))}},i=()=>e,c={setState:r,getState:i,getInitialState:()=>l,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(lp?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},l=e=t(r,i,c);return c},up=t=>t?zc(t):zc;var rd={exports:{}},id={},sd={exports:{}},od={};/**
1
+ "use strict";var Oo=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var P=(t,e,n)=>(Oo(t,e,"read from private field"),n?n.call(t):e.get(t)),U=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},B=(t,e,n,r)=>(Oo(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);var Ki=(t,e,n,r)=>({set _(i){B(t,e,i,n)},get _(){return P(t,e,r)}}),K=(t,e,n)=>(Oo(t,e,"access private method"),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react/jsx-runtime"),p=require("react"),Hs=require("react-dom"),Qh=require("react-dom/server");function Jh(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const j=Jh(p),Ju=p.createContext({}),Xu=!0;function Xh({baseColor:t,highlightColor:e,width:n,height:r,borderRadius:i,circle:s,direction:o,duration:a,enableAnimation:c=Xu,customHighlightBackground:l}){const u={};return o==="rtl"&&(u["--animation-direction"]="reverse"),typeof a=="number"&&(u["--animation-duration"]=`${a}s`),c||(u["--pseudo-element-display"]="none"),(typeof n=="string"||typeof n=="number")&&(u.width=n),(typeof r=="string"||typeof r=="number")&&(u.height=r),(typeof i=="string"||typeof i=="number")&&(u.borderRadius=i),s&&(u.borderRadius="50%"),typeof t<"u"&&(u["--base-color"]=t),typeof e<"u"&&(u["--highlight-color"]=e),typeof l=="string"&&(u["--custom-highlight-background"]=l),u}function Ze({count:t=1,wrapper:e,className:n,containerClassName:r,containerTestId:i,circle:s=!1,style:o,...a}){var c,l,u;const d=p.useContext(Ju),h={...a};for(const[b,E]of Object.entries(a))typeof E>"u"&&delete h[b];const v={...d,...h,circle:s},m={...o,...Xh(v)};let f="react-loading-skeleton";n&&(f+=` ${n}`);const w=(c=v.inline)!==null&&c!==void 0?c:!1,y=[],C=Math.ceil(t);for(let b=0;b<C;b++){let E=m;if(C>t&&b===C-1){const g=(l=E.width)!==null&&l!==void 0?l:"100%",_=t%1,O=typeof g=="number"?g*_:`calc(${g} * ${_})`;E={...E,width:O}}const x=p.createElement("span",{className:f,style:E,key:b},"‌");w?y.push(x):y.push(p.createElement(p.Fragment,{key:b},x,p.createElement("br",null)))}return p.createElement("span",{className:r,"data-testid":i,"aria-live":"polite","aria-busy":(u=v.enableAnimation)!==null&&u!==void 0?u:Xu},e?y.map((b,E)=>p.createElement(e,{key:E},b)):y)}function Yh({children:t,...e}){return p.createElement(Ju.Provider,{value:e},t)}var Qi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ao(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ep=function(t,e,n,r,i,s,o,a){if(!t){var c;if(e===void 0)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,s,o,a],u=0;c=new Error(e.replace(/%s/g,function(){return l[u++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}},tp=ep;const Ot=ao(tp);let Ji;const np=new Uint8Array(16);function rp(){if(!Ji&&(Ji=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ji))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ji(np)}const Ae=[];for(let t=0;t<256;++t)Ae.push((t+256).toString(16).slice(1));function ip(t,e=0){return Ae[t[e+0]]+Ae[t[e+1]]+Ae[t[e+2]]+Ae[t[e+3]]+"-"+Ae[t[e+4]]+Ae[t[e+5]]+"-"+Ae[t[e+6]]+Ae[t[e+7]]+"-"+Ae[t[e+8]]+Ae[t[e+9]]+"-"+Ae[t[e+10]]+Ae[t[e+11]]+Ae[t[e+12]]+Ae[t[e+13]]+Ae[t[e+14]]+Ae[t[e+15]]}const sp=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),$c={randomUUID:sp};function Yu(t,e,n){if($c.randomUUID&&!e&&!t)return $c.randomUUID();t=t||{};const r=t.random||(t.rng||rp)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){n=n||0;for(let i=0;i<16;++i)e[n+i]=r[i];return e}return ip(r)}const op=Yu(),ed=Yu(),ap=6,na=[49.3478969,14.0983344],td="en",cp=["places","geocoding"],wn={logo:"default",locale:td,map:{provider:"google",center:na,initialZoom:ap}},nd=p.createContext(wn),Ee=()=>p.useContext(nd);var It=(t=>(t[t.All=0]="All",t[t.PickPoint=20]="PickPoint",t[t.PostOffice=30]="PostOffice",t))(It||{}),ht=(t=>(t[t.PayByCash=0]="PayByCash",t[t.DressingRoom=1]="DressingRoom",t[t.CheckOrder=2]="CheckOrder",t))(ht||{}),pt=(t=>(t[t.Return=0]="Return",t[t.Payment=1]="Payment",t[t.Shipping=2]="Shipping",t))(pt||{}),lp={VITE_API_BASE_URL:"https://ecomgate.omnic.solutions/api/1.0.0/type-1/public/",VITE_GEO_API_BASE_URL:"https://api.geo-data.omnic.solutions/api/1.0/",VITE_YMAPS_KEY:"5298a725-4baa-457a-a2a7-c3abac81db20",VITE_GMAP_KEY:"AIzaSyDsI0AO8VsUrTPoyR9fF7T31FKx1a9TLO0",VITE_GMAP_ID:"e130cd87a3f1b9cbe3cb5de4",VITE_TOKEN:"fa812020-3197-401a-9b39-345999046111",VITE_TOLGEE_API_URL:"https://tms.omnic.solutions",VITE_TOLGEE_API_KEY:"tgpak_gfpwentkga2g4zdngbzwozdinvztezlknu4xmnlpnbrgc",VITE_CJS_IGNORE_WARNING:"true",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const zc=t=>{let e;const n=new Set,r=(u,d)=>{const h=typeof u=="function"?u(e):u;if(!Object.is(h,e)){const v=e;e=d??(typeof h!="object"||h===null)?h:Object.assign({},e,h),n.forEach(m=>m(e,v))}},i=()=>e,c={setState:r,getState:i,getInitialState:()=>l,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(lp?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},l=e=t(r,i,c);return c},up=t=>t?zc(t):zc;var rd={exports:{}},id={},sd={exports:{}},od={};/**
2
2
  * @license React
3
3
  * use-sync-external-store-shim.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var _r=p;function dp(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var fp=typeof Object.is=="function"?Object.is:dp,hp=_r.useState,pp=_r.useEffect,mp=_r.useLayoutEffect,gp=_r.useDebugValue;function vp(t,e){var n=e(),r=hp({inst:{value:n,getSnapshot:e}}),i=r[0].inst,s=r[1];return mp(function(){i.value=n,i.getSnapshot=e,Po(i)&&s({inst:i})},[t,n,e]),pp(function(){return Po(i)&&s({inst:i}),t(function(){Po(i)&&s({inst:i})})},[t]),gp(n),n}function Po(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!fp(t,n)}catch{return!0}}function yp(t,e){return e()}var bp=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?yp:vp;od.useSyncExternalStore=_r.useSyncExternalStore!==void 0?_r.useSyncExternalStore:bp;sd.exports=od;var wp=sd.exports;/**
9
+ */var Cr=p;function dp(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var fp=typeof Object.is=="function"?Object.is:dp,hp=Cr.useState,pp=Cr.useEffect,mp=Cr.useLayoutEffect,gp=Cr.useDebugValue;function vp(t,e){var n=e(),r=hp({inst:{value:n,getSnapshot:e}}),i=r[0].inst,s=r[1];return mp(function(){i.value=n,i.getSnapshot=e,Po(i)&&s({inst:i})},[t,n,e]),pp(function(){return Po(i)&&s({inst:i}),t(function(){Po(i)&&s({inst:i})})},[t]),gp(n),n}function Po(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!fp(t,n)}catch{return!0}}function yp(t,e){return e()}var bp=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?yp:vp;od.useSyncExternalStore=Cr.useSyncExternalStore!==void 0?Cr.useSyncExternalStore:bp;sd.exports=od;var wp=sd.exports;/**
10
10
  * @license React
11
11
  * use-sync-external-store-shim/with-selector.production.min.js
12
12
  *
@@ -14,17 +14,17 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var co=p,Sp=wp;function Cp(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var _p=typeof Object.is=="function"?Object.is:Cp,Ep=Sp.useSyncExternalStore,xp=co.useRef,Op=co.useEffect,Pp=co.useMemo,Tp=co.useDebugValue;id.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var s=xp(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=Pp(function(){function c(v){if(!l){if(l=!0,u=v,v=r(v),i!==void 0&&o.hasValue){var m=o.value;if(i(m,v))return d=m}return d=v}if(m=d,_p(u,v))return m;var f=r(v);return i!==void 0&&i(m,f)?m:(u=v,d=f)}var l=!1,u,d,h=n===void 0?null:n;return[function(){return c(e())},h===null?void 0:function(){return c(h())}]},[e,n,r,i]);var a=Ep(t,s[0],s[1]);return Op(function(){o.hasValue=!0,o.value=a},[a]),Tp(a),a};rd.exports=id;var Ap=rd.exports;const Lp=ao(Ap);var ad={VITE_API_BASE_URL:"https://ecomgate.omnic.solutions/api/1.0.0/type-1/public/",VITE_GEO_API_BASE_URL:"https://api.geo-data.omnic.solutions/api/1.0/",VITE_YMAPS_KEY:"5298a725-4baa-457a-a2a7-c3abac81db20",VITE_GMAP_KEY:"AIzaSyDsI0AO8VsUrTPoyR9fF7T31FKx1a9TLO0",VITE_GMAP_ID:"e130cd87a3f1b9cbe3cb5de4",VITE_TOKEN:"fa812020-3197-401a-9b39-345999046111",VITE_TOLGEE_API_URL:"https://tms.omnic.solutions",VITE_TOLGEE_API_KEY:"tgpak_gfpwentkga2g4zdngbzwozdinvztezlknu4xmnlpnbrgc",VITE_CJS_IGNORE_WARNING:"true",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:Rp}=p,{useSyncExternalStoreWithSelector:kp}=Lp;let qc=!1;const Mp=t=>t;function Dp(t,e=Mp,n){(ad?"production":void 0)!=="production"&&n&&!qc&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),qc=!0);const r=kp(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return Rp(r),r}const Gc=t=>{(ad?"production":void 0)!=="production"&&typeof t!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof t=="function"?up(t):t,n=(r,i)=>Dp(e,r,i);return Object.assign(n,e),n},$t=t=>t?Gc(t):Gc,Np={location:null,warehousePoint:null},ec=t=>t.location,Le=$t()(t=>({...Np,setDeliverPoint(e){t({location:e})},setWarehousePoint(e){t({warehousePoint:e})}})),jp={map:null,mode:"self_pickup",bounds:null,loaded:!1,loading:!0,detailsOpen:!1,isIdle:!1},Ip=t=>t.map,Fp=t=>t.mode,Bp=t=>t.bounds,Vp=t=>t.loaded,Hp=t=>t.loading,tc=t=>t.detailsOpen,te=$t()(t=>({...jp,setLoaded(){t({loaded:!0,loading:!1})},setMode(e){t({mode:e})},setBounds(e){t({bounds:e})},setDetailsOpen(e){t({detailsOpen:e})},setMap(e){t({map:e})},setIdle(e){t({isIdle:e})}})),Up={isTrackingEnabled:!1,location:null},$p=t=>t.location,it=$t()(t=>({...Up,setSelectedLocation(e){t({location:e})},setIsTrackingEnabled(e){t({isTrackingEnabled:e})}})),zp={query:"",type:jt.All,hours:["08:00","22:00"],send:{[pt.Return]:!1,[pt.Payment]:!1,[pt.Shipping]:!1},receive:{[ht.PayByCash]:!1,[ht.CheckOrder]:!1,[ht.DressingRoom]:!1}},qp=t=>t.type,Gp=t=>t.send,Wp=t=>t.receive,fn=$t(t=>({...zp,setFilter(e){te.getState().setDetailsOpen(!1),Le.getState().setDeliverPoint(null),it.getState().setSelectedLocation(null),t(e)}})),Zp=t=>{const[e,n]=t.split(":");return Number(e)*60+Number(n)},Kp=t=>{const e=Math.floor(t/60),n=t%60;return`${e<10?`0${e}`:e}:${n<10?`0${n}`:n}`},Qp=(t,e)=>[[t[0]-e,t[0]+e],[t[1]-e,t[1]+e]];function cd(t,e){return function(){return t.apply(e,arguments)}}const{toString:Jp}=Object.prototype,{getPrototypeOf:nc}=Object,lo=(t=>e=>{const n=Jp.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Tt=t=>(t=t.toLowerCase(),e=>lo(e)===t),uo=t=>e=>typeof e===t,{isArray:Ar}=Array,hi=uo("undefined");function Xp(t){return t!==null&&!hi(t)&&t.constructor!==null&&!hi(t.constructor)&&nt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const ld=Tt("ArrayBuffer");function Yp(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&ld(t.buffer),e}const e0=uo("string"),nt=uo("function"),ud=uo("number"),fo=t=>t!==null&&typeof t=="object",t0=t=>t===!0||t===!1,Ts=t=>{if(lo(t)!=="object")return!1;const e=nc(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},n0=Tt("Date"),r0=Tt("File"),i0=Tt("Blob"),s0=Tt("FileList"),o0=t=>fo(t)&&nt(t.pipe),a0=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||nt(t.append)&&((e=lo(t))==="formdata"||e==="object"&&nt(t.toString)&&t.toString()==="[object FormData]"))},c0=Tt("URLSearchParams"),l0=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ki(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),Ar(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{const s=n?Object.getOwnPropertyNames(t):Object.keys(t),o=s.length;let a;for(r=0;r<o;r++)a=s[r],e.call(null,t[a],a,t)}}function dd(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,i;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const fd=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,hd=t=>!hi(t)&&t!==fd;function ra(){const{caseless:t}=hd(this)&&this||{},e={},n=(r,i)=>{const s=t&&dd(e,i)||i;Ts(e[s])&&Ts(r)?e[s]=ra(e[s],r):Ts(r)?e[s]=ra({},r):Ar(r)?e[s]=r.slice():e[s]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&ki(arguments[r],n);return e}const u0=(t,e,n,{allOwnKeys:r}={})=>(ki(e,(i,s)=>{n&&nt(i)?t[s]=cd(i,n):t[s]=i},{allOwnKeys:r}),t),d0=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),f0=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},h0=(t,e,n,r)=>{let i,s,o;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),s=i.length;s-- >0;)o=i[s],(!r||r(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=n!==!1&&nc(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},p0=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},m0=t=>{if(!t)return null;if(Ar(t))return t;let e=t.length;if(!ud(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},g0=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&nc(Uint8Array)),v0=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const s=i.value;e.call(t,s[0],s[1])}},y0=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},b0=Tt("HTMLFormElement"),w0=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Wc=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),S0=Tt("RegExp"),pd=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};ki(n,(i,s)=>{let o;(o=e(i,s,t))!==!1&&(r[s]=o||i)}),Object.defineProperties(t,r)},C0=t=>{pd(t,(e,n)=>{if(nt(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(nt(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},_0=(t,e)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return Ar(t)?r(t):r(String(t).split(e)),n},E0=()=>{},x0=(t,e)=>(t=+t,Number.isFinite(t)?t:e),To="abcdefghijklmnopqrstuvwxyz",Zc="0123456789",md={DIGIT:Zc,ALPHA:To,ALPHA_DIGIT:To+To.toUpperCase()+Zc},O0=(t=16,e=md.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function P0(t){return!!(t&&nt(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const T0=t=>{const e=new Array(10),n=(r,i)=>{if(fo(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const s=Ar(r)?[]:{};return ki(r,(o,a)=>{const c=n(o,i+1);!hi(c)&&(s[a]=c)}),e[i]=void 0,s}}return r};return n(t,0)},A0=Tt("AsyncFunction"),L0=t=>t&&(fo(t)||nt(t))&&nt(t.then)&&nt(t.catch),k={isArray:Ar,isArrayBuffer:ld,isBuffer:Xp,isFormData:a0,isArrayBufferView:Yp,isString:e0,isNumber:ud,isBoolean:t0,isObject:fo,isPlainObject:Ts,isUndefined:hi,isDate:n0,isFile:r0,isBlob:i0,isRegExp:S0,isFunction:nt,isStream:o0,isURLSearchParams:c0,isTypedArray:g0,isFileList:s0,forEach:ki,merge:ra,extend:u0,trim:l0,stripBOM:d0,inherits:f0,toFlatObject:h0,kindOf:lo,kindOfTest:Tt,endsWith:p0,toArray:m0,forEachEntry:v0,matchAll:y0,isHTMLForm:b0,hasOwnProperty:Wc,hasOwnProp:Wc,reduceDescriptors:pd,freezeMethods:C0,toObjectSet:_0,toCamelCase:w0,noop:E0,toFiniteNumber:x0,findKey:dd,global:fd,isContextDefined:hd,ALPHABET:md,generateString:O0,isSpecCompliantForm:P0,toJSONObject:T0,isAsyncFn:A0,isThenable:L0};function ne(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}k.inherits(ne,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:k.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const gd=ne.prototype,vd={};["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(t=>{vd[t]={value:t}});Object.defineProperties(ne,vd);Object.defineProperty(gd,"isAxiosError",{value:!0});ne.from=(t,e,n,r,i,s)=>{const o=Object.create(gd);return k.toFlatObject(t,o,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),ne.call(o,t.message,e,n,r,i),o.cause=t,o.name=t.name,s&&Object.assign(o,s),o};const R0=null;function ia(t){return k.isPlainObject(t)||k.isArray(t)}function yd(t){return k.endsWith(t,"[]")?t.slice(0,-2):t}function Kc(t,e,n){return t?t.concat(e).map(function(i,s){return i=yd(i),!n&&s?"["+i+"]":i}).join(n?".":""):e}function k0(t){return k.isArray(t)&&!t.some(ia)}const M0=k.toFlatObject(k,{},null,function(e){return/^is[A-Z]/.test(e)});function ho(t,e,n){if(!k.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=k.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,w){return!k.isUndefined(w[f])});const r=n.metaTokens,i=n.visitor||u,s=n.dots,o=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&k.isSpecCompliantForm(e);if(!k.isFunction(i))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(k.isDate(m))return m.toISOString();if(!c&&k.isBlob(m))throw new ne("Blob is not supported. Use a Buffer instead.");return k.isArrayBuffer(m)||k.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,f,w){let y=m;if(m&&!w&&typeof m=="object"){if(k.endsWith(f,"{}"))f=r?f:f.slice(0,-2),m=JSON.stringify(m);else if(k.isArray(m)&&k0(m)||(k.isFileList(m)||k.endsWith(f,"[]"))&&(y=k.toArray(m)))return f=yd(f),y.forEach(function(b,E){!(k.isUndefined(b)||b===null)&&e.append(o===!0?Kc([f],E,s):o===null?f:f+"[]",l(b))}),!1}return ia(m)?!0:(e.append(Kc(w,f,s),l(m)),!1)}const d=[],h=Object.assign(M0,{defaultVisitor:u,convertValue:l,isVisitable:ia});function v(m,f){if(!k.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+f.join("."));d.push(m),k.forEach(m,function(y,C){(!(k.isUndefined(y)||y===null)&&i.call(e,y,k.isString(C)?C.trim():C,f,h))===!0&&v(y,f?f.concat(C):[C])}),d.pop()}}if(!k.isObject(t))throw new TypeError("data must be an object");return v(t),e}function Qc(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function rc(t,e){this._pairs=[],t&&ho(t,this,e)}const bd=rc.prototype;bd.append=function(e,n){this._pairs.push([e,n])};bd.toString=function(e){const n=e?function(r){return e.call(this,r,Qc)}:Qc;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function D0(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function wd(t,e,n){if(!e)return t;const r=n&&n.encode||D0,i=n&&n.serialize;let s;if(i?s=i(e,n):s=k.isURLSearchParams(e)?e.toString():new rc(e,n).toString(r),s){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class Jc{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){k.forEach(this.handlers,function(r){r!==null&&e(r)})}}const Sd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},N0=typeof URLSearchParams<"u"?URLSearchParams:rc,j0=typeof FormData<"u"?FormData:null,I0=typeof Blob<"u"?Blob:null,F0={isBrowser:!0,classes:{URLSearchParams:N0,FormData:j0,Blob:I0},protocols:["http","https","file","blob","url","data"]},Cd=typeof window<"u"&&typeof document<"u",B0=(t=>Cd&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),V0=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",H0=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Cd,hasStandardBrowserEnv:B0,hasStandardBrowserWebWorkerEnv:V0},Symbol.toStringTag,{value:"Module"})),Et={...H0,...F0};function U0(t,e){return ho(t,new Et.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,s){return Et.isNode&&k.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function $0(t){return k.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function z0(t){const e={},n=Object.keys(t);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],e[s]=t[s];return e}function _d(t){function e(n,r,i,s){let o=n[s++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),c=s>=n.length;return o=!o&&k.isArray(i)?i.length:o,c?(k.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!a):((!i[o]||!k.isObject(i[o]))&&(i[o]=[]),e(n,r,i[o],s)&&k.isArray(i[o])&&(i[o]=z0(i[o])),!a)}if(k.isFormData(t)&&k.isFunction(t.entries)){const n={};return k.forEachEntry(t,(r,i)=>{e($0(r),i,n,0)}),n}return null}function q0(t,e,n){if(k.isString(t))try{return(e||JSON.parse)(t),k.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const ic={transitional:Sd,adapter:["xhr","http"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=k.isObject(e);if(s&&k.isHTMLForm(e)&&(e=new FormData(e)),k.isFormData(e))return i?JSON.stringify(_d(e)):e;if(k.isArrayBuffer(e)||k.isBuffer(e)||k.isStream(e)||k.isFile(e)||k.isBlob(e))return e;if(k.isArrayBufferView(e))return e.buffer;if(k.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return U0(e,this.formSerializer).toString();if((a=k.isFileList(e))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ho(a?{"files[]":e}:e,c&&new c,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),q0(e)):e}],transformResponse:[function(e){const n=this.transitional||ic.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(e&&k.isString(e)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?ne.from(a,ne.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Et.classes.FormData,Blob:Et.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};k.forEach(["delete","get","head","post","put","patch"],t=>{ic.headers[t]={}});const sc=ic,G0=k.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"]),W0=t=>{const e={};let n,r,i;return t&&t.split(`
18
- `).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||e[n]&&G0[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Xc=Symbol("internals");function Fr(t){return t&&String(t).trim().toLowerCase()}function As(t){return t===!1||t==null?t:k.isArray(t)?t.map(As):String(t)}function Z0(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const K0=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ao(t,e,n,r,i){if(k.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!k.isString(e)){if(k.isString(r))return e.indexOf(r)!==-1;if(k.isRegExp(r))return r.test(e)}}function Q0(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function J0(t,e){const n=k.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,s,o){return this[r].call(this,e,i,s,o)},configurable:!0})})}class po{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function s(a,c,l){const u=Fr(c);if(!u)throw new Error("header name must be a non-empty string");const d=k.findKey(i,u);(!d||i[d]===void 0||l===!0||l===void 0&&i[d]!==!1)&&(i[d||c]=As(a))}const o=(a,c)=>k.forEach(a,(l,u)=>s(l,u,c));return k.isPlainObject(e)||e instanceof this.constructor?o(e,n):k.isString(e)&&(e=e.trim())&&!K0(e)?o(W0(e),n):e!=null&&s(n,e,r),this}get(e,n){if(e=Fr(e),e){const r=k.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return Z0(i);if(k.isFunction(n))return n.call(this,i,r);if(k.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Fr(e),e){const r=k.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||Ao(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function s(o){if(o=Fr(o),o){const a=k.findKey(r,o);a&&(!n||Ao(r,r[a],a,n))&&(delete r[a],i=!0)}}return k.isArray(e)?e.forEach(s):s(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!e||Ao(this,this[s],s,e,!0))&&(delete this[s],i=!0)}return i}normalize(e){const n=this,r={};return k.forEach(this,(i,s)=>{const o=k.findKey(r,s);if(o){n[o]=As(i),delete n[s];return}const a=e?Q0(s):String(s).trim();a!==s&&delete n[s],n[a]=As(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return k.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&k.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
19
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[Xc]=this[Xc]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=Fr(o);r[a]||(J0(i,o),r[a]=!0)}return k.isArray(e)?e.forEach(s):s(e),this}}po.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);k.reduceDescriptors(po.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});k.freezeMethods(po);const Ut=po;function Lo(t,e){const n=this||sc,r=e||n,i=Ut.from(r.headers);let s=r.data;return k.forEach(t,function(a){s=a.call(n,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function Ed(t){return!!(t&&t.__CANCEL__)}function Mi(t,e,n){ne.call(this,t??"canceled",ne.ERR_CANCELED,e,n),this.name="CanceledError"}k.inherits(Mi,ne,{__CANCEL__:!0});function X0(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new ne("Request failed with status code "+n.status,[ne.ERR_BAD_REQUEST,ne.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Y0=Et.hasStandardBrowserEnv?{write(t,e,n,r,i,s){const o=[t+"="+encodeURIComponent(e)];k.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),k.isString(r)&&o.push("path="+r),k.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function em(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function tm(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function xd(t,e){return t&&!em(e)?tm(t,e):e}const nm=Et.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(s){let o=s;return e&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(o){const a=k.isString(o)?i(o):o;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function rm(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function im(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,s=0,o;return e=e!==void 0?e:1e3,function(c){const l=Date.now(),u=r[s];o||(o=l),n[i]=c,r[i]=l;let d=s,h=0;for(;d!==i;)h+=n[d++],d=d%t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),l-o<e)return;const v=u&&l-u;return v?Math.round(h*1e3/v):void 0}}function Yc(t,e){let n=0;const r=im(50,250);return i=>{const s=i.loaded,o=i.lengthComputable?i.total:void 0,a=s-n,c=r(a),l=s<=o;n=s;const u={loaded:s,total:o,progress:o?s/o:void 0,bytes:a,rate:c||void 0,estimated:c&&o&&l?(o-s)/c:void 0,event:i};u[e?"download":"upload"]=!0,t(u)}}const sm=typeof XMLHttpRequest<"u",om=sm&&function(t){return new Promise(function(n,r){let i=t.data;const s=Ut.from(t.headers).normalize();let{responseType:o,withXSRFToken:a}=t,c;function l(){t.cancelToken&&t.cancelToken.unsubscribe(c),t.signal&&t.signal.removeEventListener("abort",c)}let u;if(k.isFormData(i)){if(Et.hasStandardBrowserEnv||Et.hasStandardBrowserWebWorkerEnv)s.setContentType(!1);else if((u=s.getContentType())!==!1){const[f,...w]=u?u.split(";").map(y=>y.trim()).filter(Boolean):[];s.setContentType([f||"multipart/form-data",...w].join("; "))}}let d=new XMLHttpRequest;if(t.auth){const f=t.auth.username||"",w=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";s.set("Authorization","Basic "+btoa(f+":"+w))}const h=xd(t.baseURL,t.url);d.open(t.method.toUpperCase(),wd(h,t.params,t.paramsSerializer),!0),d.timeout=t.timeout;function v(){if(!d)return;const f=Ut.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),y={data:!o||o==="text"||o==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:f,config:t,request:d};X0(function(b){n(b),l()},function(b){r(b),l()},y),d=null}if("onloadend"in d?d.onloadend=v:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(v)},d.onabort=function(){d&&(r(new ne("Request aborted",ne.ECONNABORTED,t,d)),d=null)},d.onerror=function(){r(new ne("Network Error",ne.ERR_NETWORK,t,d)),d=null},d.ontimeout=function(){let w=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const y=t.transitional||Sd;t.timeoutErrorMessage&&(w=t.timeoutErrorMessage),r(new ne(w,y.clarifyTimeoutError?ne.ETIMEDOUT:ne.ECONNABORTED,t,d)),d=null},Et.hasStandardBrowserEnv&&(a&&k.isFunction(a)&&(a=a(t)),a||a!==!1&&nm(h))){const f=t.xsrfHeaderName&&t.xsrfCookieName&&Y0.read(t.xsrfCookieName);f&&s.set(t.xsrfHeaderName,f)}i===void 0&&s.setContentType(null),"setRequestHeader"in d&&k.forEach(s.toJSON(),function(w,y){d.setRequestHeader(y,w)}),k.isUndefined(t.withCredentials)||(d.withCredentials=!!t.withCredentials),o&&o!=="json"&&(d.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&d.addEventListener("progress",Yc(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",Yc(t.onUploadProgress)),(t.cancelToken||t.signal)&&(c=f=>{d&&(r(!f||f.type?new Mi(null,t,d):f),d.abort(),d=null)},t.cancelToken&&t.cancelToken.subscribe(c),t.signal&&(t.signal.aborted?c():t.signal.addEventListener("abort",c)));const m=rm(h);if(m&&Et.protocols.indexOf(m)===-1){r(new ne("Unsupported protocol "+m+":",ne.ERR_BAD_REQUEST,t));return}d.send(i||null)})},sa={http:R0,xhr:om};k.forEach(sa,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const el=t=>`- ${t}`,am=t=>k.isFunction(t)||t===null||t===!1,Od={getAdapter:t=>{t=k.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let s=0;s<e;s++){n=t[s];let o;if(r=n,!am(n)&&(r=sa[(o=String(n)).toLowerCase()],r===void 0))throw new ne(`Unknown adapter '${o}'`);if(r)break;i[o||"#"+s]=r}if(!r){const s=Object.entries(i).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=e?s.length>1?`since :
17
+ */var co=p,Sp=wp;function Cp(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var _p=typeof Object.is=="function"?Object.is:Cp,Ep=Sp.useSyncExternalStore,xp=co.useRef,Op=co.useEffect,Pp=co.useMemo,Tp=co.useDebugValue;id.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var s=xp(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=Pp(function(){function c(v){if(!l){if(l=!0,u=v,v=r(v),i!==void 0&&o.hasValue){var m=o.value;if(i(m,v))return d=m}return d=v}if(m=d,_p(u,v))return m;var f=r(v);return i!==void 0&&i(m,f)?m:(u=v,d=f)}var l=!1,u,d,h=n===void 0?null:n;return[function(){return c(e())},h===null?void 0:function(){return c(h())}]},[e,n,r,i]);var a=Ep(t,s[0],s[1]);return Op(function(){o.hasValue=!0,o.value=a},[a]),Tp(a),a};rd.exports=id;var Ap=rd.exports;const Rp=ao(Ap);var ad={VITE_API_BASE_URL:"https://ecomgate.omnic.solutions/api/1.0.0/type-1/public/",VITE_GEO_API_BASE_URL:"https://api.geo-data.omnic.solutions/api/1.0/",VITE_YMAPS_KEY:"5298a725-4baa-457a-a2a7-c3abac81db20",VITE_GMAP_KEY:"AIzaSyDsI0AO8VsUrTPoyR9fF7T31FKx1a9TLO0",VITE_GMAP_ID:"e130cd87a3f1b9cbe3cb5de4",VITE_TOKEN:"fa812020-3197-401a-9b39-345999046111",VITE_TOLGEE_API_URL:"https://tms.omnic.solutions",VITE_TOLGEE_API_KEY:"tgpak_gfpwentkga2g4zdngbzwozdinvztezlknu4xmnlpnbrgc",VITE_CJS_IGNORE_WARNING:"true",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:Lp}=p,{useSyncExternalStoreWithSelector:kp}=Rp;let qc=!1;const Mp=t=>t;function Dp(t,e=Mp,n){(ad?"production":void 0)!=="production"&&n&&!qc&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),qc=!0);const r=kp(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return Lp(r),r}const Gc=t=>{(ad?"production":void 0)!=="production"&&typeof t!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof t=="function"?up(t):t,n=(r,i)=>Dp(e,r,i);return Object.assign(n,e),n},zt=t=>t?Gc(t):Gc,Np={location:null,warehousePoint:null},ec=t=>t.location,xe=zt()(t=>({...Np,setDeliverPoint(e){t({location:e})},setWarehousePoint(e){t({warehousePoint:e})}})),jp={map:null,mode:"self_pickup",bounds:null,loaded:!1,loading:!0,detailsOpen:!1,isIdle:!1},Ip=t=>t.map,Fp=t=>t.mode,Bp=t=>t.bounds,Vp=t=>t.loaded,Hp=t=>t.loading,tc=t=>t.detailsOpen,X=zt()(t=>({...jp,setLoaded(){t({loaded:!0,loading:!1})},setMode(e){t({mode:e})},setBounds(e){t({bounds:e})},setDetailsOpen(e){t({detailsOpen:e})},setMap(e){t({map:e})},setIdle(e){t({isIdle:e})}})),Up={isTrackingEnabled:!1,location:null},$p=t=>t.location,Ke=zt()(t=>({...Up,setSelectedLocation(e){t({location:e})},setIsTrackingEnabled(e){t({isTrackingEnabled:e})}})),zp={query:"",type:It.All,hours:["08:00","22:00"],send:{[pt.Return]:!1,[pt.Payment]:!1,[pt.Shipping]:!1},receive:{[ht.PayByCash]:!1,[ht.CheckOrder]:!1,[ht.DressingRoom]:!1}},qp=t=>t.type,Gp=t=>t.send,Wp=t=>t.receive,pn=zt(t=>({...zp,setFilter(e){X.getState().setDetailsOpen(!1),xe.getState().setDeliverPoint(null),Ke.getState().setSelectedLocation(null),t(e)}})),Zp=t=>{const[e,n]=t.split(":");return Number(e)*60+Number(n)},Kp=t=>{const e=Math.floor(t/60),n=t%60;return`${e<10?`0${e}`:e}:${n<10?`0${n}`:n}`},Qp=(t,e)=>[[t[0]-e,t[0]+e],[t[1]-e,t[1]+e]];function cd(t,e){return function(){return t.apply(e,arguments)}}const{toString:Jp}=Object.prototype,{getPrototypeOf:nc}=Object,lo=(t=>e=>{const n=Jp.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Rt=t=>(t=t.toLowerCase(),e=>lo(e)===t),uo=t=>e=>typeof e===t,{isArray:Tr}=Array,hi=uo("undefined");function Xp(t){return t!==null&&!hi(t)&&t.constructor!==null&&!hi(t.constructor)&&rt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const ld=Rt("ArrayBuffer");function Yp(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&ld(t.buffer),e}const e0=uo("string"),rt=uo("function"),ud=uo("number"),fo=t=>t!==null&&typeof t=="object",t0=t=>t===!0||t===!1,Ts=t=>{if(lo(t)!=="object")return!1;const e=nc(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},n0=Rt("Date"),r0=Rt("File"),i0=Rt("Blob"),s0=Rt("FileList"),o0=t=>fo(t)&&rt(t.pipe),a0=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||rt(t.append)&&((e=lo(t))==="formdata"||e==="object"&&rt(t.toString)&&t.toString()==="[object FormData]"))},c0=Rt("URLSearchParams"),l0=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ki(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),Tr(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{const s=n?Object.getOwnPropertyNames(t):Object.keys(t),o=s.length;let a;for(r=0;r<o;r++)a=s[r],e.call(null,t[a],a,t)}}function dd(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,i;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const fd=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,hd=t=>!hi(t)&&t!==fd;function ra(){const{caseless:t}=hd(this)&&this||{},e={},n=(r,i)=>{const s=t&&dd(e,i)||i;Ts(e[s])&&Ts(r)?e[s]=ra(e[s],r):Ts(r)?e[s]=ra({},r):Tr(r)?e[s]=r.slice():e[s]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&ki(arguments[r],n);return e}const u0=(t,e,n,{allOwnKeys:r}={})=>(ki(e,(i,s)=>{n&&rt(i)?t[s]=cd(i,n):t[s]=i},{allOwnKeys:r}),t),d0=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),f0=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},h0=(t,e,n,r)=>{let i,s,o;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),s=i.length;s-- >0;)o=i[s],(!r||r(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=n!==!1&&nc(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},p0=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},m0=t=>{if(!t)return null;if(Tr(t))return t;let e=t.length;if(!ud(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},g0=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&nc(Uint8Array)),v0=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const s=i.value;e.call(t,s[0],s[1])}},y0=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},b0=Rt("HTMLFormElement"),w0=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Wc=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),S0=Rt("RegExp"),pd=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};ki(n,(i,s)=>{let o;(o=e(i,s,t))!==!1&&(r[s]=o||i)}),Object.defineProperties(t,r)},C0=t=>{pd(t,(e,n)=>{if(rt(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(rt(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},_0=(t,e)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return Tr(t)?r(t):r(String(t).split(e)),n},E0=()=>{},x0=(t,e)=>(t=+t,Number.isFinite(t)?t:e),To="abcdefghijklmnopqrstuvwxyz",Zc="0123456789",md={DIGIT:Zc,ALPHA:To,ALPHA_DIGIT:To+To.toUpperCase()+Zc},O0=(t=16,e=md.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function P0(t){return!!(t&&rt(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const T0=t=>{const e=new Array(10),n=(r,i)=>{if(fo(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const s=Tr(r)?[]:{};return ki(r,(o,a)=>{const c=n(o,i+1);!hi(c)&&(s[a]=c)}),e[i]=void 0,s}}return r};return n(t,0)},A0=Rt("AsyncFunction"),R0=t=>t&&(fo(t)||rt(t))&&rt(t.then)&&rt(t.catch),k={isArray:Tr,isArrayBuffer:ld,isBuffer:Xp,isFormData:a0,isArrayBufferView:Yp,isString:e0,isNumber:ud,isBoolean:t0,isObject:fo,isPlainObject:Ts,isUndefined:hi,isDate:n0,isFile:r0,isBlob:i0,isRegExp:S0,isFunction:rt,isStream:o0,isURLSearchParams:c0,isTypedArray:g0,isFileList:s0,forEach:ki,merge:ra,extend:u0,trim:l0,stripBOM:d0,inherits:f0,toFlatObject:h0,kindOf:lo,kindOfTest:Rt,endsWith:p0,toArray:m0,forEachEntry:v0,matchAll:y0,isHTMLForm:b0,hasOwnProperty:Wc,hasOwnProp:Wc,reduceDescriptors:pd,freezeMethods:C0,toObjectSet:_0,toCamelCase:w0,noop:E0,toFiniteNumber:x0,findKey:dd,global:fd,isContextDefined:hd,ALPHABET:md,generateString:O0,isSpecCompliantForm:P0,toJSONObject:T0,isAsyncFn:A0,isThenable:R0};function te(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}k.inherits(te,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:k.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const gd=te.prototype,vd={};["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(t=>{vd[t]={value:t}});Object.defineProperties(te,vd);Object.defineProperty(gd,"isAxiosError",{value:!0});te.from=(t,e,n,r,i,s)=>{const o=Object.create(gd);return k.toFlatObject(t,o,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),te.call(o,t.message,e,n,r,i),o.cause=t,o.name=t.name,s&&Object.assign(o,s),o};const L0=null;function ia(t){return k.isPlainObject(t)||k.isArray(t)}function yd(t){return k.endsWith(t,"[]")?t.slice(0,-2):t}function Kc(t,e,n){return t?t.concat(e).map(function(i,s){return i=yd(i),!n&&s?"["+i+"]":i}).join(n?".":""):e}function k0(t){return k.isArray(t)&&!t.some(ia)}const M0=k.toFlatObject(k,{},null,function(e){return/^is[A-Z]/.test(e)});function ho(t,e,n){if(!k.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=k.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,w){return!k.isUndefined(w[f])});const r=n.metaTokens,i=n.visitor||u,s=n.dots,o=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&k.isSpecCompliantForm(e);if(!k.isFunction(i))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(k.isDate(m))return m.toISOString();if(!c&&k.isBlob(m))throw new te("Blob is not supported. Use a Buffer instead.");return k.isArrayBuffer(m)||k.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,f,w){let y=m;if(m&&!w&&typeof m=="object"){if(k.endsWith(f,"{}"))f=r?f:f.slice(0,-2),m=JSON.stringify(m);else if(k.isArray(m)&&k0(m)||(k.isFileList(m)||k.endsWith(f,"[]"))&&(y=k.toArray(m)))return f=yd(f),y.forEach(function(b,E){!(k.isUndefined(b)||b===null)&&e.append(o===!0?Kc([f],E,s):o===null?f:f+"[]",l(b))}),!1}return ia(m)?!0:(e.append(Kc(w,f,s),l(m)),!1)}const d=[],h=Object.assign(M0,{defaultVisitor:u,convertValue:l,isVisitable:ia});function v(m,f){if(!k.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+f.join("."));d.push(m),k.forEach(m,function(y,C){(!(k.isUndefined(y)||y===null)&&i.call(e,y,k.isString(C)?C.trim():C,f,h))===!0&&v(y,f?f.concat(C):[C])}),d.pop()}}if(!k.isObject(t))throw new TypeError("data must be an object");return v(t),e}function Qc(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function rc(t,e){this._pairs=[],t&&ho(t,this,e)}const bd=rc.prototype;bd.append=function(e,n){this._pairs.push([e,n])};bd.toString=function(e){const n=e?function(r){return e.call(this,r,Qc)}:Qc;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function D0(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function wd(t,e,n){if(!e)return t;const r=n&&n.encode||D0,i=n&&n.serialize;let s;if(i?s=i(e,n):s=k.isURLSearchParams(e)?e.toString():new rc(e,n).toString(r),s){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class Jc{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){k.forEach(this.handlers,function(r){r!==null&&e(r)})}}const Sd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},N0=typeof URLSearchParams<"u"?URLSearchParams:rc,j0=typeof FormData<"u"?FormData:null,I0=typeof Blob<"u"?Blob:null,F0={isBrowser:!0,classes:{URLSearchParams:N0,FormData:j0,Blob:I0},protocols:["http","https","file","blob","url","data"]},Cd=typeof window<"u"&&typeof document<"u",B0=(t=>Cd&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),V0=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",H0=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Cd,hasStandardBrowserEnv:B0,hasStandardBrowserWebWorkerEnv:V0},Symbol.toStringTag,{value:"Module"})),xt={...H0,...F0};function U0(t,e){return ho(t,new xt.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,s){return xt.isNode&&k.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function $0(t){return k.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function z0(t){const e={},n=Object.keys(t);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],e[s]=t[s];return e}function _d(t){function e(n,r,i,s){let o=n[s++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),c=s>=n.length;return o=!o&&k.isArray(i)?i.length:o,c?(k.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!a):((!i[o]||!k.isObject(i[o]))&&(i[o]=[]),e(n,r,i[o],s)&&k.isArray(i[o])&&(i[o]=z0(i[o])),!a)}if(k.isFormData(t)&&k.isFunction(t.entries)){const n={};return k.forEachEntry(t,(r,i)=>{e($0(r),i,n,0)}),n}return null}function q0(t,e,n){if(k.isString(t))try{return(e||JSON.parse)(t),k.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const ic={transitional:Sd,adapter:["xhr","http"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=k.isObject(e);if(s&&k.isHTMLForm(e)&&(e=new FormData(e)),k.isFormData(e))return i?JSON.stringify(_d(e)):e;if(k.isArrayBuffer(e)||k.isBuffer(e)||k.isStream(e)||k.isFile(e)||k.isBlob(e))return e;if(k.isArrayBufferView(e))return e.buffer;if(k.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return U0(e,this.formSerializer).toString();if((a=k.isFileList(e))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ho(a?{"files[]":e}:e,c&&new c,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),q0(e)):e}],transformResponse:[function(e){const n=this.transitional||ic.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(e&&k.isString(e)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?te.from(a,te.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xt.classes.FormData,Blob:xt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};k.forEach(["delete","get","head","post","put","patch"],t=>{ic.headers[t]={}});const sc=ic,G0=k.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"]),W0=t=>{const e={};let n,r,i;return t&&t.split(`
18
+ `).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||e[n]&&G0[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Xc=Symbol("internals");function Ir(t){return t&&String(t).trim().toLowerCase()}function As(t){return t===!1||t==null?t:k.isArray(t)?t.map(As):String(t)}function Z0(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const K0=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ao(t,e,n,r,i){if(k.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!k.isString(e)){if(k.isString(r))return e.indexOf(r)!==-1;if(k.isRegExp(r))return r.test(e)}}function Q0(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function J0(t,e){const n=k.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,s,o){return this[r].call(this,e,i,s,o)},configurable:!0})})}class po{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function s(a,c,l){const u=Ir(c);if(!u)throw new Error("header name must be a non-empty string");const d=k.findKey(i,u);(!d||i[d]===void 0||l===!0||l===void 0&&i[d]!==!1)&&(i[d||c]=As(a))}const o=(a,c)=>k.forEach(a,(l,u)=>s(l,u,c));return k.isPlainObject(e)||e instanceof this.constructor?o(e,n):k.isString(e)&&(e=e.trim())&&!K0(e)?o(W0(e),n):e!=null&&s(n,e,r),this}get(e,n){if(e=Ir(e),e){const r=k.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return Z0(i);if(k.isFunction(n))return n.call(this,i,r);if(k.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Ir(e),e){const r=k.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||Ao(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function s(o){if(o=Ir(o),o){const a=k.findKey(r,o);a&&(!n||Ao(r,r[a],a,n))&&(delete r[a],i=!0)}}return k.isArray(e)?e.forEach(s):s(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!e||Ao(this,this[s],s,e,!0))&&(delete this[s],i=!0)}return i}normalize(e){const n=this,r={};return k.forEach(this,(i,s)=>{const o=k.findKey(r,s);if(o){n[o]=As(i),delete n[s];return}const a=e?Q0(s):String(s).trim();a!==s&&delete n[s],n[a]=As(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return k.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&k.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
19
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[Xc]=this[Xc]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=Ir(o);r[a]||(J0(i,o),r[a]=!0)}return k.isArray(e)?e.forEach(s):s(e),this}}po.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);k.reduceDescriptors(po.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});k.freezeMethods(po);const $t=po;function Ro(t,e){const n=this||sc,r=e||n,i=$t.from(r.headers);let s=r.data;return k.forEach(t,function(a){s=a.call(n,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function Ed(t){return!!(t&&t.__CANCEL__)}function Mi(t,e,n){te.call(this,t??"canceled",te.ERR_CANCELED,e,n),this.name="CanceledError"}k.inherits(Mi,te,{__CANCEL__:!0});function X0(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new te("Request failed with status code "+n.status,[te.ERR_BAD_REQUEST,te.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Y0=xt.hasStandardBrowserEnv?{write(t,e,n,r,i,s){const o=[t+"="+encodeURIComponent(e)];k.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),k.isString(r)&&o.push("path="+r),k.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function em(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function tm(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function xd(t,e){return t&&!em(e)?tm(t,e):e}const nm=xt.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(s){let o=s;return e&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(o){const a=k.isString(o)?i(o):o;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function rm(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function im(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,s=0,o;return e=e!==void 0?e:1e3,function(c){const l=Date.now(),u=r[s];o||(o=l),n[i]=c,r[i]=l;let d=s,h=0;for(;d!==i;)h+=n[d++],d=d%t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),l-o<e)return;const v=u&&l-u;return v?Math.round(h*1e3/v):void 0}}function Yc(t,e){let n=0;const r=im(50,250);return i=>{const s=i.loaded,o=i.lengthComputable?i.total:void 0,a=s-n,c=r(a),l=s<=o;n=s;const u={loaded:s,total:o,progress:o?s/o:void 0,bytes:a,rate:c||void 0,estimated:c&&o&&l?(o-s)/c:void 0,event:i};u[e?"download":"upload"]=!0,t(u)}}const sm=typeof XMLHttpRequest<"u",om=sm&&function(t){return new Promise(function(n,r){let i=t.data;const s=$t.from(t.headers).normalize();let{responseType:o,withXSRFToken:a}=t,c;function l(){t.cancelToken&&t.cancelToken.unsubscribe(c),t.signal&&t.signal.removeEventListener("abort",c)}let u;if(k.isFormData(i)){if(xt.hasStandardBrowserEnv||xt.hasStandardBrowserWebWorkerEnv)s.setContentType(!1);else if((u=s.getContentType())!==!1){const[f,...w]=u?u.split(";").map(y=>y.trim()).filter(Boolean):[];s.setContentType([f||"multipart/form-data",...w].join("; "))}}let d=new XMLHttpRequest;if(t.auth){const f=t.auth.username||"",w=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";s.set("Authorization","Basic "+btoa(f+":"+w))}const h=xd(t.baseURL,t.url);d.open(t.method.toUpperCase(),wd(h,t.params,t.paramsSerializer),!0),d.timeout=t.timeout;function v(){if(!d)return;const f=$t.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),y={data:!o||o==="text"||o==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:f,config:t,request:d};X0(function(b){n(b),l()},function(b){r(b),l()},y),d=null}if("onloadend"in d?d.onloadend=v:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(v)},d.onabort=function(){d&&(r(new te("Request aborted",te.ECONNABORTED,t,d)),d=null)},d.onerror=function(){r(new te("Network Error",te.ERR_NETWORK,t,d)),d=null},d.ontimeout=function(){let w=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const y=t.transitional||Sd;t.timeoutErrorMessage&&(w=t.timeoutErrorMessage),r(new te(w,y.clarifyTimeoutError?te.ETIMEDOUT:te.ECONNABORTED,t,d)),d=null},xt.hasStandardBrowserEnv&&(a&&k.isFunction(a)&&(a=a(t)),a||a!==!1&&nm(h))){const f=t.xsrfHeaderName&&t.xsrfCookieName&&Y0.read(t.xsrfCookieName);f&&s.set(t.xsrfHeaderName,f)}i===void 0&&s.setContentType(null),"setRequestHeader"in d&&k.forEach(s.toJSON(),function(w,y){d.setRequestHeader(y,w)}),k.isUndefined(t.withCredentials)||(d.withCredentials=!!t.withCredentials),o&&o!=="json"&&(d.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&d.addEventListener("progress",Yc(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",Yc(t.onUploadProgress)),(t.cancelToken||t.signal)&&(c=f=>{d&&(r(!f||f.type?new Mi(null,t,d):f),d.abort(),d=null)},t.cancelToken&&t.cancelToken.subscribe(c),t.signal&&(t.signal.aborted?c():t.signal.addEventListener("abort",c)));const m=rm(h);if(m&&xt.protocols.indexOf(m)===-1){r(new te("Unsupported protocol "+m+":",te.ERR_BAD_REQUEST,t));return}d.send(i||null)})},sa={http:L0,xhr:om};k.forEach(sa,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const el=t=>`- ${t}`,am=t=>k.isFunction(t)||t===null||t===!1,Od={getAdapter:t=>{t=k.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let s=0;s<e;s++){n=t[s];let o;if(r=n,!am(n)&&(r=sa[(o=String(n)).toLowerCase()],r===void 0))throw new te(`Unknown adapter '${o}'`);if(r)break;i[o||"#"+s]=r}if(!r){const s=Object.entries(i).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=e?s.length>1?`since :
20
20
  `+s.map(el).join(`
21
- `):" "+el(s[0]):"as no adapter specified";throw new ne("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:sa};function Ro(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Mi(null,t)}function tl(t){return Ro(t),t.headers=Ut.from(t.headers),t.data=Lo.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Od.getAdapter(t.adapter||sc.adapter)(t).then(function(r){return Ro(t),r.data=Lo.call(t,t.transformResponse,r),r.headers=Ut.from(r.headers),r},function(r){return Ed(r)||(Ro(t),r&&r.response&&(r.response.data=Lo.call(t,t.transformResponse,r.response),r.response.headers=Ut.from(r.response.headers))),Promise.reject(r)})}const nl=t=>t instanceof Ut?{...t}:t;function Er(t,e){e=e||{};const n={};function r(l,u,d){return k.isPlainObject(l)&&k.isPlainObject(u)?k.merge.call({caseless:d},l,u):k.isPlainObject(u)?k.merge({},u):k.isArray(u)?u.slice():u}function i(l,u,d){if(k.isUndefined(u)){if(!k.isUndefined(l))return r(void 0,l,d)}else return r(l,u,d)}function s(l,u){if(!k.isUndefined(u))return r(void 0,u)}function o(l,u){if(k.isUndefined(u)){if(!k.isUndefined(l))return r(void 0,l)}else return r(void 0,u)}function a(l,u,d){if(d in e)return r(l,u);if(d in t)return r(void 0,l)}const c={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(l,u)=>i(nl(l),nl(u),!0)};return k.forEach(Object.keys(Object.assign({},t,e)),function(u){const d=c[u]||i,h=d(t[u],e[u],u);k.isUndefined(h)&&d!==a||(n[u]=h)}),n}const Pd="1.6.8",oc={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{oc[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const rl={};oc.transitional=function(e,n,r){function i(s,o){return"[Axios v"+Pd+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,a)=>{if(e===!1)throw new ne(i(o," has been removed"+(n?" in "+n:"")),ne.ERR_DEPRECATED);return n&&!rl[o]&&(rl[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,o,a):!0}};function cm(t,e,n){if(typeof t!="object")throw new ne("options must be an object",ne.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const s=r[i],o=e[s];if(o){const a=t[s],c=a===void 0||o(a,s,t);if(c!==!0)throw new ne("option "+s+" must be "+c,ne.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ne("Unknown option "+s,ne.ERR_BAD_OPTION)}}const oa={assertOptions:cm,validators:oc},Zt=oa.validators;class Us{constructor(e){this.defaults=e,this.interceptors={request:new Jc,response:new Jc}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
22
- `+s):r.stack=s}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Er(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&oa.assertOptions(r,{silentJSONParsing:Zt.transitional(Zt.boolean),forcedJSONParsing:Zt.transitional(Zt.boolean),clarifyTimeoutError:Zt.transitional(Zt.boolean)},!1),i!=null&&(k.isFunction(i)?n.paramsSerializer={serialize:i}:oa.assertOptions(i,{encode:Zt.function,serialize:Zt.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&k.merge(s.common,s[n.method]);s&&k.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),n.headers=Ut.concat(o,s);const a=[];let c=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(n)===!1||(c=c&&f.synchronous,a.unshift(f.fulfilled,f.rejected))});const l=[];this.interceptors.response.forEach(function(f){l.push(f.fulfilled,f.rejected)});let u,d=0,h;if(!c){const m=[tl.bind(this),void 0];for(m.unshift.apply(m,a),m.push.apply(m,l),h=m.length,u=Promise.resolve(n);d<h;)u=u.then(m[d++],m[d++]);return u}h=a.length;let v=n;for(d=0;d<h;){const m=a[d++],f=a[d++];try{v=m(v)}catch(w){f.call(this,w);break}}try{u=tl.call(this,v)}catch(m){return Promise.reject(m)}for(d=0,h=l.length;d<h;)u=u.then(l[d++],l[d++]);return u}getUri(e){e=Er(this.defaults,e);const n=xd(e.baseURL,e.url);return wd(n,e.params,e.paramsSerializer)}}k.forEach(["delete","get","head","options"],function(e){Us.prototype[e]=function(n,r){return this.request(Er(r||{},{method:e,url:n,data:(r||{}).data}))}});k.forEach(["post","put","patch"],function(e){function n(r){return function(s,o,a){return this.request(Er(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}Us.prototype[e]=n(),Us.prototype[e+"Form"]=n(!0)});const Ls=Us;class ac{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},e(function(s,o,a){r.reason||(r.reason=new Mi(s,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new ac(function(i){e=i}),cancel:e}}}const lm=ac;function um(t){return function(n){return t.apply(null,n)}}function dm(t){return k.isObject(t)&&t.isAxiosError===!0}const aa={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(aa).forEach(([t,e])=>{aa[e]=t});const fm=aa;function Td(t){const e=new Ls(t),n=cd(Ls.prototype.request,e);return k.extend(n,Ls.prototype,e,{allOwnKeys:!0}),k.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return Td(Er(t,i))},n}const Se=Td(sc);Se.Axios=Ls;Se.CanceledError=Mi;Se.CancelToken=lm;Se.isCancel=Ed;Se.VERSION=Pd;Se.toFormData=ho;Se.AxiosError=ne;Se.Cancel=Se.CanceledError;Se.all=function(e){return Promise.all(e)};Se.spread=um;Se.isAxiosError=dm;Se.mergeConfig=Er;Se.AxiosHeaders=Ut;Se.formToJSON=t=>_d(k.isHTMLForm(t)?new FormData(t):t);Se.getAdapter=Od.getAdapter;Se.HttpStatusCode=fm;Se.default=Se;const pi=Se.create({baseURL:"https://ecomgate.omnic.solutions/api/1.0.0/type-1/public/"}),hm=512,pm={[ht.CheckOrder]:["is_check_order","is_delivery"],[ht.DressingRoom]:["is_dressing_room","is_delivery"],[ht.PayByCash]:["pay_by_cash","pay_by_card","is_delivery"]},mm={[pt.Return]:["is_pickup"],[pt.Shipping]:["is_pickup"],[pt.Payment]:["pay_by_cash","pay_by_card","is_pickup"]};async function*ca({bounds:t,loadPointsParams:{city_name:e,country_abbreviation:n,filter:r,region_name:i}={},options:{controller:s}={},q:o}){const a={status:30,page_size:hm,country_abbreviation:n,region_name:i,city_name:e};if(o&&(a.q=o),r!=null&&r.type&&(a.type=r.type),r!=null&&r.receive)for(const[d,h]of Object.entries(r==null?void 0:r.receive)){if(!h)continue;const v=pm[d];for(const m of v)a[m]=!0}if(r!=null&&r.send)for(const[d,h]of Object.entries(r==null?void 0:r.send)){if(!h)continue;const v=mm[d];for(const m of v)a[m]=!0}t&&(a.start_latitude=t[0][0],a.end_latitude=t[0][1],a.start_longitude=t[1][0],a.end_longitude=t[1][1]);let c=await pi.get("/locations/points",{params:a,signal:s==null?void 0:s.signal}),l=c.data.data.num_pages,u=c.data.data.current_page;for(;u<l;){yield c,a.page=u+1;const d=await pi.get("/locations/points",{params:a,signal:s==null?void 0:s.signal});c.data.data.results=[...c.data.data.results,...d.data.data.results],c=d,u=d.data.data.current_page,l=d.data.data.num_pages}return yield c,c}const Br=[],la=({bounds:t,loadPointsParams:e})=>{var r;const n=new AbortController;for(;Br.length;)(r=Br.pop())==null||r.abort();return Br.push(n),async i=>{const s={controller:n};try{if(!t){const a=await ca({loadPointsParams:e,options:s}).next();i(a.value.data);return}for await(const o of ca({loadPointsParams:e,options:s,bounds:t}))i(o.data)}catch(o){if(n.signal.aborted)return;throw o}finally{const o=Br.indexOf(n);o>=0&&Br.splice(o,1)}}},Ad=":root",Di=(t,e)=>{var n;(n=document.querySelector(Ad))==null||n.style.setProperty(t,e)};var $s={};(function(t){var e,n,r=Qi&&Qi.__awaiter||function(g,_,O,T){return new(O=O||Promise)(function(L,R){function A(F){try{j(T.next(F))}catch(G){R(G)}}function M(F){try{j(T.throw(F))}catch(G){R(G)}}function j(F){var G;F.done?L(F.value):((G=F.value)instanceof O?G:new O(function(B){B(G)})).then(A,M)}j((T=T.apply(g,_||[])).next())})},i=Qi&&Qi.__rest||function(g,_){var O={};for(L in g)Object.prototype.hasOwnProperty.call(g,L)&&_.indexOf(L)<0&&(O[L]=g[L]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var T=0,L=Object.getOwnPropertySymbols(g);T<L.length;T++)_.indexOf(L[T])<0&&Object.prototype.propertyIsEnumerable.call(g,L[T])&&(O[L[T]]=g[L[T]]);return O};Object.defineProperty(t,"__esModule",{value:!0}),t.fromLatLng=t.fromPlaceId=t.fromAddress=t.geocode=t.enableAddressDescriptor=t.setOutputFormat=t.setLocationType=t.setResultType=t.setBounds=t.setComponents=t.setRegion=t.setLanguage=t.setKey=t.setDefaults=t.OutputFormat=t.RequestType=void 0,function(g){g.ADDRESS="address",g.LATLNG="latlng",g.PLACE_ID="place_id"}(e=t.RequestType||(t.RequestType={})),function(g){g.XML="xml",g.JSON="json"}(n=t.OutputFormat||(t.OutputFormat={}));const s="https://maps.googleapis.com/maps/api/geocode";let o={outputFormat:n.JSON};function a(g){return r(this,void 0,void 0,function*(){var O=g.outputFormat,_=i(g,["outputFormat"]),_=new URLSearchParams(_).toString(),O=s+`/${O}?`+_;try{var T=yield(yield fetch(O)).json(),{status:L,error_message:R}=T;if(L==="OK")return T;throw new Error(`Geocoding failed: ${R}. Server returned status code ${L}.`)}catch(A){throw A instanceof Error?new Error("Geocoding request failed: "+A.message):new Error("Geocoding request failed with unknown error: "+A)}})}function c(g){o=Object.assign(Object.assign({},o),g)}function l(g){o.key=g}function u(g){o.language=g}function d(g){o.region=g}function h(g){o.components=g}function v(g){o.bounds=g}function m(g){o.result_type=g}function f(g){o.location_type=g}function w(g){o.outputFormat=g}function y(g){o.enable_address_descriptor=g}function C(g,_,O){if(typeof g!="string"||typeof _!="string")throw new Error(`Both requestType and value are required and must be of type string.
23
- requestType: ${typeof g}, value: `+typeof _);return a(Object.assign(Object.assign(Object.assign({},o),O),{[g]:_}))}function b(g,_,O,T){var L={outputFormat:n.JSON};return _&&(L.key=_),O&&(L.language=O),T&&(L.region=T),C(e.ADDRESS,g,L)}function E(g,_,O,T){var L={outputFormat:n.JSON};return _&&(L.key=_),O&&(L.language=O),T&&(L.region=T),C(e.PLACE_ID,g,L)}function x(g,_,O,T,L,R){var A={outputFormat:n.JSON};return O&&(A.key=O),T&&(A.language=T),L&&(A.region=L),R&&(A.location_type=R),C(e.LATLNG,g+","+_,A)}t.setDefaults=c,t.setKey=l,t.setLanguage=u,t.setRegion=d,t.setComponents=h,t.setBounds=v,t.setResultType=m,t.setLocationType=f,t.setOutputFormat=w,t.enableAddressDescriptor=y,t.geocode=C,t.fromAddress=b,t.fromPlaceId=E,t.fromLatLng=x})($s);const Ld=t=>typeof t=="string",ua=t=>Array.isArray(t)&&t.length===2;async function da(t,e,n){var s;let r;if(Ld(t))r=await $s.fromPlaceId(t,e);else{const[o,a]=t;r=await $s.fromLatLng(o,a,e,void 0,void 0,n==null?void 0:n.join("|"))}const i=(s=r.results)==null?void 0:s.map(o=>{var l,u;const a=(l=o.geometry)==null?void 0:l.viewport,c=(u=o.geometry)==null?void 0:u.location;return{...o,geometry:{...o.geometry,viewport:new google.maps.LatLngBounds(a.southwest,a.northeast),location:new google.maps.LatLng(c)}}});return{...r,results:i}}const cc=t=>{var n;const e=te.getState().map;if(!e){console.error("Map is not initialized");return}if(!navigator.geolocation){(n=t==null?void 0:t.error)==null||n.call(t,new GeolocationPositionError),console.error("Geolocation is not supported by your browser");return}navigator.geolocation.getCurrentPosition(r=>{var a;const{latitude:i,longitude:s}=r.coords,o=new google.maps.LatLngBounds;o.extend(new google.maps.LatLng(i,s)),e.fitBounds(o),e.setZoom(16),(a=t==null?void 0:t.success)==null||a.call(t,r)},r=>{var i;console.error("Geolocation error:",r),(i=t==null?void 0:t.error)==null||i.call(t,r)},{maximumAge:6e4,timeout:5e3,enableHighAccuracy:!0})},Rd=t=>t.status===200,kd=t=>{const e=document.querySelector(Ad);return e?getComputedStyle(e).getPropertyValue(t):null},ir=(t,e)=>{let n=t;const r=(e.includes("--owl")?kd(e):e)||"";return n=n.replaceAll("currentColor",r),n},gm=t=>"comment"in t&&"address"in t&&"apartment_number"in t&&"delivery_time"in t;async function Md(t){var e;return await t.fetchFields({fields:["displayName","formattedAddress","location","viewport","addressComponents","id","types"]}),{name:t.displayName??void 0,formatted_address:t.formattedAddress??void 0,place_id:t.id??void 0,types:t.types??void 0,geometry:{location:t.location??void 0,viewport:t.viewport??void 0},address_components:(e=t.addressComponents)==null?void 0:e.map(n=>({long_name:n.longText??"",short_name:n.shortText??"",types:n.types??[]}))}}const vm=/^[\d\s+\-.,;:/()[\]{}°º'"′’″nsew]+$/i,ym=/\b(lat|latitude|lng|lon|long|longitude)\b/gi,il="[+-]?(?:(?:\\d+(?:[.,]\\d*)?)|(?:\\.\\d+))",bm=new RegExp(`(?:([nsew])\\s*(${il}))|(?:(${il})\\s*([nsew])?)`,"gi"),wm=t=>Number(t.replace(",",".")),sl=t=>{const e=t==null?void 0:t.toLowerCase();if(e==="n"||e==="s"||e==="e"||e==="w")return e},Sm=(t,e)=>{const n=sl(t),r=sl(e);return n||r},ol=(t,e)=>e==="s"||e==="w"?-Math.abs(t):e==="n"||e==="e"?Math.abs(t):t,al=t=>Number(t.toFixed(7)).toString(),Cm=(t,e)=>!!(e.length>=2||/[,;()[\]{}°º]/.test(t)||/\b(lat|latitude|lng|lon|long|longitude)\b/i.test(t)||/[nsew]/i.test(t)||/^[+-]?\d+[.,]\d*\s*$/i.test(t)),Dd=t=>{const e=t.trim();if(!e)return{kind:"none"};const n=e.replace(ym,""),r=n.replace(/[nsew]/gi,"");if(/[a-z]/i.test(r)||!vm.test(n))return{kind:"none"};const i=Array.from(e.matchAll(bm)).map(m=>{const f=m[2]??m[3],w=wm(f);return Number.isNaN(w)?null:{value:w,direction:Sm(m[1],m[4])}}).filter(m=>m!==null);if(!Cm(e,i))return{kind:"none"};if(i.length<2)return{kind:"partial"};if(i.length>2)return{kind:"invalid",reason:"Expected latitude and longitude only."};const[s,o]=i,a=s.direction==="e"||s.direction==="w",c=o.direction==="n"||o.direction==="s",l=a&&c,u=l?o:s,d=l?s:o,h=ol(u.value,u.direction),v=ol(d.value,d.direction);return Math.abs(h)>90||Math.abs(v)>180?{kind:"invalid",reason:"Coordinates are out of range."}:{kind:"valid",coordinates:[h,v],normalized:`${al(h)}, ${al(v)}`}},_m={points:[],samePoints:[],error:!1,loaded:!1,loading:!1,reloading:!1,requestId:0},Em=t=>t.points,xm=t=>t.loaded,Nd=t=>t.loading,Pt=$t()((t,e)=>({..._m,setSamePoints(n){t({samePoints:n})},closeSamePoints(){t({samePoints:[]})},async loadNext({bounds:n,...r}){const{requestId:i}=e(),s=i+1;t({error:!1,reloading:!0,requestId:s}),te.getState().setBounds(n);let o=0;try{await la({bounds:n,loadPointsParams:r})(c=>{e().requestId===s&&(t(o===0?{points:c.data.results}:{points:[...e().points,...c.data.results]}),o++)})}catch{e().requestId===s&&t({error:!0})}finally{e().requestId===s&&t({reloading:!1})}},async loadFirst(n){const{requestId:r}=e(),i=Bp(te.getState()),s=r+1;t({error:!1,loading:!0,reloading:!1,requestId:s});let o=0;try{await la({bounds:i,loadPointsParams:n})(c=>{e().requestId===s&&(o>=1&&t({loading:!1,loaded:!0}),t(o===0?{points:c.data.results}:{points:[...e().points,...c.data.results]}),o++)}),e().requestId===s&&t({loading:!1,loaded:!0})}catch{e().requestId===s&&t({error:!0,loading:!1})}finally{e().requestId===s&&t({loading:!1})}}})),Om=({cityName:t,countryAbbreviation:e,regionName:n})=>{p.useEffect(()=>{Pt.getState().loadFirst({city_name:t,country_abbreviation:e,region_name:n}),console.debug("[OmnicWidgetLocations::pointsLoader]");const r=fn.subscribe(i=>{Pt.getState().loadFirst({filter:i,city_name:t,country_abbreviation:e,region_name:n}),console.debug("[OmnicWidgetLocations::filters]",i)});return()=>{r()}},[t,e,n])},Xt=".",lc=Symbol("target"),jd=Symbol("unsubscribe");function fa(t){return t instanceof Date||t instanceof Set||t instanceof Map||t instanceof WeakSet||t instanceof WeakMap||ArrayBuffer.isView(t)}function Pm(t){return(typeof t=="object"?t===null:typeof t!="function")||t instanceof RegExp}const Ve=Array.isArray;function zs(t){return typeof t=="symbol"}const ze={after(t,e){return Ve(t)?t.slice(e.length):e===""?t:t.slice(e.length+1)},concat(t,e){return Ve(t)?(t=[...t],e&&t.push(e),t):e&&e.toString!==void 0?(t!==""&&(t+=Xt),zs(e)?t+e.toString():t+e):t},initial(t){if(Ve(t))return t.slice(0,-1);if(t==="")return t;const e=t.lastIndexOf(Xt);return e===-1?"":t.slice(0,e)},last(t){if(Ve(t))return t.at(-1)??"";if(t==="")return t;const e=t.lastIndexOf(Xt);return e===-1?t:t.slice(e+1)},walk(t,e){if(Ve(t))for(const n of t)e(n);else if(t!==""){let n=0,r=t.indexOf(Xt);if(r===-1)e(t);else for(;n<t.length;)r===-1&&(r=t.length),e(t.slice(n,r)),n=r+1,r=t.indexOf(Xt,n)}},get(t,e){return this.walk(e,n=>{t&&(t=t[n])}),t},isSubPath(t,e){if(Ve(t)){if(t.length<e.length)return!1;for(let n=0;n<e.length;n++)if(t[n]!==e[n])return!1;return!0}return t.length<e.length?!1:t===e?!0:t.startsWith(e)?t[e.length]===Xt:!1},isRootPath(t){return Ve(t)?t.length===0:t===""}};function Tm(t){return typeof t=="object"&&typeof t.next=="function"}function Am(t,e,n,r,i){const s=t.next;if(e.name==="entries")t.next=function(){const o=s.call(this);return o.done===!1&&(o.value[0]=i(o.value[0],e,o.value[0],r),o.value[1]=i(o.value[1],e,o.value[0],r)),o};else if(e.name==="values"){const o=n[lc].keys();t.next=function(){const a=s.call(this);return a.done===!1&&(a.value=i(a.value,e,o.next().value,r)),a}}else t.next=function(){const o=s.call(this);return o.done===!1&&(o.value=i(o.value,e,o.value,r)),o};return t}function cl(t,e,n){return t.isUnsubscribed||e.ignoreSymbols&&zs(n)||e.ignoreUnderscores&&n.charAt(0)==="_"||"ignoreKeys"in e&&e.ignoreKeys.includes(n)}let Lm=class{constructor(e){this._equals=e,this._proxyCache=new WeakMap,this._pathCache=new WeakMap,this.isUnsubscribed=!1}_getDescriptorCache(){return this._descriptorCache===void 0&&(this._descriptorCache=new WeakMap),this._descriptorCache}_getProperties(e){const n=this._getDescriptorCache();let r=n.get(e);return r===void 0&&(r={},n.set(e,r)),r}_getOwnPropertyDescriptor(e,n){if(this.isUnsubscribed)return Reflect.getOwnPropertyDescriptor(e,n);const r=this._getProperties(e);let i=r[n];return i===void 0&&(i=Reflect.getOwnPropertyDescriptor(e,n),r[n]=i),i}getProxy(e,n,r,i){if(this.isUnsubscribed)return e;const s=e[i],o=s??e;this._pathCache.set(o,n);let a=this._proxyCache.get(o);return a===void 0&&(a=s===void 0?new Proxy(e,r):e,this._proxyCache.set(o,a)),a}getPath(e){return this.isUnsubscribed?void 0:this._pathCache.get(e)}isDetached(e,n){return!Object.is(e,ze.get(n,this.getPath(e)))}defineProperty(e,n,r){return Reflect.defineProperty(e,n,r)?(this.isUnsubscribed||(this._getProperties(e)[n]=r),!0):!1}setProperty(e,n,r,i,s){if(!this._equals(s,r)||!(n in e)){const o=this._getOwnPropertyDescriptor(e,n);return o!==void 0&&"set"in o?Reflect.set(e,n,r,i):Reflect.set(e,n,r)}return!0}deleteProperty(e,n,r){if(Reflect.deleteProperty(e,n)){if(!this.isUnsubscribed){const i=this._getDescriptorCache().get(e);i&&(delete i[n],this._pathCache.delete(r))}return!0}return!1}isSameDescriptor(e,n,r){const i=this._getOwnPropertyDescriptor(n,r);return e!==void 0&&i!==void 0&&Object.is(e.value,i.value)&&(e.writable||!1)===(i.writable||!1)&&(e.enumerable||!1)===(i.enumerable||!1)&&(e.configurable||!1)===(i.configurable||!1)&&e.get===i.get&&e.set===i.set}isGetInvariant(e,n){const r=this._getOwnPropertyDescriptor(e,n);return r!==void 0&&r.configurable!==!0&&r.writable!==!0}unsubscribe(){this._descriptorCache=null,this._pathCache=null,this._proxyCache=null,this.isUnsubscribed=!0}};function ha(t){return toString.call(t)==="[object Object]"}function Xi(){return!0}function Wn(t,e){return t.length!==e.length||t.some((n,r)=>e[r]!==n)}const Id=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Rm=new Set(["concat","includes","indexOf","join","keys","lastIndexOf"]),Fd={push:Xi,pop:Xi,shift:Xi,unshift:Xi,copyWithin:Wn,reverse:Wn,sort:Wn,splice:Wn,flat:Wn,fill:Wn},km=new Set([...Id,...Rm,...Object.keys(Fd)]);function Yi(t,e){if(t.size!==e.size)return!0;for(const n of t)if(!e.has(n))return!0;return!1}const Bd=["keys","values","entries"],Vd=new Set(["has","toString"]),Hd={add:Yi,clear:Yi,delete:Yi,forEach:Yi},Mm=new Set([...Vd,...Object.keys(Hd),...Bd]);function es(t,e){if(t.size!==e.size)return!0;let n;for(const[r,i]of t)if(n=e.get(r),n!==i||n===void 0&&!e.has(r))return!0;return!1}const Dm=new Set([...Vd,"get"]),Ud={set:es,clear:es,delete:es,forEach:es},Nm=new Set([...Dm,...Object.keys(Ud),...Bd]);class pn{constructor(e,n,r,i){this._path=n,this._isChanged=!1,this._clonedCache=new Set,this._hasOnValidate=i,this._changes=i?[]:null,this.clone=n===void 0?e:this._shallowClone(e)}static isHandledMethod(e){return Id.has(e)}_shallowClone(e){let n=e;if(ha(e))n={...e};else if(Ve(e)||ArrayBuffer.isView(e))n=[...e];else if(e instanceof Date)n=new Date(e);else if(e instanceof Set)n=new Set([...e].map(r=>this._shallowClone(r)));else if(e instanceof Map){n=new Map;for(const[r,i]of e.entries())n.set(r,this._shallowClone(i))}return this._clonedCache.add(n),n}preferredThisArg(e,n,r,i){return e?(Ve(i)?this._onIsChanged=Fd[n]:i instanceof Set?this._onIsChanged=Hd[n]:i instanceof Map&&(this._onIsChanged=Ud[n]),i):r}update(e,n,r){const i=ze.after(e,this._path);if(n!=="length"){let s=this.clone;ze.walk(i,o=>{s!=null&&s[o]&&(this._clonedCache.has(s[o])||(s[o]=this._shallowClone(s[o])),s=s[o])}),this._hasOnValidate&&this._changes.push({path:i,property:n,previous:r}),s!=null&&s[n]&&(s[n]=r)}this._isChanged=!0}undo(e){let n;for(let r=this._changes.length-1;r!==-1;r--)n=this._changes[r],ze.get(e,n.path)[n.property]=n.previous}isChanged(e){return this._onIsChanged===void 0?this._isChanged:this._onIsChanged(this.clone,e)}isPathApplicable(e){return ze.isRootPath(this._path)||ze.isSubPath(e,this._path)}}class ll extends pn{static isHandledMethod(e){return km.has(e)}}class jm extends pn{undo(e){e.setTime(this.clone.getTime())}isChanged(e,n){return!n(this.clone.valueOf(),e.valueOf())}}class ul extends pn{static isHandledMethod(e){return Mm.has(e)}undo(e){for(const n of this.clone)e.add(n);for(const n of e)this.clone.has(n)||e.delete(n)}}class dl extends pn{static isHandledMethod(e){return Nm.has(e)}undo(e){for(const[n,r]of this.clone.entries())e.set(n,r);for(const n of e.keys())this.clone.has(n)||e.delete(n)}}class Im extends pn{constructor(e,n,r,i){super(void 0,n,r,i),this._argument1=r[0],this._weakValue=e.has(this._argument1)}isChanged(e){return this._weakValue!==e.has(this._argument1)}undo(e){this._weakValue&&!e.has(this._argument1)?e.add(this._argument1):e.delete(this._argument1)}}class Fm extends pn{constructor(e,n,r,i){super(void 0,n,r,i),this._weakKey=r[0],this._weakHas=e.has(this._weakKey),this._weakValue=e.get(this._weakKey)}isChanged(e){return this._weakValue!==e.get(this._weakKey)}undo(e){const n=e.has(this._weakKey);this._weakHas&&!n?e.set(this._weakKey,this._weakValue):!this._weakHas&&n?e.delete(this._weakKey):this._weakValue!==e.get(this._weakKey)&&e.set(this._weakKey,this._weakValue)}}class Sn{constructor(e){this._stack=[],this._hasOnValidate=e}static isHandledType(e){return ha(e)||Ve(e)||fa(e)}static isHandledMethod(e,n){return ha(e)?pn.isHandledMethod(n):Ve(e)?ll.isHandledMethod(n):e instanceof Set?ul.isHandledMethod(n):e instanceof Map?dl.isHandledMethod(n):fa(e)}get isCloning(){return this._stack.length>0}start(e,n,r){let i=pn;Ve(e)?i=ll:e instanceof Date?i=jm:e instanceof Set?i=ul:e instanceof Map?i=dl:e instanceof WeakSet?i=Im:e instanceof WeakMap&&(i=Fm),this._stack.push(new i(e,n,r,this._hasOnValidate))}update(e,n,r){this._stack.at(-1).update(e,n,r)}preferredThisArg(e,n,r){const{name:i}=e,s=Sn.isHandledMethod(r,i);return this._stack.at(-1).preferredThisArg(s,i,n,r)}isChanged(e,n,r){return this._stack.at(-1).isChanged(e,n,r)}isPartOfClone(e){return this._stack.at(-1).isPathApplicable(e)}undo(e){this._previousClone!==void 0&&this._previousClone.undo(e)}stop(){return this._previousClone=this._stack.pop(),this._previousClone.clone}}const Bm={equals:Object.is,isShallow:!1,pathAsArray:!1,ignoreSymbols:!1,ignoreUnderscores:!1,ignoreDetached:!1,details:!1},ni=(t,e,n={})=>{n={...Bm,...n};const r=Symbol("ProxyTarget"),{equals:i,isShallow:s,ignoreDetached:o,details:a}=n,c=new Lm(i),l=typeof n.onValidate=="function",u=new Sn(l),d=(b,E,x,g,_)=>!l||u.isCloning||n.onValidate(ze.concat(c.getPath(b),E),x,g,_)===!0,h=(b,E,x,g)=>{!cl(c,n,E)&&!(o&&c.isDetached(b,t))&&v(c.getPath(b),E,x,g)},v=(b,E,x,g,_)=>{u.isCloning&&u.isPartOfClone(b)?u.update(b,E,g):e(ze.concat(b,E),x,g,_)},m=b=>b&&(b[r]??b),f=(b,E,x,g)=>{if(Pm(b)||x==="constructor"||s&&!Sn.isHandledMethod(E,x)||cl(c,n,x)||c.isGetInvariant(E,x)||o&&c.isDetached(E,t))return b;g===void 0&&(g=c.getPath(E));const _=ze.concat(g,x),O=c.getPath(b);return O&&w(_,O)?c.getProxy(b,O,y,r):c.getProxy(b,_,y,r)},w=(b,E)=>{if(zs(b)||b.length<=E.length||Ve(E)&&E.length===0)return!1;const x=Ve(b)?b:b.split(Xt),g=Ve(E)?E:E.split(Xt);return x.length<=g.length?!1:!g.some((_,O)=>_!==x[O])},y={get(b,E,x){if(zs(E)){if(E===r||E===lc)return b;if(E===jd&&!c.isUnsubscribed&&c.getPath(b).length===0)return c.unsubscribe(),b}const g=fa(b)?Reflect.get(b,E):Reflect.get(b,E,x);return f(g,b,E)},set(b,E,x,g){x=m(x);const _=b[r]??b,O=_[E];if(i(O,x)&&E in b)return!0;const T=d(b,E,x,O);return T&&c.setProperty(_,E,x,g,O)?(h(b,E,b[E],O),!0):!T},defineProperty(b,E,x){if(!c.isSameDescriptor(x,b,E)){const g=b[E];d(b,E,x.value,g)&&c.defineProperty(b,E,x,g)&&h(b,E,x.value,g)}return!0},deleteProperty(b,E){if(!Reflect.has(b,E))return!0;const x=Reflect.get(b,E),g=d(b,E,void 0,x);return g&&c.deleteProperty(b,E,x)?(h(b,E,void 0,x),!0):!g},apply(b,E,x){const g=E[r]??E;if(c.isUnsubscribed)return Reflect.apply(b,g,x);if((a===!1||a!==!0&&!a.includes(b.name))&&Sn.isHandledType(g)){let _=ze.initial(c.getPath(b));const O=Sn.isHandledMethod(g,b.name);u.start(g,_,x);let T=Reflect.apply(b,u.preferredThisArg(b,E,g),O?x.map(A=>m(A)):x);const L=u.isChanged(g,i),R=u.stop();if(Sn.isHandledType(T)&&O&&(E instanceof Map&&b.name==="get"&&(_=ze.concat(_,x[0])),T=c.getProxy(T,_,y)),L){const A={name:b.name,args:x,result:T},M=u.isCloning?ze.initial(_):_,j=u.isCloning?ze.last(_):"";d(ze.get(t,M),j,g,R,A)?v(M,j,g,R,A):u.undo(g)}return(E instanceof Map||E instanceof Set)&&Tm(T)?Am(T,b,E,_,f):T}return Reflect.apply(b,E,x)}},C=c.getProxy(t,n.pathAsArray?[]:"",y);return e=e.bind(C),l&&(n.onValidate=n.onValidate.bind(C)),C};ni.target=t=>(t==null?void 0:t[lc])??t;ni.unsubscribe=t=>(t==null?void 0:t[jd])??t;const Vm=t=>{const e=t??window.OMNIC_WIDGET_LOCATIONS_CONFIG,[n,r]=p.useState({...bn,...e,map:{...bn.map,...e==null?void 0:e.map},palette:{...bn.palette,...e==null?void 0:e.palette}}),i=t&&!window.OMNIC_WIDGET_LOCATIONS_CONFIG,s=!t&&window.OMNIC_WIDGET_LOCATIONS_CONFIG;return p.useEffect(()=>{if(!i)return;const o={...bn,...t,map:{...bn.map,...t.map},palette:{...bn.palette,...t.palette}};console.debug("[OmnicLocationsWidget::reactConfig]",o),r(o)},[t,i]),p.useEffect(()=>{if(s)return console.debug("[OmnicLocationsWidget::windowConfig]",n),window.OMNIC_WIDGET_LOCATIONS_CONFIG=ni(window.OMNIC_WIDGET_LOCATIONS_CONFIG,function(){const o={...n,...ni.target(this)};o.map&&(o.map={...o.map}),o.palette&&(o.palette={...o.palette}),console.debug("[OmnicLocationsWidget::changeWindowConfig]",o),r({...o})}),()=>{window.OMNIC_WIDGET_LOCATIONS_CONFIG&&ni.unsubscribe(window.OMNIC_WIDGET_LOCATIONS_CONFIG)}},[n,s]),n},Hm=(t,e)=>{console.debug("[OmnicWidgetLocations::axios]",{INN:t,options:e}),pi.defaults.headers.get.Authorization=`INN ${t}`,e!=null&&e.baseURL&&(pi.defaults.baseURL=e.baseURL)};var $d={exports:{}};/*!
21
+ `):" "+el(s[0]):"as no adapter specified";throw new te("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:sa};function Lo(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Mi(null,t)}function tl(t){return Lo(t),t.headers=$t.from(t.headers),t.data=Ro.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Od.getAdapter(t.adapter||sc.adapter)(t).then(function(r){return Lo(t),r.data=Ro.call(t,t.transformResponse,r),r.headers=$t.from(r.headers),r},function(r){return Ed(r)||(Lo(t),r&&r.response&&(r.response.data=Ro.call(t,t.transformResponse,r.response),r.response.headers=$t.from(r.response.headers))),Promise.reject(r)})}const nl=t=>t instanceof $t?{...t}:t;function _r(t,e){e=e||{};const n={};function r(l,u,d){return k.isPlainObject(l)&&k.isPlainObject(u)?k.merge.call({caseless:d},l,u):k.isPlainObject(u)?k.merge({},u):k.isArray(u)?u.slice():u}function i(l,u,d){if(k.isUndefined(u)){if(!k.isUndefined(l))return r(void 0,l,d)}else return r(l,u,d)}function s(l,u){if(!k.isUndefined(u))return r(void 0,u)}function o(l,u){if(k.isUndefined(u)){if(!k.isUndefined(l))return r(void 0,l)}else return r(void 0,u)}function a(l,u,d){if(d in e)return r(l,u);if(d in t)return r(void 0,l)}const c={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(l,u)=>i(nl(l),nl(u),!0)};return k.forEach(Object.keys(Object.assign({},t,e)),function(u){const d=c[u]||i,h=d(t[u],e[u],u);k.isUndefined(h)&&d!==a||(n[u]=h)}),n}const Pd="1.6.8",oc={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{oc[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const rl={};oc.transitional=function(e,n,r){function i(s,o){return"[Axios v"+Pd+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,a)=>{if(e===!1)throw new te(i(o," has been removed"+(n?" in "+n:"")),te.ERR_DEPRECATED);return n&&!rl[o]&&(rl[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,o,a):!0}};function cm(t,e,n){if(typeof t!="object")throw new te("options must be an object",te.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const s=r[i],o=e[s];if(o){const a=t[s],c=a===void 0||o(a,s,t);if(c!==!0)throw new te("option "+s+" must be "+c,te.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new te("Unknown option "+s,te.ERR_BAD_OPTION)}}const oa={assertOptions:cm,validators:oc},Kt=oa.validators;class Us{constructor(e){this.defaults=e,this.interceptors={request:new Jc,response:new Jc}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
22
+ `+s):r.stack=s}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=_r(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&oa.assertOptions(r,{silentJSONParsing:Kt.transitional(Kt.boolean),forcedJSONParsing:Kt.transitional(Kt.boolean),clarifyTimeoutError:Kt.transitional(Kt.boolean)},!1),i!=null&&(k.isFunction(i)?n.paramsSerializer={serialize:i}:oa.assertOptions(i,{encode:Kt.function,serialize:Kt.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&k.merge(s.common,s[n.method]);s&&k.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),n.headers=$t.concat(o,s);const a=[];let c=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(n)===!1||(c=c&&f.synchronous,a.unshift(f.fulfilled,f.rejected))});const l=[];this.interceptors.response.forEach(function(f){l.push(f.fulfilled,f.rejected)});let u,d=0,h;if(!c){const m=[tl.bind(this),void 0];for(m.unshift.apply(m,a),m.push.apply(m,l),h=m.length,u=Promise.resolve(n);d<h;)u=u.then(m[d++],m[d++]);return u}h=a.length;let v=n;for(d=0;d<h;){const m=a[d++],f=a[d++];try{v=m(v)}catch(w){f.call(this,w);break}}try{u=tl.call(this,v)}catch(m){return Promise.reject(m)}for(d=0,h=l.length;d<h;)u=u.then(l[d++],l[d++]);return u}getUri(e){e=_r(this.defaults,e);const n=xd(e.baseURL,e.url);return wd(n,e.params,e.paramsSerializer)}}k.forEach(["delete","get","head","options"],function(e){Us.prototype[e]=function(n,r){return this.request(_r(r||{},{method:e,url:n,data:(r||{}).data}))}});k.forEach(["post","put","patch"],function(e){function n(r){return function(s,o,a){return this.request(_r(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}Us.prototype[e]=n(),Us.prototype[e+"Form"]=n(!0)});const Rs=Us;class ac{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},e(function(s,o,a){r.reason||(r.reason=new Mi(s,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new ac(function(i){e=i}),cancel:e}}}const lm=ac;function um(t){return function(n){return t.apply(null,n)}}function dm(t){return k.isObject(t)&&t.isAxiosError===!0}const aa={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(aa).forEach(([t,e])=>{aa[e]=t});const fm=aa;function Td(t){const e=new Rs(t),n=cd(Rs.prototype.request,e);return k.extend(n,Rs.prototype,e,{allOwnKeys:!0}),k.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return Td(_r(t,i))},n}const Se=Td(sc);Se.Axios=Rs;Se.CanceledError=Mi;Se.CancelToken=lm;Se.isCancel=Ed;Se.VERSION=Pd;Se.toFormData=ho;Se.AxiosError=te;Se.Cancel=Se.CanceledError;Se.all=function(e){return Promise.all(e)};Se.spread=um;Se.isAxiosError=dm;Se.mergeConfig=_r;Se.AxiosHeaders=$t;Se.formToJSON=t=>_d(k.isHTMLForm(t)?new FormData(t):t);Se.getAdapter=Od.getAdapter;Se.HttpStatusCode=fm;Se.default=Se;const pi=Se.create({baseURL:"https://ecomgate.omnic.solutions/api/1.0.0/type-1/public/"}),hm=512,pm={[ht.CheckOrder]:["is_check_order","is_delivery"],[ht.DressingRoom]:["is_dressing_room","is_delivery"],[ht.PayByCash]:["pay_by_cash","pay_by_card","is_delivery"]},mm={[pt.Return]:["is_pickup"],[pt.Shipping]:["is_pickup"],[pt.Payment]:["pay_by_cash","pay_by_card","is_pickup"]};async function*ca({bounds:t,loadPointsParams:{city_name:e,country_abbreviation:n,filter:r,region_name:i}={},options:{controller:s}={},q:o}){const a={status:30,page_size:hm,country_abbreviation:n,region_name:i,city_name:e};if(o&&(a.q=o),r!=null&&r.type&&(a.type=r.type),r!=null&&r.receive)for(const[d,h]of Object.entries(r==null?void 0:r.receive)){if(!h)continue;const v=pm[d];for(const m of v)a[m]=!0}if(r!=null&&r.send)for(const[d,h]of Object.entries(r==null?void 0:r.send)){if(!h)continue;const v=mm[d];for(const m of v)a[m]=!0}t&&(a.start_latitude=t[0][0],a.end_latitude=t[0][1],a.start_longitude=t[1][0],a.end_longitude=t[1][1]);let c=await pi.get("/locations/points",{params:a,signal:s==null?void 0:s.signal}),l=c.data.data.num_pages,u=c.data.data.current_page;for(;u<l;){yield c,a.page=u+1;const d=await pi.get("/locations/points",{params:a,signal:s==null?void 0:s.signal});c.data.data.results=[...c.data.data.results,...d.data.data.results],c=d,u=d.data.data.current_page,l=d.data.data.num_pages}return yield c,c}const Fr=[],la=({bounds:t,loadPointsParams:e})=>{var r;const n=new AbortController;for(;Fr.length;)(r=Fr.pop())==null||r.abort();return Fr.push(n),async i=>{const s={controller:n};try{if(!t){const a=await ca({loadPointsParams:e,options:s}).next();i(a.value.data);return}for await(const o of ca({loadPointsParams:e,options:s,bounds:t}))i(o.data)}catch(o){if(n.signal.aborted)return;throw o}finally{const o=Fr.indexOf(n);o>=0&&Fr.splice(o,1)}}},Ad=":root",Di=(t,e)=>{var n;(n=document.querySelector(Ad))==null||n.style.setProperty(t,e)};var $s={};(function(t){var e,n,r=Qi&&Qi.__awaiter||function(g,_,O,T){return new(O=O||Promise)(function(R,L){function A(V){try{N(T.next(V))}catch(q){L(q)}}function D(V){try{N(T.throw(V))}catch(q){L(q)}}function N(V){var q;V.done?R(V.value):((q=V.value)instanceof O?q:new O(function(I){I(q)})).then(A,D)}N((T=T.apply(g,_||[])).next())})},i=Qi&&Qi.__rest||function(g,_){var O={};for(R in g)Object.prototype.hasOwnProperty.call(g,R)&&_.indexOf(R)<0&&(O[R]=g[R]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var T=0,R=Object.getOwnPropertySymbols(g);T<R.length;T++)_.indexOf(R[T])<0&&Object.prototype.propertyIsEnumerable.call(g,R[T])&&(O[R[T]]=g[R[T]]);return O};Object.defineProperty(t,"__esModule",{value:!0}),t.fromLatLng=t.fromPlaceId=t.fromAddress=t.geocode=t.enableAddressDescriptor=t.setOutputFormat=t.setLocationType=t.setResultType=t.setBounds=t.setComponents=t.setRegion=t.setLanguage=t.setKey=t.setDefaults=t.OutputFormat=t.RequestType=void 0,function(g){g.ADDRESS="address",g.LATLNG="latlng",g.PLACE_ID="place_id"}(e=t.RequestType||(t.RequestType={})),function(g){g.XML="xml",g.JSON="json"}(n=t.OutputFormat||(t.OutputFormat={}));const s="https://maps.googleapis.com/maps/api/geocode";let o={outputFormat:n.JSON};function a(g){return r(this,void 0,void 0,function*(){var O=g.outputFormat,_=i(g,["outputFormat"]),_=new URLSearchParams(_).toString(),O=s+`/${O}?`+_;try{var T=yield(yield fetch(O)).json(),{status:R,error_message:L}=T;if(R==="OK")return T;throw new Error(`Geocoding failed: ${L}. Server returned status code ${R}.`)}catch(A){throw A instanceof Error?new Error("Geocoding request failed: "+A.message):new Error("Geocoding request failed with unknown error: "+A)}})}function c(g){o=Object.assign(Object.assign({},o),g)}function l(g){o.key=g}function u(g){o.language=g}function d(g){o.region=g}function h(g){o.components=g}function v(g){o.bounds=g}function m(g){o.result_type=g}function f(g){o.location_type=g}function w(g){o.outputFormat=g}function y(g){o.enable_address_descriptor=g}function C(g,_,O){if(typeof g!="string"||typeof _!="string")throw new Error(`Both requestType and value are required and must be of type string.
23
+ requestType: ${typeof g}, value: `+typeof _);return a(Object.assign(Object.assign(Object.assign({},o),O),{[g]:_}))}function b(g,_,O,T){var R={outputFormat:n.JSON};return _&&(R.key=_),O&&(R.language=O),T&&(R.region=T),C(e.ADDRESS,g,R)}function E(g,_,O,T){var R={outputFormat:n.JSON};return _&&(R.key=_),O&&(R.language=O),T&&(R.region=T),C(e.PLACE_ID,g,R)}function x(g,_,O,T,R,L){var A={outputFormat:n.JSON};return O&&(A.key=O),T&&(A.language=T),R&&(A.region=R),L&&(A.location_type=L),C(e.LATLNG,g+","+_,A)}t.setDefaults=c,t.setKey=l,t.setLanguage=u,t.setRegion=d,t.setComponents=h,t.setBounds=v,t.setResultType=m,t.setLocationType=f,t.setOutputFormat=w,t.enableAddressDescriptor=y,t.geocode=C,t.fromAddress=b,t.fromPlaceId=E,t.fromLatLng=x})($s);const Rd=t=>typeof t=="string",ua=t=>Array.isArray(t)&&t.length===2;async function da(t,e,n){var s;let r;if(Rd(t))r=await $s.fromPlaceId(t,e);else{const[o,a]=t;r=await $s.fromLatLng(o,a,e,void 0,void 0,n==null?void 0:n.join("|"))}const i=(s=r.results)==null?void 0:s.map(o=>{var l,u;const a=(l=o.geometry)==null?void 0:l.viewport,c=(u=o.geometry)==null?void 0:u.location;return{...o,geometry:{...o.geometry,viewport:new google.maps.LatLngBounds(a.southwest,a.northeast),location:new google.maps.LatLng(c)}}});return{...r,results:i}}const cc=t=>{var n;const e=X.getState().map;if(!e){console.error("Map is not initialized");return}if(!navigator.geolocation){(n=t==null?void 0:t.error)==null||n.call(t,new GeolocationPositionError),console.error("Geolocation is not supported by your browser");return}navigator.geolocation.getCurrentPosition(r=>{var a;const{latitude:i,longitude:s}=r.coords,o=new google.maps.LatLngBounds;o.extend(new google.maps.LatLng(i,s)),e.fitBounds(o),e.setZoom(16),(a=t==null?void 0:t.success)==null||a.call(t,r)},r=>{var i;console.error("Geolocation error:",r),(i=t==null?void 0:t.error)==null||i.call(t,r)},{maximumAge:6e4,timeout:5e3,enableHighAccuracy:!0})},Ld=t=>t.status===200,kd=t=>{const e=document.querySelector(Ad);return e?getComputedStyle(e).getPropertyValue(t):null},rr=(t,e)=>{let n=t;const r=(e.includes("--owl")?kd(e):e)||"";return n=n.replaceAll("currentColor",r),n},gm=t=>"comment"in t&&"address"in t&&"apartment_number"in t&&"delivery_time"in t;async function Md(t){var e;return await t.fetchFields({fields:["displayName","formattedAddress","location","viewport","addressComponents","id","types"]}),{name:t.displayName??void 0,formatted_address:t.formattedAddress??void 0,place_id:t.id??void 0,types:t.types??void 0,geometry:{location:t.location??void 0,viewport:t.viewport??void 0},address_components:(e=t.addressComponents)==null?void 0:e.map(n=>({long_name:n.longText??"",short_name:n.shortText??"",types:n.types??[]}))}}const vm=/^[\d\s+\-.,;:/()[\]{}°º'"′’″nsew]+$/i,ym=/\b(lat|latitude|lng|lon|long|longitude)\b/gi,il="[+-]?(?:(?:\\d+(?:[.,]\\d*)?)|(?:\\.\\d+))",bm=new RegExp(`(?:([nsew])\\s*(${il}))|(?:(${il})\\s*([nsew])?)`,"gi"),wm=t=>Number(t.replace(",",".")),sl=t=>{const e=t==null?void 0:t.toLowerCase();if(e==="n"||e==="s"||e==="e"||e==="w")return e},Sm=(t,e)=>{const n=sl(t),r=sl(e);return n||r},ol=(t,e)=>e==="s"||e==="w"?-Math.abs(t):e==="n"||e==="e"?Math.abs(t):t,al=t=>Number(t.toFixed(7)).toString(),Cm=(t,e)=>!!(e.length>=2||/[,;()[\]{}°º]/.test(t)||/\b(lat|latitude|lng|lon|long|longitude)\b/i.test(t)||/[nsew]/i.test(t)||/^[+-]?\d+[.,]\d*\s*$/i.test(t)),Dd=t=>{const e=t.trim();if(!e)return{kind:"none"};const n=e.replace(ym,""),r=n.replace(/[nsew]/gi,"");if(/[a-z]/i.test(r)||!vm.test(n))return{kind:"none"};const i=Array.from(e.matchAll(bm)).map(m=>{const f=m[2]??m[3],w=wm(f);return Number.isNaN(w)?null:{value:w,direction:Sm(m[1],m[4])}}).filter(m=>m!==null);if(!Cm(e,i))return{kind:"none"};if(i.length<2)return{kind:"partial"};if(i.length>2)return{kind:"invalid",reason:"Expected latitude and longitude only."};const[s,o]=i,a=s.direction==="e"||s.direction==="w",c=o.direction==="n"||o.direction==="s",l=a&&c,u=l?o:s,d=l?s:o,h=ol(u.value,u.direction),v=ol(d.value,d.direction);return Math.abs(h)>90||Math.abs(v)>180?{kind:"invalid",reason:"Coordinates are out of range."}:{kind:"valid",coordinates:[h,v],normalized:`${al(h)}, ${al(v)}`}},_m={points:[],samePoints:[],error:!1,loaded:!1,loading:!1,reloading:!1,requestId:0},Em=t=>t.points,xm=t=>t.loaded,Nd=t=>t.loading,At=zt()((t,e)=>({..._m,setSamePoints(n){t({samePoints:n})},closeSamePoints(){t({samePoints:[]})},async loadNext({bounds:n,...r}){const{requestId:i}=e(),s=i+1;t({error:!1,reloading:!0,requestId:s}),X.getState().setBounds(n);let o=0;try{await la({bounds:n,loadPointsParams:r})(c=>{e().requestId===s&&(t(o===0?{points:c.data.results}:{points:[...e().points,...c.data.results]}),o++)})}catch{e().requestId===s&&t({error:!0})}finally{e().requestId===s&&t({reloading:!1})}},async loadFirst(n){const{requestId:r}=e(),i=Bp(X.getState()),s=r+1;t({error:!1,loading:!0,reloading:!1,requestId:s});let o=0;try{await la({bounds:i,loadPointsParams:n})(c=>{e().requestId===s&&(o>=1&&t({loading:!1,loaded:!0}),t(o===0?{points:c.data.results}:{points:[...e().points,...c.data.results]}),o++)}),e().requestId===s&&t({loading:!1,loaded:!0})}catch{e().requestId===s&&t({error:!0,loading:!1})}finally{e().requestId===s&&t({loading:!1})}}})),Om=({cityName:t,countryAbbreviation:e,regionName:n})=>{p.useEffect(()=>{At.getState().loadFirst({city_name:t,country_abbreviation:e,region_name:n}),console.debug("[OmnicWidgetLocations::pointsLoader]");const r=pn.subscribe(i=>{At.getState().loadFirst({filter:i,city_name:t,country_abbreviation:e,region_name:n}),console.debug("[OmnicWidgetLocations::filters]",i)});return()=>{r()}},[t,e,n])},Yt=".",lc=Symbol("target"),jd=Symbol("unsubscribe");function fa(t){return t instanceof Date||t instanceof Set||t instanceof Map||t instanceof WeakSet||t instanceof WeakMap||ArrayBuffer.isView(t)}function Pm(t){return(typeof t=="object"?t===null:typeof t!="function")||t instanceof RegExp}const Ve=Array.isArray;function zs(t){return typeof t=="symbol"}const ze={after(t,e){return Ve(t)?t.slice(e.length):e===""?t:t.slice(e.length+1)},concat(t,e){return Ve(t)?(t=[...t],e&&t.push(e),t):e&&e.toString!==void 0?(t!==""&&(t+=Yt),zs(e)?t+e.toString():t+e):t},initial(t){if(Ve(t))return t.slice(0,-1);if(t==="")return t;const e=t.lastIndexOf(Yt);return e===-1?"":t.slice(0,e)},last(t){if(Ve(t))return t.at(-1)??"";if(t==="")return t;const e=t.lastIndexOf(Yt);return e===-1?t:t.slice(e+1)},walk(t,e){if(Ve(t))for(const n of t)e(n);else if(t!==""){let n=0,r=t.indexOf(Yt);if(r===-1)e(t);else for(;n<t.length;)r===-1&&(r=t.length),e(t.slice(n,r)),n=r+1,r=t.indexOf(Yt,n)}},get(t,e){return this.walk(e,n=>{t&&(t=t[n])}),t},isSubPath(t,e){if(Ve(t)){if(t.length<e.length)return!1;for(let n=0;n<e.length;n++)if(t[n]!==e[n])return!1;return!0}return t.length<e.length?!1:t===e?!0:t.startsWith(e)?t[e.length]===Yt:!1},isRootPath(t){return Ve(t)?t.length===0:t===""}};function Tm(t){return typeof t=="object"&&typeof t.next=="function"}function Am(t,e,n,r,i){const s=t.next;if(e.name==="entries")t.next=function(){const o=s.call(this);return o.done===!1&&(o.value[0]=i(o.value[0],e,o.value[0],r),o.value[1]=i(o.value[1],e,o.value[0],r)),o};else if(e.name==="values"){const o=n[lc].keys();t.next=function(){const a=s.call(this);return a.done===!1&&(a.value=i(a.value,e,o.next().value,r)),a}}else t.next=function(){const o=s.call(this);return o.done===!1&&(o.value=i(o.value,e,o.value,r)),o};return t}function cl(t,e,n){return t.isUnsubscribed||e.ignoreSymbols&&zs(n)||e.ignoreUnderscores&&n.charAt(0)==="_"||"ignoreKeys"in e&&e.ignoreKeys.includes(n)}let Rm=class{constructor(e){this._equals=e,this._proxyCache=new WeakMap,this._pathCache=new WeakMap,this.isUnsubscribed=!1}_getDescriptorCache(){return this._descriptorCache===void 0&&(this._descriptorCache=new WeakMap),this._descriptorCache}_getProperties(e){const n=this._getDescriptorCache();let r=n.get(e);return r===void 0&&(r={},n.set(e,r)),r}_getOwnPropertyDescriptor(e,n){if(this.isUnsubscribed)return Reflect.getOwnPropertyDescriptor(e,n);const r=this._getProperties(e);let i=r[n];return i===void 0&&(i=Reflect.getOwnPropertyDescriptor(e,n),r[n]=i),i}getProxy(e,n,r,i){if(this.isUnsubscribed)return e;const s=e[i],o=s??e;this._pathCache.set(o,n);let a=this._proxyCache.get(o);return a===void 0&&(a=s===void 0?new Proxy(e,r):e,this._proxyCache.set(o,a)),a}getPath(e){return this.isUnsubscribed?void 0:this._pathCache.get(e)}isDetached(e,n){return!Object.is(e,ze.get(n,this.getPath(e)))}defineProperty(e,n,r){return Reflect.defineProperty(e,n,r)?(this.isUnsubscribed||(this._getProperties(e)[n]=r),!0):!1}setProperty(e,n,r,i,s){if(!this._equals(s,r)||!(n in e)){const o=this._getOwnPropertyDescriptor(e,n);return o!==void 0&&"set"in o?Reflect.set(e,n,r,i):Reflect.set(e,n,r)}return!0}deleteProperty(e,n,r){if(Reflect.deleteProperty(e,n)){if(!this.isUnsubscribed){const i=this._getDescriptorCache().get(e);i&&(delete i[n],this._pathCache.delete(r))}return!0}return!1}isSameDescriptor(e,n,r){const i=this._getOwnPropertyDescriptor(n,r);return e!==void 0&&i!==void 0&&Object.is(e.value,i.value)&&(e.writable||!1)===(i.writable||!1)&&(e.enumerable||!1)===(i.enumerable||!1)&&(e.configurable||!1)===(i.configurable||!1)&&e.get===i.get&&e.set===i.set}isGetInvariant(e,n){const r=this._getOwnPropertyDescriptor(e,n);return r!==void 0&&r.configurable!==!0&&r.writable!==!0}unsubscribe(){this._descriptorCache=null,this._pathCache=null,this._proxyCache=null,this.isUnsubscribed=!0}};function ha(t){return toString.call(t)==="[object Object]"}function Xi(){return!0}function Wn(t,e){return t.length!==e.length||t.some((n,r)=>e[r]!==n)}const Id=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Lm=new Set(["concat","includes","indexOf","join","keys","lastIndexOf"]),Fd={push:Xi,pop:Xi,shift:Xi,unshift:Xi,copyWithin:Wn,reverse:Wn,sort:Wn,splice:Wn,flat:Wn,fill:Wn},km=new Set([...Id,...Lm,...Object.keys(Fd)]);function Yi(t,e){if(t.size!==e.size)return!0;for(const n of t)if(!e.has(n))return!0;return!1}const Bd=["keys","values","entries"],Vd=new Set(["has","toString"]),Hd={add:Yi,clear:Yi,delete:Yi,forEach:Yi},Mm=new Set([...Vd,...Object.keys(Hd),...Bd]);function es(t,e){if(t.size!==e.size)return!0;let n;for(const[r,i]of t)if(n=e.get(r),n!==i||n===void 0&&!e.has(r))return!0;return!1}const Dm=new Set([...Vd,"get"]),Ud={set:es,clear:es,delete:es,forEach:es},Nm=new Set([...Dm,...Object.keys(Ud),...Bd]);class mn{constructor(e,n,r,i){this._path=n,this._isChanged=!1,this._clonedCache=new Set,this._hasOnValidate=i,this._changes=i?[]:null,this.clone=n===void 0?e:this._shallowClone(e)}static isHandledMethod(e){return Id.has(e)}_shallowClone(e){let n=e;if(ha(e))n={...e};else if(Ve(e)||ArrayBuffer.isView(e))n=[...e];else if(e instanceof Date)n=new Date(e);else if(e instanceof Set)n=new Set([...e].map(r=>this._shallowClone(r)));else if(e instanceof Map){n=new Map;for(const[r,i]of e.entries())n.set(r,this._shallowClone(i))}return this._clonedCache.add(n),n}preferredThisArg(e,n,r,i){return e?(Ve(i)?this._onIsChanged=Fd[n]:i instanceof Set?this._onIsChanged=Hd[n]:i instanceof Map&&(this._onIsChanged=Ud[n]),i):r}update(e,n,r){const i=ze.after(e,this._path);if(n!=="length"){let s=this.clone;ze.walk(i,o=>{s!=null&&s[o]&&(this._clonedCache.has(s[o])||(s[o]=this._shallowClone(s[o])),s=s[o])}),this._hasOnValidate&&this._changes.push({path:i,property:n,previous:r}),s!=null&&s[n]&&(s[n]=r)}this._isChanged=!0}undo(e){let n;for(let r=this._changes.length-1;r!==-1;r--)n=this._changes[r],ze.get(e,n.path)[n.property]=n.previous}isChanged(e){return this._onIsChanged===void 0?this._isChanged:this._onIsChanged(this.clone,e)}isPathApplicable(e){return ze.isRootPath(this._path)||ze.isSubPath(e,this._path)}}class ll extends mn{static isHandledMethod(e){return km.has(e)}}class jm extends mn{undo(e){e.setTime(this.clone.getTime())}isChanged(e,n){return!n(this.clone.valueOf(),e.valueOf())}}class ul extends mn{static isHandledMethod(e){return Mm.has(e)}undo(e){for(const n of this.clone)e.add(n);for(const n of e)this.clone.has(n)||e.delete(n)}}class dl extends mn{static isHandledMethod(e){return Nm.has(e)}undo(e){for(const[n,r]of this.clone.entries())e.set(n,r);for(const n of e.keys())this.clone.has(n)||e.delete(n)}}class Im extends mn{constructor(e,n,r,i){super(void 0,n,r,i),this._argument1=r[0],this._weakValue=e.has(this._argument1)}isChanged(e){return this._weakValue!==e.has(this._argument1)}undo(e){this._weakValue&&!e.has(this._argument1)?e.add(this._argument1):e.delete(this._argument1)}}class Fm extends mn{constructor(e,n,r,i){super(void 0,n,r,i),this._weakKey=r[0],this._weakHas=e.has(this._weakKey),this._weakValue=e.get(this._weakKey)}isChanged(e){return this._weakValue!==e.get(this._weakKey)}undo(e){const n=e.has(this._weakKey);this._weakHas&&!n?e.set(this._weakKey,this._weakValue):!this._weakHas&&n?e.delete(this._weakKey):this._weakValue!==e.get(this._weakKey)&&e.set(this._weakKey,this._weakValue)}}class Cn{constructor(e){this._stack=[],this._hasOnValidate=e}static isHandledType(e){return ha(e)||Ve(e)||fa(e)}static isHandledMethod(e,n){return ha(e)?mn.isHandledMethod(n):Ve(e)?ll.isHandledMethod(n):e instanceof Set?ul.isHandledMethod(n):e instanceof Map?dl.isHandledMethod(n):fa(e)}get isCloning(){return this._stack.length>0}start(e,n,r){let i=mn;Ve(e)?i=ll:e instanceof Date?i=jm:e instanceof Set?i=ul:e instanceof Map?i=dl:e instanceof WeakSet?i=Im:e instanceof WeakMap&&(i=Fm),this._stack.push(new i(e,n,r,this._hasOnValidate))}update(e,n,r){this._stack.at(-1).update(e,n,r)}preferredThisArg(e,n,r){const{name:i}=e,s=Cn.isHandledMethod(r,i);return this._stack.at(-1).preferredThisArg(s,i,n,r)}isChanged(e,n,r){return this._stack.at(-1).isChanged(e,n,r)}isPartOfClone(e){return this._stack.at(-1).isPathApplicable(e)}undo(e){this._previousClone!==void 0&&this._previousClone.undo(e)}stop(){return this._previousClone=this._stack.pop(),this._previousClone.clone}}const Bm={equals:Object.is,isShallow:!1,pathAsArray:!1,ignoreSymbols:!1,ignoreUnderscores:!1,ignoreDetached:!1,details:!1},ni=(t,e,n={})=>{n={...Bm,...n};const r=Symbol("ProxyTarget"),{equals:i,isShallow:s,ignoreDetached:o,details:a}=n,c=new Rm(i),l=typeof n.onValidate=="function",u=new Cn(l),d=(b,E,x,g,_)=>!l||u.isCloning||n.onValidate(ze.concat(c.getPath(b),E),x,g,_)===!0,h=(b,E,x,g)=>{!cl(c,n,E)&&!(o&&c.isDetached(b,t))&&v(c.getPath(b),E,x,g)},v=(b,E,x,g,_)=>{u.isCloning&&u.isPartOfClone(b)?u.update(b,E,g):e(ze.concat(b,E),x,g,_)},m=b=>b&&(b[r]??b),f=(b,E,x,g)=>{if(Pm(b)||x==="constructor"||s&&!Cn.isHandledMethod(E,x)||cl(c,n,x)||c.isGetInvariant(E,x)||o&&c.isDetached(E,t))return b;g===void 0&&(g=c.getPath(E));const _=ze.concat(g,x),O=c.getPath(b);return O&&w(_,O)?c.getProxy(b,O,y,r):c.getProxy(b,_,y,r)},w=(b,E)=>{if(zs(b)||b.length<=E.length||Ve(E)&&E.length===0)return!1;const x=Ve(b)?b:b.split(Yt),g=Ve(E)?E:E.split(Yt);return x.length<=g.length?!1:!g.some((_,O)=>_!==x[O])},y={get(b,E,x){if(zs(E)){if(E===r||E===lc)return b;if(E===jd&&!c.isUnsubscribed&&c.getPath(b).length===0)return c.unsubscribe(),b}const g=fa(b)?Reflect.get(b,E):Reflect.get(b,E,x);return f(g,b,E)},set(b,E,x,g){x=m(x);const _=b[r]??b,O=_[E];if(i(O,x)&&E in b)return!0;const T=d(b,E,x,O);return T&&c.setProperty(_,E,x,g,O)?(h(b,E,b[E],O),!0):!T},defineProperty(b,E,x){if(!c.isSameDescriptor(x,b,E)){const g=b[E];d(b,E,x.value,g)&&c.defineProperty(b,E,x,g)&&h(b,E,x.value,g)}return!0},deleteProperty(b,E){if(!Reflect.has(b,E))return!0;const x=Reflect.get(b,E),g=d(b,E,void 0,x);return g&&c.deleteProperty(b,E,x)?(h(b,E,void 0,x),!0):!g},apply(b,E,x){const g=E[r]??E;if(c.isUnsubscribed)return Reflect.apply(b,g,x);if((a===!1||a!==!0&&!a.includes(b.name))&&Cn.isHandledType(g)){let _=ze.initial(c.getPath(b));const O=Cn.isHandledMethod(g,b.name);u.start(g,_,x);let T=Reflect.apply(b,u.preferredThisArg(b,E,g),O?x.map(A=>m(A)):x);const R=u.isChanged(g,i),L=u.stop();if(Cn.isHandledType(T)&&O&&(E instanceof Map&&b.name==="get"&&(_=ze.concat(_,x[0])),T=c.getProxy(T,_,y)),R){const A={name:b.name,args:x,result:T},D=u.isCloning?ze.initial(_):_,N=u.isCloning?ze.last(_):"";d(ze.get(t,D),N,g,L,A)?v(D,N,g,L,A):u.undo(g)}return(E instanceof Map||E instanceof Set)&&Tm(T)?Am(T,b,E,_,f):T}return Reflect.apply(b,E,x)}},C=c.getProxy(t,n.pathAsArray?[]:"",y);return e=e.bind(C),l&&(n.onValidate=n.onValidate.bind(C)),C};ni.target=t=>(t==null?void 0:t[lc])??t;ni.unsubscribe=t=>(t==null?void 0:t[jd])??t;const Vm=t=>{const e=t??window.OMNIC_WIDGET_LOCATIONS_CONFIG,[n,r]=p.useState({...wn,...e,map:{...wn.map,...e==null?void 0:e.map},palette:{...wn.palette,...e==null?void 0:e.palette}}),i=t&&!window.OMNIC_WIDGET_LOCATIONS_CONFIG,s=!t&&window.OMNIC_WIDGET_LOCATIONS_CONFIG;return p.useEffect(()=>{if(!i)return;const o={...wn,...t,map:{...wn.map,...t.map},palette:{...wn.palette,...t.palette}};console.debug("[OmnicLocationsWidget::reactConfig]",o),r(o)},[t,i]),p.useEffect(()=>{if(s)return console.debug("[OmnicLocationsWidget::windowConfig]",n),window.OMNIC_WIDGET_LOCATIONS_CONFIG=ni(window.OMNIC_WIDGET_LOCATIONS_CONFIG,function(){const o={...n,...ni.target(this)};o.map&&(o.map={...o.map}),o.palette&&(o.palette={...o.palette}),console.debug("[OmnicLocationsWidget::changeWindowConfig]",o),r({...o})}),()=>{window.OMNIC_WIDGET_LOCATIONS_CONFIG&&ni.unsubscribe(window.OMNIC_WIDGET_LOCATIONS_CONFIG)}},[n,s]),n},Hm=(t,e)=>{console.debug("[OmnicWidgetLocations::axios]",{INN:t,options:e}),pi.defaults.headers.get.Authorization=`INN ${t}`,e!=null&&e.baseURL&&(pi.defaults.baseURL=e.baseURL)};var $d={exports:{}};/*!
24
24
  Copyright (c) 2018 Jed Watson.
25
25
  Licensed under the MIT License (MIT), see
26
26
  http://jedwatson.github.io/classnames
27
- */(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var s="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(s=i(s,r(a)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var a in s)e.call(s,a)&&s[a]&&(o=i(o,a));return o}function i(s,o){return o?s?s+" "+o:s+o:s}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})($d);var Um=$d.exports;const J=ao(Um),$m={lmsData:null,isLoading:!1},mo=$t()(t=>({...$m,setLMSData:e=>t({lmsData:e}),setLoading:e=>t({isLoading:e})}));var zm=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,s;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(s=Object.keys(e),r=s.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[i]))return!1;for(i=r;i--!==0;){var o=s[i];if(!t(e[o],n[o]))return!1}return!0}return e!==e&&n!==n};const zd=ao(zm);function Ot(){return Ot=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ot.apply(null,arguments)}function Nn(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function qm(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Gm(t){var e=qm(t,"string");return typeof e=="symbol"?e:e+""}const Bt={NOT_LOADED:"NOT_LOADED",LOADING:"LOADING",LOADED:"LOADED",FAILED:"FAILED",AUTH_FAILURE:"AUTH_FAILURE"},Wm="https://maps.googleapis.com/maps/api/js";class mi{static async load(e,n){var r;const i=e.libraries?e.libraries.split(","):[],s=this.serializeParams(e);this.listeners.push(n),(r=window.google)!=null&&(r=r.maps)!=null&&r.importLibrary?(this.serializedApiParams||(this.loadingStatus=Bt.LOADED),this.notifyLoadingStatusListeners()):(this.serializedApiParams=s,this.initImportLibrary(e)),this.serializedApiParams&&this.serializedApiParams!==s&&console.warn("[google-maps-api-loader] The maps API has already been loaded with different parameters and will not be loaded again. Refresh the page for new values to have effect.");const o=["maps",...i];await Promise.all(o.map(a=>google.maps.importLibrary(a)))}static serializeParams(e){return[e.v,e.key,e.language,e.region,e.authReferrerPolicy,e.solutionChannel].join("/")}static initImportLibrary(e){if(window.google||(window.google={}),window.google.maps||(window.google.maps={}),window.google.maps.importLibrary){console.error("[google-maps-api-loader-internal]: initImportLibrary must only be called once");return}let n=null;const r=()=>n||(n=new Promise((i,s)=>{var o;const a=document.createElement("script"),c=new URLSearchParams;for(const[l,u]of Object.entries(e)){const d=l.replace(/[A-Z]/g,h=>"_"+h[0].toLowerCase());c.set(d,String(u))}c.set("loading","async"),c.set("callback","__googleMapsCallback__"),a.async=!0,a.src=Wm+"?"+c.toString(),a.nonce=((o=document.querySelector("script[nonce]"))==null?void 0:o.nonce)||"",a.onerror=()=>{this.loadingStatus=Bt.FAILED,this.notifyLoadingStatusListeners(),s(new Error("The Google Maps JavaScript API could not load."))},window.__googleMapsCallback__=()=>{this.loadingStatus=Bt.LOADED,this.notifyLoadingStatusListeners(),i()},window.gm_authFailure=()=>{this.loadingStatus=Bt.AUTH_FAILURE,this.notifyLoadingStatusListeners()},this.loadingStatus=Bt.LOADING,this.notifyLoadingStatusListeners(),document.head.append(a)}),n);google.maps.importLibrary=i=>r().then(()=>google.maps.importLibrary(i))}static notifyLoadingStatusListeners(){for(const e of this.listeners)e(this.loadingStatus)}}mi.loadingStatus=Bt.NOT_LOADED;mi.serializedApiParams=void 0;mi.listeners=[];const Zm=["onLoad","onError","apiKey","version","libraries"],Km=["children"],Qm="GMP_visgl_rgmlibrary_v1_default",Ni=p.createContext(null);function Jm(){const[t,e]=p.useState({});return{mapInstances:t,addMapInstance:(s,o="default")=>{e(a=>Ot({},a,{[o]:s}))},removeMapInstance:(s="default")=>{e(o=>Nn(o,[s].map(Gm)))},clearMapInstances:()=>{e({})}}}function Xm(t){const{onLoad:e,onError:n,apiKey:r,version:i,libraries:s=[]}=t,o=Nn(t,Zm),[a,c]=p.useState(mi.loadingStatus),[l,u]=p.useReducer((m,f)=>m[f.name]?m:Ot({},m,{[f.name]:f.value}),{}),d=p.useMemo(()=>s==null?void 0:s.join(","),[s]),h=p.useMemo(()=>JSON.stringify(Ot({apiKey:r,version:i},o)),[r,i,o]),v=p.useCallback(async m=>{var f;if(l[m])return l[m];if(!((f=google)!=null&&(f=f.maps)!=null&&f.importLibrary))throw new Error("[api-provider-internal] importLibrary was called before google.maps.importLibrary was defined.");const w=await window.google.maps.importLibrary(m);return u({name:m,value:w}),w},[l]);return p.useEffect(()=>{(async()=>{try{const m=Ot({key:r},o);i&&(m.v=i),(d==null?void 0:d.length)>0&&(m.libraries=d),(m.channel===void 0||m.channel<0||m.channel>999)&&delete m.channel,m.solutionChannel===void 0?m.solutionChannel=Qm:m.solutionChannel===""&&delete m.solutionChannel,await mi.load(m,f=>c(f));for(const f of["core","maps",...s])await v(f);e&&e()}catch(m){n?n(m):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",m)}})()},[r,d,h]),{status:a,loadedLibraries:l,importLibrary:v}}const Ym=t=>{const{children:e}=t,n=Nn(t,Km),{mapInstances:r,addMapInstance:i,removeMapInstance:s,clearMapInstances:o}=Jm(),{status:a,loadedLibraries:c,importLibrary:l}=Xm(n),u=p.useMemo(()=>({mapInstances:r,addMapInstance:i,removeMapInstance:s,clearMapInstances:o,status:a,loadedLibraries:c,importLibrary:l}),[r,i,s,o,a,c,l]);return p.createElement(Ni.Provider,{value:u},e)};function eg(t,e){for(const n of ig){const r=e[n],i=qd[n];p.useEffect(()=>{if(!t||!r)return;const s=google.maps.event.addListener(t,i,o=>{r(tg(i,t,o))});return()=>s.remove()},[t,i,r])}}function tg(t,e,n){const r={type:t,map:e,detail:{},stoppable:!1,stop:()=>{}};if(ng.includes(t)){const s=r,o=e.getCenter(),a=e.getZoom(),c=e.getHeading()||0,l=e.getTilt()||0,u=e.getBounds();return(!o||!u||!Number.isFinite(a))&&console.warn("[createEvent] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),s.detail={center:(o==null?void 0:o.toJSON())||{lat:0,lng:0},zoom:a||0,heading:c,tilt:l,bounds:(u==null?void 0:u.toJSON())||{north:90,east:180,south:-90,west:-180}},s}else if(rg.includes(t)){var i;if(!n)throw new Error("[createEvent] mouse events must provide a srcEvent");const s=r;return s.domEvent=n.domEvent,s.stoppable=!0,s.stop=()=>n.stop(),s.detail={latLng:((i=n.latLng)==null?void 0:i.toJSON())||null,placeId:n.placeId},s}return r}const qd={onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onContextmenu:"contextmenu",onDblclick:"dblclick",onDrag:"drag",onDragend:"dragend",onDragstart:"dragstart",onHeadingChanged:"heading_changed",onIdle:"idle",onIsFractionalZoomEnabledChanged:"isfractionalzoomenabled_changed",onMapCapabilitiesChanged:"mapcapabilities_changed",onMapTypeIdChanged:"maptypeid_changed",onMousemove:"mousemove",onMouseout:"mouseout",onMouseover:"mouseover",onProjectionChanged:"projection_changed",onRenderingTypeChanged:"renderingtype_changed",onTilesLoaded:"tilesloaded",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed",onCameraChanged:"bounds_changed"},ng=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],rg=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],ig=Object.keys(qd);function Gd(t,e){const n=p.useRef(t);return e(t,n.current)||(n.current=t),n.current}function sg(t,e,n){p.useEffect(t,[Gd(e,n)])}function og(t,e){sg(t,e,zd)}const ag=new Set(["backgroundColor","clickableIcons","controlSize","disableDefaultUI","disableDoubleClickZoom","draggable","draggableCursor","draggingCursor","fullscreenControl","fullscreenControlOptions","gestureHandling","headingInteractionEnabled","isFractionalZoomEnabled","keyboardShortcuts","mapTypeControl","mapTypeControlOptions","mapTypeId","maxZoom","minZoom","noClear","panControl","panControlOptions","restriction","rotateControl","rotateControlOptions","scaleControl","scaleControlOptions","scrollwheel","streetView","streetViewControl","streetViewControlOptions","styles","tiltInteractionEnabled","zoomControl","zoomControlOptions"]);function cg(t,e){const n={},r=Object.keys(e);for(const i of r)ag.has(i)&&(n[i]=e[i]);og(()=>{t&&t.setOptions(n)},[n])}function Wd(){var t;return((t=p.useContext(Ni))==null?void 0:t.status)||Bt.NOT_LOADED}function lg(t,e){const{viewport:n,viewState:r}=e,i=!!n;return p.useLayoutEffect(()=>{if(!t||!r)return;const{latitude:s,longitude:o,bearing:a,pitch:c,zoom:l}=r;t.moveCamera({center:{lat:s,lng:o},heading:a,tilt:c,zoom:l+1})},[t,r]),i}function ug(t){return!t||typeof t!="object"||!("lat"in t&&"lng"in t)?!1:Number.isFinite(t.lat)&&Number.isFinite(t.lng)}function Zd(t){return ug(t)?t:t.toJSON()}function dg(t,e,n){const r=n.center?Zd(n.center):null;let i=null,s=null;r&&Number.isFinite(r.lat)&&Number.isFinite(r.lng)&&(i=r.lat,s=r.lng);const o=Number.isFinite(n.zoom)?n.zoom:null,a=Number.isFinite(n.heading)?n.heading:null,c=Number.isFinite(n.tilt)?n.tilt:null;p.useLayoutEffect(()=>{if(!t)return;const l={};let u=!1;i!==null&&s!==null&&(e.current.center.lat!==i||e.current.center.lng!==s)&&(l.center={lat:i,lng:s},u=!0),o!==null&&e.current.zoom!==o&&(l.zoom=o,u=!0),a!==null&&e.current.heading!==a&&(l.heading=a,u=!0),c!==null&&e.current.tilt!==c&&(l.tilt=c,u=!0),u&&t.moveCamera(l)})}const fg=()=>{const t={position:"absolute",top:0,left:0,bottom:0,right:0,zIndex:999,display:"flex",flexFlow:"column nowrap",textAlign:"center",justifyContent:"center",fontSize:".8rem",color:"rgba(0,0,0,0.6)",background:"#dddddd",padding:"1rem 1.5rem"};return p.createElement("div",{style:t},p.createElement("h2",null,"Error: AuthFailure"),p.createElement("p",null,"A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ",p.createElement("code",null,"APIProvider.apiKey")," prop is correct. Check the error-message in the console for further details."))};function hg(){const[t,e]=p.useState(null),n=p.useCallback(r=>e(r),[e]);return[t,n]}function Kd(){return Wd()===Bt.LOADED}function pg(){const[,t]=p.useReducer(e=>e+1,0);return t}function mg(t,e){const n=t.getCenter(),r=t.getZoom(),i=t.getHeading()||0,s=t.getTilt()||0,o=t.getBounds();(!n||!o||!Number.isFinite(r))&&console.warn("[useTrackedCameraState] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),Object.assign(e.current,{center:(n==null?void 0:n.toJSON())||{lat:0,lng:0},zoom:r||0,heading:i,tilt:s})}function gg(t){const e=pg(),n=p.useRef({center:{lat:0,lng:0},heading:0,tilt:0,zoom:0});return p.useEffect(()=>{if(!t)return;const r=google.maps.event.addListener(t,"bounds_changed",()=>{mg(t,n),e()});return()=>r.remove()},[t,e]),n}const vg=["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"],yg=["padding"];class Rs{static has(e){return this.entries[e]&&this.entries[e].length>0}static pop(e){return this.entries[e]&&this.entries[e].pop()||null}static push(e,n){this.entries[e]||(this.entries[e]=[]),this.entries[e].push(n)}}Rs.entries={};function bg(t,e){const n=Kd(),[r,i]=p.useState(null),[s,o]=hg(),a=gg(r),{id:c,defaultBounds:l,defaultCenter:u,defaultZoom:d,defaultHeading:h,defaultTilt:v,reuseMaps:m,renderingType:f,colorScheme:w}=t,y=Nn(t,vg),C=t.zoom!==void 0||t.defaultZoom!==void 0,b=t.center!==void 0||t.defaultCenter!==void 0;!l&&(!C||!b)&&console.warn("<Map> component is missing configuration. You have to provide zoom and center (via the `zoom`/`defaultZoom` and `center`/`defaultCenter` props) or specify the region to show using `defaultBounds`. See https://visgl.github.io/react-google-maps/docs/api-reference/components/map#required"),!y.center&&u&&(y.center=u),!y.zoom&&Number.isFinite(d)&&(y.zoom=d),!y.heading&&Number.isFinite(h)&&(y.heading=h),!y.tilt&&Number.isFinite(v)&&(y.tilt=v);for(const x of Object.keys(y))y[x]===void 0&&delete y[x];const E=p.useRef(void 0);return p.useEffect(()=>{if(!s||!n)return;const{addMapInstance:x,removeMapInstance:g}=e,{mapId:_}=t,O=`${_||"default"}:${f||"default"}:${w||"LIGHT"}`;let T,L;if(m&&Rs.has(O)?(L=Rs.pop(O),T=L.getDiv(),s.appendChild(T),L.setOptions(y),setTimeout(()=>L.setCenter(L.getCenter()),0)):(T=document.createElement("div"),T.style.height="100%",s.appendChild(T),L=new google.maps.Map(T,Ot({},y,f?{renderingType:f}:{},w?{colorScheme:w}:{}))),i(L),x(L,c),l){const{padding:R}=l,A=Nn(l,yg);L.fitBounds(A,R)}else(!C||!b)&&L.fitBounds({east:180,west:-180,south:-90,north:90});if(E.current){const{mapId:R,cameraState:A}=E.current;R!==_&&L.setOptions(A)}return()=>{E.current={mapId:_,cameraState:a.current},T.remove(),m?Rs.push(O,L):google.maps.event.clearInstanceListeners(L),i(null),g(c)}},[s,n,c,t.mapId,t.renderingType,t.colorScheme]),[r,o,a]}const Qd=p.createContext(null),Jd=t=>{const{children:e,id:n,className:r,style:i}=t,s=p.useContext(Ni),o=Wd();if(!s)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[a,c,l]=bg(t,s);dg(a,l,t),eg(a,t),cg(a,t);const u=lg(a,t),d=!!t.controlled;p.useEffect(()=>{if(a)return u&&a.setOptions({disableDefaultUI:!0}),(u||d)&&a.setOptions({gestureHandling:"none",keyboardShortcuts:!1}),()=>{a.setOptions({gestureHandling:t.gestureHandling,keyboardShortcuts:t.keyboardShortcuts})}},[a,u,d,t.gestureHandling,t.keyboardShortcuts]);const h=t.center?Zd(t.center):null;let v=null,m=null;h&&Number.isFinite(h.lat)&&Number.isFinite(h.lng)&&(v=h.lat,m=h.lng);const f=p.useMemo(()=>{var C,b,E,x,g;return{center:{lat:(C=v)!=null?C:0,lng:(b=m)!=null?b:0},zoom:(E=t.zoom)!=null?E:0,heading:(x=t.heading)!=null?x:0,tilt:(g=t.tilt)!=null?g:0}},[v,m,t.zoom,t.heading,t.tilt]);p.useLayoutEffect(()=>{if(!a||!d)return;a.moveCamera(f);const C=a.addListener("bounds_changed",()=>{a.moveCamera(f)});return()=>C.remove()},[a,d,f]);const w=p.useMemo(()=>Ot({width:"100%",height:"100%",position:"relative",zIndex:u?-1:0},i),[i,u]),y=p.useMemo(()=>({map:a}),[a]);return o===Bt.AUTH_FAILURE?p.createElement("div",{style:Ot({position:"relative"},r?{}:w),className:r},p.createElement(fg,null)):p.createElement("div",Ot({ref:c,"data-testid":"map",style:r?void 0:w,className:r},n?{id:n}:{}),a?p.createElement(Qd.Provider,{value:y},e):null)};Jd.deckGLViewProps=!0;const fl=new Set;function wg(...t){const e=JSON.stringify(t);fl.has(e)||(fl.add(e),console.error(...t))}const ji=(t=null)=>{const e=p.useContext(Ni),{map:n}=p.useContext(Qd)||{};if(e===null)return wg("useMap(): failed to retrieve APIProviderContext. Make sure that the <APIProvider> component exists and that the component you are calling `useMap()` from is a sibling of the <APIProvider>."),null;const{mapInstances:r}=e;return t!==null?r[t]||null:n||r.default||null};function uc(t){const e=Kd(),n=p.useContext(Ni);return p.useEffect(()=>{!e||!n||n.importLibrary(t)},[e,n,t]),(n==null?void 0:n.loadedLibraries[t])||null}function nr(t,e,n){p.useEffect(()=>{if(!t||!e||!n)return;const r=google.maps.event.addListener(t,e,n);return()=>r.remove()},[t,e,n])}function ts(t,e,n){p.useEffect(()=>{t&&(t[e]=n)},[t,e,n])}function hl(t,e,n){p.useEffect(()=>{if(!(!t||!e||!n))return t.addEventListener(e,n),()=>t.removeEventListener(e,n)},[t,e,n])}function Sg(t){return t.content!==void 0}function pl(t){return t.nodeType===Node.ELEMENT_NODE}const Cg=p.createContext(null),_g={TOP_LEFT:["0%","0%"],TOP_CENTER:["50%","0%"],TOP:["50%","0%"],TOP_RIGHT:["100%","0%"],LEFT_CENTER:["0%","50%"],LEFT_TOP:["0%","0%"],LEFT:["0%","50%"],LEFT_BOTTOM:["0%","100%"],RIGHT_TOP:["100%","0%"],RIGHT:["100%","50%"],RIGHT_CENTER:["100%","50%"],RIGHT_BOTTOM:["100%","100%"],BOTTOM_LEFT:["0%","100%"],BOTTOM_CENTER:["50%","100%"],BOTTOM:["50%","100%"],BOTTOM_RIGHT:["100%","100%"],CENTER:["50%","50%"]},Eg=({children:t,styles:e,className:n,anchorPoint:r})=>{const[i,s]=r??_g.BOTTOM;let o=`-${i}`,a=`-${s}`;i.trimStart().startsWith("-")&&(o=i.substring(1)),s.trimStart().startsWith("-")&&(a=s.substring(1));const c=`translate(50%, 100%) translate(${o}, ${a})`;return p.createElement("div",{style:{transform:c}},p.createElement("div",{className:n,style:e},t))};function xg(t){const[e,n]=p.useState(null),[r,i]=p.useState(null),s=ji(),o=uc("marker"),{children:a,onClick:c,className:l,onMouseEnter:u,onMouseLeave:d,onDrag:h,onDragStart:v,onDragEnd:m,collisionBehavior:f,clickable:w,draggable:y,position:C,title:b,zIndex:E}=t,x=p.Children.count(a);return p.useEffect(()=>{if(!s||!o)return;const g=new o.AdvancedMarkerElement;g.map=s,n(g);let _=null;return x>0&&(_=document.createElement("div"),_.isCustomMarker=!0,g.content=_,i(_)),()=>{var O;g.map=null,(O=_)==null||O.remove(),n(null),i(null)}},[s,o,x]),p.useEffect(()=>{!(e!=null&&e.content)||!pl(e.content)||x>0||(e.content.className=l??"")},[e,l,x]),ts(e,"position",C),ts(e,"title",b??""),ts(e,"zIndex",E),ts(e,"collisionBehavior",f),p.useEffect(()=>{e&&(y!==void 0?e.gmpDraggable=y:h||v||m?e.gmpDraggable=!0:e.gmpDraggable=!1)},[e,y,h,m,v]),p.useEffect(()=>{if(!e)return;const g=w!==void 0||!!c||!!u||!!d;e.gmpClickable=g,g&&e!=null&&e.content&&pl(e.content)&&(e.content.style.pointerEvents="none",e.content.firstElementChild&&(e.content.firstElementChild.style.pointerEvents="all"))},[e,w,c,u,d]),nr(e,"click",c),nr(e,"drag",h),nr(e,"dragstart",v),nr(e,"dragend",m),hl(e==null?void 0:e.element,"mouseenter",u),hl(e==null?void 0:e.element,"mouseleave",d),[e,r]}const dc=p.forwardRef((t,e)=>{const{children:n,style:r,className:i,anchorPoint:s}=t,[o,a]=xg(t),c=p.useMemo(()=>o?{marker:o}:null,[o]);return p.useImperativeHandle(e,()=>o,[o]),a?p.createElement(Cg.Provider,{value:c},Hs.createPortal(p.createElement(Eg,{anchorPoint:s,styles:r,className:i},n),a)):null});function Og(t,e,n){if(e!=null&&typeof e!="object")throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");const r=t.style;if(n==null){if(e==null)return;for(const i in e)e.hasOwnProperty(i)&&ml(r,i,e[i]);return}for(const i in n)n.hasOwnProperty(i)&&(e==null||!e.hasOwnProperty(i))&&(i.indexOf("--")===0?r.setProperty(i,""):i==="float"?r.cssFloat="":r[i]="");if(e!=null)for(const i in e){const s=e[i];e.hasOwnProperty(i)&&n[i]!==s&&ml(r,i,s)}}function ml(t,e,n){const r=e.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?r?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":r?t.setProperty(e,n):typeof n=="number"&&n!==0&&!Tg(e)?t[e]=n+"px":e==="float"?t.cssFloat=n:t[e]=(""+n).trim()}const Pg=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridArea","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineClamp","lineHeight","opacity","order","orphans","scale","tabSize","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth"]);function Tg(t){return Pg.has(t)}const Ag=["children","headerContent","style","className","pixelOffset","anchor","shouldFocus","onClose","onCloseClick"],Xd=t=>{const{children:e,headerContent:n,style:r,className:i,pixelOffset:s,anchor:o,shouldFocus:a,onClose:c,onCloseClick:l}=t,u=Nn(t,Ag),d=uc("maps"),[h,v]=p.useState(null),m=p.useRef(null),f=p.useRef(null),w=Gd(u,zd);p.useEffect(()=>{if(!d)return;m.current=document.createElement("div"),f.current=document.createElement("div");const b=w;s&&(b.pixelOffset=new google.maps.Size(s[0],s[1])),n&&(b.headerContent=typeof n=="string"?n:f.current);const E=new google.maps.InfoWindow(w);return E.setContent(m.current),v(E),()=>{var x,g;E.setContent(null),(x=m.current)==null||x.remove(),(g=f.current)==null||g.remove(),m.current=null,f.current=null,v(null)}},[d]);const y=p.useRef(null);p.useEffect(()=>{!h||!m.current||(Og(m.current,r||null,y.current),y.current=r||null,i!==m.current.className&&(m.current.className=i||""))},[h,i,r]),p.useEffect(()=>{if(!h)return;const b=w;s?b.pixelOffset=new google.maps.Size(s[0],s[1]):b.pixelOffset=null,n?b.headerContent=typeof n=="string"?n:f.current:b.headerContent=null,h.setOptions(w)},[w,s,n]),nr(h,"close",c),nr(h,"closeclick",l);const C=ji();return p.useEffect(()=>{if(!C||!h||o===null)return;const b=!!o,E={map:C};if(o&&(E.anchor=o,Sg(o)&&o.content instanceof Element)){const g=o.content,_=g==null?void 0:g.getBoundingClientRect();if(_&&g!=null&&g.isCustomMarker){var x;const O=(x=o.content.firstElementChild)==null?void 0:x.firstElementChild,T=O==null?void 0:O.getBoundingClientRect(),L=T.x-_.x+(T.width-_.width)/2,R=T.y-_.y,A=w;A.pixelOffset=new google.maps.Size(s?s[0]+L:L,s?s[1]+R:R),h.setOptions(A)}}return a!==void 0&&(E.shouldFocus=a),h.open(E),()=>{b&&h.set("anchor",null),h.close()}},[h,o,C,a,w,s]),p.createElement(p.Fragment,null,m.current&&Hs.createPortal(e,m.current),f.current!==null&&Hs.createPortal(n,f.current))},Lg=["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"];function Rg(t){const[e,n]=p.useState(null),r=ji(),{onClick:i,onDrag:s,onDragStart:o,onDragEnd:a,onMouseOver:c,onMouseOut:l}=t,u=Nn(t,Lg),{position:d,draggable:h}=u;return p.useEffect(()=>{if(!r){r===void 0&&console.error("<Marker> has to be inside a Map component.");return}const v=new google.maps.Marker(u);return v.setMap(r),n(v),()=>{v.setMap(null),n(null)}},[r]),p.useEffect(()=>{if(!e)return;const v=e,m=google.maps.event;return i&&m.addListener(v,"click",i),s&&m.addListener(v,"drag",s),o&&m.addListener(v,"dragstart",o),a&&m.addListener(v,"dragend",a),c&&m.addListener(v,"mouseover",c),l&&m.addListener(v,"mouseout",l),e.setDraggable(!!h),()=>{m.clearInstanceListeners(v)}},[e,h,i,s,o,a,c,l]),p.useEffect(()=>{e&&u&&e.setOptions(u)},[e,u]),p.useEffect(()=>{h||!d||!e||e.setPosition(d)},[h,d,e]),e}p.forwardRef((t,e)=>{const n=Rg(t);return p.useImperativeHandle(e,()=>n,[n]),p.createElement(p.Fragment,null)});const kg=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 12 12",...t},N.createElement("path",{fill:"currentcolor",d:"M6 9.42a.838.838 0 0 1-.594-.246l-5.16-5.16a.84.84 0 1 1 1.189-1.188L6 7.392l4.565-4.566a.84.84 0 0 1 1.189 1.189l-5.16 5.16A.838.838 0 0 1 6 9.42Z"})),Yd=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:26,height:8,fill:"none",viewBox:"0 0 26 8",...t},N.createElement("g",{fill:"#000"},N.createElement("path",{d:"M1.416 7.5c-.255 0-.491-.065-.708-.194A1.445 1.445 0 0 1 0 6.06V1.94A1.445 1.445 0 0 1 .708.695C.925.564 1.16.5 1.416.5h4.056c.255 0 .488.065.698.194.217.13.39.305.517.525.134.214.2.454.2.72V6.06c0 .26-.066.5-.2.72-.128.22-.3.395-.517.525-.21.13-.443.194-.698.194H1.416Zm.067-1.517h3.903V2.017H1.483v3.966ZM7.941 7.5v-7h1.53l2.335 2.83L14.13.5h1.54v7h-1.493V2.804l-2.372 2.878-2.382-2.868V7.5H7.94ZM16.816 7.5v-7h1.53l3.856 4.667V.5h1.502v7h-1.53l-3.875-4.686V7.5h-1.483ZM24.536 7.5v-7H26v7h-1.464Z"}))),ef=t=>N.createElement("svg",{width:48,height:48,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},N.createElement("rect",{width:48,height:48,fill:"#6A4A9D"}),N.createElement("path",{d:"M16.3444 36.5C15.3815 36.5 14.4907 36.2685 13.6722 35.8056C12.8537 35.3426 12.2037 34.7176 11.7222 33.9306C11.2407 33.1435 11 32.287 11 31.3611V16.6389C11 15.6898 11.2407 14.8333 11.7222 14.0694C12.2037 13.2824 12.8537 12.6574 13.6722 12.1944C14.4907 11.7315 15.3815 11.5 16.3444 11.5H31.6556C32.6185 11.5 33.4972 11.7315 34.2917 12.1944C35.1102 12.6574 35.7602 13.2824 36.2417 14.0694C36.7472 14.8333 37 15.6898 37 16.6389V31.3611C37 32.287 36.7472 33.1435 36.2417 33.9306C35.7602 34.7176 35.1102 35.3426 34.2917 35.8056C33.4972 36.2685 32.6185 36.5 31.6556 36.5H16.3444ZM16.5972 31.0833H31.3306V16.9167H16.5972V31.0833Z",fill:"white"}));function Mg(t,e){return e.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(r){if(r!=="default"&&!(r in t)){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}})}),Object.freeze(t)}function go(t){return!!(t&&typeof t.then=="function")}function ks(t,e){return go(t)?Promise.resolve(t).then(e):e(t)}function ko(t,e,n){function r(i){const s=e(i);throw t.emit(s),console.error(s),s}try{const i=n();return go(i)?i.catch(r):i}catch(i){r(i)}}function gl(t){const e=(Array.isArray(t)?t:[t]).map(s=>`'${s}'`),n=e.slice(-2).join(" or ");return`Tolgee: You need to specify ${[...e.slice(0,-2),n].join(", ")} option`}function Dg(t){return typeof t=="object"&&!Array.isArray(t)&&t!==null}function tf(t){if(typeof t=="string")return[t];if(Array.isArray(t))return t}function tt(t){return tf(t)||[]}function Ng(t,e){return Dg(e)?tt(e==null?void 0:e[t]):tt(e)}function pa(t){return Array.from(new Set(t))}function nf(t){return t&&t.replace(/\/+$/,"")}function jg(t){if(typeof t=="string")return t;if(typeof(t==null?void 0:t.message)=="string")return t.message}const Ig=(t,e)=>fetch(t,e),rf=(t=Ig)=>(e,n)=>t(e,Object.assign(Object.assign({},n),{headers:Object.assign({"X-Tolgee-SDK-Type":"JS","X-Tolgee-SDK-Version":"5.22.0"},n==null?void 0:n.headers)}));function Rt(t){let e=[];return Object.freeze({listen(n){const r=i=>{n(i)};return e.push(r),{unsubscribe(){e=e.filter(i=>r!==i)}}},emit(n){t()&&e.forEach(r=>r({value:n}))}})}function Fg(t,e,n){const r=new Set,i=new Set;function s(c){const l=new Set(e());i.forEach(u=>{(c===void 0||(c==null?void 0:c.findIndex(h=>l.has(h)||u.namespaces.has(h)))!==-1)&&u.fn({value:void 0})})}let o=[];function a(){if(o.length===0)return;const c=o;o=[],r.forEach(d=>{d({value:void 0})});let l=new Set;c.forEach(d=>{d===void 0?l=void 0:l!==void 0&&d.forEach(h=>l.add(h))});const u=l?Array.from(l.keys()):void 0;s(u)}return Object.freeze({emit(c,l){t()&&(o.push(c),l?setTimeout(a,0):a())},listen(c){return r.add(c),{unsubscribe:()=>{r.delete(c)}}},listenSome(c){const l={fn:d=>{c(d)},namespaces:new Set};i.add(l);const u={unsubscribe:()=>{i.delete(l)},subscribeNs:d=>(tt(d).forEach(h=>l.namespaces.add(h)),d===void 0&&l.namespaces.add(n()),u)};return u}})}function Bg(t,e){let n=!0;function r(){return n}const i=Object.freeze({onPendingLanguageChange:Rt(r),onLanguageChange:Rt(r),onLoadingChange:Rt(r),onFetchingChange:Rt(r),onInitialLoaded:Rt(r),onRunningChange:Rt(r),onCacheChange:Rt(r),onUpdate:Fg(r,t,e),onPermanentChange:Rt(r),onError:Rt(r),setEmitterActive(s){n=s},on:(s,o)=>{switch(s){case"pendingLanguage":return i.onPendingLanguageChange.listen(o);case"language":return i.onLanguageChange.listen(o);case"loading":return i.onLoadingChange.listen(o);case"fetching":return i.onFetchingChange.listen(o);case"initialLoad":return i.onInitialLoaded.listen(o);case"running":return i.onRunningChange.listen(o);case"cache":return i.onCacheChange.listen(o);case"update":return i.onUpdate.listen(o);case"permanentChange":return i.onPermanentChange.listen(o);case"error":return i.onError.listen(o)}}});return i.onInitialLoaded.listen(()=>i.onUpdate.emit()),i.onLanguageChange.listen(()=>i.onUpdate.emit()),i.onCacheChange.listen(({value:s})=>i.onUpdate.emit([s.namespace],!0)),i}class vl extends Error{constructor(e,n,r=!1){const{language:i,namespace:s}=e;super(`Tolgee: Failed to fetch record for "${i}"${s&&` and "${s}"`}`),this.cause=n,this.isDev=r,this.name="RecordFetchError",this.language=i,this.namespace=s}}class Vg extends Error{constructor(e,n){super(e),this.cause=n,this.name="LanguageDetectorError"}}class yl extends Error{constructor(e,n){super(e),this.cause=n,this.name="LanguageStorageError"}}const sf=t=>{const e=new Map;return Object.entries(t).forEach(([n,r])=>{if(r!=null){if(typeof r=="object"){sf(r).forEach((i,s)=>{e.set(n+"."+s,i)});return}e.set(n,r)}}),e},Kr=t=>{const[e,...n]=t.split(":"),r=n.join(":");return{language:e,namespace:r||""}},kt=({language:t,namespace:e})=>e?`${t}:${e}`:t;function Hg(t,e,n,r,i,s,o){const a=new Map,c=new Map;let l={},u=0;function d(f,w,y){const C=kt(f);c.set(C,{data:sf(w),version:y}),t.onCacheChange.emit(f)}function h(f){let w;if(!w){const y=l[kt(f)];typeof y=="function"&&(w=y())}return w||(w=e(f)),go(w)?w==null?void 0:w.catch(y=>{const C=new vl(f,y);throw t.onError.emit(C),console.error(C),C}):w}function v(f,w){var y;let C;return w&&(C=(y=n(f))===null||y===void 0?void 0:y.catch(b=>{const E=new vl(f,b,!0);return t.onError.emit(E),console.warn(E),h(f)})),C||(C=h(f)),C}const m=Object.freeze({addStaticData(f){f&&(l=Object.assign(Object.assign({},l),f),Object.entries(f).forEach(([w,y])=>{if(typeof y!="function"){const C=Kr(w),b=c.get(w);(!b||b.version===0)&&d(C,y,0)}}))},invalidate(){a.clear(),u+=1},addRecord(f,w){d(f,w,u)},exists(f,w=!1){const y=c.get(kt(f));return y&&w?y.version===u:!!y},getRecord(f){var w;return(w=c.get(kt(r(f))))===null||w===void 0?void 0:w.data},getTranslation(f,w){var y;return(y=c.get(kt(f)))===null||y===void 0?void 0:y.data.get(w)},getTranslationNs(f,w,y){var C;for(const b of f)for(const E of w){const x=(C=c.get(kt({language:E,namespace:b})))===null||C===void 0?void 0:C.data.get(y);if(x!=null)return[b]}return pa(f)},getTranslationFallback(f,w,y){var C;for(const b of f)for(const E of w){const x=(C=c.get(kt({language:E,namespace:b})))===null||C===void 0?void 0:C.data.get(y);if(x!=null)return x}},changeTranslation(f,w,y){var C;const b=(C=c.get(kt(f)))===null||C===void 0?void 0:C.data;b==null||b.set(w,y),t.onCacheChange.emit(Object.assign(Object.assign({},f),{key:w}))},isFetching(f){if(i())return!0;if(f===void 0)return a.size>0;const w=tt(f);return!!Array.from(a.keys()).find(y=>w.includes(Kr(y).namespace))},isLoading(f,w){const y=tt(w);return!!(i()||Array.from(a.keys()).find(C=>{const b=Kr(C);return(!y.length||y.includes(b.namespace))&&!m.exists({namespace:b.namespace,language:f})}))},async loadRecords(f,w){const y=f.map(b=>{const E=r(b),x=kt(E),g=a.get(x);if(g)return{new:!1,promise:g,keyObject:E,cacheKey:x};const _=v(E,w)||Promise.resolve(void 0);return a.set(x,_),{new:!0,promise:_,keyObject:E,cacheKey:x}});s.notify(),o.notify();const C=await Promise.all(y.map(b=>b.promise));return y.forEach((b,E)=>{const x=a.get(b.cacheKey)!==b.promise;if(b.new&&!x){a.delete(b.cacheKey);const g=C[E];g?m.addRecord(b.keyObject,g):m.getRecord(b.keyObject)||m.addRecord(b.keyObject,{})}}),s.notify(),o.notify(),y.map(b=>m.getRecord(b.keyObject))},getAllRecords(){return Array.from(c.entries()).map(([w,y])=>Object.assign(Object.assign({},Kr(w)),{data:y.data}))}});return m}function of(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}const Ug={tagAttributes:{textarea:["placeholder"],input:["value","placeholder"],img:["alt"],"*":["aria-label","title"]},restrictedElements:["script","style"],highlightKeys:["Alt"],highlightColor:"rgb(255, 0, 0)",highlightWidth:5,inputPrefix:"%-%tolgee:",inputSuffix:"%-%",passToParent:["option","optgroup"],fullKeyEncode:!1},ma="invalid",$g="https://app.tolgee.io",zg=({key:t})=>t,qg={defaultNs:"",observerOptions:Ug,observerType:"invisible",onFormatError:ma,apiUrl:$g,fetch:rf(),onTranslationMissing:zg},ga=(...t)=>{let e={};return t.forEach(n=>{e=Object.assign(Object.assign(Object.assign({},e),n),{observerOptions:Object.assign(Object.assign({},e.observerOptions),n==null?void 0:n.observerOptions)})}),e};function bl(t,e){const n=ga(qg,e==null?void 0:e.initialOptions,t);return n.apiUrl=nf(n.apiUrl),t!=null&&t.fetch&&(n.fetch=rf(t.fetch)),{initialOptions:n,activeNamespaces:(e==null?void 0:e.activeNamespaces)||new Map,language:e==null?void 0:e.language,pendingLanguage:e==null?void 0:e.language,isInitialLoading:!1,isRunning:!1}}function Gg(t,e,n,r,i,s,o,a){const c={ui:void 0},l={formatters:[],finalFormatter:void 0,observer:void 0,devBackend:void 0,backends:[],ui:void 0,languageDetector:void 0,languageStorage:void 0},u=async({keysAndDefaults:A,event:M})=>{var j;const F=A.map(({key:G,ns:B,defaultValue:z})=>({key:G,defaultValue:z,fallbackNamespaces:r(B),namespace:i({key:G,ns:B})[0],translation:s({key:G,ns:B})}));(j=l.ui)===null||j===void 0||j.handleElementClick(F,M)},d=(A,M)=>{var j;return((j=l.observer)===null||j===void 0?void 0:j.findPositions(A,M))||[]};function h(A){const M=s({key:A.key,ns:A.ns});return R.formatTranslation(Object.assign(Object.assign({},A),{translation:M,formatEnabled:!0}))}function v(){return{fetch:e().fetch}}function m(A){l.observer=A==null?void 0:A()}function f(){return!!l.observer}function w(A){A&&l.formatters.push(A)}function y(A){l.finalFormatter=A}function C(A){c.ui=A}function b(){return!!c.ui}function E(A){l.languageStorage=A}function x(A){l.languageDetector=A}function g(){return ko(a.onError,A=>new yl("Tolgee: Failed to load language",A),()=>{var A;return(A=l.languageStorage)===null||A===void 0?void 0:A.getLanguage(v())})}function _(){if(!l.languageDetector)return;const A=n();return ko(a.onError,M=>new Vg("Tolgee: Failed to detect language",M),()=>{var M;return(M=l.languageDetector)===null||M===void 0?void 0:M.getLanguage(Object.assign({availableLanguages:A},v()))})}function O(A){A&&l.backends.push(A)}function T(A){l.devBackend=A}function L(A,M){const j=Object.freeze({setFinalFormatter:y,addFormatter:w,setObserver:m,hasObserver:f,setUi:C,hasUi:b,setDevBackend:T,addBackend:O,setLanguageDetector:x,setLanguageStorage:E});M(A,j)}const R=Object.freeze({addPlugin:L,run(){var A,M;const{apiKey:j,apiUrl:F,projectId:G,observerOptions:B}=e();l.ui=(A=c.ui)===null||A===void 0?void 0:A.call(c,{apiKey:j,apiUrl:F,projectId:G,highlight:R.highlight,changeTranslation:o,findPositions:d,onPermanentChange:z=>a.onPermanentChange.emit(z)}),(M=l.observer)===null||M===void 0||M.run({mouseHighlight:!0,options:B,translate:h,onClick:u})},stop(){var A;l.ui=void 0,(A=l.observer)===null||A===void 0||A.stop()},getLanguageStorage(){return l.languageStorage},getInitialLanguage(){const A=n(),M=g();return ks(M,j=>(!A||A.includes(j))&&j?j:_())},setStoredLanguage(A){return ko(a.onError,M=>new yl("Tolgee: Failed to store language",M),()=>{var M;return(M=l.languageStorage)===null||M===void 0?void 0:M.setLanguage(A,v())})},getDevBackend(){return l.devBackend},getBackendRecord:({language:A,namespace:M})=>{for(const j of l.backends){const F=j.getRecord(Object.assign({language:A,namespace:M},v()));if(F!==void 0)return F}},getBackendDevRecord:({language:A,namespace:M})=>{var j;const{apiKey:F,apiUrl:G,projectId:B}=e();return(j=l.devBackend)===null||j===void 0?void 0:j.getRecord(Object.assign({apiKey:F,apiUrl:G,projectId:B,language:A,namespace:M},v()))},getLanguageDetector(){return l.languageDetector},retranslate(){var A;(A=l.observer)===null||A===void 0||A.retranslate()},highlight:(A,M)=>{var j,F;return((F=(j=l.observer)===null||j===void 0?void 0:j.highlight)===null||F===void 0?void 0:F.call(j,A,M))||{unhighlight(){}}},unwrap(A){var M;return l.observer?(M=l.observer)===null||M===void 0?void 0:M.unwrap(A):{text:A,keys:[]}},wrap(A){var M;return l.observer?(M=l.observer)===null||M===void 0?void 0:M.wrap(A):A.translation},hasDevBackend(){return!!R.getDevBackend()},formatTranslation(A){var M,{formatEnabled:j}=A,F=of(A,["formatEnabled"]);const{key:G,translation:B,defaultValue:z,noWrap:se,params:X,ns:le,orEmpty:Y}=F,Ne=B??z;let Ee="";B==null&&(Ee=e().onTranslationMissing(F));let me=Ne??(Y?"":Ee);const zt=t(),qt=j||!(!((M=l.observer)===null||M===void 0)&&M.outputNotFormattable),kr=gt=>l.observer&&!se?l.observer.wrap({key:G,translation:gt,defaultValue:z,params:X,ns:le}):gt;me=kr(me);try{if(Ne&&zt&&qt)for(const gt of l.formatters)me=gt.format({translation:me,language:zt,params:X});l.finalFormatter&&Ne&&zt&&qt&&(me=l.finalFormatter.format({translation:me,language:zt,params:X}))}catch(gt){console.error(gt);const Vi=jg(gt)||ma,Vn=e().onFormatError,Ke=typeof Vn;Ke==="string"?me=Vn:Ke==="function"?me=Vn(Vi,F):me=ma,me=kr(me)}return me}});return R}const wl=(t,e,n)=>{let r=t;return Object.freeze({init(i){r=i},notify(){const i=e();r!==i&&n(i),r=i}})};function Wg(t,e,n){let r=bl(),i;const s=Object.freeze({init(o){r=bl(o,r)},isRunning(){return r.isRunning},setRunning(o){r.isRunning!==o&&(r.isRunning=o,n.emit(o))},isInitialLoading(){return r.isInitialLoading},setInitialLoading(o){r.isInitialLoading=o},getLanguage(){return r.language||r.initialOptions.language},setLanguage(o){r.language!==o&&(r.language=o,t.emit(o))},getPendingLanguage(){return r.pendingLanguage||s.getLanguage()},setPendingLanguage(o){r.pendingLanguage!==o&&(r.pendingLanguage=o,e.emit(o))},getInitialOptions(){return Object.assign(Object.assign({},r.initialOptions),i)},addActiveNs(o){tt(o).forEach(c=>{const l=r.activeNamespaces.get(c);l!==void 0?r.activeNamespaces.set(c,l+1):r.activeNamespaces.set(c,1)})},removeActiveNs(o){tt(o).forEach(c=>{const l=r.activeNamespaces.get(c);l!==void 0&&l>1?r.activeNamespaces.set(c,l-1):r.activeNamespaces.delete(c)})},getRequiredNamespaces(){return pa([...r.initialOptions.ns||[r.initialOptions.defaultNs],...tt(r.initialOptions.fallbackNs),...r.activeNamespaces.keys()])},getFallbackLangs(o){const a=o||s.getLanguage();return a?pa([a,...Ng(a,r.initialOptions.fallbackLanguage)]):[]},getFallbackNs(){return tt(r.initialOptions.fallbackNs)},getDefaultNs(o){return o===void 0?r.initialOptions.defaultNs:o},getAvailableLanguages(){if(r.initialOptions.availableLanguages)return r.initialOptions.availableLanguages;if(r.initialOptions.staticData){const o=Object.keys(r.initialOptions.staticData).map(a=>Kr(a).language);return Array.from(new Set(o))}},withDefaultNs(o){return{namespace:o.namespace===void 0?s.getInitialOptions().defaultNs:o.namespace,language:o.language}},overrideCredentials(o){o?i=Object.assign(Object.assign({},o),{apiUrl:nf(o.apiUrl)}):i=void 0}});return s}function Zg(t){var{ns:e,noWrap:n,orEmpty:r,params:i,language:s}=t,o=of(t,["ns","noWrap","orEmpty","params","language"]);return Object.assign(Object.assign({},{ns:e,noWrap:n,orEmpty:r,language:s}),{params:Object.assign({},o)})}const af=(t,...e)=>{let n={},r;return typeof t=="object"?n=t:(n.key=t,typeof e[0]=="string"?(n.defaultValue=e[0],r=e[1]):typeof e[0]=="object"&&(r=e[0])),r&&(n=Object.assign(Object.assign({},Zg(r)),n)),n};function Kg({options:t}){const e=Bg(c,l),n=wl(!1,()=>o.isFetching(),e.onFetchingChange.emit),r=wl(!1,()=>x.isLoading(),e.onLoadingChange.emit),i=Wg(e.onLanguageChange,e.onPendingLanguageChange,e.onRunningChange),s=Gg(i.getLanguage,i.getInitialOptions,i.getAvailableLanguages,u,w,y,h,e),o=Hg(e,s.getBackendRecord,s.getBackendDevRecord,i.withDefaultNs,i.isInitialLoading,n,r);t&&v(t);let a;e.onUpdate.listen(()=>{i.isRunning()&&s.retranslate()});function c(){return i.getFallbackNs()}function l(g){return i.getDefaultNs(g)}function u(g){return[...tt(l(g)),...c()]}function d(g){return[...tt(g??l()),...i.getRequiredNamespaces()]}function h(g,_,O){const T=i.withDefaultNs(g),L=o.getTranslation(T,_);return o.changeTranslation(T,_,O),{revert(){o.changeTranslation(T,_,L)}}}function v(g){i.init(g),o.addStaticData(i.getInitialOptions().staticData)}function m(g,_){const O=i.getFallbackLangs(g),T=d(_),L=[];return O.forEach(R=>{T.forEach(A=>{o.exists({language:R,namespace:A},!0)||L.push({language:R,namespace:A})})}),L}function f(g,_){const O=m(g,_);if(O.length)return ks(x.loadRecords(O),()=>{})}function w({key:g,ns:_}){const O=i.getFallbackLangs(),T=u(_??void 0);return o.getTranslationNs(T,O,g)}function y({key:g,ns:_,language:O}){const T=u(_??void 0),L=i.getFallbackLangs(O);return o.getTranslationFallback(T,L,g)}function C(){const g=ks(b(),()=>f());if(go(g))return i.setInitialLoading(!0),n.notify(),r.notify(),Promise.resolve(g).then(()=>{i.setInitialLoading(!1),n.notify(),r.notify(),e.onInitialLoaded.emit()});e.onInitialLoaded.emit()}function b(){if(i.getLanguage())return;const _=s.getInitialLanguage();return ks(_,O=>{const T=O||i.getInitialOptions().defaultLanguage;T&&i.setLanguage(T)})}function E(){if((s.getLanguageDetector()||s.getLanguageStorage())&&!i.getAvailableLanguages())throw new Error(gl("availableLanguages"));if(!i.getLanguage()&&!i.getInitialOptions().defaultLanguage)throw new Error(gl(["defaultLanguage","language"]))}const x=Object.freeze(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),i),s),o),{init:v,getTranslation:y,changeTranslation:h,getTranslationNs:w,getDefaultAndFallbackNs:u,async changeLanguage(g){i.getPendingLanguage()===g&&i.getLanguage()===g||(i.setPendingLanguage(g),i.isRunning()&&await f(g),g===i.getPendingLanguage()&&(i.setLanguage(g),await s.setStoredLanguage(g)))},async addActiveNs(g,_){_||i.addActiveNs(g),i.isRunning()&&await f(void 0,g)},loadRecords(g){return o.loadRecords(g,x.isDev())},async loadRecord(g){return(await x.loadRecords([g]))[0]},isLoading(g){return o.isLoading(i.getLanguage(),g)},isLoaded(g){const _=i.getLanguage();if(!_)return!1;const O=i.getFallbackLangs(_),T=d(g),L=[];return O.forEach(R=>{T.forEach(A=>{o.exists({language:R,namespace:A})||L.push({language:R,namespace:A})})}),L.length===0},t:(...g)=>{const _=af(...g),O=y(_);return s.formatTranslation(Object.assign(Object.assign({},_),{translation:O}))},isDev(){return!!(i.getInitialOptions().apiKey&&i.getInitialOptions().apiUrl)},run(){return E(),i.isRunning()||(i.setRunning(!0),s.run(),a=C()),Promise.resolve(a)},stop(){i.isRunning()&&(s.stop(),i.setRunning(!1))}}));return x}function Qg(t){const e=Kg({options:t});e.isDev()&&e.invalidate();function n(i){const s=e.isRunning();s&&e.stop(),i(),e.isDev()&&e.invalidate(),s&&e.run()}const r=Object.freeze({on:e.on,onNsUpdate:e.onUpdate.listenSome,setEmitterActive:e.setEmitterActive,getLanguage:e.getLanguage,getPendingLanguage:e.getPendingLanguage,changeLanguage:e.changeLanguage,changeTranslation:e.changeTranslation,addActiveNs:e.addActiveNs,removeActiveNs:e.removeActiveNs,loadRecords:e.loadRecords,loadRecord:e.loadRecord,addStaticData:e.addStaticData,getRecord:e.getRecord,getAllRecords:e.getAllRecords,isLoaded:e.isLoaded,isInitialLoading:e.isInitialLoading,isLoading:e.isLoading,isFetching:e.isFetching,isRunning:e.isRunning,run:e.run,stop:e.stop,t:e.t,highlight:e.highlight,getInitialOptions:e.getInitialOptions,isDev:e.isDev,wrap:e.wrap,unwrap:e.unwrap,overrideCredentials(i){n(()=>e.overrideCredentials(i))},addPlugin(i){i&&n(()=>e.addPlugin(r,i))},updateOptions(i){i&&n(()=>e.init(i))}});return r}const Jg=()=>{const t={plugins:[],options:{}},e=Object.freeze({use(n){return t.plugins.push(n),e},updateDefaults(n){return t.options=ga(t.options,n),e},init(n){const r=Qg(ga(t.options,n));return t.plugins.forEach(r.addPlugin),r}});return e},cf=0,va=1,Xg=2;class Yg extends Error{constructor(e,n,r){let i;e===cf?i="Empty parameter":e===va?i="Unexpected character":i="Unexpected end",super(`Tolgee parser: ${i} at ${n} in "${r}"`),this.code=e,this.index=n}}function Sl(t){return/\s/.test(t)}const Kt=0,ya=1,Ms=2,Mo=3,Do=4,ev=new Set([Ms,ya,Kt]),ba="'",tv=new Set(["{","}",ba]),nv=t=>/[0-9a-zA-Z_]/.test(t);function rv(t){let e=Kt,n="",r="",i="";const s=[],o=[];let a=0;function c(h){throw new Yg(h,a,t)}const l=()=>{s.push(n),n=""},u=()=>{nv(i)||c(va),r+=i},d=()=>{r===""&&c(cf),o.push(r),r=""};for(a=0;a<t.length;a++)switch(i=t[a],e){case Kt:i===ba?(n+=i,e=ya):i==="{"?(l(),e=Mo):(n+=i,e=Kt);break;case ya:tv.has(i)?(n=n.slice(0,-1)+i,e=Ms):(n+=i,e=Kt);break;case Ms:i===ba?e=Kt:(n+=i,e=Ms);break;case Mo:i==="}"?(d(),e=Kt):Sl(i)?r!==""&&(d(),e=Do):(u(),e=Mo);break;case Do:i=="}"?e=Kt:Sl(i)?e=Do:c(va)}return ev.has(e)||c(Xg),l(),[s,o]}function iv(t,e){const[n,r]=rv(t),i=[n[0]];for(let s=1;s<n.length;s++){const o=e==null?void 0:e[r[s-1]];if(o===void 0)throw new Error(`Missing parameter "${r[s-1]}" in "${t}"`);i.push(String(o)),i.push(n[s])}return i.join("")}function sv(){return{format:({translation:t,params:e})=>iv(t,e)}}const ov=()=>(t,e)=>(e.setFinalFormatter(sv()),t);var No=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Cl={};(function(t){function e(y,C){var b;return y instanceof Buffer?b=y:b=Buffer.from(y.buffer,y.byteOffset,y.byteLength),b.toString(C)}var n=function(y){return Buffer.from(y)};function r(y){for(var C=0,b=Math.min(256*256,y.length+1),E=new Uint16Array(b),x=[],g=0;;){var _=C<y.length;if(!_||g>=b-1){var O=E.subarray(0,g),T=O;if(x.push(String.fromCharCode.apply(null,T)),!_)return x.join("");y=y.subarray(C),C=0,g=0}var L=y[C++];if(!(L&128))E[g++]=L;else if((L&224)===192){var R=y[C++]&63;E[g++]=(L&31)<<6|R}else if((L&240)===224){var R=y[C++]&63,A=y[C++]&63;E[g++]=(L&31)<<12|R<<6|A}else if((L&248)===240){var R=y[C++]&63,A=y[C++]&63,M=y[C++]&63,j=(L&7)<<18|R<<12|A<<6|M;j>65535&&(j-=65536,E[g++]=j>>>10&1023|55296,j=56320|j&1023),E[g++]=j}}}function i(y){for(var C=0,b=y.length,E=0,x=Math.max(32,b+(b>>>1)+7),g=new Uint8Array(x>>>3<<3);C<b;){var _=y.charCodeAt(C++);if(_>=55296&&_<=56319){if(C<b){var O=y.charCodeAt(C);(O&64512)===56320&&(++C,_=((_&1023)<<10)+(O&1023)+65536)}if(_>=55296&&_<=56319)continue}if(E+4>g.length){x+=8,x*=1+C/y.length*2,x=x>>>3<<3;var T=new Uint8Array(x);T.set(g),g=T}if(_&4294967168)if(!(_&4294965248))g[E++]=_>>>6&31|192;else if(!(_&4294901760))g[E++]=_>>>12&15|224,g[E++]=_>>>6&63|128;else if(!(_&4292870144))g[E++]=_>>>18&7|240,g[E++]=_>>>12&63|128,g[E++]=_>>>6&63|128;else continue;else{g[E++]=_;continue}g[E++]=_&63|128}return g.slice?g.slice(0,E):g.subarray(0,E)}var s="Failed to ",o=function(y,C,b){if(y)throw new Error("".concat(s).concat(C,": the '").concat(b,"' option is unsupported."))},a=typeof Buffer=="function"&&Buffer.from,c=a?n:i;function l(){this.encoding="utf-8"}l.prototype.encode=function(y,C){return o(C&&C.stream,"encode","stream"),c(y)};function u(y){var C;try{var b=new Blob([y],{type:"text/plain;charset=UTF-8"});C=URL.createObjectURL(b);var E=new XMLHttpRequest;return E.open("GET",C,!1),E.send(),E.responseText}finally{C&&URL.revokeObjectURL(C)}}var d=!a&&typeof Blob=="function"&&typeof URL=="function"&&typeof URL.createObjectURL=="function",h=["utf-8","utf8","unicode-1-1-utf-8"],v=r;a?v=e:d&&(v=function(y){try{return u(y)}catch{return r(y)}});var m="construct 'TextDecoder'",f="".concat(s," ").concat(m,": the ");function w(y,C){o(C&&C.fatal,m,"fatal"),y=y||"utf-8";var b;if(a?b=Buffer.isEncoding(y):b=h.indexOf(y.toLowerCase())!==-1,!b)throw new RangeError("".concat(f," encoding label provided ('").concat(y,"') is invalid."));this.encoding=y,this.fatal=!1,this.ignoreBOM=!1}w.prototype.decode=function(y,C){o(C&&C.stream,"decode","stream");var b;return y instanceof Uint8Array?b=y:y.buffer instanceof ArrayBuffer?b=new Uint8Array(y.buffer):b=new Uint8Array(y),v(b,this.encoding)},t.TextEncoder=t.TextEncoder||l,t.TextDecoder=t.TextDecoder||w})(typeof window<"u"?window:No);var av=Mg({__proto__:null,default:Cl},[Cl]),jo;(jo=console.assert)===null||jo===void 0||jo.call(console,av);const cv="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";function lv(t){const e=cv.indexOf(t);if(e===-1)throw new Error("Invalid character found: "+t);return e}function uv(t){const e=new Uint8Array(t),n=e.length;let r="",i=Math.pow(2,16)-1;for(let s=0;s<n;s+=i)s+i>n&&(i=n-s),r+=String.fromCharCode.apply(null,e.subarray(s,s+i));return r}function dv(t){t=t.toUpperCase();const e=t.length;let n=0,r=0,i=0;const s=new Uint8Array(e*5/8|0);for(let o=0;o<e;o++)r=r<<5|lv(t[o]),n+=5,n>=8&&(s[i++]=r>>>n-8&255,n-=8);return uv(s.buffer)}function fv(t){if(t)try{const[e,n]=t.split("_");if(e==="tgpak"){const[r]=dv(n).split("_");return Number(r)}}catch{console.warn("Tolgee: Api key can't be parsed")}}function hv(t){if(!t)return;const[e]=t.split("_");return e==="tgpak"?"tgpak":e==="tgpat"?"tgpat":"legacy"}function pv(){return{getRecord({apiUrl:t,apiKey:e,language:n,namespace:r,projectId:i,fetch:s}){var o;const a=(o=fv(e))!==null&&o!==void 0?o:i;let c=a!==void 0?`${t}/v2/projects/${a}/translations/${n}`:`${t}/v2/projects/translations/${n}`;if(r&&(c+=`?ns=${r}`),hv(e)==="tgpat"&&i===void 0)throw new Error("You need to specify 'projectId' when using PAT key");return s(c,{headers:{"X-API-Key":e||"","Content-Type":"application/json"}}).then(l=>{if(l.ok)return l.json().then(u=>u[n]);throw new Error(l.statusText)})}}}const mv=()=>(t,e)=>(e.setDevBackend(pv()),t);function gv(t,e){const n=r=>{var i,s;t.includes((i=r.data)===null||i===void 0?void 0:i.type)&&e((s=r.data)===null||s===void 0?void 0:s.data)};return window.addEventListener("message",n,!1),{unsubscribe(){window.removeEventListener("message",n)}}}function vv({message:t,recievingMessage:e,data:n,attempts:r=1,timeout:i=300}){let s=!1;const o=()=>new Promise((c,l)=>{const u=gv(e,h);window.postMessage({type:t,data:n},window.origin);const d=setTimeout(m,i);function h(f){clearTimeout(d),v(),c(f)}function v(){u.unsubscribe()}function m(){v(),l()}});return{cancel(){s=!0},promise:(async()=>{for(let c=0;c<r;c++){if(s)return new Promise(()=>{});try{return await o()}catch{continue}}if(!s)throw`Didn't recieve ${e.join(" or ")} in time.`;return new Promise(()=>{})})()}}function yv(){let t;async function e(n){t==null||t();const{cancel:r,promise:i}=vv({message:"TOLGEE_READY",recievingMessage:["TOLGEE_PLUGIN_READY","TOLGEE_PLUGIN_UPDATED"],data:n,attempts:4});return t=r,i}return{update:e}}const bv="tolgee-in-context-tools.umd.min.js",wv="@tolgee/in-context-tools",Sv="InContextTools",Cv="https://cdn.jsdelivr.net/npm";function _v(t){return new Promise((e,n)=>{const r=document.createElement("script");r.src=t,r.addEventListener("load",()=>e()),r.addEventListener("error",i=>n(i.error)),document.head.appendChild(r)})}let Io=null;function Ev(t){return Io||(Io=_v(`${Cv}/@tolgee/web@${t}/dist/${bv}`).then(()=>window[wv][Sv])),Io}const lf="__tolgee_apiKey",uf="__tolgee_apiUrl";function _l(){const t=sessionStorage.getItem(lf)||void 0,e=sessionStorage.getItem(uf)||void 0;if(!(!t||!e))return{apiKey:t,apiUrl:e}}function xv(){sessionStorage.removeItem(lf),sessionStorage.removeItem(uf)}function Ov(t){document.readyState!=="loading"?Promise.resolve().then(()=>{t()}):document.addEventListener&&document.addEventListener("DOMContentLoaded",t)}let df=()=>t=>t;const Pv=()=>{if(typeof window>"u")return!1;try{return typeof sessionStorage<"u"&&sessionStorage}catch(t){return console.error("sessionStorage not available",t),!1}};Pv()&&(df=()=>t=>{const e=yv(),n=()=>({uiPresent:!0,uiVersion:void 0,mode:t.isDev()?"development":"production",config:{apiUrl:t.getInitialOptions().apiUrl||"",apiKey:t.getInitialOptions().apiKey||""}}),r=async()=>{const s=await Ev("5.22.0");return o=>{const a=_l();return o.addPlugin(s({credentials:a})),o}};return t.on("running",({value:s})=>{s&&Ov(()=>{e.update(n()).catch(xv)})}),_l()&&r().then(s=>{t.addPlugin(s)}).catch(s=>{console.error("Tolgee: Failed to load in-context tools"),console.error(s)}),t});function Tv(){return Jg().use(df())}const Av={useSuspense:!0};let Fo;const ff=()=>(Fo||(Fo=p.createContext(void 0)),Fo),Lv=({tolgee:t,options:e,children:n,fallback:r})=>{const[i,s]=p.useState(!t.isLoaded());p.useEffect(()=>{t.run().catch(c=>{console.error(c)}).finally(()=>{s(!1)})},[t]);const o=Object.assign(Object.assign({},Av),e),a=ff();return o.useSuspense?p.createElement(a.Provider,{value:{tolgee:t,options:o}},i?r:p.createElement(p.Suspense,{fallback:r||null},n)):p.createElement(a.Provider,{value:{tolgee:t,options:o}},i?r:n)};let Rv;function kv(){return Rv}const Mv=()=>{const t=ff(),e=p.useContext(t)||kv();if(!e)throw new Error("Couldn't find tolgee instance, did you forgot to use `TolgeeProvider`?");return e},Dv=()=>{const[t,e]=p.useState(0),n=p.useCallback(()=>{e(r=>r+1)},[e]);return{instance:t,rerender:n}},hf=(t,e)=>{const{tolgee:n,options:r}=Mv(),i=tf(t),s=tt(i).join(":"),o=Object.assign(Object.assign({},r),e),{rerender:a,instance:c}=Dv(),l=p.useRef(),u=p.useRef([]);u.current=[];const d=m=>{var f;u.current.push(m),(f=l.current)===null||f===void 0||f.subscribeNs(m)},h=n.isLoaded(i);p.useEffect(()=>{const m=n.onNsUpdate(a);return l.current=m,m.subscribeNs(i),u.current.forEach(f=>{m.subscribeNs(f)}),()=>{m.unsubscribe()}},[s,n]),p.useEffect(()=>(n.addActiveNs(i),()=>n.removeActiveNs(i)),[s,n]);const v=p.useCallback(m=>{var f;const w=(f=m.ns)!==null&&f!==void 0?f:i==null?void 0:i[0];return d(w),n.t(Object.assign(Object.assign({},m),{ns:w}))},[n,c]);if(o.useSuspense&&!h)throw n.addActiveNs(i,!0);return{t:v,isLoading:!h}},mt=(t,e)=>{const{t:n,isLoading:r}=hf(t,e);return{t:p.useCallback((...s)=>{const o=af(...s);return n(o)},[n]),isLoading:r}},Nv=t=>{if(!t)return;const e={};return Object.entries(t||{}).forEach(([n,r])=>{if(typeof r=="function")e[n]=i=>r(wa(i));else if(p.isValidElement(r)){const i=r;e[n]=s=>i.props.children===void 0&&(s!=null&&s.length)?p.cloneElement(i,{},wa(s)):p.cloneElement(i)}else e[n]=r}),e},wa=t=>Array.isArray(t)?p.Children.toArray(t):t,jv=t=>{const e=t.keyName||t.children;e===void 0&&console.error("T component: keyName not defined");const n=t.defaultValue||(t.keyName?t.children:void 0),r=wa(t.t({key:e,params:Nv(t.params),defaultValue:n,noWrap:t.noWrap,ns:t.ns,language:t.language}));return p.createElement(p.Fragment,null,r)},It=t=>{const{t:e}=hf();return p.createElement(jv,Object.assign({t:e},t))},Iv="Spinner-module__loader__U4GVhD",Fv={loader:Iv},qs=({className:t})=>S.jsx("div",{className:J(Fv.loader,t),children:"Loading..."}),Bv="Button-module__root__8RX49h",Vv="Button-module__primary__st6yY9",Hv="Button-module__secondary__j-3rjz",Uv="Button-module__loading__QfItr2",$v="Button-module__spinner__kVZYqS",Vr={root:Bv,primary:Vv,secondary:Hv,loading:Uv,spinner:$v},rt=({children:t,className:e,loading:n,variant:r="primary",...i})=>{const s=[Vr.root,e,Vr[r],{[Vr.loading]:n}];if(i.as==="link"){const{as:o,disabled:a,...c}=i;return S.jsxs("a",{className:J(s),...c,"data-disabled":a,children:[!n&&t,n&&S.jsx(qs,{className:Vr.spinner})]})}if(i.as==="button"){const{as:o,...a}=i;return S.jsxs("button",{type:"button",className:J(s),...a,children:[!n&&t,n&&S.jsx(qs,{className:Vr.spinner})]})}xt(!1,"Invalid button type")};rt.defaultProps={as:"button"};const zv=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},N.createElement("g",{clipPath:"url(#a)"},N.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M17.071 3.071a1.25 1.25 0 0 0-1.768 0L10 8.375 4.697 3.07a1.25 1.25 0 1 0-1.768 1.77l5.303 5.303-5.303 5.303a1.25 1.25 0 0 0 1.768 1.768L10 11.91l5.303 5.303a1.25 1.25 0 1 0 1.768-1.768l-5.303-5.303L17.07 4.84a1.25 1.25 0 0 0 0-1.768Z",clipRule:"evenodd"})),N.createElement("defs",null,N.createElement("clipPath",{id:"a"},N.createElement("path",{fill:"#fff",d:"M0 0h20v20H0z"})))),qv="CloseButton-module__root__2m1asd",Gv="CloseButton-module__absolutePositionVariant__lGX4cQ",Wv="CloseButton-module__relativePositionVariant__LqTTWf",El={root:qv,absolutePositionVariant:Gv,relativePositionVariant:Wv},Lr=({className:t,position:e="absolute",...n})=>S.jsx("div",{...n,className:J(El.root,t,El[`${e}PositionVariant`]),children:S.jsx(zv,{})}),Zv=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:13,height:12,viewBox:"0 0 13 12",fill:"none",...t},N.createElement("path",{d:"M6.04102 1.125C5.07683 1.125 4.1343 1.41091 3.33261 1.94659C2.53092 2.48226 1.90608 3.24363 1.53711 4.13442C1.16813 5.02521 1.07159 6.00541 1.25969 6.95107C1.44779 7.89672 1.91209 8.76536 2.59387 9.44715C3.27565 10.1289 4.1443 10.5932 5.08995 10.7813C6.03561 10.9694 7.01581 10.8729 7.9066 10.5039C8.79739 10.1349 9.55876 9.51009 10.0944 8.7084C10.6301 7.90671 10.916 6.96418 10.916 6C10.9147 4.70749 10.4006 3.46831 9.48666 2.55436C8.57271 1.64042 7.33353 1.12636 6.04102 1.125ZM6.04102 10.125C5.22517 10.125 4.42764 9.88307 3.74929 9.42981C3.07094 8.97655 2.54223 8.33231 2.23001 7.57857C1.9178 6.82482 1.83611 5.99542 1.99528 5.19525C2.15444 4.39508 2.54731 3.66008 3.1242 3.08318C3.70109 2.50629 4.4361 2.11342 5.23627 1.95426C6.03644 1.7951 6.86584 1.87679 7.61959 2.189C8.37333 2.50121 9.01757 3.02992 9.47083 3.70827C9.92409 4.38663 10.166 5.18415 10.166 6C10.1648 7.09364 9.72978 8.14213 8.95646 8.91545C8.18314 9.68876 7.13465 10.1238 6.04102 10.125ZM6.79102 8.25C6.79102 8.34946 6.75151 8.44484 6.68118 8.51517C6.61086 8.58549 6.51547 8.625 6.41602 8.625C6.21711 8.625 6.02634 8.54598 5.88569 8.40533C5.74504 8.26468 5.66602 8.07391 5.66602 7.875V6C5.56656 6 5.47118 5.96049 5.40085 5.89016C5.33053 5.81984 5.29102 5.72446 5.29102 5.625C5.29102 5.52554 5.33053 5.43016 5.40085 5.35984C5.47118 5.28951 5.56656 5.25 5.66602 5.25C5.86493 5.25 6.0557 5.32902 6.19635 5.46967C6.337 5.61032 6.41602 5.80109 6.41602 6V7.875C6.51547 7.875 6.61086 7.91451 6.68118 7.98483C6.75151 8.05516 6.79102 8.15054 6.79102 8.25ZM5.29102 3.9375C5.29102 3.82625 5.32401 3.71749 5.38582 3.62499C5.44762 3.53249 5.53547 3.46039 5.63826 3.41782C5.74104 3.37524 5.85414 3.3641 5.96326 3.38581C6.07237 3.40751 6.1726 3.46109 6.25127 3.53975C6.32993 3.61842 6.38351 3.71865 6.40521 3.82776C6.42691 3.93688 6.41577 4.04998 6.3732 4.15276C6.33063 4.25554 6.25853 4.34339 6.16603 4.4052C6.07352 4.46701 5.96477 4.5 5.85352 4.5C5.70433 4.5 5.56126 4.44074 5.45577 4.33525C5.35028 4.22976 5.29102 4.08668 5.29102 3.9375Z",fill:"black"})),Kv="W3WLink-module__likeButton__RhAlpN",Qv="W3WLink-module__title__eo6M7L",xl={likeButton:Kv,title:Qv},Jv=()=>S.jsxs("a",{className:xl.likeButton,title:"about what3words",href:"https://what3words.com/about",target:"_blank",rel:"noreferrer",children:[S.jsx("span",{className:xl.title,children:"what3words"}),S.jsx(Zv,{})]}),Xv=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,viewBox:"0 0 20 20",fill:"none",...t},N.createElement("path",{d:"M10 1.25C8.17727 1.25207 6.42979 1.97706 5.14092 3.26592C3.85206 4.55479 3.12707 6.30227 3.125 8.125C3.125 14.0078 9.375 18.4508 9.64141 18.6367C9.74649 18.7103 9.87169 18.7498 10 18.7498C10.1283 18.7498 10.2535 18.7103 10.3586 18.6367C10.625 18.4508 16.875 14.0078 16.875 8.125C16.8729 6.30227 16.1479 4.55479 14.8591 3.26592C13.5702 1.97706 11.8227 1.25207 10 1.25ZM10 5.625C10.4945 5.625 10.9778 5.77162 11.3889 6.04633C11.8 6.32103 12.1205 6.71148 12.3097 7.16829C12.4989 7.62511 12.5484 8.12777 12.452 8.61273C12.3555 9.09768 12.1174 9.54314 11.7678 9.89277C11.4181 10.2424 10.9727 10.4805 10.4877 10.577C10.0028 10.6734 9.50011 10.6239 9.04329 10.4347C8.58648 10.2455 8.19603 9.92505 7.92133 9.51393C7.64662 9.1028 7.5 8.61945 7.5 8.125C7.5 7.46196 7.76339 6.82607 8.23223 6.35723C8.70107 5.88839 9.33696 5.625 10 5.625Z",fill:"currentColor"})),Yv=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,viewBox:"0 0 20 20",fill:"none",...t},N.createElement("path",{d:"M20 0H0V20H20V0Z",fill:"black"}),N.createElement("path",{d:"M8.79664 14.3751C8.69766 14.3749 8.60012 14.3513 8.51204 14.3061C8.42396 14.261 8.34785 14.1956 8.28997 14.1153C8.2321 14.0349 8.1941 13.9421 8.1791 13.8442C8.1641 13.7464 8.17253 13.6464 8.2037 13.5524L10.7037 6.05231C10.7561 5.89505 10.8689 5.76506 11.0172 5.69095C11.1655 5.61683 11.3371 5.60466 11.4944 5.65711C11.6517 5.70956 11.7817 5.82233 11.8558 5.97061C11.9299 6.1189 11.9421 6.29055 11.8896 6.44782L9.38961 13.9479C9.34809 14.0723 9.26848 14.1805 9.16206 14.2572C9.05564 14.3338 8.9278 14.3751 8.79664 14.3751Z",fill:"white"}),N.createElement("path",{d:"M5.04666 14.3751C4.94767 14.3749 4.85013 14.3513 4.76205 14.3061C4.67397 14.261 4.59787 14.1955 4.53999 14.1152C4.48211 14.0349 4.4441 13.942 4.4291 13.8442C4.4141 13.7464 4.42253 13.6464 4.45369 13.5524L6.95369 6.05229C7.00645 5.89542 7.11927 5.76587 7.26741 5.69206C7.41554 5.61825 7.58691 5.60621 7.74391 5.65857C7.90092 5.71093 8.03075 5.82343 8.10493 5.97138C8.17911 6.11933 8.19159 6.29066 8.13962 6.4478L5.6396 13.9479C5.59808 14.0723 5.51848 14.1805 5.41206 14.2571C5.30565 14.3338 5.17781 14.3751 5.04666 14.3751Z",fill:"white"}),N.createElement("path",{d:"M12.5467 14.3751C12.4477 14.3749 12.3501 14.3513 12.2621 14.3061C12.174 14.261 12.0979 14.1955 12.04 14.1152C11.9821 14.0349 11.9441 13.942 11.9291 13.8442C11.9141 13.7464 11.9225 13.6464 11.9537 13.5524L14.4537 6.05229C14.5064 5.89542 14.6193 5.76587 14.7674 5.69206C14.9155 5.61825 15.0869 5.60621 15.2439 5.65857C15.4009 5.71093 15.5308 5.82343 15.6049 5.97138C15.6791 6.11933 15.6916 6.29066 15.6396 6.4478L13.1396 13.9479C13.0981 14.0723 13.0185 14.1805 12.9121 14.2571C12.8057 14.3338 12.6778 14.3751 12.5467 14.3751Z",fill:"white"})),e1="W3WLink-module__mainWrapper__BeGCpA",t1="W3WLink-module__link__yq50q-",Ol={mainWrapper:e1,link:t1},pf=({what3words:t})=>{const{id:e,link:n}=t;return S.jsxs("div",{className:Ol.mainWrapper,children:[S.jsx(Yv,{}),S.jsx("a",{className:Ol.link,href:n,title:"w3w link",target:"_blank",rel:"noreferrer",children:e}),S.jsx(Xv,{})]})},Pl={day:"",statusValue:"No data",isAvailable:!1,closes:""};function n1(t){const[e,n]=p.useState({...Pl,workSchedule:[]}),{t:r}=mt(["details_modal","common"]),i={1:r("monday"),2:r("tuesday"),3:r("wednesday"),4:r("thursday"),5:r("friday"),6:r("saturday"),7:r("sunday")};return p.useEffect(()=>{function s(a){var h;const c=new Date(Date.now()),l=c.getDay()||7,u=c.toLocaleTimeString("en-GB"),d=(h=a.find(({dayNumber:v})=>v===l))==null?void 0:h.time;if(d){const v=d.split("-"),m=v[v.length-1],w=d.split(", ").some(y=>{const[C,b]=y.split("-");return b.trim()<C.trim()?u>=C||u<b:u>=C&&u<b});return{day:i[l],statusValue:r(w?"open":"close"),isAvailable:w,closes:m}}return{...Pl,statusValue:r("close")}}const o=function(){if(t)return Object.entries(t).reduce((c,[l,u])=>{if(u==null?void 0:u.length){const h=+l,v=u.join(", "),m={dayNumber:h,dayName:i[h],time:v};c.push(m)}return c},[])}();o!=null&&o.length&&n({...s(o),workSchedule:o})},[t]),e}const r1="LocationView-module__title__-wT0bl",i1="LocationView-module__logo__jDjNMt",s1="LocationView-module__header__K0gBYX",o1="LocationView-module__content__wtOPjm",a1="LocationView-module__sectionTitle__cNIgnC",c1="LocationView-module__scheduleContainer__Qbb9sE",l1="LocationView-module__workStatus__9yJNqr",u1="LocationView-module__scheduleButton__RQPquM",d1="LocationView-module__scheduleList__lPVLXP",f1="LocationView-module__scheduleListItem__gcCPSg",h1="LocationView-module__svgWrapper__zKM438",p1="LocationView-module__section__2J1zAJ",m1="LocationView-module__w3wSection__PdU7j4",g1="LocationView-module__chips__ALwJDx",v1="LocationView-module__services__IgJ4ba",y1="LocationView-module__images__-wKmRM",b1="LocationView-module__image__T1E-gt",w1="LocationView-module__actions__NuafMj",S1="LocationView-module__actionsHidden__-vX5kK",C1="LocationView-module__submit__c-Hc8u",_1="LocationView-module__scheduleItem__RhAgat",ve={title:r1,logo:i1,header:s1,content:o1,sectionTitle:a1,scheduleContainer:c1,workStatus:l1,scheduleButton:u1,scheduleList:d1,scheduleListItem:f1,svgWrapper:h1,section:p1,w3wSection:m1,chips:g1,services:v1,images:y1,image:b1,actions:w1,actionsHidden:S1,submit:C1,scheduleItem:_1},E1={default:Yd,llama:ef},x1=({classes:t,hideActions:e,location:n,onClose:r,onSubmit:i})=>{var b,E,x;const[s,o]=p.useState(!1),{t:a}=mt(["details_modal","common"]),{isLoading:c,lmsData:l}=mo(),{closes:u,isAvailable:d,statusValue:h,workSchedule:v}=n1(n.timetable),m=(b=l==null?void 0:l.location)==null?void 0:b.what3words,f=!!(m!=null&&m.id),{logo:w="default"}=_e(),y=E1[w];function C(){o(g=>!g)}return S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:J(ve.header,t==null?void 0:t.header),children:[S.jsx(Lr,{onClick:r}),S.jsxs("div",{className:ve.title,children:[S.jsx("div",{className:ve.logo,children:S.jsx(y,{})}),S.jsx("span",{children:n.name})]})]}),S.jsxs("div",{className:J(ve.content,t==null?void 0:t.content),children:[S.jsxs("section",{className:ve.section,children:[S.jsxs("span",{children:[a("address"),":"]}),c?S.jsx(Ze,{width:200}):S.jsx("p",{children:(E=n.location)==null?void 0:E.full_address})]}),c?S.jsx(Ze,{}):f&&S.jsxs("section",{className:ve.w3wSection,children:[S.jsx(pf,{what3words:m}),S.jsx(Jv,{})]}),S.jsxs("div",{className:ve.scheduleContainer,children:[S.jsxs("span",{className:ve.sectionTitle,children:[a("schedule"),":"]}),S.jsxs("button",{type:"button","aria-label":"open schedule",className:ve.scheduleButton,onClick:C,children:[S.jsx("span",{className:ve.workStatus,"data-available":d,children:h}),u&&S.jsxs("span",{children:[a("closes")," ",u]}),S.jsx("span",{className:ve.svgWrapper,"data-open":s,children:S.jsx(kg,{})})]}),S.jsx("ul",{className:ve.scheduleList,"data-open":s,children:v.map(({dayName:g,time:_})=>{const T=!_?a("weekend"):_;return S.jsxs("li",{className:ve.scheduleListItem,children:[S.jsxs("span",{children:[g,":"]}),S.jsx("span",{children:T})]},g)})})]}),(n.pay_by_card||n.pay_by_card)&&S.jsxs("section",{className:ve.section,children:[S.jsxs("span",{children:[a("payment_method"),":"]}),c?S.jsx(Ze,{width:300}):S.jsxs("div",{className:ve.chips,children:[n.pay_by_cash&&a("pay_by_cash"),n.pay_by_card&&n.pay_by_cash&&", ",n.pay_by_card&&a("pay_by_card")]})]}),S.jsxs("section",{className:ve.section,children:[S.jsxs("span",{children:[a("services"),":"]}),S.jsxs("div",{className:ve.services,children:[n.is_pickup&&(c?S.jsx(Ze,{width:150}):S.jsx("p",{children:a("is_pickup")})),n.is_delivery&&(c?S.jsx(Ze,{width:150}):S.jsx("p",{children:a("is_delivery")})),n.is_dressing_room&&(c?S.jsx(Ze,{width:150}):S.jsx("p",{children:a("is_dressing_room")})),n.is_check_order&&(c?S.jsx(Ze,{width:150}):S.jsx("p",{children:a("is_check_order")}))]})]}),S.jsxs("section",{className:ve.section,children:[S.jsxs("span",{children:[a("location"),":"]}),c?S.jsx(Ze,{width:100}):S.jsx("p",{children:n.location_name})]}),((x=n.images)==null?void 0:x.length)>0&&S.jsx("section",{className:ve.images,children:n.images.map(g=>S.jsx("img",{src:g,alt:n.name,className:ve.image},g))})]}),S.jsx("div",{className:J(ve.actions,{[ve.actionsHidden]:e}),children:S.jsx(rt,{variant:"primary",className:ve.submit,disabled:c,onClick:i,children:a("choose",{ns:"common"})})})]})},mf=p.memo(x1),fc=({isSelectedPoint:t})=>{const e=te(tc),[n,r]=p.useState(!0);return p.useEffect(()=>{r(t?!e:!0)},[e,t]),n};var O1=P1()?p.useLayoutEffect:p.useEffect;function P1(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function T1(){var t=p.useState(Object.create(null)),e=t[1];return p.useCallback(function(){e(Object.create(null))},[])}var A1=function(e){var n=e.children,r=e.type,i=r===void 0?"reach-portal":r,s=p.useRef(null),o=p.useRef(null),a=T1();return O1(function(){if(s.current){var c=s.current.ownerDocument;return o.current=c==null?void 0:c.createElement(i),c.body.appendChild(o.current),a(),function(){o.current&&o.current.ownerDocument&&o.current.ownerDocument.body.removeChild(o.current)}}},[i,a]),o.current?Hs.createPortal(n,o.current):p.createElement("span",{ref:s})};/*! *****************************************************************************
27
+ */(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var s="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(s=i(s,r(a)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var a in s)e.call(s,a)&&s[a]&&(o=i(o,a));return o}function i(s,o){return o?s?s+" "+o:s+o:s}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})($d);var Um=$d.exports;const Y=ao(Um),$m={lmsData:null,isLoading:!1},mo=zt()(t=>({...$m,setLMSData:e=>t({lmsData:e}),setLoading:e=>t({isLoading:e})}));var zm=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,s;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(s=Object.keys(e),r=s.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[i]))return!1;for(i=r;i--!==0;){var o=s[i];if(!t(e[o],n[o]))return!1}return!0}return e!==e&&n!==n};const zd=ao(zm);function Pt(){return Pt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Pt.apply(null,arguments)}function Nn(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function qm(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Gm(t){var e=qm(t,"string");return typeof e=="symbol"?e:e+""}const Vt={NOT_LOADED:"NOT_LOADED",LOADING:"LOADING",LOADED:"LOADED",FAILED:"FAILED",AUTH_FAILURE:"AUTH_FAILURE"},Wm="https://maps.googleapis.com/maps/api/js";class mi{static async load(e,n){var r;const i=e.libraries?e.libraries.split(","):[],s=this.serializeParams(e);this.listeners.push(n),(r=window.google)!=null&&(r=r.maps)!=null&&r.importLibrary?(this.serializedApiParams||(this.loadingStatus=Vt.LOADED),this.notifyLoadingStatusListeners()):(this.serializedApiParams=s,this.initImportLibrary(e)),this.serializedApiParams&&this.serializedApiParams!==s&&console.warn("[google-maps-api-loader] The maps API has already been loaded with different parameters and will not be loaded again. Refresh the page for new values to have effect.");const o=["maps",...i];await Promise.all(o.map(a=>google.maps.importLibrary(a)))}static serializeParams(e){return[e.v,e.key,e.language,e.region,e.authReferrerPolicy,e.solutionChannel].join("/")}static initImportLibrary(e){if(window.google||(window.google={}),window.google.maps||(window.google.maps={}),window.google.maps.importLibrary){console.error("[google-maps-api-loader-internal]: initImportLibrary must only be called once");return}let n=null;const r=()=>n||(n=new Promise((i,s)=>{var o;const a=document.createElement("script"),c=new URLSearchParams;for(const[l,u]of Object.entries(e)){const d=l.replace(/[A-Z]/g,h=>"_"+h[0].toLowerCase());c.set(d,String(u))}c.set("loading","async"),c.set("callback","__googleMapsCallback__"),a.async=!0,a.src=Wm+"?"+c.toString(),a.nonce=((o=document.querySelector("script[nonce]"))==null?void 0:o.nonce)||"",a.onerror=()=>{this.loadingStatus=Vt.FAILED,this.notifyLoadingStatusListeners(),s(new Error("The Google Maps JavaScript API could not load."))},window.__googleMapsCallback__=()=>{this.loadingStatus=Vt.LOADED,this.notifyLoadingStatusListeners(),i()},window.gm_authFailure=()=>{this.loadingStatus=Vt.AUTH_FAILURE,this.notifyLoadingStatusListeners()},this.loadingStatus=Vt.LOADING,this.notifyLoadingStatusListeners(),document.head.append(a)}),n);google.maps.importLibrary=i=>r().then(()=>google.maps.importLibrary(i))}static notifyLoadingStatusListeners(){for(const e of this.listeners)e(this.loadingStatus)}}mi.loadingStatus=Vt.NOT_LOADED;mi.serializedApiParams=void 0;mi.listeners=[];const Zm=["onLoad","onError","apiKey","version","libraries"],Km=["children"],Qm="GMP_visgl_rgmlibrary_v1_default",Ni=p.createContext(null);function Jm(){const[t,e]=p.useState({});return{mapInstances:t,addMapInstance:(s,o="default")=>{e(a=>Pt({},a,{[o]:s}))},removeMapInstance:(s="default")=>{e(o=>Nn(o,[s].map(Gm)))},clearMapInstances:()=>{e({})}}}function Xm(t){const{onLoad:e,onError:n,apiKey:r,version:i,libraries:s=[]}=t,o=Nn(t,Zm),[a,c]=p.useState(mi.loadingStatus),[l,u]=p.useReducer((m,f)=>m[f.name]?m:Pt({},m,{[f.name]:f.value}),{}),d=p.useMemo(()=>s==null?void 0:s.join(","),[s]),h=p.useMemo(()=>JSON.stringify(Pt({apiKey:r,version:i},o)),[r,i,o]),v=p.useCallback(async m=>{var f;if(l[m])return l[m];if(!((f=google)!=null&&(f=f.maps)!=null&&f.importLibrary))throw new Error("[api-provider-internal] importLibrary was called before google.maps.importLibrary was defined.");const w=await window.google.maps.importLibrary(m);return u({name:m,value:w}),w},[l]);return p.useEffect(()=>{(async()=>{try{const m=Pt({key:r},o);i&&(m.v=i),(d==null?void 0:d.length)>0&&(m.libraries=d),(m.channel===void 0||m.channel<0||m.channel>999)&&delete m.channel,m.solutionChannel===void 0?m.solutionChannel=Qm:m.solutionChannel===""&&delete m.solutionChannel,await mi.load(m,f=>c(f));for(const f of["core","maps",...s])await v(f);e&&e()}catch(m){n?n(m):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",m)}})()},[r,d,h]),{status:a,loadedLibraries:l,importLibrary:v}}const Ym=t=>{const{children:e}=t,n=Nn(t,Km),{mapInstances:r,addMapInstance:i,removeMapInstance:s,clearMapInstances:o}=Jm(),{status:a,loadedLibraries:c,importLibrary:l}=Xm(n),u=p.useMemo(()=>({mapInstances:r,addMapInstance:i,removeMapInstance:s,clearMapInstances:o,status:a,loadedLibraries:c,importLibrary:l}),[r,i,s,o,a,c,l]);return p.createElement(Ni.Provider,{value:u},e)};function eg(t,e){for(const n of ig){const r=e[n],i=qd[n];p.useEffect(()=>{if(!t||!r)return;const s=google.maps.event.addListener(t,i,o=>{r(tg(i,t,o))});return()=>s.remove()},[t,i,r])}}function tg(t,e,n){const r={type:t,map:e,detail:{},stoppable:!1,stop:()=>{}};if(ng.includes(t)){const s=r,o=e.getCenter(),a=e.getZoom(),c=e.getHeading()||0,l=e.getTilt()||0,u=e.getBounds();return(!o||!u||!Number.isFinite(a))&&console.warn("[createEvent] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),s.detail={center:(o==null?void 0:o.toJSON())||{lat:0,lng:0},zoom:a||0,heading:c,tilt:l,bounds:(u==null?void 0:u.toJSON())||{north:90,east:180,south:-90,west:-180}},s}else if(rg.includes(t)){var i;if(!n)throw new Error("[createEvent] mouse events must provide a srcEvent");const s=r;return s.domEvent=n.domEvent,s.stoppable=!0,s.stop=()=>n.stop(),s.detail={latLng:((i=n.latLng)==null?void 0:i.toJSON())||null,placeId:n.placeId},s}return r}const qd={onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onContextmenu:"contextmenu",onDblclick:"dblclick",onDrag:"drag",onDragend:"dragend",onDragstart:"dragstart",onHeadingChanged:"heading_changed",onIdle:"idle",onIsFractionalZoomEnabledChanged:"isfractionalzoomenabled_changed",onMapCapabilitiesChanged:"mapcapabilities_changed",onMapTypeIdChanged:"maptypeid_changed",onMousemove:"mousemove",onMouseout:"mouseout",onMouseover:"mouseover",onProjectionChanged:"projection_changed",onRenderingTypeChanged:"renderingtype_changed",onTilesLoaded:"tilesloaded",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed",onCameraChanged:"bounds_changed"},ng=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],rg=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],ig=Object.keys(qd);function Gd(t,e){const n=p.useRef(t);return e(t,n.current)||(n.current=t),n.current}function sg(t,e,n){p.useEffect(t,[Gd(e,n)])}function og(t,e){sg(t,e,zd)}const ag=new Set(["backgroundColor","clickableIcons","controlSize","disableDefaultUI","disableDoubleClickZoom","draggable","draggableCursor","draggingCursor","fullscreenControl","fullscreenControlOptions","gestureHandling","headingInteractionEnabled","isFractionalZoomEnabled","keyboardShortcuts","mapTypeControl","mapTypeControlOptions","mapTypeId","maxZoom","minZoom","noClear","panControl","panControlOptions","restriction","rotateControl","rotateControlOptions","scaleControl","scaleControlOptions","scrollwheel","streetView","streetViewControl","streetViewControlOptions","styles","tiltInteractionEnabled","zoomControl","zoomControlOptions"]);function cg(t,e){const n={},r=Object.keys(e);for(const i of r)ag.has(i)&&(n[i]=e[i]);og(()=>{t&&t.setOptions(n)},[n])}function Wd(){var t;return((t=p.useContext(Ni))==null?void 0:t.status)||Vt.NOT_LOADED}function lg(t,e){const{viewport:n,viewState:r}=e,i=!!n;return p.useLayoutEffect(()=>{if(!t||!r)return;const{latitude:s,longitude:o,bearing:a,pitch:c,zoom:l}=r;t.moveCamera({center:{lat:s,lng:o},heading:a,tilt:c,zoom:l+1})},[t,r]),i}function ug(t){return!t||typeof t!="object"||!("lat"in t&&"lng"in t)?!1:Number.isFinite(t.lat)&&Number.isFinite(t.lng)}function Zd(t){return ug(t)?t:t.toJSON()}function dg(t,e,n){const r=n.center?Zd(n.center):null;let i=null,s=null;r&&Number.isFinite(r.lat)&&Number.isFinite(r.lng)&&(i=r.lat,s=r.lng);const o=Number.isFinite(n.zoom)?n.zoom:null,a=Number.isFinite(n.heading)?n.heading:null,c=Number.isFinite(n.tilt)?n.tilt:null;p.useLayoutEffect(()=>{if(!t)return;const l={};let u=!1;i!==null&&s!==null&&(e.current.center.lat!==i||e.current.center.lng!==s)&&(l.center={lat:i,lng:s},u=!0),o!==null&&e.current.zoom!==o&&(l.zoom=o,u=!0),a!==null&&e.current.heading!==a&&(l.heading=a,u=!0),c!==null&&e.current.tilt!==c&&(l.tilt=c,u=!0),u&&t.moveCamera(l)})}const fg=()=>{const t={position:"absolute",top:0,left:0,bottom:0,right:0,zIndex:999,display:"flex",flexFlow:"column nowrap",textAlign:"center",justifyContent:"center",fontSize:".8rem",color:"rgba(0,0,0,0.6)",background:"#dddddd",padding:"1rem 1.5rem"};return p.createElement("div",{style:t},p.createElement("h2",null,"Error: AuthFailure"),p.createElement("p",null,"A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ",p.createElement("code",null,"APIProvider.apiKey")," prop is correct. Check the error-message in the console for further details."))};function hg(){const[t,e]=p.useState(null),n=p.useCallback(r=>e(r),[e]);return[t,n]}function Kd(){return Wd()===Vt.LOADED}function pg(){const[,t]=p.useReducer(e=>e+1,0);return t}function mg(t,e){const n=t.getCenter(),r=t.getZoom(),i=t.getHeading()||0,s=t.getTilt()||0,o=t.getBounds();(!n||!o||!Number.isFinite(r))&&console.warn("[useTrackedCameraState] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),Object.assign(e.current,{center:(n==null?void 0:n.toJSON())||{lat:0,lng:0},zoom:r||0,heading:i,tilt:s})}function gg(t){const e=pg(),n=p.useRef({center:{lat:0,lng:0},heading:0,tilt:0,zoom:0});return p.useEffect(()=>{if(!t)return;const r=google.maps.event.addListener(t,"bounds_changed",()=>{mg(t,n),e()});return()=>r.remove()},[t,e]),n}const vg=["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"],yg=["padding"];class Ls{static has(e){return this.entries[e]&&this.entries[e].length>0}static pop(e){return this.entries[e]&&this.entries[e].pop()||null}static push(e,n){this.entries[e]||(this.entries[e]=[]),this.entries[e].push(n)}}Ls.entries={};function bg(t,e){const n=Kd(),[r,i]=p.useState(null),[s,o]=hg(),a=gg(r),{id:c,defaultBounds:l,defaultCenter:u,defaultZoom:d,defaultHeading:h,defaultTilt:v,reuseMaps:m,renderingType:f,colorScheme:w}=t,y=Nn(t,vg),C=t.zoom!==void 0||t.defaultZoom!==void 0,b=t.center!==void 0||t.defaultCenter!==void 0;!l&&(!C||!b)&&console.warn("<Map> component is missing configuration. You have to provide zoom and center (via the `zoom`/`defaultZoom` and `center`/`defaultCenter` props) or specify the region to show using `defaultBounds`. See https://visgl.github.io/react-google-maps/docs/api-reference/components/map#required"),!y.center&&u&&(y.center=u),!y.zoom&&Number.isFinite(d)&&(y.zoom=d),!y.heading&&Number.isFinite(h)&&(y.heading=h),!y.tilt&&Number.isFinite(v)&&(y.tilt=v);for(const x of Object.keys(y))y[x]===void 0&&delete y[x];const E=p.useRef(void 0);return p.useEffect(()=>{if(!s||!n)return;const{addMapInstance:x,removeMapInstance:g}=e,{mapId:_}=t,O=`${_||"default"}:${f||"default"}:${w||"LIGHT"}`;let T,R;if(m&&Ls.has(O)?(R=Ls.pop(O),T=R.getDiv(),s.appendChild(T),R.setOptions(y),setTimeout(()=>R.setCenter(R.getCenter()),0)):(T=document.createElement("div"),T.style.height="100%",s.appendChild(T),R=new google.maps.Map(T,Pt({},y,f?{renderingType:f}:{},w?{colorScheme:w}:{}))),i(R),x(R,c),l){const{padding:L}=l,A=Nn(l,yg);R.fitBounds(A,L)}else(!C||!b)&&R.fitBounds({east:180,west:-180,south:-90,north:90});if(E.current){const{mapId:L,cameraState:A}=E.current;L!==_&&R.setOptions(A)}return()=>{E.current={mapId:_,cameraState:a.current},T.remove(),m?Ls.push(O,R):google.maps.event.clearInstanceListeners(R),i(null),g(c)}},[s,n,c,t.mapId,t.renderingType,t.colorScheme]),[r,o,a]}const Qd=p.createContext(null),Jd=t=>{const{children:e,id:n,className:r,style:i}=t,s=p.useContext(Ni),o=Wd();if(!s)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[a,c,l]=bg(t,s);dg(a,l,t),eg(a,t),cg(a,t);const u=lg(a,t),d=!!t.controlled;p.useEffect(()=>{if(a)return u&&a.setOptions({disableDefaultUI:!0}),(u||d)&&a.setOptions({gestureHandling:"none",keyboardShortcuts:!1}),()=>{a.setOptions({gestureHandling:t.gestureHandling,keyboardShortcuts:t.keyboardShortcuts})}},[a,u,d,t.gestureHandling,t.keyboardShortcuts]);const h=t.center?Zd(t.center):null;let v=null,m=null;h&&Number.isFinite(h.lat)&&Number.isFinite(h.lng)&&(v=h.lat,m=h.lng);const f=p.useMemo(()=>{var C,b,E,x,g;return{center:{lat:(C=v)!=null?C:0,lng:(b=m)!=null?b:0},zoom:(E=t.zoom)!=null?E:0,heading:(x=t.heading)!=null?x:0,tilt:(g=t.tilt)!=null?g:0}},[v,m,t.zoom,t.heading,t.tilt]);p.useLayoutEffect(()=>{if(!a||!d)return;a.moveCamera(f);const C=a.addListener("bounds_changed",()=>{a.moveCamera(f)});return()=>C.remove()},[a,d,f]);const w=p.useMemo(()=>Pt({width:"100%",height:"100%",position:"relative",zIndex:u?-1:0},i),[i,u]),y=p.useMemo(()=>({map:a}),[a]);return o===Vt.AUTH_FAILURE?p.createElement("div",{style:Pt({position:"relative"},r?{}:w),className:r},p.createElement(fg,null)):p.createElement("div",Pt({ref:c,"data-testid":"map",style:r?void 0:w,className:r},n?{id:n}:{}),a?p.createElement(Qd.Provider,{value:y},e):null)};Jd.deckGLViewProps=!0;const fl=new Set;function wg(...t){const e=JSON.stringify(t);fl.has(e)||(fl.add(e),console.error(...t))}const ji=(t=null)=>{const e=p.useContext(Ni),{map:n}=p.useContext(Qd)||{};if(e===null)return wg("useMap(): failed to retrieve APIProviderContext. Make sure that the <APIProvider> component exists and that the component you are calling `useMap()` from is a sibling of the <APIProvider>."),null;const{mapInstances:r}=e;return t!==null?r[t]||null:n||r.default||null};function uc(t){const e=Kd(),n=p.useContext(Ni);return p.useEffect(()=>{!e||!n||n.importLibrary(t)},[e,n,t]),(n==null?void 0:n.loadedLibraries[t])||null}function tr(t,e,n){p.useEffect(()=>{if(!t||!e||!n)return;const r=google.maps.event.addListener(t,e,n);return()=>r.remove()},[t,e,n])}function ts(t,e,n){p.useEffect(()=>{t&&(t[e]=n)},[t,e,n])}function hl(t,e,n){p.useEffect(()=>{if(!(!t||!e||!n))return t.addEventListener(e,n),()=>t.removeEventListener(e,n)},[t,e,n])}function Sg(t){return t.content!==void 0}function pl(t){return t.nodeType===Node.ELEMENT_NODE}const Cg=p.createContext(null),_g={TOP_LEFT:["0%","0%"],TOP_CENTER:["50%","0%"],TOP:["50%","0%"],TOP_RIGHT:["100%","0%"],LEFT_CENTER:["0%","50%"],LEFT_TOP:["0%","0%"],LEFT:["0%","50%"],LEFT_BOTTOM:["0%","100%"],RIGHT_TOP:["100%","0%"],RIGHT:["100%","50%"],RIGHT_CENTER:["100%","50%"],RIGHT_BOTTOM:["100%","100%"],BOTTOM_LEFT:["0%","100%"],BOTTOM_CENTER:["50%","100%"],BOTTOM:["50%","100%"],BOTTOM_RIGHT:["100%","100%"],CENTER:["50%","50%"]},Eg=({children:t,styles:e,className:n,anchorPoint:r})=>{const[i,s]=r??_g.BOTTOM;let o=`-${i}`,a=`-${s}`;i.trimStart().startsWith("-")&&(o=i.substring(1)),s.trimStart().startsWith("-")&&(a=s.substring(1));const c=`translate(50%, 100%) translate(${o}, ${a})`;return p.createElement("div",{style:{transform:c}},p.createElement("div",{className:n,style:e},t))};function xg(t){const[e,n]=p.useState(null),[r,i]=p.useState(null),s=ji(),o=uc("marker"),{children:a,onClick:c,className:l,onMouseEnter:u,onMouseLeave:d,onDrag:h,onDragStart:v,onDragEnd:m,collisionBehavior:f,clickable:w,draggable:y,position:C,title:b,zIndex:E}=t,x=p.Children.count(a);return p.useEffect(()=>{if(!s||!o)return;const g=new o.AdvancedMarkerElement;g.map=s,n(g);let _=null;return x>0&&(_=document.createElement("div"),_.isCustomMarker=!0,g.content=_,i(_)),()=>{var O;g.map=null,(O=_)==null||O.remove(),n(null),i(null)}},[s,o,x]),p.useEffect(()=>{!(e!=null&&e.content)||!pl(e.content)||x>0||(e.content.className=l??"")},[e,l,x]),ts(e,"position",C),ts(e,"title",b??""),ts(e,"zIndex",E),ts(e,"collisionBehavior",f),p.useEffect(()=>{e&&(y!==void 0?e.gmpDraggable=y:h||v||m?e.gmpDraggable=!0:e.gmpDraggable=!1)},[e,y,h,m,v]),p.useEffect(()=>{if(!e)return;const g=w!==void 0||!!c||!!u||!!d;e.gmpClickable=g,g&&e!=null&&e.content&&pl(e.content)&&(e.content.style.pointerEvents="none",e.content.firstElementChild&&(e.content.firstElementChild.style.pointerEvents="all"))},[e,w,c,u,d]),tr(e,"click",c),tr(e,"drag",h),tr(e,"dragstart",v),tr(e,"dragend",m),hl(e==null?void 0:e.element,"mouseenter",u),hl(e==null?void 0:e.element,"mouseleave",d),[e,r]}const dc=p.forwardRef((t,e)=>{const{children:n,style:r,className:i,anchorPoint:s}=t,[o,a]=xg(t),c=p.useMemo(()=>o?{marker:o}:null,[o]);return p.useImperativeHandle(e,()=>o,[o]),a?p.createElement(Cg.Provider,{value:c},Hs.createPortal(p.createElement(Eg,{anchorPoint:s,styles:r,className:i},n),a)):null});function Og(t,e,n){if(e!=null&&typeof e!="object")throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");const r=t.style;if(n==null){if(e==null)return;for(const i in e)e.hasOwnProperty(i)&&ml(r,i,e[i]);return}for(const i in n)n.hasOwnProperty(i)&&(e==null||!e.hasOwnProperty(i))&&(i.indexOf("--")===0?r.setProperty(i,""):i==="float"?r.cssFloat="":r[i]="");if(e!=null)for(const i in e){const s=e[i];e.hasOwnProperty(i)&&n[i]!==s&&ml(r,i,s)}}function ml(t,e,n){const r=e.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?r?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":r?t.setProperty(e,n):typeof n=="number"&&n!==0&&!Tg(e)?t[e]=n+"px":e==="float"?t.cssFloat=n:t[e]=(""+n).trim()}const Pg=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridArea","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineClamp","lineHeight","opacity","order","orphans","scale","tabSize","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth"]);function Tg(t){return Pg.has(t)}const Ag=["children","headerContent","style","className","pixelOffset","anchor","shouldFocus","onClose","onCloseClick"],Xd=t=>{const{children:e,headerContent:n,style:r,className:i,pixelOffset:s,anchor:o,shouldFocus:a,onClose:c,onCloseClick:l}=t,u=Nn(t,Ag),d=uc("maps"),[h,v]=p.useState(null),m=p.useRef(null),f=p.useRef(null),w=Gd(u,zd);p.useEffect(()=>{if(!d)return;m.current=document.createElement("div"),f.current=document.createElement("div");const b=w;s&&(b.pixelOffset=new google.maps.Size(s[0],s[1])),n&&(b.headerContent=typeof n=="string"?n:f.current);const E=new google.maps.InfoWindow(w);return E.setContent(m.current),v(E),()=>{var x,g;E.setContent(null),(x=m.current)==null||x.remove(),(g=f.current)==null||g.remove(),m.current=null,f.current=null,v(null)}},[d]);const y=p.useRef(null);p.useEffect(()=>{!h||!m.current||(Og(m.current,r||null,y.current),y.current=r||null,i!==m.current.className&&(m.current.className=i||""))},[h,i,r]),p.useEffect(()=>{if(!h)return;const b=w;s?b.pixelOffset=new google.maps.Size(s[0],s[1]):b.pixelOffset=null,n?b.headerContent=typeof n=="string"?n:f.current:b.headerContent=null,h.setOptions(w)},[w,s,n]),tr(h,"close",c),tr(h,"closeclick",l);const C=ji();return p.useEffect(()=>{if(!C||!h||o===null)return;const b=!!o,E={map:C};if(o&&(E.anchor=o,Sg(o)&&o.content instanceof Element)){const g=o.content,_=g==null?void 0:g.getBoundingClientRect();if(_&&g!=null&&g.isCustomMarker){var x;const O=(x=o.content.firstElementChild)==null?void 0:x.firstElementChild,T=O==null?void 0:O.getBoundingClientRect(),R=T.x-_.x+(T.width-_.width)/2,L=T.y-_.y,A=w;A.pixelOffset=new google.maps.Size(s?s[0]+R:R,s?s[1]+L:L),h.setOptions(A)}}return a!==void 0&&(E.shouldFocus=a),h.open(E),()=>{b&&h.set("anchor",null),h.close()}},[h,o,C,a,w,s]),p.createElement(p.Fragment,null,m.current&&Hs.createPortal(e,m.current),f.current!==null&&Hs.createPortal(n,f.current))},Rg=["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"];function Lg(t){const[e,n]=p.useState(null),r=ji(),{onClick:i,onDrag:s,onDragStart:o,onDragEnd:a,onMouseOver:c,onMouseOut:l}=t,u=Nn(t,Rg),{position:d,draggable:h}=u;return p.useEffect(()=>{if(!r){r===void 0&&console.error("<Marker> has to be inside a Map component.");return}const v=new google.maps.Marker(u);return v.setMap(r),n(v),()=>{v.setMap(null),n(null)}},[r]),p.useEffect(()=>{if(!e)return;const v=e,m=google.maps.event;return i&&m.addListener(v,"click",i),s&&m.addListener(v,"drag",s),o&&m.addListener(v,"dragstart",o),a&&m.addListener(v,"dragend",a),c&&m.addListener(v,"mouseover",c),l&&m.addListener(v,"mouseout",l),e.setDraggable(!!h),()=>{m.clearInstanceListeners(v)}},[e,h,i,s,o,a,c,l]),p.useEffect(()=>{e&&u&&e.setOptions(u)},[e,u]),p.useEffect(()=>{h||!d||!e||e.setPosition(d)},[h,d,e]),e}p.forwardRef((t,e)=>{const n=Lg(t);return p.useImperativeHandle(e,()=>n,[n]),p.createElement(p.Fragment,null)});const kg=t=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 12 12",...t},j.createElement("path",{fill:"currentcolor",d:"M6 9.42a.838.838 0 0 1-.594-.246l-5.16-5.16a.84.84 0 1 1 1.189-1.188L6 7.392l4.565-4.566a.84.84 0 0 1 1.189 1.189l-5.16 5.16A.838.838 0 0 1 6 9.42Z"})),Yd=t=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:26,height:8,fill:"none",viewBox:"0 0 26 8",...t},j.createElement("g",{fill:"#000"},j.createElement("path",{d:"M1.416 7.5c-.255 0-.491-.065-.708-.194A1.445 1.445 0 0 1 0 6.06V1.94A1.445 1.445 0 0 1 .708.695C.925.564 1.16.5 1.416.5h4.056c.255 0 .488.065.698.194.217.13.39.305.517.525.134.214.2.454.2.72V6.06c0 .26-.066.5-.2.72-.128.22-.3.395-.517.525-.21.13-.443.194-.698.194H1.416Zm.067-1.517h3.903V2.017H1.483v3.966ZM7.941 7.5v-7h1.53l2.335 2.83L14.13.5h1.54v7h-1.493V2.804l-2.372 2.878-2.382-2.868V7.5H7.94ZM16.816 7.5v-7h1.53l3.856 4.667V.5h1.502v7h-1.53l-3.875-4.686V7.5h-1.483ZM24.536 7.5v-7H26v7h-1.464Z"}))),ef=t=>j.createElement("svg",{width:48,height:48,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},j.createElement("rect",{width:48,height:48,fill:"#6A4A9D"}),j.createElement("path",{d:"M16.3444 36.5C15.3815 36.5 14.4907 36.2685 13.6722 35.8056C12.8537 35.3426 12.2037 34.7176 11.7222 33.9306C11.2407 33.1435 11 32.287 11 31.3611V16.6389C11 15.6898 11.2407 14.8333 11.7222 14.0694C12.2037 13.2824 12.8537 12.6574 13.6722 12.1944C14.4907 11.7315 15.3815 11.5 16.3444 11.5H31.6556C32.6185 11.5 33.4972 11.7315 34.2917 12.1944C35.1102 12.6574 35.7602 13.2824 36.2417 14.0694C36.7472 14.8333 37 15.6898 37 16.6389V31.3611C37 32.287 36.7472 33.1435 36.2417 33.9306C35.7602 34.7176 35.1102 35.3426 34.2917 35.8056C33.4972 36.2685 32.6185 36.5 31.6556 36.5H16.3444ZM16.5972 31.0833H31.3306V16.9167H16.5972V31.0833Z",fill:"white"}));function Mg(t,e){return e.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(r){if(r!=="default"&&!(r in t)){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}})}),Object.freeze(t)}function go(t){return!!(t&&typeof t.then=="function")}function ks(t,e){return go(t)?Promise.resolve(t).then(e):e(t)}function ko(t,e,n){function r(i){const s=e(i);throw t.emit(s),console.error(s),s}try{const i=n();return go(i)?i.catch(r):i}catch(i){r(i)}}function gl(t){const e=(Array.isArray(t)?t:[t]).map(s=>`'${s}'`),n=e.slice(-2).join(" or ");return`Tolgee: You need to specify ${[...e.slice(0,-2),n].join(", ")} option`}function Dg(t){return typeof t=="object"&&!Array.isArray(t)&&t!==null}function tf(t){if(typeof t=="string")return[t];if(Array.isArray(t))return t}function nt(t){return tf(t)||[]}function Ng(t,e){return Dg(e)?nt(e==null?void 0:e[t]):nt(e)}function pa(t){return Array.from(new Set(t))}function nf(t){return t&&t.replace(/\/+$/,"")}function jg(t){if(typeof t=="string")return t;if(typeof(t==null?void 0:t.message)=="string")return t.message}const Ig=(t,e)=>fetch(t,e),rf=(t=Ig)=>(e,n)=>t(e,Object.assign(Object.assign({},n),{headers:Object.assign({"X-Tolgee-SDK-Type":"JS","X-Tolgee-SDK-Version":"5.22.0"},n==null?void 0:n.headers)}));function Mt(t){let e=[];return Object.freeze({listen(n){const r=i=>{n(i)};return e.push(r),{unsubscribe(){e=e.filter(i=>r!==i)}}},emit(n){t()&&e.forEach(r=>r({value:n}))}})}function Fg(t,e,n){const r=new Set,i=new Set;function s(c){const l=new Set(e());i.forEach(u=>{(c===void 0||(c==null?void 0:c.findIndex(h=>l.has(h)||u.namespaces.has(h)))!==-1)&&u.fn({value:void 0})})}let o=[];function a(){if(o.length===0)return;const c=o;o=[],r.forEach(d=>{d({value:void 0})});let l=new Set;c.forEach(d=>{d===void 0?l=void 0:l!==void 0&&d.forEach(h=>l.add(h))});const u=l?Array.from(l.keys()):void 0;s(u)}return Object.freeze({emit(c,l){t()&&(o.push(c),l?setTimeout(a,0):a())},listen(c){return r.add(c),{unsubscribe:()=>{r.delete(c)}}},listenSome(c){const l={fn:d=>{c(d)},namespaces:new Set};i.add(l);const u={unsubscribe:()=>{i.delete(l)},subscribeNs:d=>(nt(d).forEach(h=>l.namespaces.add(h)),d===void 0&&l.namespaces.add(n()),u)};return u}})}function Bg(t,e){let n=!0;function r(){return n}const i=Object.freeze({onPendingLanguageChange:Mt(r),onLanguageChange:Mt(r),onLoadingChange:Mt(r),onFetchingChange:Mt(r),onInitialLoaded:Mt(r),onRunningChange:Mt(r),onCacheChange:Mt(r),onUpdate:Fg(r,t,e),onPermanentChange:Mt(r),onError:Mt(r),setEmitterActive(s){n=s},on:(s,o)=>{switch(s){case"pendingLanguage":return i.onPendingLanguageChange.listen(o);case"language":return i.onLanguageChange.listen(o);case"loading":return i.onLoadingChange.listen(o);case"fetching":return i.onFetchingChange.listen(o);case"initialLoad":return i.onInitialLoaded.listen(o);case"running":return i.onRunningChange.listen(o);case"cache":return i.onCacheChange.listen(o);case"update":return i.onUpdate.listen(o);case"permanentChange":return i.onPermanentChange.listen(o);case"error":return i.onError.listen(o)}}});return i.onInitialLoaded.listen(()=>i.onUpdate.emit()),i.onLanguageChange.listen(()=>i.onUpdate.emit()),i.onCacheChange.listen(({value:s})=>i.onUpdate.emit([s.namespace],!0)),i}class vl extends Error{constructor(e,n,r=!1){const{language:i,namespace:s}=e;super(`Tolgee: Failed to fetch record for "${i}"${s&&` and "${s}"`}`),this.cause=n,this.isDev=r,this.name="RecordFetchError",this.language=i,this.namespace=s}}class Vg extends Error{constructor(e,n){super(e),this.cause=n,this.name="LanguageDetectorError"}}class yl extends Error{constructor(e,n){super(e),this.cause=n,this.name="LanguageStorageError"}}const sf=t=>{const e=new Map;return Object.entries(t).forEach(([n,r])=>{if(r!=null){if(typeof r=="object"){sf(r).forEach((i,s)=>{e.set(n+"."+s,i)});return}e.set(n,r)}}),e},Kr=t=>{const[e,...n]=t.split(":"),r=n.join(":");return{language:e,namespace:r||""}},Dt=({language:t,namespace:e})=>e?`${t}:${e}`:t;function Hg(t,e,n,r,i,s,o){const a=new Map,c=new Map;let l={},u=0;function d(f,w,y){const C=Dt(f);c.set(C,{data:sf(w),version:y}),t.onCacheChange.emit(f)}function h(f){let w;if(!w){const y=l[Dt(f)];typeof y=="function"&&(w=y())}return w||(w=e(f)),go(w)?w==null?void 0:w.catch(y=>{const C=new vl(f,y);throw t.onError.emit(C),console.error(C),C}):w}function v(f,w){var y;let C;return w&&(C=(y=n(f))===null||y===void 0?void 0:y.catch(b=>{const E=new vl(f,b,!0);return t.onError.emit(E),console.warn(E),h(f)})),C||(C=h(f)),C}const m=Object.freeze({addStaticData(f){f&&(l=Object.assign(Object.assign({},l),f),Object.entries(f).forEach(([w,y])=>{if(typeof y!="function"){const C=Kr(w),b=c.get(w);(!b||b.version===0)&&d(C,y,0)}}))},invalidate(){a.clear(),u+=1},addRecord(f,w){d(f,w,u)},exists(f,w=!1){const y=c.get(Dt(f));return y&&w?y.version===u:!!y},getRecord(f){var w;return(w=c.get(Dt(r(f))))===null||w===void 0?void 0:w.data},getTranslation(f,w){var y;return(y=c.get(Dt(f)))===null||y===void 0?void 0:y.data.get(w)},getTranslationNs(f,w,y){var C;for(const b of f)for(const E of w){const x=(C=c.get(Dt({language:E,namespace:b})))===null||C===void 0?void 0:C.data.get(y);if(x!=null)return[b]}return pa(f)},getTranslationFallback(f,w,y){var C;for(const b of f)for(const E of w){const x=(C=c.get(Dt({language:E,namespace:b})))===null||C===void 0?void 0:C.data.get(y);if(x!=null)return x}},changeTranslation(f,w,y){var C;const b=(C=c.get(Dt(f)))===null||C===void 0?void 0:C.data;b==null||b.set(w,y),t.onCacheChange.emit(Object.assign(Object.assign({},f),{key:w}))},isFetching(f){if(i())return!0;if(f===void 0)return a.size>0;const w=nt(f);return!!Array.from(a.keys()).find(y=>w.includes(Kr(y).namespace))},isLoading(f,w){const y=nt(w);return!!(i()||Array.from(a.keys()).find(C=>{const b=Kr(C);return(!y.length||y.includes(b.namespace))&&!m.exists({namespace:b.namespace,language:f})}))},async loadRecords(f,w){const y=f.map(b=>{const E=r(b),x=Dt(E),g=a.get(x);if(g)return{new:!1,promise:g,keyObject:E,cacheKey:x};const _=v(E,w)||Promise.resolve(void 0);return a.set(x,_),{new:!0,promise:_,keyObject:E,cacheKey:x}});s.notify(),o.notify();const C=await Promise.all(y.map(b=>b.promise));return y.forEach((b,E)=>{const x=a.get(b.cacheKey)!==b.promise;if(b.new&&!x){a.delete(b.cacheKey);const g=C[E];g?m.addRecord(b.keyObject,g):m.getRecord(b.keyObject)||m.addRecord(b.keyObject,{})}}),s.notify(),o.notify(),y.map(b=>m.getRecord(b.keyObject))},getAllRecords(){return Array.from(c.entries()).map(([w,y])=>Object.assign(Object.assign({},Kr(w)),{data:y.data}))}});return m}function of(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}const Ug={tagAttributes:{textarea:["placeholder"],input:["value","placeholder"],img:["alt"],"*":["aria-label","title"]},restrictedElements:["script","style"],highlightKeys:["Alt"],highlightColor:"rgb(255, 0, 0)",highlightWidth:5,inputPrefix:"%-%tolgee:",inputSuffix:"%-%",passToParent:["option","optgroup"],fullKeyEncode:!1},ma="invalid",$g="https://app.tolgee.io",zg=({key:t})=>t,qg={defaultNs:"",observerOptions:Ug,observerType:"invisible",onFormatError:ma,apiUrl:$g,fetch:rf(),onTranslationMissing:zg},ga=(...t)=>{let e={};return t.forEach(n=>{e=Object.assign(Object.assign(Object.assign({},e),n),{observerOptions:Object.assign(Object.assign({},e.observerOptions),n==null?void 0:n.observerOptions)})}),e};function bl(t,e){const n=ga(qg,e==null?void 0:e.initialOptions,t);return n.apiUrl=nf(n.apiUrl),t!=null&&t.fetch&&(n.fetch=rf(t.fetch)),{initialOptions:n,activeNamespaces:(e==null?void 0:e.activeNamespaces)||new Map,language:e==null?void 0:e.language,pendingLanguage:e==null?void 0:e.language,isInitialLoading:!1,isRunning:!1}}function Gg(t,e,n,r,i,s,o,a){const c={ui:void 0},l={formatters:[],finalFormatter:void 0,observer:void 0,devBackend:void 0,backends:[],ui:void 0,languageDetector:void 0,languageStorage:void 0},u=async({keysAndDefaults:A,event:D})=>{var N;const V=A.map(({key:q,ns:I,defaultValue:z})=>({key:q,defaultValue:z,fallbackNamespaces:r(I),namespace:i({key:q,ns:I})[0],translation:s({key:q,ns:I})}));(N=l.ui)===null||N===void 0||N.handleElementClick(V,D)},d=(A,D)=>{var N;return((N=l.observer)===null||N===void 0?void 0:N.findPositions(A,D))||[]};function h(A){const D=s({key:A.key,ns:A.ns});return L.formatTranslation(Object.assign(Object.assign({},A),{translation:D,formatEnabled:!0}))}function v(){return{fetch:e().fetch}}function m(A){l.observer=A==null?void 0:A()}function f(){return!!l.observer}function w(A){A&&l.formatters.push(A)}function y(A){l.finalFormatter=A}function C(A){c.ui=A}function b(){return!!c.ui}function E(A){l.languageStorage=A}function x(A){l.languageDetector=A}function g(){return ko(a.onError,A=>new yl("Tolgee: Failed to load language",A),()=>{var A;return(A=l.languageStorage)===null||A===void 0?void 0:A.getLanguage(v())})}function _(){if(!l.languageDetector)return;const A=n();return ko(a.onError,D=>new Vg("Tolgee: Failed to detect language",D),()=>{var D;return(D=l.languageDetector)===null||D===void 0?void 0:D.getLanguage(Object.assign({availableLanguages:A},v()))})}function O(A){A&&l.backends.push(A)}function T(A){l.devBackend=A}function R(A,D){const N=Object.freeze({setFinalFormatter:y,addFormatter:w,setObserver:m,hasObserver:f,setUi:C,hasUi:b,setDevBackend:T,addBackend:O,setLanguageDetector:x,setLanguageStorage:E});D(A,N)}const L=Object.freeze({addPlugin:R,run(){var A,D;const{apiKey:N,apiUrl:V,projectId:q,observerOptions:I}=e();l.ui=(A=c.ui)===null||A===void 0?void 0:A.call(c,{apiKey:N,apiUrl:V,projectId:q,highlight:L.highlight,changeTranslation:o,findPositions:d,onPermanentChange:z=>a.onPermanentChange.emit(z)}),(D=l.observer)===null||D===void 0||D.run({mouseHighlight:!0,options:I,translate:h,onClick:u})},stop(){var A;l.ui=void 0,(A=l.observer)===null||A===void 0||A.stop()},getLanguageStorage(){return l.languageStorage},getInitialLanguage(){const A=n(),D=g();return ks(D,N=>(!A||A.includes(N))&&N?N:_())},setStoredLanguage(A){return ko(a.onError,D=>new yl("Tolgee: Failed to store language",D),()=>{var D;return(D=l.languageStorage)===null||D===void 0?void 0:D.setLanguage(A,v())})},getDevBackend(){return l.devBackend},getBackendRecord:({language:A,namespace:D})=>{for(const N of l.backends){const V=N.getRecord(Object.assign({language:A,namespace:D},v()));if(V!==void 0)return V}},getBackendDevRecord:({language:A,namespace:D})=>{var N;const{apiKey:V,apiUrl:q,projectId:I}=e();return(N=l.devBackend)===null||N===void 0?void 0:N.getRecord(Object.assign({apiKey:V,apiUrl:q,projectId:I,language:A,namespace:D},v()))},getLanguageDetector(){return l.languageDetector},retranslate(){var A;(A=l.observer)===null||A===void 0||A.retranslate()},highlight:(A,D)=>{var N,V;return((V=(N=l.observer)===null||N===void 0?void 0:N.highlight)===null||V===void 0?void 0:V.call(N,A,D))||{unhighlight(){}}},unwrap(A){var D;return l.observer?(D=l.observer)===null||D===void 0?void 0:D.unwrap(A):{text:A,keys:[]}},wrap(A){var D;return l.observer?(D=l.observer)===null||D===void 0?void 0:D.wrap(A):A.translation},hasDevBackend(){return!!L.getDevBackend()},formatTranslation(A){var D,{formatEnabled:N}=A,V=of(A,["formatEnabled"]);const{key:q,translation:I,defaultValue:z,noWrap:le,params:ne,ns:se,orEmpty:Z}=V,Oe=I??z;let Ce="";I==null&&(Ce=e().onTranslationMissing(V));let me=Oe??(Z?"":Ce);const qt=t(),Gt=N||!(!((D=l.observer)===null||D===void 0)&&D.outputNotFormattable),Lr=gt=>l.observer&&!le?l.observer.wrap({key:q,translation:gt,defaultValue:z,params:ne,ns:se}):gt;me=Lr(me);try{if(Oe&&qt&&Gt)for(const gt of l.formatters)me=gt.format({translation:me,language:qt,params:ne});l.finalFormatter&&Oe&&qt&&Gt&&(me=l.finalFormatter.format({translation:me,language:qt,params:ne}))}catch(gt){console.error(gt);const Vi=jg(gt)||ma,Vn=e().onFormatError,Qe=typeof Vn;Qe==="string"?me=Vn:Qe==="function"?me=Vn(Vi,V):me=ma,me=Lr(me)}return me}});return L}const wl=(t,e,n)=>{let r=t;return Object.freeze({init(i){r=i},notify(){const i=e();r!==i&&n(i),r=i}})};function Wg(t,e,n){let r=bl(),i;const s=Object.freeze({init(o){r=bl(o,r)},isRunning(){return r.isRunning},setRunning(o){r.isRunning!==o&&(r.isRunning=o,n.emit(o))},isInitialLoading(){return r.isInitialLoading},setInitialLoading(o){r.isInitialLoading=o},getLanguage(){return r.language||r.initialOptions.language},setLanguage(o){r.language!==o&&(r.language=o,t.emit(o))},getPendingLanguage(){return r.pendingLanguage||s.getLanguage()},setPendingLanguage(o){r.pendingLanguage!==o&&(r.pendingLanguage=o,e.emit(o))},getInitialOptions(){return Object.assign(Object.assign({},r.initialOptions),i)},addActiveNs(o){nt(o).forEach(c=>{const l=r.activeNamespaces.get(c);l!==void 0?r.activeNamespaces.set(c,l+1):r.activeNamespaces.set(c,1)})},removeActiveNs(o){nt(o).forEach(c=>{const l=r.activeNamespaces.get(c);l!==void 0&&l>1?r.activeNamespaces.set(c,l-1):r.activeNamespaces.delete(c)})},getRequiredNamespaces(){return pa([...r.initialOptions.ns||[r.initialOptions.defaultNs],...nt(r.initialOptions.fallbackNs),...r.activeNamespaces.keys()])},getFallbackLangs(o){const a=o||s.getLanguage();return a?pa([a,...Ng(a,r.initialOptions.fallbackLanguage)]):[]},getFallbackNs(){return nt(r.initialOptions.fallbackNs)},getDefaultNs(o){return o===void 0?r.initialOptions.defaultNs:o},getAvailableLanguages(){if(r.initialOptions.availableLanguages)return r.initialOptions.availableLanguages;if(r.initialOptions.staticData){const o=Object.keys(r.initialOptions.staticData).map(a=>Kr(a).language);return Array.from(new Set(o))}},withDefaultNs(o){return{namespace:o.namespace===void 0?s.getInitialOptions().defaultNs:o.namespace,language:o.language}},overrideCredentials(o){o?i=Object.assign(Object.assign({},o),{apiUrl:nf(o.apiUrl)}):i=void 0}});return s}function Zg(t){var{ns:e,noWrap:n,orEmpty:r,params:i,language:s}=t,o=of(t,["ns","noWrap","orEmpty","params","language"]);return Object.assign(Object.assign({},{ns:e,noWrap:n,orEmpty:r,language:s}),{params:Object.assign({},o)})}const af=(t,...e)=>{let n={},r;return typeof t=="object"?n=t:(n.key=t,typeof e[0]=="string"?(n.defaultValue=e[0],r=e[1]):typeof e[0]=="object"&&(r=e[0])),r&&(n=Object.assign(Object.assign({},Zg(r)),n)),n};function Kg({options:t}){const e=Bg(c,l),n=wl(!1,()=>o.isFetching(),e.onFetchingChange.emit),r=wl(!1,()=>x.isLoading(),e.onLoadingChange.emit),i=Wg(e.onLanguageChange,e.onPendingLanguageChange,e.onRunningChange),s=Gg(i.getLanguage,i.getInitialOptions,i.getAvailableLanguages,u,w,y,h,e),o=Hg(e,s.getBackendRecord,s.getBackendDevRecord,i.withDefaultNs,i.isInitialLoading,n,r);t&&v(t);let a;e.onUpdate.listen(()=>{i.isRunning()&&s.retranslate()});function c(){return i.getFallbackNs()}function l(g){return i.getDefaultNs(g)}function u(g){return[...nt(l(g)),...c()]}function d(g){return[...nt(g??l()),...i.getRequiredNamespaces()]}function h(g,_,O){const T=i.withDefaultNs(g),R=o.getTranslation(T,_);return o.changeTranslation(T,_,O),{revert(){o.changeTranslation(T,_,R)}}}function v(g){i.init(g),o.addStaticData(i.getInitialOptions().staticData)}function m(g,_){const O=i.getFallbackLangs(g),T=d(_),R=[];return O.forEach(L=>{T.forEach(A=>{o.exists({language:L,namespace:A},!0)||R.push({language:L,namespace:A})})}),R}function f(g,_){const O=m(g,_);if(O.length)return ks(x.loadRecords(O),()=>{})}function w({key:g,ns:_}){const O=i.getFallbackLangs(),T=u(_??void 0);return o.getTranslationNs(T,O,g)}function y({key:g,ns:_,language:O}){const T=u(_??void 0),R=i.getFallbackLangs(O);return o.getTranslationFallback(T,R,g)}function C(){const g=ks(b(),()=>f());if(go(g))return i.setInitialLoading(!0),n.notify(),r.notify(),Promise.resolve(g).then(()=>{i.setInitialLoading(!1),n.notify(),r.notify(),e.onInitialLoaded.emit()});e.onInitialLoaded.emit()}function b(){if(i.getLanguage())return;const _=s.getInitialLanguage();return ks(_,O=>{const T=O||i.getInitialOptions().defaultLanguage;T&&i.setLanguage(T)})}function E(){if((s.getLanguageDetector()||s.getLanguageStorage())&&!i.getAvailableLanguages())throw new Error(gl("availableLanguages"));if(!i.getLanguage()&&!i.getInitialOptions().defaultLanguage)throw new Error(gl(["defaultLanguage","language"]))}const x=Object.freeze(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),i),s),o),{init:v,getTranslation:y,changeTranslation:h,getTranslationNs:w,getDefaultAndFallbackNs:u,async changeLanguage(g){i.getPendingLanguage()===g&&i.getLanguage()===g||(i.setPendingLanguage(g),i.isRunning()&&await f(g),g===i.getPendingLanguage()&&(i.setLanguage(g),await s.setStoredLanguage(g)))},async addActiveNs(g,_){_||i.addActiveNs(g),i.isRunning()&&await f(void 0,g)},loadRecords(g){return o.loadRecords(g,x.isDev())},async loadRecord(g){return(await x.loadRecords([g]))[0]},isLoading(g){return o.isLoading(i.getLanguage(),g)},isLoaded(g){const _=i.getLanguage();if(!_)return!1;const O=i.getFallbackLangs(_),T=d(g),R=[];return O.forEach(L=>{T.forEach(A=>{o.exists({language:L,namespace:A})||R.push({language:L,namespace:A})})}),R.length===0},t:(...g)=>{const _=af(...g),O=y(_);return s.formatTranslation(Object.assign(Object.assign({},_),{translation:O}))},isDev(){return!!(i.getInitialOptions().apiKey&&i.getInitialOptions().apiUrl)},run(){return E(),i.isRunning()||(i.setRunning(!0),s.run(),a=C()),Promise.resolve(a)},stop(){i.isRunning()&&(s.stop(),i.setRunning(!1))}}));return x}function Qg(t){const e=Kg({options:t});e.isDev()&&e.invalidate();function n(i){const s=e.isRunning();s&&e.stop(),i(),e.isDev()&&e.invalidate(),s&&e.run()}const r=Object.freeze({on:e.on,onNsUpdate:e.onUpdate.listenSome,setEmitterActive:e.setEmitterActive,getLanguage:e.getLanguage,getPendingLanguage:e.getPendingLanguage,changeLanguage:e.changeLanguage,changeTranslation:e.changeTranslation,addActiveNs:e.addActiveNs,removeActiveNs:e.removeActiveNs,loadRecords:e.loadRecords,loadRecord:e.loadRecord,addStaticData:e.addStaticData,getRecord:e.getRecord,getAllRecords:e.getAllRecords,isLoaded:e.isLoaded,isInitialLoading:e.isInitialLoading,isLoading:e.isLoading,isFetching:e.isFetching,isRunning:e.isRunning,run:e.run,stop:e.stop,t:e.t,highlight:e.highlight,getInitialOptions:e.getInitialOptions,isDev:e.isDev,wrap:e.wrap,unwrap:e.unwrap,overrideCredentials(i){n(()=>e.overrideCredentials(i))},addPlugin(i){i&&n(()=>e.addPlugin(r,i))},updateOptions(i){i&&n(()=>e.init(i))}});return r}const Jg=()=>{const t={plugins:[],options:{}},e=Object.freeze({use(n){return t.plugins.push(n),e},updateDefaults(n){return t.options=ga(t.options,n),e},init(n){const r=Qg(ga(t.options,n));return t.plugins.forEach(r.addPlugin),r}});return e},cf=0,va=1,Xg=2;class Yg extends Error{constructor(e,n,r){let i;e===cf?i="Empty parameter":e===va?i="Unexpected character":i="Unexpected end",super(`Tolgee parser: ${i} at ${n} in "${r}"`),this.code=e,this.index=n}}function Sl(t){return/\s/.test(t)}const Qt=0,ya=1,Ms=2,Mo=3,Do=4,ev=new Set([Ms,ya,Qt]),ba="'",tv=new Set(["{","}",ba]),nv=t=>/[0-9a-zA-Z_]/.test(t);function rv(t){let e=Qt,n="",r="",i="";const s=[],o=[];let a=0;function c(h){throw new Yg(h,a,t)}const l=()=>{s.push(n),n=""},u=()=>{nv(i)||c(va),r+=i},d=()=>{r===""&&c(cf),o.push(r),r=""};for(a=0;a<t.length;a++)switch(i=t[a],e){case Qt:i===ba?(n+=i,e=ya):i==="{"?(l(),e=Mo):(n+=i,e=Qt);break;case ya:tv.has(i)?(n=n.slice(0,-1)+i,e=Ms):(n+=i,e=Qt);break;case Ms:i===ba?e=Qt:(n+=i,e=Ms);break;case Mo:i==="}"?(d(),e=Qt):Sl(i)?r!==""&&(d(),e=Do):(u(),e=Mo);break;case Do:i=="}"?e=Qt:Sl(i)?e=Do:c(va)}return ev.has(e)||c(Xg),l(),[s,o]}function iv(t,e){const[n,r]=rv(t),i=[n[0]];for(let s=1;s<n.length;s++){const o=e==null?void 0:e[r[s-1]];if(o===void 0)throw new Error(`Missing parameter "${r[s-1]}" in "${t}"`);i.push(String(o)),i.push(n[s])}return i.join("")}function sv(){return{format:({translation:t,params:e})=>iv(t,e)}}const ov=()=>(t,e)=>(e.setFinalFormatter(sv()),t);var No=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Cl={};(function(t){function e(y,C){var b;return y instanceof Buffer?b=y:b=Buffer.from(y.buffer,y.byteOffset,y.byteLength),b.toString(C)}var n=function(y){return Buffer.from(y)};function r(y){for(var C=0,b=Math.min(256*256,y.length+1),E=new Uint16Array(b),x=[],g=0;;){var _=C<y.length;if(!_||g>=b-1){var O=E.subarray(0,g),T=O;if(x.push(String.fromCharCode.apply(null,T)),!_)return x.join("");y=y.subarray(C),C=0,g=0}var R=y[C++];if(!(R&128))E[g++]=R;else if((R&224)===192){var L=y[C++]&63;E[g++]=(R&31)<<6|L}else if((R&240)===224){var L=y[C++]&63,A=y[C++]&63;E[g++]=(R&31)<<12|L<<6|A}else if((R&248)===240){var L=y[C++]&63,A=y[C++]&63,D=y[C++]&63,N=(R&7)<<18|L<<12|A<<6|D;N>65535&&(N-=65536,E[g++]=N>>>10&1023|55296,N=56320|N&1023),E[g++]=N}}}function i(y){for(var C=0,b=y.length,E=0,x=Math.max(32,b+(b>>>1)+7),g=new Uint8Array(x>>>3<<3);C<b;){var _=y.charCodeAt(C++);if(_>=55296&&_<=56319){if(C<b){var O=y.charCodeAt(C);(O&64512)===56320&&(++C,_=((_&1023)<<10)+(O&1023)+65536)}if(_>=55296&&_<=56319)continue}if(E+4>g.length){x+=8,x*=1+C/y.length*2,x=x>>>3<<3;var T=new Uint8Array(x);T.set(g),g=T}if(_&4294967168)if(!(_&4294965248))g[E++]=_>>>6&31|192;else if(!(_&4294901760))g[E++]=_>>>12&15|224,g[E++]=_>>>6&63|128;else if(!(_&4292870144))g[E++]=_>>>18&7|240,g[E++]=_>>>12&63|128,g[E++]=_>>>6&63|128;else continue;else{g[E++]=_;continue}g[E++]=_&63|128}return g.slice?g.slice(0,E):g.subarray(0,E)}var s="Failed to ",o=function(y,C,b){if(y)throw new Error("".concat(s).concat(C,": the '").concat(b,"' option is unsupported."))},a=typeof Buffer=="function"&&Buffer.from,c=a?n:i;function l(){this.encoding="utf-8"}l.prototype.encode=function(y,C){return o(C&&C.stream,"encode","stream"),c(y)};function u(y){var C;try{var b=new Blob([y],{type:"text/plain;charset=UTF-8"});C=URL.createObjectURL(b);var E=new XMLHttpRequest;return E.open("GET",C,!1),E.send(),E.responseText}finally{C&&URL.revokeObjectURL(C)}}var d=!a&&typeof Blob=="function"&&typeof URL=="function"&&typeof URL.createObjectURL=="function",h=["utf-8","utf8","unicode-1-1-utf-8"],v=r;a?v=e:d&&(v=function(y){try{return u(y)}catch{return r(y)}});var m="construct 'TextDecoder'",f="".concat(s," ").concat(m,": the ");function w(y,C){o(C&&C.fatal,m,"fatal"),y=y||"utf-8";var b;if(a?b=Buffer.isEncoding(y):b=h.indexOf(y.toLowerCase())!==-1,!b)throw new RangeError("".concat(f," encoding label provided ('").concat(y,"') is invalid."));this.encoding=y,this.fatal=!1,this.ignoreBOM=!1}w.prototype.decode=function(y,C){o(C&&C.stream,"decode","stream");var b;return y instanceof Uint8Array?b=y:y.buffer instanceof ArrayBuffer?b=new Uint8Array(y.buffer):b=new Uint8Array(y),v(b,this.encoding)},t.TextEncoder=t.TextEncoder||l,t.TextDecoder=t.TextDecoder||w})(typeof window<"u"?window:No);var av=Mg({__proto__:null,default:Cl},[Cl]),jo;(jo=console.assert)===null||jo===void 0||jo.call(console,av);const cv="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";function lv(t){const e=cv.indexOf(t);if(e===-1)throw new Error("Invalid character found: "+t);return e}function uv(t){const e=new Uint8Array(t),n=e.length;let r="",i=Math.pow(2,16)-1;for(let s=0;s<n;s+=i)s+i>n&&(i=n-s),r+=String.fromCharCode.apply(null,e.subarray(s,s+i));return r}function dv(t){t=t.toUpperCase();const e=t.length;let n=0,r=0,i=0;const s=new Uint8Array(e*5/8|0);for(let o=0;o<e;o++)r=r<<5|lv(t[o]),n+=5,n>=8&&(s[i++]=r>>>n-8&255,n-=8);return uv(s.buffer)}function fv(t){if(t)try{const[e,n]=t.split("_");if(e==="tgpak"){const[r]=dv(n).split("_");return Number(r)}}catch{console.warn("Tolgee: Api key can't be parsed")}}function hv(t){if(!t)return;const[e]=t.split("_");return e==="tgpak"?"tgpak":e==="tgpat"?"tgpat":"legacy"}function pv(){return{getRecord({apiUrl:t,apiKey:e,language:n,namespace:r,projectId:i,fetch:s}){var o;const a=(o=fv(e))!==null&&o!==void 0?o:i;let c=a!==void 0?`${t}/v2/projects/${a}/translations/${n}`:`${t}/v2/projects/translations/${n}`;if(r&&(c+=`?ns=${r}`),hv(e)==="tgpat"&&i===void 0)throw new Error("You need to specify 'projectId' when using PAT key");return s(c,{headers:{"X-API-Key":e||"","Content-Type":"application/json"}}).then(l=>{if(l.ok)return l.json().then(u=>u[n]);throw new Error(l.statusText)})}}}const mv=()=>(t,e)=>(e.setDevBackend(pv()),t);function gv(t,e){const n=r=>{var i,s;t.includes((i=r.data)===null||i===void 0?void 0:i.type)&&e((s=r.data)===null||s===void 0?void 0:s.data)};return window.addEventListener("message",n,!1),{unsubscribe(){window.removeEventListener("message",n)}}}function vv({message:t,recievingMessage:e,data:n,attempts:r=1,timeout:i=300}){let s=!1;const o=()=>new Promise((c,l)=>{const u=gv(e,h);window.postMessage({type:t,data:n},window.origin);const d=setTimeout(m,i);function h(f){clearTimeout(d),v(),c(f)}function v(){u.unsubscribe()}function m(){v(),l()}});return{cancel(){s=!0},promise:(async()=>{for(let c=0;c<r;c++){if(s)return new Promise(()=>{});try{return await o()}catch{continue}}if(!s)throw`Didn't recieve ${e.join(" or ")} in time.`;return new Promise(()=>{})})()}}function yv(){let t;async function e(n){t==null||t();const{cancel:r,promise:i}=vv({message:"TOLGEE_READY",recievingMessage:["TOLGEE_PLUGIN_READY","TOLGEE_PLUGIN_UPDATED"],data:n,attempts:4});return t=r,i}return{update:e}}const bv="tolgee-in-context-tools.umd.min.js",wv="@tolgee/in-context-tools",Sv="InContextTools",Cv="https://cdn.jsdelivr.net/npm";function _v(t){return new Promise((e,n)=>{const r=document.createElement("script");r.src=t,r.addEventListener("load",()=>e()),r.addEventListener("error",i=>n(i.error)),document.head.appendChild(r)})}let Io=null;function Ev(t){return Io||(Io=_v(`${Cv}/@tolgee/web@${t}/dist/${bv}`).then(()=>window[wv][Sv])),Io}const lf="__tolgee_apiKey",uf="__tolgee_apiUrl";function _l(){const t=sessionStorage.getItem(lf)||void 0,e=sessionStorage.getItem(uf)||void 0;if(!(!t||!e))return{apiKey:t,apiUrl:e}}function xv(){sessionStorage.removeItem(lf),sessionStorage.removeItem(uf)}function Ov(t){document.readyState!=="loading"?Promise.resolve().then(()=>{t()}):document.addEventListener&&document.addEventListener("DOMContentLoaded",t)}let df=()=>t=>t;const Pv=()=>{if(typeof window>"u")return!1;try{return typeof sessionStorage<"u"&&sessionStorage}catch(t){return console.error("sessionStorage not available",t),!1}};Pv()&&(df=()=>t=>{const e=yv(),n=()=>({uiPresent:!0,uiVersion:void 0,mode:t.isDev()?"development":"production",config:{apiUrl:t.getInitialOptions().apiUrl||"",apiKey:t.getInitialOptions().apiKey||""}}),r=async()=>{const s=await Ev("5.22.0");return o=>{const a=_l();return o.addPlugin(s({credentials:a})),o}};return t.on("running",({value:s})=>{s&&Ov(()=>{e.update(n()).catch(xv)})}),_l()&&r().then(s=>{t.addPlugin(s)}).catch(s=>{console.error("Tolgee: Failed to load in-context tools"),console.error(s)}),t});function Tv(){return Jg().use(df())}const Av={useSuspense:!0};let Fo;const ff=()=>(Fo||(Fo=p.createContext(void 0)),Fo),Rv=({tolgee:t,options:e,children:n,fallback:r})=>{const[i,s]=p.useState(!t.isLoaded());p.useEffect(()=>{t.run().catch(c=>{console.error(c)}).finally(()=>{s(!1)})},[t]);const o=Object.assign(Object.assign({},Av),e),a=ff();return o.useSuspense?p.createElement(a.Provider,{value:{tolgee:t,options:o}},i?r:p.createElement(p.Suspense,{fallback:r||null},n)):p.createElement(a.Provider,{value:{tolgee:t,options:o}},i?r:n)};let Lv;function kv(){return Lv}const Mv=()=>{const t=ff(),e=p.useContext(t)||kv();if(!e)throw new Error("Couldn't find tolgee instance, did you forgot to use `TolgeeProvider`?");return e},Dv=()=>{const[t,e]=p.useState(0),n=p.useCallback(()=>{e(r=>r+1)},[e]);return{instance:t,rerender:n}},hf=(t,e)=>{const{tolgee:n,options:r}=Mv(),i=tf(t),s=nt(i).join(":"),o=Object.assign(Object.assign({},r),e),{rerender:a,instance:c}=Dv(),l=p.useRef(),u=p.useRef([]);u.current=[];const d=m=>{var f;u.current.push(m),(f=l.current)===null||f===void 0||f.subscribeNs(m)},h=n.isLoaded(i);p.useEffect(()=>{const m=n.onNsUpdate(a);return l.current=m,m.subscribeNs(i),u.current.forEach(f=>{m.subscribeNs(f)}),()=>{m.unsubscribe()}},[s,n]),p.useEffect(()=>(n.addActiveNs(i),()=>n.removeActiveNs(i)),[s,n]);const v=p.useCallback(m=>{var f;const w=(f=m.ns)!==null&&f!==void 0?f:i==null?void 0:i[0];return d(w),n.t(Object.assign(Object.assign({},m),{ns:w}))},[n,c]);if(o.useSuspense&&!h)throw n.addActiveNs(i,!0);return{t:v,isLoading:!h}},mt=(t,e)=>{const{t:n,isLoading:r}=hf(t,e);return{t:p.useCallback((...s)=>{const o=af(...s);return n(o)},[n]),isLoading:r}},Nv=t=>{if(!t)return;const e={};return Object.entries(t||{}).forEach(([n,r])=>{if(typeof r=="function")e[n]=i=>r(wa(i));else if(p.isValidElement(r)){const i=r;e[n]=s=>i.props.children===void 0&&(s!=null&&s.length)?p.cloneElement(i,{},wa(s)):p.cloneElement(i)}else e[n]=r}),e},wa=t=>Array.isArray(t)?p.Children.toArray(t):t,jv=t=>{const e=t.keyName||t.children;e===void 0&&console.error("T component: keyName not defined");const n=t.defaultValue||(t.keyName?t.children:void 0),r=wa(t.t({key:e,params:Nv(t.params),defaultValue:n,noWrap:t.noWrap,ns:t.ns,language:t.language}));return p.createElement(p.Fragment,null,r)},Ft=t=>{const{t:e}=hf();return p.createElement(jv,Object.assign({t:e},t))},Iv="Spinner-module__loader__U4GVhD",Fv={loader:Iv},qs=({className:t})=>S.jsx("div",{className:Y(Fv.loader,t),children:"Loading..."}),Bv="Button-module__root__8RX49h",Vv="Button-module__primary__st6yY9",Hv="Button-module__secondary__j-3rjz",Uv="Button-module__loading__QfItr2",$v="Button-module__spinner__kVZYqS",Br={root:Bv,primary:Vv,secondary:Hv,loading:Uv,spinner:$v},it=({children:t,className:e,loading:n,variant:r="primary",...i})=>{const s=[Br.root,e,Br[r],{[Br.loading]:n}];if(i.as==="link"){const{as:o,disabled:a,...c}=i;return S.jsxs("a",{className:Y(s),...c,"data-disabled":a,children:[!n&&t,n&&S.jsx(qs,{className:Br.spinner})]})}if(i.as==="button"){const{as:o,...a}=i;return S.jsxs("button",{type:"button",className:Y(s),...a,children:[!n&&t,n&&S.jsx(qs,{className:Br.spinner})]})}Ot(!1,"Invalid button type")};it.defaultProps={as:"button"};const zv=t=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},j.createElement("g",{clipPath:"url(#a)"},j.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M17.071 3.071a1.25 1.25 0 0 0-1.768 0L10 8.375 4.697 3.07a1.25 1.25 0 1 0-1.768 1.77l5.303 5.303-5.303 5.303a1.25 1.25 0 0 0 1.768 1.768L10 11.91l5.303 5.303a1.25 1.25 0 1 0 1.768-1.768l-5.303-5.303L17.07 4.84a1.25 1.25 0 0 0 0-1.768Z",clipRule:"evenodd"})),j.createElement("defs",null,j.createElement("clipPath",{id:"a"},j.createElement("path",{fill:"#fff",d:"M0 0h20v20H0z"})))),qv="CloseButton-module__root__2m1asd",Gv="CloseButton-module__absolutePositionVariant__lGX4cQ",Wv="CloseButton-module__relativePositionVariant__LqTTWf",El={root:qv,absolutePositionVariant:Gv,relativePositionVariant:Wv},Ar=({className:t,position:e="absolute",...n})=>S.jsx("div",{...n,className:Y(El.root,t,El[`${e}PositionVariant`]),children:S.jsx(zv,{})}),Zv=t=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:13,height:12,viewBox:"0 0 13 12",fill:"none",...t},j.createElement("path",{d:"M6.04102 1.125C5.07683 1.125 4.1343 1.41091 3.33261 1.94659C2.53092 2.48226 1.90608 3.24363 1.53711 4.13442C1.16813 5.02521 1.07159 6.00541 1.25969 6.95107C1.44779 7.89672 1.91209 8.76536 2.59387 9.44715C3.27565 10.1289 4.1443 10.5932 5.08995 10.7813C6.03561 10.9694 7.01581 10.8729 7.9066 10.5039C8.79739 10.1349 9.55876 9.51009 10.0944 8.7084C10.6301 7.90671 10.916 6.96418 10.916 6C10.9147 4.70749 10.4006 3.46831 9.48666 2.55436C8.57271 1.64042 7.33353 1.12636 6.04102 1.125ZM6.04102 10.125C5.22517 10.125 4.42764 9.88307 3.74929 9.42981C3.07094 8.97655 2.54223 8.33231 2.23001 7.57857C1.9178 6.82482 1.83611 5.99542 1.99528 5.19525C2.15444 4.39508 2.54731 3.66008 3.1242 3.08318C3.70109 2.50629 4.4361 2.11342 5.23627 1.95426C6.03644 1.7951 6.86584 1.87679 7.61959 2.189C8.37333 2.50121 9.01757 3.02992 9.47083 3.70827C9.92409 4.38663 10.166 5.18415 10.166 6C10.1648 7.09364 9.72978 8.14213 8.95646 8.91545C8.18314 9.68876 7.13465 10.1238 6.04102 10.125ZM6.79102 8.25C6.79102 8.34946 6.75151 8.44484 6.68118 8.51517C6.61086 8.58549 6.51547 8.625 6.41602 8.625C6.21711 8.625 6.02634 8.54598 5.88569 8.40533C5.74504 8.26468 5.66602 8.07391 5.66602 7.875V6C5.56656 6 5.47118 5.96049 5.40085 5.89016C5.33053 5.81984 5.29102 5.72446 5.29102 5.625C5.29102 5.52554 5.33053 5.43016 5.40085 5.35984C5.47118 5.28951 5.56656 5.25 5.66602 5.25C5.86493 5.25 6.0557 5.32902 6.19635 5.46967C6.337 5.61032 6.41602 5.80109 6.41602 6V7.875C6.51547 7.875 6.61086 7.91451 6.68118 7.98483C6.75151 8.05516 6.79102 8.15054 6.79102 8.25ZM5.29102 3.9375C5.29102 3.82625 5.32401 3.71749 5.38582 3.62499C5.44762 3.53249 5.53547 3.46039 5.63826 3.41782C5.74104 3.37524 5.85414 3.3641 5.96326 3.38581C6.07237 3.40751 6.1726 3.46109 6.25127 3.53975C6.32993 3.61842 6.38351 3.71865 6.40521 3.82776C6.42691 3.93688 6.41577 4.04998 6.3732 4.15276C6.33063 4.25554 6.25853 4.34339 6.16603 4.4052C6.07352 4.46701 5.96477 4.5 5.85352 4.5C5.70433 4.5 5.56126 4.44074 5.45577 4.33525C5.35028 4.22976 5.29102 4.08668 5.29102 3.9375Z",fill:"black"})),Kv="W3WLink-module__likeButton__RhAlpN",Qv="W3WLink-module__title__eo6M7L",xl={likeButton:Kv,title:Qv},Jv=()=>S.jsxs("a",{className:xl.likeButton,title:"about what3words",href:"https://what3words.com/about",target:"_blank",rel:"noreferrer",children:[S.jsx("span",{className:xl.title,children:"what3words"}),S.jsx(Zv,{})]}),Xv=t=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,viewBox:"0 0 20 20",fill:"none",...t},j.createElement("path",{d:"M10 1.25C8.17727 1.25207 6.42979 1.97706 5.14092 3.26592C3.85206 4.55479 3.12707 6.30227 3.125 8.125C3.125 14.0078 9.375 18.4508 9.64141 18.6367C9.74649 18.7103 9.87169 18.7498 10 18.7498C10.1283 18.7498 10.2535 18.7103 10.3586 18.6367C10.625 18.4508 16.875 14.0078 16.875 8.125C16.8729 6.30227 16.1479 4.55479 14.8591 3.26592C13.5702 1.97706 11.8227 1.25207 10 1.25ZM10 5.625C10.4945 5.625 10.9778 5.77162 11.3889 6.04633C11.8 6.32103 12.1205 6.71148 12.3097 7.16829C12.4989 7.62511 12.5484 8.12777 12.452 8.61273C12.3555 9.09768 12.1174 9.54314 11.7678 9.89277C11.4181 10.2424 10.9727 10.4805 10.4877 10.577C10.0028 10.6734 9.50011 10.6239 9.04329 10.4347C8.58648 10.2455 8.19603 9.92505 7.92133 9.51393C7.64662 9.1028 7.5 8.61945 7.5 8.125C7.5 7.46196 7.76339 6.82607 8.23223 6.35723C8.70107 5.88839 9.33696 5.625 10 5.625Z",fill:"currentColor"})),Yv=t=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,viewBox:"0 0 20 20",fill:"none",...t},j.createElement("path",{d:"M20 0H0V20H20V0Z",fill:"black"}),j.createElement("path",{d:"M8.79664 14.3751C8.69766 14.3749 8.60012 14.3513 8.51204 14.3061C8.42396 14.261 8.34785 14.1956 8.28997 14.1153C8.2321 14.0349 8.1941 13.9421 8.1791 13.8442C8.1641 13.7464 8.17253 13.6464 8.2037 13.5524L10.7037 6.05231C10.7561 5.89505 10.8689 5.76506 11.0172 5.69095C11.1655 5.61683 11.3371 5.60466 11.4944 5.65711C11.6517 5.70956 11.7817 5.82233 11.8558 5.97061C11.9299 6.1189 11.9421 6.29055 11.8896 6.44782L9.38961 13.9479C9.34809 14.0723 9.26848 14.1805 9.16206 14.2572C9.05564 14.3338 8.9278 14.3751 8.79664 14.3751Z",fill:"white"}),j.createElement("path",{d:"M5.04666 14.3751C4.94767 14.3749 4.85013 14.3513 4.76205 14.3061C4.67397 14.261 4.59787 14.1955 4.53999 14.1152C4.48211 14.0349 4.4441 13.942 4.4291 13.8442C4.4141 13.7464 4.42253 13.6464 4.45369 13.5524L6.95369 6.05229C7.00645 5.89542 7.11927 5.76587 7.26741 5.69206C7.41554 5.61825 7.58691 5.60621 7.74391 5.65857C7.90092 5.71093 8.03075 5.82343 8.10493 5.97138C8.17911 6.11933 8.19159 6.29066 8.13962 6.4478L5.6396 13.9479C5.59808 14.0723 5.51848 14.1805 5.41206 14.2571C5.30565 14.3338 5.17781 14.3751 5.04666 14.3751Z",fill:"white"}),j.createElement("path",{d:"M12.5467 14.3751C12.4477 14.3749 12.3501 14.3513 12.2621 14.3061C12.174 14.261 12.0979 14.1955 12.04 14.1152C11.9821 14.0349 11.9441 13.942 11.9291 13.8442C11.9141 13.7464 11.9225 13.6464 11.9537 13.5524L14.4537 6.05229C14.5064 5.89542 14.6193 5.76587 14.7674 5.69206C14.9155 5.61825 15.0869 5.60621 15.2439 5.65857C15.4009 5.71093 15.5308 5.82343 15.6049 5.97138C15.6791 6.11933 15.6916 6.29066 15.6396 6.4478L13.1396 13.9479C13.0981 14.0723 13.0185 14.1805 12.9121 14.2571C12.8057 14.3338 12.6778 14.3751 12.5467 14.3751Z",fill:"white"})),e1="W3WLink-module__mainWrapper__BeGCpA",t1="W3WLink-module__link__yq50q-",Ol={mainWrapper:e1,link:t1},pf=({what3words:t})=>{const{id:e,link:n}=t;return S.jsxs("div",{className:Ol.mainWrapper,children:[S.jsx(Yv,{}),S.jsx("a",{className:Ol.link,href:n,title:"w3w link",target:"_blank",rel:"noreferrer",children:e}),S.jsx(Xv,{})]})},Pl={day:"",statusValue:"No data",isAvailable:!1,closes:""};function n1(t){const[e,n]=p.useState({...Pl,workSchedule:[]}),{t:r}=mt(["details_modal","common"]),i={1:r("monday"),2:r("tuesday"),3:r("wednesday"),4:r("thursday"),5:r("friday"),6:r("saturday"),7:r("sunday")};return p.useEffect(()=>{function s(a){var h;const c=new Date(Date.now()),l=c.getDay()||7,u=c.toLocaleTimeString("en-GB"),d=(h=a.find(({dayNumber:v})=>v===l))==null?void 0:h.time;if(d){const v=d.split("-"),m=v[v.length-1],w=d.split(", ").some(y=>{const[C,b]=y.split("-");return b.trim()<C.trim()?u>=C||u<b:u>=C&&u<b});return{day:i[l],statusValue:r(w?"open":"close"),isAvailable:w,closes:m}}return{...Pl,statusValue:r("close")}}const o=function(){if(t)return Object.entries(t).reduce((c,[l,u])=>{if(u==null?void 0:u.length){const h=+l,v=u.join(", "),m={dayNumber:h,dayName:i[h],time:v};c.push(m)}return c},[])}();o!=null&&o.length&&n({...s(o),workSchedule:o})},[t]),e}const r1="LocationView-module__title__-wT0bl",i1="LocationView-module__logo__jDjNMt",s1="LocationView-module__header__K0gBYX",o1="LocationView-module__content__wtOPjm",a1="LocationView-module__sectionTitle__cNIgnC",c1="LocationView-module__scheduleContainer__Qbb9sE",l1="LocationView-module__workStatus__9yJNqr",u1="LocationView-module__scheduleButton__RQPquM",d1="LocationView-module__scheduleList__lPVLXP",f1="LocationView-module__scheduleListItem__gcCPSg",h1="LocationView-module__svgWrapper__zKM438",p1="LocationView-module__section__2J1zAJ",m1="LocationView-module__w3wSection__PdU7j4",g1="LocationView-module__chips__ALwJDx",v1="LocationView-module__services__IgJ4ba",y1="LocationView-module__images__-wKmRM",b1="LocationView-module__image__T1E-gt",w1="LocationView-module__actions__NuafMj",S1="LocationView-module__actionsHidden__-vX5kK",C1="LocationView-module__submit__c-Hc8u",_1="LocationView-module__scheduleItem__RhAgat",ve={title:r1,logo:i1,header:s1,content:o1,sectionTitle:a1,scheduleContainer:c1,workStatus:l1,scheduleButton:u1,scheduleList:d1,scheduleListItem:f1,svgWrapper:h1,section:p1,w3wSection:m1,chips:g1,services:v1,images:y1,image:b1,actions:w1,actionsHidden:S1,submit:C1,scheduleItem:_1},E1={default:Yd,llama:ef},x1=({classes:t,hideActions:e,location:n,onClose:r,onSubmit:i})=>{var b,E,x;const[s,o]=p.useState(!1),{t:a}=mt(["details_modal","common"]),{isLoading:c,lmsData:l}=mo(),{closes:u,isAvailable:d,statusValue:h,workSchedule:v}=n1(n.timetable),m=(b=l==null?void 0:l.location)==null?void 0:b.what3words,f=!!(m!=null&&m.id),{logo:w="default"}=Ee(),y=E1[w];function C(){o(g=>!g)}return S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:Y(ve.header,t==null?void 0:t.header),children:[S.jsx(Ar,{onClick:r}),S.jsxs("div",{className:ve.title,children:[S.jsx("div",{className:ve.logo,children:S.jsx(y,{})}),S.jsx("span",{children:n.name})]})]}),S.jsxs("div",{className:Y(ve.content,t==null?void 0:t.content),children:[S.jsxs("section",{className:ve.section,children:[S.jsxs("span",{children:[a("address"),":"]}),c?S.jsx(Ze,{width:200}):S.jsx("p",{children:(E=n.location)==null?void 0:E.full_address})]}),c?S.jsx(Ze,{}):f&&S.jsxs("section",{className:ve.w3wSection,children:[S.jsx(pf,{what3words:m}),S.jsx(Jv,{})]}),S.jsxs("div",{className:ve.scheduleContainer,children:[S.jsxs("span",{className:ve.sectionTitle,children:[a("schedule"),":"]}),S.jsxs("button",{type:"button","aria-label":"open schedule",className:ve.scheduleButton,onClick:C,children:[S.jsx("span",{className:ve.workStatus,"data-available":d,children:h}),u&&S.jsxs("span",{children:[a("closes")," ",u]}),S.jsx("span",{className:ve.svgWrapper,"data-open":s,children:S.jsx(kg,{})})]}),S.jsx("ul",{className:ve.scheduleList,"data-open":s,children:v.map(({dayName:g,time:_})=>{const T=!_?a("weekend"):_;return S.jsxs("li",{className:ve.scheduleListItem,children:[S.jsxs("span",{children:[g,":"]}),S.jsx("span",{children:T})]},g)})})]}),(n.pay_by_card||n.pay_by_card)&&S.jsxs("section",{className:ve.section,children:[S.jsxs("span",{children:[a("payment_method"),":"]}),c?S.jsx(Ze,{width:300}):S.jsxs("div",{className:ve.chips,children:[n.pay_by_cash&&a("pay_by_cash"),n.pay_by_card&&n.pay_by_cash&&", ",n.pay_by_card&&a("pay_by_card")]})]}),S.jsxs("section",{className:ve.section,children:[S.jsxs("span",{children:[a("services"),":"]}),S.jsxs("div",{className:ve.services,children:[n.is_pickup&&(c?S.jsx(Ze,{width:150}):S.jsx("p",{children:a("is_pickup")})),n.is_delivery&&(c?S.jsx(Ze,{width:150}):S.jsx("p",{children:a("is_delivery")})),n.is_dressing_room&&(c?S.jsx(Ze,{width:150}):S.jsx("p",{children:a("is_dressing_room")})),n.is_check_order&&(c?S.jsx(Ze,{width:150}):S.jsx("p",{children:a("is_check_order")}))]})]}),S.jsxs("section",{className:ve.section,children:[S.jsxs("span",{children:[a("location"),":"]}),c?S.jsx(Ze,{width:100}):S.jsx("p",{children:n.location_name})]}),((x=n.images)==null?void 0:x.length)>0&&S.jsx("section",{className:ve.images,children:n.images.map(g=>S.jsx("img",{src:g,alt:n.name,className:ve.image},g))})]}),S.jsx("div",{className:Y(ve.actions,{[ve.actionsHidden]:e}),children:S.jsx(it,{variant:"primary",className:ve.submit,disabled:c,onClick:i,children:a("choose",{ns:"common"})})})]})},mf=p.memo(x1),fc=({isSelectedPoint:t})=>{const e=X(tc),[n,r]=p.useState(!0);return p.useEffect(()=>{r(t?!e:!0)},[e,t]),n};var O1=P1()?p.useLayoutEffect:p.useEffect;function P1(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function T1(){var t=p.useState(Object.create(null)),e=t[1];return p.useCallback(function(){e(Object.create(null))},[])}var A1=function(e){var n=e.children,r=e.type,i=r===void 0?"reach-portal":r,s=p.useRef(null),o=p.useRef(null),a=T1();return O1(function(){if(s.current){var c=s.current.ownerDocument;return o.current=c==null?void 0:c.createElement(i),c.body.appendChild(o.current),a(),function(){o.current&&o.current.ownerDocument&&o.current.ownerDocument.body.removeChild(o.current)}}},[i,a]),o.current?Hs.createPortal(n,o.current):p.createElement("span",{ref:s})};/*! *****************************************************************************
28
28
  Copyright (c) Microsoft Corporation.
29
29
 
30
30
  Permission to use, copy, modify, and/or distribute this software for any
@@ -37,17 +37,17 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
37
37
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
38
38
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
39
39
  PERFORMANCE OF THIS SOFTWARE.
40
- ***************************************************************************** */var I=function(){return I=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},I.apply(this,arguments)};function hc(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function Q(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function re(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s}function he(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,s;r<i;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return t.concat(s||Array.prototype.slice.call(e))}var ue;(function(t){t.Start="xstate.start",t.Stop="xstate.stop",t.Raise="xstate.raise",t.Send="xstate.send",t.Cancel="xstate.cancel",t.NullEvent="",t.Assign="xstate.assign",t.After="xstate.after",t.DoneState="done.state",t.DoneInvoke="done.invoke",t.Log="xstate.log",t.Init="xstate.init",t.Invoke="xstate.invoke",t.ErrorExecution="error.execution",t.ErrorCommunication="error.communication",t.ErrorPlatform="error.platform",t.ErrorCustom="xstate.error",t.Update="xstate.update",t.Pure="xstate.pure",t.Choose="xstate.choose"})(ue||(ue={}));var xr;(function(t){t.Parent="#_parent",t.Internal="#_internal"})(xr||(xr={}));var Sa=ue.Start,pc=ue.Stop,Ii=ue.Raise,vo=ue.Send,gf=ue.Cancel,L1=ue.NullEvent,mc=ue.Assign;ue.After;ue.DoneState;var vf=ue.Log,R1=ue.Init,Ca=ue.Invoke;ue.ErrorExecution;var Tl=ue.ErrorPlatform,k1=ue.ErrorCustom,yf=ue.Update,M1=ue.Choose,D1=ue.Pure,bf=".",Al={},_a="xstate.guard",N1="",ns;function gc(t,e,n){n===void 0&&(n=bf);var r=ri(t,n),i=ri(e,n);return ce(i)?ce(r)?i===r:!1:ce(r)?r in i:Object.keys(r).every(function(s){return s in i?gc(r[s],i[s]):!1})}function wf(t){try{return ce(t)||typeof t=="number"?"".concat(t):t.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function Ea(t,e){try{return Rr(t)?t:t.toString().split(e)}catch{throw new Error("'".concat(t,"' is not a valid state path."))}}function j1(t){return typeof t=="object"&&"value"in t&&"context"in t&&"event"in t&&"_event"in t}function ri(t,e){if(j1(t))return t.value;if(Rr(t))return Gs(t);if(typeof t!="string")return t;var n=Ea(t,e);return Gs(n)}function Gs(t){if(t.length===1)return t[0];for(var e={},n=e,r=0;r<t.length-1;r++)r===t.length-2?n[t[r]]=t[r+1]:(n[t[r]]={},n=n[t[r]]);return e}function Qr(t,e){for(var n={},r=Object.keys(t),i=0;i<r.length;i++){var s=r[i];n[s]=e(t[s],s,t,i)}return n}function Ll(t,e,n){var r,i,s={};try{for(var o=Q(Object.keys(t)),a=o.next();!a.done;a=o.next()){var c=a.value,l=t[c];n(l)&&(s[c]=e(l,c,t))}}catch(u){r={error:u}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return s}var I1=function(t){return function(e){var n,r,i=e;try{for(var s=Q(t),o=s.next();!o.done;o=s.next()){var a=o.value;i=i[a]}}catch(c){n={error:c}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return i}};function F1(t,e){return function(n){var r,i,s=n;try{for(var o=Q(t),a=o.next();!a.done;a=o.next()){var c=a.value;s=s[e][c]}}catch(l){r={error:l}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return s}}function Ds(t){if(!t)return[[]];if(ce(t))return[[t]];var e=ye(Object.keys(t).map(function(n){var r=t[n];return typeof r!="string"&&(!r||!Object.keys(r).length)?[[n]]:Ds(t[n]).map(function(i){return[n].concat(i)})}));return e}function ye(t){var e;return(e=[]).concat.apply(e,he([],re(t),!1))}function Sf(t){return Rr(t)?t:[t]}function ct(t){return t===void 0?[]:Sf(t)}function Ws(t,e,n){var r,i;if(ie(t))return t(e,n.data);var s={};try{for(var o=Q(Object.keys(t)),a=o.next();!a.done;a=o.next()){var c=a.value,l=t[c];ie(l)?s[c]=l(e,n.data):s[c]=l}}catch(u){r={error:u}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return s}function B1(t){return/^(done|error)\./.test(t)}function Rl(t){return!!(t instanceof Promise||t!==null&&(ie(t)||typeof t=="object")&&ie(t.then))}function V1(t){return t!==null&&typeof t=="object"&&"transition"in t&&typeof t.transition=="function"}function H1(t,e){var n,r,i=re([[],[]],2),s=i[0],o=i[1];try{for(var a=Q(t),c=a.next();!c.done;c=a.next()){var l=c.value;e(l)?s.push(l):o.push(l)}}catch(u){n={error:u}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[s,o]}function Cf(t,e){return Qr(t.states,function(n,r){if(n){var i=(ce(e)?void 0:e[r])||(n?n.current:void 0);if(i)return{current:i,states:Cf(n,i)}}})}function U1(t,e){return{current:e,states:Cf(t,e)}}function kl(t,e,n,r){var i=t&&n.reduce(function(s,o){var a,c,l=o.assignment,u={state:r,action:o,_event:e},d={};if(ie(l))d=l(s,e.data,u);else try{for(var h=Q(Object.keys(l)),v=h.next();!v.done;v=h.next()){var m=v.value,f=l[m];d[m]=ie(f)?f(s,e.data,u):f}}catch(w){a={error:w}}finally{try{v&&!v.done&&(c=h.return)&&c.call(h)}finally{if(a)throw a.error}}return Object.assign({},s,d)},t);return i}var $1=function(){};function Rr(t){return Array.isArray(t)}function ie(t){return typeof t=="function"}function ce(t){return typeof t=="string"}function _f(t,e){if(t)return ce(t)?{type:_a,name:t,predicate:e?e[t]:void 0}:ie(t)?{type:_a,name:t.name,predicate:t}:t}function z1(t){try{return"subscribe"in t&&ie(t.subscribe)}catch{return!1}}var en=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();ns={},ns[en]=function(){return this},ns[Symbol.observable]=function(){return this};function Or(t){return!!t&&"__xstatenode"in t}function q1(t){return!!t&&typeof t.send=="function"}function yo(t,e){return ce(t)||typeof t=="number"?I({type:t},e):t}function Te(t,e){if(!ce(t)&&"$$type"in t&&t.$$type==="scxml")return t;var n=yo(t);return I({name:n.type,data:n,$$type:"scxml",type:"external"},e)}function Zn(t,e){var n=Sf(e).map(function(r){return typeof r>"u"||typeof r=="string"||Or(r)?{target:r,event:t}:I(I({},r),{event:t})});return n}function G1(t){if(!(t===void 0||t===N1))return ct(t)}function Ef(t,e,n,r,i){var s=t.options.guards,o={state:i,cond:e,_event:r};if(e.type===_a)return((s==null?void 0:s[e.name])||e.predicate)(n,r.data,o);var a=s==null?void 0:s[e.type];if(!a)throw new Error("Guard '".concat(e.type,"' is not implemented on machine '").concat(t.id,"'."));return a(n,r.data,o)}function xf(t){return typeof t=="string"?{type:t}:t}function Ns(t,e,n){var r=function(){},i=typeof t=="object",s=i?t:null;return{next:((i?t.next:t)||r).bind(s),error:((i?t.error:e)||r).bind(s),complete:((i?t.complete:n)||r).bind(s)}}function rs(t,e){return"".concat(t,":invocation[").concat(e,"]")}function xa(t){return(t.type===Ii||t.type===vo&&t.to===xr.Internal)&&typeof t.delay!="number"}var sr=Te({type:R1});function Oa(t,e){return e&&e[t]||void 0}function gi(t,e){var n;if(ce(t)||typeof t=="number"){var r=Oa(t,e);ie(r)?n={type:t,exec:r}:r?n=r:n={type:t,exec:void 0}}else if(ie(t))n={type:t.name||t.toString(),exec:t};else{var r=Oa(t.type,e);if(ie(r))n=I(I({},t),{exec:r});else if(r){var i=r.type||t.type;n=I(I(I({},r),t),{type:i})}else n=t}return n}var tn=function(t,e){if(!t)return[];var n=Rr(t)?t:[t];return n.map(function(r){return gi(r,e)})};function vc(t){var e=gi(t);return I(I({id:ce(t)?t:e.id},e),{type:e.type})}function W1(t,e){return{type:Ii,event:typeof t=="function"?t:yo(t),delay:e?e.delay:void 0,id:e==null?void 0:e.id}}function Z1(t,e,n,r){var i={_event:n},s=Te(ie(t.event)?t.event(e,n.data,i):t.event),o;if(ce(t.delay)){var a=r&&r[t.delay];o=ie(a)?a(e,n.data,i):a}else o=ie(t.delay)?t.delay(e,n.data,i):t.delay;return I(I({},t),{type:Ii,_event:s,delay:o})}function K1(t,e){return{to:e?e.to:void 0,type:vo,event:ie(t)?t:yo(t),delay:e?e.delay:void 0,id:e&&e.id!==void 0?e.id:ie(t)?t.name:wf(t)}}function Q1(t,e,n,r){var i={_event:n},s=Te(ie(t.event)?t.event(e,n.data,i):t.event),o;if(ce(t.delay)){var a=r&&r[t.delay];o=ie(a)?a(e,n.data,i):a}else o=ie(t.delay)?t.delay(e,n.data,i):t.delay;var c=ie(t.to)?t.to(e,n.data,i):t.to;return I(I({},t),{to:c,_event:s,event:s.data,delay:o})}var J1=function(t,e,n){return I(I({},t),{value:ce(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})},X1=function(t){return{type:gf,sendId:t}};function Y1(t){var e=vc(t);return{type:ue.Start,activity:e,exec:void 0}}function ey(t){var e=ie(t)?t:vc(t);return{type:ue.Stop,activity:e,exec:void 0}}function ty(t,e,n){var r=ie(t.activity)?t.activity(e,n.data):t.activity,i=typeof r=="string"?{id:r}:r,s={type:ue.Stop,activity:i};return s}var ny=function(t){return{type:mc,assignment:t}};function ry(t,e){var n=e?"#".concat(e):"";return"".concat(ue.After,"(").concat(t,")").concat(n)}function is(t,e){var n="".concat(ue.DoneState,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function js(t,e){var n="".concat(ue.DoneInvoke,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function Jr(t,e){var n="".concat(ue.ErrorPlatform,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}var iy=function(t){var e,n,r=[];try{for(var i=Q(t),s=i.next();!s.done;s=i.next())for(var o=s.value,a=0;a<o.actions.length;){if(o.actions[a].type===mc){r.push(o.actions[a]),o.actions.splice(a,1);continue}a++}}catch(c){e={error:c}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r};function Zs(t,e,n,r,i,s,o){o===void 0&&(o=!1);var a=o?[]:iy(i),c=a.length?kl(n,r,a,e):n,l=o?[n]:void 0,u=[];function d(m,f){var w;switch(f.type){case Ii:{var y=Z1(f,c,r,t.options.delays);return s&&typeof y.delay=="number"&&s(y,c,r),y}case vo:var C=Q1(f,c,r,t.options.delays);return s&&C.to!==xr.Internal&&(m==="entry"?u.push(C):s(C,c,r)),C;case vf:{var b=J1(f,c,r);return s==null||s(b,c,r),b}case M1:{var E=f,x=(w=E.conds.find(function(G){var B=_f(G.cond,t.options.guards);return!B||Ef(t,B,c,r,s?void 0:e)}))===null||w===void 0?void 0:w.actions;if(!x)return[];var g=re(Zs(t,e,c,r,[{type:m,actions:tn(ct(x),t.options.actions)}],s,o),2),_=g[0],O=g[1];return c=O,l==null||l.push(c),_}case D1:{var x=f.get(c,r.data);if(!x)return[];var T=re(Zs(t,e,c,r,[{type:m,actions:tn(ct(x),t.options.actions)}],s,o),2),L=T[0],R=T[1];return c=R,l==null||l.push(c),L}case pc:{var b=ty(f,c,r);return s==null||s(b,n,r),b}case mc:{c=kl(c,r,[f],s?void 0:e),l==null||l.push(c);break}default:var A=gi(f,t.options.actions),M=A.exec;if(s)s(A,c,r);else if(M&&l){var j=l.length-1,F=I(I({},A),{exec:function(G){for(var B=[],z=1;z<arguments.length;z++)B[z-1]=arguments[z];M.apply(void 0,he([l[j]],re(B),!1))}});A=F}return A}}function h(m){var f,w,y=[];try{for(var C=Q(m.actions),b=C.next();!b.done;b=C.next()){var E=b.value,x=d(m.type,E);x&&(y=y.concat(x))}}catch(g){f={error:g}}finally{try{b&&!b.done&&(w=C.return)&&w.call(C)}finally{if(f)throw f.error}}return u.forEach(function(g){s(g,c,r)}),u.length=0,y}var v=ye(i.map(h));return[v,c]}var tr=function(t,e){var n=e(t);return n};function Of(t){var e;return e={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:t}}},e[en]=function(){return this},e}function sy(t,e,n,r){var i,s=xf(t.src),o=(i=e==null?void 0:e.options.services)===null||i===void 0?void 0:i[s.type],a=t.data?Ws(t.data,n,r):void 0,c=o?Pf(o,t.id,a):Of(t.id);return c.meta=t,c}function Pf(t,e,n){var r=Of(e);if(r.deferred=!0,Or(t)){var i=r.state=tr(void 0,function(){return(n?t.withContext(n):t).initialState});r.getSnapshot=function(){return i}}return r}function oy(t){try{return typeof t.send=="function"}catch{return!1}}function ay(t){return oy(t)&&"id"in t}function cy(t){var e;return I((e={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},e[en]=function(){return this},e),t)}var Ks=function(t){return t.type==="atomic"||t.type==="final"};function Tf(t){return Object.keys(t.states).map(function(e){return t.states[e]})}function vi(t){return Tf(t).filter(function(e){return e.type!=="history"})}function Af(t){var e=[t];return Ks(t)?e:e.concat(ye(vi(t).map(Af)))}function Xr(t,e){var n,r,i,s,o,a,c,l,u=new Set(t),d=Pa(u),h=new Set(e);try{for(var v=Q(h),m=v.next();!m.done;m=v.next())for(var f=m.value,w=f.parent;w&&!h.has(w);)h.add(w),w=w.parent}catch(T){n={error:T}}finally{try{m&&!m.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}var y=Pa(h);try{for(var C=Q(h),b=C.next();!b.done;b=C.next()){var f=b.value;if(f.type==="compound"&&(!y.get(f)||!y.get(f).length))d.get(f)?d.get(f).forEach(function(L){return h.add(L)}):f.initialStateNodes.forEach(function(L){return h.add(L)});else if(f.type==="parallel")try{for(var E=(o=void 0,Q(vi(f))),x=E.next();!x.done;x=E.next()){var g=x.value;h.has(g)||(h.add(g),d.get(g)?d.get(g).forEach(function(L){return h.add(L)}):g.initialStateNodes.forEach(function(L){return h.add(L)}))}}catch(L){o={error:L}}finally{try{x&&!x.done&&(a=E.return)&&a.call(E)}finally{if(o)throw o.error}}}}catch(T){i={error:T}}finally{try{b&&!b.done&&(s=C.return)&&s.call(C)}finally{if(i)throw i.error}}try{for(var _=Q(h),O=_.next();!O.done;O=_.next())for(var f=O.value,w=f.parent;w&&!h.has(w);)h.add(w),w=w.parent}catch(T){c={error:T}}finally{try{O&&!O.done&&(l=_.return)&&l.call(_)}finally{if(c)throw c.error}}return h}function Lf(t,e){var n=e.get(t);if(!n)return{};if(t.type==="compound"){var r=n[0];if(r){if(Ks(r))return r.key}else return{}}var i={};return n.forEach(function(s){i[s.key]=Lf(s,e)}),i}function Pa(t){var e,n,r=new Map;try{for(var i=Q(t),s=i.next();!s.done;s=i.next()){var o=s.value;r.has(o)||r.set(o,[]),o.parent&&(r.has(o.parent)||r.set(o.parent,[]),r.get(o.parent).push(o))}}catch(a){e={error:a}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function ly(t,e){var n=Xr([t],e);return Lf(t,Pa(n))}function Yr(t,e){return Array.isArray(t)?t.some(function(n){return n===e}):t instanceof Set?t.has(e):!1}function uy(t){return he([],re(new Set(ye(he([],re(t.map(function(e){return e.ownEvents})),!1)))),!1)}function Is(t,e){return e.type==="compound"?vi(e).some(function(n){return n.type==="final"&&Yr(t,n)}):e.type==="parallel"?vi(e).every(function(n){return Is(t,n)}):!1}function dy(t){return t===void 0&&(t=[]),t.reduce(function(e,n){return n.meta!==void 0&&(e[n.id]=n.meta),e},{})}function Ml(t){return new Set(ye(t.map(function(e){return e.tags})))}function Rf(t,e){if(t===e)return!0;if(t===void 0||e===void 0)return!1;if(ce(t)||ce(e))return t===e;var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(i){return Rf(t[i],e[i])})}function fy(t){return typeof t!="object"||t===null?!1:"value"in t&&"_event"in t}function hy(t,e){var n=t.exec,r=I(I({},t),{exec:n!==void 0?function(){return n(e.context,e.event,{action:t,state:e,_event:e._event})}:void 0});return r}var Ye=function(){function t(e){var n=this,r;this.actions=[],this.activities=Al,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||Al,this.meta=dy(e.configuration),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=(r=Array.isArray(e.tags)?new Set(e.tags):e.tags)!==null&&r!==void 0?r:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return uy(n.configuration)}})}return t.from=function(e,n){if(e instanceof t)return e.context!==n?new t({value:e.value,context:n,_event:e._event,_sessionid:null,historyValue:e.historyValue,history:e.history,actions:[],activities:e.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):e;var r=sr;return new t({value:e,context:n,_event:r,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},t.create=function(e){return new t(e)},t.inert=function(e,n){if(e instanceof t){if(!e.actions.length)return e;var r=sr;return new t({value:e.value,context:n,_event:r,_sessionid:null,historyValue:e.historyValue,history:e.history,activities:e.activities,configuration:e.configuration,transitions:[],children:{}})}return t.from(e,n)},t.prototype.toStrings=function(e,n){var r=this;if(e===void 0&&(e=this.value),n===void 0&&(n="."),ce(e))return[e];var i=Object.keys(e);return i.concat.apply(i,he([],re(i.map(function(s){return r.toStrings(e[s],n).map(function(o){return s+n+o})})),!1))},t.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var n=e.tags;e.machine;var r=hc(e,["configuration","transitions","tags","machine"]);return I(I({},r),{tags:Array.from(n)})},t.prototype.matches=function(e){return gc(e,this.value)},t.prototype.hasTag=function(e){return this.tags.has(e)},t.prototype.can=function(e){var n;$1(!!this.machine);var r=(n=this.machine)===null||n===void 0?void 0:n.getTransitionData(this,e);return!!(r!=null&&r.transitions.length)&&r.transitions.some(function(i){return i.target!==void 0||i.actions.length})},t}(),py={deferEvents:!1},Dl=function(){function t(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=I(I({},py),e)}return t.prototype.initialize=function(e){if(this.initialized=!0,e){if(!this.options.deferEvents){this.schedule(e);return}this.process(e)}this.flushEvents()},t.prototype.schedule=function(e){if(!this.initialized||this.processingEvent){this.queue.push(e);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(e),this.flushEvents()},t.prototype.clear=function(){this.queue=[]},t.prototype.flushEvents=function(){for(var e=this.queue.shift();e;)this.process(e),e=this.queue.shift()},t.prototype.process=function(e){this.processingEvent=!0;try{e()}catch(n){throw this.clear(),n}finally{this.processingEvent=!1}},t}(),Bo=new Map,my=0,Hr={bookId:function(){return"x:".concat(my++)},register:function(t,e){return Bo.set(t,e),t},get:function(t){return Bo.get(t)},free:function(t){Bo.delete(t)}};function yc(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function gy(){var t=yc();if(t&&"__xstate__"in t)return t.__xstate__}function vy(t){if(yc()){var e=gy();e&&e.register(t)}}function yy(t,e){e===void 0&&(e={});var n=t.initialState,r=new Set,i=[],s=!1,o=function(){if(!s){for(s=!0;i.length>0;){var l=i.shift();n=t.transition(n,l,c),r.forEach(function(u){return u.next(n)})}s=!1}},a=cy({id:e.id,send:function(l){i.push(l),o()},getSnapshot:function(){return n},subscribe:function(l,u,d){var h=Ns(l,u,d);return r.add(h),h.next(n),{unsubscribe:function(){r.delete(h)}}}}),c={parent:e.parent,self:a,id:e.id||"anonymous",observers:r};return n=t.start?t.start(c):n,a}var by={sync:!1,autoForward:!1},xe;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(xe||(xe={}));var wy=function(){function t(e,n){n===void 0&&(n=t.defaultOptions);var r=this;this.machine=e,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=xe.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(u,d){if(Rr(u))return r.batch(u),r.state;var h=Te(yo(u,d));if(r.status===xe.Stopped)return r.state;if(r.status!==xe.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(h.name,'" was sent to uninitialized service "').concat(r.machine.id,`". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.
41
- Event: `).concat(JSON.stringify(h.data)));return r.scheduler.schedule(function(){r.forward(h);var v=r._nextState(h);r.update(v,h)}),r._state},this.sendTo=function(u,d,h){var v=r.parent&&(d===xr.Parent||r.parent.id===d),m=v?r.parent:ce(d)?d===xr.Internal?r:r.children.get(d)||Hr.get(d):q1(d)?d:void 0;if(!m){if(!v)throw new Error("Unable to send event to child '".concat(d,"' from service '").concat(r.id,"'."));return}if("machine"in m){if(r.status!==xe.Stopped||r.parent!==m||r.state.done){var f=I(I({},u),{name:u.name===k1?"".concat(Jr(r.id)):u.name,origin:r.sessionId});!h&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([m,f]):m.send(f)}}else!h&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([m,u.data]):m.send(u.data)},this._exec=function(u,d,h,v){v===void 0&&(v=r.machine.options.actions);var m=u.exec||Oa(u.type,v),f=ie(m)?m:m?m.exec:u.exec;if(f)try{return f(d,h.data,r.machine.config.predictableActionArguments?{action:u,_event:h}:{action:u,state:r.state,_event:h})}catch(j){throw r.parent&&r.parent.send({type:"xstate.error",data:j}),j}switch(u.type){case Ii:{var w=u;r.defer(w);break}case vo:var y=u;if(typeof y.delay=="number"){r.defer(y);return}else y.to?r.sendTo(y._event,y.to,h===sr):r.send(y._event);break;case gf:r.cancel(u.sendId);break;case Sa:{if(r.status!==xe.Running)return;var C=u.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[C.id||C.type])break;if(C.type===ue.Invoke){var b=xf(C.src),E=r.machine.options.services?r.machine.options.services[b.type]:void 0,x=C.id,g=C.data,_="autoForward"in C?C.autoForward:!!C.forward;if(!E)return;var O=g?Ws(g,d,h):void 0;if(typeof E=="string")return;var T=ie(E)?E(d,h.data,{data:O,src:b,meta:C.meta}):E;if(!T)return;var L=void 0;Or(T)&&(T=O?T.withContext(O):T,L={autoForward:_}),r.spawn(T,x,L)}else r.spawnActivity(C);break}case pc:{r.stopChild(u.activity.id);break}case vf:var R=u,A=R.label,M=R.value;A?r.logger(A,M):r.logger(M);break}};var i=I(I({},t.defaultOptions),n),s=i.clock,o=i.logger,a=i.parent,c=i.id,l=c!==void 0?c:e.id;this.id=l,this.logger=o,this.clock=s,this.parent=a,this.options=i,this.scheduler=new Dl({deferEvents:this.options.deferEvents}),this.sessionId=Hr.bookId()}return Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:tr(this,function(){return e._initialState=e.machine.initialState,e._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),t.prototype.execute=function(e,n){var r,i;try{for(var s=Q(e.actions),o=s.next();!o.done;o=s.next()){var a=o.value;this.exec(a,e,n)}}catch(c){r={error:c}}finally{try{o&&!o.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}},t.prototype.update=function(e,n){var r,i,s,o,a,c,l,u,d=this;if(e._sessionid=this.sessionId,this._state=e,(!this.machine.config.predictableActionArguments||n===sr)&&this.options.execute)this.execute(this.state);else for(var h=void 0;h=this._outgoingQueue.shift();)h[0].send(h[1]);if(this.children.forEach(function(T){d.state.children[T.id]=T}),this.devTools&&this.devTools.send(n.data,e),e.event)try{for(var v=Q(this.eventListeners),m=v.next();!m.done;m=v.next()){var f=m.value;f(e.event)}}catch(T){r={error:T}}finally{try{m&&!m.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}try{for(var w=Q(this.listeners),y=w.next();!y.done;y=w.next()){var f=y.value;f(e,e.event)}}catch(T){s={error:T}}finally{try{y&&!y.done&&(o=w.return)&&o.call(w)}finally{if(s)throw s.error}}try{for(var C=Q(this.contextListeners),b=C.next();!b.done;b=C.next()){var E=b.value;E(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(T){a={error:T}}finally{try{b&&!b.done&&(c=C.return)&&c.call(C)}finally{if(a)throw a.error}}if(this.state.done){var x=e.configuration.find(function(T){return T.type==="final"&&T.parent===d.machine}),g=x&&x.doneData?Ws(x.doneData,e.context,n):void 0;this._doneEvent=js(this.id,g);try{for(var _=Q(this.doneListeners),O=_.next();!O.done;O=_.next()){var f=O.value;f(this._doneEvent)}}catch(T){l={error:T}}finally{try{O&&!O.done&&(u=_.return)&&u.call(_)}finally{if(l)throw l.error}}this._stop(),this._stopChildren(),Hr.free(this.sessionId)}},t.prototype.onTransition=function(e){return this.listeners.add(e),this.status===xe.Running&&e(this.state,this.state.event),this},t.prototype.subscribe=function(e,n,r){var i=this,s=Ns(e,n,r);this.listeners.add(s.next),this.status!==xe.NotStarted&&s.next(this.state);var o=function(){i.doneListeners.delete(o),i.stopListeners.delete(o),s.complete()};return this.status===xe.Stopped?s.complete():(this.onDone(o),this.onStop(o)),{unsubscribe:function(){i.listeners.delete(s.next),i.doneListeners.delete(o),i.stopListeners.delete(o)}}},t.prototype.onEvent=function(e){return this.eventListeners.add(e),this},t.prototype.onSend=function(e){return this.sendListeners.add(e),this},t.prototype.onChange=function(e){return this.contextListeners.add(e),this},t.prototype.onStop=function(e){return this.stopListeners.add(e),this},t.prototype.onDone=function(e){return this.status===xe.Stopped&&this._doneEvent?e(this._doneEvent):this.doneListeners.add(e),this},t.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},t.prototype.start=function(e){var n=this;if(this.status===xe.Running)return this;this.machine._init(),Hr.register(this.sessionId,this),this.initialized=!0,this.status=xe.Running;var r=e===void 0?this.initialState:tr(this,function(){return fy(e)?n.machine.resolveState(e):n.machine.resolveState(Ye.from(e,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(r,sr)}),this},t.prototype._stopChildren=function(){this.children.forEach(function(e){ie(e.stop)&&e.stop()}),this.children.clear()},t.prototype._stop=function(){var e,n,r,i,s,o,a,c,l,u;try{for(var d=Q(this.listeners),h=d.next();!h.done;h=d.next()){var v=h.value;this.listeners.delete(v)}}catch(_){e={error:_}}finally{try{h&&!h.done&&(n=d.return)&&n.call(d)}finally{if(e)throw e.error}}try{for(var m=Q(this.stopListeners),f=m.next();!f.done;f=m.next()){var v=f.value;v(),this.stopListeners.delete(v)}}catch(_){r={error:_}}finally{try{f&&!f.done&&(i=m.return)&&i.call(m)}finally{if(r)throw r.error}}try{for(var w=Q(this.contextListeners),y=w.next();!y.done;y=w.next()){var v=y.value;this.contextListeners.delete(v)}}catch(_){s={error:_}}finally{try{y&&!y.done&&(o=w.return)&&o.call(w)}finally{if(s)throw s.error}}try{for(var C=Q(this.doneListeners),b=C.next();!b.done;b=C.next()){var v=b.value;this.doneListeners.delete(v)}}catch(_){a={error:_}}finally{try{b&&!b.done&&(c=C.return)&&c.call(C)}finally{if(a)throw a.error}}if(!this.initialized)return this;this.initialized=!1,this.status=xe.Stopped,this._initialState=void 0;try{for(var E=Q(Object.keys(this.delayedEventsMap)),x=E.next();!x.done;x=E.next()){var g=x.value;this.clock.clearTimeout(this.delayedEventsMap[g])}}catch(_){l={error:_}}finally{try{x&&!x.done&&(u=E.return)&&u.call(E)}finally{if(l)throw l.error}}this.scheduler.clear(),this.scheduler=new Dl({deferEvents:this.options.deferEvents})},t.prototype.stop=function(){var e=this,n=this.scheduler;return this._stop(),n.schedule(function(){var r;if(!(!((r=e._state)===null||r===void 0)&&r.done)){var i=Te({type:"xstate.stop"}),s=tr(e,function(){var o=ye(he([],re(e.state.configuration),!1).sort(function(d,h){return h.order-d.order}).map(function(d){return tn(d.onExit,e.machine.options.actions)})),a=re(Zs(e.machine,e.state,e.state.context,i,[{type:"exit",actions:o}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),c=a[0],l=a[1],u=new Ye({value:e.state.value,context:l,_event:i,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:c.filter(function(d){return!xa(d)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return u.changed=!0,u});e.update(s,i),e._stopChildren(),Hr.free(e.sessionId)}}),this},t.prototype.batch=function(e){var n=this;if(!(this.status===xe.NotStarted&&this.options.deferEvents)){if(this.status!==xe.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'))}if(e.length){var r=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var i,s,o=n.state,a=!1,c=[],l=function(v){var m=Te(v);n.forward(m),o=tr(n,function(){return n.machine.transition(o,m,void 0,r||void 0)}),c.push.apply(c,he([],re(n.machine.config.predictableActionArguments?o.actions:o.actions.map(function(f){return hy(f,o)})),!1)),a=a||!!o.changed};try{for(var u=Q(e),d=u.next();!d.done;d=u.next()){var h=d.value;l(h)}}catch(v){i={error:v}}finally{try{d&&!d.done&&(s=u.return)&&s.call(u)}finally{if(i)throw i.error}}o.changed=a,o.actions=c,n.update(o,Te(e[e.length-1]))})}},t.prototype.sender=function(e){return this.send.bind(this,e)},t.prototype._nextState=function(e,n){var r=this;n===void 0&&(n=!!this.machine.config.predictableActionArguments&&this._exec);var i=Te(e);if(i.name.indexOf(Tl)===0&&!this.state.nextEvents.some(function(o){return o.indexOf(Tl)===0}))throw i.data.data;var s=tr(this,function(){return r.machine.transition(r.state,i,void 0,n||void 0)});return s},t.prototype.nextState=function(e){return this._nextState(e,!1)},t.prototype.forward=function(e){var n,r;try{for(var i=Q(this.forwardTo),s=i.next();!s.done;s=i.next()){var o=s.value,a=this.children.get(o);if(!a)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(o,"'."));a.send(e)}}catch(c){n={error:c}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},t.prototype.defer=function(e){var n=this,r=this.clock.setTimeout(function(){"to"in e&&e.to?n.sendTo(e._event,e.to,!0):n.send(e._event)},e.delay);e.id&&(this.delayedEventsMap[e.id]=r)},t.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},t.prototype.exec=function(e,n,r){r===void 0&&(r=this.machine.options.actions),this._exec(e,n.context,n._event,r)},t.prototype.removeChild=function(e){var n;this.children.delete(e),this.forwardTo.delete(e),(n=this.state)===null||n===void 0||delete n.children[e]},t.prototype.stopChild=function(e){var n=this.children.get(e);n&&(this.removeChild(e),ie(n.stop)&&n.stop())},t.prototype.spawn=function(e,n,r){if(this.status!==xe.Running)return Pf(e,n);if(Rl(e))return this.spawnPromise(Promise.resolve(e),n);if(ie(e))return this.spawnCallback(e,n);if(ay(e))return this.spawnActor(e,n);if(z1(e))return this.spawnObservable(e,n);if(Or(e))return this.spawnMachine(e,I(I({},r),{id:n}));if(V1(e))return this.spawnBehavior(e,n);throw new Error('Unable to spawn entity "'.concat(n,'" of type "').concat(typeof e,'".'))},t.prototype.spawnMachine=function(e,n){var r=this;n===void 0&&(n={});var i=new t(e,I(I({},this.options),{parent:this,id:n.id||e.id})),s=I(I({},by),n);s.sync&&i.onTransition(function(a){r.send(yf,{state:a,id:i.id})});var o=i;return this.children.set(i.id,o),s.autoForward&&this.forwardTo.add(i.id),i.onDone(function(a){r.removeChild(i.id),r.send(Te(a,{origin:i.id}))}).start(),o},t.prototype.spawnBehavior=function(e,n){var r=yy(e,{id:n,parent:this});return this.children.set(n,r),r},t.prototype.spawnPromise=function(e,n){var r,i=this,s=!1,o;e.then(function(c){s||(o=c,i.removeChild(n),i.send(Te(js(n,c),{origin:n})))},function(c){if(!s){i.removeChild(n);var l=Jr(n,c);try{i.send(Te(l,{origin:n}))}catch{i.devTools&&i.devTools.send(l,i.state),i.machine.strict&&i.stop()}}});var a=(r={id:n,send:function(){},subscribe:function(c,l,u){var d=Ns(c,l,u),h=!1;return e.then(function(v){h||(d.next(v),!h&&d.complete())},function(v){h||d.error(v)}),{unsubscribe:function(){return h=!0}}},stop:function(){s=!0},toJSON:function(){return{id:n}},getSnapshot:function(){return o}},r[en]=function(){return this},r);return this.children.set(n,a),a},t.prototype.spawnCallback=function(e,n){var r,i=this,s=!1,o=new Set,a=new Set,c,l=function(h){c=h,a.forEach(function(v){return v(h)}),!s&&i.send(Te(h,{origin:n}))},u;try{u=e(l,function(h){o.add(h)})}catch(h){this.send(Jr(n,h))}if(Rl(u))return this.spawnPromise(u,n);var d=(r={id:n,send:function(h){return o.forEach(function(v){return v(h)})},subscribe:function(h){var v=Ns(h);return a.add(v.next),{unsubscribe:function(){a.delete(v.next)}}},stop:function(){s=!0,ie(u)&&u()},toJSON:function(){return{id:n}},getSnapshot:function(){return c}},r[en]=function(){return this},r);return this.children.set(n,d),d},t.prototype.spawnObservable=function(e,n){var r,i=this,s,o=e.subscribe(function(c){s=c,i.send(Te(c,{origin:n}))},function(c){i.removeChild(n),i.send(Te(Jr(n,c),{origin:n}))},function(){i.removeChild(n),i.send(Te(js(n),{origin:n}))}),a=(r={id:n,send:function(){},subscribe:function(c,l,u){return e.subscribe(c,l,u)},stop:function(){return o.unsubscribe()},getSnapshot:function(){return s},toJSON:function(){return{id:n}}},r[en]=function(){return this},r);return this.children.set(n,a),a},t.prototype.spawnActor=function(e,n){return this.children.set(n,e),e},t.prototype.spawnActivity=function(e){var n=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(n){var r=n(this.state.context,e);this.spawnEffect(e.id,r)}},t.prototype.spawnEffect=function(e,n){var r;this.children.set(e,(r={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:n||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}},r[en]=function(){return this},r))},t.prototype.attachDev=function(){var e=yc();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var n=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(I(I({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:I({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}vy(this)}},t.prototype.toJSON=function(){return{id:this.id}},t.prototype[en]=function(){return this},t.prototype.getSnapshot=function(){return this.status===xe.NotStarted?this.initialState:this._state},t.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,n){return setTimeout(e,n)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},t.interpret=kf,t}();function kf(t,e){var n=new wy(t,e);return n}function Sy(t){if(typeof t=="string"){var e={type:t};return e.toString=function(){return t},e}return t}function ss(t){return I(I({type:Ca},t),{toJSON:function(){t.onDone,t.onError;var e=hc(t,["onDone","onError"]);return I(I({},e),{type:Ca,src:Sy(t.src)})}})}var os="",Ta="#",Vo="*",Kn={},Qn=function(t){return t[0]===Ta},Cy=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},_y=function(){function t(e,n,r,i){r===void 0&&(r="context"in e?e.context:void 0);var s=this,o;this.config=e,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign(Cy(),n),this.parent=i==null?void 0:i.parent,this.key=this.config.key||(i==null?void 0:i.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:bf),this.id=this.config.id||he([this.machine.key],re(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(o=this.config.schema)!==null&&o!==void 0?o:{},this.description=this.config.description,this.initial=this.config.initial,this.states=this.config.states?Qr(this.config.states,function(l,u){var d,h=new t(l,{},void 0,{parent:s,key:u});return Object.assign(s.idMap,I((d={},d[h.id]=h,d),h.idMap)),h}):Kn;var a=0;function c(l){var u,d;l.order=a++;try{for(var h=Q(Tf(l)),v=h.next();!v.done;v=h.next()){var m=v.value;c(m)}}catch(f){u={error:f}}finally{try{v&&!v.done&&(d=h.return)&&d.call(h)}finally{if(u)throw u.error}}}c(this),this.history=this.config.history===!0?"shallow":this.config.history||!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(l){var u=l.event;return u===os}):os in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=ct(this.config.entry||this.config.onEntry).map(function(l){return gi(l)}),this.onExit=ct(this.config.exit||this.config.onExit).map(function(l){return gi(l)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=ct(this.config.invoke).map(function(l,u){var d,h;if(Or(l)){var v=rs(s.id,u);return s.machine.options.services=I((d={},d[v]=l,d),s.machine.options.services),ss({src:v,id:v})}else if(ce(l.src)){var v=l.id||rs(s.id,u);return ss(I(I({},l),{id:v,src:l.src}))}else if(Or(l.src)||ie(l.src)){var v=l.id||rs(s.id,u);return s.machine.options.services=I((h={},h[v]=l.src,h),s.machine.options.services),ss(I(I({id:v},l),{src:v}))}else{var m=l.src;return ss(I(I({id:rs(s.id,u)},l),{src:m}))}}),this.activities=ct(this.config.activities).concat(this.invoke).map(function(l){return vc(l)}),this.transition=this.transition.bind(this),this.tags=ct(this.config.tags)}return t.prototype._init=function(){this.__cache.transitions||Af(this).forEach(function(e){return e.on})},t.prototype.withConfig=function(e,n){var r=this.options,i=r.actions,s=r.activities,o=r.guards,a=r.services,c=r.delays;return new t(this.config,{actions:I(I({},i),e.actions),activities:I(I({},s),e.activities),guards:I(I({},o),e.guards),services:I(I({},a),e.services),delays:I(I({},c),e.delays)},n??this.context)},t.prototype.withContext=function(e){return new t(this.config,this.options,e)},Object.defineProperty(t.prototype,"context",{get:function(){return ie(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:Qr(this.states,function(e){return e.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return this.definition},Object.defineProperty(t.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce(function(n,r){return n[r.eventType]=n[r.eventType]||[],n[r.eventType].push(r),n},{})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),t.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var n=e===os,r=this.transitions.filter(function(i){var s=i.eventType===e;return n?s:s||i.eventType===Vo});return this.__cache.candidates[e]=r,r},t.prototype.getDelayedTransitions=function(){var e=this,n=this.config.after;if(!n)return[];var r=function(s,o){var a=ie(s)?"".concat(e.id,":delay[").concat(o,"]"):s,c=ry(a,e.id);return e.onEntry.push(K1(c,{delay:s})),e.onExit.push(X1(c)),c},i=Rr(n)?n.map(function(s,o){var a=r(s.delay,o);return I(I({},s),{event:a})}):ye(Object.keys(n).map(function(s,o){var a=n[s],c=ce(a)?{target:a}:a,l=isNaN(+s)?s:+s,u=r(l,o);return ct(c).map(function(d){return I(I({},d),{event:u,delay:l})})}));return i.map(function(s){var o=s.delay;return I(I({},e.formatTransition(s)),{delay:o})})},t.prototype.getStateNodes=function(e){var n,r=this;if(!e)return[];var i=e instanceof Ye?e.value:ri(e,this.delimiter);if(ce(i)){var s=this.getStateNode(i).initial;return s!==void 0?this.getStateNodes((n={},n[i]=s,n)):[this,this.states[i]]}var o=Object.keys(i),a=[this];return a.push.apply(a,he([],re(ye(o.map(function(c){return r.getStateNode(c).getStateNodes(i[c])}))),!1)),a},t.prototype.handles=function(e){var n=wf(e);return this.events.includes(n)},t.prototype.resolveState=function(e){var n=e instanceof Ye?e:Ye.create(e),r=Array.from(Xr([],this.getStateNodes(n.value)));return new Ye(I(I({},n),{value:this.resolve(n.value),configuration:r,done:Is(r,this),tags:Ml(r),machine:this.machine}))},t.prototype.transitionLeafNode=function(e,n,r){var i=this.getStateNode(e),s=i.next(n,r);return!s||!s.transitions.length?this.next(n,r):s},t.prototype.transitionCompoundNode=function(e,n,r){var i=Object.keys(e),s=this.getStateNode(i[0]),o=s._transition(e[i[0]],n,r);return!o||!o.transitions.length?this.next(n,r):o},t.prototype.transitionParallelNode=function(e,n,r){var i,s,o={};try{for(var a=Q(Object.keys(e)),c=a.next();!c.done;c=a.next()){var l=c.value,u=e[l];if(u){var d=this.getStateNode(l),h=d._transition(u,n,r);h&&(o[l]=h)}}}catch(y){i={error:y}}finally{try{c&&!c.done&&(s=a.return)&&s.call(a)}finally{if(i)throw i.error}}var v=Object.keys(o).map(function(y){return o[y]}),m=ye(v.map(function(y){return y.transitions})),f=v.some(function(y){return y.transitions.length>0});if(!f)return this.next(n,r);var w=ye(Object.keys(o).map(function(y){return o[y].configuration}));return{transitions:m,exitSet:ye(v.map(function(y){return y.exitSet})),configuration:w,source:n,actions:ye(Object.keys(o).map(function(y){return o[y].actions}))}},t.prototype._transition=function(e,n,r){return ce(e)?this.transitionLeafNode(e,n,r):Object.keys(e).length===1?this.transitionCompoundNode(e,n,r):this.transitionParallelNode(e,n,r)},t.prototype.getTransitionData=function(e,n){return this._transition(e.value,e,Te(n))},t.prototype.next=function(e,n){var r,i,s=this,o=n.name,a=[],c=[],l;try{for(var u=Q(this.getCandidates(o)),d=u.next();!d.done;d=u.next()){var h=d.value,v=h.cond,m=h.in,f=e.context,w=m?ce(m)&&Qn(m)?e.matches(ri(this.getStateNodeById(m).path,this.delimiter)):gc(ri(m,this.delimiter),I1(this.path.slice(0,-2))(e.value)):!0,y=!1;try{y=!v||Ef(this.machine,v,f,n,e)}catch(E){throw new Error("Unable to evaluate guard '".concat(v.name||v.type,"' in transition for event '").concat(o,"' in state node '").concat(this.id,`':
42
- `).concat(E.message))}if(y&&w){h.target!==void 0&&(c=h.target),a.push.apply(a,he([],re(h.actions),!1)),l=h;break}}}catch(E){r={error:E}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}if(l){if(!c.length)return{transitions:[l],exitSet:[],configuration:e.value?[this]:[],source:e,actions:a};var C=ye(c.map(function(E){return s.getRelativeStateNodes(E,e.historyValue)})),b=!!l.internal;return{transitions:[l],exitSet:b?[]:ye(c.map(function(E){return s.getPotentiallyReenteringNodes(E)})),configuration:C,source:e,actions:a}}},t.prototype.getPotentiallyReenteringNodes=function(e){if(this.order<e.order)return[this];for(var n=[],r=this,i=e;r&&r!==i;)n.push(r),r=r.parent;return r!==i?[]:(n.push(i),n)},t.prototype.getActions=function(e,n,r,i,s,o,a){var c,l,u,d,h=this,v=o?Xr([],this.getStateNodes(o.value)):[],m=new Set;try{for(var f=Q(Array.from(e).sort(function(R,A){return R.order-A.order})),w=f.next();!w.done;w=f.next()){var y=w.value;(!Yr(v,y)||Yr(r.exitSet,y)||y.parent&&m.has(y.parent))&&m.add(y)}}catch(R){c={error:R}}finally{try{w&&!w.done&&(l=f.return)&&l.call(f)}finally{if(c)throw c.error}}try{for(var C=Q(v),b=C.next();!b.done;b=C.next()){var y=b.value;(!Yr(e,y)||Yr(r.exitSet,y.parent))&&r.exitSet.push(y)}}catch(R){u={error:R}}finally{try{b&&!b.done&&(d=C.return)&&d.call(C)}finally{if(u)throw u.error}}r.exitSet.sort(function(R,A){return A.order-R.order});var E=Array.from(m).sort(function(R,A){return R.order-A.order}),x=new Set(r.exitSet),g=ye(E.map(function(R){var A=[];if(R.type!=="final")return A;var M=R.parent;if(!M.parent)return A;A.push(is(R.id,R.doneData),is(M.id,R.doneData?Ws(R.doneData,i,s):void 0));var j=M.parent;return j.type==="parallel"&&vi(j).every(function(F){return Is(r.configuration,F)})&&A.push(is(j.id)),A})),_=E.map(function(R){var A=R.onEntry,M=R.activities.map(function(j){return Y1(j)});return{type:"entry",actions:tn(a?he(he([],re(A),!1),re(M),!1):he(he([],re(M),!1),re(A),!1),h.machine.options.actions)}}).concat({type:"state_done",actions:g.map(function(R){return W1(R)})}),O=Array.from(x).map(function(R){return{type:"exit",actions:tn(he(he([],re(R.onExit),!1),re(R.activities.map(function(A){return ey(A)})),!1),h.machine.options.actions)}}),T=O.concat({type:"transition",actions:tn(r.actions,this.machine.options.actions)}).concat(_);if(n){var L=tn(ye(he([],re(e),!1).sort(function(R,A){return A.order-R.order}).map(function(R){return R.onExit})),this.machine.options.actions).filter(function(R){return!xa(R)});return T.concat({type:"stop",actions:L})}return T},t.prototype.transition=function(e,n,r,i){e===void 0&&(e=this.initialState);var s=Te(n),o;if(e instanceof Ye)o=r===void 0?e:this.resolveState(Ye.from(e,r));else{var a=ce(e)?this.resolve(Gs(this.getResolvedPath(e))):this.resolve(e),c=r??this.machine.context;o=this.resolveState(Ye.from(a,c))}if(this.strict&&!this.events.includes(s.name)&&!B1(s.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(s.name,"'"));var l=this._transition(o.value,o,s)||{transitions:[],configuration:[],exitSet:[],source:o,actions:[]},u=Xr([],this.getStateNodes(o.value)),d=l.configuration.length?Xr(u,l.configuration):u;return l.configuration=he([],re(d),!1),this.resolveTransition(l,o,o.context,i,s)},t.prototype.resolveRaisedTransition=function(e,n,r,i){var s,o=e.actions;return e=this.transition(e,n,void 0,i),e._event=r,e.event=r.data,(s=e.actions).unshift.apply(s,he([],re(o),!1)),e},t.prototype.resolveTransition=function(e,n,r,i,s){var o,a,c,l,u=this;s===void 0&&(s=sr);var d=e.configuration,h=!n||e.transitions.length>0,v=h?e.configuration:n?n.configuration:[],m=Is(v,this),f=h?ly(this.machine,d):void 0,w=n?n.historyValue?n.historyValue:e.source?this.machine.historyValue(n.value):void 0:void 0,y=this.getActions(new Set(v),m,e,r,s,n,i),C=n?I({},n.activities):{};try{for(var b=Q(y),E=b.next();!E.done;E=b.next()){var x=E.value;try{for(var g=(c=void 0,Q(x.actions)),_=g.next();!_.done;_=g.next()){var O=_.value;O.type===Sa?C[O.activity.id||O.activity.type]=O:O.type===pc&&(C[O.activity.id||O.activity.type]=!1)}}catch(Ee){c={error:Ee}}finally{try{_&&!_.done&&(l=g.return)&&l.call(g)}finally{if(c)throw c.error}}}}catch(Ee){o={error:Ee}}finally{try{E&&!E.done&&(a=b.return)&&a.call(b)}finally{if(o)throw o.error}}var T=re(Zs(this,n,r,s,y,i,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),L=T[0],R=T[1],A=re(H1(L,xa),2),M=A[0],j=A[1],F=L.filter(function(Ee){var me;return Ee.type===Sa&&((me=Ee.activity)===null||me===void 0?void 0:me.type)===Ca}),G=F.reduce(function(Ee,me){return Ee[me.activity.id]=sy(me.activity,u.machine,R,s),Ee},n?I({},n.children):{}),B=new Ye({value:f||n.value,context:R,_event:s,_sessionid:n?n._sessionid:null,historyValue:f?w?U1(w,f):void 0:n?n.historyValue:void 0,history:!f||e.source?n:void 0,actions:f?j:[],activities:f?C:n?n.activities:{},events:[],configuration:v,transitions:e.transitions,children:G,done:m,tags:Ml(v),machine:this}),z=r!==R;B.changed=s.name===yf||z;var se=B.history;se&&delete se.history;var X=!m&&(this._transient||d.some(function(Ee){return Ee._transient}));if(!h&&(!X||s.name===os))return B;var le=B;if(!m)for(X&&(le=this.resolveRaisedTransition(le,{type:L1},s,i));M.length;){var Y=M.shift();le=this.resolveRaisedTransition(le,Y._event,s,i)}var Ne=le.changed||(se?!!le.actions.length||z||typeof se.value!=typeof le.value||!Rf(le.value,se.value):void 0);return le.changed=Ne,le.history=se,le},t.prototype.getStateNode=function(e){if(Qn(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var n=this.states[e];if(!n)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return n},t.prototype.getStateNodeById=function(e){var n=Qn(e)?e.slice(Ta.length):e;if(n===this.id)return this;var r=this.machine.idMap[n];if(!r)throw new Error("Child state node '#".concat(n,"' does not exist on machine '").concat(this.id,"'"));return r},t.prototype.getStateNodeByPath=function(e){if(typeof e=="string"&&Qn(e))try{return this.getStateNodeById(e.slice(1))}catch{}for(var n=Ea(e,this.delimiter).slice(),r=this;n.length;){var i=n.shift();if(!i.length)break;r=r.getStateNode(i)}return r},t.prototype.resolve=function(e){var n,r=this;if(!e)return this.initialStateValue||Kn;switch(this.type){case"parallel":return Qr(this.initialStateValue,function(s,o){return s?r.getStateNode(o).resolve(e[o]||s):Kn});case"compound":if(ce(e)){var i=this.getStateNode(e);return i.type==="parallel"||i.type==="compound"?(n={},n[e]=i.initialStateValue,n):e}return Object.keys(e).length?Qr(e,function(s,o){return s?r.getStateNode(o).resolve(s):Kn}):this.initialStateValue||{};default:return e||Kn}},t.prototype.getResolvedPath=function(e){if(Qn(e)){var n=this.machine.idMap[e.slice(Ta.length)];if(!n)throw new Error("Unable to find state node '".concat(e,"'"));return n.path}return Ea(e,this.delimiter)},Object.defineProperty(t.prototype,"initialStateValue",{get:function(){var e;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var n;if(this.type==="parallel")n=Ll(this.states,function(r){return r.initialStateValue||Kn},function(r){return r.type!=="history"});else if(this.initial!==void 0){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));n=Ks(this.states[this.initial])?this.initial:(e={},e[this.initial]=this.states[this.initial].initialStateValue,e)}else n={};return this.__cache.initialStateValue=n,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),t.prototype.getInitialState=function(e,n){this._init();var r=this.getStateNodes(e);return this.resolveTransition({configuration:r,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,n??this.machine.context,void 0)},Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){var e;if(this.type==="history"){var n=this.config;ce(n.target)?e=Qn(n.target)?Gs(this.machine.getStateNodeById(n.target).path.slice(this.path.length-1)):n.target:e=n.target}return e},enumerable:!1,configurable:!0}),t.prototype.getRelativeStateNodes=function(e,n,r){return r===void 0&&(r=!0),r?e.type==="history"?e.resolveHistory(n):e.initialStateNodes:[e]},Object.defineProperty(t.prototype,"initialStateNodes",{get:function(){var e=this;if(Ks(this))return[this];if(this.type==="compound"&&!this.initial)return[this];var n=Ds(this.initialStateValue);return ye(n.map(function(r){return e.getFromRelativePath(r)}))},enumerable:!1,configurable:!0}),t.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var n=re(e),r=n[0],i=n.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(r,"' from node with no states"));var s=this.getStateNode(r);if(s.type==="history")return s.resolveHistory();if(!this.states[r])throw new Error("Child state '".concat(r,"' does not exist on '").concat(this.id,"'"));return this.states[r].getFromRelativePath(i)},t.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:Ll(this.states,function(n,r){if(!e)return n.historyValue();var i=ce(e)?void 0:e[r];return n.historyValue(i||n.initialStateValue)},function(n){return!n.history})}},t.prototype.resolveHistory=function(e){var n=this;if(this.type!=="history")return[this];var r=this.parent;if(!e){var i=this.target;return i?ye(Ds(i).map(function(o){return r.getFromRelativePath(o)})):r.initialStateNodes}var s=F1(r.path,"states")(e).current;return ce(s)?[r.getStateNode(s)]:ye(Ds(s).map(function(o){return n.history==="deep"?r.getFromRelativePath(o):[r.states[o[0]]]}))},Object.defineProperty(t.prototype,"stateIds",{get:function(){var e=this,n=ye(Object.keys(this.states).map(function(r){return e.states[r].stateIds}));return[this.id].concat(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"events",{get:function(){var e,n,r,i;if(this.__cache.events)return this.__cache.events;var s=this.states,o=new Set(this.ownEvents);if(s)try{for(var a=Q(Object.keys(s)),c=a.next();!c.done;c=a.next()){var l=c.value,u=s[l];if(u.states)try{for(var d=(r=void 0,Q(u.events)),h=d.next();!h.done;h=d.next()){var v=h.value;o.add("".concat(v))}}catch(m){r={error:m}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}}}catch(m){e={error:m}}finally{try{c&&!c.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(o)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter(function(n){return!(!n.target&&!n.actions.length&&n.internal)}).map(function(n){return n.eventType}));return Array.from(e)},enumerable:!1,configurable:!0}),t.prototype.resolveTarget=function(e){var n=this;if(e!==void 0)return e.map(function(r){if(!ce(r))return r;var i=r[0]===n.delimiter;if(i&&!n.parent)return n.getStateNodeByPath(r.slice(1));var s=i?n.key+r:r;if(n.parent)try{var o=n.parent.getStateNodeByPath(s);return o}catch(a){throw new Error("Invalid transition definition for state node '".concat(n.id,`':
43
- `).concat(a.message))}else return n.getStateNodeByPath(s)})},t.prototype.formatTransition=function(e){var n=this,r=G1(e.target),i="internal"in e?e.internal:r?r.some(function(c){return ce(c)&&c[0]===n.delimiter}):!0,s=this.machine.options.guards,o=this.resolveTarget(r),a=I(I({},e),{actions:tn(ct(e.actions)),cond:_f(e.cond,s),target:o,source:this,internal:i,eventType:e.event,toJSON:function(){return I(I({},a),{target:a.target?a.target.map(function(c){return"#".concat(c.id)}):void 0,source:"#".concat(n.id)})}});return a},t.prototype.formatTransitions=function(){var e,n,r=this,i;if(!this.config.on)i=[];else if(Array.isArray(this.config.on))i=this.config.on;else{var s=this.config.on,o=Vo,a=s[o],c=a===void 0?[]:a,l=hc(s,[typeof o=="symbol"?o:o+""]);i=ye(Object.keys(l).map(function(C){var b=Zn(C,l[C]);return b}).concat(Zn(Vo,c)))}var u=this.config.always?Zn("",this.config.always):[],d=this.config.onDone?Zn(String(is(this.id)),this.config.onDone):[],h=ye(this.invoke.map(function(C){var b=[];return C.onDone&&b.push.apply(b,he([],re(Zn(String(js(C.id)),C.onDone)),!1)),C.onError&&b.push.apply(b,he([],re(Zn(String(Jr(C.id)),C.onError)),!1)),b})),v=this.after,m=ye(he(he(he(he([],re(d),!1),re(h),!1),re(i),!1),re(u),!1).map(function(C){return ct(C).map(function(b){return r.formatTransition(b)})}));try{for(var f=Q(v),w=f.next();!w.done;w=f.next()){var y=w.value;m.push(y)}}catch(C){e={error:C}}finally{try{w&&!w.done&&(n=f.return)&&n.call(f)}finally{if(e)throw e.error}}return m},t}();function Ey(t,e,n){return n===void 0&&(n=t.context),new _y(t,e,n)}var xy=ny,Aa;(function(t){t[t.Effect=1]="Effect",t[t.LayoutEffect=2]="LayoutEffect"})(Aa||(Aa={}));var ii=p.useLayoutEffect;function Nl(t){var e=N.useRef();return e.current||(e.current={v:t()}),e.current.v}var Oy=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},Py=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Ty(t,e){var n,r,i=Oy([[],[]],2),s=i[0],o=i[1];try{for(var a=Py(t),c=a.next();!c.done;c=a.next()){var l=c.value;e(l)?s.push(l):o.push(l)}}catch(u){n={error:u}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[s,o]}var Ur=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},jl=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,s;r<i;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return t.concat(s||Array.prototype.slice.call(e))};function Il(t,e){var n=t.exec,r=n(e.context,e._event.data,{action:t,state:e,_event:e._event});r()}function Ay(t){var e=p.useRef([]),n=p.useRef([]);ii(function(){var r=t.subscribe(function(i){var s,o;if(i.actions.length){var a=i.actions.filter(function(d){return typeof d.exec=="function"&&"__effect"in d.exec}),c=Ur(Ty(a,function(d){return d.exec.__effect===Aa.Effect}),2),l=c[0],u=c[1];(s=e.current).push.apply(s,jl([],Ur(l.map(function(d){return[d,i]})),!1)),(o=n.current).push.apply(o,jl([],Ur(u.map(function(d){return[d,i]})),!1))}});return function(){r.unsubscribe()}},[]),ii(function(){for(;n.current.length;){var r=Ur(n.current.shift(),2),i=r[0],s=r[1];Il(i,s)}}),p.useEffect(function(){for(;e.current.length;){var r=Ur(e.current.shift(),2),i=r[0],s=r[1];Il(i,s)}})}var si=function(){return si=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},si.apply(this,arguments)},Ly=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Ry(t,e,n){if(typeof t=="object")return t;var r=function(){};return{next:t,error:e||r,complete:n||r}}function ky(t,e,n){e===void 0&&(e={});var r=Nl(function(){return typeof t=="function"?t():t}),i=e.context,s=e.guards,o=e.actions,a=e.activities,c=e.services,l=e.delays,u=e.state,d=Ly(e,["context","guards","actions","activities","services","delays","state"]),h=Nl(function(){var v={context:i,guards:s,actions:o,activities:a,services:c,delays:l},m=r.withConfig(v,function(){return si(si({},r.context),i)});return kf(m,si({deferEvents:!0},d))});return ii(function(){var v;return n&&(v=h.subscribe(Ry(n))),function(){v==null||v.unsubscribe()}},[n]),ii(function(){return h.start(u?Ye.create(u):void 0),function(){h.stop()}},[]),ii(function(){Object.assign(h.machine.options.actions,o),Object.assign(h.machine.options.guards,s),Object.assign(h.machine.options.activities,a),Object.assign(h.machine.options.services,c),Object.assign(h.machine.options.delays,l)},[o,s,a,c,l]),Ay(h),h}var My=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s};function Dy(t,e){e===void 0&&(e={});var n=p.useCallback(function(a){var c=a.changed===void 0&&Object.keys(a.children).length;(a.changed||c)&&o(a)},[]),r=ky(t,e,n),i=My(p.useState(function(){var a=r.machine.initialState;return e.state?Ye.create(e.state):a}),2),s=i[0],o=i[1];return[s,r.send,r]}function we(){return we=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},we.apply(this,arguments)}function or(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}const W={arr:Array.isArray,obj:t=>Object.prototype.toString.call(t)==="[object Object]",fun:t=>typeof t=="function",str:t=>typeof t=="string",num:t=>typeof t=="number",und:t=>t===void 0,nul:t=>t===null,set:t=>t instanceof Set,map:t=>t instanceof Map,equ(t,e){if(typeof t!=typeof e)return!1;if(W.str(t)||W.num(t))return t===e;if(W.obj(t)&&W.obj(e)&&Object.keys(t).length+Object.keys(e).length===0)return!0;let n;for(n in t)if(!(n in e))return!1;for(n in e)if(t[n]!==e[n])return!1;return W.und(n)?t===e:!0}};function Ny(t,e){return e===void 0&&(e=!0),n=>(W.arr(n)?n:Object.keys(n)).reduce((r,i)=>{const s=e?i[0].toLowerCase()+i.substring(1):i;return r[s]=t(s),r},t)}function jy(){const t=p.useState(!1),e=t[1];return p.useCallback(()=>e(r=>!r),[])}function vn(t,e){return W.und(t)||W.nul(t)?e:t}function as(t){return W.und(t)?[]:W.arr(t)?t:[t]}function rr(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return W.fun(t)?t(...n):t}function Iy(t){return t.to,t.from,t.config,t.onStart,t.onRest,t.onFrame,t.children,t.reset,t.reverse,t.force,t.immediate,t.delay,t.attach,t.destroyed,t.interpolateTo,t.ref,t.lazy,or(t,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}function Ho(t){const e=Iy(t);if(W.und(e))return we({to:e},t);const n=Object.keys(t).reduce((r,i)=>W.und(e[i])?we({},r,{[i]:t[i]}):r,{});return we({to:e},n)}function Fy(t,e){return e&&(W.fun(e)?e(t):W.obj(e)&&(e.current=t)),t}class dt{constructor(){this.payload=void 0,this.children=[]}getAnimatedValue(){return this.getValue()}getPayload(){return this.payload||this}attach(){}detach(){}getChildren(){return this.children}addChild(e){this.children.length===0&&this.attach(),this.children.push(e)}removeChild(e){const n=this.children.indexOf(e);this.children.splice(n,1),this.children.length===0&&this.detach()}}class La extends dt{constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach(e=>e instanceof dt&&e.addChild(this)),this.detach=()=>this.payload.forEach(e=>e instanceof dt&&e.removeChild(this))}}class Mf extends dt{constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach(e=>e instanceof dt&&e.addChild(this)),this.detach=()=>Object.values(this.payload).forEach(e=>e instanceof dt&&e.removeChild(this))}getValue(e){e===void 0&&(e=!1);const n={};for(const r in this.payload){const i=this.payload[r];e&&!(i instanceof dt)||(n[r]=i instanceof dt?i[e?"getAnimatedValue":"getValue"]():i)}return n}getAnimatedValue(){return this.getValue(!0)}}let bc;function By(t,e){bc={fn:t,transform:e}}let Df;function Vy(t){Df=t}let Nf=t=>typeof window<"u"?window.requestAnimationFrame(t):-1,Qs;function Hy(t){Qs=t}let jf=()=>Date.now(),Uy=t=>t.current,If;function $y(t){If=t}class zy extends Mf{constructor(e,n){super(),this.update=void 0,this.payload=e.style?we({},e,{style:If(e.style)}):e,this.update=n,this.attach()}}const qy=t=>W.fun(t)&&!(t.prototype instanceof p.Component),Gy=t=>p.forwardRef((n,r)=>{const i=jy(),s=p.useRef(!0),o=p.useRef(null),a=p.useRef(null),c=p.useCallback(h=>{const v=o.current,m=()=>{let f=!1;a.current&&(f=bc.fn(a.current,o.current.getAnimatedValue())),(!a.current||f===!1)&&i()};o.current=new zy(h,m),v&&v.detach()},[]);p.useEffect(()=>()=>{s.current=!1,o.current&&o.current.detach()},[]),p.useImperativeHandle(r,()=>Uy(a)),c(n);const l=o.current.getValue();l.scrollTop,l.scrollLeft;const u=or(l,["scrollTop","scrollLeft"]),d=qy(t)?void 0:h=>a.current=Fy(h,r);return p.createElement(t,we({},u,{ref:d}))});let oi=!1;const kn=new Set,Ff=()=>{if(!oi)return!1;let t=jf();for(let e of kn){let n=!1;for(let r=0;r<e.configs.length;r++){let i=e.configs[r],s,o;for(let a=0;a<i.animatedValues.length;a++){let c=i.animatedValues[a];if(c.done)continue;let l=i.fromValues[a],u=i.toValues[a],d=c.lastPosition,h=u instanceof dt,v=Array.isArray(i.initialVelocity)?i.initialVelocity[a]:i.initialVelocity;if(h&&(u=u.getValue()),i.immediate){c.setValue(u),c.done=!0;continue}if(typeof l=="string"||typeof u=="string"){c.setValue(u),c.done=!0;continue}if(i.duration!==void 0)d=l+i.easing((t-c.startTime)/i.duration)*(u-l),s=t>=c.startTime+i.duration;else if(i.decay)d=l+v/(1-.998)*(1-Math.exp(-(1-.998)*(t-c.startTime))),s=Math.abs(c.lastPosition-d)<.1,s&&(u=d);else{o=c.lastTime!==void 0?c.lastTime:t,v=c.lastVelocity!==void 0?c.lastVelocity:i.initialVelocity,t>o+64&&(o=t);let m=Math.floor(t-o);for(let C=0;C<m;++C){let b=-i.tension*(d-u),E=-i.friction*v,x=(b+E)/i.mass;v=v+x*1/1e3,d=d+v*1/1e3}let f=i.clamp&&i.tension!==0?l<u?d>u:d<u:!1,w=Math.abs(v)<=i.precision,y=i.tension!==0?Math.abs(u-d)<=i.precision:!0;s=f||w&&y,c.lastVelocity=v,c.lastTime=t}h&&!i.toValues[a].done&&(s=!1),s?(c.value!==u&&(d=u),c.done=!0):n=!0,c.setValue(d),c.lastPosition=d}e.props.onFrame&&(e.values[i.name]=i.interpolation.getValue())}e.props.onFrame&&e.props.onFrame(e.values),n||(kn.delete(e),e.stop(!0))}return kn.size?Nf(Ff):oi=!1,oi},Wy=t=>{kn.has(t)||kn.add(t),oi||(oi=!0,Nf(Ff))},Zy=t=>{kn.has(t)&&kn.delete(t)};function Js(t,e,n){if(typeof t=="function")return t;if(Array.isArray(t))return Js({range:t,output:e,extrapolate:n});if(Qs&&typeof t.output[0]=="string")return Qs(t);const r=t,i=r.output,s=r.range||[0,1],o=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",c=r.easing||(l=>l);return l=>{const u=Qy(l,s);return Ky(l,s[u],s[u+1],i[u],i[u+1],c,o,a,r.map)}}function Ky(t,e,n,r,i,s,o,a,c){let l=c?c(t):t;if(l<e){if(o==="identity")return l;o==="clamp"&&(l=e)}if(l>n){if(a==="identity")return l;a==="clamp"&&(l=n)}return r===i?r:e===n?t<=e?r:i:(e===-1/0?l=-l:n===1/0?l=l-e:l=(l-e)/(n-e),l=s(l),r===-1/0?l=-l:i===1/0?l=l+r:l=l*(i-r)+r,l)}function Qy(t,e){for(var n=1;n<e.length-1&&!(e[n]>=t);++n);return n-1}class Pr extends La{constructor(e,n,r,i){super(),this.calc=void 0,this.payload=e instanceof La&&!(e instanceof Pr)?e.getPayload():Array.isArray(e)?e:[e],this.calc=Js(n,r,i)}getValue(){return this.calc(...this.payload.map(e=>e.getValue()))}updateConfig(e,n,r){this.calc=Js(e,n,r)}interpolate(e,n,r){return new Pr(this,e,n,r)}}const Jn=(t,e,n)=>t&&new Pr(t,e,n),Jy={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}};function Bf(t,e){"update"in t?e.add(t):t.getChildren().forEach(n=>Bf(n,e))}class Ra extends dt{constructor(e){var n;super(),n=this,this.animatedStyles=new Set,this.value=void 0,this.startPosition=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.startTime=void 0,this.lastTime=void 0,this.done=!1,this.setValue=function(r,i){i===void 0&&(i=!0),n.value=r,i&&n.flush()},this.value=e,this.startPosition=e,this.lastPosition=e}flush(){this.animatedStyles.size===0&&Bf(this,this.animatedStyles),this.animatedStyles.forEach(e=>e.update())}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,n,r){return new Pr(this,e,n,r)}}class Xy extends La{constructor(e){super(),this.payload=e.map(n=>new Ra(n))}setValue(e,n){n===void 0&&(n=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((r,i)=>this.payload[i].setValue(r,n)):this.payload.forEach(r=>r.setValue(e,n))}getValue(){return this.payload.map(e=>e.getValue())}interpolate(e,n){return new Pr(this,e,n)}}let Yy=0,e2=class{constructor(){this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=()=>this.interpolations,this.id=Yy++}update(e){if(!e)return this;const n=Ho(e),r=n.delay,i=r===void 0?0:r,s=n.to,o=or(n,["delay","to"]);if(W.arr(s)||W.fun(s))this.queue.push(we({},o,{delay:i,to:s}));else if(s){let a={};Object.entries(s).forEach(c=>{let l=c[0],u=c[1];const d=we({to:{[l]:u},delay:rr(i,l)},o),h=a[d.delay]&&a[d.delay].to;a[d.delay]=we({},a[d.delay],d,{to:we({},h,d.to)})}),this.queue=Object.values(a)}return this.queue=this.queue.sort((a,c)=>a.delay-c.delay),this.diff(o),this}start(e){if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach(i=>{let s=i.from,o=s===void 0?{}:s,a=i.to,c=a===void 0?{}:a;W.obj(o)&&(this.merged=we({},o,this.merged)),W.obj(c)&&(this.merged=we({},this.merged,c))});const n=this.local=++this.guid,r=this.localQueue=this.queue;this.queue=[],r.forEach((i,s)=>{let o=i.delay,a=or(i,["delay"]);const c=u=>{s===r.length-1&&n===this.guid&&u&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),e&&e()};let l=W.arr(a.to)||W.fun(a.to);o?setTimeout(()=>{n===this.guid&&(l?this.runAsync(a,c):this.diff(a).start(c))},o):l?this.runAsync(a,c):this.diff(a).start(c)})}else W.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),Wy(this);return this}stop(e){return this.listeners.forEach(n=>n(e)),this.listeners=[],this}pause(e){return this.stop(!0),e&&Zy(this),this}runAsync(e,n){var r=this;e.delay;let i=or(e,["delay"]);const s=this.local;let o=Promise.resolve(void 0);if(W.arr(i.to))for(let a=0;a<i.to.length;a++){const c=a,l=we({},i,Ho(i.to[c]));W.arr(l.config)&&(l.config=l.config[c]),o=o.then(()=>{if(s===this.guid)return new Promise(u=>this.diff(l).start(u))})}else if(W.fun(i.to)){let a=0,c;o=o.then(()=>i.to(l=>{const u=we({},i,Ho(l));if(W.arr(u.config)&&(u.config=u.config[a]),a++,s===this.guid)return c=new Promise(d=>this.diff(u).start(d))},function(l){return l===void 0&&(l=!0),r.stop(l)}).then(()=>c))}o.then(n)}diff(e){this.props=we({},this.props,e);let n=this.props,r=n.from,i=r===void 0?{}:r,s=n.to,o=s===void 0?{}:s,a=n.config,c=a===void 0?{}:a,l=n.reverse,u=n.attach,d=n.reset,h=n.immediate;if(l){var v=[o,i];i=v[0],o=v[1]}this.merged=we({},i,this.merged,o),this.hasChanged=!1;let m=u&&u(this);if(this.animations=Object.entries(this.merged).reduce((f,w)=>{let y=w[0],C=w[1],b=f[y]||{};const E=W.num(C),x=W.str(C)&&!C.startsWith("#")&&!/\d/.test(C)&&!Df[C],g=W.arr(C),_=!E&&!g&&!x;let O=W.und(i[y])?C:i[y],T=E||g||x?C:1,L=rr(c,y);m&&(T=m.animations[y].parent);let R=b.parent,A=b.interpolation,M=as(m?T.getPayload():T),j,F=C;_&&(F=Qs({range:[0,1],output:[C,C]})(1));let G=A&&A.getValue();const z=!W.und(R)&&b.animatedValues.some(Y=>!Y.done),se=!W.equ(F,G),X=!W.equ(F,b.previous),le=!W.equ(L,b.config);if(d||X&&se||le){if(E||x)R=A=b.parent||new Ra(O);else if(g)R=A=b.parent||new Xy(O);else if(_){let Y=b.interpolation&&b.interpolation.calc(b.parent.value);Y=Y!==void 0&&!d?Y:O,b.parent?(R=b.parent,R.setValue(0,!1)):R=new Ra(0);const Ne={output:[Y,C]};b.interpolation?(A=b.interpolation,b.interpolation.updateConfig(Ne)):A=R.interpolate(Ne)}return M=as(m?T.getPayload():T),j=as(R.getPayload()),d&&!_&&R.setValue(O,!1),this.hasChanged=!0,j.forEach(Y=>{Y.startPosition=Y.value,Y.lastPosition=Y.value,Y.lastVelocity=z?Y.lastVelocity:void 0,Y.lastTime=z?Y.lastTime:void 0,Y.startTime=jf(),Y.done=!1,Y.animatedStyles.clear()}),rr(h,y)&&R.setValue(_?T:C,!1),we({},f,{[y]:we({},b,{name:y,parent:R,interpolation:A,animatedValues:j,toValues:M,previous:F,config:L,fromValues:as(R.getValue()),immediate:rr(h,y),initialVelocity:vn(L.velocity,0),clamp:vn(L.clamp,!1),precision:vn(L.precision,.01),tension:vn(L.tension,170),friction:vn(L.friction,26),mass:vn(L.mass,1),duration:L.duration,easing:vn(L.easing,Y=>Y),decay:L.decay})})}else return se?f:(_&&(R.setValue(1,!1),A.updateConfig({output:[F,F]})),R.done=!0,this.hasChanged=!0,we({},f,{[y]:we({},f[y],{previous:F})}))},this.animations),this.hasChanged){this.configs=Object.values(this.animations),this.values={},this.interpolations={};for(let f in this.animations)this.interpolations[f]=this.animations[f].interpolation,this.values[f]=this.animations[f].interpolation.getValue()}return this}destroy(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0}};const t2=(t,e)=>{const n=p.useRef(!1),r=p.useRef(),i=W.fun(e),s=p.useMemo(()=>{r.current&&(r.current.map(d=>d.destroy()),r.current=void 0);let u;return[new Array(t).fill().map((d,h)=>{const v=new e2,m=i?rr(e,h,v):e[h];return h===0&&(u=m.ref),v.update(m),u||v.start(),v}),u]},[t]),o=s[0],a=s[1];r.current=o,p.useImperativeHandle(a,()=>({start:()=>Promise.all(r.current.map(u=>new Promise(d=>u.start(d)))),stop:u=>r.current.forEach(d=>d.stop(u)),get controllers(){return r.current}}));const c=p.useMemo(()=>u=>r.current.map((d,h)=>{d.update(i?rr(u,h,d):u[h]),a||d.start()}),[t]);p.useEffect(()=>{n.current?i||c(e):a||r.current.forEach(u=>u.start())}),p.useEffect(()=>(n.current=!0,()=>r.current.forEach(u=>u.destroy())),[]);const l=r.current.map(u=>u.getValues());return i?[l,c,u=>r.current.forEach(d=>d.pause(u))]:l},n2=t=>{const e=W.fun(t),n=t2(1,e?t:[t]),r=n[0],i=n[1],s=n[2];return e?[r[0],i,s]:r};class r2 extends Mf{constructor(e){e===void 0&&(e={}),super(),e.transform&&!(e.transform instanceof dt)&&(e=bc.transform(e)),this.payload=e}}const Xs={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},ft="[-+]?\\d*\\.?\\d+",Ys=ft+"%";function bo(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}const i2=new RegExp("rgb"+bo(ft,ft,ft)),s2=new RegExp("rgba"+bo(ft,ft,ft,ft)),o2=new RegExp("hsl"+bo(ft,Ys,Ys)),a2=new RegExp("hsla"+bo(ft,Ys,Ys,ft)),c2=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,l2=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,u2=/^#([0-9a-fA-F]{6})$/,d2=/^#([0-9a-fA-F]{8})$/;function f2(t){let e;return typeof t=="number"?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=u2.exec(t))?parseInt(e[1]+"ff",16)>>>0:Xs.hasOwnProperty(t)?Xs[t]:(e=i2.exec(t))?(Xn(e[1])<<24|Xn(e[2])<<16|Xn(e[3])<<8|255)>>>0:(e=s2.exec(t))?(Xn(e[1])<<24|Xn(e[2])<<16|Xn(e[3])<<8|Vl(e[4]))>>>0:(e=c2.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=d2.exec(t))?parseInt(e[1],16)>>>0:(e=l2.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=o2.exec(t))?(Fl(Bl(e[1]),cs(e[2]),cs(e[3]))|255)>>>0:(e=a2.exec(t))?(Fl(Bl(e[1]),cs(e[2]),cs(e[3]))|Vl(e[4]))>>>0:null}function Uo(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Fl(t,e,n){const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,s=Uo(i,r,t+1/3),o=Uo(i,r,t),a=Uo(i,r,t-1/3);return Math.round(s*255)<<24|Math.round(o*255)<<16|Math.round(a*255)<<8}function Xn(t){const e=parseInt(t,10);return e<0?0:e>255?255:e}function Bl(t){return(parseFloat(t)%360+360)%360/360}function Vl(t){const e=parseFloat(t);return e<0?0:e>1?255:Math.round(e*255)}function cs(t){const e=parseFloat(t);return e<0?0:e>100?1:e/100}function Hl(t){let e=f2(t);if(e===null)return t;e=e||0;let n=(e&4278190080)>>>24,r=(e&16711680)>>>16,i=(e&65280)>>>8,s=(e&255)/255;return`rgba(${n}, ${r}, ${i}, ${s})`}const ls=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,h2=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,p2=new RegExp(`(${Object.keys(Xs).join("|")})`,"g"),m2=t=>{const e=t.output.map(i=>i.replace(h2,Hl)).map(i=>i.replace(p2,Hl)),n=e[0].match(ls).map(()=>[]);e.forEach(i=>{i.match(ls).forEach((s,o)=>n[o].push(+s))});const r=e[0].match(ls).map((i,s)=>Js(we({},t,{output:n[s]})));return i=>{let s=0;return e[0].replace(ls,()=>r[s++](i)).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(o,a,c,l,u)=>`rgba(${Math.round(a)}, ${Math.round(c)}, ${Math.round(l)}, ${u})`)}};let ai={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const g2=(t,e)=>t+e.charAt(0).toUpperCase()+e.substring(1),v2=["Webkit","Ms","Moz","O"];ai=Object.keys(ai).reduce((t,e)=>(v2.forEach(n=>t[g2(n,e)]=t[e]),t),ai);function y2(t,e,n){return e==null||typeof e=="boolean"||e===""?"":!n&&typeof e=="number"&&e!==0&&!(ai.hasOwnProperty(t)&&ai[t])?e+"px":(""+e).trim()}const Ul={};$y(t=>new r2(t));Hy(m2);Vy(Xs);By((t,e)=>{if(t.nodeType&&t.setAttribute!==void 0){const i=e.style,s=e.children,o=e.scrollTop,a=e.scrollLeft,c=or(e,["style","children","scrollTop","scrollLeft"]),l=t.nodeName==="filter"||t.parentNode&&t.parentNode.nodeName==="filter";o!==void 0&&(t.scrollTop=o),a!==void 0&&(t.scrollLeft=a),s!==void 0&&(t.textContent=s);for(let u in i)if(i.hasOwnProperty(u)){var n=u.indexOf("--")===0,r=y2(u,i[u],n);u==="float"&&(u="cssFloat"),n?t.style.setProperty(u,r):t.style[u]=r}for(let u in c){const d=l?u:Ul[u]||(Ul[u]=u.replace(/([A-Z])/g,h=>"-"+h.toLowerCase()));typeof t.getAttribute(d)<"u"&&t.setAttribute(d,c[u])}return}else return!1},t=>t);const b2=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],w2=Ny(Gy,!1),S2=w2(b2);function $l(t,e){return t.map(function(n,r){return n+e[r]})}function Vf(t,e){return t.map(function(n,r){return n-e[r]})}function ka(t){return Math.hypot.apply(Math,t)}function C2(t,e,n){var r=ka(e),i=r===0?0:1/r,s=n===0?0:1/n,o=s*r,a=e.map(function(u){return s*u}),c=e.map(function(u){return i*u}),l=ka(t);return{velocities:a,velocity:o,distance:l,direction:c}}function Ma(t){return Math.sign?Math.sign(t):+(t>0)-+(t<0)||+t}function _2(t,e,n){return Math.max(e,Math.min(t,n))}function E2(t,e){return Math.pow(t,e*5)}function zl(t,e,n){return e===0||Math.abs(e)===1/0?E2(t,n):t*e*n/(e+n*t)}function ci(t,e,n,r){return r===void 0&&(r=.15),r===0?_2(t,e,n):t<e?-zl(e-t,n-e,r)+e:t>n?+zl(t-n,n-e,r)+n:t}function ql(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function x2(t,e,n){return e&&ql(t.prototype,e),n&&ql(t,n),t}function He(){return He=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},He.apply(this,arguments)}function Hf(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function O2(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function us(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function P2(t,e){if(t){if(typeof t=="string")return Gl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gl(t,e)}}function Gl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function wo(t,e){var n;if(typeof Symbol>"u"||t[Symbol.iterator]==null){if(Array.isArray(t)||(n=P2(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
44
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return n=t[Symbol.iterator](),n.next.bind(n)}function Uf(){}function $f(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.length===0?Uf:e.length===1?e[0]:function(){for(var r,i=wo(e),s;!(s=i()).done;){var o=s.value;r=o.apply(this,arguments)||r}return r}}function nn(t,e){if(t===void 0){if(e===void 0)throw new Error("Must define fallback value if undefined is expected");t=e}return Array.isArray(t)?t:[t,t]}function ds(t){if(typeof t=="function"){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return t.apply(void 0,n)}else return t}function wc(t,e){t===void 0&&(t={});for(var n={},r=0,i=Object.entries(e);r<i.length;r++){var s=i[r],o=s[0],a=s[1];switch(typeof a){case"function":n[o]=a.call(n,t[o],o,t);break;case"object":n[o]=wc(t[o],a);break;case"boolean":a&&(n[o]=t[o]);break}}return n}var T2=180,A2=.15,L2=.5,R2=60,k2={threshold:function(e){return e===void 0&&(e=0),nn(e)},rubberband:function(e){switch(e===void 0&&(e=0),e){case!0:return nn(A2);case!1:return nn(0);default:return nn(e)}},enabled:function(e){return e===void 0&&(e=!0),e},triggerAllEvents:function(e){return e===void 0&&(e=!1),e},initial:function(e){return e===void 0&&(e=0),typeof e=="function"?e:nn(e)}},zf=He({},k2,{axis:!0,lockDirection:function(e){return e===void 0&&(e=!1),e},bounds:function(e){if(e===void 0&&(e={}),typeof e=="function")return function(d){return zf.bounds(e(d))};var n=e,r=n.left,i=r===void 0?-1/0:r,s=n.right,o=s===void 0?1/0:s,a=n.top,c=a===void 0?-1/0:a,l=n.bottom,u=l===void 0?1/0:l;return[[i,o],[c,u]]}}),M2=typeof window<"u"&&window.document&&window.document.createElement,D2={enabled:function(e){return e===void 0&&(e=!0),e},domTarget:!0,window:function(t){function e(n){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t){return t===void 0&&(t=M2?window:void 0),t}),eventOptions:function(e){var n=e===void 0?{}:e,r=n.passive,i=r===void 0?!0:r,s=n.capture,o=s===void 0?!1:s;return{passive:i,capture:o}}},N2=He({},zf,{threshold:function(e,n,r){var i=r.filterTaps,s=i===void 0?!1:i,o=r.lockDirection,a=o===void 0?!1:o,c=r.axis,l=c===void 0?void 0:c,u=nn(e,s?3:a||l?1:0);return this.filterTaps=s||u[0]+u[1]>0,u},swipeVelocity:function(e){return e===void 0&&(e=L2),nn(e)},swipeDistance:function(e){return e===void 0&&(e=R2),nn(e)},delay:function(e){switch(e===void 0&&(e=0),e){case!0:return T2;case!1:return 0;default:return e}}});function j2(t){return t===void 0&&(t={}),wc(t,D2)}function I2(t){return t===void 0&&(t={}),wc(t,N2)}function F2(t){var e=t.domTarget,n=t.eventOptions,r=t.window,i=t.enabled,s=O2(t,["domTarget","eventOptions","window","enabled"]),o=j2({domTarget:e,eventOptions:n,window:r,enabled:i});return o.drag=I2(s),o}function $r(t){return He({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_lastEventType:void 0,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:Uf,canceled:!1,memo:void 0,args:void 0},t)}function qf(){var t={hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1},e=$r({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,_isTap:!0,_delayedEvent:!1,_pointerId:void 0,tap:!1,swipe:[0,0]}),n=$r({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),r=$r({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),i=$r({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),s=$r({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0});return{shared:t,drag:e,pinch:n,wheel:r,move:i,scroll:s}}var wn=new Map,B2=function(){function t(n,r){var i=this;r===void 0&&(r=[]),this.controller=n,this.args=r,this.debounced=!0,this.setTimeout=function(s,o){var a;o===void 0&&(o=140),clearTimeout(i.controller.timeouts[i.stateKey]);for(var c=arguments.length,l=new Array(c>2?c-2:0),u=2;u<c;u++)l[u-2]=arguments[u];i.controller.timeouts[i.stateKey]=(a=window).setTimeout.apply(a,[s,o].concat(l))},this.clearTimeout=function(){clearTimeout(i.controller.timeouts[i.stateKey])},this.fireGestureHandler=function(s){if(s===void 0&&(s=!1),i.state._blocked)return i.debounced||(i.state._active=!1,i.clean()),null;if(!s&&!i.state.intentional&&!i.config.triggerAllEvents)return null;if(i.state.intentional){var o=i.state.active,a=i.state._active;i.state.active=a,i.state.first=a&&!o,i.state.last=o&&!a,i.controller.state.shared[i.ingKey]=a}var c=He({},i.controller.state.shared,i.state,i.mapStateValues(i.state)),l=i.handler(c);return i.state.memo=l!==void 0?l:i.state.memo,i.state._active||i.clean(),c}}var e=t.prototype;return e.updateSharedState=function(r){Object.assign(this.controller.state.shared,r)},e.updateGestureState=function(r){Object.assign(this.state,r)},e.checkIntentionality=function(r,i){return{_intentional:r,_blocked:!1}},e.getMovement=function(r){var i=this.config,s=i.initial,o=i.bounds,a=i.rubberband,c=i.threshold,l=this.state,u=l._bounds,d=l._initial,h=l._active,v=l._intentional,m=l.lastOffset,f=l.movement,w=this.getInternalMovement(r,this.state),y=v[0]===!1?Wl(w[0],c[0]):v[0],C=v[1]===!1?Wl(w[1],c[1]):v[1],b=this.checkIntentionality([y,C],w);if(b._blocked)return He({},b,{_movement:w,delta:[0,0]});var E=b._intentional,x=w,g,_;if(E[0]!==!1&&v[0]===!1&&(_=ds(s,this.state),g=ds(o,this.state),d[0]=_[0],u[0]=g[0]),E[1]!==!1&&v[1]===!1){var O,T;_=(O=_)!=null?O:ds(s,this.state),g=(T=g)!=null?T:ds(o,this.state),d[1]=_[1],u[1]=g[1]}var L=[E[0]!==!1?w[0]-E[0]:d[0],E[1]!==!1?w[1]-E[1]:d[1]],R=$l(L,m),A=h?a:[0,0];return L=Zl(u,$l(L,d),A),He({},b,{intentional:E[0]!==!1||E[1]!==!1,_initial:d,_movement:x,movement:L,values:r,offset:Zl(u,R,A),delta:Vf(L,f)})},e.clean=function(){this.clearTimeout()},x2(t,[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"state",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}}]),t}();function Wl(t,e){return Math.abs(t)>=e?Ma(t)*e:!1}function Zl(t,e,n){var r=e[0],i=e[1],s=n[0],o=n[1],a=t[0],c=a[0],l=a[1],u=t[1],d=u[0],h=u[1];return[ci(r,c,l,s),ci(i,d,h,o)]}function $o(t,e,n){var r=t.state,i=t.args,s=e.timeStamp,o=e.type,a=r.values,c=n?0:s-r.startTime;return{_lastEventType:o,event:e,timeStamp:s,elapsedTime:c,args:i,previous:a}}function V2(t,e,n){var r=t.state.offset,i=n.timeStamp;return He({},qf()[t.stateKey],{_active:!0,values:e,initial:e,offset:r,lastOffset:r,startTime:i})}function H2(t,e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return t.call.apply(t,[this,He({},e,{event:n})].concat(i))}}var U2=function(e){var n=this;this.classes=e,this.bind=function(){for(var r={},i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];for(var a=wo(n.classes),c;!(c=a()).done;){var l=c.value;new l(n,s).addBindings(r)}for(var u=0,d=Object.entries(n.nativeRefs);u<d.length;u++){var h=d[u],v=h[0],m=h[1];Da(r,v,H2(m,He({},n.state.shared,{args:s})))}return n.config.domTarget?G2(n,r):W2(n,r)},this.effect=function(){return n.config.domTarget&&n.bind(),n.clean},this.clean=function(){var r=Wf(n.config),i=n.config.eventOptions;r&&Fi(r,Gf(n.domListeners),i),Object.values(n.timeouts).forEach(clearTimeout),$2(n)},this.state=qf(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function $2(t){var e=t.config,n=e.window,r=e.eventOptions,i=t.windowListeners;if(n){for(var s in i){var o=i[s];Fi(n,o,r)}t.windowListeners={}}}function z2(t,e){var n=t.config,r=t.windowListeners;n.window&&(Fi(n.window,r[e],n.eventOptions),delete r[e])}function q2(t,e,n){var r=t.config,i=t.windowListeners;n===void 0&&(n=[]),r.window&&(Fi(r.window,i[e],r.eventOptions),Zf(r.window,i[e]=n,r.eventOptions))}function G2(t,e){var n=t.config,r=t.domListeners,i=Wf(n);if(!i)throw new Error("domTarget must be defined");var s=n.eventOptions;Fi(i,Gf(r),s);for(var o=0,a=Object.entries(e);o<a.length;o++){var c=a[o],l=c[0],u=c[1],d=l.slice(2).toLowerCase();r.push([d,$f.apply(void 0,u)])}Zf(i,r,s)}function W2(t,e){for(var n=t.config,r={},i=n.eventOptions.capture?"Capture":"",s=0,o=Object.entries(e);s<o.length;s++){var a=o[s],c=a[0],l=a[1],u=Array.isArray(l)?l:[l],d=c+i;r[d]=$f.apply(void 0,u)}return r}function Gf(t){return t===void 0&&(t=[]),t.splice(0,t.length)}function Wf(t){var e=t.domTarget;return e&&"current"in e?e.current:e}function Da(t,e,n){t[e]||(t[e]=[]),t[e].push(n)}function Zf(t,e,n){e===void 0&&(e=[]),n===void 0&&(n={});for(var r=wo(e),i;!(i=r()).done;){var s=i.value,o=s[0],a=s[1];t.addEventListener(o,a,n)}}function Fi(t,e,n){e===void 0&&(e=[]),n===void 0&&(n={});for(var r=wo(e),i;!(i=r()).done;){var s=i.value,o=s[0],a=s[1];t.removeEventListener(o,a,n)}}function Z2(t,e,n){n===void 0&&(n={});var r=Q2(t),i=p.useMemo(function(){return new U2(r)},[]);return i.config=e,i.handlers=t,i.nativeRefs=n,p.useEffect(i.effect,[]),i.config.domTarget?K2:i.bind}function K2(){}function Q2(t){var e=new Set;return t.drag&&e.add(wn.get("drag")),t.wheel&&e.add(wn.get("wheel")),t.scroll&&e.add(wn.get("scroll")),t.move&&e.add(wn.get("move")),t.pinch&&e.add(wn.get("pinch")),t.hover&&e.add(wn.get("hover")),e}var J2=function(t){Hf(e,t);function e(){return t.apply(this,arguments)||this}var n=e.prototype;return n.getInternalMovement=function(i,s){return Vf(i,s.initial)},n.checkIntentionality=function(i,s){if(i[0]===!1&&i[1]===!1)return{_intentional:i,axis:this.state.axis};var o=s.map(Math.abs),a=o[0],c=o[1],l=this.state.axis||(a>c?"x":a<c?"y":void 0);return!this.config.axis&&!this.config.lockDirection?{_intentional:i,_blocked:!1,axis:l}:l?this.config.axis&&l!==this.config.axis?{_intentional:i,_blocked:!0,axis:l}:(i[l==="x"?1:0]=!1,{_intentional:i,_blocked:!1,axis:l}):{_intentional:[!1,!1],_blocked:!1,axis:l}},n.getKinematics=function(i,s){var o=this.getMovement(i);if(!o._blocked){var a=s.timeStamp-this.state.timeStamp;Object.assign(o,C2(o.movement,o.delta,a))}return o},n.mapStateValues=function(i){return{xy:i.values,vxvy:i.velocities}},e}(B2);function Kf(t){if("touches"in t){var e=t.targetTouches,n=t.changedTouches;return e.length>0?e:n}return null}function Kl(t){var e="buttons"in t?t.buttons:0,n=Kf(t),r=n&&n.length||0,i=r>0||e>0,s=t.shiftKey,o=t.altKey,a=t.metaKey,c=t.ctrlKey;return{touches:r,down:i,buttons:e,shiftKey:s,altKey:o,metaKey:a,ctrlKey:c}}function Ql(t){var e=Kf(t),n=e?e[0]:t,r=n.clientX,i=n.clientY;return[r,i]}var X2=3,Y2=220,e3=function(t){Hf(e,t);function e(){var r;return r=t.apply(this,arguments)||this,r.ingKey="dragging",r.stateKey="drag",r.onDragStart=function(i){!r.enabled||r.state._active||(q2(r.controller,r.stateKey,[["pointermove",r.onDragChange],["pointerup",r.onDragEnd],["pointercancel",r.onDragEnd]]),r.updateGestureState({_pointerId:i.pointerId}),r.config.delay>0?(r.state._delayedEvent=!0,"persist"in i&&typeof i.persist=="function"&&i.persist(),r.setTimeout(r.startDrag.bind(us(r)),r.config.delay,i)):r.startDrag(i))},r.onDragChange=function(i){if(!r.state.canceled&&i.pointerId===r.state._pointerId){if(!r.state._active){r.state._delayedEvent&&(r.clearTimeout(),r.startDrag(i));return}var s=Kl(i);if(!s.down){r.onDragEnd(i);return}r.updateSharedState(s);var o=Ql(i),a=r.getKinematics(o,i),c=$o(us(r),i),l=r.state._isTap,u=ka(a._movement);l&&u>=X2&&(l=!1),r.updateGestureState(He({},c,a,{_isTap:l})),r.fireGestureHandler()}},r.onDragEnd=function(i){if(i.pointerId===r.state._pointerId){r.state._active=!1,r.updateSharedState({down:!1,buttons:0,touches:0});var s=r.state._isTap,o=r.state.velocities,a=o[0],c=o[1],l=r.state.movement,u=l[0],d=l[1],h=r.state._intentional,v=h[0],m=h[1],f=r.config.swipeVelocity,w=f[0],y=f[1],C=r.config.swipeDistance,b=C[0],E=C[1],x=He({},$o(us(r),i),r.getMovement(r.state.values)),g=[0,0];x.elapsedTime<Y2&&(v!==!1&&Math.abs(a)>w&&Math.abs(u)>b&&(g[0]=Ma(a)),m!==!1&&Math.abs(c)>y&&Math.abs(d)>E&&(g[1]=Ma(c))),r.updateGestureState(He({},x,{tap:s,swipe:g})),r.fireGestureHandler(s===!0)}},r.clean=function(){t.prototype.clean.call(us(r)),r.state._delayedEvent=!1,z2(r.controller,r.stateKey)},r.onCancel=function(){r.state.canceled||(r.updateGestureState({canceled:!0}),r.state._active=!1,r.updateSharedState({down:!1,buttons:0,touches:0}),requestAnimationFrame(function(){return r.fireGestureHandler()}))},r.onClick=function(i){r.state._isTap||i.stopPropagation()},r}var n=e.prototype;return n.startDrag=function(i){var s=Ql(i);this.updateSharedState(Kl(i)),this.updateGestureState(He({},V2(this,s,i),$o(this,i,!0),{_pointerId:i.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(s)),this.fireGestureHandler()},n.addBindings=function(i){if(Da(i,"onPointerDown",this.onDragStart),this.config.filterTaps){var s=this.controller.config.eventOptions.capture?"onClick":"onClickCapture";Da(i,s,this.onClick)}},e}(J2);function t3(t,e){var n,r=[],i,s=!1;function o(){for(var a=arguments.length,c=new Array(a),l=0;l<a;l++)c[l]=arguments[l];return s&&n===this&&e(c,r)||(i=t.apply(this,c),s=!0,n=this,r=c),i}return o}function Fs(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var n,r,i;if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Fs(t[r],e[r]))return!1;return!0}var s;if(typeof Map=="function"&&t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(s=t.entries();!(r=s.next()).done;)if(!e.has(r.value[0]))return!1;for(s=t.entries();!(r=s.next()).done;)if(!Fs(r.value[1],e.get(r.value[0])))return!1;return!0}if(typeof Set=="function"&&t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(s=t.entries();!(r=s.next()).done;)if(!e.has(r.value[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[r]))return!1;if(typeof Element<"u"&&t instanceof Element)return!1;for(r=n;r--!==0;)if(!(i[r]==="_owner"&&t.$$typeof)&&!Fs(t[i[r]],e[i[r]]))return!1;return!0}return t!==t&&e!==e}function n3(t,e){try{return Fs(t,e)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}function r3(t,e){e===void 0&&(e={}),wn.set("drag",e3);var n=p.useRef();return n.current||(n.current=t3(F2,n3)),Z2({drag:t},n.current(e))}/*!
40
+ ***************************************************************************** */var F=function(){return F=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},F.apply(this,arguments)};function hc(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function J(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function re(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s}function he(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,s;r<i;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return t.concat(s||Array.prototype.slice.call(e))}var ue;(function(t){t.Start="xstate.start",t.Stop="xstate.stop",t.Raise="xstate.raise",t.Send="xstate.send",t.Cancel="xstate.cancel",t.NullEvent="",t.Assign="xstate.assign",t.After="xstate.after",t.DoneState="done.state",t.DoneInvoke="done.invoke",t.Log="xstate.log",t.Init="xstate.init",t.Invoke="xstate.invoke",t.ErrorExecution="error.execution",t.ErrorCommunication="error.communication",t.ErrorPlatform="error.platform",t.ErrorCustom="xstate.error",t.Update="xstate.update",t.Pure="xstate.pure",t.Choose="xstate.choose"})(ue||(ue={}));var Er;(function(t){t.Parent="#_parent",t.Internal="#_internal"})(Er||(Er={}));var Sa=ue.Start,pc=ue.Stop,Ii=ue.Raise,vo=ue.Send,gf=ue.Cancel,R1=ue.NullEvent,mc=ue.Assign;ue.After;ue.DoneState;var vf=ue.Log,L1=ue.Init,Ca=ue.Invoke;ue.ErrorExecution;var Tl=ue.ErrorPlatform,k1=ue.ErrorCustom,yf=ue.Update,M1=ue.Choose,D1=ue.Pure,bf=".",Al={},_a="xstate.guard",N1="",ns;function gc(t,e,n){n===void 0&&(n=bf);var r=ri(t,n),i=ri(e,n);return ce(i)?ce(r)?i===r:!1:ce(r)?r in i:Object.keys(r).every(function(s){return s in i?gc(r[s],i[s]):!1})}function wf(t){try{return ce(t)||typeof t=="number"?"".concat(t):t.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function Ea(t,e){try{return Rr(t)?t:t.toString().split(e)}catch{throw new Error("'".concat(t,"' is not a valid state path."))}}function j1(t){return typeof t=="object"&&"value"in t&&"context"in t&&"event"in t&&"_event"in t}function ri(t,e){if(j1(t))return t.value;if(Rr(t))return Gs(t);if(typeof t!="string")return t;var n=Ea(t,e);return Gs(n)}function Gs(t){if(t.length===1)return t[0];for(var e={},n=e,r=0;r<t.length-1;r++)r===t.length-2?n[t[r]]=t[r+1]:(n[t[r]]={},n=n[t[r]]);return e}function Qr(t,e){for(var n={},r=Object.keys(t),i=0;i<r.length;i++){var s=r[i];n[s]=e(t[s],s,t,i)}return n}function Rl(t,e,n){var r,i,s={};try{for(var o=J(Object.keys(t)),a=o.next();!a.done;a=o.next()){var c=a.value,l=t[c];n(l)&&(s[c]=e(l,c,t))}}catch(u){r={error:u}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return s}var I1=function(t){return function(e){var n,r,i=e;try{for(var s=J(t),o=s.next();!o.done;o=s.next()){var a=o.value;i=i[a]}}catch(c){n={error:c}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return i}};function F1(t,e){return function(n){var r,i,s=n;try{for(var o=J(t),a=o.next();!a.done;a=o.next()){var c=a.value;s=s[e][c]}}catch(l){r={error:l}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return s}}function Ds(t){if(!t)return[[]];if(ce(t))return[[t]];var e=ye(Object.keys(t).map(function(n){var r=t[n];return typeof r!="string"&&(!r||!Object.keys(r).length)?[[n]]:Ds(t[n]).map(function(i){return[n].concat(i)})}));return e}function ye(t){var e;return(e=[]).concat.apply(e,he([],re(t),!1))}function Sf(t){return Rr(t)?t:[t]}function ct(t){return t===void 0?[]:Sf(t)}function Ws(t,e,n){var r,i;if(ie(t))return t(e,n.data);var s={};try{for(var o=J(Object.keys(t)),a=o.next();!a.done;a=o.next()){var c=a.value,l=t[c];ie(l)?s[c]=l(e,n.data):s[c]=l}}catch(u){r={error:u}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return s}function B1(t){return/^(done|error)\./.test(t)}function Ll(t){return!!(t instanceof Promise||t!==null&&(ie(t)||typeof t=="object")&&ie(t.then))}function V1(t){return t!==null&&typeof t=="object"&&"transition"in t&&typeof t.transition=="function"}function H1(t,e){var n,r,i=re([[],[]],2),s=i[0],o=i[1];try{for(var a=J(t),c=a.next();!c.done;c=a.next()){var l=c.value;e(l)?s.push(l):o.push(l)}}catch(u){n={error:u}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[s,o]}function Cf(t,e){return Qr(t.states,function(n,r){if(n){var i=(ce(e)?void 0:e[r])||(n?n.current:void 0);if(i)return{current:i,states:Cf(n,i)}}})}function U1(t,e){return{current:e,states:Cf(t,e)}}function kl(t,e,n,r){var i=t&&n.reduce(function(s,o){var a,c,l=o.assignment,u={state:r,action:o,_event:e},d={};if(ie(l))d=l(s,e.data,u);else try{for(var h=J(Object.keys(l)),v=h.next();!v.done;v=h.next()){var m=v.value,f=l[m];d[m]=ie(f)?f(s,e.data,u):f}}catch(w){a={error:w}}finally{try{v&&!v.done&&(c=h.return)&&c.call(h)}finally{if(a)throw a.error}}return Object.assign({},s,d)},t);return i}var $1=function(){};function Rr(t){return Array.isArray(t)}function ie(t){return typeof t=="function"}function ce(t){return typeof t=="string"}function _f(t,e){if(t)return ce(t)?{type:_a,name:t,predicate:e?e[t]:void 0}:ie(t)?{type:_a,name:t.name,predicate:t}:t}function z1(t){try{return"subscribe"in t&&ie(t.subscribe)}catch{return!1}}var tn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();ns={},ns[tn]=function(){return this},ns[Symbol.observable]=function(){return this};function xr(t){return!!t&&"__xstatenode"in t}function q1(t){return!!t&&typeof t.send=="function"}function yo(t,e){return ce(t)||typeof t=="number"?F({type:t},e):t}function Re(t,e){if(!ce(t)&&"$$type"in t&&t.$$type==="scxml")return t;var n=yo(t);return F({name:n.type,data:n,$$type:"scxml",type:"external"},e)}function Zn(t,e){var n=Sf(e).map(function(r){return typeof r>"u"||typeof r=="string"||xr(r)?{target:r,event:t}:F(F({},r),{event:t})});return n}function G1(t){if(!(t===void 0||t===N1))return ct(t)}function Ef(t,e,n,r,i){var s=t.options.guards,o={state:i,cond:e,_event:r};if(e.type===_a)return((s==null?void 0:s[e.name])||e.predicate)(n,r.data,o);var a=s==null?void 0:s[e.type];if(!a)throw new Error("Guard '".concat(e.type,"' is not implemented on machine '").concat(t.id,"'."));return a(n,r.data,o)}function xf(t){return typeof t=="string"?{type:t}:t}function Ns(t,e,n){var r=function(){},i=typeof t=="object",s=i?t:null;return{next:((i?t.next:t)||r).bind(s),error:((i?t.error:e)||r).bind(s),complete:((i?t.complete:n)||r).bind(s)}}function rs(t,e){return"".concat(t,":invocation[").concat(e,"]")}function xa(t){return(t.type===Ii||t.type===vo&&t.to===Er.Internal)&&typeof t.delay!="number"}var ir=Re({type:L1});function Oa(t,e){return e&&e[t]||void 0}function gi(t,e){var n;if(ce(t)||typeof t=="number"){var r=Oa(t,e);ie(r)?n={type:t,exec:r}:r?n=r:n={type:t,exec:void 0}}else if(ie(t))n={type:t.name||t.toString(),exec:t};else{var r=Oa(t.type,e);if(ie(r))n=F(F({},t),{exec:r});else if(r){var i=r.type||t.type;n=F(F(F({},r),t),{type:i})}else n=t}return n}var nn=function(t,e){if(!t)return[];var n=Rr(t)?t:[t];return n.map(function(r){return gi(r,e)})};function vc(t){var e=gi(t);return F(F({id:ce(t)?t:e.id},e),{type:e.type})}function W1(t,e){return{type:Ii,event:typeof t=="function"?t:yo(t),delay:e?e.delay:void 0,id:e==null?void 0:e.id}}function Z1(t,e,n,r){var i={_event:n},s=Re(ie(t.event)?t.event(e,n.data,i):t.event),o;if(ce(t.delay)){var a=r&&r[t.delay];o=ie(a)?a(e,n.data,i):a}else o=ie(t.delay)?t.delay(e,n.data,i):t.delay;return F(F({},t),{type:Ii,_event:s,delay:o})}function K1(t,e){return{to:e?e.to:void 0,type:vo,event:ie(t)?t:yo(t),delay:e?e.delay:void 0,id:e&&e.id!==void 0?e.id:ie(t)?t.name:wf(t)}}function Q1(t,e,n,r){var i={_event:n},s=Re(ie(t.event)?t.event(e,n.data,i):t.event),o;if(ce(t.delay)){var a=r&&r[t.delay];o=ie(a)?a(e,n.data,i):a}else o=ie(t.delay)?t.delay(e,n.data,i):t.delay;var c=ie(t.to)?t.to(e,n.data,i):t.to;return F(F({},t),{to:c,_event:s,event:s.data,delay:o})}var J1=function(t,e,n){return F(F({},t),{value:ce(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})},X1=function(t){return{type:gf,sendId:t}};function Y1(t){var e=vc(t);return{type:ue.Start,activity:e,exec:void 0}}function ey(t){var e=ie(t)?t:vc(t);return{type:ue.Stop,activity:e,exec:void 0}}function ty(t,e,n){var r=ie(t.activity)?t.activity(e,n.data):t.activity,i=typeof r=="string"?{id:r}:r,s={type:ue.Stop,activity:i};return s}var ny=function(t){return{type:mc,assignment:t}};function ry(t,e){var n=e?"#".concat(e):"";return"".concat(ue.After,"(").concat(t,")").concat(n)}function is(t,e){var n="".concat(ue.DoneState,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function js(t,e){var n="".concat(ue.DoneInvoke,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function Jr(t,e){var n="".concat(ue.ErrorPlatform,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}var iy=function(t){var e,n,r=[];try{for(var i=J(t),s=i.next();!s.done;s=i.next())for(var o=s.value,a=0;a<o.actions.length;){if(o.actions[a].type===mc){r.push(o.actions[a]),o.actions.splice(a,1);continue}a++}}catch(c){e={error:c}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r};function Zs(t,e,n,r,i,s,o){o===void 0&&(o=!1);var a=o?[]:iy(i),c=a.length?kl(n,r,a,e):n,l=o?[n]:void 0,u=[];function d(m,f){var w;switch(f.type){case Ii:{var y=Z1(f,c,r,t.options.delays);return s&&typeof y.delay=="number"&&s(y,c,r),y}case vo:var C=Q1(f,c,r,t.options.delays);return s&&C.to!==Er.Internal&&(m==="entry"?u.push(C):s(C,c,r)),C;case vf:{var b=J1(f,c,r);return s==null||s(b,c,r),b}case M1:{var E=f,x=(w=E.conds.find(function(q){var I=_f(q.cond,t.options.guards);return!I||Ef(t,I,c,r,s?void 0:e)}))===null||w===void 0?void 0:w.actions;if(!x)return[];var g=re(Zs(t,e,c,r,[{type:m,actions:nn(ct(x),t.options.actions)}],s,o),2),_=g[0],O=g[1];return c=O,l==null||l.push(c),_}case D1:{var x=f.get(c,r.data);if(!x)return[];var T=re(Zs(t,e,c,r,[{type:m,actions:nn(ct(x),t.options.actions)}],s,o),2),R=T[0],L=T[1];return c=L,l==null||l.push(c),R}case pc:{var b=ty(f,c,r);return s==null||s(b,n,r),b}case mc:{c=kl(c,r,[f],s?void 0:e),l==null||l.push(c);break}default:var A=gi(f,t.options.actions),D=A.exec;if(s)s(A,c,r);else if(D&&l){var N=l.length-1,V=F(F({},A),{exec:function(q){for(var I=[],z=1;z<arguments.length;z++)I[z-1]=arguments[z];D.apply(void 0,he([l[N]],re(I),!1))}});A=V}return A}}function h(m){var f,w,y=[];try{for(var C=J(m.actions),b=C.next();!b.done;b=C.next()){var E=b.value,x=d(m.type,E);x&&(y=y.concat(x))}}catch(g){f={error:g}}finally{try{b&&!b.done&&(w=C.return)&&w.call(C)}finally{if(f)throw f.error}}return u.forEach(function(g){s(g,c,r)}),u.length=0,y}var v=ye(i.map(h));return[v,c]}var er=function(t,e){var n=e(t);return n};function Of(t){var e;return e={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:t}}},e[tn]=function(){return this},e}function sy(t,e,n,r){var i,s=xf(t.src),o=(i=e==null?void 0:e.options.services)===null||i===void 0?void 0:i[s.type],a=t.data?Ws(t.data,n,r):void 0,c=o?Pf(o,t.id,a):Of(t.id);return c.meta=t,c}function Pf(t,e,n){var r=Of(e);if(r.deferred=!0,xr(t)){var i=r.state=er(void 0,function(){return(n?t.withContext(n):t).initialState});r.getSnapshot=function(){return i}}return r}function oy(t){try{return typeof t.send=="function"}catch{return!1}}function ay(t){return oy(t)&&"id"in t}function cy(t){var e;return F((e={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},e[tn]=function(){return this},e),t)}var Ks=function(t){return t.type==="atomic"||t.type==="final"};function Tf(t){return Object.keys(t.states).map(function(e){return t.states[e]})}function vi(t){return Tf(t).filter(function(e){return e.type!=="history"})}function Af(t){var e=[t];return Ks(t)?e:e.concat(ye(vi(t).map(Af)))}function Xr(t,e){var n,r,i,s,o,a,c,l,u=new Set(t),d=Pa(u),h=new Set(e);try{for(var v=J(h),m=v.next();!m.done;m=v.next())for(var f=m.value,w=f.parent;w&&!h.has(w);)h.add(w),w=w.parent}catch(T){n={error:T}}finally{try{m&&!m.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}var y=Pa(h);try{for(var C=J(h),b=C.next();!b.done;b=C.next()){var f=b.value;if(f.type==="compound"&&(!y.get(f)||!y.get(f).length))d.get(f)?d.get(f).forEach(function(R){return h.add(R)}):f.initialStateNodes.forEach(function(R){return h.add(R)});else if(f.type==="parallel")try{for(var E=(o=void 0,J(vi(f))),x=E.next();!x.done;x=E.next()){var g=x.value;h.has(g)||(h.add(g),d.get(g)?d.get(g).forEach(function(R){return h.add(R)}):g.initialStateNodes.forEach(function(R){return h.add(R)}))}}catch(R){o={error:R}}finally{try{x&&!x.done&&(a=E.return)&&a.call(E)}finally{if(o)throw o.error}}}}catch(T){i={error:T}}finally{try{b&&!b.done&&(s=C.return)&&s.call(C)}finally{if(i)throw i.error}}try{for(var _=J(h),O=_.next();!O.done;O=_.next())for(var f=O.value,w=f.parent;w&&!h.has(w);)h.add(w),w=w.parent}catch(T){c={error:T}}finally{try{O&&!O.done&&(l=_.return)&&l.call(_)}finally{if(c)throw c.error}}return h}function Rf(t,e){var n=e.get(t);if(!n)return{};if(t.type==="compound"){var r=n[0];if(r){if(Ks(r))return r.key}else return{}}var i={};return n.forEach(function(s){i[s.key]=Rf(s,e)}),i}function Pa(t){var e,n,r=new Map;try{for(var i=J(t),s=i.next();!s.done;s=i.next()){var o=s.value;r.has(o)||r.set(o,[]),o.parent&&(r.has(o.parent)||r.set(o.parent,[]),r.get(o.parent).push(o))}}catch(a){e={error:a}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function ly(t,e){var n=Xr([t],e);return Rf(t,Pa(n))}function Yr(t,e){return Array.isArray(t)?t.some(function(n){return n===e}):t instanceof Set?t.has(e):!1}function uy(t){return he([],re(new Set(ye(he([],re(t.map(function(e){return e.ownEvents})),!1)))),!1)}function Is(t,e){return e.type==="compound"?vi(e).some(function(n){return n.type==="final"&&Yr(t,n)}):e.type==="parallel"?vi(e).every(function(n){return Is(t,n)}):!1}function dy(t){return t===void 0&&(t=[]),t.reduce(function(e,n){return n.meta!==void 0&&(e[n.id]=n.meta),e},{})}function Ml(t){return new Set(ye(t.map(function(e){return e.tags})))}function Lf(t,e){if(t===e)return!0;if(t===void 0||e===void 0)return!1;if(ce(t)||ce(e))return t===e;var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(i){return Lf(t[i],e[i])})}function fy(t){return typeof t!="object"||t===null?!1:"value"in t&&"_event"in t}function hy(t,e){var n=t.exec,r=F(F({},t),{exec:n!==void 0?function(){return n(e.context,e.event,{action:t,state:e,_event:e._event})}:void 0});return r}var et=function(){function t(e){var n=this,r;this.actions=[],this.activities=Al,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||Al,this.meta=dy(e.configuration),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=(r=Array.isArray(e.tags)?new Set(e.tags):e.tags)!==null&&r!==void 0?r:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return uy(n.configuration)}})}return t.from=function(e,n){if(e instanceof t)return e.context!==n?new t({value:e.value,context:n,_event:e._event,_sessionid:null,historyValue:e.historyValue,history:e.history,actions:[],activities:e.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):e;var r=ir;return new t({value:e,context:n,_event:r,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},t.create=function(e){return new t(e)},t.inert=function(e,n){if(e instanceof t){if(!e.actions.length)return e;var r=ir;return new t({value:e.value,context:n,_event:r,_sessionid:null,historyValue:e.historyValue,history:e.history,activities:e.activities,configuration:e.configuration,transitions:[],children:{}})}return t.from(e,n)},t.prototype.toStrings=function(e,n){var r=this;if(e===void 0&&(e=this.value),n===void 0&&(n="."),ce(e))return[e];var i=Object.keys(e);return i.concat.apply(i,he([],re(i.map(function(s){return r.toStrings(e[s],n).map(function(o){return s+n+o})})),!1))},t.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var n=e.tags;e.machine;var r=hc(e,["configuration","transitions","tags","machine"]);return F(F({},r),{tags:Array.from(n)})},t.prototype.matches=function(e){return gc(e,this.value)},t.prototype.hasTag=function(e){return this.tags.has(e)},t.prototype.can=function(e){var n;$1(!!this.machine);var r=(n=this.machine)===null||n===void 0?void 0:n.getTransitionData(this,e);return!!(r!=null&&r.transitions.length)&&r.transitions.some(function(i){return i.target!==void 0||i.actions.length})},t}(),py={deferEvents:!1},Dl=function(){function t(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=F(F({},py),e)}return t.prototype.initialize=function(e){if(this.initialized=!0,e){if(!this.options.deferEvents){this.schedule(e);return}this.process(e)}this.flushEvents()},t.prototype.schedule=function(e){if(!this.initialized||this.processingEvent){this.queue.push(e);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(e),this.flushEvents()},t.prototype.clear=function(){this.queue=[]},t.prototype.flushEvents=function(){for(var e=this.queue.shift();e;)this.process(e),e=this.queue.shift()},t.prototype.process=function(e){this.processingEvent=!0;try{e()}catch(n){throw this.clear(),n}finally{this.processingEvent=!1}},t}(),Bo=new Map,my=0,Vr={bookId:function(){return"x:".concat(my++)},register:function(t,e){return Bo.set(t,e),t},get:function(t){return Bo.get(t)},free:function(t){Bo.delete(t)}};function yc(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function gy(){var t=yc();if(t&&"__xstate__"in t)return t.__xstate__}function vy(t){if(yc()){var e=gy();e&&e.register(t)}}function yy(t,e){e===void 0&&(e={});var n=t.initialState,r=new Set,i=[],s=!1,o=function(){if(!s){for(s=!0;i.length>0;){var l=i.shift();n=t.transition(n,l,c),r.forEach(function(u){return u.next(n)})}s=!1}},a=cy({id:e.id,send:function(l){i.push(l),o()},getSnapshot:function(){return n},subscribe:function(l,u,d){var h=Ns(l,u,d);return r.add(h),h.next(n),{unsubscribe:function(){r.delete(h)}}}}),c={parent:e.parent,self:a,id:e.id||"anonymous",observers:r};return n=t.start?t.start(c):n,a}var by={sync:!1,autoForward:!1},Pe;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(Pe||(Pe={}));var wy=function(){function t(e,n){n===void 0&&(n=t.defaultOptions);var r=this;this.machine=e,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=Pe.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(u,d){if(Rr(u))return r.batch(u),r.state;var h=Re(yo(u,d));if(r.status===Pe.Stopped)return r.state;if(r.status!==Pe.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(h.name,'" was sent to uninitialized service "').concat(r.machine.id,`". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.
41
+ Event: `).concat(JSON.stringify(h.data)));return r.scheduler.schedule(function(){r.forward(h);var v=r._nextState(h);r.update(v,h)}),r._state},this.sendTo=function(u,d,h){var v=r.parent&&(d===Er.Parent||r.parent.id===d),m=v?r.parent:ce(d)?d===Er.Internal?r:r.children.get(d)||Vr.get(d):q1(d)?d:void 0;if(!m){if(!v)throw new Error("Unable to send event to child '".concat(d,"' from service '").concat(r.id,"'."));return}if("machine"in m){if(r.status!==Pe.Stopped||r.parent!==m||r.state.done){var f=F(F({},u),{name:u.name===k1?"".concat(Jr(r.id)):u.name,origin:r.sessionId});!h&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([m,f]):m.send(f)}}else!h&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([m,u.data]):m.send(u.data)},this._exec=function(u,d,h,v){v===void 0&&(v=r.machine.options.actions);var m=u.exec||Oa(u.type,v),f=ie(m)?m:m?m.exec:u.exec;if(f)try{return f(d,h.data,r.machine.config.predictableActionArguments?{action:u,_event:h}:{action:u,state:r.state,_event:h})}catch(N){throw r.parent&&r.parent.send({type:"xstate.error",data:N}),N}switch(u.type){case Ii:{var w=u;r.defer(w);break}case vo:var y=u;if(typeof y.delay=="number"){r.defer(y);return}else y.to?r.sendTo(y._event,y.to,h===ir):r.send(y._event);break;case gf:r.cancel(u.sendId);break;case Sa:{if(r.status!==Pe.Running)return;var C=u.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[C.id||C.type])break;if(C.type===ue.Invoke){var b=xf(C.src),E=r.machine.options.services?r.machine.options.services[b.type]:void 0,x=C.id,g=C.data,_="autoForward"in C?C.autoForward:!!C.forward;if(!E)return;var O=g?Ws(g,d,h):void 0;if(typeof E=="string")return;var T=ie(E)?E(d,h.data,{data:O,src:b,meta:C.meta}):E;if(!T)return;var R=void 0;xr(T)&&(T=O?T.withContext(O):T,R={autoForward:_}),r.spawn(T,x,R)}else r.spawnActivity(C);break}case pc:{r.stopChild(u.activity.id);break}case vf:var L=u,A=L.label,D=L.value;A?r.logger(A,D):r.logger(D);break}};var i=F(F({},t.defaultOptions),n),s=i.clock,o=i.logger,a=i.parent,c=i.id,l=c!==void 0?c:e.id;this.id=l,this.logger=o,this.clock=s,this.parent=a,this.options=i,this.scheduler=new Dl({deferEvents:this.options.deferEvents}),this.sessionId=Vr.bookId()}return Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:er(this,function(){return e._initialState=e.machine.initialState,e._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),t.prototype.execute=function(e,n){var r,i;try{for(var s=J(e.actions),o=s.next();!o.done;o=s.next()){var a=o.value;this.exec(a,e,n)}}catch(c){r={error:c}}finally{try{o&&!o.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}},t.prototype.update=function(e,n){var r,i,s,o,a,c,l,u,d=this;if(e._sessionid=this.sessionId,this._state=e,(!this.machine.config.predictableActionArguments||n===ir)&&this.options.execute)this.execute(this.state);else for(var h=void 0;h=this._outgoingQueue.shift();)h[0].send(h[1]);if(this.children.forEach(function(T){d.state.children[T.id]=T}),this.devTools&&this.devTools.send(n.data,e),e.event)try{for(var v=J(this.eventListeners),m=v.next();!m.done;m=v.next()){var f=m.value;f(e.event)}}catch(T){r={error:T}}finally{try{m&&!m.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}try{for(var w=J(this.listeners),y=w.next();!y.done;y=w.next()){var f=y.value;f(e,e.event)}}catch(T){s={error:T}}finally{try{y&&!y.done&&(o=w.return)&&o.call(w)}finally{if(s)throw s.error}}try{for(var C=J(this.contextListeners),b=C.next();!b.done;b=C.next()){var E=b.value;E(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(T){a={error:T}}finally{try{b&&!b.done&&(c=C.return)&&c.call(C)}finally{if(a)throw a.error}}if(this.state.done){var x=e.configuration.find(function(T){return T.type==="final"&&T.parent===d.machine}),g=x&&x.doneData?Ws(x.doneData,e.context,n):void 0;this._doneEvent=js(this.id,g);try{for(var _=J(this.doneListeners),O=_.next();!O.done;O=_.next()){var f=O.value;f(this._doneEvent)}}catch(T){l={error:T}}finally{try{O&&!O.done&&(u=_.return)&&u.call(_)}finally{if(l)throw l.error}}this._stop(),this._stopChildren(),Vr.free(this.sessionId)}},t.prototype.onTransition=function(e){return this.listeners.add(e),this.status===Pe.Running&&e(this.state,this.state.event),this},t.prototype.subscribe=function(e,n,r){var i=this,s=Ns(e,n,r);this.listeners.add(s.next),this.status!==Pe.NotStarted&&s.next(this.state);var o=function(){i.doneListeners.delete(o),i.stopListeners.delete(o),s.complete()};return this.status===Pe.Stopped?s.complete():(this.onDone(o),this.onStop(o)),{unsubscribe:function(){i.listeners.delete(s.next),i.doneListeners.delete(o),i.stopListeners.delete(o)}}},t.prototype.onEvent=function(e){return this.eventListeners.add(e),this},t.prototype.onSend=function(e){return this.sendListeners.add(e),this},t.prototype.onChange=function(e){return this.contextListeners.add(e),this},t.prototype.onStop=function(e){return this.stopListeners.add(e),this},t.prototype.onDone=function(e){return this.status===Pe.Stopped&&this._doneEvent?e(this._doneEvent):this.doneListeners.add(e),this},t.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},t.prototype.start=function(e){var n=this;if(this.status===Pe.Running)return this;this.machine._init(),Vr.register(this.sessionId,this),this.initialized=!0,this.status=Pe.Running;var r=e===void 0?this.initialState:er(this,function(){return fy(e)?n.machine.resolveState(e):n.machine.resolveState(et.from(e,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(r,ir)}),this},t.prototype._stopChildren=function(){this.children.forEach(function(e){ie(e.stop)&&e.stop()}),this.children.clear()},t.prototype._stop=function(){var e,n,r,i,s,o,a,c,l,u;try{for(var d=J(this.listeners),h=d.next();!h.done;h=d.next()){var v=h.value;this.listeners.delete(v)}}catch(_){e={error:_}}finally{try{h&&!h.done&&(n=d.return)&&n.call(d)}finally{if(e)throw e.error}}try{for(var m=J(this.stopListeners),f=m.next();!f.done;f=m.next()){var v=f.value;v(),this.stopListeners.delete(v)}}catch(_){r={error:_}}finally{try{f&&!f.done&&(i=m.return)&&i.call(m)}finally{if(r)throw r.error}}try{for(var w=J(this.contextListeners),y=w.next();!y.done;y=w.next()){var v=y.value;this.contextListeners.delete(v)}}catch(_){s={error:_}}finally{try{y&&!y.done&&(o=w.return)&&o.call(w)}finally{if(s)throw s.error}}try{for(var C=J(this.doneListeners),b=C.next();!b.done;b=C.next()){var v=b.value;this.doneListeners.delete(v)}}catch(_){a={error:_}}finally{try{b&&!b.done&&(c=C.return)&&c.call(C)}finally{if(a)throw a.error}}if(!this.initialized)return this;this.initialized=!1,this.status=Pe.Stopped,this._initialState=void 0;try{for(var E=J(Object.keys(this.delayedEventsMap)),x=E.next();!x.done;x=E.next()){var g=x.value;this.clock.clearTimeout(this.delayedEventsMap[g])}}catch(_){l={error:_}}finally{try{x&&!x.done&&(u=E.return)&&u.call(E)}finally{if(l)throw l.error}}this.scheduler.clear(),this.scheduler=new Dl({deferEvents:this.options.deferEvents})},t.prototype.stop=function(){var e=this,n=this.scheduler;return this._stop(),n.schedule(function(){var r;if(!(!((r=e._state)===null||r===void 0)&&r.done)){var i=Re({type:"xstate.stop"}),s=er(e,function(){var o=ye(he([],re(e.state.configuration),!1).sort(function(d,h){return h.order-d.order}).map(function(d){return nn(d.onExit,e.machine.options.actions)})),a=re(Zs(e.machine,e.state,e.state.context,i,[{type:"exit",actions:o}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),c=a[0],l=a[1],u=new et({value:e.state.value,context:l,_event:i,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:c.filter(function(d){return!xa(d)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return u.changed=!0,u});e.update(s,i),e._stopChildren(),Vr.free(e.sessionId)}}),this},t.prototype.batch=function(e){var n=this;if(!(this.status===Pe.NotStarted&&this.options.deferEvents)){if(this.status!==Pe.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'))}if(e.length){var r=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var i,s,o=n.state,a=!1,c=[],l=function(v){var m=Re(v);n.forward(m),o=er(n,function(){return n.machine.transition(o,m,void 0,r||void 0)}),c.push.apply(c,he([],re(n.machine.config.predictableActionArguments?o.actions:o.actions.map(function(f){return hy(f,o)})),!1)),a=a||!!o.changed};try{for(var u=J(e),d=u.next();!d.done;d=u.next()){var h=d.value;l(h)}}catch(v){i={error:v}}finally{try{d&&!d.done&&(s=u.return)&&s.call(u)}finally{if(i)throw i.error}}o.changed=a,o.actions=c,n.update(o,Re(e[e.length-1]))})}},t.prototype.sender=function(e){return this.send.bind(this,e)},t.prototype._nextState=function(e,n){var r=this;n===void 0&&(n=!!this.machine.config.predictableActionArguments&&this._exec);var i=Re(e);if(i.name.indexOf(Tl)===0&&!this.state.nextEvents.some(function(o){return o.indexOf(Tl)===0}))throw i.data.data;var s=er(this,function(){return r.machine.transition(r.state,i,void 0,n||void 0)});return s},t.prototype.nextState=function(e){return this._nextState(e,!1)},t.prototype.forward=function(e){var n,r;try{for(var i=J(this.forwardTo),s=i.next();!s.done;s=i.next()){var o=s.value,a=this.children.get(o);if(!a)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(o,"'."));a.send(e)}}catch(c){n={error:c}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},t.prototype.defer=function(e){var n=this,r=this.clock.setTimeout(function(){"to"in e&&e.to?n.sendTo(e._event,e.to,!0):n.send(e._event)},e.delay);e.id&&(this.delayedEventsMap[e.id]=r)},t.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},t.prototype.exec=function(e,n,r){r===void 0&&(r=this.machine.options.actions),this._exec(e,n.context,n._event,r)},t.prototype.removeChild=function(e){var n;this.children.delete(e),this.forwardTo.delete(e),(n=this.state)===null||n===void 0||delete n.children[e]},t.prototype.stopChild=function(e){var n=this.children.get(e);n&&(this.removeChild(e),ie(n.stop)&&n.stop())},t.prototype.spawn=function(e,n,r){if(this.status!==Pe.Running)return Pf(e,n);if(Ll(e))return this.spawnPromise(Promise.resolve(e),n);if(ie(e))return this.spawnCallback(e,n);if(ay(e))return this.spawnActor(e,n);if(z1(e))return this.spawnObservable(e,n);if(xr(e))return this.spawnMachine(e,F(F({},r),{id:n}));if(V1(e))return this.spawnBehavior(e,n);throw new Error('Unable to spawn entity "'.concat(n,'" of type "').concat(typeof e,'".'))},t.prototype.spawnMachine=function(e,n){var r=this;n===void 0&&(n={});var i=new t(e,F(F({},this.options),{parent:this,id:n.id||e.id})),s=F(F({},by),n);s.sync&&i.onTransition(function(a){r.send(yf,{state:a,id:i.id})});var o=i;return this.children.set(i.id,o),s.autoForward&&this.forwardTo.add(i.id),i.onDone(function(a){r.removeChild(i.id),r.send(Re(a,{origin:i.id}))}).start(),o},t.prototype.spawnBehavior=function(e,n){var r=yy(e,{id:n,parent:this});return this.children.set(n,r),r},t.prototype.spawnPromise=function(e,n){var r,i=this,s=!1,o;e.then(function(c){s||(o=c,i.removeChild(n),i.send(Re(js(n,c),{origin:n})))},function(c){if(!s){i.removeChild(n);var l=Jr(n,c);try{i.send(Re(l,{origin:n}))}catch{i.devTools&&i.devTools.send(l,i.state),i.machine.strict&&i.stop()}}});var a=(r={id:n,send:function(){},subscribe:function(c,l,u){var d=Ns(c,l,u),h=!1;return e.then(function(v){h||(d.next(v),!h&&d.complete())},function(v){h||d.error(v)}),{unsubscribe:function(){return h=!0}}},stop:function(){s=!0},toJSON:function(){return{id:n}},getSnapshot:function(){return o}},r[tn]=function(){return this},r);return this.children.set(n,a),a},t.prototype.spawnCallback=function(e,n){var r,i=this,s=!1,o=new Set,a=new Set,c,l=function(h){c=h,a.forEach(function(v){return v(h)}),!s&&i.send(Re(h,{origin:n}))},u;try{u=e(l,function(h){o.add(h)})}catch(h){this.send(Jr(n,h))}if(Ll(u))return this.spawnPromise(u,n);var d=(r={id:n,send:function(h){return o.forEach(function(v){return v(h)})},subscribe:function(h){var v=Ns(h);return a.add(v.next),{unsubscribe:function(){a.delete(v.next)}}},stop:function(){s=!0,ie(u)&&u()},toJSON:function(){return{id:n}},getSnapshot:function(){return c}},r[tn]=function(){return this},r);return this.children.set(n,d),d},t.prototype.spawnObservable=function(e,n){var r,i=this,s,o=e.subscribe(function(c){s=c,i.send(Re(c,{origin:n}))},function(c){i.removeChild(n),i.send(Re(Jr(n,c),{origin:n}))},function(){i.removeChild(n),i.send(Re(js(n),{origin:n}))}),a=(r={id:n,send:function(){},subscribe:function(c,l,u){return e.subscribe(c,l,u)},stop:function(){return o.unsubscribe()},getSnapshot:function(){return s},toJSON:function(){return{id:n}}},r[tn]=function(){return this},r);return this.children.set(n,a),a},t.prototype.spawnActor=function(e,n){return this.children.set(n,e),e},t.prototype.spawnActivity=function(e){var n=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(n){var r=n(this.state.context,e);this.spawnEffect(e.id,r)}},t.prototype.spawnEffect=function(e,n){var r;this.children.set(e,(r={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:n||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}},r[tn]=function(){return this},r))},t.prototype.attachDev=function(){var e=yc();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var n=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(F(F({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:F({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}vy(this)}},t.prototype.toJSON=function(){return{id:this.id}},t.prototype[tn]=function(){return this},t.prototype.getSnapshot=function(){return this.status===Pe.NotStarted?this.initialState:this._state},t.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,n){return setTimeout(e,n)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},t.interpret=kf,t}();function kf(t,e){var n=new wy(t,e);return n}function Sy(t){if(typeof t=="string"){var e={type:t};return e.toString=function(){return t},e}return t}function ss(t){return F(F({type:Ca},t),{toJSON:function(){t.onDone,t.onError;var e=hc(t,["onDone","onError"]);return F(F({},e),{type:Ca,src:Sy(t.src)})}})}var os="",Ta="#",Vo="*",Kn={},Qn=function(t){return t[0]===Ta},Cy=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},_y=function(){function t(e,n,r,i){r===void 0&&(r="context"in e?e.context:void 0);var s=this,o;this.config=e,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign(Cy(),n),this.parent=i==null?void 0:i.parent,this.key=this.config.key||(i==null?void 0:i.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:bf),this.id=this.config.id||he([this.machine.key],re(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(o=this.config.schema)!==null&&o!==void 0?o:{},this.description=this.config.description,this.initial=this.config.initial,this.states=this.config.states?Qr(this.config.states,function(l,u){var d,h=new t(l,{},void 0,{parent:s,key:u});return Object.assign(s.idMap,F((d={},d[h.id]=h,d),h.idMap)),h}):Kn;var a=0;function c(l){var u,d;l.order=a++;try{for(var h=J(Tf(l)),v=h.next();!v.done;v=h.next()){var m=v.value;c(m)}}catch(f){u={error:f}}finally{try{v&&!v.done&&(d=h.return)&&d.call(h)}finally{if(u)throw u.error}}}c(this),this.history=this.config.history===!0?"shallow":this.config.history||!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(l){var u=l.event;return u===os}):os in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=ct(this.config.entry||this.config.onEntry).map(function(l){return gi(l)}),this.onExit=ct(this.config.exit||this.config.onExit).map(function(l){return gi(l)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=ct(this.config.invoke).map(function(l,u){var d,h;if(xr(l)){var v=rs(s.id,u);return s.machine.options.services=F((d={},d[v]=l,d),s.machine.options.services),ss({src:v,id:v})}else if(ce(l.src)){var v=l.id||rs(s.id,u);return ss(F(F({},l),{id:v,src:l.src}))}else if(xr(l.src)||ie(l.src)){var v=l.id||rs(s.id,u);return s.machine.options.services=F((h={},h[v]=l.src,h),s.machine.options.services),ss(F(F({id:v},l),{src:v}))}else{var m=l.src;return ss(F(F({id:rs(s.id,u)},l),{src:m}))}}),this.activities=ct(this.config.activities).concat(this.invoke).map(function(l){return vc(l)}),this.transition=this.transition.bind(this),this.tags=ct(this.config.tags)}return t.prototype._init=function(){this.__cache.transitions||Af(this).forEach(function(e){return e.on})},t.prototype.withConfig=function(e,n){var r=this.options,i=r.actions,s=r.activities,o=r.guards,a=r.services,c=r.delays;return new t(this.config,{actions:F(F({},i),e.actions),activities:F(F({},s),e.activities),guards:F(F({},o),e.guards),services:F(F({},a),e.services),delays:F(F({},c),e.delays)},n??this.context)},t.prototype.withContext=function(e){return new t(this.config,this.options,e)},Object.defineProperty(t.prototype,"context",{get:function(){return ie(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:Qr(this.states,function(e){return e.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return this.definition},Object.defineProperty(t.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce(function(n,r){return n[r.eventType]=n[r.eventType]||[],n[r.eventType].push(r),n},{})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),t.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var n=e===os,r=this.transitions.filter(function(i){var s=i.eventType===e;return n?s:s||i.eventType===Vo});return this.__cache.candidates[e]=r,r},t.prototype.getDelayedTransitions=function(){var e=this,n=this.config.after;if(!n)return[];var r=function(s,o){var a=ie(s)?"".concat(e.id,":delay[").concat(o,"]"):s,c=ry(a,e.id);return e.onEntry.push(K1(c,{delay:s})),e.onExit.push(X1(c)),c},i=Rr(n)?n.map(function(s,o){var a=r(s.delay,o);return F(F({},s),{event:a})}):ye(Object.keys(n).map(function(s,o){var a=n[s],c=ce(a)?{target:a}:a,l=isNaN(+s)?s:+s,u=r(l,o);return ct(c).map(function(d){return F(F({},d),{event:u,delay:l})})}));return i.map(function(s){var o=s.delay;return F(F({},e.formatTransition(s)),{delay:o})})},t.prototype.getStateNodes=function(e){var n,r=this;if(!e)return[];var i=e instanceof et?e.value:ri(e,this.delimiter);if(ce(i)){var s=this.getStateNode(i).initial;return s!==void 0?this.getStateNodes((n={},n[i]=s,n)):[this,this.states[i]]}var o=Object.keys(i),a=[this];return a.push.apply(a,he([],re(ye(o.map(function(c){return r.getStateNode(c).getStateNodes(i[c])}))),!1)),a},t.prototype.handles=function(e){var n=wf(e);return this.events.includes(n)},t.prototype.resolveState=function(e){var n=e instanceof et?e:et.create(e),r=Array.from(Xr([],this.getStateNodes(n.value)));return new et(F(F({},n),{value:this.resolve(n.value),configuration:r,done:Is(r,this),tags:Ml(r),machine:this.machine}))},t.prototype.transitionLeafNode=function(e,n,r){var i=this.getStateNode(e),s=i.next(n,r);return!s||!s.transitions.length?this.next(n,r):s},t.prototype.transitionCompoundNode=function(e,n,r){var i=Object.keys(e),s=this.getStateNode(i[0]),o=s._transition(e[i[0]],n,r);return!o||!o.transitions.length?this.next(n,r):o},t.prototype.transitionParallelNode=function(e,n,r){var i,s,o={};try{for(var a=J(Object.keys(e)),c=a.next();!c.done;c=a.next()){var l=c.value,u=e[l];if(u){var d=this.getStateNode(l),h=d._transition(u,n,r);h&&(o[l]=h)}}}catch(y){i={error:y}}finally{try{c&&!c.done&&(s=a.return)&&s.call(a)}finally{if(i)throw i.error}}var v=Object.keys(o).map(function(y){return o[y]}),m=ye(v.map(function(y){return y.transitions})),f=v.some(function(y){return y.transitions.length>0});if(!f)return this.next(n,r);var w=ye(Object.keys(o).map(function(y){return o[y].configuration}));return{transitions:m,exitSet:ye(v.map(function(y){return y.exitSet})),configuration:w,source:n,actions:ye(Object.keys(o).map(function(y){return o[y].actions}))}},t.prototype._transition=function(e,n,r){return ce(e)?this.transitionLeafNode(e,n,r):Object.keys(e).length===1?this.transitionCompoundNode(e,n,r):this.transitionParallelNode(e,n,r)},t.prototype.getTransitionData=function(e,n){return this._transition(e.value,e,Re(n))},t.prototype.next=function(e,n){var r,i,s=this,o=n.name,a=[],c=[],l;try{for(var u=J(this.getCandidates(o)),d=u.next();!d.done;d=u.next()){var h=d.value,v=h.cond,m=h.in,f=e.context,w=m?ce(m)&&Qn(m)?e.matches(ri(this.getStateNodeById(m).path,this.delimiter)):gc(ri(m,this.delimiter),I1(this.path.slice(0,-2))(e.value)):!0,y=!1;try{y=!v||Ef(this.machine,v,f,n,e)}catch(E){throw new Error("Unable to evaluate guard '".concat(v.name||v.type,"' in transition for event '").concat(o,"' in state node '").concat(this.id,`':
42
+ `).concat(E.message))}if(y&&w){h.target!==void 0&&(c=h.target),a.push.apply(a,he([],re(h.actions),!1)),l=h;break}}}catch(E){r={error:E}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}if(l){if(!c.length)return{transitions:[l],exitSet:[],configuration:e.value?[this]:[],source:e,actions:a};var C=ye(c.map(function(E){return s.getRelativeStateNodes(E,e.historyValue)})),b=!!l.internal;return{transitions:[l],exitSet:b?[]:ye(c.map(function(E){return s.getPotentiallyReenteringNodes(E)})),configuration:C,source:e,actions:a}}},t.prototype.getPotentiallyReenteringNodes=function(e){if(this.order<e.order)return[this];for(var n=[],r=this,i=e;r&&r!==i;)n.push(r),r=r.parent;return r!==i?[]:(n.push(i),n)},t.prototype.getActions=function(e,n,r,i,s,o,a){var c,l,u,d,h=this,v=o?Xr([],this.getStateNodes(o.value)):[],m=new Set;try{for(var f=J(Array.from(e).sort(function(L,A){return L.order-A.order})),w=f.next();!w.done;w=f.next()){var y=w.value;(!Yr(v,y)||Yr(r.exitSet,y)||y.parent&&m.has(y.parent))&&m.add(y)}}catch(L){c={error:L}}finally{try{w&&!w.done&&(l=f.return)&&l.call(f)}finally{if(c)throw c.error}}try{for(var C=J(v),b=C.next();!b.done;b=C.next()){var y=b.value;(!Yr(e,y)||Yr(r.exitSet,y.parent))&&r.exitSet.push(y)}}catch(L){u={error:L}}finally{try{b&&!b.done&&(d=C.return)&&d.call(C)}finally{if(u)throw u.error}}r.exitSet.sort(function(L,A){return A.order-L.order});var E=Array.from(m).sort(function(L,A){return L.order-A.order}),x=new Set(r.exitSet),g=ye(E.map(function(L){var A=[];if(L.type!=="final")return A;var D=L.parent;if(!D.parent)return A;A.push(is(L.id,L.doneData),is(D.id,L.doneData?Ws(L.doneData,i,s):void 0));var N=D.parent;return N.type==="parallel"&&vi(N).every(function(V){return Is(r.configuration,V)})&&A.push(is(N.id)),A})),_=E.map(function(L){var A=L.onEntry,D=L.activities.map(function(N){return Y1(N)});return{type:"entry",actions:nn(a?he(he([],re(A),!1),re(D),!1):he(he([],re(D),!1),re(A),!1),h.machine.options.actions)}}).concat({type:"state_done",actions:g.map(function(L){return W1(L)})}),O=Array.from(x).map(function(L){return{type:"exit",actions:nn(he(he([],re(L.onExit),!1),re(L.activities.map(function(A){return ey(A)})),!1),h.machine.options.actions)}}),T=O.concat({type:"transition",actions:nn(r.actions,this.machine.options.actions)}).concat(_);if(n){var R=nn(ye(he([],re(e),!1).sort(function(L,A){return A.order-L.order}).map(function(L){return L.onExit})),this.machine.options.actions).filter(function(L){return!xa(L)});return T.concat({type:"stop",actions:R})}return T},t.prototype.transition=function(e,n,r,i){e===void 0&&(e=this.initialState);var s=Re(n),o;if(e instanceof et)o=r===void 0?e:this.resolveState(et.from(e,r));else{var a=ce(e)?this.resolve(Gs(this.getResolvedPath(e))):this.resolve(e),c=r??this.machine.context;o=this.resolveState(et.from(a,c))}if(this.strict&&!this.events.includes(s.name)&&!B1(s.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(s.name,"'"));var l=this._transition(o.value,o,s)||{transitions:[],configuration:[],exitSet:[],source:o,actions:[]},u=Xr([],this.getStateNodes(o.value)),d=l.configuration.length?Xr(u,l.configuration):u;return l.configuration=he([],re(d),!1),this.resolveTransition(l,o,o.context,i,s)},t.prototype.resolveRaisedTransition=function(e,n,r,i){var s,o=e.actions;return e=this.transition(e,n,void 0,i),e._event=r,e.event=r.data,(s=e.actions).unshift.apply(s,he([],re(o),!1)),e},t.prototype.resolveTransition=function(e,n,r,i,s){var o,a,c,l,u=this;s===void 0&&(s=ir);var d=e.configuration,h=!n||e.transitions.length>0,v=h?e.configuration:n?n.configuration:[],m=Is(v,this),f=h?ly(this.machine,d):void 0,w=n?n.historyValue?n.historyValue:e.source?this.machine.historyValue(n.value):void 0:void 0,y=this.getActions(new Set(v),m,e,r,s,n,i),C=n?F({},n.activities):{};try{for(var b=J(y),E=b.next();!E.done;E=b.next()){var x=E.value;try{for(var g=(c=void 0,J(x.actions)),_=g.next();!_.done;_=g.next()){var O=_.value;O.type===Sa?C[O.activity.id||O.activity.type]=O:O.type===pc&&(C[O.activity.id||O.activity.type]=!1)}}catch(Ce){c={error:Ce}}finally{try{_&&!_.done&&(l=g.return)&&l.call(g)}finally{if(c)throw c.error}}}}catch(Ce){o={error:Ce}}finally{try{E&&!E.done&&(a=b.return)&&a.call(b)}finally{if(o)throw o.error}}var T=re(Zs(this,n,r,s,y,i,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),R=T[0],L=T[1],A=re(H1(R,xa),2),D=A[0],N=A[1],V=R.filter(function(Ce){var me;return Ce.type===Sa&&((me=Ce.activity)===null||me===void 0?void 0:me.type)===Ca}),q=V.reduce(function(Ce,me){return Ce[me.activity.id]=sy(me.activity,u.machine,L,s),Ce},n?F({},n.children):{}),I=new et({value:f||n.value,context:L,_event:s,_sessionid:n?n._sessionid:null,historyValue:f?w?U1(w,f):void 0:n?n.historyValue:void 0,history:!f||e.source?n:void 0,actions:f?N:[],activities:f?C:n?n.activities:{},events:[],configuration:v,transitions:e.transitions,children:q,done:m,tags:Ml(v),machine:this}),z=r!==L;I.changed=s.name===yf||z;var le=I.history;le&&delete le.history;var ne=!m&&(this._transient||d.some(function(Ce){return Ce._transient}));if(!h&&(!ne||s.name===os))return I;var se=I;if(!m)for(ne&&(se=this.resolveRaisedTransition(se,{type:R1},s,i));D.length;){var Z=D.shift();se=this.resolveRaisedTransition(se,Z._event,s,i)}var Oe=se.changed||(le?!!se.actions.length||z||typeof le.value!=typeof se.value||!Lf(se.value,le.value):void 0);return se.changed=Oe,se.history=le,se},t.prototype.getStateNode=function(e){if(Qn(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var n=this.states[e];if(!n)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return n},t.prototype.getStateNodeById=function(e){var n=Qn(e)?e.slice(Ta.length):e;if(n===this.id)return this;var r=this.machine.idMap[n];if(!r)throw new Error("Child state node '#".concat(n,"' does not exist on machine '").concat(this.id,"'"));return r},t.prototype.getStateNodeByPath=function(e){if(typeof e=="string"&&Qn(e))try{return this.getStateNodeById(e.slice(1))}catch{}for(var n=Ea(e,this.delimiter).slice(),r=this;n.length;){var i=n.shift();if(!i.length)break;r=r.getStateNode(i)}return r},t.prototype.resolve=function(e){var n,r=this;if(!e)return this.initialStateValue||Kn;switch(this.type){case"parallel":return Qr(this.initialStateValue,function(s,o){return s?r.getStateNode(o).resolve(e[o]||s):Kn});case"compound":if(ce(e)){var i=this.getStateNode(e);return i.type==="parallel"||i.type==="compound"?(n={},n[e]=i.initialStateValue,n):e}return Object.keys(e).length?Qr(e,function(s,o){return s?r.getStateNode(o).resolve(s):Kn}):this.initialStateValue||{};default:return e||Kn}},t.prototype.getResolvedPath=function(e){if(Qn(e)){var n=this.machine.idMap[e.slice(Ta.length)];if(!n)throw new Error("Unable to find state node '".concat(e,"'"));return n.path}return Ea(e,this.delimiter)},Object.defineProperty(t.prototype,"initialStateValue",{get:function(){var e;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var n;if(this.type==="parallel")n=Rl(this.states,function(r){return r.initialStateValue||Kn},function(r){return r.type!=="history"});else if(this.initial!==void 0){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));n=Ks(this.states[this.initial])?this.initial:(e={},e[this.initial]=this.states[this.initial].initialStateValue,e)}else n={};return this.__cache.initialStateValue=n,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),t.prototype.getInitialState=function(e,n){this._init();var r=this.getStateNodes(e);return this.resolveTransition({configuration:r,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,n??this.machine.context,void 0)},Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){var e;if(this.type==="history"){var n=this.config;ce(n.target)?e=Qn(n.target)?Gs(this.machine.getStateNodeById(n.target).path.slice(this.path.length-1)):n.target:e=n.target}return e},enumerable:!1,configurable:!0}),t.prototype.getRelativeStateNodes=function(e,n,r){return r===void 0&&(r=!0),r?e.type==="history"?e.resolveHistory(n):e.initialStateNodes:[e]},Object.defineProperty(t.prototype,"initialStateNodes",{get:function(){var e=this;if(Ks(this))return[this];if(this.type==="compound"&&!this.initial)return[this];var n=Ds(this.initialStateValue);return ye(n.map(function(r){return e.getFromRelativePath(r)}))},enumerable:!1,configurable:!0}),t.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var n=re(e),r=n[0],i=n.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(r,"' from node with no states"));var s=this.getStateNode(r);if(s.type==="history")return s.resolveHistory();if(!this.states[r])throw new Error("Child state '".concat(r,"' does not exist on '").concat(this.id,"'"));return this.states[r].getFromRelativePath(i)},t.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:Rl(this.states,function(n,r){if(!e)return n.historyValue();var i=ce(e)?void 0:e[r];return n.historyValue(i||n.initialStateValue)},function(n){return!n.history})}},t.prototype.resolveHistory=function(e){var n=this;if(this.type!=="history")return[this];var r=this.parent;if(!e){var i=this.target;return i?ye(Ds(i).map(function(o){return r.getFromRelativePath(o)})):r.initialStateNodes}var s=F1(r.path,"states")(e).current;return ce(s)?[r.getStateNode(s)]:ye(Ds(s).map(function(o){return n.history==="deep"?r.getFromRelativePath(o):[r.states[o[0]]]}))},Object.defineProperty(t.prototype,"stateIds",{get:function(){var e=this,n=ye(Object.keys(this.states).map(function(r){return e.states[r].stateIds}));return[this.id].concat(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"events",{get:function(){var e,n,r,i;if(this.__cache.events)return this.__cache.events;var s=this.states,o=new Set(this.ownEvents);if(s)try{for(var a=J(Object.keys(s)),c=a.next();!c.done;c=a.next()){var l=c.value,u=s[l];if(u.states)try{for(var d=(r=void 0,J(u.events)),h=d.next();!h.done;h=d.next()){var v=h.value;o.add("".concat(v))}}catch(m){r={error:m}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}}}catch(m){e={error:m}}finally{try{c&&!c.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(o)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter(function(n){return!(!n.target&&!n.actions.length&&n.internal)}).map(function(n){return n.eventType}));return Array.from(e)},enumerable:!1,configurable:!0}),t.prototype.resolveTarget=function(e){var n=this;if(e!==void 0)return e.map(function(r){if(!ce(r))return r;var i=r[0]===n.delimiter;if(i&&!n.parent)return n.getStateNodeByPath(r.slice(1));var s=i?n.key+r:r;if(n.parent)try{var o=n.parent.getStateNodeByPath(s);return o}catch(a){throw new Error("Invalid transition definition for state node '".concat(n.id,`':
43
+ `).concat(a.message))}else return n.getStateNodeByPath(s)})},t.prototype.formatTransition=function(e){var n=this,r=G1(e.target),i="internal"in e?e.internal:r?r.some(function(c){return ce(c)&&c[0]===n.delimiter}):!0,s=this.machine.options.guards,o=this.resolveTarget(r),a=F(F({},e),{actions:nn(ct(e.actions)),cond:_f(e.cond,s),target:o,source:this,internal:i,eventType:e.event,toJSON:function(){return F(F({},a),{target:a.target?a.target.map(function(c){return"#".concat(c.id)}):void 0,source:"#".concat(n.id)})}});return a},t.prototype.formatTransitions=function(){var e,n,r=this,i;if(!this.config.on)i=[];else if(Array.isArray(this.config.on))i=this.config.on;else{var s=this.config.on,o=Vo,a=s[o],c=a===void 0?[]:a,l=hc(s,[typeof o=="symbol"?o:o+""]);i=ye(Object.keys(l).map(function(C){var b=Zn(C,l[C]);return b}).concat(Zn(Vo,c)))}var u=this.config.always?Zn("",this.config.always):[],d=this.config.onDone?Zn(String(is(this.id)),this.config.onDone):[],h=ye(this.invoke.map(function(C){var b=[];return C.onDone&&b.push.apply(b,he([],re(Zn(String(js(C.id)),C.onDone)),!1)),C.onError&&b.push.apply(b,he([],re(Zn(String(Jr(C.id)),C.onError)),!1)),b})),v=this.after,m=ye(he(he(he(he([],re(d),!1),re(h),!1),re(i),!1),re(u),!1).map(function(C){return ct(C).map(function(b){return r.formatTransition(b)})}));try{for(var f=J(v),w=f.next();!w.done;w=f.next()){var y=w.value;m.push(y)}}catch(C){e={error:C}}finally{try{w&&!w.done&&(n=f.return)&&n.call(f)}finally{if(e)throw e.error}}return m},t}();function Ey(t,e,n){return n===void 0&&(n=t.context),new _y(t,e,n)}var xy=ny,Aa;(function(t){t[t.Effect=1]="Effect",t[t.LayoutEffect=2]="LayoutEffect"})(Aa||(Aa={}));var ii=p.useLayoutEffect;function Nl(t){var e=j.useRef();return e.current||(e.current={v:t()}),e.current.v}var Oy=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},Py=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Ty(t,e){var n,r,i=Oy([[],[]],2),s=i[0],o=i[1];try{for(var a=Py(t),c=a.next();!c.done;c=a.next()){var l=c.value;e(l)?s.push(l):o.push(l)}}catch(u){n={error:u}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[s,o]}var Hr=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},jl=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,s;r<i;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return t.concat(s||Array.prototype.slice.call(e))};function Il(t,e){var n=t.exec,r=n(e.context,e._event.data,{action:t,state:e,_event:e._event});r()}function Ay(t){var e=p.useRef([]),n=p.useRef([]);ii(function(){var r=t.subscribe(function(i){var s,o;if(i.actions.length){var a=i.actions.filter(function(d){return typeof d.exec=="function"&&"__effect"in d.exec}),c=Hr(Ty(a,function(d){return d.exec.__effect===Aa.Effect}),2),l=c[0],u=c[1];(s=e.current).push.apply(s,jl([],Hr(l.map(function(d){return[d,i]})),!1)),(o=n.current).push.apply(o,jl([],Hr(u.map(function(d){return[d,i]})),!1))}});return function(){r.unsubscribe()}},[]),ii(function(){for(;n.current.length;){var r=Hr(n.current.shift(),2),i=r[0],s=r[1];Il(i,s)}}),p.useEffect(function(){for(;e.current.length;){var r=Hr(e.current.shift(),2),i=r[0],s=r[1];Il(i,s)}})}var si=function(){return si=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},si.apply(this,arguments)},Ry=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Ly(t,e,n){if(typeof t=="object")return t;var r=function(){};return{next:t,error:e||r,complete:n||r}}function ky(t,e,n){e===void 0&&(e={});var r=Nl(function(){return typeof t=="function"?t():t}),i=e.context,s=e.guards,o=e.actions,a=e.activities,c=e.services,l=e.delays,u=e.state,d=Ry(e,["context","guards","actions","activities","services","delays","state"]),h=Nl(function(){var v={context:i,guards:s,actions:o,activities:a,services:c,delays:l},m=r.withConfig(v,function(){return si(si({},r.context),i)});return kf(m,si({deferEvents:!0},d))});return ii(function(){var v;return n&&(v=h.subscribe(Ly(n))),function(){v==null||v.unsubscribe()}},[n]),ii(function(){return h.start(u?et.create(u):void 0),function(){h.stop()}},[]),ii(function(){Object.assign(h.machine.options.actions,o),Object.assign(h.machine.options.guards,s),Object.assign(h.machine.options.activities,a),Object.assign(h.machine.options.services,c),Object.assign(h.machine.options.delays,l)},[o,s,a,c,l]),Ay(h),h}var My=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s};function Dy(t,e){e===void 0&&(e={});var n=p.useCallback(function(a){var c=a.changed===void 0&&Object.keys(a.children).length;(a.changed||c)&&o(a)},[]),r=ky(t,e,n),i=My(p.useState(function(){var a=r.machine.initialState;return e.state?et.create(e.state):a}),2),s=i[0],o=i[1];return[s,r.send,r]}function we(){return we=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},we.apply(this,arguments)}function sr(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}const W={arr:Array.isArray,obj:t=>Object.prototype.toString.call(t)==="[object Object]",fun:t=>typeof t=="function",str:t=>typeof t=="string",num:t=>typeof t=="number",und:t=>t===void 0,nul:t=>t===null,set:t=>t instanceof Set,map:t=>t instanceof Map,equ(t,e){if(typeof t!=typeof e)return!1;if(W.str(t)||W.num(t))return t===e;if(W.obj(t)&&W.obj(e)&&Object.keys(t).length+Object.keys(e).length===0)return!0;let n;for(n in t)if(!(n in e))return!1;for(n in e)if(t[n]!==e[n])return!1;return W.und(n)?t===e:!0}};function Ny(t,e){return e===void 0&&(e=!0),n=>(W.arr(n)?n:Object.keys(n)).reduce((r,i)=>{const s=e?i[0].toLowerCase()+i.substring(1):i;return r[s]=t(s),r},t)}function jy(){const t=p.useState(!1),e=t[1];return p.useCallback(()=>e(r=>!r),[])}function yn(t,e){return W.und(t)||W.nul(t)?e:t}function as(t){return W.und(t)?[]:W.arr(t)?t:[t]}function nr(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return W.fun(t)?t(...n):t}function Iy(t){return t.to,t.from,t.config,t.onStart,t.onRest,t.onFrame,t.children,t.reset,t.reverse,t.force,t.immediate,t.delay,t.attach,t.destroyed,t.interpolateTo,t.ref,t.lazy,sr(t,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}function Ho(t){const e=Iy(t);if(W.und(e))return we({to:e},t);const n=Object.keys(t).reduce((r,i)=>W.und(e[i])?we({},r,{[i]:t[i]}):r,{});return we({to:e},n)}function Fy(t,e){return e&&(W.fun(e)?e(t):W.obj(e)&&(e.current=t)),t}class dt{constructor(){this.payload=void 0,this.children=[]}getAnimatedValue(){return this.getValue()}getPayload(){return this.payload||this}attach(){}detach(){}getChildren(){return this.children}addChild(e){this.children.length===0&&this.attach(),this.children.push(e)}removeChild(e){const n=this.children.indexOf(e);this.children.splice(n,1),this.children.length===0&&this.detach()}}class Ra extends dt{constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach(e=>e instanceof dt&&e.addChild(this)),this.detach=()=>this.payload.forEach(e=>e instanceof dt&&e.removeChild(this))}}class Mf extends dt{constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach(e=>e instanceof dt&&e.addChild(this)),this.detach=()=>Object.values(this.payload).forEach(e=>e instanceof dt&&e.removeChild(this))}getValue(e){e===void 0&&(e=!1);const n={};for(const r in this.payload){const i=this.payload[r];e&&!(i instanceof dt)||(n[r]=i instanceof dt?i[e?"getAnimatedValue":"getValue"]():i)}return n}getAnimatedValue(){return this.getValue(!0)}}let bc;function By(t,e){bc={fn:t,transform:e}}let Df;function Vy(t){Df=t}let Nf=t=>typeof window<"u"?window.requestAnimationFrame(t):-1,Qs;function Hy(t){Qs=t}let jf=()=>Date.now(),Uy=t=>t.current,If;function $y(t){If=t}class zy extends Mf{constructor(e,n){super(),this.update=void 0,this.payload=e.style?we({},e,{style:If(e.style)}):e,this.update=n,this.attach()}}const qy=t=>W.fun(t)&&!(t.prototype instanceof p.Component),Gy=t=>p.forwardRef((n,r)=>{const i=jy(),s=p.useRef(!0),o=p.useRef(null),a=p.useRef(null),c=p.useCallback(h=>{const v=o.current,m=()=>{let f=!1;a.current&&(f=bc.fn(a.current,o.current.getAnimatedValue())),(!a.current||f===!1)&&i()};o.current=new zy(h,m),v&&v.detach()},[]);p.useEffect(()=>()=>{s.current=!1,o.current&&o.current.detach()},[]),p.useImperativeHandle(r,()=>Uy(a)),c(n);const l=o.current.getValue();l.scrollTop,l.scrollLeft;const u=sr(l,["scrollTop","scrollLeft"]),d=qy(t)?void 0:h=>a.current=Fy(h,r);return p.createElement(t,we({},u,{ref:d}))});let oi=!1;const kn=new Set,Ff=()=>{if(!oi)return!1;let t=jf();for(let e of kn){let n=!1;for(let r=0;r<e.configs.length;r++){let i=e.configs[r],s,o;for(let a=0;a<i.animatedValues.length;a++){let c=i.animatedValues[a];if(c.done)continue;let l=i.fromValues[a],u=i.toValues[a],d=c.lastPosition,h=u instanceof dt,v=Array.isArray(i.initialVelocity)?i.initialVelocity[a]:i.initialVelocity;if(h&&(u=u.getValue()),i.immediate){c.setValue(u),c.done=!0;continue}if(typeof l=="string"||typeof u=="string"){c.setValue(u),c.done=!0;continue}if(i.duration!==void 0)d=l+i.easing((t-c.startTime)/i.duration)*(u-l),s=t>=c.startTime+i.duration;else if(i.decay)d=l+v/(1-.998)*(1-Math.exp(-(1-.998)*(t-c.startTime))),s=Math.abs(c.lastPosition-d)<.1,s&&(u=d);else{o=c.lastTime!==void 0?c.lastTime:t,v=c.lastVelocity!==void 0?c.lastVelocity:i.initialVelocity,t>o+64&&(o=t);let m=Math.floor(t-o);for(let C=0;C<m;++C){let b=-i.tension*(d-u),E=-i.friction*v,x=(b+E)/i.mass;v=v+x*1/1e3,d=d+v*1/1e3}let f=i.clamp&&i.tension!==0?l<u?d>u:d<u:!1,w=Math.abs(v)<=i.precision,y=i.tension!==0?Math.abs(u-d)<=i.precision:!0;s=f||w&&y,c.lastVelocity=v,c.lastTime=t}h&&!i.toValues[a].done&&(s=!1),s?(c.value!==u&&(d=u),c.done=!0):n=!0,c.setValue(d),c.lastPosition=d}e.props.onFrame&&(e.values[i.name]=i.interpolation.getValue())}e.props.onFrame&&e.props.onFrame(e.values),n||(kn.delete(e),e.stop(!0))}return kn.size?Nf(Ff):oi=!1,oi},Wy=t=>{kn.has(t)||kn.add(t),oi||(oi=!0,Nf(Ff))},Zy=t=>{kn.has(t)&&kn.delete(t)};function Js(t,e,n){if(typeof t=="function")return t;if(Array.isArray(t))return Js({range:t,output:e,extrapolate:n});if(Qs&&typeof t.output[0]=="string")return Qs(t);const r=t,i=r.output,s=r.range||[0,1],o=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",c=r.easing||(l=>l);return l=>{const u=Qy(l,s);return Ky(l,s[u],s[u+1],i[u],i[u+1],c,o,a,r.map)}}function Ky(t,e,n,r,i,s,o,a,c){let l=c?c(t):t;if(l<e){if(o==="identity")return l;o==="clamp"&&(l=e)}if(l>n){if(a==="identity")return l;a==="clamp"&&(l=n)}return r===i?r:e===n?t<=e?r:i:(e===-1/0?l=-l:n===1/0?l=l-e:l=(l-e)/(n-e),l=s(l),r===-1/0?l=-l:i===1/0?l=l+r:l=l*(i-r)+r,l)}function Qy(t,e){for(var n=1;n<e.length-1&&!(e[n]>=t);++n);return n-1}class Or extends Ra{constructor(e,n,r,i){super(),this.calc=void 0,this.payload=e instanceof Ra&&!(e instanceof Or)?e.getPayload():Array.isArray(e)?e:[e],this.calc=Js(n,r,i)}getValue(){return this.calc(...this.payload.map(e=>e.getValue()))}updateConfig(e,n,r){this.calc=Js(e,n,r)}interpolate(e,n,r){return new Or(this,e,n,r)}}const Jn=(t,e,n)=>t&&new Or(t,e,n),Jy={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}};function Bf(t,e){"update"in t?e.add(t):t.getChildren().forEach(n=>Bf(n,e))}class La extends dt{constructor(e){var n;super(),n=this,this.animatedStyles=new Set,this.value=void 0,this.startPosition=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.startTime=void 0,this.lastTime=void 0,this.done=!1,this.setValue=function(r,i){i===void 0&&(i=!0),n.value=r,i&&n.flush()},this.value=e,this.startPosition=e,this.lastPosition=e}flush(){this.animatedStyles.size===0&&Bf(this,this.animatedStyles),this.animatedStyles.forEach(e=>e.update())}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,n,r){return new Or(this,e,n,r)}}class Xy extends Ra{constructor(e){super(),this.payload=e.map(n=>new La(n))}setValue(e,n){n===void 0&&(n=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((r,i)=>this.payload[i].setValue(r,n)):this.payload.forEach(r=>r.setValue(e,n))}getValue(){return this.payload.map(e=>e.getValue())}interpolate(e,n){return new Or(this,e,n)}}let Yy=0,e2=class{constructor(){this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=()=>this.interpolations,this.id=Yy++}update(e){if(!e)return this;const n=Ho(e),r=n.delay,i=r===void 0?0:r,s=n.to,o=sr(n,["delay","to"]);if(W.arr(s)||W.fun(s))this.queue.push(we({},o,{delay:i,to:s}));else if(s){let a={};Object.entries(s).forEach(c=>{let l=c[0],u=c[1];const d=we({to:{[l]:u},delay:nr(i,l)},o),h=a[d.delay]&&a[d.delay].to;a[d.delay]=we({},a[d.delay],d,{to:we({},h,d.to)})}),this.queue=Object.values(a)}return this.queue=this.queue.sort((a,c)=>a.delay-c.delay),this.diff(o),this}start(e){if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach(i=>{let s=i.from,o=s===void 0?{}:s,a=i.to,c=a===void 0?{}:a;W.obj(o)&&(this.merged=we({},o,this.merged)),W.obj(c)&&(this.merged=we({},this.merged,c))});const n=this.local=++this.guid,r=this.localQueue=this.queue;this.queue=[],r.forEach((i,s)=>{let o=i.delay,a=sr(i,["delay"]);const c=u=>{s===r.length-1&&n===this.guid&&u&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),e&&e()};let l=W.arr(a.to)||W.fun(a.to);o?setTimeout(()=>{n===this.guid&&(l?this.runAsync(a,c):this.diff(a).start(c))},o):l?this.runAsync(a,c):this.diff(a).start(c)})}else W.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),Wy(this);return this}stop(e){return this.listeners.forEach(n=>n(e)),this.listeners=[],this}pause(e){return this.stop(!0),e&&Zy(this),this}runAsync(e,n){var r=this;e.delay;let i=sr(e,["delay"]);const s=this.local;let o=Promise.resolve(void 0);if(W.arr(i.to))for(let a=0;a<i.to.length;a++){const c=a,l=we({},i,Ho(i.to[c]));W.arr(l.config)&&(l.config=l.config[c]),o=o.then(()=>{if(s===this.guid)return new Promise(u=>this.diff(l).start(u))})}else if(W.fun(i.to)){let a=0,c;o=o.then(()=>i.to(l=>{const u=we({},i,Ho(l));if(W.arr(u.config)&&(u.config=u.config[a]),a++,s===this.guid)return c=new Promise(d=>this.diff(u).start(d))},function(l){return l===void 0&&(l=!0),r.stop(l)}).then(()=>c))}o.then(n)}diff(e){this.props=we({},this.props,e);let n=this.props,r=n.from,i=r===void 0?{}:r,s=n.to,o=s===void 0?{}:s,a=n.config,c=a===void 0?{}:a,l=n.reverse,u=n.attach,d=n.reset,h=n.immediate;if(l){var v=[o,i];i=v[0],o=v[1]}this.merged=we({},i,this.merged,o),this.hasChanged=!1;let m=u&&u(this);if(this.animations=Object.entries(this.merged).reduce((f,w)=>{let y=w[0],C=w[1],b=f[y]||{};const E=W.num(C),x=W.str(C)&&!C.startsWith("#")&&!/\d/.test(C)&&!Df[C],g=W.arr(C),_=!E&&!g&&!x;let O=W.und(i[y])?C:i[y],T=E||g||x?C:1,R=nr(c,y);m&&(T=m.animations[y].parent);let L=b.parent,A=b.interpolation,D=as(m?T.getPayload():T),N,V=C;_&&(V=Qs({range:[0,1],output:[C,C]})(1));let q=A&&A.getValue();const z=!W.und(L)&&b.animatedValues.some(Z=>!Z.done),le=!W.equ(V,q),ne=!W.equ(V,b.previous),se=!W.equ(R,b.config);if(d||ne&&le||se){if(E||x)L=A=b.parent||new La(O);else if(g)L=A=b.parent||new Xy(O);else if(_){let Z=b.interpolation&&b.interpolation.calc(b.parent.value);Z=Z!==void 0&&!d?Z:O,b.parent?(L=b.parent,L.setValue(0,!1)):L=new La(0);const Oe={output:[Z,C]};b.interpolation?(A=b.interpolation,b.interpolation.updateConfig(Oe)):A=L.interpolate(Oe)}return D=as(m?T.getPayload():T),N=as(L.getPayload()),d&&!_&&L.setValue(O,!1),this.hasChanged=!0,N.forEach(Z=>{Z.startPosition=Z.value,Z.lastPosition=Z.value,Z.lastVelocity=z?Z.lastVelocity:void 0,Z.lastTime=z?Z.lastTime:void 0,Z.startTime=jf(),Z.done=!1,Z.animatedStyles.clear()}),nr(h,y)&&L.setValue(_?T:C,!1),we({},f,{[y]:we({},b,{name:y,parent:L,interpolation:A,animatedValues:N,toValues:D,previous:V,config:R,fromValues:as(L.getValue()),immediate:nr(h,y),initialVelocity:yn(R.velocity,0),clamp:yn(R.clamp,!1),precision:yn(R.precision,.01),tension:yn(R.tension,170),friction:yn(R.friction,26),mass:yn(R.mass,1),duration:R.duration,easing:yn(R.easing,Z=>Z),decay:R.decay})})}else return le?f:(_&&(L.setValue(1,!1),A.updateConfig({output:[V,V]})),L.done=!0,this.hasChanged=!0,we({},f,{[y]:we({},f[y],{previous:V})}))},this.animations),this.hasChanged){this.configs=Object.values(this.animations),this.values={},this.interpolations={};for(let f in this.animations)this.interpolations[f]=this.animations[f].interpolation,this.values[f]=this.animations[f].interpolation.getValue()}return this}destroy(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0}};const t2=(t,e)=>{const n=p.useRef(!1),r=p.useRef(),i=W.fun(e),s=p.useMemo(()=>{r.current&&(r.current.map(d=>d.destroy()),r.current=void 0);let u;return[new Array(t).fill().map((d,h)=>{const v=new e2,m=i?nr(e,h,v):e[h];return h===0&&(u=m.ref),v.update(m),u||v.start(),v}),u]},[t]),o=s[0],a=s[1];r.current=o,p.useImperativeHandle(a,()=>({start:()=>Promise.all(r.current.map(u=>new Promise(d=>u.start(d)))),stop:u=>r.current.forEach(d=>d.stop(u)),get controllers(){return r.current}}));const c=p.useMemo(()=>u=>r.current.map((d,h)=>{d.update(i?nr(u,h,d):u[h]),a||d.start()}),[t]);p.useEffect(()=>{n.current?i||c(e):a||r.current.forEach(u=>u.start())}),p.useEffect(()=>(n.current=!0,()=>r.current.forEach(u=>u.destroy())),[]);const l=r.current.map(u=>u.getValues());return i?[l,c,u=>r.current.forEach(d=>d.pause(u))]:l},n2=t=>{const e=W.fun(t),n=t2(1,e?t:[t]),r=n[0],i=n[1],s=n[2];return e?[r[0],i,s]:r};class r2 extends Mf{constructor(e){e===void 0&&(e={}),super(),e.transform&&!(e.transform instanceof dt)&&(e=bc.transform(e)),this.payload=e}}const Xs={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},ft="[-+]?\\d*\\.?\\d+",Ys=ft+"%";function bo(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}const i2=new RegExp("rgb"+bo(ft,ft,ft)),s2=new RegExp("rgba"+bo(ft,ft,ft,ft)),o2=new RegExp("hsl"+bo(ft,Ys,Ys)),a2=new RegExp("hsla"+bo(ft,Ys,Ys,ft)),c2=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,l2=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,u2=/^#([0-9a-fA-F]{6})$/,d2=/^#([0-9a-fA-F]{8})$/;function f2(t){let e;return typeof t=="number"?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=u2.exec(t))?parseInt(e[1]+"ff",16)>>>0:Xs.hasOwnProperty(t)?Xs[t]:(e=i2.exec(t))?(Xn(e[1])<<24|Xn(e[2])<<16|Xn(e[3])<<8|255)>>>0:(e=s2.exec(t))?(Xn(e[1])<<24|Xn(e[2])<<16|Xn(e[3])<<8|Vl(e[4]))>>>0:(e=c2.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=d2.exec(t))?parseInt(e[1],16)>>>0:(e=l2.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=o2.exec(t))?(Fl(Bl(e[1]),cs(e[2]),cs(e[3]))|255)>>>0:(e=a2.exec(t))?(Fl(Bl(e[1]),cs(e[2]),cs(e[3]))|Vl(e[4]))>>>0:null}function Uo(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Fl(t,e,n){const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,s=Uo(i,r,t+1/3),o=Uo(i,r,t),a=Uo(i,r,t-1/3);return Math.round(s*255)<<24|Math.round(o*255)<<16|Math.round(a*255)<<8}function Xn(t){const e=parseInt(t,10);return e<0?0:e>255?255:e}function Bl(t){return(parseFloat(t)%360+360)%360/360}function Vl(t){const e=parseFloat(t);return e<0?0:e>1?255:Math.round(e*255)}function cs(t){const e=parseFloat(t);return e<0?0:e>100?1:e/100}function Hl(t){let e=f2(t);if(e===null)return t;e=e||0;let n=(e&4278190080)>>>24,r=(e&16711680)>>>16,i=(e&65280)>>>8,s=(e&255)/255;return`rgba(${n}, ${r}, ${i}, ${s})`}const ls=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,h2=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,p2=new RegExp(`(${Object.keys(Xs).join("|")})`,"g"),m2=t=>{const e=t.output.map(i=>i.replace(h2,Hl)).map(i=>i.replace(p2,Hl)),n=e[0].match(ls).map(()=>[]);e.forEach(i=>{i.match(ls).forEach((s,o)=>n[o].push(+s))});const r=e[0].match(ls).map((i,s)=>Js(we({},t,{output:n[s]})));return i=>{let s=0;return e[0].replace(ls,()=>r[s++](i)).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(o,a,c,l,u)=>`rgba(${Math.round(a)}, ${Math.round(c)}, ${Math.round(l)}, ${u})`)}};let ai={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const g2=(t,e)=>t+e.charAt(0).toUpperCase()+e.substring(1),v2=["Webkit","Ms","Moz","O"];ai=Object.keys(ai).reduce((t,e)=>(v2.forEach(n=>t[g2(n,e)]=t[e]),t),ai);function y2(t,e,n){return e==null||typeof e=="boolean"||e===""?"":!n&&typeof e=="number"&&e!==0&&!(ai.hasOwnProperty(t)&&ai[t])?e+"px":(""+e).trim()}const Ul={};$y(t=>new r2(t));Hy(m2);Vy(Xs);By((t,e)=>{if(t.nodeType&&t.setAttribute!==void 0){const i=e.style,s=e.children,o=e.scrollTop,a=e.scrollLeft,c=sr(e,["style","children","scrollTop","scrollLeft"]),l=t.nodeName==="filter"||t.parentNode&&t.parentNode.nodeName==="filter";o!==void 0&&(t.scrollTop=o),a!==void 0&&(t.scrollLeft=a),s!==void 0&&(t.textContent=s);for(let u in i)if(i.hasOwnProperty(u)){var n=u.indexOf("--")===0,r=y2(u,i[u],n);u==="float"&&(u="cssFloat"),n?t.style.setProperty(u,r):t.style[u]=r}for(let u in c){const d=l?u:Ul[u]||(Ul[u]=u.replace(/([A-Z])/g,h=>"-"+h.toLowerCase()));typeof t.getAttribute(d)<"u"&&t.setAttribute(d,c[u])}return}else return!1},t=>t);const b2=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],w2=Ny(Gy,!1),S2=w2(b2);function $l(t,e){return t.map(function(n,r){return n+e[r]})}function Vf(t,e){return t.map(function(n,r){return n-e[r]})}function ka(t){return Math.hypot.apply(Math,t)}function C2(t,e,n){var r=ka(e),i=r===0?0:1/r,s=n===0?0:1/n,o=s*r,a=e.map(function(u){return s*u}),c=e.map(function(u){return i*u}),l=ka(t);return{velocities:a,velocity:o,distance:l,direction:c}}function Ma(t){return Math.sign?Math.sign(t):+(t>0)-+(t<0)||+t}function _2(t,e,n){return Math.max(e,Math.min(t,n))}function E2(t,e){return Math.pow(t,e*5)}function zl(t,e,n){return e===0||Math.abs(e)===1/0?E2(t,n):t*e*n/(e+n*t)}function ci(t,e,n,r){return r===void 0&&(r=.15),r===0?_2(t,e,n):t<e?-zl(e-t,n-e,r)+e:t>n?+zl(t-n,n-e,r)+n:t}function ql(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function x2(t,e,n){return e&&ql(t.prototype,e),n&&ql(t,n),t}function He(){return He=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},He.apply(this,arguments)}function Hf(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function O2(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function us(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function P2(t,e){if(t){if(typeof t=="string")return Gl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gl(t,e)}}function Gl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function wo(t,e){var n;if(typeof Symbol>"u"||t[Symbol.iterator]==null){if(Array.isArray(t)||(n=P2(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
44
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return n=t[Symbol.iterator](),n.next.bind(n)}function Uf(){}function $f(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.length===0?Uf:e.length===1?e[0]:function(){for(var r,i=wo(e),s;!(s=i()).done;){var o=s.value;r=o.apply(this,arguments)||r}return r}}function rn(t,e){if(t===void 0){if(e===void 0)throw new Error("Must define fallback value if undefined is expected");t=e}return Array.isArray(t)?t:[t,t]}function ds(t){if(typeof t=="function"){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return t.apply(void 0,n)}else return t}function wc(t,e){t===void 0&&(t={});for(var n={},r=0,i=Object.entries(e);r<i.length;r++){var s=i[r],o=s[0],a=s[1];switch(typeof a){case"function":n[o]=a.call(n,t[o],o,t);break;case"object":n[o]=wc(t[o],a);break;case"boolean":a&&(n[o]=t[o]);break}}return n}var T2=180,A2=.15,R2=.5,L2=60,k2={threshold:function(e){return e===void 0&&(e=0),rn(e)},rubberband:function(e){switch(e===void 0&&(e=0),e){case!0:return rn(A2);case!1:return rn(0);default:return rn(e)}},enabled:function(e){return e===void 0&&(e=!0),e},triggerAllEvents:function(e){return e===void 0&&(e=!1),e},initial:function(e){return e===void 0&&(e=0),typeof e=="function"?e:rn(e)}},zf=He({},k2,{axis:!0,lockDirection:function(e){return e===void 0&&(e=!1),e},bounds:function(e){if(e===void 0&&(e={}),typeof e=="function")return function(d){return zf.bounds(e(d))};var n=e,r=n.left,i=r===void 0?-1/0:r,s=n.right,o=s===void 0?1/0:s,a=n.top,c=a===void 0?-1/0:a,l=n.bottom,u=l===void 0?1/0:l;return[[i,o],[c,u]]}}),M2=typeof window<"u"&&window.document&&window.document.createElement,D2={enabled:function(e){return e===void 0&&(e=!0),e},domTarget:!0,window:function(t){function e(n){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t){return t===void 0&&(t=M2?window:void 0),t}),eventOptions:function(e){var n=e===void 0?{}:e,r=n.passive,i=r===void 0?!0:r,s=n.capture,o=s===void 0?!1:s;return{passive:i,capture:o}}},N2=He({},zf,{threshold:function(e,n,r){var i=r.filterTaps,s=i===void 0?!1:i,o=r.lockDirection,a=o===void 0?!1:o,c=r.axis,l=c===void 0?void 0:c,u=rn(e,s?3:a||l?1:0);return this.filterTaps=s||u[0]+u[1]>0,u},swipeVelocity:function(e){return e===void 0&&(e=R2),rn(e)},swipeDistance:function(e){return e===void 0&&(e=L2),rn(e)},delay:function(e){switch(e===void 0&&(e=0),e){case!0:return T2;case!1:return 0;default:return e}}});function j2(t){return t===void 0&&(t={}),wc(t,D2)}function I2(t){return t===void 0&&(t={}),wc(t,N2)}function F2(t){var e=t.domTarget,n=t.eventOptions,r=t.window,i=t.enabled,s=O2(t,["domTarget","eventOptions","window","enabled"]),o=j2({domTarget:e,eventOptions:n,window:r,enabled:i});return o.drag=I2(s),o}function Ur(t){return He({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_lastEventType:void 0,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:Uf,canceled:!1,memo:void 0,args:void 0},t)}function qf(){var t={hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1},e=Ur({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,_isTap:!0,_delayedEvent:!1,_pointerId:void 0,tap:!1,swipe:[0,0]}),n=Ur({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),r=Ur({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),i=Ur({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),s=Ur({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0});return{shared:t,drag:e,pinch:n,wheel:r,move:i,scroll:s}}var Sn=new Map,B2=function(){function t(n,r){var i=this;r===void 0&&(r=[]),this.controller=n,this.args=r,this.debounced=!0,this.setTimeout=function(s,o){var a;o===void 0&&(o=140),clearTimeout(i.controller.timeouts[i.stateKey]);for(var c=arguments.length,l=new Array(c>2?c-2:0),u=2;u<c;u++)l[u-2]=arguments[u];i.controller.timeouts[i.stateKey]=(a=window).setTimeout.apply(a,[s,o].concat(l))},this.clearTimeout=function(){clearTimeout(i.controller.timeouts[i.stateKey])},this.fireGestureHandler=function(s){if(s===void 0&&(s=!1),i.state._blocked)return i.debounced||(i.state._active=!1,i.clean()),null;if(!s&&!i.state.intentional&&!i.config.triggerAllEvents)return null;if(i.state.intentional){var o=i.state.active,a=i.state._active;i.state.active=a,i.state.first=a&&!o,i.state.last=o&&!a,i.controller.state.shared[i.ingKey]=a}var c=He({},i.controller.state.shared,i.state,i.mapStateValues(i.state)),l=i.handler(c);return i.state.memo=l!==void 0?l:i.state.memo,i.state._active||i.clean(),c}}var e=t.prototype;return e.updateSharedState=function(r){Object.assign(this.controller.state.shared,r)},e.updateGestureState=function(r){Object.assign(this.state,r)},e.checkIntentionality=function(r,i){return{_intentional:r,_blocked:!1}},e.getMovement=function(r){var i=this.config,s=i.initial,o=i.bounds,a=i.rubberband,c=i.threshold,l=this.state,u=l._bounds,d=l._initial,h=l._active,v=l._intentional,m=l.lastOffset,f=l.movement,w=this.getInternalMovement(r,this.state),y=v[0]===!1?Wl(w[0],c[0]):v[0],C=v[1]===!1?Wl(w[1],c[1]):v[1],b=this.checkIntentionality([y,C],w);if(b._blocked)return He({},b,{_movement:w,delta:[0,0]});var E=b._intentional,x=w,g,_;if(E[0]!==!1&&v[0]===!1&&(_=ds(s,this.state),g=ds(o,this.state),d[0]=_[0],u[0]=g[0]),E[1]!==!1&&v[1]===!1){var O,T;_=(O=_)!=null?O:ds(s,this.state),g=(T=g)!=null?T:ds(o,this.state),d[1]=_[1],u[1]=g[1]}var R=[E[0]!==!1?w[0]-E[0]:d[0],E[1]!==!1?w[1]-E[1]:d[1]],L=$l(R,m),A=h?a:[0,0];return R=Zl(u,$l(R,d),A),He({},b,{intentional:E[0]!==!1||E[1]!==!1,_initial:d,_movement:x,movement:R,values:r,offset:Zl(u,L,A),delta:Vf(R,f)})},e.clean=function(){this.clearTimeout()},x2(t,[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"state",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}}]),t}();function Wl(t,e){return Math.abs(t)>=e?Ma(t)*e:!1}function Zl(t,e,n){var r=e[0],i=e[1],s=n[0],o=n[1],a=t[0],c=a[0],l=a[1],u=t[1],d=u[0],h=u[1];return[ci(r,c,l,s),ci(i,d,h,o)]}function $o(t,e,n){var r=t.state,i=t.args,s=e.timeStamp,o=e.type,a=r.values,c=n?0:s-r.startTime;return{_lastEventType:o,event:e,timeStamp:s,elapsedTime:c,args:i,previous:a}}function V2(t,e,n){var r=t.state.offset,i=n.timeStamp;return He({},qf()[t.stateKey],{_active:!0,values:e,initial:e,offset:r,lastOffset:r,startTime:i})}function H2(t,e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return t.call.apply(t,[this,He({},e,{event:n})].concat(i))}}var U2=function(e){var n=this;this.classes=e,this.bind=function(){for(var r={},i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];for(var a=wo(n.classes),c;!(c=a()).done;){var l=c.value;new l(n,s).addBindings(r)}for(var u=0,d=Object.entries(n.nativeRefs);u<d.length;u++){var h=d[u],v=h[0],m=h[1];Da(r,v,H2(m,He({},n.state.shared,{args:s})))}return n.config.domTarget?G2(n,r):W2(n,r)},this.effect=function(){return n.config.domTarget&&n.bind(),n.clean},this.clean=function(){var r=Wf(n.config),i=n.config.eventOptions;r&&Fi(r,Gf(n.domListeners),i),Object.values(n.timeouts).forEach(clearTimeout),$2(n)},this.state=qf(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function $2(t){var e=t.config,n=e.window,r=e.eventOptions,i=t.windowListeners;if(n){for(var s in i){var o=i[s];Fi(n,o,r)}t.windowListeners={}}}function z2(t,e){var n=t.config,r=t.windowListeners;n.window&&(Fi(n.window,r[e],n.eventOptions),delete r[e])}function q2(t,e,n){var r=t.config,i=t.windowListeners;n===void 0&&(n=[]),r.window&&(Fi(r.window,i[e],r.eventOptions),Zf(r.window,i[e]=n,r.eventOptions))}function G2(t,e){var n=t.config,r=t.domListeners,i=Wf(n);if(!i)throw new Error("domTarget must be defined");var s=n.eventOptions;Fi(i,Gf(r),s);for(var o=0,a=Object.entries(e);o<a.length;o++){var c=a[o],l=c[0],u=c[1],d=l.slice(2).toLowerCase();r.push([d,$f.apply(void 0,u)])}Zf(i,r,s)}function W2(t,e){for(var n=t.config,r={},i=n.eventOptions.capture?"Capture":"",s=0,o=Object.entries(e);s<o.length;s++){var a=o[s],c=a[0],l=a[1],u=Array.isArray(l)?l:[l],d=c+i;r[d]=$f.apply(void 0,u)}return r}function Gf(t){return t===void 0&&(t=[]),t.splice(0,t.length)}function Wf(t){var e=t.domTarget;return e&&"current"in e?e.current:e}function Da(t,e,n){t[e]||(t[e]=[]),t[e].push(n)}function Zf(t,e,n){e===void 0&&(e=[]),n===void 0&&(n={});for(var r=wo(e),i;!(i=r()).done;){var s=i.value,o=s[0],a=s[1];t.addEventListener(o,a,n)}}function Fi(t,e,n){e===void 0&&(e=[]),n===void 0&&(n={});for(var r=wo(e),i;!(i=r()).done;){var s=i.value,o=s[0],a=s[1];t.removeEventListener(o,a,n)}}function Z2(t,e,n){n===void 0&&(n={});var r=Q2(t),i=p.useMemo(function(){return new U2(r)},[]);return i.config=e,i.handlers=t,i.nativeRefs=n,p.useEffect(i.effect,[]),i.config.domTarget?K2:i.bind}function K2(){}function Q2(t){var e=new Set;return t.drag&&e.add(Sn.get("drag")),t.wheel&&e.add(Sn.get("wheel")),t.scroll&&e.add(Sn.get("scroll")),t.move&&e.add(Sn.get("move")),t.pinch&&e.add(Sn.get("pinch")),t.hover&&e.add(Sn.get("hover")),e}var J2=function(t){Hf(e,t);function e(){return t.apply(this,arguments)||this}var n=e.prototype;return n.getInternalMovement=function(i,s){return Vf(i,s.initial)},n.checkIntentionality=function(i,s){if(i[0]===!1&&i[1]===!1)return{_intentional:i,axis:this.state.axis};var o=s.map(Math.abs),a=o[0],c=o[1],l=this.state.axis||(a>c?"x":a<c?"y":void 0);return!this.config.axis&&!this.config.lockDirection?{_intentional:i,_blocked:!1,axis:l}:l?this.config.axis&&l!==this.config.axis?{_intentional:i,_blocked:!0,axis:l}:(i[l==="x"?1:0]=!1,{_intentional:i,_blocked:!1,axis:l}):{_intentional:[!1,!1],_blocked:!1,axis:l}},n.getKinematics=function(i,s){var o=this.getMovement(i);if(!o._blocked){var a=s.timeStamp-this.state.timeStamp;Object.assign(o,C2(o.movement,o.delta,a))}return o},n.mapStateValues=function(i){return{xy:i.values,vxvy:i.velocities}},e}(B2);function Kf(t){if("touches"in t){var e=t.targetTouches,n=t.changedTouches;return e.length>0?e:n}return null}function Kl(t){var e="buttons"in t?t.buttons:0,n=Kf(t),r=n&&n.length||0,i=r>0||e>0,s=t.shiftKey,o=t.altKey,a=t.metaKey,c=t.ctrlKey;return{touches:r,down:i,buttons:e,shiftKey:s,altKey:o,metaKey:a,ctrlKey:c}}function Ql(t){var e=Kf(t),n=e?e[0]:t,r=n.clientX,i=n.clientY;return[r,i]}var X2=3,Y2=220,e3=function(t){Hf(e,t);function e(){var r;return r=t.apply(this,arguments)||this,r.ingKey="dragging",r.stateKey="drag",r.onDragStart=function(i){!r.enabled||r.state._active||(q2(r.controller,r.stateKey,[["pointermove",r.onDragChange],["pointerup",r.onDragEnd],["pointercancel",r.onDragEnd]]),r.updateGestureState({_pointerId:i.pointerId}),r.config.delay>0?(r.state._delayedEvent=!0,"persist"in i&&typeof i.persist=="function"&&i.persist(),r.setTimeout(r.startDrag.bind(us(r)),r.config.delay,i)):r.startDrag(i))},r.onDragChange=function(i){if(!r.state.canceled&&i.pointerId===r.state._pointerId){if(!r.state._active){r.state._delayedEvent&&(r.clearTimeout(),r.startDrag(i));return}var s=Kl(i);if(!s.down){r.onDragEnd(i);return}r.updateSharedState(s);var o=Ql(i),a=r.getKinematics(o,i),c=$o(us(r),i),l=r.state._isTap,u=ka(a._movement);l&&u>=X2&&(l=!1),r.updateGestureState(He({},c,a,{_isTap:l})),r.fireGestureHandler()}},r.onDragEnd=function(i){if(i.pointerId===r.state._pointerId){r.state._active=!1,r.updateSharedState({down:!1,buttons:0,touches:0});var s=r.state._isTap,o=r.state.velocities,a=o[0],c=o[1],l=r.state.movement,u=l[0],d=l[1],h=r.state._intentional,v=h[0],m=h[1],f=r.config.swipeVelocity,w=f[0],y=f[1],C=r.config.swipeDistance,b=C[0],E=C[1],x=He({},$o(us(r),i),r.getMovement(r.state.values)),g=[0,0];x.elapsedTime<Y2&&(v!==!1&&Math.abs(a)>w&&Math.abs(u)>b&&(g[0]=Ma(a)),m!==!1&&Math.abs(c)>y&&Math.abs(d)>E&&(g[1]=Ma(c))),r.updateGestureState(He({},x,{tap:s,swipe:g})),r.fireGestureHandler(s===!0)}},r.clean=function(){t.prototype.clean.call(us(r)),r.state._delayedEvent=!1,z2(r.controller,r.stateKey)},r.onCancel=function(){r.state.canceled||(r.updateGestureState({canceled:!0}),r.state._active=!1,r.updateSharedState({down:!1,buttons:0,touches:0}),requestAnimationFrame(function(){return r.fireGestureHandler()}))},r.onClick=function(i){r.state._isTap||i.stopPropagation()},r}var n=e.prototype;return n.startDrag=function(i){var s=Ql(i);this.updateSharedState(Kl(i)),this.updateGestureState(He({},V2(this,s,i),$o(this,i,!0),{_pointerId:i.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(s)),this.fireGestureHandler()},n.addBindings=function(i){if(Da(i,"onPointerDown",this.onDragStart),this.config.filterTaps){var s=this.controller.config.eventOptions.capture?"onClick":"onClickCapture";Da(i,s,this.onClick)}},e}(J2);function t3(t,e){var n,r=[],i,s=!1;function o(){for(var a=arguments.length,c=new Array(a),l=0;l<a;l++)c[l]=arguments[l];return s&&n===this&&e(c,r)||(i=t.apply(this,c),s=!0,n=this,r=c),i}return o}function Fs(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var n,r,i;if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Fs(t[r],e[r]))return!1;return!0}var s;if(typeof Map=="function"&&t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(s=t.entries();!(r=s.next()).done;)if(!e.has(r.value[0]))return!1;for(s=t.entries();!(r=s.next()).done;)if(!Fs(r.value[1],e.get(r.value[0])))return!1;return!0}if(typeof Set=="function"&&t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(s=t.entries();!(r=s.next()).done;)if(!e.has(r.value[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[r]))return!1;if(typeof Element<"u"&&t instanceof Element)return!1;for(r=n;r--!==0;)if(!(i[r]==="_owner"&&t.$$typeof)&&!Fs(t[i[r]],e[i[r]]))return!1;return!0}return t!==t&&e!==e}function n3(t,e){try{return Fs(t,e)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}function r3(t,e){e===void 0&&(e={}),Sn.set("drag",e3);var n=p.useRef();return n.current||(n.current=t3(F2,n3)),Z2({drag:t},n.current(e))}/*!
45
45
  * tabbable 5.3.3
46
46
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
47
47
  */var Qf=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],eo=Qf.join(","),Jf=typeof Element>"u",jn=Jf?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Na=!Jf&&Element.prototype.getRootNode?function(t){return t.getRootNode()}:function(t){return t.ownerDocument},Xf=function(e,n,r){var i=Array.prototype.slice.apply(e.querySelectorAll(eo));return n&&jn.call(e,eo)&&i.unshift(e),i=i.filter(r),i},Yf=function t(e,n,r){for(var i=[],s=Array.from(e);s.length;){var o=s.shift();if(o.tagName==="SLOT"){var a=o.assignedElements(),c=a.length?a:o.children,l=t(c,!0,r);r.flatten?i.push.apply(i,l):i.push({scope:o,candidates:l})}else{var u=jn.call(o,eo);u&&r.filter(o)&&(n||!e.includes(o))&&i.push(o);var d=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),h=!r.shadowRootFilter||r.shadowRootFilter(o);if(d&&h){var v=t(d===!0?o.children:d.children,!0,r);r.flatten?i.push.apply(i,v):i.push({scope:o,candidates:v})}else s.unshift.apply(s,o.children)}}return i},eh=function(e,n){return e.tabIndex<0&&(n||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))?0:e.tabIndex},i3=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},th=function(e){return e.tagName==="INPUT"},s3=function(e){return th(e)&&e.type==="hidden"},o3=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},a3=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},c3=function(e){if(!e.name)return!0;var n=e.form||Na(e),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(e.name));else try{i=r(e.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var s=a3(i,e.form);return!s||s===e},l3=function(e){return th(e)&&e.type==="radio"},u3=function(e){return l3(e)&&!c3(e)},Jl=function(e){var n=e.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},d3=function(e,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var s=jn.call(e,"details>summary:first-of-type"),o=s?e.parentElement:e;if(jn.call(o,"details:not([open]) *"))return!0;var a=Na(e).host,c=(a==null?void 0:a.ownerDocument.contains(a))||e.ownerDocument.contains(e);if(!r||r==="full"){if(typeof i=="function"){for(var l=e;e;){var u=e.parentElement,d=Na(e);if(u&&!u.shadowRoot&&i(u)===!0)return Jl(e);e.assignedSlot?e=e.assignedSlot:!u&&d!==e.ownerDocument?e=d.host:e=u}e=l}if(c)return!e.getClientRects().length}else if(r==="non-zero-area")return Jl(e);return!1},f3=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return jn.call(n,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}n=n.parentElement}return!1},to=function(e,n){return!(n.disabled||s3(n)||d3(n,e)||o3(n)||f3(n))},ja=function(e,n){return!(u3(n)||eh(n)<0||!to(e,n))},h3=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},p3=function t(e){var n=[],r=[];return e.forEach(function(i,s){var o=!!i.scope,a=o?i.scope:i,c=eh(a,o),l=o?t(i.candidates):a;c===0?o?n.push.apply(n,l):n.push(a):r.push({documentOrder:s,tabIndex:c,item:i,isScope:o,content:l})}),r.sort(i3).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(n)},m3=function(e,n){n=n||{};var r;return n.getShadowRoot?r=Yf([e],n.includeContainer,{filter:ja.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:h3}):r=Xf(e,n.includeContainer,ja.bind(null,n)),p3(r)},g3=function(e,n){n=n||{};var r;return n.getShadowRoot?r=Yf([e],n.includeContainer,{filter:to.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Xf(e,n.includeContainer,to.bind(null,n)),r},fs=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return jn.call(e,eo)===!1?!1:ja(n,e)},v3=Qf.concat("iframe").join(","),zo=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return jn.call(e,v3)===!1?!1:to(n,e)};/*!
48
48
  * focus-trap 6.9.4
49
49
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
50
- */function Xl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Yl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Xl(Object(n),!0).forEach(function(r){y3(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function y3(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var eu=function(){var t=[];return{activateTrap:function(n){if(t.length>0){var r=t[t.length-1];r!==n&&r.pause()}var i=t.indexOf(n);i===-1||t.splice(i,1),t.push(n)},deactivateTrap:function(n){var r=t.indexOf(n);r!==-1&&t.splice(r,1),t.length>0&&t[t.length-1].unpause()}}}(),b3=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},w3=function(e){return e.key==="Escape"||e.key==="Esc"||e.keyCode===27},S3=function(e){return e.key==="Tab"||e.keyCode===9},tu=function(e){return setTimeout(e,0)},nu=function(e,n){var r=-1;return e.every(function(i,s){return n(i)?(r=s,!1):!0}),r},zr=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return typeof e=="function"?e.apply(void 0,r):e},hs=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},C3=function(e,n){var r=(n==null?void 0:n.document)||document,i=Yl({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},n),s={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},o,a=function(g,_,O){return g&&g[_]!==void 0?g[_]:i[O||_]},c=function(g){return s.containerGroups.findIndex(function(_){var O=_.container,T=_.tabbableNodes;return O.contains(g)||T.find(function(L){return L===g})})},l=function(g){var _=i[g];if(typeof _=="function"){for(var O=arguments.length,T=new Array(O>1?O-1:0),L=1;L<O;L++)T[L-1]=arguments[L];_=_.apply(void 0,T)}if(_===!0&&(_=void 0),!_){if(_===void 0||_===!1)return _;throw new Error("`".concat(g,"` was specified but was not a node, or did not return a node"))}var R=_;if(typeof _=="string"&&(R=r.querySelector(_),!R))throw new Error("`".concat(g,"` as selector refers to no known node"));return R},u=function(){var g=l("initialFocus");if(g===!1)return!1;if(g===void 0)if(c(r.activeElement)>=0)g=r.activeElement;else{var _=s.tabbableGroups[0],O=_&&_.firstTabbableNode;g=O||l("fallbackFocus")}if(!g)throw new Error("Your focus-trap needs to have at least one focusable element");return g},d=function(){if(s.containerGroups=s.containers.map(function(g){var _=m3(g,i.tabbableOptions),O=g3(g,i.tabbableOptions);return{container:g,tabbableNodes:_,focusableNodes:O,firstTabbableNode:_.length>0?_[0]:null,lastTabbableNode:_.length>0?_[_.length-1]:null,nextTabbableNode:function(L){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,A=O.findIndex(function(M){return M===L});if(!(A<0))return R?O.slice(A+1).find(function(M){return fs(M,i.tabbableOptions)}):O.slice(0,A).reverse().find(function(M){return fs(M,i.tabbableOptions)})}}}),s.tabbableGroups=s.containerGroups.filter(function(g){return g.tabbableNodes.length>0}),s.tabbableGroups.length<=0&&!l("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},h=function x(g){if(g!==!1&&g!==r.activeElement){if(!g||!g.focus){x(u());return}g.focus({preventScroll:!!i.preventScroll}),s.mostRecentlyFocusedNode=g,b3(g)&&g.select()}},v=function(g){var _=l("setReturnFocus",g);return _||(_===!1?!1:g)},m=function(g){var _=hs(g);if(!(c(_)>=0)){if(zr(i.clickOutsideDeactivates,g)){o.deactivate({returnFocus:i.returnFocusOnDeactivate&&!zo(_,i.tabbableOptions)});return}zr(i.allowOutsideClick,g)||g.preventDefault()}},f=function(g){var _=hs(g),O=c(_)>=0;O||_ instanceof Document?O&&(s.mostRecentlyFocusedNode=_):(g.stopImmediatePropagation(),h(s.mostRecentlyFocusedNode||u()))},w=function(g){var _=hs(g);d();var O=null;if(s.tabbableGroups.length>0){var T=c(_),L=T>=0?s.containerGroups[T]:void 0;if(T<0)g.shiftKey?O=s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:O=s.tabbableGroups[0].firstTabbableNode;else if(g.shiftKey){var R=nu(s.tabbableGroups,function(B){var z=B.firstTabbableNode;return _===z});if(R<0&&(L.container===_||zo(_,i.tabbableOptions)&&!fs(_,i.tabbableOptions)&&!L.nextTabbableNode(_,!1))&&(R=T),R>=0){var A=R===0?s.tabbableGroups.length-1:R-1,M=s.tabbableGroups[A];O=M.lastTabbableNode}}else{var j=nu(s.tabbableGroups,function(B){var z=B.lastTabbableNode;return _===z});if(j<0&&(L.container===_||zo(_,i.tabbableOptions)&&!fs(_,i.tabbableOptions)&&!L.nextTabbableNode(_))&&(j=T),j>=0){var F=j===s.tabbableGroups.length-1?0:j+1,G=s.tabbableGroups[F];O=G.firstTabbableNode}}}else O=l("fallbackFocus");O&&(g.preventDefault(),h(O))},y=function(g){if(w3(g)&&zr(i.escapeDeactivates,g)!==!1){g.preventDefault(),o.deactivate();return}if(S3(g)){w(g);return}},C=function(g){var _=hs(g);c(_)>=0||zr(i.clickOutsideDeactivates,g)||zr(i.allowOutsideClick,g)||(g.preventDefault(),g.stopImmediatePropagation())},b=function(){if(s.active)return eu.activateTrap(o),s.delayInitialFocusTimer=i.delayInitialFocus?tu(function(){h(u())}):h(u()),r.addEventListener("focusin",f,!0),r.addEventListener("mousedown",m,{capture:!0,passive:!1}),r.addEventListener("touchstart",m,{capture:!0,passive:!1}),r.addEventListener("click",C,{capture:!0,passive:!1}),r.addEventListener("keydown",y,{capture:!0,passive:!1}),o},E=function(){if(s.active)return r.removeEventListener("focusin",f,!0),r.removeEventListener("mousedown",m,!0),r.removeEventListener("touchstart",m,!0),r.removeEventListener("click",C,!0),r.removeEventListener("keydown",y,!0),o};return o={get active(){return s.active},get paused(){return s.paused},activate:function(g){if(s.active)return this;var _=a(g,"onActivate"),O=a(g,"onPostActivate"),T=a(g,"checkCanFocusTrap");T||d(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=r.activeElement,_&&_();var L=function(){T&&d(),b(),O&&O()};return T?(T(s.containers.concat()).then(L,L),this):(L(),this)},deactivate:function(g){if(!s.active)return this;var _=Yl({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},g);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,E(),s.active=!1,s.paused=!1,eu.deactivateTrap(o);var O=a(_,"onDeactivate"),T=a(_,"onPostDeactivate"),L=a(_,"checkCanReturnFocus"),R=a(_,"returnFocus","returnFocusOnDeactivate");O&&O();var A=function(){tu(function(){R&&h(v(s.nodeFocusedBeforeActivation)),T&&T()})};return R&&L?(L(v(s.nodeFocusedBeforeActivation)).then(A,A),this):(A(),this)},pause:function(){return s.paused||!s.active?this:(s.paused=!0,E(),this)},unpause:function(){return!s.paused||!s.active?this:(s.paused=!1,d(),b(),this)},updateContainerElements:function(g){var _=[].concat(g).filter(Boolean);return s.containers=_.map(function(O){return typeof O=="string"?r.querySelector(O):O}),s.active&&d(),this}},o.updateContainerElements(e),o};function _3(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}else return Array.from(t)}var Sc=!1;if(typeof window<"u"){var ru={get passive(){Sc=!0}};window.addEventListener("testPassive",null,ru),window.removeEventListener("testPassive",null,ru)}var nh=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),dn=[],no=!1,rh=-1,li=void 0,ui=void 0,ih=function(e){return dn.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(e))})},ro=function(e){var n=e||window.event;return ih(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},E3=function(e){if(ui===void 0){var n=!!e&&e.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;n&&r>0&&(ui=document.body.style.paddingRight,document.body.style.paddingRight=r+"px")}li===void 0&&(li=document.body.style.overflow,document.body.style.overflow="hidden")},x3=function(){ui!==void 0&&(document.body.style.paddingRight=ui,ui=void 0),li!==void 0&&(document.body.style.overflow=li,li=void 0)},O3=function(e){return e?e.scrollHeight-e.scrollTop<=e.clientHeight:!1},P3=function(e,n){var r=e.targetTouches[0].clientY-rh;return ih(e.target)?!1:n&&n.scrollTop===0&&r>0||O3(n)&&r<0?ro(e):(e.stopPropagation(),!0)},T3=function(e,n){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!dn.some(function(i){return i.targetElement===e})){var r={targetElement:e,options:n||{}};dn=[].concat(_3(dn),[r]),nh?(e.ontouchstart=function(i){i.targetTouches.length===1&&(rh=i.targetTouches[0].clientY)},e.ontouchmove=function(i){i.targetTouches.length===1&&P3(i,e)},no||(document.addEventListener("touchmove",ro,Sc?{passive:!1}:void 0),no=!0)):E3(n)}},A3=function(e){if(!e){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}dn=dn.filter(function(n){return n.targetElement!==e}),nh?(e.ontouchstart=null,e.ontouchmove=null,no&&dn.length===0&&(document.removeEventListener("touchmove",ro,Sc?{passive:!1}:void 0),no=!1)):dn.length||x3()},Mn=[],L3=function(){return Mn.some(function(t){return t.activeTargets.length>0})},R3=function(){return Mn.some(function(t){return t.skippedTargets.length>0})},iu="ResizeObserver loop completed with undelivered notifications.",k3=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:iu}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=iu),window.dispatchEvent(t)},yi;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(yi||(yi={}));var Dn=function(t){return Object.freeze(t)},M3=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,Dn(this)}return t}(),sh=function(){function t(e,n,r,i){return this.x=e,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Dn(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,r=e.y,i=e.top,s=e.right,o=e.bottom,a=e.left,c=e.width,l=e.height;return{x:n,y:r,top:i,right:s,bottom:o,left:a,width:c,height:l}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),Cc=function(t){return t instanceof SVGElement&&"getBBox"in t},oh=function(t){if(Cc(t)){var e=t.getBBox(),n=e.width,r=e.height;return!n&&!r}var i=t,s=i.offsetWidth,o=i.offsetHeight;return!(s||o||t.getClientRects().length)},su=function(t){var e;if(t instanceof Element)return!0;var n=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},D3=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},di=typeof window<"u"?window:{},ps=new WeakMap,ou=/auto|scroll/,N3=/^tb|vertical/,j3=/msie|trident/i.test(di.navigator&&di.navigator.userAgent),yt=function(t){return parseFloat(t||"0")},ar=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new M3((n?e:t)||0,(n?t:e)||0)},au=Dn({devicePixelContentBoxSize:ar(),borderBoxSize:ar(),contentBoxSize:ar(),contentRect:new sh(0,0,0,0)}),ah=function(t,e){if(e===void 0&&(e=!1),ps.has(t)&&!e)return ps.get(t);if(oh(t))return ps.set(t,au),au;var n=getComputedStyle(t),r=Cc(t)&&t.ownerSVGElement&&t.getBBox(),i=!j3&&n.boxSizing==="border-box",s=N3.test(n.writingMode||""),o=!r&&ou.test(n.overflowY||""),a=!r&&ou.test(n.overflowX||""),c=r?0:yt(n.paddingTop),l=r?0:yt(n.paddingRight),u=r?0:yt(n.paddingBottom),d=r?0:yt(n.paddingLeft),h=r?0:yt(n.borderTopWidth),v=r?0:yt(n.borderRightWidth),m=r?0:yt(n.borderBottomWidth),f=r?0:yt(n.borderLeftWidth),w=d+l,y=c+u,C=f+v,b=h+m,E=a?t.offsetHeight-b-t.clientHeight:0,x=o?t.offsetWidth-C-t.clientWidth:0,g=i?w+C:0,_=i?y+b:0,O=r?r.width:yt(n.width)-g-x,T=r?r.height:yt(n.height)-_-E,L=O+w+x+C,R=T+y+E+b,A=Dn({devicePixelContentBoxSize:ar(Math.round(O*devicePixelRatio),Math.round(T*devicePixelRatio),s),borderBoxSize:ar(L,R,s),contentBoxSize:ar(O,T,s),contentRect:new sh(d,c,O,T)});return ps.set(t,A),A},ch=function(t,e,n){var r=ah(t,n),i=r.borderBoxSize,s=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(e){case yi.DEVICE_PIXEL_CONTENT_BOX:return o;case yi.BORDER_BOX:return i;default:return s}},I3=function(){function t(e){var n=ah(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=Dn([n.borderBoxSize]),this.contentBoxSize=Dn([n.contentBoxSize]),this.devicePixelContentBoxSize=Dn([n.devicePixelContentBoxSize])}return t}(),lh=function(t){if(oh(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},F3=function(){var t=1/0,e=[];Mn.forEach(function(o){if(o.activeTargets.length!==0){var a=[];o.activeTargets.forEach(function(l){var u=new I3(l.target),d=lh(l.target);a.push(u),l.lastReportedSize=ch(l.target,l.observedBox),d<t&&(t=d)}),e.push(function(){o.callback.call(o.observer,a,o.observer)}),o.activeTargets.splice(0,o.activeTargets.length)}});for(var n=0,r=e;n<r.length;n++){var i=r[n];i()}return t},cu=function(t){Mn.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(lh(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},B3=function(){var t=0;for(cu(t);L3();)t=F3(),cu(t);return R3()&&k3(),t>0},qo,uh=[],V3=function(){return uh.splice(0).forEach(function(t){return t()})},H3=function(t){if(!qo){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return V3()}).observe(n,r),qo=function(){n.textContent="".concat(e?e--:e++)}}uh.push(t),qo()},U3=function(t){H3(function(){requestAnimationFrame(t)})},Bs=0,$3=function(){return!!Bs},z3=250,q3={attributes:!0,characterData:!0,childList:!0,subtree:!0},lu=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],uu=function(t){return t===void 0&&(t=0),Date.now()+t},Go=!1,G3=function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=z3),!Go){Go=!0;var r=uu(e);U3(function(){var i=!1;try{i=B3()}finally{if(Go=!1,e=r-uu(),!$3())return;i?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,q3)};document.body?n():di.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),lu.forEach(function(n){return di.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),lu.forEach(function(n){return di.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),Ia=new G3,du=function(t){!Bs&&t>0&&Ia.start(),Bs+=t,!Bs&&Ia.stop()},W3=function(t){return!Cc(t)&&!D3(t)&&getComputedStyle(t).display==="inline"},Z3=function(){function t(e,n){this.target=e,this.observedBox=n||yi.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=ch(this.target,this.observedBox,!0);return W3(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),K3=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),ms=new WeakMap,fu=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},gs=function(){function t(){}return t.connect=function(e,n){var r=new K3(e,n);ms.set(e,r)},t.observe=function(e,n,r){var i=ms.get(e),s=i.observationTargets.length===0;fu(i.observationTargets,n)<0&&(s&&Mn.push(i),i.observationTargets.push(new Z3(n,r&&r.box)),du(1),Ia.schedule())},t.unobserve=function(e,n){var r=ms.get(e),i=fu(r.observationTargets,n),s=r.observationTargets.length===1;i>=0&&(s&&Mn.splice(Mn.indexOf(r),1),r.observationTargets.splice(i,1),du(-1))},t.disconnect=function(e){var n=this,r=ms.get(e);r.observationTargets.slice().forEach(function(i){return n.unobserve(e,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t}(),Q3=function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");gs.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!su(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");gs.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!su(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");gs.unobserve(this,e)},t.prototype.disconnect=function(){gs.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();function De(){return De=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},De.apply(this,arguments)}function Vs(t,e){if(t==null)return{};var n,r,i={},s=Object.keys(t);for(r=0;r<s.length;r++)e.indexOf(n=s[r])>=0||(i[n]=t[n]);return i}var fi=typeof window<"u"?p.useLayoutEffect:p.useEffect;function qr(t,e,n){return e=(e=+e)==e?e:0,n=(n=+n)==n?n:0,(t=+t)==t&&(t=(t=t<=n?t:n)>=e?t:e),t}function vs(t){var e=Math.round(t);if(Number.isNaN(t))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return e}var J3={box:"border-box"};function Wo(t,e){var n=e.label,r=e.enabled,i=e.resizeSourceRef,s=p.useState(0),o=s[0],a=s[1];p.useDebugValue(n+": "+o);var c=p.useCallback(function(l){a(l[0].borderBoxSize[0].blockSize),i.current="element"},[i]);return fi(function(){if(t.current&&r){var l=new Q3(c);return l.observe(t.current,J3),function(){l.disconnect()}}},[t,c,r]),r?o:0}function ke(t){return t===void 0&&(t=1e3),new Promise(function(e){return setTimeout(e,t)})}var hu={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},pu={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},X3=Ey({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:De({},hu,pu)}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:De({},hu,pu)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:De({},{CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}}),onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[xy({y:function(t,e){return e.payload.y},velocity:function(t,e){return e.payload.velocity},snapSource:function(t,e){var n=e.payload.source;return n===void 0?"custom":n}})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:function(t,e){},onSnapCancel:function(t,e){},onResizeCancel:function(t,e){},onCloseCancel:function(t,e){},onOpenEnd:function(t,e){},onSnapEnd:function(t,e){},onRezizeEnd:function(t,e){}},services:{onSnapStart:function(){try{return Promise.resolve(ke()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenStart:function(){try{return Promise.resolve(ke()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseStart:function(){try{return Promise.resolve(ke()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeStart:function(){try{return Promise.resolve(ke()).then(function(){})}catch(t){return Promise.reject(t)}},onSnapEnd:function(){try{return Promise.resolve(ke()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenEnd:function(){try{return Promise.resolve(ke()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseEnd:function(){try{return Promise.resolve(ke()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeEnd:function(){try{return Promise.resolve(ke()).then(function(){})}catch(t){return Promise.reject(t)}},renderVisuallyHidden:function(t,e){try{return Promise.resolve(ke()).then(function(){})}catch(n){return Promise.reject(n)}},activate:function(t,e){try{return Promise.resolve(ke()).then(function(){})}catch(n){return Promise.reject(n)}},deactivate:function(t,e){try{return Promise.resolve(ke()).then(function(){})}catch(n){return Promise.reject(n)}},openSmoothly:function(t,e){try{return Promise.resolve(ke()).then(function(){})}catch(n){return Promise.reject(n)}},openImmediately:function(t,e){try{return Promise.resolve(ke()).then(function(){})}catch(n){return Promise.reject(n)}},snapSmoothly:function(t,e){try{return Promise.resolve(ke()).then(function(){})}catch(n){return Promise.reject(n)}},resizeSmoothly:function(t,e){try{return Promise.resolve(ke()).then(function(){})}catch(n){return Promise.reject(n)}},closeSmoothly:function(t,e){try{return Promise.resolve(ke()).then(function(){})}catch(n){return Promise.reject(n)}}},guards:{initiallyClosed:function(t){return t.initialState==="CLOSED"},initiallyOpen:function(t){return t.initialState==="OPEN"}}}),Y3=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],e4=["velocity"],t4=["onRest","config"],dh=Jy.default,n4=dh.tension,ys=dh.friction,r4=p.forwardRef(function(t,e){var n=t.children,r=t.sibling,i=t.className,s=t.footer,o=t.header,a=t.open,c=t.initialState,l=t.lastSnapRef,u=t.initialFocusRef,d=t.onDismiss,h=t.maxHeight,v=t.defaultSnap,m=v===void 0?s4:v,f=t.snapPoints,w=f===void 0?o4:f,y=t.blocking,C=y===void 0||y,b=t.scrollLocking,E=b===void 0||b,x=t.style,g=t.onSpringStart,_=t.onSpringCancel,O=t.onSpringEnd,T=t.reserveScrollBarGap,L=T===void 0?C:T,R=t.expandOnContentDrag,A=R!==void 0&&R,M=Vs(t,Y3),j=function(){var D=p.useState(!1),$=D[0],H=D[1],ee=p.useState({}),pe=ee[0],oe=ee[1],de=p.useCallback(function(fe){return oe(function(ge){var q;return De({},ge,((q={})[fe]=!1,q))}),function(){oe(function(ge){var q;return De({},ge,((q={})[fe]=!0,q))})}},[]);return p.useEffect(function(){var fe=Object.values(pe);fe.length!==0&&fe.every(Boolean)&&H(!0)},[pe]),{ready:$,registerReady:de}}(),F=j.ready,G=j.registerReady,B=p.useRef(!1),z=p.useRef(g),se=p.useRef(_),X=p.useRef(O);p.useEffect(function(){z.current=g,se.current=_,X.current=O},[_,g,O]);var le,Y,Ne=n2(function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}}),Ee=Ne[0],me=Ne[1],zt=p.useRef(null),qt=p.useRef(null),kr=p.useRef(null),gt=p.useRef(null),Vi=p.useRef(null),Vn=p.useRef(null),Ke=p.useRef(0),Hn=p.useRef(),Co=p.useRef(!1),Gt=(le=p.useMemo(function(){return typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null},[]),Y=p.useRef(le==null?void 0:le.matches),p.useDebugValue(Y.current?"reduce":"no-preference"),p.useEffect(function(){var D=function($){Y.current=$.matches};return le==null||le.addListener(D),function(){return le==null?void 0:le.removeListener(D)}},[le]),Y),Un=function(D){var $=D.targetRef,H=D.enabled,ee=D.reserveScrollBarGap,pe=p.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return p.useDebugValue(H?"Enabled":"Disabled"),p.useEffect(function(){if(!H)return pe.current.deactivate(),void(pe.current={activate:function(){},deactivate:function(){}});var oe=$.current,de=!1;pe.current={activate:function(){de||(de=!0,T3(oe,{allowTouchMove:function(fe){return fe.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:ee}))},deactivate:function(){de&&(de=!1,A3(oe))}}},[H,$,ee]),pe}({targetRef:qt,enabled:F&&E,reserveScrollBarGap:L}),$n=function(D){var $=D.targetRef,H=D.enabled,ee=p.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return p.useDebugValue(H?"Enabled":"Disabled"),p.useEffect(function(){if(!H)return ee.current.deactivate(),void(ee.current={activate:function(){},deactivate:function(){}});var pe=$.current,oe=!1,de=[],fe=[];ee.current={activate:function(){if(!oe){oe=!0;var ge=pe.parentNode;document.querySelectorAll("body > *").forEach(function(q){if(q!==ge){var ae=q.getAttribute("aria-hidden");ae!==null&&ae!=="false"||(de.push(ae),fe.push(q),q.setAttribute("aria-hidden","true"))}})}},deactivate:function(){oe&&(oe=!1,fe.forEach(function(ge,q){var ae=de[q];ae===null?ge.removeAttribute("aria-hidden"):ge.setAttribute("aria-hidden",ae)}),de=[],fe=[])}}},[$,H]),ee}({targetRef:zt,enabled:F&&C}),zn=function(D){var $=D.targetRef,H=D.fallbackRef,ee=D.initialFocusRef,pe=D.enabled,oe=p.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return p.useDebugValue(pe?"Enabled":"Disabled"),p.useEffect(function(){if(!pe)return oe.current.deactivate(),void(oe.current={activate:function(){},deactivate:function(){}});var de=H.current,fe=C3($.current,{onActivate:void 0,initialFocus:ee?function(){return(ee==null?void 0:ee.current)||de}:void 0,fallbackFocus:de,escapeDeactivates:!1,clickOutsideDeactivates:!1}),ge=!1;oe.current={activate:function(){try{return ge?Promise.resolve():(ge=!0,Promise.resolve(fe.activate()).then(function(){return Promise.resolve(new Promise(function(q){return setTimeout(function(){return q(void 0)},0)})).then(function(){})}))}catch(q){return Promise.reject(q)}},deactivate:function(){ge&&(ge=!1,fe.deactivate())}}},[pe,H,ee,$]),oe}({targetRef:zt,fallbackRef:Vn,initialFocusRef:u||void 0,enabled:F&&C&&u!==!1}),Hi=function(D){var $=D.getSnapPoints,H=D.heightRef,ee=D.lastSnapRef,pe=D.ready,oe=function(Oe){var ot=Oe.contentRef,Lt=Oe.controlledMaxHeight,Ie=Oe.footerEnabled,gn=Oe.footerRef,Gn=Oe.headerEnabled,at=Oe.headerRef,jr=Oe.registerReady,qi=Oe.resizeSourceRef,Mc=p.useMemo(function(){return jr("contentHeight")},[jr]),Dc=function(Ir,Fc,Gi){var Wi=p.useMemo(function(){return Fc("maxHeight")},[Fc]),Bc=p.useState(function(){return vs(Ir)||typeof window<"u"?window.innerHeight:0}),Vc=Bc[0],xo=Bc[1],Hc=Vc>0,Zi=p.useRef(0);return p.useDebugValue(Ir?"controlled":"auto"),p.useEffect(function(){Hc&&Wi()},[Hc,Wi]),fi(function(){if(Ir)return xo(vs(Ir)),void(Gi.current="maxheightprop");var Uc=function(){Zi.current||(Zi.current=requestAnimationFrame(function(){xo(window.innerHeight),Gi.current="window",Zi.current=0}))};return window.addEventListener("resize",Uc),xo(window.innerHeight),Gi.current="window",Wi(),function(){window.removeEventListener("resize",Uc),cancelAnimationFrame(Zi.current)}},[Ir,Wi,Gi]),Vc}(Lt,jr,qi),_o=Wo(at,{label:"headerHeight",enabled:Gn,resizeSourceRef:qi}),Nc=Wo(ot,{label:"contentHeight",enabled:!0,resizeSourceRef:qi}),Eo=Wo(gn,{label:"footerHeight",enabled:Ie,resizeSourceRef:qi}),jc=Math.min(Dc-_o-Eo,Nc)+_o+Eo;p.useDebugValue("minHeight: "+jc);var Ic=Nc>0;return p.useEffect(function(){Ic&&Mc()},[Ic,Mc]),{maxHeight:Dc,minHeight:jc,headerHeight:_o,footerHeight:Eo}}({contentRef:D.contentRef,controlledMaxHeight:D.controlledMaxHeight,footerEnabled:D.footerEnabled,footerRef:D.footerRef,headerEnabled:D.headerEnabled,headerRef:D.headerRef,registerReady:D.registerReady,resizeSourceRef:D.resizeSourceRef}),de=oe.maxHeight,fe=oe.minHeight,ge=oe.headerHeight,q=oe.footerHeight,ae=function(Oe,ot){var Lt=[].concat(Oe).map(vs).reduce(function(at,jr){return at.add(qr(jr,0,ot)),at},new Set),Ie=Array.from(Lt),gn=Math.min.apply(Math,Ie);if(Number.isNaN(gn))throw new TypeError("minSnap is NaN");var Gn=Math.max.apply(Math,Ie);if(Number.isNaN(Gn))throw new TypeError("maxSnap is NaN");return{snapPoints:Ie,minSnap:gn,maxSnap:Gn}}(pe?$({height:H.current,footerHeight:q,headerHeight:ge,minHeight:fe,maxHeight:de}):[0],de),Je=ae.snapPoints,qn=ae.minSnap,st=ae.maxSnap;return p.useDebugValue("minSnap: "+qn+", maxSnap:"+st),{minSnap:qn,maxSnap:st,findSnap:function(Oe){var ot=vs(typeof Oe=="function"?Oe({footerHeight:q,headerHeight:ge,height:H.current,minHeight:fe,maxHeight:de,snapPoints:Je,lastSnap:ee.current}):Oe);return Je.reduce(function(Lt,Ie){return Math.abs(Ie-ot)<Math.abs(Lt-ot)?Ie:Lt},qn)},maxHeight:de}}({contentRef:kr,controlledMaxHeight:h,footerEnabled:!!s,footerRef:Vi,getSnapPoints:w,headerEnabled:o!==!1,headerRef:gt,heightRef:Ke,lastSnapRef:l,ready:F,registerReady:G,resizeSourceRef:Hn}),Mr=Hi.minSnap,Dr=Hi.maxSnap,Nr=Hi.maxHeight,Ui=Hi.findSnap,At=p.useRef(Nr),Qe=p.useRef(Mr),Ce=p.useRef(Dr),$i=p.useRef(Ui),vt=p.useRef(0);fi(function(){At.current=Nr,Ce.current=Dr,Qe.current=Mr,$i.current=Ui,vt.current=Ui(m)},[Ui,m,Nr,Dr,Mr]);var je=p.useCallback(function(D){var $=D.onRest,H=D.config,ee=(H=H===void 0?{}:H).velocity,pe=ee===void 0?1:ee,oe=Vs(H,e4),de=Vs(D,t4);return new Promise(function(fe){return me(De({},de,{config:De({velocity:pe},oe,{mass:1,tension:n4,friction:Math.max(ys,ys+(ys-ys*pe))}),onRest:function(){var ge=[].slice.call(arguments);fe.apply(void 0,ge),$==null||$.apply(void 0,ge)}}))})},[me]),kc=Dy(X3,{devTools:!1,actions:{onOpenCancel:p.useCallback(function(){return se.current==null?void 0:se.current({type:"OPEN"})},[]),onSnapCancel:p.useCallback(function(D){return se.current==null?void 0:se.current({type:"SNAP",source:D.snapSource})},[]),onCloseCancel:p.useCallback(function(){return se.current==null?void 0:se.current({type:"CLOSE"})},[]),onResizeCancel:p.useCallback(function(){return se.current==null?void 0:se.current({type:"RESIZE",source:Hn.current})},[]),onOpenEnd:p.useCallback(function(){return X.current==null?void 0:X.current({type:"OPEN"})},[]),onSnapEnd:p.useCallback(function(D,$){return X.current==null?void 0:X.current({type:"SNAP",source:D.snapSource})},[]),onResizeEnd:p.useCallback(function(){return X.current==null?void 0:X.current({type:"RESIZE",source:Hn.current})},[])},context:{initialState:c},services:{onSnapStart:p.useCallback(function(D,$){try{return Promise.resolve(z.current==null?void 0:z.current({type:"SNAP",source:$.payload.source||"custom"}))}catch(H){return Promise.reject(H)}},[]),onOpenStart:p.useCallback(function(){try{return Promise.resolve(z.current==null?void 0:z.current({type:"OPEN"}))}catch(D){return Promise.reject(D)}},[]),onCloseStart:p.useCallback(function(){try{return Promise.resolve(z.current==null?void 0:z.current({type:"CLOSE"}))}catch(D){return Promise.reject(D)}},[]),onResizeStart:p.useCallback(function(){try{return Promise.resolve(z.current==null?void 0:z.current({type:"RESIZE",source:Hn.current}))}catch(D){return Promise.reject(D)}},[]),onSnapEnd:p.useCallback(function(D,$){try{return Promise.resolve(X.current==null?void 0:X.current({type:"SNAP",source:D.snapSource}))}catch(H){return Promise.reject(H)}},[]),onOpenEnd:p.useCallback(function(){try{return Promise.resolve(X.current==null?void 0:X.current({type:"OPEN"}))}catch(D){return Promise.reject(D)}},[]),onCloseEnd:p.useCallback(function(){try{return Promise.resolve(X.current==null?void 0:X.current({type:"CLOSE"}))}catch(D){return Promise.reject(D)}},[]),onResizeEnd:p.useCallback(function(){try{return Promise.resolve(X.current==null?void 0:X.current({type:"RESIZE",source:Hn.current}))}catch(D){return Promise.reject(D)}},[]),renderVisuallyHidden:p.useCallback(function(D,$){try{return Promise.resolve(je({y:vt.current,ready:0,maxHeight:At.current,maxSnap:Ce.current,minSnap:vt.current,immediate:!0})).then(function(){})}catch(H){return Promise.reject(H)}},[je]),activate:p.useCallback(function(D,$){try{return B.current=!0,Promise.resolve(Promise.all([Un.current.activate(),zn.current.activate(),$n.current.activate()])).then(function(){})}catch(H){return Promise.reject(H)}},[$n,zn,Un]),deactivate:p.useCallback(function(){try{return Un.current.deactivate(),zn.current.deactivate(),$n.current.deactivate(),B.current=!1,Promise.resolve()}catch(D){return Promise.reject(D)}},[$n,zn,Un]),openImmediately:p.useCallback(function(){try{return Ke.current=vt.current,Promise.resolve(je({y:vt.current,ready:1,maxHeight:At.current,maxSnap:Ce.current,minSnap:vt.current,immediate:!0})).then(function(){})}catch(D){return Promise.reject(D)}},[je]),openSmoothly:p.useCallback(function(){try{return Promise.resolve(je({y:0,ready:1,maxHeight:At.current,maxSnap:Ce.current,minSnap:vt.current,immediate:!0})).then(function(){return Ke.current=vt.current,Promise.resolve(je({y:vt.current,ready:1,maxHeight:At.current,maxSnap:Ce.current,minSnap:vt.current,immediate:Gt.current})).then(function(){})})}catch(D){return Promise.reject(D)}},[je,Gt]),snapSmoothly:p.useCallback(function(D,$){try{var H=$i.current(D.y);return Ke.current=H,l.current=H,Promise.resolve(je({y:H,ready:1,maxHeight:At.current,maxSnap:Ce.current,minSnap:Qe.current,immediate:Gt.current,config:{velocity:D.velocity}})).then(function(){})}catch(ee){return Promise.reject(ee)}},[je,l,Gt]),resizeSmoothly:p.useCallback(function(){try{var D=$i.current(Ke.current);return Ke.current=D,l.current=D,Promise.resolve(je({y:D,ready:1,maxHeight:At.current,maxSnap:Ce.current,minSnap:Qe.current,immediate:Hn.current!=="element"||Gt.current})).then(function(){})}catch($){return Promise.reject($)}},[je,l,Gt]),closeSmoothly:p.useCallback(function(D,$){try{return je({minSnap:Ke.current,immediate:!0}),Ke.current=0,Promise.resolve(je({y:0,maxHeight:At.current,maxSnap:Ce.current,immediate:Gt.current})).then(function(){return Promise.resolve(je({ready:0,immediate:!0})).then(function(){})})}catch(H){return Promise.reject(H)}},[je,Gt])}}),Zh=kc[0],Wt=kc[1];p.useEffect(function(){F&&Wt(a?"OPEN":"CLOSE")},[a,Wt,F]),fi(function(){(Nr||Dr||Mr)&&Wt("RESIZE")},[Nr,Dr,Mr,Wt]),p.useEffect(function(){return function(){Un.current.deactivate(),zn.current.deactivate(),$n.current.deactivate()}},[$n,zn,Un]),p.useImperativeHandle(e,function(){return{snapTo:function(D,$){var H=$===void 0?{}:$,ee=H.velocity,pe=ee===void 0?1:ee,oe=H.source,de=oe===void 0?"custom":oe;Wt("SNAP",{payload:{y:$i.current(D),velocity:pe,source:de}})},get height(){return Ke.current}}},[Wt]),p.useEffect(function(){var D=qt.current,$=function(ee){Co.current&&ee.preventDefault()},H=function(ee){D.scrollTop<0&&(requestAnimationFrame(function(){D.style.overflow="hidden",D.scrollTop=0,D.style.removeProperty("overflow")}),ee.preventDefault())};return A&&(D.addEventListener("scroll",$),D.addEventListener("touchmove",$),D.addEventListener("touchstart",H)),function(){D.removeEventListener("scroll",$),D.removeEventListener("touchmove",$),D.removeEventListener("touchstart",H)}},[A,qt]);var zi=r3(function(D){var $=D.args,H=($=$===void 0?[]:$)[0],ee=(H=H===void 0?{}:H).closeOnTap,pe=ee!==void 0&&ee,oe=H.isContentDragging,de=oe!==void 0&&oe,fe=D.cancel,ge=D.direction[1],q=D.down,ae=D.first,Je=D.last,qn=D.memo,st=qn===void 0?Ee.y.getValue():qn,Oe=D.tap,ot=D.velocity,Lt=-1*D.movement[1];if(!B.current)return fe(),st;if(d&&pe&&Oe)return fe(),setTimeout(function(){return d()},0),st;if(Oe)return st;var Ie=st+Lt,gn=Lt*ot,Gn=Math.max(Qe.current,Math.min(Ce.current,Ie+2*gn));if(!q&&d&&ge>0&&Ie+gn<Qe.current/2)return fe(),d(),st;var at=q?d||Qe.current!==Ce.current?ci(Ie,d?0:Qe.current,Ce.current,.55):Ie<Qe.current?ci(Ie,Qe.current,2*Ce.current,.55):ci(Ie,Qe.current/2,Ce.current,.55):Gn;return A&&de?(at>=Ce.current&&(at=Ce.current),st===Ce.current&&qt.current.scrollTop>0&&(at=Ce.current),Co.current=at<Ce.current):Co.current=!1,ae&&Wt("DRAG"),Je?(Wt("SNAP",{payload:{y:at,velocity:ot>.05?ot:1,source:"dragging"}}),st):(me({y:at,ready:1,maxHeight:At.current,maxSnap:Ce.current,minSnap:Qe.current,immediate:!0,config:{velocity:ot}}),st)},{filterTaps:!0});if(Number.isNaN(Ce.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(Qe.current))throw new TypeError("minSnapRef is NaN!!");var Kh=function(D){var $,H=D.spring,ee=Jn([H.y,H.maxHeight],function(q,ae){return Math.round(qr(ae-q,0,16))+"px"}),pe=Jn([H.y,H.minSnap,H.maxSnap],function(q,ae,Je){return qr(q,ae,Je)+"px"}),oe=Jn([H.y,H.minSnap,H.maxSnap],function(q,ae,Je){return q<ae?ae-q+"px":q>Je?Je-q+"px":"0px"}),de=Jn([H.y,H.maxSnap],function(q,ae){return q>=ae?Math.ceil(q-ae):0}),fe=Jn([H.y,H.minSnap],function(q,ae){if(!ae)return 0;var Je=Math.max(ae/2-45,0);return qr((q-Je)*(1/(Math.min(ae/2+45,ae)-Je)+0),0,1)}),ge=Jn([H.y,H.minSnap],function(q,ae){return ae?qr(q/ae,0,1):0});return($={})["--rsbs-content-opacity"]=fe,$["--rsbs-backdrop-opacity"]=ge,$["--rsbs-antigap-scale-y"]=de,$["--rsbs-overlay-translate-y"]=oe,$["--rsbs-overlay-rounded"]=ee,$["--rsbs-overlay-h"]=pe,$}({spring:Ee});return p.createElement(S2.div,De({},M,{"data-rsbs-root":!0,"data-rsbs-state":i4.find(Zh.matches),"data-rsbs-is-blocking":C,"data-rsbs-is-dismissable":!!d,"data-rsbs-has-header":!!o,"data-rsbs-has-footer":!!s,className:i,ref:zt,style:De({},Kh,x,{opacity:Ee.ready})}),r,C&&p.createElement("div",De({key:"backdrop","data-rsbs-backdrop":!0},zi({closeOnTap:!0}))),p.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:Vn,onKeyDown:function(D){D.key==="Escape"&&(D.stopPropagation(),d&&d())}},o!==!1&&p.createElement("div",De({key:"header","data-rsbs-header":!0,ref:gt},zi()),o),p.createElement("div",De({key:"scroll","data-rsbs-scroll":!0,ref:qt},A?zi({isContentDragging:!0}):{}),p.createElement("div",{"data-rsbs-content":!0,ref:kr},n)),s&&p.createElement("div",De({key:"footer",ref:Vi,"data-rsbs-footer":!0},zi()),s)))}),i4=["closed","opening","open","closing","dragging","snapping","resizing"];function s4(t){var e=t.lastSnap;return e??Math.min.apply(Math,t.snapPoints)}function o4(t){return t.minHeight}var a4=["onSpringStart","onSpringEnd","skipInitialTransition"],fh=p.forwardRef(function(t,e){var n=t.onSpringStart,r=t.onSpringEnd,i=t.skipInitialTransition,s=Vs(t,a4),o=p.useState(!1),a=o[0],c=o[1],l=p.useRef(),u=p.useRef(null),d=p.useRef(i&&s.open?"OPEN":"CLOSED");fi(function(){if(s.open)return cancelAnimationFrame(l.current),c(!0),function(){d.current="CLOSED"}},[s.open]);var h=p.useCallback(function(m){return Promise.resolve(n==null?void 0:n(m)).then(function(){m.type==="OPEN"&&cancelAnimationFrame(l.current)})},[n]),v=p.useCallback(function(m){return Promise.resolve(r==null?void 0:r(m)).then(function(){m.type==="CLOSE"&&(l.current=requestAnimationFrame(function(){return c(!1)}))})},[r]);return a?p.createElement(A1,{"data-rsbs-portal":!0},p.createElement(r4,De({},s,{lastSnapRef:u,ref:e,initialState:d.current,onSpringStart:h,onSpringEnd:v}))):null});const hh=28,c4="MapGoogle-module__root__Vi-sMl",l4="MapGoogle-module__mapContainer__OCCTIX",u4="MapGoogle-module__balloon__4UVhuT",d4="MapGoogle-module__details__4osNXn",f4="MapGoogle-module__cluster__5qmRds",h4="MapGoogle-module__number__JdGUGZ",p4="MapGoogle-module__overlay__g-nEoT",m4="MapGoogle-module__mapControl__mzyTwr",g4="MapGoogle-module__geolocationControl__1exHgA",v4="MapGoogle-module__bottomSheet__avcBmY",y4="MapGoogle-module__locationViewContent__xwLeDh",b4="MapGoogle-module__locationViewHeader__maBLv0",w4="MapGoogle-module__deliveryDetailsViewContent__wH-RCe",S4="MapGoogle-module__deliveryDetailsViewHeader__4AKoBe",C4="MapGoogle-module__sheetSubmit__rPQG26",Re={root:c4,mapContainer:l4,balloon:u4,details:d4,cluster:f4,number:h4,overlay:p4,mapControl:m4,geolocationControl:g4,bottomSheet:v4,locationViewContent:y4,locationViewHeader:b4,deliveryDetailsViewContent:w4,deliveryDetailsViewHeader:S4,sheetSubmit:C4},ph=({children:t,hideFooter:e,minSnapHeight:n,onSubmitClick:r,open:i,submitDisabled:s,submitLoading:o,...a})=>{const[c,l]=p.useState(!1);return p.useEffect(()=>{let u;return i?u=setTimeout(()=>{l(i)},400):l(i),()=>{clearTimeout(u)}},[i]),S.jsx(fh,{expandOnContentDrag:!0,open:c,initialFocusRef:!1,defaultSnap:({snapPoints:u})=>Math.min(...u),blocking:!1,snapPoints:({footerHeight:u,headerHeight:d,maxHeight:h,minHeight:v})=>[n==null?v:d+u+n,h-hh],footer:e?null:S.jsx(rt,{disabled:s,loading:o,variant:"primary",className:Re.sheetSubmit,onClick:r,children:S.jsx(It,{keyName:"choose",ns:"common"})}),sibling:S.jsx("div",{role:"presentation","data-rsbs-backdrop":"true",onClick:u=>{var d;u.stopPropagation(),u.preventDefault(),(d=a.onDismiss)==null||d.call(a)}}),children:S.jsx("div",{className:Re.bottomSheet,children:t})})},_4={header:Re.locationViewHeader,content:Re.locationViewContent},E4=({handleCloseClick:t,handleSubmitClick:e})=>{const n=Bn("screenSm"),r=it(c=>c.location),i=!!r,s=fc({isSelectedPoint:i}),{isIdle:o}=te(),a=o&&i&&s;return n&&r?S.jsx(ph,{minSnapHeight:300,open:!!a,onDismiss:t,onSubmitClick:()=>e(r),children:S.jsx(mf,{hideActions:!0,classes:_4,location:r,onClose:t})}):null},x4="Overlay-module__root__3qTsUC",O4={root:x4},mh=({children:t,className:e})=>S.jsx("div",{className:J(O4.root,e),children:t}),gh=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32",fill:"none",...t},N.createElement("path",{d:"M25.7074 24.2926C25.8004 24.3855 25.8741 24.4958 25.9243 24.6172C25.9746 24.7386 26.0005 24.8687 26.0005 25.0001C26.0005 25.1315 25.9746 25.2616 25.9243 25.383C25.8741 25.5044 25.8004 25.6147 25.7074 25.7076C25.6145 25.8005 25.5042 25.8742 25.3828 25.9245C25.2614 25.9747 25.1313 26.0006 24.9999 26.0006C24.8686 26.0006 24.7384 25.9747 24.6171 25.9245C24.4957 25.8742 24.3854 25.8005 24.2924 25.7076L15.9999 17.4138L7.70745 25.7076C7.5198 25.8952 7.26531 26.0006 6.99995 26.0006C6.73458 26.0006 6.48009 25.8952 6.29245 25.7076C6.1048 25.5199 5.99939 25.2654 5.99939 25.0001C5.99939 24.7347 6.10481 24.4802 6.29245 24.2926L14.5862 16.0001L6.29245 7.70757C6.1048 7.51993 5.99939 7.26543 5.99939 7.00007C5.99939 6.7347 6.1048 6.48021 6.29245 6.29257C6.48009 6.10493 6.73458 5.99951 6.99995 5.99951C7.26531 5.99951 7.5198 6.10493 7.70745 6.29257L15.9999 14.5863L24.2924 6.29257C24.4801 6.10493 24.7346 5.99951 24.9999 5.99951C25.2653 5.99951 25.5198 6.10493 25.7074 6.29257C25.8951 6.48021 26.0005 6.7347 26.0005 7.00007C26.0005 7.26543 25.8951 7.51993 25.7074 7.70757L17.4137 16.0001L25.7074 24.2926Z",fill:"#000000"})),P4='<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" fill="none" viewBox="0 0 48 66"><path fill="url(#a)" fill-opacity=".4" d="M23.999 66C35.045 66 44 63.314 44 60s-8.955-6-20.001-6C12.955 54 4 56.686 4 60s8.955 6 19.999 6Z" style="mix-blend-mode:darken"/><g filter="url(#b)"><path fill="currentColor" fill-opacity=".8" fill-rule="evenodd" d="M24 0c11.211 0 24 8.288 24 24.088C48 34.6 40.011 48.411 24 60 7.989 48.41 0 34.6 0 24.088 0 8.288 12.789 0 24 0Z" clip-rule="evenodd"/></g><path fill="#fff" fill-rule="evenodd" d="M36.503 33.501V19.625a3 3 0 0 0-1.583-2.645l-9.502-5.091a3 3 0 0 0-2.834 0l-9.501 5.091a3 3 0 0 0-1.583 2.645V33.5a3 3 0 0 0 3 3h19.003a3 3 0 0 0 3-3Zm-7.752 1h4.752a1 1 0 0 0 1-1V19.625a1 1 0 0 0-.528-.882l-9.501-5.091a1 1 0 0 0-.945 0l-9.501 5.091a1 1 0 0 0-.528.882V33.5a1 1 0 0 0 1 1h4.75a2.516 2.516 0 0 1-.05-.5V23.747a2.5 2.5 0 0 1 2.5-2.5h4.602a2.5 2.5 0 0 1 2.5 2.5V34c0 .172-.018.339-.05.5Zm-2.434 0a.5.5 0 0 0 .485-.5V23.747a.5.5 0 0 0-.5-.5H21.7a.5.5 0 0 0-.5.5V34a.5.5 0 0 0 .484.5h4.632Z" clip-rule="evenodd"/><defs><radialGradient id="a" cx="0" cy="0" r="1" gradientTransform="matrix(0 6 -20 0 24 60)" gradientUnits="userSpaceOnUse"><stop/><stop offset="1" stop-opacity="0"/></radialGradient><filter id="b" width="56" height="68" x="-4" y="-4" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feGaussianBlur in="BackgroundImageFix" stdDeviation="2"/><feComposite in2="SourceAlpha" operator="in" result="effect1_backgroundBlur_1068_16960"/><feBlend in="SourceGraphic" in2="effect1_backgroundBlur_1068_16960" result="shape"/></filter></defs></svg>',T4=`<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" viewBox="0 0 48 66" fill="none">
50
+ */function Xl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Yl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Xl(Object(n),!0).forEach(function(r){y3(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function y3(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var eu=function(){var t=[];return{activateTrap:function(n){if(t.length>0){var r=t[t.length-1];r!==n&&r.pause()}var i=t.indexOf(n);i===-1||t.splice(i,1),t.push(n)},deactivateTrap:function(n){var r=t.indexOf(n);r!==-1&&t.splice(r,1),t.length>0&&t[t.length-1].unpause()}}}(),b3=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},w3=function(e){return e.key==="Escape"||e.key==="Esc"||e.keyCode===27},S3=function(e){return e.key==="Tab"||e.keyCode===9},tu=function(e){return setTimeout(e,0)},nu=function(e,n){var r=-1;return e.every(function(i,s){return n(i)?(r=s,!1):!0}),r},$r=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return typeof e=="function"?e.apply(void 0,r):e},hs=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},C3=function(e,n){var r=(n==null?void 0:n.document)||document,i=Yl({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},n),s={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},o,a=function(g,_,O){return g&&g[_]!==void 0?g[_]:i[O||_]},c=function(g){return s.containerGroups.findIndex(function(_){var O=_.container,T=_.tabbableNodes;return O.contains(g)||T.find(function(R){return R===g})})},l=function(g){var _=i[g];if(typeof _=="function"){for(var O=arguments.length,T=new Array(O>1?O-1:0),R=1;R<O;R++)T[R-1]=arguments[R];_=_.apply(void 0,T)}if(_===!0&&(_=void 0),!_){if(_===void 0||_===!1)return _;throw new Error("`".concat(g,"` was specified but was not a node, or did not return a node"))}var L=_;if(typeof _=="string"&&(L=r.querySelector(_),!L))throw new Error("`".concat(g,"` as selector refers to no known node"));return L},u=function(){var g=l("initialFocus");if(g===!1)return!1;if(g===void 0)if(c(r.activeElement)>=0)g=r.activeElement;else{var _=s.tabbableGroups[0],O=_&&_.firstTabbableNode;g=O||l("fallbackFocus")}if(!g)throw new Error("Your focus-trap needs to have at least one focusable element");return g},d=function(){if(s.containerGroups=s.containers.map(function(g){var _=m3(g,i.tabbableOptions),O=g3(g,i.tabbableOptions);return{container:g,tabbableNodes:_,focusableNodes:O,firstTabbableNode:_.length>0?_[0]:null,lastTabbableNode:_.length>0?_[_.length-1]:null,nextTabbableNode:function(R){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,A=O.findIndex(function(D){return D===R});if(!(A<0))return L?O.slice(A+1).find(function(D){return fs(D,i.tabbableOptions)}):O.slice(0,A).reverse().find(function(D){return fs(D,i.tabbableOptions)})}}}),s.tabbableGroups=s.containerGroups.filter(function(g){return g.tabbableNodes.length>0}),s.tabbableGroups.length<=0&&!l("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},h=function x(g){if(g!==!1&&g!==r.activeElement){if(!g||!g.focus){x(u());return}g.focus({preventScroll:!!i.preventScroll}),s.mostRecentlyFocusedNode=g,b3(g)&&g.select()}},v=function(g){var _=l("setReturnFocus",g);return _||(_===!1?!1:g)},m=function(g){var _=hs(g);if(!(c(_)>=0)){if($r(i.clickOutsideDeactivates,g)){o.deactivate({returnFocus:i.returnFocusOnDeactivate&&!zo(_,i.tabbableOptions)});return}$r(i.allowOutsideClick,g)||g.preventDefault()}},f=function(g){var _=hs(g),O=c(_)>=0;O||_ instanceof Document?O&&(s.mostRecentlyFocusedNode=_):(g.stopImmediatePropagation(),h(s.mostRecentlyFocusedNode||u()))},w=function(g){var _=hs(g);d();var O=null;if(s.tabbableGroups.length>0){var T=c(_),R=T>=0?s.containerGroups[T]:void 0;if(T<0)g.shiftKey?O=s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:O=s.tabbableGroups[0].firstTabbableNode;else if(g.shiftKey){var L=nu(s.tabbableGroups,function(I){var z=I.firstTabbableNode;return _===z});if(L<0&&(R.container===_||zo(_,i.tabbableOptions)&&!fs(_,i.tabbableOptions)&&!R.nextTabbableNode(_,!1))&&(L=T),L>=0){var A=L===0?s.tabbableGroups.length-1:L-1,D=s.tabbableGroups[A];O=D.lastTabbableNode}}else{var N=nu(s.tabbableGroups,function(I){var z=I.lastTabbableNode;return _===z});if(N<0&&(R.container===_||zo(_,i.tabbableOptions)&&!fs(_,i.tabbableOptions)&&!R.nextTabbableNode(_))&&(N=T),N>=0){var V=N===s.tabbableGroups.length-1?0:N+1,q=s.tabbableGroups[V];O=q.firstTabbableNode}}}else O=l("fallbackFocus");O&&(g.preventDefault(),h(O))},y=function(g){if(w3(g)&&$r(i.escapeDeactivates,g)!==!1){g.preventDefault(),o.deactivate();return}if(S3(g)){w(g);return}},C=function(g){var _=hs(g);c(_)>=0||$r(i.clickOutsideDeactivates,g)||$r(i.allowOutsideClick,g)||(g.preventDefault(),g.stopImmediatePropagation())},b=function(){if(s.active)return eu.activateTrap(o),s.delayInitialFocusTimer=i.delayInitialFocus?tu(function(){h(u())}):h(u()),r.addEventListener("focusin",f,!0),r.addEventListener("mousedown",m,{capture:!0,passive:!1}),r.addEventListener("touchstart",m,{capture:!0,passive:!1}),r.addEventListener("click",C,{capture:!0,passive:!1}),r.addEventListener("keydown",y,{capture:!0,passive:!1}),o},E=function(){if(s.active)return r.removeEventListener("focusin",f,!0),r.removeEventListener("mousedown",m,!0),r.removeEventListener("touchstart",m,!0),r.removeEventListener("click",C,!0),r.removeEventListener("keydown",y,!0),o};return o={get active(){return s.active},get paused(){return s.paused},activate:function(g){if(s.active)return this;var _=a(g,"onActivate"),O=a(g,"onPostActivate"),T=a(g,"checkCanFocusTrap");T||d(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=r.activeElement,_&&_();var R=function(){T&&d(),b(),O&&O()};return T?(T(s.containers.concat()).then(R,R),this):(R(),this)},deactivate:function(g){if(!s.active)return this;var _=Yl({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},g);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,E(),s.active=!1,s.paused=!1,eu.deactivateTrap(o);var O=a(_,"onDeactivate"),T=a(_,"onPostDeactivate"),R=a(_,"checkCanReturnFocus"),L=a(_,"returnFocus","returnFocusOnDeactivate");O&&O();var A=function(){tu(function(){L&&h(v(s.nodeFocusedBeforeActivation)),T&&T()})};return L&&R?(R(v(s.nodeFocusedBeforeActivation)).then(A,A),this):(A(),this)},pause:function(){return s.paused||!s.active?this:(s.paused=!0,E(),this)},unpause:function(){return!s.paused||!s.active?this:(s.paused=!1,d(),b(),this)},updateContainerElements:function(g){var _=[].concat(g).filter(Boolean);return s.containers=_.map(function(O){return typeof O=="string"?r.querySelector(O):O}),s.active&&d(),this}},o.updateContainerElements(e),o};function _3(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}else return Array.from(t)}var Sc=!1;if(typeof window<"u"){var ru={get passive(){Sc=!0}};window.addEventListener("testPassive",null,ru),window.removeEventListener("testPassive",null,ru)}var nh=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),hn=[],no=!1,rh=-1,li=void 0,ui=void 0,ih=function(e){return hn.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(e))})},ro=function(e){var n=e||window.event;return ih(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},E3=function(e){if(ui===void 0){var n=!!e&&e.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;n&&r>0&&(ui=document.body.style.paddingRight,document.body.style.paddingRight=r+"px")}li===void 0&&(li=document.body.style.overflow,document.body.style.overflow="hidden")},x3=function(){ui!==void 0&&(document.body.style.paddingRight=ui,ui=void 0),li!==void 0&&(document.body.style.overflow=li,li=void 0)},O3=function(e){return e?e.scrollHeight-e.scrollTop<=e.clientHeight:!1},P3=function(e,n){var r=e.targetTouches[0].clientY-rh;return ih(e.target)?!1:n&&n.scrollTop===0&&r>0||O3(n)&&r<0?ro(e):(e.stopPropagation(),!0)},T3=function(e,n){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!hn.some(function(i){return i.targetElement===e})){var r={targetElement:e,options:n||{}};hn=[].concat(_3(hn),[r]),nh?(e.ontouchstart=function(i){i.targetTouches.length===1&&(rh=i.targetTouches[0].clientY)},e.ontouchmove=function(i){i.targetTouches.length===1&&P3(i,e)},no||(document.addEventListener("touchmove",ro,Sc?{passive:!1}:void 0),no=!0)):E3(n)}},A3=function(e){if(!e){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}hn=hn.filter(function(n){return n.targetElement!==e}),nh?(e.ontouchstart=null,e.ontouchmove=null,no&&hn.length===0&&(document.removeEventListener("touchmove",ro,Sc?{passive:!1}:void 0),no=!1)):hn.length||x3()},Mn=[],R3=function(){return Mn.some(function(t){return t.activeTargets.length>0})},L3=function(){return Mn.some(function(t){return t.skippedTargets.length>0})},iu="ResizeObserver loop completed with undelivered notifications.",k3=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:iu}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=iu),window.dispatchEvent(t)},yi;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(yi||(yi={}));var Dn=function(t){return Object.freeze(t)},M3=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,Dn(this)}return t}(),sh=function(){function t(e,n,r,i){return this.x=e,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Dn(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,r=e.y,i=e.top,s=e.right,o=e.bottom,a=e.left,c=e.width,l=e.height;return{x:n,y:r,top:i,right:s,bottom:o,left:a,width:c,height:l}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),Cc=function(t){return t instanceof SVGElement&&"getBBox"in t},oh=function(t){if(Cc(t)){var e=t.getBBox(),n=e.width,r=e.height;return!n&&!r}var i=t,s=i.offsetWidth,o=i.offsetHeight;return!(s||o||t.getClientRects().length)},su=function(t){var e;if(t instanceof Element)return!0;var n=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},D3=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},di=typeof window<"u"?window:{},ps=new WeakMap,ou=/auto|scroll/,N3=/^tb|vertical/,j3=/msie|trident/i.test(di.navigator&&di.navigator.userAgent),yt=function(t){return parseFloat(t||"0")},or=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new M3((n?e:t)||0,(n?t:e)||0)},au=Dn({devicePixelContentBoxSize:or(),borderBoxSize:or(),contentBoxSize:or(),contentRect:new sh(0,0,0,0)}),ah=function(t,e){if(e===void 0&&(e=!1),ps.has(t)&&!e)return ps.get(t);if(oh(t))return ps.set(t,au),au;var n=getComputedStyle(t),r=Cc(t)&&t.ownerSVGElement&&t.getBBox(),i=!j3&&n.boxSizing==="border-box",s=N3.test(n.writingMode||""),o=!r&&ou.test(n.overflowY||""),a=!r&&ou.test(n.overflowX||""),c=r?0:yt(n.paddingTop),l=r?0:yt(n.paddingRight),u=r?0:yt(n.paddingBottom),d=r?0:yt(n.paddingLeft),h=r?0:yt(n.borderTopWidth),v=r?0:yt(n.borderRightWidth),m=r?0:yt(n.borderBottomWidth),f=r?0:yt(n.borderLeftWidth),w=d+l,y=c+u,C=f+v,b=h+m,E=a?t.offsetHeight-b-t.clientHeight:0,x=o?t.offsetWidth-C-t.clientWidth:0,g=i?w+C:0,_=i?y+b:0,O=r?r.width:yt(n.width)-g-x,T=r?r.height:yt(n.height)-_-E,R=O+w+x+C,L=T+y+E+b,A=Dn({devicePixelContentBoxSize:or(Math.round(O*devicePixelRatio),Math.round(T*devicePixelRatio),s),borderBoxSize:or(R,L,s),contentBoxSize:or(O,T,s),contentRect:new sh(d,c,O,T)});return ps.set(t,A),A},ch=function(t,e,n){var r=ah(t,n),i=r.borderBoxSize,s=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(e){case yi.DEVICE_PIXEL_CONTENT_BOX:return o;case yi.BORDER_BOX:return i;default:return s}},I3=function(){function t(e){var n=ah(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=Dn([n.borderBoxSize]),this.contentBoxSize=Dn([n.contentBoxSize]),this.devicePixelContentBoxSize=Dn([n.devicePixelContentBoxSize])}return t}(),lh=function(t){if(oh(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},F3=function(){var t=1/0,e=[];Mn.forEach(function(o){if(o.activeTargets.length!==0){var a=[];o.activeTargets.forEach(function(l){var u=new I3(l.target),d=lh(l.target);a.push(u),l.lastReportedSize=ch(l.target,l.observedBox),d<t&&(t=d)}),e.push(function(){o.callback.call(o.observer,a,o.observer)}),o.activeTargets.splice(0,o.activeTargets.length)}});for(var n=0,r=e;n<r.length;n++){var i=r[n];i()}return t},cu=function(t){Mn.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(lh(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},B3=function(){var t=0;for(cu(t);R3();)t=F3(),cu(t);return L3()&&k3(),t>0},qo,uh=[],V3=function(){return uh.splice(0).forEach(function(t){return t()})},H3=function(t){if(!qo){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return V3()}).observe(n,r),qo=function(){n.textContent="".concat(e?e--:e++)}}uh.push(t),qo()},U3=function(t){H3(function(){requestAnimationFrame(t)})},Bs=0,$3=function(){return!!Bs},z3=250,q3={attributes:!0,characterData:!0,childList:!0,subtree:!0},lu=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],uu=function(t){return t===void 0&&(t=0),Date.now()+t},Go=!1,G3=function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=z3),!Go){Go=!0;var r=uu(e);U3(function(){var i=!1;try{i=B3()}finally{if(Go=!1,e=r-uu(),!$3())return;i?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,q3)};document.body?n():di.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),lu.forEach(function(n){return di.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),lu.forEach(function(n){return di.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),Ia=new G3,du=function(t){!Bs&&t>0&&Ia.start(),Bs+=t,!Bs&&Ia.stop()},W3=function(t){return!Cc(t)&&!D3(t)&&getComputedStyle(t).display==="inline"},Z3=function(){function t(e,n){this.target=e,this.observedBox=n||yi.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=ch(this.target,this.observedBox,!0);return W3(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),K3=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),ms=new WeakMap,fu=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},gs=function(){function t(){}return t.connect=function(e,n){var r=new K3(e,n);ms.set(e,r)},t.observe=function(e,n,r){var i=ms.get(e),s=i.observationTargets.length===0;fu(i.observationTargets,n)<0&&(s&&Mn.push(i),i.observationTargets.push(new Z3(n,r&&r.box)),du(1),Ia.schedule())},t.unobserve=function(e,n){var r=ms.get(e),i=fu(r.observationTargets,n),s=r.observationTargets.length===1;i>=0&&(s&&Mn.splice(Mn.indexOf(r),1),r.observationTargets.splice(i,1),du(-1))},t.disconnect=function(e){var n=this,r=ms.get(e);r.observationTargets.slice().forEach(function(i){return n.unobserve(e,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t}(),Q3=function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");gs.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!su(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");gs.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!su(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");gs.unobserve(this,e)},t.prototype.disconnect=function(){gs.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();function Ne(){return Ne=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ne.apply(this,arguments)}function Vs(t,e){if(t==null)return{};var n,r,i={},s=Object.keys(t);for(r=0;r<s.length;r++)e.indexOf(n=s[r])>=0||(i[n]=t[n]);return i}var fi=typeof window<"u"?p.useLayoutEffect:p.useEffect;function zr(t,e,n){return e=(e=+e)==e?e:0,n=(n=+n)==n?n:0,(t=+t)==t&&(t=(t=t<=n?t:n)>=e?t:e),t}function vs(t){var e=Math.round(t);if(Number.isNaN(t))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return e}var J3={box:"border-box"};function Wo(t,e){var n=e.label,r=e.enabled,i=e.resizeSourceRef,s=p.useState(0),o=s[0],a=s[1];p.useDebugValue(n+": "+o);var c=p.useCallback(function(l){a(l[0].borderBoxSize[0].blockSize),i.current="element"},[i]);return fi(function(){if(t.current&&r){var l=new Q3(c);return l.observe(t.current,J3),function(){l.disconnect()}}},[t,c,r]),r?o:0}function Me(t){return t===void 0&&(t=1e3),new Promise(function(e){return setTimeout(e,t)})}var hu={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},pu={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},X3=Ey({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:Ne({},hu,pu)}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:Ne({},hu,pu)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:Ne({},{CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}}),onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[xy({y:function(t,e){return e.payload.y},velocity:function(t,e){return e.payload.velocity},snapSource:function(t,e){var n=e.payload.source;return n===void 0?"custom":n}})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:function(t,e){},onSnapCancel:function(t,e){},onResizeCancel:function(t,e){},onCloseCancel:function(t,e){},onOpenEnd:function(t,e){},onSnapEnd:function(t,e){},onRezizeEnd:function(t,e){}},services:{onSnapStart:function(){try{return Promise.resolve(Me()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenStart:function(){try{return Promise.resolve(Me()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseStart:function(){try{return Promise.resolve(Me()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeStart:function(){try{return Promise.resolve(Me()).then(function(){})}catch(t){return Promise.reject(t)}},onSnapEnd:function(){try{return Promise.resolve(Me()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenEnd:function(){try{return Promise.resolve(Me()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseEnd:function(){try{return Promise.resolve(Me()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeEnd:function(){try{return Promise.resolve(Me()).then(function(){})}catch(t){return Promise.reject(t)}},renderVisuallyHidden:function(t,e){try{return Promise.resolve(Me()).then(function(){})}catch(n){return Promise.reject(n)}},activate:function(t,e){try{return Promise.resolve(Me()).then(function(){})}catch(n){return Promise.reject(n)}},deactivate:function(t,e){try{return Promise.resolve(Me()).then(function(){})}catch(n){return Promise.reject(n)}},openSmoothly:function(t,e){try{return Promise.resolve(Me()).then(function(){})}catch(n){return Promise.reject(n)}},openImmediately:function(t,e){try{return Promise.resolve(Me()).then(function(){})}catch(n){return Promise.reject(n)}},snapSmoothly:function(t,e){try{return Promise.resolve(Me()).then(function(){})}catch(n){return Promise.reject(n)}},resizeSmoothly:function(t,e){try{return Promise.resolve(Me()).then(function(){})}catch(n){return Promise.reject(n)}},closeSmoothly:function(t,e){try{return Promise.resolve(Me()).then(function(){})}catch(n){return Promise.reject(n)}}},guards:{initiallyClosed:function(t){return t.initialState==="CLOSED"},initiallyOpen:function(t){return t.initialState==="OPEN"}}}),Y3=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],e4=["velocity"],t4=["onRest","config"],dh=Jy.default,n4=dh.tension,ys=dh.friction,r4=p.forwardRef(function(t,e){var n=t.children,r=t.sibling,i=t.className,s=t.footer,o=t.header,a=t.open,c=t.initialState,l=t.lastSnapRef,u=t.initialFocusRef,d=t.onDismiss,h=t.maxHeight,v=t.defaultSnap,m=v===void 0?s4:v,f=t.snapPoints,w=f===void 0?o4:f,y=t.blocking,C=y===void 0||y,b=t.scrollLocking,E=b===void 0||b,x=t.style,g=t.onSpringStart,_=t.onSpringCancel,O=t.onSpringEnd,T=t.reserveScrollBarGap,R=T===void 0?C:T,L=t.expandOnContentDrag,A=L!==void 0&&L,D=Vs(t,Y3),N=function(){var M=p.useState(!1),$=M[0],H=M[1],ee=p.useState({}),pe=ee[0],oe=ee[1],de=p.useCallback(function(fe){return oe(function(ge){var G;return Ne({},ge,((G={})[fe]=!1,G))}),function(){oe(function(ge){var G;return Ne({},ge,((G={})[fe]=!0,G))})}},[]);return p.useEffect(function(){var fe=Object.values(pe);fe.length!==0&&fe.every(Boolean)&&H(!0)},[pe]),{ready:$,registerReady:de}}(),V=N.ready,q=N.registerReady,I=p.useRef(!1),z=p.useRef(g),le=p.useRef(_),ne=p.useRef(O);p.useEffect(function(){z.current=g,le.current=_,ne.current=O},[_,g,O]);var se,Z,Oe=n2(function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}}),Ce=Oe[0],me=Oe[1],qt=p.useRef(null),Gt=p.useRef(null),Lr=p.useRef(null),gt=p.useRef(null),Vi=p.useRef(null),Vn=p.useRef(null),Qe=p.useRef(0),Hn=p.useRef(),Co=p.useRef(!1),Wt=(se=p.useMemo(function(){return typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null},[]),Z=p.useRef(se==null?void 0:se.matches),p.useDebugValue(Z.current?"reduce":"no-preference"),p.useEffect(function(){var M=function($){Z.current=$.matches};return se==null||se.addListener(M),function(){return se==null?void 0:se.removeListener(M)}},[se]),Z),Un=function(M){var $=M.targetRef,H=M.enabled,ee=M.reserveScrollBarGap,pe=p.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return p.useDebugValue(H?"Enabled":"Disabled"),p.useEffect(function(){if(!H)return pe.current.deactivate(),void(pe.current={activate:function(){},deactivate:function(){}});var oe=$.current,de=!1;pe.current={activate:function(){de||(de=!0,T3(oe,{allowTouchMove:function(fe){return fe.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:ee}))},deactivate:function(){de&&(de=!1,A3(oe))}}},[H,$,ee]),pe}({targetRef:Gt,enabled:V&&E,reserveScrollBarGap:R}),$n=function(M){var $=M.targetRef,H=M.enabled,ee=p.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return p.useDebugValue(H?"Enabled":"Disabled"),p.useEffect(function(){if(!H)return ee.current.deactivate(),void(ee.current={activate:function(){},deactivate:function(){}});var pe=$.current,oe=!1,de=[],fe=[];ee.current={activate:function(){if(!oe){oe=!0;var ge=pe.parentNode;document.querySelectorAll("body > *").forEach(function(G){if(G!==ge){var ae=G.getAttribute("aria-hidden");ae!==null&&ae!=="false"||(de.push(ae),fe.push(G),G.setAttribute("aria-hidden","true"))}})}},deactivate:function(){oe&&(oe=!1,fe.forEach(function(ge,G){var ae=de[G];ae===null?ge.removeAttribute("aria-hidden"):ge.setAttribute("aria-hidden",ae)}),de=[],fe=[])}}},[$,H]),ee}({targetRef:qt,enabled:V&&C}),zn=function(M){var $=M.targetRef,H=M.fallbackRef,ee=M.initialFocusRef,pe=M.enabled,oe=p.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return p.useDebugValue(pe?"Enabled":"Disabled"),p.useEffect(function(){if(!pe)return oe.current.deactivate(),void(oe.current={activate:function(){},deactivate:function(){}});var de=H.current,fe=C3($.current,{onActivate:void 0,initialFocus:ee?function(){return(ee==null?void 0:ee.current)||de}:void 0,fallbackFocus:de,escapeDeactivates:!1,clickOutsideDeactivates:!1}),ge=!1;oe.current={activate:function(){try{return ge?Promise.resolve():(ge=!0,Promise.resolve(fe.activate()).then(function(){return Promise.resolve(new Promise(function(G){return setTimeout(function(){return G(void 0)},0)})).then(function(){})}))}catch(G){return Promise.reject(G)}},deactivate:function(){ge&&(ge=!1,fe.deactivate())}}},[pe,H,ee,$]),oe}({targetRef:qt,fallbackRef:Vn,initialFocusRef:u||void 0,enabled:V&&C&&u!==!1}),Hi=function(M){var $=M.getSnapPoints,H=M.heightRef,ee=M.lastSnapRef,pe=M.ready,oe=function(Te){var ot=Te.contentRef,kt=Te.controlledMaxHeight,Ie=Te.footerEnabled,vn=Te.footerRef,Gn=Te.headerEnabled,at=Te.headerRef,Nr=Te.registerReady,qi=Te.resizeSourceRef,Mc=p.useMemo(function(){return Nr("contentHeight")},[Nr]),Dc=function(jr,Fc,Gi){var Wi=p.useMemo(function(){return Fc("maxHeight")},[Fc]),Bc=p.useState(function(){return vs(jr)||typeof window<"u"?window.innerHeight:0}),Vc=Bc[0],xo=Bc[1],Hc=Vc>0,Zi=p.useRef(0);return p.useDebugValue(jr?"controlled":"auto"),p.useEffect(function(){Hc&&Wi()},[Hc,Wi]),fi(function(){if(jr)return xo(vs(jr)),void(Gi.current="maxheightprop");var Uc=function(){Zi.current||(Zi.current=requestAnimationFrame(function(){xo(window.innerHeight),Gi.current="window",Zi.current=0}))};return window.addEventListener("resize",Uc),xo(window.innerHeight),Gi.current="window",Wi(),function(){window.removeEventListener("resize",Uc),cancelAnimationFrame(Zi.current)}},[jr,Wi,Gi]),Vc}(kt,Nr,qi),_o=Wo(at,{label:"headerHeight",enabled:Gn,resizeSourceRef:qi}),Nc=Wo(ot,{label:"contentHeight",enabled:!0,resizeSourceRef:qi}),Eo=Wo(vn,{label:"footerHeight",enabled:Ie,resizeSourceRef:qi}),jc=Math.min(Dc-_o-Eo,Nc)+_o+Eo;p.useDebugValue("minHeight: "+jc);var Ic=Nc>0;return p.useEffect(function(){Ic&&Mc()},[Ic,Mc]),{maxHeight:Dc,minHeight:jc,headerHeight:_o,footerHeight:Eo}}({contentRef:M.contentRef,controlledMaxHeight:M.controlledMaxHeight,footerEnabled:M.footerEnabled,footerRef:M.footerRef,headerEnabled:M.headerEnabled,headerRef:M.headerRef,registerReady:M.registerReady,resizeSourceRef:M.resizeSourceRef}),de=oe.maxHeight,fe=oe.minHeight,ge=oe.headerHeight,G=oe.footerHeight,ae=function(Te,ot){var kt=[].concat(Te).map(vs).reduce(function(at,Nr){return at.add(zr(Nr,0,ot)),at},new Set),Ie=Array.from(kt),vn=Math.min.apply(Math,Ie);if(Number.isNaN(vn))throw new TypeError("minSnap is NaN");var Gn=Math.max.apply(Math,Ie);if(Number.isNaN(Gn))throw new TypeError("maxSnap is NaN");return{snapPoints:Ie,minSnap:vn,maxSnap:Gn}}(pe?$({height:H.current,footerHeight:G,headerHeight:ge,minHeight:fe,maxHeight:de}):[0],de),Xe=ae.snapPoints,qn=ae.minSnap,st=ae.maxSnap;return p.useDebugValue("minSnap: "+qn+", maxSnap:"+st),{minSnap:qn,maxSnap:st,findSnap:function(Te){var ot=vs(typeof Te=="function"?Te({footerHeight:G,headerHeight:ge,height:H.current,minHeight:fe,maxHeight:de,snapPoints:Xe,lastSnap:ee.current}):Te);return Xe.reduce(function(kt,Ie){return Math.abs(Ie-ot)<Math.abs(kt-ot)?Ie:kt},qn)},maxHeight:de}}({contentRef:Lr,controlledMaxHeight:h,footerEnabled:!!s,footerRef:Vi,getSnapPoints:w,headerEnabled:o!==!1,headerRef:gt,heightRef:Qe,lastSnapRef:l,ready:V,registerReady:q,resizeSourceRef:Hn}),kr=Hi.minSnap,Mr=Hi.maxSnap,Dr=Hi.maxHeight,Ui=Hi.findSnap,Lt=p.useRef(Dr),Je=p.useRef(kr),_e=p.useRef(Mr),$i=p.useRef(Ui),vt=p.useRef(0);fi(function(){Lt.current=Dr,_e.current=Mr,Je.current=kr,$i.current=Ui,vt.current=Ui(m)},[Ui,m,Dr,Mr,kr]);var je=p.useCallback(function(M){var $=M.onRest,H=M.config,ee=(H=H===void 0?{}:H).velocity,pe=ee===void 0?1:ee,oe=Vs(H,e4),de=Vs(M,t4);return new Promise(function(fe){return me(Ne({},de,{config:Ne({velocity:pe},oe,{mass:1,tension:n4,friction:Math.max(ys,ys+(ys-ys*pe))}),onRest:function(){var ge=[].slice.call(arguments);fe.apply(void 0,ge),$==null||$.apply(void 0,ge)}}))})},[me]),kc=Dy(X3,{devTools:!1,actions:{onOpenCancel:p.useCallback(function(){return le.current==null?void 0:le.current({type:"OPEN"})},[]),onSnapCancel:p.useCallback(function(M){return le.current==null?void 0:le.current({type:"SNAP",source:M.snapSource})},[]),onCloseCancel:p.useCallback(function(){return le.current==null?void 0:le.current({type:"CLOSE"})},[]),onResizeCancel:p.useCallback(function(){return le.current==null?void 0:le.current({type:"RESIZE",source:Hn.current})},[]),onOpenEnd:p.useCallback(function(){return ne.current==null?void 0:ne.current({type:"OPEN"})},[]),onSnapEnd:p.useCallback(function(M,$){return ne.current==null?void 0:ne.current({type:"SNAP",source:M.snapSource})},[]),onResizeEnd:p.useCallback(function(){return ne.current==null?void 0:ne.current({type:"RESIZE",source:Hn.current})},[])},context:{initialState:c},services:{onSnapStart:p.useCallback(function(M,$){try{return Promise.resolve(z.current==null?void 0:z.current({type:"SNAP",source:$.payload.source||"custom"}))}catch(H){return Promise.reject(H)}},[]),onOpenStart:p.useCallback(function(){try{return Promise.resolve(z.current==null?void 0:z.current({type:"OPEN"}))}catch(M){return Promise.reject(M)}},[]),onCloseStart:p.useCallback(function(){try{return Promise.resolve(z.current==null?void 0:z.current({type:"CLOSE"}))}catch(M){return Promise.reject(M)}},[]),onResizeStart:p.useCallback(function(){try{return Promise.resolve(z.current==null?void 0:z.current({type:"RESIZE",source:Hn.current}))}catch(M){return Promise.reject(M)}},[]),onSnapEnd:p.useCallback(function(M,$){try{return Promise.resolve(ne.current==null?void 0:ne.current({type:"SNAP",source:M.snapSource}))}catch(H){return Promise.reject(H)}},[]),onOpenEnd:p.useCallback(function(){try{return Promise.resolve(ne.current==null?void 0:ne.current({type:"OPEN"}))}catch(M){return Promise.reject(M)}},[]),onCloseEnd:p.useCallback(function(){try{return Promise.resolve(ne.current==null?void 0:ne.current({type:"CLOSE"}))}catch(M){return Promise.reject(M)}},[]),onResizeEnd:p.useCallback(function(){try{return Promise.resolve(ne.current==null?void 0:ne.current({type:"RESIZE",source:Hn.current}))}catch(M){return Promise.reject(M)}},[]),renderVisuallyHidden:p.useCallback(function(M,$){try{return Promise.resolve(je({y:vt.current,ready:0,maxHeight:Lt.current,maxSnap:_e.current,minSnap:vt.current,immediate:!0})).then(function(){})}catch(H){return Promise.reject(H)}},[je]),activate:p.useCallback(function(M,$){try{return I.current=!0,Promise.resolve(Promise.all([Un.current.activate(),zn.current.activate(),$n.current.activate()])).then(function(){})}catch(H){return Promise.reject(H)}},[$n,zn,Un]),deactivate:p.useCallback(function(){try{return Un.current.deactivate(),zn.current.deactivate(),$n.current.deactivate(),I.current=!1,Promise.resolve()}catch(M){return Promise.reject(M)}},[$n,zn,Un]),openImmediately:p.useCallback(function(){try{return Qe.current=vt.current,Promise.resolve(je({y:vt.current,ready:1,maxHeight:Lt.current,maxSnap:_e.current,minSnap:vt.current,immediate:!0})).then(function(){})}catch(M){return Promise.reject(M)}},[je]),openSmoothly:p.useCallback(function(){try{return Promise.resolve(je({y:0,ready:1,maxHeight:Lt.current,maxSnap:_e.current,minSnap:vt.current,immediate:!0})).then(function(){return Qe.current=vt.current,Promise.resolve(je({y:vt.current,ready:1,maxHeight:Lt.current,maxSnap:_e.current,minSnap:vt.current,immediate:Wt.current})).then(function(){})})}catch(M){return Promise.reject(M)}},[je,Wt]),snapSmoothly:p.useCallback(function(M,$){try{var H=$i.current(M.y);return Qe.current=H,l.current=H,Promise.resolve(je({y:H,ready:1,maxHeight:Lt.current,maxSnap:_e.current,minSnap:Je.current,immediate:Wt.current,config:{velocity:M.velocity}})).then(function(){})}catch(ee){return Promise.reject(ee)}},[je,l,Wt]),resizeSmoothly:p.useCallback(function(){try{var M=$i.current(Qe.current);return Qe.current=M,l.current=M,Promise.resolve(je({y:M,ready:1,maxHeight:Lt.current,maxSnap:_e.current,minSnap:Je.current,immediate:Hn.current!=="element"||Wt.current})).then(function(){})}catch($){return Promise.reject($)}},[je,l,Wt]),closeSmoothly:p.useCallback(function(M,$){try{return je({minSnap:Qe.current,immediate:!0}),Qe.current=0,Promise.resolve(je({y:0,maxHeight:Lt.current,maxSnap:_e.current,immediate:Wt.current})).then(function(){return Promise.resolve(je({ready:0,immediate:!0})).then(function(){})})}catch(H){return Promise.reject(H)}},[je,Wt])}}),Zh=kc[0],Zt=kc[1];p.useEffect(function(){V&&Zt(a?"OPEN":"CLOSE")},[a,Zt,V]),fi(function(){(Dr||Mr||kr)&&Zt("RESIZE")},[Dr,Mr,kr,Zt]),p.useEffect(function(){return function(){Un.current.deactivate(),zn.current.deactivate(),$n.current.deactivate()}},[$n,zn,Un]),p.useImperativeHandle(e,function(){return{snapTo:function(M,$){var H=$===void 0?{}:$,ee=H.velocity,pe=ee===void 0?1:ee,oe=H.source,de=oe===void 0?"custom":oe;Zt("SNAP",{payload:{y:$i.current(M),velocity:pe,source:de}})},get height(){return Qe.current}}},[Zt]),p.useEffect(function(){var M=Gt.current,$=function(ee){Co.current&&ee.preventDefault()},H=function(ee){M.scrollTop<0&&(requestAnimationFrame(function(){M.style.overflow="hidden",M.scrollTop=0,M.style.removeProperty("overflow")}),ee.preventDefault())};return A&&(M.addEventListener("scroll",$),M.addEventListener("touchmove",$),M.addEventListener("touchstart",H)),function(){M.removeEventListener("scroll",$),M.removeEventListener("touchmove",$),M.removeEventListener("touchstart",H)}},[A,Gt]);var zi=r3(function(M){var $=M.args,H=($=$===void 0?[]:$)[0],ee=(H=H===void 0?{}:H).closeOnTap,pe=ee!==void 0&&ee,oe=H.isContentDragging,de=oe!==void 0&&oe,fe=M.cancel,ge=M.direction[1],G=M.down,ae=M.first,Xe=M.last,qn=M.memo,st=qn===void 0?Ce.y.getValue():qn,Te=M.tap,ot=M.velocity,kt=-1*M.movement[1];if(!I.current)return fe(),st;if(d&&pe&&Te)return fe(),setTimeout(function(){return d()},0),st;if(Te)return st;var Ie=st+kt,vn=kt*ot,Gn=Math.max(Je.current,Math.min(_e.current,Ie+2*vn));if(!G&&d&&ge>0&&Ie+vn<Je.current/2)return fe(),d(),st;var at=G?d||Je.current!==_e.current?ci(Ie,d?0:Je.current,_e.current,.55):Ie<Je.current?ci(Ie,Je.current,2*_e.current,.55):ci(Ie,Je.current/2,_e.current,.55):Gn;return A&&de?(at>=_e.current&&(at=_e.current),st===_e.current&&Gt.current.scrollTop>0&&(at=_e.current),Co.current=at<_e.current):Co.current=!1,ae&&Zt("DRAG"),Xe?(Zt("SNAP",{payload:{y:at,velocity:ot>.05?ot:1,source:"dragging"}}),st):(me({y:at,ready:1,maxHeight:Lt.current,maxSnap:_e.current,minSnap:Je.current,immediate:!0,config:{velocity:ot}}),st)},{filterTaps:!0});if(Number.isNaN(_e.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(Je.current))throw new TypeError("minSnapRef is NaN!!");var Kh=function(M){var $,H=M.spring,ee=Jn([H.y,H.maxHeight],function(G,ae){return Math.round(zr(ae-G,0,16))+"px"}),pe=Jn([H.y,H.minSnap,H.maxSnap],function(G,ae,Xe){return zr(G,ae,Xe)+"px"}),oe=Jn([H.y,H.minSnap,H.maxSnap],function(G,ae,Xe){return G<ae?ae-G+"px":G>Xe?Xe-G+"px":"0px"}),de=Jn([H.y,H.maxSnap],function(G,ae){return G>=ae?Math.ceil(G-ae):0}),fe=Jn([H.y,H.minSnap],function(G,ae){if(!ae)return 0;var Xe=Math.max(ae/2-45,0);return zr((G-Xe)*(1/(Math.min(ae/2+45,ae)-Xe)+0),0,1)}),ge=Jn([H.y,H.minSnap],function(G,ae){return ae?zr(G/ae,0,1):0});return($={})["--rsbs-content-opacity"]=fe,$["--rsbs-backdrop-opacity"]=ge,$["--rsbs-antigap-scale-y"]=de,$["--rsbs-overlay-translate-y"]=oe,$["--rsbs-overlay-rounded"]=ee,$["--rsbs-overlay-h"]=pe,$}({spring:Ce});return p.createElement(S2.div,Ne({},D,{"data-rsbs-root":!0,"data-rsbs-state":i4.find(Zh.matches),"data-rsbs-is-blocking":C,"data-rsbs-is-dismissable":!!d,"data-rsbs-has-header":!!o,"data-rsbs-has-footer":!!s,className:i,ref:qt,style:Ne({},Kh,x,{opacity:Ce.ready})}),r,C&&p.createElement("div",Ne({key:"backdrop","data-rsbs-backdrop":!0},zi({closeOnTap:!0}))),p.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:Vn,onKeyDown:function(M){M.key==="Escape"&&(M.stopPropagation(),d&&d())}},o!==!1&&p.createElement("div",Ne({key:"header","data-rsbs-header":!0,ref:gt},zi()),o),p.createElement("div",Ne({key:"scroll","data-rsbs-scroll":!0,ref:Gt},A?zi({isContentDragging:!0}):{}),p.createElement("div",{"data-rsbs-content":!0,ref:Lr},n)),s&&p.createElement("div",Ne({key:"footer",ref:Vi,"data-rsbs-footer":!0},zi()),s)))}),i4=["closed","opening","open","closing","dragging","snapping","resizing"];function s4(t){var e=t.lastSnap;return e??Math.min.apply(Math,t.snapPoints)}function o4(t){return t.minHeight}var a4=["onSpringStart","onSpringEnd","skipInitialTransition"],fh=p.forwardRef(function(t,e){var n=t.onSpringStart,r=t.onSpringEnd,i=t.skipInitialTransition,s=Vs(t,a4),o=p.useState(!1),a=o[0],c=o[1],l=p.useRef(),u=p.useRef(null),d=p.useRef(i&&s.open?"OPEN":"CLOSED");fi(function(){if(s.open)return cancelAnimationFrame(l.current),c(!0),function(){d.current="CLOSED"}},[s.open]);var h=p.useCallback(function(m){return Promise.resolve(n==null?void 0:n(m)).then(function(){m.type==="OPEN"&&cancelAnimationFrame(l.current)})},[n]),v=p.useCallback(function(m){return Promise.resolve(r==null?void 0:r(m)).then(function(){m.type==="CLOSE"&&(l.current=requestAnimationFrame(function(){return c(!1)}))})},[r]);return a?p.createElement(A1,{"data-rsbs-portal":!0},p.createElement(r4,Ne({},s,{lastSnapRef:u,ref:e,initialState:d.current,onSpringStart:h,onSpringEnd:v}))):null});const hh=28,c4="MapGoogle-module__root__Vi-sMl",l4="MapGoogle-module__mapContainer__OCCTIX",u4="MapGoogle-module__balloon__4UVhuT",d4="MapGoogle-module__details__4osNXn",f4="MapGoogle-module__cluster__5qmRds",h4="MapGoogle-module__number__JdGUGZ",p4="MapGoogle-module__overlay__g-nEoT",m4="MapGoogle-module__mapControl__mzyTwr",g4="MapGoogle-module__geolocationControl__1exHgA",v4="MapGoogle-module__bottomSheet__avcBmY",y4="MapGoogle-module__locationViewContent__xwLeDh",b4="MapGoogle-module__locationViewHeader__maBLv0",w4="MapGoogle-module__deliveryDetailsViewContent__wH-RCe",S4="MapGoogle-module__deliveryDetailsViewHeader__4AKoBe",C4="MapGoogle-module__sheetSubmit__rPQG26",ke={root:c4,mapContainer:l4,balloon:u4,details:d4,cluster:f4,number:h4,overlay:p4,mapControl:m4,geolocationControl:g4,bottomSheet:v4,locationViewContent:y4,locationViewHeader:b4,deliveryDetailsViewContent:w4,deliveryDetailsViewHeader:S4,sheetSubmit:C4},ph=({children:t,hideFooter:e,minSnapHeight:n,onSubmitClick:r,open:i,submitDisabled:s,submitLoading:o,...a})=>{const[c,l]=p.useState(!1);return p.useEffect(()=>{let u;return i?u=setTimeout(()=>{l(i)},400):l(i),()=>{clearTimeout(u)}},[i]),S.jsx(fh,{expandOnContentDrag:!0,open:c,initialFocusRef:!1,defaultSnap:({snapPoints:u})=>Math.min(...u),blocking:!1,snapPoints:({footerHeight:u,headerHeight:d,maxHeight:h,minHeight:v})=>[n==null?v:d+u+n,h-hh],footer:e?null:S.jsx(it,{disabled:s,loading:o,variant:"primary",className:ke.sheetSubmit,onClick:r,children:S.jsx(Ft,{keyName:"choose",ns:"common"})}),sibling:S.jsx("div",{role:"presentation","data-rsbs-backdrop":"true",onClick:u=>{var d;u.stopPropagation(),u.preventDefault(),(d=a.onDismiss)==null||d.call(a)}}),children:S.jsx("div",{className:ke.bottomSheet,children:t})})},_4={header:ke.locationViewHeader,content:ke.locationViewContent},E4=({handleCloseClick:t,handleSubmitClick:e})=>{const n=Bn("screenSm"),r=Ke(c=>c.location),i=!!r,s=fc({isSelectedPoint:i}),{isIdle:o}=X(),a=o&&i&&s;return n&&r?S.jsx(ph,{minSnapHeight:300,open:!!a,onDismiss:t,onSubmitClick:()=>e(r),children:S.jsx(mf,{hideActions:!0,classes:_4,location:r,onClose:t})}):null},x4="Overlay-module__root__3qTsUC",O4={root:x4},mh=({children:t,className:e})=>S.jsx("div",{className:Y(O4.root,e),children:t}),gh=t=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32",fill:"none",...t},j.createElement("path",{d:"M25.7074 24.2926C25.8004 24.3855 25.8741 24.4958 25.9243 24.6172C25.9746 24.7386 26.0005 24.8687 26.0005 25.0001C26.0005 25.1315 25.9746 25.2616 25.9243 25.383C25.8741 25.5044 25.8004 25.6147 25.7074 25.7076C25.6145 25.8005 25.5042 25.8742 25.3828 25.9245C25.2614 25.9747 25.1313 26.0006 24.9999 26.0006C24.8686 26.0006 24.7384 25.9747 24.6171 25.9245C24.4957 25.8742 24.3854 25.8005 24.2924 25.7076L15.9999 17.4138L7.70745 25.7076C7.5198 25.8952 7.26531 26.0006 6.99995 26.0006C6.73458 26.0006 6.48009 25.8952 6.29245 25.7076C6.1048 25.5199 5.99939 25.2654 5.99939 25.0001C5.99939 24.7347 6.10481 24.4802 6.29245 24.2926L14.5862 16.0001L6.29245 7.70757C6.1048 7.51993 5.99939 7.26543 5.99939 7.00007C5.99939 6.7347 6.1048 6.48021 6.29245 6.29257C6.48009 6.10493 6.73458 5.99951 6.99995 5.99951C7.26531 5.99951 7.5198 6.10493 7.70745 6.29257L15.9999 14.5863L24.2924 6.29257C24.4801 6.10493 24.7346 5.99951 24.9999 5.99951C25.2653 5.99951 25.5198 6.10493 25.7074 6.29257C25.8951 6.48021 26.0005 6.7347 26.0005 7.00007C26.0005 7.26543 25.8951 7.51993 25.7074 7.70757L17.4137 16.0001L25.7074 24.2926Z",fill:"#000000"})),P4='<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" fill="none" viewBox="0 0 48 66"><path fill="url(#a)" fill-opacity=".4" d="M23.999 66C35.045 66 44 63.314 44 60s-8.955-6-20.001-6C12.955 54 4 56.686 4 60s8.955 6 19.999 6Z" style="mix-blend-mode:darken"/><g filter="url(#b)"><path fill="currentColor" fill-opacity=".8" fill-rule="evenodd" d="M24 0c11.211 0 24 8.288 24 24.088C48 34.6 40.011 48.411 24 60 7.989 48.41 0 34.6 0 24.088 0 8.288 12.789 0 24 0Z" clip-rule="evenodd"/></g><path fill="#fff" fill-rule="evenodd" d="M36.503 33.501V19.625a3 3 0 0 0-1.583-2.645l-9.502-5.091a3 3 0 0 0-2.834 0l-9.501 5.091a3 3 0 0 0-1.583 2.645V33.5a3 3 0 0 0 3 3h19.003a3 3 0 0 0 3-3Zm-7.752 1h4.752a1 1 0 0 0 1-1V19.625a1 1 0 0 0-.528-.882l-9.501-5.091a1 1 0 0 0-.945 0l-9.501 5.091a1 1 0 0 0-.528.882V33.5a1 1 0 0 0 1 1h4.75a2.516 2.516 0 0 1-.05-.5V23.747a2.5 2.5 0 0 1 2.5-2.5h4.602a2.5 2.5 0 0 1 2.5 2.5V34c0 .172-.018.339-.05.5Zm-2.434 0a.5.5 0 0 0 .485-.5V23.747a.5.5 0 0 0-.5-.5H21.7a.5.5 0 0 0-.5.5V34a.5.5 0 0 0 .484.5h4.632Z" clip-rule="evenodd"/><defs><radialGradient id="a" cx="0" cy="0" r="1" gradientTransform="matrix(0 6 -20 0 24 60)" gradientUnits="userSpaceOnUse"><stop/><stop offset="1" stop-opacity="0"/></radialGradient><filter id="b" width="56" height="68" x="-4" y="-4" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feGaussianBlur in="BackgroundImageFix" stdDeviation="2"/><feComposite in2="SourceAlpha" operator="in" result="effect1_backgroundBlur_1068_16960"/><feBlend in="SourceGraphic" in2="effect1_backgroundBlur_1068_16960" result="shape"/></filter></defs></svg>',T4=`<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" viewBox="0 0 48 66" fill="none">
51
51
  <path
52
52
  d="M23.999 66C35.0452 66 44 63.3137 44 59.9999C44 56.6863 35.0452 54 23.999 54C12.9548 54 4 56.6863 4 59.9999C4 63.3137 12.9548 66 23.999 66Z"
53
53
  fill="url(#paint0_radial_10036_91741)" fill-opacity="0.4" />
@@ -81,7 +81,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
81
81
  <stop offset="1" stop-opacity="0" />
82
82
  </radialGradient>
83
83
  </defs>
84
- </svg>`,L4=`<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" viewBox="0 0 48 66" fill="none">
84
+ </svg>`,R4=`<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" viewBox="0 0 48 66" fill="none">
85
85
  <path
86
86
  d="M23.999 66C35.0452 66 44 63.3137 44 59.9999C44 56.6863 35.0452 54 23.999 54C12.9548 54 4 56.6863 4 59.9999C4 63.3137 12.9548 66 23.999 66Z"
87
87
  fill="url(#paint0_radial_2882_25472)" fill-opacity="0.4" />
@@ -98,7 +98,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
98
98
  <stop offset="1" stop-opacity="0" />
99
99
  </radialGradient>
100
100
  </defs>
101
- </svg>`,R4=`<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" viewBox="0 0 48 66" fill="none">
101
+ </svg>`,L4=`<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" viewBox="0 0 48 66" fill="none">
102
102
  <path
103
103
  d="M23.999 66C35.0452 66 44 63.3137 44 59.9999C44 56.6863 35.0452 54 23.999 54C12.9548 54 4 56.6863 4 59.9999C4 63.3137 12.9548 66 23.999 66Z"
104
104
  fill="url(#paint0_radial_9911_141382)" fill-opacity="0.4" />
@@ -221,9 +221,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
221
221
  <path
222
222
  d="M28.0662 30.4213C32.4169 29.5418 36.0122 29.0523 39 27.2396V27.3265C39 27.4007 39 27.4796 38.9969 27.5538C38.8443 33.8888 31.6754 39 23.6816 39H19.1629C19.1043 35.2404 20.3886 31.9735 28.0678 30.4213"
223
223
  fill="#8ECFD3" />
224
- </svg>`,We={PinPvz:k4,PinHome:P4,PinOmnic:L4,PinWeChip:M4,PinOmnicSelected:R4,PinWeChipSelected:D4,PinLlamaSelected:A4,PinLlama:T4,PointOmnic:j4,PointLlama:N4,PointWeChip:I4},_c=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...t},N.createElement("path",{fill:"currentcolor",d:"M12.5 8c0 .287-.108.573-.324.792l-6.789 6.88a1.095 1.095 0 0 1-1.563 0 1.131 1.131 0 0 1 0-1.585L9.83 8 3.824 1.913a1.131 1.131 0 0 1 0-1.585 1.095 1.095 0 0 1 1.564 0l6.789 6.88c.215.219.323.505.323.792Z"})),F4="PointItem-module__point__-1jMFG",B4="PointItem-module__pointButton__-wAVuy",V4="PointItem-module__pointData__CrnHK9",H4="PointItem-module__title__I5whAh",U4="PointItem-module__address__tRkAx3",$4="PointItem-module__arrow__AMAx4z",Yn={point:F4,pointButton:B4,pointData:V4,title:H4,address:U4,arrow:$4},z4=({handleDetailsClick:t,handlePointClick:e,point:n})=>{const{iconType:r,palette:i,skipPointInfo:s}=_e(),o=Bn("screenSm"),a=(i==null?void 0:i.primary)||"#fc0",c=function(){switch(r){case"omni-llama":return We.PointLlama;case"we-chip":return We.PointWeChip;default:return ir(We.PointOmnic,a)}}();function l(){e(n),!s&&!o&&t(n)}return S.jsx("li",{className:Yn.point,children:S.jsxs("button",{className:Yn.pointButton,type:"button",tabIndex:0,onClick:l,children:[S.jsx("div",{dangerouslySetInnerHTML:{__html:c}}),S.jsxs("div",{className:Yn.pointData,children:[S.jsx("h3",{className:Yn.title,children:n.name}),S.jsx("p",{className:Yn.address,children:n.location.full_address})]}),S.jsx("span",{className:Yn.arrow,children:S.jsx(_c,{})})]})},n.uid)},q4="SamePoints-module__container__oYvAF2",G4="SamePoints-module__header__nnMDp4",W4="SamePoints-module__closeButton__gd1RzT",Z4="SamePoints-module__sameList__GhS89e",bs={container:q4,header:G4,closeButton:W4,sameList:Z4},K4=t=>{const{closeSamePoints:e,samePoints:n}=Pt(),{hideSearchInput:r}=_e(),i=!!n.length;return S.jsxs("div",{className:bs.container,"data-visible":i,"data-hide-search-input":r,children:[S.jsx("div",{className:bs.header,children:S.jsx("button",{className:bs.closeButton,type:"button","aria-label":"Close points",tabIndex:0,onClick:e,children:S.jsx(gh,{})})}),S.jsx("ul",{className:bs.sameList,children:n.map(s=>S.jsx(z4,{point:s,...t},s.uid))})]})};var Bi=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},In=typeof window>"u"||"Deno"in globalThis;function et(){}function Q4(t,e){return typeof t=="function"?t(e):t}function Fa(t){return typeof t=="number"&&t>=0&&t!==1/0}function vh(t,e){return Math.max(t+(e||0)-Date.now(),0)}function cr(t,e){return typeof t=="function"?t(e):t}function ut(t,e){return typeof t=="function"?t(e):t}function mu(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=t;if(o){if(r){if(e.queryHash!==Ec(o,e.options))return!1}else if(!wi(e.queryKey,o))return!1}if(n!=="all"){const c=e.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||i&&i!==e.state.fetchStatus||s&&!s(e))}function gu(t,e){const{exact:n,status:r,predicate:i,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(n){if(bi(e.options.mutationKey)!==bi(s))return!1}else if(!wi(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function Ec(t,e){return((e==null?void 0:e.queryKeyHashFn)||bi)(t)}function bi(t){return JSON.stringify(t,(e,n)=>Va(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function wi(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(n=>!wi(t[n],e[n])):!1}function yh(t,e){if(t===e)return t;const n=vu(t)&&vu(e);if(n||Va(t)&&Va(e)){const r=n?t:Object.keys(t),i=r.length,s=n?e:Object.keys(e),o=s.length,a=n?[]:{};let c=0;for(let l=0;l<o;l++){const u=n?l:s[l];(!n&&r.includes(u)||n)&&t[u]===void 0&&e[u]===void 0?(a[u]=void 0,c++):(a[u]=yh(t[u],e[u]),a[u]===t[u]&&t[u]!==void 0&&c++)}return i===o&&c===i?t:a}return e}function Ba(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function vu(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Va(t){if(!yu(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!yu(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function yu(t){return Object.prototype.toString.call(t)==="[object Object]"}function J4(t){return new Promise(e=>{setTimeout(e,t)})}function Ha(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?yh(t,e):e}function X4(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function Y4(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var xc=Symbol();function bh(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===xc?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var En,rn,ur,Uu,eb=(Uu=class extends Bi{constructor(){super();U(this,En,void 0);U(this,rn,void 0);U(this,ur,void 0);V(this,ur,e=>{if(!In&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){P(this,rn)||this.setEventListener(P(this,ur))}onUnsubscribe(){var e;this.hasListeners()||((e=P(this,rn))==null||e.call(this),V(this,rn,void 0))}setEventListener(e){var n;V(this,ur,e),(n=P(this,rn))==null||n.call(this),V(this,rn,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){P(this,En)!==e&&(V(this,En,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof P(this,En)=="boolean"?P(this,En):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},En=new WeakMap,rn=new WeakMap,ur=new WeakMap,Uu),Oc=new eb,dr,sn,fr,$u,tb=($u=class extends Bi{constructor(){super();U(this,dr,!0);U(this,sn,void 0);U(this,fr,void 0);V(this,fr,e=>{if(!In&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){P(this,sn)||this.setEventListener(P(this,fr))}onUnsubscribe(){var e;this.hasListeners()||((e=P(this,sn))==null||e.call(this),V(this,sn,void 0))}setEventListener(e){var n;V(this,fr,e),(n=P(this,sn))==null||n.call(this),V(this,sn,e(this.setOnline.bind(this)))}setOnline(e){P(this,dr)!==e&&(V(this,dr,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return P(this,dr)}},dr=new WeakMap,sn=new WeakMap,fr=new WeakMap,$u),io=new tb;function Ua(){let t,e;const n=new Promise((i,s)=>{t=i,e=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),t(i)},n.reject=i=>{r({status:"rejected",reason:i}),e(i)},n}function nb(t){return Math.min(1e3*2**t,3e4)}function wh(t){return(t??"online")==="online"?io.isOnline():!0}var Sh=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function Zo(t){return t instanceof Sh}function Ch(t){let e=!1,n=0,r=!1,i;const s=Ua(),o=f=>{var w;r||(h(new Sh(f)),(w=t.abort)==null||w.call(t))},a=()=>{e=!0},c=()=>{e=!1},l=()=>Oc.isFocused()&&(t.networkMode==="always"||io.isOnline())&&t.canRun(),u=()=>wh(t.networkMode)&&t.canRun(),d=f=>{var w;r||(r=!0,(w=t.onSuccess)==null||w.call(t,f),i==null||i(),s.resolve(f))},h=f=>{var w;r||(r=!0,(w=t.onError)==null||w.call(t,f),i==null||i(),s.reject(f))},v=()=>new Promise(f=>{var w;i=y=>{(r||l())&&f(y)},(w=t.onPause)==null||w.call(t)}).then(()=>{var f;i=void 0,r||(f=t.onContinue)==null||f.call(t)}),m=()=>{if(r)return;let f;const w=n===0?t.initialPromise:void 0;try{f=w??t.fn()}catch(y){f=Promise.reject(y)}Promise.resolve(f).then(d).catch(y=>{var g;if(r)return;const C=t.retry??(In?0:3),b=t.retryDelay??nb,E=typeof b=="function"?b(n,y):b,x=C===!0||typeof C=="number"&&n<C||typeof C=="function"&&C(n,y);if(e||!x){h(y);return}n++,(g=t.onFail)==null||g.call(t,n,y),J4(E).then(()=>l()?void 0:v()).then(()=>{e?h(y):m()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:c,canStart:u,start:()=>(u()?m():v().then(m),s)}}function rb(){let t=[],e=0,n=a=>{a()},r=a=>{a()},i=a=>setTimeout(a,0);const s=a=>{e?t.push(a):i(()=>{n(a)})},o=()=>{const a=t;t=[],a.length&&i(()=>{r(()=>{a.forEach(c=>{n(c)})})})};return{batch:a=>{let c;e++;try{c=a()}finally{e--,e||o()}return c},batchCalls:a=>(...c)=>{s(()=>{a(...c)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var Ae=rb(),xn,zu,_h=(zu=class{constructor(){U(this,xn,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Fa(this.gcTime)&&V(this,xn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(In?1/0:5*60*1e3))}clearGcTimeout(){P(this,xn)&&(clearTimeout(P(this,xn)),V(this,xn,void 0))}},xn=new WeakMap,zu),hr,pr,Xe,Me,Si,On,lt,Nt,qu,ib=(qu=class extends _h{constructor(e){super();U(this,lt);U(this,hr,void 0);U(this,pr,void 0);U(this,Xe,void 0);U(this,Me,void 0);U(this,Si,void 0);U(this,On,void 0);V(this,On,!1),V(this,Si,e.defaultOptions),this.setOptions(e.options),this.observers=[],V(this,Xe,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,V(this,hr,sb(this.options)),this.state=e.state??P(this,hr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=P(this,Me))==null?void 0:e.promise}setOptions(e){this.options={...P(this,Si),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&P(this,Xe).remove(this)}setData(e,n){const r=Ha(this.state.data,e,this.options);return Z(this,lt,Nt).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){Z(this,lt,Nt).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,i;const n=(r=P(this,Me))==null?void 0:r.promise;return(i=P(this,Me))==null||i.cancel(e),n?n.then(et).catch(et):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(P(this,hr))}isActive(){return this.observers.some(e=>ut(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===xc||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!vh(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=P(this,Me))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=P(this,Me))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),P(this,Xe).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(P(this,Me)&&(P(this,On)?P(this,Me).cancel({revert:!0}):P(this,Me).cancelRetry()),this.scheduleGc()),P(this,Xe).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Z(this,lt,Nt).call(this,{type:"invalidate"})}fetch(e,n){var c,l,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(P(this,Me))return P(this,Me).continueRetry(),P(this,Me).promise}if(e&&this.setOptions(e),!this.options.queryFn){const d=this.observers.find(h=>h.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,i=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(V(this,On,!0),r.signal)})},s=()=>{const d=bh(this.options,n),h={queryKey:this.queryKey,meta:this.meta};return i(h),V(this,On,!1),this.options.persister?this.options.persister(d,h,this):d(h)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(o),(c=this.options.behavior)==null||c.onFetch(o,this),V(this,pr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((l=o.fetchOptions)==null?void 0:l.meta))&&Z(this,lt,Nt).call(this,{type:"fetch",meta:(u=o.fetchOptions)==null?void 0:u.meta});const a=d=>{var h,v,m,f;Zo(d)&&d.silent||Z(this,lt,Nt).call(this,{type:"error",error:d}),Zo(d)||((v=(h=P(this,Xe).config).onError)==null||v.call(h,d,this),(f=(m=P(this,Xe).config).onSettled)==null||f.call(m,this.state.data,d,this)),this.scheduleGc()};return V(this,Me,Ch({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var h,v,m,f;if(d===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(w){a(w);return}(v=(h=P(this,Xe).config).onSuccess)==null||v.call(h,d,this),(f=(m=P(this,Xe).config).onSettled)==null||f.call(m,d,this.state.error,this),this.scheduleGc()},onError:a,onFail:(d,h)=>{Z(this,lt,Nt).call(this,{type:"failed",failureCount:d,error:h})},onPause:()=>{Z(this,lt,Nt).call(this,{type:"pause"})},onContinue:()=>{Z(this,lt,Nt).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),P(this,Me).start()}},hr=new WeakMap,pr=new WeakMap,Xe=new WeakMap,Me=new WeakMap,Si=new WeakMap,On=new WeakMap,lt=new WeakSet,Nt=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Eh(r.data,this.options),fetchMeta:e.meta??null};case"success":return{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=e.error;return Zo(i)&&i.revert&&P(this,pr)?{...P(this,pr),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),Ae.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),P(this,Xe).notify({query:this,type:"updated",action:e})})},qu);function Eh(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:wh(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function sb(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var wt,Gu,ob=(Gu=class extends Bi{constructor(e={}){super();U(this,wt,void 0);this.config=e,V(this,wt,new Map)}build(e,n,r){const i=n.queryKey,s=n.queryHash??Ec(i,n);let o=this.get(s);return o||(o=new ib({cache:this,queryKey:i,queryHash:s,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){P(this,wt).has(e.queryHash)||(P(this,wt).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=P(this,wt).get(e.queryHash);n&&(e.destroy(),n===e&&P(this,wt).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ae.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return P(this,wt).get(e)}getAll(){return[...P(this,wt).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>mu(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>mu(e,r)):n}notify(e){Ae.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){Ae.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ae.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},wt=new WeakMap,Gu),St,Fe,Pn,Ct,Qt,Wu,ab=(Wu=class extends _h{constructor(e){super();U(this,Ct);U(this,St,void 0);U(this,Fe,void 0);U(this,Pn,void 0);this.mutationId=e.mutationId,V(this,Fe,e.mutationCache),V(this,St,[]),this.state=e.state||cb(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){P(this,St).includes(e)||(P(this,St).push(e),this.clearGcTimeout(),P(this,Fe).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){V(this,St,P(this,St).filter(n=>n!==e)),this.scheduleGc(),P(this,Fe).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){P(this,St).length||(this.state.status==="pending"?this.scheduleGc():P(this,Fe).remove(this))}continue(){var e;return((e=P(this,Pn))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,s,o,a,c,l,u,d,h,v,m,f,w,y,C,b,E,x,g,_;V(this,Pn,Ch({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(O,T)=>{Z(this,Ct,Qt).call(this,{type:"failed",failureCount:O,error:T})},onPause:()=>{Z(this,Ct,Qt).call(this,{type:"pause"})},onContinue:()=>{Z(this,Ct,Qt).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>P(this,Fe).canRun(this)}));const n=this.state.status==="pending",r=!P(this,Pn).canStart();try{if(!n){Z(this,Ct,Qt).call(this,{type:"pending",variables:e,isPaused:r}),await((s=(i=P(this,Fe).config).onMutate)==null?void 0:s.call(i,e,this));const T=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,e));T!==this.state.context&&Z(this,Ct,Qt).call(this,{type:"pending",context:T,variables:e,isPaused:r})}const O=await P(this,Pn).start();return await((l=(c=P(this,Fe).config).onSuccess)==null?void 0:l.call(c,O,e,this.state.context,this)),await((d=(u=this.options).onSuccess)==null?void 0:d.call(u,O,e,this.state.context)),await((v=(h=P(this,Fe).config).onSettled)==null?void 0:v.call(h,O,null,this.state.variables,this.state.context,this)),await((f=(m=this.options).onSettled)==null?void 0:f.call(m,O,null,e,this.state.context)),Z(this,Ct,Qt).call(this,{type:"success",data:O}),O}catch(O){try{throw await((y=(w=P(this,Fe).config).onError)==null?void 0:y.call(w,O,e,this.state.context,this)),await((b=(C=this.options).onError)==null?void 0:b.call(C,O,e,this.state.context)),await((x=(E=P(this,Fe).config).onSettled)==null?void 0:x.call(E,void 0,O,this.state.variables,this.state.context,this)),await((_=(g=this.options).onSettled)==null?void 0:_.call(g,void 0,O,e,this.state.context)),O}finally{Z(this,Ct,Qt).call(this,{type:"error",error:O})}}finally{P(this,Fe).runNext(this)}}},St=new WeakMap,Fe=new WeakMap,Pn=new WeakMap,Ct=new WeakSet,Qt=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ae.batch(()=>{P(this,St).forEach(r=>{r.onMutationUpdate(e)}),P(this,Fe).notify({mutation:this,type:"updated",action:e})})},Wu);function cb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ge,Ci,Zu,lb=(Zu=class extends Bi{constructor(e={}){super();U(this,Ge,void 0);U(this,Ci,void 0);this.config=e,V(this,Ge,new Map),V(this,Ci,Date.now())}build(e,n,r){const i=new ab({mutationCache:this,mutationId:++Ki(this,Ci)._,options:e.defaultMutationOptions(n),state:r});return this.add(i),i}add(e){const n=ws(e),r=P(this,Ge).get(n)??[];r.push(e),P(this,Ge).set(n,r),this.notify({type:"added",mutation:e})}remove(e){var r;const n=ws(e);if(P(this,Ge).has(n)){const i=(r=P(this,Ge).get(n))==null?void 0:r.filter(s=>s!==e);i&&(i.length===0?P(this,Ge).delete(n):P(this,Ge).set(n,i))}this.notify({type:"removed",mutation:e})}canRun(e){var r;const n=(r=P(this,Ge).get(ws(e)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===e}runNext(e){var r;const n=(r=P(this,Ge).get(ws(e)))==null?void 0:r.find(i=>i!==e&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Ae.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...P(this,Ge).values()].flat()}find(e){const n={exact:!0,...e};return this.getAll().find(r=>gu(n,r))}findAll(e={}){return this.getAll().filter(n=>gu(e,n))}notify(e){Ae.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return Ae.batch(()=>Promise.all(e.map(n=>n.continue().catch(et))))}},Ge=new WeakMap,Ci=new WeakMap,Zu);function ws(t){var e;return((e=t.options.scope)==null?void 0:e.id)??String(t.mutationId)}function bu(t){return{onFetch:(e,n)=>{var u,d,h,v,m;const r=e.options,i=(h=(d=(u=e.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:h.direction,s=((v=e.state.data)==null?void 0:v.pages)||[],o=((m=e.state.data)==null?void 0:m.pageParams)||[];let a={pages:[],pageParams:[]},c=0;const l=async()=>{let f=!1;const w=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(e.signal.aborted?f=!0:e.signal.addEventListener("abort",()=>{f=!0}),e.signal)})},y=bh(e.options,e.fetchOptions),C=async(b,E,x)=>{if(f)return Promise.reject();if(E==null&&b.pages.length)return Promise.resolve(b);const g={queryKey:e.queryKey,pageParam:E,direction:x?"backward":"forward",meta:e.options.meta};w(g);const _=await y(g),{maxPages:O}=e.options,T=x?Y4:X4;return{pages:T(b.pages,_,O),pageParams:T(b.pageParams,E,O)}};if(i&&s.length){const b=i==="backward",E=b?ub:wu,x={pages:s,pageParams:o},g=E(r,x);a=await C(x,g,b)}else{const b=t??s.length;do{const E=c===0?o[0]??r.initialPageParam:wu(r,a);if(c>0&&E==null)break;a=await C(a,E),c++}while(c<b)}return a};e.options.persister?e.fetchFn=()=>{var f,w;return(w=(f=e.options).persister)==null?void 0:w.call(f,l,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=l}}}function wu(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function ub(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}var be,on,an,mr,gr,cn,vr,yr,Ku,xh=(Ku=class{constructor(t={}){U(this,be,void 0);U(this,on,void 0);U(this,an,void 0);U(this,mr,void 0);U(this,gr,void 0);U(this,cn,void 0);U(this,vr,void 0);U(this,yr,void 0);V(this,be,t.queryCache||new ob),V(this,on,t.mutationCache||new lb),V(this,an,t.defaultOptions||{}),V(this,mr,new Map),V(this,gr,new Map),V(this,cn,0)}mount(){Ki(this,cn)._++,P(this,cn)===1&&(V(this,vr,Oc.subscribe(async t=>{t&&(await this.resumePausedMutations(),P(this,be).onFocus())})),V(this,yr,io.subscribe(async t=>{t&&(await this.resumePausedMutations(),P(this,be).onOnline())})))}unmount(){var t,e;Ki(this,cn)._--,P(this,cn)===0&&((t=P(this,vr))==null||t.call(this),V(this,vr,void 0),(e=P(this,yr))==null||e.call(this),V(this,yr,void 0))}isFetching(t){return P(this,be).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return P(this,on).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=P(this,be).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.getQueryData(t.queryKey);if(e===void 0)return this.fetchQuery(t);{const n=this.defaultQueryOptions(t),r=P(this,be).build(this,n);return t.revalidateIfStale&&r.isStaleByTime(cr(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(e)}}getQueriesData(t){return P(this,be).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),i=P(this,be).get(r.queryHash),s=i==null?void 0:i.state.data,o=Q4(e,s);if(o!==void 0)return P(this,be).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return Ae.batch(()=>P(this,be).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=P(this,be).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=P(this,be);Ae.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=P(this,be),r={type:"active",...t};return Ae.batch(()=>(n.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries(r,e)))}cancelQueries(t={},e={}){const n={revert:!0,...e},r=Ae.batch(()=>P(this,be).findAll(t).map(i=>i.cancel(n)));return Promise.all(r).then(et).catch(et)}invalidateQueries(t={},e={}){return Ae.batch(()=>{if(P(this,be).findAll(t).forEach(r=>{r.invalidate()}),t.refetchType==="none")return Promise.resolve();const n={...t,type:t.refetchType??t.type??"active"};return this.refetchQueries(n,e)})}refetchQueries(t={},e){const n={...e,cancelRefetch:(e==null?void 0:e.cancelRefetch)??!0},r=Ae.batch(()=>P(this,be).findAll(t).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(et)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(et)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=P(this,be).build(this,e);return n.isStaleByTime(cr(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(et).catch(et)}fetchInfiniteQuery(t){return t.behavior=bu(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(et).catch(et)}ensureInfiniteQueryData(t){return t.behavior=bu(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return io.isOnline()?P(this,on).resumePausedMutations():Promise.resolve()}getQueryCache(){return P(this,be)}getMutationCache(){return P(this,on)}getDefaultOptions(){return P(this,an)}setDefaultOptions(t){V(this,an,t)}setQueryDefaults(t,e){P(this,mr).set(bi(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...P(this,mr).values()];let n={};return e.forEach(r=>{wi(t,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(t,e){P(this,gr).set(bi(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...P(this,gr).values()];let n={};return e.forEach(r=>{wi(t,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...P(this,an).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Ec(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.enabled!==!0&&e.queryFn===xc&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...P(this,an).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){P(this,be).clear(),P(this,on).clear()}},be=new WeakMap,on=new WeakMap,an=new WeakMap,mr=new WeakMap,gr=new WeakMap,cn=new WeakMap,vr=new WeakMap,yr=new WeakMap,Ku),$e,K,_i,Be,Tn,br,ln,_t,Ei,wr,Sr,An,Ln,un,Cr,Rn,ei,xi,$a,Oi,za,Pi,qa,Ti,Ga,Ai,Wa,Li,Za,Ri,Ka,oo,Oh,Qu,db=(Qu=class extends Bi{constructor(e,n){super();U(this,Rn);U(this,xi);U(this,Oi);U(this,Pi);U(this,Ti);U(this,Ai);U(this,Li);U(this,Ri);U(this,oo);U(this,$e,void 0);U(this,K,void 0);U(this,_i,void 0);U(this,Be,void 0);U(this,Tn,void 0);U(this,br,void 0);U(this,ln,void 0);U(this,_t,void 0);U(this,Ei,void 0);U(this,wr,void 0);U(this,Sr,void 0);U(this,An,void 0);U(this,Ln,void 0);U(this,un,void 0);U(this,Cr,new Set);this.options=n,V(this,$e,e),V(this,_t,null),V(this,ln,Ua()),this.options.experimental_prefetchInRender||P(this,ln).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(P(this,K).addObserver(this),Su(P(this,K),this.options)?Z(this,Rn,ei).call(this):this.updateResult(),Z(this,Ti,Ga).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Qa(P(this,K),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Qa(P(this,K),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Z(this,Ai,Wa).call(this),Z(this,Li,Za).call(this),P(this,K).removeObserver(this)}setOptions(e,n){const r=this.options,i=P(this,K);if(this.options=P(this,$e).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ut(this.options.enabled,P(this,K))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Z(this,Ri,Ka).call(this),P(this,K).setOptions(this.options),r._defaulted&&!Ba(this.options,r)&&P(this,$e).getQueryCache().notify({type:"observerOptionsUpdated",query:P(this,K),observer:this});const s=this.hasListeners();s&&Cu(P(this,K),i,this.options,r)&&Z(this,Rn,ei).call(this),this.updateResult(n),s&&(P(this,K)!==i||ut(this.options.enabled,P(this,K))!==ut(r.enabled,P(this,K))||cr(this.options.staleTime,P(this,K))!==cr(r.staleTime,P(this,K)))&&Z(this,xi,$a).call(this);const o=Z(this,Oi,za).call(this);s&&(P(this,K)!==i||ut(this.options.enabled,P(this,K))!==ut(r.enabled,P(this,K))||o!==P(this,un))&&Z(this,Pi,qa).call(this,o)}getOptimisticResult(e){const n=P(this,$e).getQueryCache().build(P(this,$e),e),r=this.createResult(n,e);return hb(this,r)&&(V(this,Be,r),V(this,br,this.options),V(this,Tn,P(this,K).state)),r}getCurrentResult(){return P(this,Be)}trackResult(e,n){const r={};return Object.keys(e).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),e[i])})}),r}trackProp(e){P(this,Cr).add(e)}getCurrentQuery(){return P(this,K)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=P(this,$e).defaultQueryOptions(e),r=P(this,$e).getQueryCache().build(P(this,$e),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(e){return Z(this,Rn,ei).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),P(this,Be)))}createResult(e,n){var O;const r=P(this,K),i=this.options,s=P(this,Be),o=P(this,Tn),a=P(this,br),l=e!==r?e.state:P(this,_i),{state:u}=e;let d={...u},h=!1,v;if(n._optimisticResults){const T=this.hasListeners(),L=!T&&Su(e,n),R=T&&Cu(e,r,n,i);(L||R)&&(d={...d,...Eh(u.data,e.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:f,status:w}=d;if(n.select&&d.data!==void 0)if(s&&d.data===(o==null?void 0:o.data)&&n.select===P(this,Ei))v=P(this,wr);else try{V(this,Ei,n.select),v=n.select(d.data),v=Ha(s==null?void 0:s.data,v,n),V(this,wr,v),V(this,_t,null)}catch(T){V(this,_t,T)}else v=d.data;if(n.placeholderData!==void 0&&v===void 0&&w==="pending"){let T;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))T=s.data;else if(T=typeof n.placeholderData=="function"?n.placeholderData((O=P(this,Sr))==null?void 0:O.state.data,P(this,Sr)):n.placeholderData,n.select&&T!==void 0)try{T=n.select(T),V(this,_t,null)}catch(L){V(this,_t,L)}T!==void 0&&(w="success",v=Ha(s==null?void 0:s.data,T,n),h=!0)}P(this,_t)&&(m=P(this,_t),v=P(this,wr),f=Date.now(),w="error");const y=d.fetchStatus==="fetching",C=w==="pending",b=w==="error",E=C&&y,x=v!==void 0,_={status:w,fetchStatus:d.fetchStatus,isPending:C,isSuccess:w==="success",isError:b,isInitialLoading:E,isLoading:E,data:v,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:f,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:y,isRefetching:y&&!C,isLoadingError:b&&!x,isPaused:d.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:b&&x,isStale:Pc(e,n),refetch:this.refetch,promise:P(this,ln)};if(this.options.experimental_prefetchInRender){const T=A=>{_.status==="error"?A.reject(_.error):_.data!==void 0&&A.resolve(_.data)},L=()=>{const A=V(this,ln,_.promise=Ua());T(A)},R=P(this,ln);switch(R.status){case"pending":e.queryHash===r.queryHash&&T(R);break;case"fulfilled":(_.status==="error"||_.data!==R.value)&&L();break;case"rejected":(_.status!=="error"||_.error!==R.reason)&&L();break}}return _}updateResult(e){const n=P(this,Be),r=this.createResult(P(this,K),this.options);if(V(this,Tn,P(this,K).state),V(this,br,this.options),P(this,Tn).data!==void 0&&V(this,Sr,P(this,K)),Ba(r,n))return;V(this,Be,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!P(this,Cr).size)return!0;const c=new Set(a??P(this,Cr));return this.options.throwOnError&&c.add("error"),Object.keys(P(this,Be)).some(l=>{const u=l;return P(this,Be)[u]!==n[u]&&c.has(u)})};(e==null?void 0:e.listeners)!==!1&&s()&&(i.listeners=!0),Z(this,oo,Oh).call(this,{...i,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Z(this,Ti,Ga).call(this)}},$e=new WeakMap,K=new WeakMap,_i=new WeakMap,Be=new WeakMap,Tn=new WeakMap,br=new WeakMap,ln=new WeakMap,_t=new WeakMap,Ei=new WeakMap,wr=new WeakMap,Sr=new WeakMap,An=new WeakMap,Ln=new WeakMap,un=new WeakMap,Cr=new WeakMap,Rn=new WeakSet,ei=function(e){Z(this,Ri,Ka).call(this);let n=P(this,K).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(et)),n},xi=new WeakSet,$a=function(){Z(this,Ai,Wa).call(this);const e=cr(this.options.staleTime,P(this,K));if(In||P(this,Be).isStale||!Fa(e))return;const r=vh(P(this,Be).dataUpdatedAt,e)+1;V(this,An,setTimeout(()=>{P(this,Be).isStale||this.updateResult()},r))},Oi=new WeakSet,za=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(P(this,K)):this.options.refetchInterval)??!1},Pi=new WeakSet,qa=function(e){Z(this,Li,Za).call(this),V(this,un,e),!(In||ut(this.options.enabled,P(this,K))===!1||!Fa(P(this,un))||P(this,un)===0)&&V(this,Ln,setInterval(()=>{(this.options.refetchIntervalInBackground||Oc.isFocused())&&Z(this,Rn,ei).call(this)},P(this,un)))},Ti=new WeakSet,Ga=function(){Z(this,xi,$a).call(this),Z(this,Pi,qa).call(this,Z(this,Oi,za).call(this))},Ai=new WeakSet,Wa=function(){P(this,An)&&(clearTimeout(P(this,An)),V(this,An,void 0))},Li=new WeakSet,Za=function(){P(this,Ln)&&(clearInterval(P(this,Ln)),V(this,Ln,void 0))},Ri=new WeakSet,Ka=function(){const e=P(this,$e).getQueryCache().build(P(this,$e),this.options);if(e===P(this,K))return;const n=P(this,K);V(this,K,e),V(this,_i,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},oo=new WeakSet,Oh=function(e){Ae.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(P(this,Be))}),P(this,$e).getQueryCache().notify({query:P(this,K),type:"observerResultsUpdated"})})},Qu);function fb(t,e){return ut(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function Su(t,e){return fb(t,e)||t.state.data!==void 0&&Qa(t,e,e.refetchOnMount)}function Qa(t,e,n){if(ut(e.enabled,t)!==!1){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&Pc(t,e)}return!1}function Cu(t,e,n,r){return(t!==e||ut(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&Pc(t,n)}function Pc(t,e){return ut(e.enabled,t)!==!1&&t.isStaleByTime(cr(e.staleTime,t))}function hb(t,e){return!Ba(t.getCurrentResult(),e)}var Ph=N.createContext(void 0),pb=t=>{const e=N.useContext(Ph);if(t)return t;if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Th=({client:t,children:e})=>(N.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),S.jsx(Ph.Provider,{value:t,children:e})),Ah=N.createContext(!1),mb=()=>N.useContext(Ah);Ah.Provider;function gb(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var vb=N.createContext(gb()),yb=()=>N.useContext(vb);function bb(t,e){return typeof t=="function"?t(...e):!!t}function wb(){}var Sb=(t,e)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(e.isReset()||(t.retryOnMount=!1))},Cb=t=>{N.useEffect(()=>{t.clearReset()},[t])},_b=({result:t,errorResetBoundary:e,throwOnError:n,query:r})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&bb(n,[t.error,r]),Eb=t=>{t.suspense&&(t.staleTime===void 0&&(t.staleTime=1e3),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3)))},xb=(t,e)=>t.isLoading&&t.isFetching&&!e,Ob=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,_u=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function Pb(t,e,n){var u,d,h,v,m;const r=pb(n),i=mb(),s=yb(),o=r.defaultQueryOptions(t);(d=(u=r.getDefaultOptions().queries)==null?void 0:u._experimental_beforeQuery)==null||d.call(u,o),o._optimisticResults=i?"isRestoring":"optimistic",Eb(o),Sb(o,s),Cb(s);const a=!r.getQueryCache().get(o.queryHash),[c]=N.useState(()=>new e(r,o)),l=c.getOptimisticResult(o);if(N.useSyncExternalStore(N.useCallback(f=>{const w=i?()=>{}:c.subscribe(Ae.batchCalls(f));return c.updateResult(),w},[c,i]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),N.useEffect(()=>{c.setOptions(o,{listeners:!1})},[o,c]),Ob(o,l))throw _u(o,c,s);if(_b({result:l,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw l.error;if((v=(h=r.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||v.call(h,o,l),o.experimental_prefetchInRender&&!In&&xb(l,i)){const f=a?_u(o,c,s):(m=r.getQueryCache().get(o.queryHash))==null?void 0:m.promise;f==null||f.catch(wb).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?l:c.trackResult(l)}function Lh(t,e){return Pb(t,db,e)}async function Tb(t){return(await Se.request({method:"GET",baseURL:"https://erpru.omnic.solutions",url:`/lms/hs/lms_ecomgate/points?project=5e50288b-3806-11ed-a300-a2873e29cd09&code=${t}`})).data.data}function Ab(){const[t,e]=p.useState(""),{setLMSData:n,setLoading:r}=mo(),{data:i,isLoading:s}=Lh({queryKey:["lms-data",t],queryFn:()=>Tb(t),enabled:!!t,refetchOnWindowFocus:!1,retry:2});return p.useEffect(()=>{const o=i==null?void 0:i.results[0];o&&n(o)},[i,n]),p.useEffect(()=>{r(s)},[s,r]),{getLMSData:e}}var Lb=Object.getOwnPropertyNames,Rb=Object.getOwnPropertySymbols,kb=Object.prototype.hasOwnProperty;function Eu(t,e){return function(r,i,s){return t(r,i,s)&&e(r,i,s)}}function Ss(t){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return t(n,r,i);var s=i.cache,o=s.get(n),a=s.get(r);if(o&&a)return o===r&&a===n;s.set(n,r),s.set(r,n);var c=t(n,r,i);return s.delete(n),s.delete(r),c}}function Mb(t){return t!=null?t[Symbol.toStringTag]:void 0}function xu(t){return Lb(t).concat(Rb(t))}var Db=Object.hasOwn||function(t,e){return kb.call(t,e)};function Fn(t,e){return t===e||!t&&!e&&t!==t&&e!==e}var Nb="__v",jb="__o",Ib="_owner",Ou=Object.getOwnPropertyDescriptor,Pu=Object.keys;function Fb(t,e,n){var r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function Bb(t,e){return Fn(t.getTime(),e.getTime())}function Vb(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function Hb(t,e){return t===e}function Tu(t,e,n){var r=t.size;if(r!==e.size)return!1;if(!r)return!0;for(var i=new Array(r),s=t.entries(),o,a,c=0;(o=s.next())&&!o.done;){for(var l=e.entries(),u=!1,d=0;(a=l.next())&&!a.done;){if(i[d]){d++;continue}var h=o.value,v=a.value;if(n.equals(h[0],v[0],c,d,t,e,n)&&n.equals(h[1],v[1],h[0],v[0],t,e,n)){u=i[d]=!0;break}d++}if(!u)return!1;c++}return!0}var Ub=Fn;function $b(t,e,n){var r=Pu(t),i=r.length;if(Pu(e).length!==i)return!1;for(;i-- >0;)if(!Rh(t,e,n,r[i]))return!1;return!0}function Gr(t,e,n){var r=xu(t),i=r.length;if(xu(e).length!==i)return!1;for(var s,o,a;i-- >0;)if(s=r[i],!Rh(t,e,n,s)||(o=Ou(t,s),a=Ou(e,s),(o||a)&&(!o||!a||o.configurable!==a.configurable||o.enumerable!==a.enumerable||o.writable!==a.writable)))return!1;return!0}function zb(t,e){return Fn(t.valueOf(),e.valueOf())}function qb(t,e){return t.source===e.source&&t.flags===e.flags}function Au(t,e,n){var r=t.size;if(r!==e.size)return!1;if(!r)return!0;for(var i=new Array(r),s=t.values(),o,a;(o=s.next())&&!o.done;){for(var c=e.values(),l=!1,u=0;(a=c.next())&&!a.done;){if(!i[u]&&n.equals(o.value,a.value,o.value,a.value,t,e,n)){l=i[u]=!0;break}u++}if(!l)return!1}return!0}function Gb(t,e){var n=t.length;if(e.length!==n)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}function Wb(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function Rh(t,e,n,r){return(r===Ib||r===jb||r===Nb)&&(t.$$typeof||e.$$typeof)?!0:Db(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}var Zb="[object Arguments]",Kb="[object Boolean]",Qb="[object Date]",Jb="[object Error]",Xb="[object Map]",Yb="[object Number]",e5="[object Object]",t5="[object RegExp]",n5="[object Set]",r5="[object String]",i5="[object URL]",s5=Array.isArray,Lu=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,Ru=Object.assign,o5=Object.prototype.toString.call.bind(Object.prototype.toString);function a5(t){var e=t.areArraysEqual,n=t.areDatesEqual,r=t.areErrorsEqual,i=t.areFunctionsEqual,s=t.areMapsEqual,o=t.areNumbersEqual,a=t.areObjectsEqual,c=t.arePrimitiveWrappersEqual,l=t.areRegExpsEqual,u=t.areSetsEqual,d=t.areTypedArraysEqual,h=t.areUrlsEqual,v=t.unknownTagComparators;return function(f,w,y){if(f===w)return!0;if(f==null||w==null)return!1;var C=typeof f;if(C!==typeof w)return!1;if(C!=="object")return C==="number"?o(f,w,y):C==="function"?i(f,w,y):!1;var b=f.constructor;if(b!==w.constructor)return!1;if(b===Object)return a(f,w,y);if(s5(f))return e(f,w,y);if(Lu!=null&&Lu(f))return d(f,w,y);if(b===Date)return n(f,w,y);if(b===RegExp)return l(f,w,y);if(b===Map)return s(f,w,y);if(b===Set)return u(f,w,y);var E=o5(f);if(E===Qb)return n(f,w,y);if(E===t5)return l(f,w,y);if(E===Xb)return s(f,w,y);if(E===n5)return u(f,w,y);if(E===e5)return typeof f.then!="function"&&typeof w.then!="function"&&a(f,w,y);if(E===i5)return h(f,w,y);if(E===Jb)return r(f,w,y);if(E===Zb)return a(f,w,y);if(E===Kb||E===Yb||E===r5)return c(f,w,y);if(v){var x=v[E];if(!x){var g=Mb(f);g&&(x=v[g])}if(x)return x(f,w,y)}return!1}}function c5(t){var e=t.circular,n=t.createCustomConfig,r=t.strict,i={areArraysEqual:r?Gr:Fb,areDatesEqual:Bb,areErrorsEqual:Vb,areFunctionsEqual:Hb,areMapsEqual:r?Eu(Tu,Gr):Tu,areNumbersEqual:Ub,areObjectsEqual:r?Gr:$b,arePrimitiveWrappersEqual:zb,areRegExpsEqual:qb,areSetsEqual:r?Eu(Au,Gr):Au,areTypedArraysEqual:r?Gr:Gb,areUrlsEqual:Wb,unknownTagComparators:void 0};if(n&&(i=Ru({},i,n(i))),e){var s=Ss(i.areArraysEqual),o=Ss(i.areMapsEqual),a=Ss(i.areObjectsEqual),c=Ss(i.areSetsEqual);i=Ru({},i,{areArraysEqual:s,areMapsEqual:o,areObjectsEqual:a,areSetsEqual:c})}return i}function l5(t){return function(e,n,r,i,s,o,a){return t(e,n,a)}}function u5(t){var e=t.circular,n=t.comparator,r=t.createState,i=t.equals,s=t.strict;if(r)return function(c,l){var u=r(),d=u.cache,h=d===void 0?e?new WeakMap:void 0:d,v=u.meta;return n(c,l,{cache:h,equals:i,meta:v,strict:s})};if(e)return function(c,l){return n(c,l,{cache:new WeakMap,equals:i,meta:void 0,strict:s})};var o={cache:void 0,equals:i,meta:void 0,strict:s};return function(c,l){return n(c,l,o)}}var ku=mn();mn({strict:!0});mn({circular:!0});mn({circular:!0,strict:!0});mn({createInternalComparator:function(){return Fn}});mn({strict:!0,createInternalComparator:function(){return Fn}});mn({circular:!0,createInternalComparator:function(){return Fn}});mn({circular:!0,createInternalComparator:function(){return Fn},strict:!0});function mn(t){t===void 0&&(t={});var e=t.circular,n=e===void 0?!1:e,r=t.createInternalComparator,i=t.createState,s=t.strict,o=s===void 0?!1:s,a=c5(t),c=a5(a),l=r?r(c):l5(c);return u5({circular:n,comparator:c,createState:i,equals:l,strict:o})}const Mu=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Ko=1,Wr=8;class Tc{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[n,r]=new Uint8Array(e,0,2);if(n!==219)throw new Error("Data does not appear to be in a KDBush format.");const i=r>>4;if(i!==Ko)throw new Error(`Got v${i} data when expected v${Ko}.`);const s=Mu[r&15];if(!s)throw new Error("Unrecognized array type.");const[o]=new Uint16Array(e,2,1),[a]=new Uint32Array(e,4,1);return new Tc(a,o,s,e)}constructor(e,n=64,r=Float64Array,i){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const s=Mu.indexOf(this.ArrayType),o=e*2*this.ArrayType.BYTES_PER_ELEMENT,a=e*this.IndexArrayType.BYTES_PER_ELEMENT,c=(8-a%8)%8;if(s<0)throw new Error(`Unexpected typed array class: ${r}.`);i&&i instanceof ArrayBuffer?(this.data=i,this.ids=new this.IndexArrayType(this.data,Wr,e),this.coords=new this.ArrayType(this.data,Wr+a+c,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(Wr+o+a+c),this.ids=new this.IndexArrayType(this.data,Wr,e),this.coords=new this.ArrayType(this.data,Wr+a+c,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(Ko<<4)+s]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=e)}add(e,n){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=n,r}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return Ja(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,n,r,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:s,coords:o,nodeSize:a}=this,c=[0,s.length-1,0],l=[];for(;c.length;){const u=c.pop()||0,d=c.pop()||0,h=c.pop()||0;if(d-h<=a){for(let w=h;w<=d;w++){const y=o[2*w],C=o[2*w+1];y>=e&&y<=r&&C>=n&&C<=i&&l.push(s[w])}continue}const v=h+d>>1,m=o[2*v],f=o[2*v+1];m>=e&&m<=r&&f>=n&&f<=i&&l.push(s[v]),(u===0?e<=m:n<=f)&&(c.push(h),c.push(v-1),c.push(1-u)),(u===0?r>=m:i>=f)&&(c.push(v+1),c.push(d),c.push(1-u))}return l}within(e,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:s,nodeSize:o}=this,a=[0,i.length-1,0],c=[],l=r*r;for(;a.length;){const u=a.pop()||0,d=a.pop()||0,h=a.pop()||0;if(d-h<=o){for(let w=h;w<=d;w++)Du(s[2*w],s[2*w+1],e,n)<=l&&c.push(i[w]);continue}const v=h+d>>1,m=s[2*v],f=s[2*v+1];Du(m,f,e,n)<=l&&c.push(i[v]),(u===0?e-r<=m:n-r<=f)&&(a.push(h),a.push(v-1),a.push(1-u)),(u===0?e+r>=m:n+r>=f)&&(a.push(v+1),a.push(d),a.push(1-u))}return c}}function Ja(t,e,n,r,i,s){if(i-r<=n)return;const o=r+i>>1;kh(t,e,o,r,i,s),Ja(t,e,n,r,o-1,1-s),Ja(t,e,n,o+1,i,1-s)}function kh(t,e,n,r,i,s){for(;i>r;){if(i-r>600){const l=i-r+1,u=n-r+1,d=Math.log(l),h=.5*Math.exp(2*d/3),v=.5*Math.sqrt(d*h*(l-h)/l)*(u-l/2<0?-1:1),m=Math.max(r,Math.floor(n-u*h/l+v)),f=Math.min(i,Math.floor(n+(l-u)*h/l+v));kh(t,e,n,m,f,s)}const o=e[2*n+s];let a=r,c=i;for(Zr(t,e,r,n),e[2*i+s]>o&&Zr(t,e,r,i);a<c;){for(Zr(t,e,a,c),a++,c--;e[2*a+s]<o;)a++;for(;e[2*c+s]>o;)c--}e[2*r+s]===o?Zr(t,e,r,c):(c++,Zr(t,e,c,i)),c<=n&&(r=c+1),n<=c&&(i=c-1)}}function Zr(t,e,n,r){Qo(t,n,r),Qo(e,2*n,2*r),Qo(e,2*n+1,2*r+1)}function Qo(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Du(t,e,n,r){const i=t-n,s=e-r;return i*i+s*s}const d5={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},Nu=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),yn=2,Yt=3,Jo=4,Jt=5,Mh=6;class f5{constructor(e){this.options=Object.assign(Object.create(d5),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:n,minZoom:r,maxZoom:i}=this.options;n&&console.time("total time");const s=`prepare ${e.length} points`;n&&console.time(s),this.points=e;const o=[];for(let c=0;c<e.length;c++){const l=e[c];if(!l.geometry)continue;const[u,d]=l.geometry.coordinates,h=Nu(Cs(u)),v=Nu(_s(d));o.push(h,v,1/0,c,-1,1),this.options.reduce&&o.push(0)}let a=this.trees[i+1]=this._createTree(o);n&&console.timeEnd(s);for(let c=i;c>=r;c--){const l=+Date.now();a=this.trees[c]=this._createTree(this._cluster(a,c)),n&&console.log("z%d: %d clusters in %dms",c,a.numItems,+Date.now()-l)}return n&&console.timeEnd("total time"),this}getClusters(e,n){let r=((e[0]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[1]));let s=e[2]===180?180:((e[2]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,s=180;else if(r>s){const d=this.getClusters([r,i,180,o],n),h=this.getClusters([-180,i,s,o],n);return d.concat(h)}const a=this.trees[this._limitZoom(n)],c=a.range(Cs(r),_s(o),Cs(s),_s(i)),l=a.data,u=[];for(const d of c){const h=this.stride*d;u.push(l[h+Jt]>1?ju(l,h,this.clusterProps):this.points[l[h+Yt]])}return u}getChildren(e){const n=this._getOriginId(e),r=this._getOriginZoom(e),i="No cluster with the specified id.",s=this.trees[r];if(!s)throw new Error(i);const o=s.data;if(n*this.stride>=o.length)throw new Error(i);const a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),c=o[n*this.stride],l=o[n*this.stride+1],u=s.within(c,l,a),d=[];for(const h of u){const v=h*this.stride;o[v+Jo]===e&&d.push(o[v+Jt]>1?ju(o,v,this.clusterProps):this.points[o[v+Yt]])}if(d.length===0)throw new Error(i);return d}getLeaves(e,n,r){n=n||10,r=r||0;const i=[];return this._appendLeaves(i,e,n,r,0),i}getTile(e,n,r){const i=this.trees[this._limitZoom(e)],s=Math.pow(2,e),{extent:o,radius:a}=this.options,c=a/o,l=(r-c)/s,u=(r+1+c)/s,d={features:[]};return this._addTileFeatures(i.range((n-c)/s,l,(n+1+c)/s,u),i.data,n,r,s,d),n===0&&this._addTileFeatures(i.range(1-c/s,l,1,u),i.data,s,r,s,d),n===s-1&&this._addTileFeatures(i.range(0,l,c/s,u),i.data,-1,r,s,d),d.features.length?d:null}getClusterExpansionZoom(e){let n=this._getOriginZoom(e)-1;for(;n<=this.options.maxZoom;){const r=this.getChildren(e);if(n++,r.length!==1)break;e=r[0].properties.cluster_id}return n}_appendLeaves(e,n,r,i,s){const o=this.getChildren(n);for(const a of o){const c=a.properties;if(c&&c.cluster?s+c.point_count<=i?s+=c.point_count:s=this._appendLeaves(e,c.cluster_id,r,i,s):s<i?s++:e.push(a),e.length===r)break}return s}_createTree(e){const n=new Tc(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<e.length;r+=this.stride)n.add(e[r],e[r+1]);return n.finish(),n.data=e,n}_addTileFeatures(e,n,r,i,s,o){for(const a of e){const c=a*this.stride,l=n[c+Jt]>1;let u,d,h;if(l)u=Dh(n,c,this.clusterProps),d=n[c],h=n[c+1];else{const f=this.points[n[c+Yt]];u=f.properties;const[w,y]=f.geometry.coordinates;d=Cs(w),h=_s(y)}const v={type:1,geometry:[[Math.round(this.options.extent*(d*s-r)),Math.round(this.options.extent*(h*s-i))]],tags:u};let m;l||this.options.generateId?m=n[c+Yt]:m=this.points[n[c+Yt]].id,m!==void 0&&(v.id=m),o.features.push(v)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,n){const{radius:r,extent:i,reduce:s,minPoints:o}=this.options,a=r/(i*Math.pow(2,n)),c=e.data,l=[],u=this.stride;for(let d=0;d<c.length;d+=u){if(c[d+yn]<=n)continue;c[d+yn]=n;const h=c[d],v=c[d+1],m=e.within(c[d],c[d+1],a),f=c[d+Jt];let w=f;for(const y of m){const C=y*u;c[C+yn]>n&&(w+=c[C+Jt])}if(w>f&&w>=o){let y=h*f,C=v*f,b,E=-1;const x=((d/u|0)<<5)+(n+1)+this.points.length;for(const g of m){const _=g*u;if(c[_+yn]<=n)continue;c[_+yn]=n;const O=c[_+Jt];y+=c[_]*O,C+=c[_+1]*O,c[_+Jo]=x,s&&(b||(b=this._map(c,d,!0),E=this.clusterProps.length,this.clusterProps.push(b)),s(b,this._map(c,_)))}c[d+Jo]=x,l.push(y/w,C/w,1/0,x,-1,w),s&&l.push(E)}else{for(let y=0;y<u;y++)l.push(c[d+y]);if(w>1)for(const y of m){const C=y*u;if(!(c[C+yn]<=n)){c[C+yn]=n;for(let b=0;b<u;b++)l.push(c[C+b])}}}}return l}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,n,r){if(e[n+Jt]>1){const o=this.clusterProps[e[n+Mh]];return r?Object.assign({},o):o}const i=this.points[e[n+Yt]].properties,s=this.options.map(i);return r&&s===i?Object.assign({},s):s}}function ju(t,e,n){return{type:"Feature",id:t[e+Yt],properties:Dh(t,e,n),geometry:{type:"Point",coordinates:[h5(t[e]),p5(t[e+1])]}}}function Dh(t,e,n){const r=t[e+Jt],i=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,s=t[e+Mh],o=s===-1?{}:Object.assign({},n[s]);return Object.assign(o,{cluster:!0,cluster_id:t[e+Yt],point_count:r,point_count_abbreviated:i})}function Cs(t){return t/360+.5}function _s(t){const e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function h5(t){return(t-.5)*360}function p5(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function m5(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}class qe{static isAdvancedMarkerAvailable(e){return google.maps.marker&&e.getMapCapabilities().isAdvancedMarkersAvailable===!0}static isAdvancedMarker(e){return google.maps.marker&&e instanceof google.maps.marker.AdvancedMarkerElement}static setMap(e,n){this.isAdvancedMarker(e)?e.map=n:e.setMap(n)}static getPosition(e){if(this.isAdvancedMarker(e)){if(e.position){if(e.position instanceof google.maps.LatLng)return e.position;if(Number.isFinite(e.position.lat)&&Number.isFinite(e.position.lng))return new google.maps.LatLng(e.position.lat,e.position.lng)}return new google.maps.LatLng(null)}return e.getPosition()}static getVisible(e){return this.isAdvancedMarker(e)?!0:e.getVisible()}}class Xa{constructor({markers:e,position:n}){this.markers=[],e&&(this.markers=e),n&&(n instanceof google.maps.LatLng?this._position=n:this._position=new google.maps.LatLng(n))}get bounds(){if(this.markers.length===0&&!this._position)return;const e=new google.maps.LatLngBounds(this._position,this._position);for(const n of this.markers)e.extend(qe.getPosition(n));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>qe.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(qe.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}function Ya(t,e="assertion failed"){if(t==null)throw Error(e)}class g5{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return v5(e)}}const v5=t=>t.map(n=>new Xa({position:qe.getPosition(n),markers:[n]}));class y5 extends g5{constructor(e){var{maxZoom:n,radius:r=60}=e,i=m5(e,["maxZoom","radius"]);super({maxZoom:n}),this.markers=[],this.clusters=[],this.state={zoom:-1},this.superCluster=new f5(Object.assign({maxZoom:this.maxZoom,radius:r},i))}calculate(e){let n=!1,r=e.map.getZoom();Ya(r),r=Math.round(r);const i={zoom:r};if(!ku(e.markers,this.markers)){n=!0,this.markers=[...e.markers];const s=this.markers.map(o=>{const a=qe.getPosition(o);return{type:"Feature",geometry:{type:"Point",coordinates:[a.lng(),a.lat()]},properties:{marker:o}}});this.superCluster.load(s)}return n||(this.state.zoom<=this.maxZoom||i.zoom<=this.maxZoom)&&(n=!ku(this.state,i)),this.state=i,e.markers.length===0?(this.clusters=[],{clusters:this.clusters,changed:n}):(n&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:n})}cluster({map:e}){const n=e.getZoom();return Ya(n),this.superCluster.getClusters([-180,-90,180,90],Math.round(n)).map(r=>this.transformCluster(r))}transformCluster({geometry:{coordinates:[e,n]},properties:r}){if(r.cluster)return new Xa({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(s=>s.properties.marker),position:{lat:n,lng:e}});const i=r.marker;return new Xa({markers:[i],position:qe.getPosition(i)})}}class b5{constructor(e,n){this.markers={sum:e.length};const r=n.map(s=>s.count),i=r.reduce((s,o)=>s+o,0);this.clusters={count:n.length,markers:{mean:i/n.length,sum:i,min:Math.min(...r),max:Math.max(...r)}}}}class w5{render({count:e,position:n},r,i){const o=`<svg fill="${e>Math.max(10,r.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
224
+ </svg>`,We={PinPvz:k4,PinHome:P4,PinOmnic:R4,PinWeChip:M4,PinOmnicSelected:L4,PinWeChipSelected:D4,PinLlamaSelected:A4,PinLlama:T4,PointOmnic:j4,PointLlama:N4,PointWeChip:I4},_c=t=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...t},j.createElement("path",{fill:"currentcolor",d:"M12.5 8c0 .287-.108.573-.324.792l-6.789 6.88a1.095 1.095 0 0 1-1.563 0 1.131 1.131 0 0 1 0-1.585L9.83 8 3.824 1.913a1.131 1.131 0 0 1 0-1.585 1.095 1.095 0 0 1 1.564 0l6.789 6.88c.215.219.323.505.323.792Z"})),F4="PointItem-module__point__-1jMFG",B4="PointItem-module__pointButton__-wAVuy",V4="PointItem-module__pointData__CrnHK9",H4="PointItem-module__title__I5whAh",U4="PointItem-module__address__tRkAx3",$4="PointItem-module__arrow__AMAx4z",Yn={point:F4,pointButton:B4,pointData:V4,title:H4,address:U4,arrow:$4},z4=({handleDetailsClick:t,handlePointClick:e,point:n})=>{const{iconType:r,palette:i,skipPointInfo:s}=Ee(),o=Bn("screenSm"),a=(i==null?void 0:i.primary)||"#fc0",c=function(){switch(r){case"omni-llama":return We.PointLlama;case"we-chip":return We.PointWeChip;default:return rr(We.PointOmnic,a)}}();function l(){e(n),!s&&!o&&t(n)}return S.jsx("li",{className:Yn.point,children:S.jsxs("button",{className:Yn.pointButton,type:"button",tabIndex:0,onClick:l,children:[S.jsx("div",{dangerouslySetInnerHTML:{__html:c}}),S.jsxs("div",{className:Yn.pointData,children:[S.jsx("h3",{className:Yn.title,children:n.name}),S.jsx("p",{className:Yn.address,children:n.location.full_address})]}),S.jsx("span",{className:Yn.arrow,children:S.jsx(_c,{})})]})},n.uid)},q4="SamePoints-module__container__oYvAF2",G4="SamePoints-module__header__nnMDp4",W4="SamePoints-module__closeButton__gd1RzT",Z4="SamePoints-module__sameList__GhS89e",bs={container:q4,header:G4,closeButton:W4,sameList:Z4},K4=t=>{const{closeSamePoints:e,samePoints:n}=At(),{hideSearchInput:r}=Ee(),i=!!n.length;return S.jsxs("div",{className:bs.container,"data-visible":i,"data-hide-search-input":r,children:[S.jsx("div",{className:bs.header,children:S.jsx("button",{className:bs.closeButton,type:"button","aria-label":"Close points",tabIndex:0,onClick:e,children:S.jsx(gh,{})})}),S.jsx("ul",{className:bs.sameList,children:n.map(s=>S.jsx(z4,{point:s,...t},s.uid))})]})};var Bi=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},In=typeof window>"u"||"Deno"in globalThis;function tt(){}function Q4(t,e){return typeof t=="function"?t(e):t}function Fa(t){return typeof t=="number"&&t>=0&&t!==1/0}function vh(t,e){return Math.max(t+(e||0)-Date.now(),0)}function ar(t,e){return typeof t=="function"?t(e):t}function ut(t,e){return typeof t=="function"?t(e):t}function mu(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=t;if(o){if(r){if(e.queryHash!==Ec(o,e.options))return!1}else if(!wi(e.queryKey,o))return!1}if(n!=="all"){const c=e.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||i&&i!==e.state.fetchStatus||s&&!s(e))}function gu(t,e){const{exact:n,status:r,predicate:i,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(n){if(bi(e.options.mutationKey)!==bi(s))return!1}else if(!wi(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function Ec(t,e){return((e==null?void 0:e.queryKeyHashFn)||bi)(t)}function bi(t){return JSON.stringify(t,(e,n)=>Va(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function wi(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(n=>!wi(t[n],e[n])):!1}function yh(t,e){if(t===e)return t;const n=vu(t)&&vu(e);if(n||Va(t)&&Va(e)){const r=n?t:Object.keys(t),i=r.length,s=n?e:Object.keys(e),o=s.length,a=n?[]:{};let c=0;for(let l=0;l<o;l++){const u=n?l:s[l];(!n&&r.includes(u)||n)&&t[u]===void 0&&e[u]===void 0?(a[u]=void 0,c++):(a[u]=yh(t[u],e[u]),a[u]===t[u]&&t[u]!==void 0&&c++)}return i===o&&c===i?t:a}return e}function Ba(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function vu(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Va(t){if(!yu(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!yu(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function yu(t){return Object.prototype.toString.call(t)==="[object Object]"}function J4(t){return new Promise(e=>{setTimeout(e,t)})}function Ha(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?yh(t,e):e}function X4(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function Y4(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var xc=Symbol();function bh(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===xc?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var En,on,lr,Uu,eb=(Uu=class extends Bi{constructor(){super();U(this,En,void 0);U(this,on,void 0);U(this,lr,void 0);B(this,lr,e=>{if(!In&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){P(this,on)||this.setEventListener(P(this,lr))}onUnsubscribe(){var e;this.hasListeners()||((e=P(this,on))==null||e.call(this),B(this,on,void 0))}setEventListener(e){var n;B(this,lr,e),(n=P(this,on))==null||n.call(this),B(this,on,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){P(this,En)!==e&&(B(this,En,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof P(this,En)=="boolean"?P(this,En):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},En=new WeakMap,on=new WeakMap,lr=new WeakMap,Uu),Oc=new eb,ur,an,dr,$u,tb=($u=class extends Bi{constructor(){super();U(this,ur,!0);U(this,an,void 0);U(this,dr,void 0);B(this,dr,e=>{if(!In&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){P(this,an)||this.setEventListener(P(this,dr))}onUnsubscribe(){var e;this.hasListeners()||((e=P(this,an))==null||e.call(this),B(this,an,void 0))}setEventListener(e){var n;B(this,dr,e),(n=P(this,an))==null||n.call(this),B(this,an,e(this.setOnline.bind(this)))}setOnline(e){P(this,ur)!==e&&(B(this,ur,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return P(this,ur)}},ur=new WeakMap,an=new WeakMap,dr=new WeakMap,$u),io=new tb;function Ua(){let t,e;const n=new Promise((i,s)=>{t=i,e=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),t(i)},n.reject=i=>{r({status:"rejected",reason:i}),e(i)},n}function nb(t){return Math.min(1e3*2**t,3e4)}function wh(t){return(t??"online")==="online"?io.isOnline():!0}var Sh=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function Zo(t){return t instanceof Sh}function Ch(t){let e=!1,n=0,r=!1,i;const s=Ua(),o=f=>{var w;r||(h(new Sh(f)),(w=t.abort)==null||w.call(t))},a=()=>{e=!0},c=()=>{e=!1},l=()=>Oc.isFocused()&&(t.networkMode==="always"||io.isOnline())&&t.canRun(),u=()=>wh(t.networkMode)&&t.canRun(),d=f=>{var w;r||(r=!0,(w=t.onSuccess)==null||w.call(t,f),i==null||i(),s.resolve(f))},h=f=>{var w;r||(r=!0,(w=t.onError)==null||w.call(t,f),i==null||i(),s.reject(f))},v=()=>new Promise(f=>{var w;i=y=>{(r||l())&&f(y)},(w=t.onPause)==null||w.call(t)}).then(()=>{var f;i=void 0,r||(f=t.onContinue)==null||f.call(t)}),m=()=>{if(r)return;let f;const w=n===0?t.initialPromise:void 0;try{f=w??t.fn()}catch(y){f=Promise.reject(y)}Promise.resolve(f).then(d).catch(y=>{var g;if(r)return;const C=t.retry??(In?0:3),b=t.retryDelay??nb,E=typeof b=="function"?b(n,y):b,x=C===!0||typeof C=="number"&&n<C||typeof C=="function"&&C(n,y);if(e||!x){h(y);return}n++,(g=t.onFail)==null||g.call(t,n,y),J4(E).then(()=>l()?void 0:v()).then(()=>{e?h(y):m()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:c,canStart:u,start:()=>(u()?m():v().then(m),s)}}function rb(){let t=[],e=0,n=a=>{a()},r=a=>{a()},i=a=>setTimeout(a,0);const s=a=>{e?t.push(a):i(()=>{n(a)})},o=()=>{const a=t;t=[],a.length&&i(()=>{r(()=>{a.forEach(c=>{n(c)})})})};return{batch:a=>{let c;e++;try{c=a()}finally{e--,e||o()}return c},batchCalls:a=>(...c)=>{s(()=>{a(...c)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var Le=rb(),xn,zu,_h=(zu=class{constructor(){U(this,xn,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Fa(this.gcTime)&&B(this,xn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(In?1/0:5*60*1e3))}clearGcTimeout(){P(this,xn)&&(clearTimeout(P(this,xn)),B(this,xn,void 0))}},xn=new WeakMap,zu),fr,hr,Ye,De,Si,On,lt,jt,qu,ib=(qu=class extends _h{constructor(e){super();U(this,lt);U(this,fr,void 0);U(this,hr,void 0);U(this,Ye,void 0);U(this,De,void 0);U(this,Si,void 0);U(this,On,void 0);B(this,On,!1),B(this,Si,e.defaultOptions),this.setOptions(e.options),this.observers=[],B(this,Ye,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,B(this,fr,sb(this.options)),this.state=e.state??P(this,fr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=P(this,De))==null?void 0:e.promise}setOptions(e){this.options={...P(this,Si),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&P(this,Ye).remove(this)}setData(e,n){const r=Ha(this.state.data,e,this.options);return K(this,lt,jt).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){K(this,lt,jt).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,i;const n=(r=P(this,De))==null?void 0:r.promise;return(i=P(this,De))==null||i.cancel(e),n?n.then(tt).catch(tt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(P(this,fr))}isActive(){return this.observers.some(e=>ut(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===xc||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!vh(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=P(this,De))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=P(this,De))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),P(this,Ye).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(P(this,De)&&(P(this,On)?P(this,De).cancel({revert:!0}):P(this,De).cancelRetry()),this.scheduleGc()),P(this,Ye).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||K(this,lt,jt).call(this,{type:"invalidate"})}fetch(e,n){var c,l,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(P(this,De))return P(this,De).continueRetry(),P(this,De).promise}if(e&&this.setOptions(e),!this.options.queryFn){const d=this.observers.find(h=>h.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,i=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(B(this,On,!0),r.signal)})},s=()=>{const d=bh(this.options,n),h={queryKey:this.queryKey,meta:this.meta};return i(h),B(this,On,!1),this.options.persister?this.options.persister(d,h,this):d(h)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(o),(c=this.options.behavior)==null||c.onFetch(o,this),B(this,hr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((l=o.fetchOptions)==null?void 0:l.meta))&&K(this,lt,jt).call(this,{type:"fetch",meta:(u=o.fetchOptions)==null?void 0:u.meta});const a=d=>{var h,v,m,f;Zo(d)&&d.silent||K(this,lt,jt).call(this,{type:"error",error:d}),Zo(d)||((v=(h=P(this,Ye).config).onError)==null||v.call(h,d,this),(f=(m=P(this,Ye).config).onSettled)==null||f.call(m,this.state.data,d,this)),this.scheduleGc()};return B(this,De,Ch({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var h,v,m,f;if(d===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(w){a(w);return}(v=(h=P(this,Ye).config).onSuccess)==null||v.call(h,d,this),(f=(m=P(this,Ye).config).onSettled)==null||f.call(m,d,this.state.error,this),this.scheduleGc()},onError:a,onFail:(d,h)=>{K(this,lt,jt).call(this,{type:"failed",failureCount:d,error:h})},onPause:()=>{K(this,lt,jt).call(this,{type:"pause"})},onContinue:()=>{K(this,lt,jt).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),P(this,De).start()}},fr=new WeakMap,hr=new WeakMap,Ye=new WeakMap,De=new WeakMap,Si=new WeakMap,On=new WeakMap,lt=new WeakSet,jt=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Eh(r.data,this.options),fetchMeta:e.meta??null};case"success":return{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=e.error;return Zo(i)&&i.revert&&P(this,hr)?{...P(this,hr),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),Le.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),P(this,Ye).notify({query:this,type:"updated",action:e})})},qu);function Eh(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:wh(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function sb(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var St,Gu,ob=(Gu=class extends Bi{constructor(e={}){super();U(this,St,void 0);this.config=e,B(this,St,new Map)}build(e,n,r){const i=n.queryKey,s=n.queryHash??Ec(i,n);let o=this.get(s);return o||(o=new ib({cache:this,queryKey:i,queryHash:s,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){P(this,St).has(e.queryHash)||(P(this,St).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=P(this,St).get(e.queryHash);n&&(e.destroy(),n===e&&P(this,St).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Le.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return P(this,St).get(e)}getAll(){return[...P(this,St).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>mu(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>mu(e,r)):n}notify(e){Le.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){Le.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Le.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},St=new WeakMap,Gu),Ct,Fe,Pn,_t,Jt,Wu,ab=(Wu=class extends _h{constructor(e){super();U(this,_t);U(this,Ct,void 0);U(this,Fe,void 0);U(this,Pn,void 0);this.mutationId=e.mutationId,B(this,Fe,e.mutationCache),B(this,Ct,[]),this.state=e.state||cb(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){P(this,Ct).includes(e)||(P(this,Ct).push(e),this.clearGcTimeout(),P(this,Fe).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){B(this,Ct,P(this,Ct).filter(n=>n!==e)),this.scheduleGc(),P(this,Fe).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){P(this,Ct).length||(this.state.status==="pending"?this.scheduleGc():P(this,Fe).remove(this))}continue(){var e;return((e=P(this,Pn))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,s,o,a,c,l,u,d,h,v,m,f,w,y,C,b,E,x,g,_;B(this,Pn,Ch({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(O,T)=>{K(this,_t,Jt).call(this,{type:"failed",failureCount:O,error:T})},onPause:()=>{K(this,_t,Jt).call(this,{type:"pause"})},onContinue:()=>{K(this,_t,Jt).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>P(this,Fe).canRun(this)}));const n=this.state.status==="pending",r=!P(this,Pn).canStart();try{if(!n){K(this,_t,Jt).call(this,{type:"pending",variables:e,isPaused:r}),await((s=(i=P(this,Fe).config).onMutate)==null?void 0:s.call(i,e,this));const T=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,e));T!==this.state.context&&K(this,_t,Jt).call(this,{type:"pending",context:T,variables:e,isPaused:r})}const O=await P(this,Pn).start();return await((l=(c=P(this,Fe).config).onSuccess)==null?void 0:l.call(c,O,e,this.state.context,this)),await((d=(u=this.options).onSuccess)==null?void 0:d.call(u,O,e,this.state.context)),await((v=(h=P(this,Fe).config).onSettled)==null?void 0:v.call(h,O,null,this.state.variables,this.state.context,this)),await((f=(m=this.options).onSettled)==null?void 0:f.call(m,O,null,e,this.state.context)),K(this,_t,Jt).call(this,{type:"success",data:O}),O}catch(O){try{throw await((y=(w=P(this,Fe).config).onError)==null?void 0:y.call(w,O,e,this.state.context,this)),await((b=(C=this.options).onError)==null?void 0:b.call(C,O,e,this.state.context)),await((x=(E=P(this,Fe).config).onSettled)==null?void 0:x.call(E,void 0,O,this.state.variables,this.state.context,this)),await((_=(g=this.options).onSettled)==null?void 0:_.call(g,void 0,O,e,this.state.context)),O}finally{K(this,_t,Jt).call(this,{type:"error",error:O})}}finally{P(this,Fe).runNext(this)}}},Ct=new WeakMap,Fe=new WeakMap,Pn=new WeakMap,_t=new WeakSet,Jt=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Le.batch(()=>{P(this,Ct).forEach(r=>{r.onMutationUpdate(e)}),P(this,Fe).notify({mutation:this,type:"updated",action:e})})},Wu);function cb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ge,Ci,Zu,lb=(Zu=class extends Bi{constructor(e={}){super();U(this,Ge,void 0);U(this,Ci,void 0);this.config=e,B(this,Ge,new Map),B(this,Ci,Date.now())}build(e,n,r){const i=new ab({mutationCache:this,mutationId:++Ki(this,Ci)._,options:e.defaultMutationOptions(n),state:r});return this.add(i),i}add(e){const n=ws(e),r=P(this,Ge).get(n)??[];r.push(e),P(this,Ge).set(n,r),this.notify({type:"added",mutation:e})}remove(e){var r;const n=ws(e);if(P(this,Ge).has(n)){const i=(r=P(this,Ge).get(n))==null?void 0:r.filter(s=>s!==e);i&&(i.length===0?P(this,Ge).delete(n):P(this,Ge).set(n,i))}this.notify({type:"removed",mutation:e})}canRun(e){var r;const n=(r=P(this,Ge).get(ws(e)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===e}runNext(e){var r;const n=(r=P(this,Ge).get(ws(e)))==null?void 0:r.find(i=>i!==e&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Le.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...P(this,Ge).values()].flat()}find(e){const n={exact:!0,...e};return this.getAll().find(r=>gu(n,r))}findAll(e={}){return this.getAll().filter(n=>gu(e,n))}notify(e){Le.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return Le.batch(()=>Promise.all(e.map(n=>n.continue().catch(tt))))}},Ge=new WeakMap,Ci=new WeakMap,Zu);function ws(t){var e;return((e=t.options.scope)==null?void 0:e.id)??String(t.mutationId)}function bu(t){return{onFetch:(e,n)=>{var u,d,h,v,m;const r=e.options,i=(h=(d=(u=e.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:h.direction,s=((v=e.state.data)==null?void 0:v.pages)||[],o=((m=e.state.data)==null?void 0:m.pageParams)||[];let a={pages:[],pageParams:[]},c=0;const l=async()=>{let f=!1;const w=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(e.signal.aborted?f=!0:e.signal.addEventListener("abort",()=>{f=!0}),e.signal)})},y=bh(e.options,e.fetchOptions),C=async(b,E,x)=>{if(f)return Promise.reject();if(E==null&&b.pages.length)return Promise.resolve(b);const g={queryKey:e.queryKey,pageParam:E,direction:x?"backward":"forward",meta:e.options.meta};w(g);const _=await y(g),{maxPages:O}=e.options,T=x?Y4:X4;return{pages:T(b.pages,_,O),pageParams:T(b.pageParams,E,O)}};if(i&&s.length){const b=i==="backward",E=b?ub:wu,x={pages:s,pageParams:o},g=E(r,x);a=await C(x,g,b)}else{const b=t??s.length;do{const E=c===0?o[0]??r.initialPageParam:wu(r,a);if(c>0&&E==null)break;a=await C(a,E),c++}while(c<b)}return a};e.options.persister?e.fetchFn=()=>{var f,w;return(w=(f=e.options).persister)==null?void 0:w.call(f,l,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=l}}}function wu(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function ub(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}var be,cn,ln,pr,mr,un,gr,vr,Ku,xh=(Ku=class{constructor(t={}){U(this,be,void 0);U(this,cn,void 0);U(this,ln,void 0);U(this,pr,void 0);U(this,mr,void 0);U(this,un,void 0);U(this,gr,void 0);U(this,vr,void 0);B(this,be,t.queryCache||new ob),B(this,cn,t.mutationCache||new lb),B(this,ln,t.defaultOptions||{}),B(this,pr,new Map),B(this,mr,new Map),B(this,un,0)}mount(){Ki(this,un)._++,P(this,un)===1&&(B(this,gr,Oc.subscribe(async t=>{t&&(await this.resumePausedMutations(),P(this,be).onFocus())})),B(this,vr,io.subscribe(async t=>{t&&(await this.resumePausedMutations(),P(this,be).onOnline())})))}unmount(){var t,e;Ki(this,un)._--,P(this,un)===0&&((t=P(this,gr))==null||t.call(this),B(this,gr,void 0),(e=P(this,vr))==null||e.call(this),B(this,vr,void 0))}isFetching(t){return P(this,be).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return P(this,cn).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=P(this,be).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.getQueryData(t.queryKey);if(e===void 0)return this.fetchQuery(t);{const n=this.defaultQueryOptions(t),r=P(this,be).build(this,n);return t.revalidateIfStale&&r.isStaleByTime(ar(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(e)}}getQueriesData(t){return P(this,be).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),i=P(this,be).get(r.queryHash),s=i==null?void 0:i.state.data,o=Q4(e,s);if(o!==void 0)return P(this,be).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return Le.batch(()=>P(this,be).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=P(this,be).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=P(this,be);Le.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=P(this,be),r={type:"active",...t};return Le.batch(()=>(n.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries(r,e)))}cancelQueries(t={},e={}){const n={revert:!0,...e},r=Le.batch(()=>P(this,be).findAll(t).map(i=>i.cancel(n)));return Promise.all(r).then(tt).catch(tt)}invalidateQueries(t={},e={}){return Le.batch(()=>{if(P(this,be).findAll(t).forEach(r=>{r.invalidate()}),t.refetchType==="none")return Promise.resolve();const n={...t,type:t.refetchType??t.type??"active"};return this.refetchQueries(n,e)})}refetchQueries(t={},e){const n={...e,cancelRefetch:(e==null?void 0:e.cancelRefetch)??!0},r=Le.batch(()=>P(this,be).findAll(t).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(tt)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(tt)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=P(this,be).build(this,e);return n.isStaleByTime(ar(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(tt).catch(tt)}fetchInfiniteQuery(t){return t.behavior=bu(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(tt).catch(tt)}ensureInfiniteQueryData(t){return t.behavior=bu(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return io.isOnline()?P(this,cn).resumePausedMutations():Promise.resolve()}getQueryCache(){return P(this,be)}getMutationCache(){return P(this,cn)}getDefaultOptions(){return P(this,ln)}setDefaultOptions(t){B(this,ln,t)}setQueryDefaults(t,e){P(this,pr).set(bi(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...P(this,pr).values()];let n={};return e.forEach(r=>{wi(t,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(t,e){P(this,mr).set(bi(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...P(this,mr).values()];let n={};return e.forEach(r=>{wi(t,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...P(this,ln).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Ec(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.enabled!==!0&&e.queryFn===xc&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...P(this,ln).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){P(this,be).clear(),P(this,cn).clear()}},be=new WeakMap,cn=new WeakMap,ln=new WeakMap,pr=new WeakMap,mr=new WeakMap,un=new WeakMap,gr=new WeakMap,vr=new WeakMap,Ku),$e,Q,_i,Be,Tn,yr,dn,Et,Ei,br,wr,An,Rn,fn,Sr,Ln,ei,xi,$a,Oi,za,Pi,qa,Ti,Ga,Ai,Wa,Ri,Za,Li,Ka,oo,Oh,Qu,db=(Qu=class extends Bi{constructor(e,n){super();U(this,Ln);U(this,xi);U(this,Oi);U(this,Pi);U(this,Ti);U(this,Ai);U(this,Ri);U(this,Li);U(this,oo);U(this,$e,void 0);U(this,Q,void 0);U(this,_i,void 0);U(this,Be,void 0);U(this,Tn,void 0);U(this,yr,void 0);U(this,dn,void 0);U(this,Et,void 0);U(this,Ei,void 0);U(this,br,void 0);U(this,wr,void 0);U(this,An,void 0);U(this,Rn,void 0);U(this,fn,void 0);U(this,Sr,new Set);this.options=n,B(this,$e,e),B(this,Et,null),B(this,dn,Ua()),this.options.experimental_prefetchInRender||P(this,dn).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(P(this,Q).addObserver(this),Su(P(this,Q),this.options)?K(this,Ln,ei).call(this):this.updateResult(),K(this,Ti,Ga).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Qa(P(this,Q),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Qa(P(this,Q),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,K(this,Ai,Wa).call(this),K(this,Ri,Za).call(this),P(this,Q).removeObserver(this)}setOptions(e,n){const r=this.options,i=P(this,Q);if(this.options=P(this,$e).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ut(this.options.enabled,P(this,Q))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");K(this,Li,Ka).call(this),P(this,Q).setOptions(this.options),r._defaulted&&!Ba(this.options,r)&&P(this,$e).getQueryCache().notify({type:"observerOptionsUpdated",query:P(this,Q),observer:this});const s=this.hasListeners();s&&Cu(P(this,Q),i,this.options,r)&&K(this,Ln,ei).call(this),this.updateResult(n),s&&(P(this,Q)!==i||ut(this.options.enabled,P(this,Q))!==ut(r.enabled,P(this,Q))||ar(this.options.staleTime,P(this,Q))!==ar(r.staleTime,P(this,Q)))&&K(this,xi,$a).call(this);const o=K(this,Oi,za).call(this);s&&(P(this,Q)!==i||ut(this.options.enabled,P(this,Q))!==ut(r.enabled,P(this,Q))||o!==P(this,fn))&&K(this,Pi,qa).call(this,o)}getOptimisticResult(e){const n=P(this,$e).getQueryCache().build(P(this,$e),e),r=this.createResult(n,e);return hb(this,r)&&(B(this,Be,r),B(this,yr,this.options),B(this,Tn,P(this,Q).state)),r}getCurrentResult(){return P(this,Be)}trackResult(e,n){const r={};return Object.keys(e).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),e[i])})}),r}trackProp(e){P(this,Sr).add(e)}getCurrentQuery(){return P(this,Q)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=P(this,$e).defaultQueryOptions(e),r=P(this,$e).getQueryCache().build(P(this,$e),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(e){return K(this,Ln,ei).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),P(this,Be)))}createResult(e,n){var O;const r=P(this,Q),i=this.options,s=P(this,Be),o=P(this,Tn),a=P(this,yr),l=e!==r?e.state:P(this,_i),{state:u}=e;let d={...u},h=!1,v;if(n._optimisticResults){const T=this.hasListeners(),R=!T&&Su(e,n),L=T&&Cu(e,r,n,i);(R||L)&&(d={...d,...Eh(u.data,e.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:f,status:w}=d;if(n.select&&d.data!==void 0)if(s&&d.data===(o==null?void 0:o.data)&&n.select===P(this,Ei))v=P(this,br);else try{B(this,Ei,n.select),v=n.select(d.data),v=Ha(s==null?void 0:s.data,v,n),B(this,br,v),B(this,Et,null)}catch(T){B(this,Et,T)}else v=d.data;if(n.placeholderData!==void 0&&v===void 0&&w==="pending"){let T;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))T=s.data;else if(T=typeof n.placeholderData=="function"?n.placeholderData((O=P(this,wr))==null?void 0:O.state.data,P(this,wr)):n.placeholderData,n.select&&T!==void 0)try{T=n.select(T),B(this,Et,null)}catch(R){B(this,Et,R)}T!==void 0&&(w="success",v=Ha(s==null?void 0:s.data,T,n),h=!0)}P(this,Et)&&(m=P(this,Et),v=P(this,br),f=Date.now(),w="error");const y=d.fetchStatus==="fetching",C=w==="pending",b=w==="error",E=C&&y,x=v!==void 0,_={status:w,fetchStatus:d.fetchStatus,isPending:C,isSuccess:w==="success",isError:b,isInitialLoading:E,isLoading:E,data:v,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:f,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:y,isRefetching:y&&!C,isLoadingError:b&&!x,isPaused:d.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:b&&x,isStale:Pc(e,n),refetch:this.refetch,promise:P(this,dn)};if(this.options.experimental_prefetchInRender){const T=A=>{_.status==="error"?A.reject(_.error):_.data!==void 0&&A.resolve(_.data)},R=()=>{const A=B(this,dn,_.promise=Ua());T(A)},L=P(this,dn);switch(L.status){case"pending":e.queryHash===r.queryHash&&T(L);break;case"fulfilled":(_.status==="error"||_.data!==L.value)&&R();break;case"rejected":(_.status!=="error"||_.error!==L.reason)&&R();break}}return _}updateResult(e){const n=P(this,Be),r=this.createResult(P(this,Q),this.options);if(B(this,Tn,P(this,Q).state),B(this,yr,this.options),P(this,Tn).data!==void 0&&B(this,wr,P(this,Q)),Ba(r,n))return;B(this,Be,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!P(this,Sr).size)return!0;const c=new Set(a??P(this,Sr));return this.options.throwOnError&&c.add("error"),Object.keys(P(this,Be)).some(l=>{const u=l;return P(this,Be)[u]!==n[u]&&c.has(u)})};(e==null?void 0:e.listeners)!==!1&&s()&&(i.listeners=!0),K(this,oo,Oh).call(this,{...i,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&K(this,Ti,Ga).call(this)}},$e=new WeakMap,Q=new WeakMap,_i=new WeakMap,Be=new WeakMap,Tn=new WeakMap,yr=new WeakMap,dn=new WeakMap,Et=new WeakMap,Ei=new WeakMap,br=new WeakMap,wr=new WeakMap,An=new WeakMap,Rn=new WeakMap,fn=new WeakMap,Sr=new WeakMap,Ln=new WeakSet,ei=function(e){K(this,Li,Ka).call(this);let n=P(this,Q).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(tt)),n},xi=new WeakSet,$a=function(){K(this,Ai,Wa).call(this);const e=ar(this.options.staleTime,P(this,Q));if(In||P(this,Be).isStale||!Fa(e))return;const r=vh(P(this,Be).dataUpdatedAt,e)+1;B(this,An,setTimeout(()=>{P(this,Be).isStale||this.updateResult()},r))},Oi=new WeakSet,za=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(P(this,Q)):this.options.refetchInterval)??!1},Pi=new WeakSet,qa=function(e){K(this,Ri,Za).call(this),B(this,fn,e),!(In||ut(this.options.enabled,P(this,Q))===!1||!Fa(P(this,fn))||P(this,fn)===0)&&B(this,Rn,setInterval(()=>{(this.options.refetchIntervalInBackground||Oc.isFocused())&&K(this,Ln,ei).call(this)},P(this,fn)))},Ti=new WeakSet,Ga=function(){K(this,xi,$a).call(this),K(this,Pi,qa).call(this,K(this,Oi,za).call(this))},Ai=new WeakSet,Wa=function(){P(this,An)&&(clearTimeout(P(this,An)),B(this,An,void 0))},Ri=new WeakSet,Za=function(){P(this,Rn)&&(clearInterval(P(this,Rn)),B(this,Rn,void 0))},Li=new WeakSet,Ka=function(){const e=P(this,$e).getQueryCache().build(P(this,$e),this.options);if(e===P(this,Q))return;const n=P(this,Q);B(this,Q,e),B(this,_i,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},oo=new WeakSet,Oh=function(e){Le.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(P(this,Be))}),P(this,$e).getQueryCache().notify({query:P(this,Q),type:"observerResultsUpdated"})})},Qu);function fb(t,e){return ut(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function Su(t,e){return fb(t,e)||t.state.data!==void 0&&Qa(t,e,e.refetchOnMount)}function Qa(t,e,n){if(ut(e.enabled,t)!==!1){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&Pc(t,e)}return!1}function Cu(t,e,n,r){return(t!==e||ut(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&Pc(t,n)}function Pc(t,e){return ut(e.enabled,t)!==!1&&t.isStaleByTime(ar(e.staleTime,t))}function hb(t,e){return!Ba(t.getCurrentResult(),e)}var Ph=j.createContext(void 0),pb=t=>{const e=j.useContext(Ph);if(t)return t;if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Th=({client:t,children:e})=>(j.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),S.jsx(Ph.Provider,{value:t,children:e})),Ah=j.createContext(!1),mb=()=>j.useContext(Ah);Ah.Provider;function gb(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var vb=j.createContext(gb()),yb=()=>j.useContext(vb);function bb(t,e){return typeof t=="function"?t(...e):!!t}function wb(){}var Sb=(t,e)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(e.isReset()||(t.retryOnMount=!1))},Cb=t=>{j.useEffect(()=>{t.clearReset()},[t])},_b=({result:t,errorResetBoundary:e,throwOnError:n,query:r})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&bb(n,[t.error,r]),Eb=t=>{t.suspense&&(t.staleTime===void 0&&(t.staleTime=1e3),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3)))},xb=(t,e)=>t.isLoading&&t.isFetching&&!e,Ob=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,_u=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function Pb(t,e,n){var u,d,h,v,m;const r=pb(n),i=mb(),s=yb(),o=r.defaultQueryOptions(t);(d=(u=r.getDefaultOptions().queries)==null?void 0:u._experimental_beforeQuery)==null||d.call(u,o),o._optimisticResults=i?"isRestoring":"optimistic",Eb(o),Sb(o,s),Cb(s);const a=!r.getQueryCache().get(o.queryHash),[c]=j.useState(()=>new e(r,o)),l=c.getOptimisticResult(o);if(j.useSyncExternalStore(j.useCallback(f=>{const w=i?()=>{}:c.subscribe(Le.batchCalls(f));return c.updateResult(),w},[c,i]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),j.useEffect(()=>{c.setOptions(o,{listeners:!1})},[o,c]),Ob(o,l))throw _u(o,c,s);if(_b({result:l,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw l.error;if((v=(h=r.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||v.call(h,o,l),o.experimental_prefetchInRender&&!In&&xb(l,i)){const f=a?_u(o,c,s):(m=r.getQueryCache().get(o.queryHash))==null?void 0:m.promise;f==null||f.catch(wb).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?l:c.trackResult(l)}function Rh(t,e){return Pb(t,db,e)}async function Tb(t){return(await Se.request({method:"GET",baseURL:"https://erpru.omnic.solutions",url:`/lms/hs/lms_ecomgate/points?project=5e50288b-3806-11ed-a300-a2873e29cd09&code=${t}`})).data.data}function Ab(){const[t,e]=p.useState(""),{setLMSData:n,setLoading:r}=mo(),{data:i,isLoading:s}=Rh({queryKey:["lms-data",t],queryFn:()=>Tb(t),enabled:!!t,refetchOnWindowFocus:!1,retry:2});return p.useEffect(()=>{const o=i==null?void 0:i.results[0];o&&n(o)},[i,n]),p.useEffect(()=>{r(s)},[s,r]),{getLMSData:e}}var Rb=Object.getOwnPropertyNames,Lb=Object.getOwnPropertySymbols,kb=Object.prototype.hasOwnProperty;function Eu(t,e){return function(r,i,s){return t(r,i,s)&&e(r,i,s)}}function Ss(t){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return t(n,r,i);var s=i.cache,o=s.get(n),a=s.get(r);if(o&&a)return o===r&&a===n;s.set(n,r),s.set(r,n);var c=t(n,r,i);return s.delete(n),s.delete(r),c}}function Mb(t){return t!=null?t[Symbol.toStringTag]:void 0}function xu(t){return Rb(t).concat(Lb(t))}var Db=Object.hasOwn||function(t,e){return kb.call(t,e)};function Fn(t,e){return t===e||!t&&!e&&t!==t&&e!==e}var Nb="__v",jb="__o",Ib="_owner",Ou=Object.getOwnPropertyDescriptor,Pu=Object.keys;function Fb(t,e,n){var r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function Bb(t,e){return Fn(t.getTime(),e.getTime())}function Vb(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function Hb(t,e){return t===e}function Tu(t,e,n){var r=t.size;if(r!==e.size)return!1;if(!r)return!0;for(var i=new Array(r),s=t.entries(),o,a,c=0;(o=s.next())&&!o.done;){for(var l=e.entries(),u=!1,d=0;(a=l.next())&&!a.done;){if(i[d]){d++;continue}var h=o.value,v=a.value;if(n.equals(h[0],v[0],c,d,t,e,n)&&n.equals(h[1],v[1],h[0],v[0],t,e,n)){u=i[d]=!0;break}d++}if(!u)return!1;c++}return!0}var Ub=Fn;function $b(t,e,n){var r=Pu(t),i=r.length;if(Pu(e).length!==i)return!1;for(;i-- >0;)if(!Lh(t,e,n,r[i]))return!1;return!0}function qr(t,e,n){var r=xu(t),i=r.length;if(xu(e).length!==i)return!1;for(var s,o,a;i-- >0;)if(s=r[i],!Lh(t,e,n,s)||(o=Ou(t,s),a=Ou(e,s),(o||a)&&(!o||!a||o.configurable!==a.configurable||o.enumerable!==a.enumerable||o.writable!==a.writable)))return!1;return!0}function zb(t,e){return Fn(t.valueOf(),e.valueOf())}function qb(t,e){return t.source===e.source&&t.flags===e.flags}function Au(t,e,n){var r=t.size;if(r!==e.size)return!1;if(!r)return!0;for(var i=new Array(r),s=t.values(),o,a;(o=s.next())&&!o.done;){for(var c=e.values(),l=!1,u=0;(a=c.next())&&!a.done;){if(!i[u]&&n.equals(o.value,a.value,o.value,a.value,t,e,n)){l=i[u]=!0;break}u++}if(!l)return!1}return!0}function Gb(t,e){var n=t.length;if(e.length!==n)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}function Wb(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function Lh(t,e,n,r){return(r===Ib||r===jb||r===Nb)&&(t.$$typeof||e.$$typeof)?!0:Db(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}var Zb="[object Arguments]",Kb="[object Boolean]",Qb="[object Date]",Jb="[object Error]",Xb="[object Map]",Yb="[object Number]",e5="[object Object]",t5="[object RegExp]",n5="[object Set]",r5="[object String]",i5="[object URL]",s5=Array.isArray,Ru=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,Lu=Object.assign,o5=Object.prototype.toString.call.bind(Object.prototype.toString);function a5(t){var e=t.areArraysEqual,n=t.areDatesEqual,r=t.areErrorsEqual,i=t.areFunctionsEqual,s=t.areMapsEqual,o=t.areNumbersEqual,a=t.areObjectsEqual,c=t.arePrimitiveWrappersEqual,l=t.areRegExpsEqual,u=t.areSetsEqual,d=t.areTypedArraysEqual,h=t.areUrlsEqual,v=t.unknownTagComparators;return function(f,w,y){if(f===w)return!0;if(f==null||w==null)return!1;var C=typeof f;if(C!==typeof w)return!1;if(C!=="object")return C==="number"?o(f,w,y):C==="function"?i(f,w,y):!1;var b=f.constructor;if(b!==w.constructor)return!1;if(b===Object)return a(f,w,y);if(s5(f))return e(f,w,y);if(Ru!=null&&Ru(f))return d(f,w,y);if(b===Date)return n(f,w,y);if(b===RegExp)return l(f,w,y);if(b===Map)return s(f,w,y);if(b===Set)return u(f,w,y);var E=o5(f);if(E===Qb)return n(f,w,y);if(E===t5)return l(f,w,y);if(E===Xb)return s(f,w,y);if(E===n5)return u(f,w,y);if(E===e5)return typeof f.then!="function"&&typeof w.then!="function"&&a(f,w,y);if(E===i5)return h(f,w,y);if(E===Jb)return r(f,w,y);if(E===Zb)return a(f,w,y);if(E===Kb||E===Yb||E===r5)return c(f,w,y);if(v){var x=v[E];if(!x){var g=Mb(f);g&&(x=v[g])}if(x)return x(f,w,y)}return!1}}function c5(t){var e=t.circular,n=t.createCustomConfig,r=t.strict,i={areArraysEqual:r?qr:Fb,areDatesEqual:Bb,areErrorsEqual:Vb,areFunctionsEqual:Hb,areMapsEqual:r?Eu(Tu,qr):Tu,areNumbersEqual:Ub,areObjectsEqual:r?qr:$b,arePrimitiveWrappersEqual:zb,areRegExpsEqual:qb,areSetsEqual:r?Eu(Au,qr):Au,areTypedArraysEqual:r?qr:Gb,areUrlsEqual:Wb,unknownTagComparators:void 0};if(n&&(i=Lu({},i,n(i))),e){var s=Ss(i.areArraysEqual),o=Ss(i.areMapsEqual),a=Ss(i.areObjectsEqual),c=Ss(i.areSetsEqual);i=Lu({},i,{areArraysEqual:s,areMapsEqual:o,areObjectsEqual:a,areSetsEqual:c})}return i}function l5(t){return function(e,n,r,i,s,o,a){return t(e,n,a)}}function u5(t){var e=t.circular,n=t.comparator,r=t.createState,i=t.equals,s=t.strict;if(r)return function(c,l){var u=r(),d=u.cache,h=d===void 0?e?new WeakMap:void 0:d,v=u.meta;return n(c,l,{cache:h,equals:i,meta:v,strict:s})};if(e)return function(c,l){return n(c,l,{cache:new WeakMap,equals:i,meta:void 0,strict:s})};var o={cache:void 0,equals:i,meta:void 0,strict:s};return function(c,l){return n(c,l,o)}}var ku=gn();gn({strict:!0});gn({circular:!0});gn({circular:!0,strict:!0});gn({createInternalComparator:function(){return Fn}});gn({strict:!0,createInternalComparator:function(){return Fn}});gn({circular:!0,createInternalComparator:function(){return Fn}});gn({circular:!0,createInternalComparator:function(){return Fn},strict:!0});function gn(t){t===void 0&&(t={});var e=t.circular,n=e===void 0?!1:e,r=t.createInternalComparator,i=t.createState,s=t.strict,o=s===void 0?!1:s,a=c5(t),c=a5(a),l=r?r(c):l5(c);return u5({circular:n,comparator:c,createState:i,equals:l,strict:o})}const Mu=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Ko=1,Gr=8;class Tc{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[n,r]=new Uint8Array(e,0,2);if(n!==219)throw new Error("Data does not appear to be in a KDBush format.");const i=r>>4;if(i!==Ko)throw new Error(`Got v${i} data when expected v${Ko}.`);const s=Mu[r&15];if(!s)throw new Error("Unrecognized array type.");const[o]=new Uint16Array(e,2,1),[a]=new Uint32Array(e,4,1);return new Tc(a,o,s,e)}constructor(e,n=64,r=Float64Array,i){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const s=Mu.indexOf(this.ArrayType),o=e*2*this.ArrayType.BYTES_PER_ELEMENT,a=e*this.IndexArrayType.BYTES_PER_ELEMENT,c=(8-a%8)%8;if(s<0)throw new Error(`Unexpected typed array class: ${r}.`);i&&i instanceof ArrayBuffer?(this.data=i,this.ids=new this.IndexArrayType(this.data,Gr,e),this.coords=new this.ArrayType(this.data,Gr+a+c,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(Gr+o+a+c),this.ids=new this.IndexArrayType(this.data,Gr,e),this.coords=new this.ArrayType(this.data,Gr+a+c,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(Ko<<4)+s]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=e)}add(e,n){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=n,r}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return Ja(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,n,r,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:s,coords:o,nodeSize:a}=this,c=[0,s.length-1,0],l=[];for(;c.length;){const u=c.pop()||0,d=c.pop()||0,h=c.pop()||0;if(d-h<=a){for(let w=h;w<=d;w++){const y=o[2*w],C=o[2*w+1];y>=e&&y<=r&&C>=n&&C<=i&&l.push(s[w])}continue}const v=h+d>>1,m=o[2*v],f=o[2*v+1];m>=e&&m<=r&&f>=n&&f<=i&&l.push(s[v]),(u===0?e<=m:n<=f)&&(c.push(h),c.push(v-1),c.push(1-u)),(u===0?r>=m:i>=f)&&(c.push(v+1),c.push(d),c.push(1-u))}return l}within(e,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:s,nodeSize:o}=this,a=[0,i.length-1,0],c=[],l=r*r;for(;a.length;){const u=a.pop()||0,d=a.pop()||0,h=a.pop()||0;if(d-h<=o){for(let w=h;w<=d;w++)Du(s[2*w],s[2*w+1],e,n)<=l&&c.push(i[w]);continue}const v=h+d>>1,m=s[2*v],f=s[2*v+1];Du(m,f,e,n)<=l&&c.push(i[v]),(u===0?e-r<=m:n-r<=f)&&(a.push(h),a.push(v-1),a.push(1-u)),(u===0?e+r>=m:n+r>=f)&&(a.push(v+1),a.push(d),a.push(1-u))}return c}}function Ja(t,e,n,r,i,s){if(i-r<=n)return;const o=r+i>>1;kh(t,e,o,r,i,s),Ja(t,e,n,r,o-1,1-s),Ja(t,e,n,o+1,i,1-s)}function kh(t,e,n,r,i,s){for(;i>r;){if(i-r>600){const l=i-r+1,u=n-r+1,d=Math.log(l),h=.5*Math.exp(2*d/3),v=.5*Math.sqrt(d*h*(l-h)/l)*(u-l/2<0?-1:1),m=Math.max(r,Math.floor(n-u*h/l+v)),f=Math.min(i,Math.floor(n+(l-u)*h/l+v));kh(t,e,n,m,f,s)}const o=e[2*n+s];let a=r,c=i;for(Wr(t,e,r,n),e[2*i+s]>o&&Wr(t,e,r,i);a<c;){for(Wr(t,e,a,c),a++,c--;e[2*a+s]<o;)a++;for(;e[2*c+s]>o;)c--}e[2*r+s]===o?Wr(t,e,r,c):(c++,Wr(t,e,c,i)),c<=n&&(r=c+1),n<=c&&(i=c-1)}}function Wr(t,e,n,r){Qo(t,n,r),Qo(e,2*n,2*r),Qo(e,2*n+1,2*r+1)}function Qo(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Du(t,e,n,r){const i=t-n,s=e-r;return i*i+s*s}const d5={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},Nu=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),bn=2,en=3,Jo=4,Xt=5,Mh=6;class f5{constructor(e){this.options=Object.assign(Object.create(d5),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:n,minZoom:r,maxZoom:i}=this.options;n&&console.time("total time");const s=`prepare ${e.length} points`;n&&console.time(s),this.points=e;const o=[];for(let c=0;c<e.length;c++){const l=e[c];if(!l.geometry)continue;const[u,d]=l.geometry.coordinates,h=Nu(Cs(u)),v=Nu(_s(d));o.push(h,v,1/0,c,-1,1),this.options.reduce&&o.push(0)}let a=this.trees[i+1]=this._createTree(o);n&&console.timeEnd(s);for(let c=i;c>=r;c--){const l=+Date.now();a=this.trees[c]=this._createTree(this._cluster(a,c)),n&&console.log("z%d: %d clusters in %dms",c,a.numItems,+Date.now()-l)}return n&&console.timeEnd("total time"),this}getClusters(e,n){let r=((e[0]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[1]));let s=e[2]===180?180:((e[2]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,s=180;else if(r>s){const d=this.getClusters([r,i,180,o],n),h=this.getClusters([-180,i,s,o],n);return d.concat(h)}const a=this.trees[this._limitZoom(n)],c=a.range(Cs(r),_s(o),Cs(s),_s(i)),l=a.data,u=[];for(const d of c){const h=this.stride*d;u.push(l[h+Xt]>1?ju(l,h,this.clusterProps):this.points[l[h+en]])}return u}getChildren(e){const n=this._getOriginId(e),r=this._getOriginZoom(e),i="No cluster with the specified id.",s=this.trees[r];if(!s)throw new Error(i);const o=s.data;if(n*this.stride>=o.length)throw new Error(i);const a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),c=o[n*this.stride],l=o[n*this.stride+1],u=s.within(c,l,a),d=[];for(const h of u){const v=h*this.stride;o[v+Jo]===e&&d.push(o[v+Xt]>1?ju(o,v,this.clusterProps):this.points[o[v+en]])}if(d.length===0)throw new Error(i);return d}getLeaves(e,n,r){n=n||10,r=r||0;const i=[];return this._appendLeaves(i,e,n,r,0),i}getTile(e,n,r){const i=this.trees[this._limitZoom(e)],s=Math.pow(2,e),{extent:o,radius:a}=this.options,c=a/o,l=(r-c)/s,u=(r+1+c)/s,d={features:[]};return this._addTileFeatures(i.range((n-c)/s,l,(n+1+c)/s,u),i.data,n,r,s,d),n===0&&this._addTileFeatures(i.range(1-c/s,l,1,u),i.data,s,r,s,d),n===s-1&&this._addTileFeatures(i.range(0,l,c/s,u),i.data,-1,r,s,d),d.features.length?d:null}getClusterExpansionZoom(e){let n=this._getOriginZoom(e)-1;for(;n<=this.options.maxZoom;){const r=this.getChildren(e);if(n++,r.length!==1)break;e=r[0].properties.cluster_id}return n}_appendLeaves(e,n,r,i,s){const o=this.getChildren(n);for(const a of o){const c=a.properties;if(c&&c.cluster?s+c.point_count<=i?s+=c.point_count:s=this._appendLeaves(e,c.cluster_id,r,i,s):s<i?s++:e.push(a),e.length===r)break}return s}_createTree(e){const n=new Tc(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<e.length;r+=this.stride)n.add(e[r],e[r+1]);return n.finish(),n.data=e,n}_addTileFeatures(e,n,r,i,s,o){for(const a of e){const c=a*this.stride,l=n[c+Xt]>1;let u,d,h;if(l)u=Dh(n,c,this.clusterProps),d=n[c],h=n[c+1];else{const f=this.points[n[c+en]];u=f.properties;const[w,y]=f.geometry.coordinates;d=Cs(w),h=_s(y)}const v={type:1,geometry:[[Math.round(this.options.extent*(d*s-r)),Math.round(this.options.extent*(h*s-i))]],tags:u};let m;l||this.options.generateId?m=n[c+en]:m=this.points[n[c+en]].id,m!==void 0&&(v.id=m),o.features.push(v)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,n){const{radius:r,extent:i,reduce:s,minPoints:o}=this.options,a=r/(i*Math.pow(2,n)),c=e.data,l=[],u=this.stride;for(let d=0;d<c.length;d+=u){if(c[d+bn]<=n)continue;c[d+bn]=n;const h=c[d],v=c[d+1],m=e.within(c[d],c[d+1],a),f=c[d+Xt];let w=f;for(const y of m){const C=y*u;c[C+bn]>n&&(w+=c[C+Xt])}if(w>f&&w>=o){let y=h*f,C=v*f,b,E=-1;const x=((d/u|0)<<5)+(n+1)+this.points.length;for(const g of m){const _=g*u;if(c[_+bn]<=n)continue;c[_+bn]=n;const O=c[_+Xt];y+=c[_]*O,C+=c[_+1]*O,c[_+Jo]=x,s&&(b||(b=this._map(c,d,!0),E=this.clusterProps.length,this.clusterProps.push(b)),s(b,this._map(c,_)))}c[d+Jo]=x,l.push(y/w,C/w,1/0,x,-1,w),s&&l.push(E)}else{for(let y=0;y<u;y++)l.push(c[d+y]);if(w>1)for(const y of m){const C=y*u;if(!(c[C+bn]<=n)){c[C+bn]=n;for(let b=0;b<u;b++)l.push(c[C+b])}}}}return l}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,n,r){if(e[n+Xt]>1){const o=this.clusterProps[e[n+Mh]];return r?Object.assign({},o):o}const i=this.points[e[n+en]].properties,s=this.options.map(i);return r&&s===i?Object.assign({},s):s}}function ju(t,e,n){return{type:"Feature",id:t[e+en],properties:Dh(t,e,n),geometry:{type:"Point",coordinates:[h5(t[e]),p5(t[e+1])]}}}function Dh(t,e,n){const r=t[e+Xt],i=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,s=t[e+Mh],o=s===-1?{}:Object.assign({},n[s]);return Object.assign(o,{cluster:!0,cluster_id:t[e+en],point_count:r,point_count_abbreviated:i})}function Cs(t){return t/360+.5}function _s(t){const e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function h5(t){return(t-.5)*360}function p5(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function m5(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}class qe{static isAdvancedMarkerAvailable(e){return google.maps.marker&&e.getMapCapabilities().isAdvancedMarkersAvailable===!0}static isAdvancedMarker(e){return google.maps.marker&&e instanceof google.maps.marker.AdvancedMarkerElement}static setMap(e,n){this.isAdvancedMarker(e)?e.map=n:e.setMap(n)}static getPosition(e){if(this.isAdvancedMarker(e)){if(e.position){if(e.position instanceof google.maps.LatLng)return e.position;if(Number.isFinite(e.position.lat)&&Number.isFinite(e.position.lng))return new google.maps.LatLng(e.position.lat,e.position.lng)}return new google.maps.LatLng(null)}return e.getPosition()}static getVisible(e){return this.isAdvancedMarker(e)?!0:e.getVisible()}}class Xa{constructor({markers:e,position:n}){this.markers=[],e&&(this.markers=e),n&&(n instanceof google.maps.LatLng?this._position=n:this._position=new google.maps.LatLng(n))}get bounds(){if(this.markers.length===0&&!this._position)return;const e=new google.maps.LatLngBounds(this._position,this._position);for(const n of this.markers)e.extend(qe.getPosition(n));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>qe.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(qe.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}function Ya(t,e="assertion failed"){if(t==null)throw Error(e)}class g5{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return v5(e)}}const v5=t=>t.map(n=>new Xa({position:qe.getPosition(n),markers:[n]}));class y5 extends g5{constructor(e){var{maxZoom:n,radius:r=60}=e,i=m5(e,["maxZoom","radius"]);super({maxZoom:n}),this.markers=[],this.clusters=[],this.state={zoom:-1},this.superCluster=new f5(Object.assign({maxZoom:this.maxZoom,radius:r},i))}calculate(e){let n=!1,r=e.map.getZoom();Ya(r),r=Math.round(r);const i={zoom:r};if(!ku(e.markers,this.markers)){n=!0,this.markers=[...e.markers];const s=this.markers.map(o=>{const a=qe.getPosition(o);return{type:"Feature",geometry:{type:"Point",coordinates:[a.lng(),a.lat()]},properties:{marker:o}}});this.superCluster.load(s)}return n||(this.state.zoom<=this.maxZoom||i.zoom<=this.maxZoom)&&(n=!ku(this.state,i)),this.state=i,e.markers.length===0?(this.clusters=[],{clusters:this.clusters,changed:n}):(n&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:n})}cluster({map:e}){const n=e.getZoom();return Ya(n),this.superCluster.getClusters([-180,-90,180,90],Math.round(n)).map(r=>this.transformCluster(r))}transformCluster({geometry:{coordinates:[e,n]},properties:r}){if(r.cluster)return new Xa({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(s=>s.properties.marker),position:{lat:n,lng:e}});const i=r.marker;return new Xa({markers:[i],position:qe.getPosition(i)})}}class b5{constructor(e,n){this.markers={sum:e.length};const r=n.map(s=>s.count),i=r.reduce((s,o)=>s+o,0);this.clusters={count:n.length,markers:{mean:i/n.length,sum:i,min:Math.min(...r),max:Math.max(...r)}}}}class w5{render({count:e,position:n},r,i){const o=`<svg fill="${e>Math.max(10,r.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
225
225
  <circle cx="120" cy="120" opacity=".6" r="70" />
226
226
  <circle cx="120" cy="120" opacity=".3" r="90" />
227
227
  <circle cx="120" cy="120" opacity=".2" r="110" />
228
228
  <text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${e}</text>
229
- </svg>`,a=`Cluster of ${e} markers`,c=Number(google.maps.Marker.MAX_ZINDEX)+e;if(qe.isAdvancedMarkerAvailable(i)){const d=new DOMParser().parseFromString(o,"image/svg+xml").documentElement;d.setAttribute("transform","translate(0 25)");const h={map:i,position:n,zIndex:c,title:a,content:d};return new google.maps.marker.AdvancedMarkerElement(h)}const l={position:n,zIndex:c,title:a,icon:{url:`data:image/svg+xml;base64,${btoa(o)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(l)}}function S5(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class Ac{constructor(){S5(Ac,google.maps.OverlayView)}}var Cn;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click",t.GMP_CLICK="gmp-click"})(Cn||(Cn={}));const C5=(t,e,n)=>{e.bounds&&n.fitBounds(e.bounds)};class _5 extends Ac{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new y5(r),renderer:s=new w5,onClusterClick:o=C5}){super(),this.map=null,this.idleListener=null,this.markers=[...n],this.clusters=[],this.algorithm=i,this.renderer=s,this.onClusterClick=o,e&&this.setMap(e)}addMarker(e,n){this.markers.includes(e)||(this.markers.push(e),n||this.render())}addMarkers(e,n){e.forEach(r=>{this.addMarker(r,!0)}),n||this.render()}removeMarker(e,n){const r=this.markers.indexOf(e);return r===-1?!1:(qe.setMap(e,null),this.markers.splice(r,1),n||this.render(),!0)}removeMarkers(e,n){let r=!1;return e.forEach(i=>{r=this.removeMarker(i,!0)||r}),r&&!n&&this.render(),r}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,Cn.CLUSTERING_BEGIN,this);const{clusters:n,changed:r}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(r||r==null){const i=new Set;for(const o of n)o.markers.length==1&&i.add(o.markers[0]);const s=[];for(const o of this.clusters)o.marker!=null&&(o.markers.length==1?i.has(o.marker)||qe.setMap(o.marker,null):s.push(o.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>s.forEach(o=>qe.setMap(o,null)))}google.maps.event.trigger(this,Cn.CLUSTERING_END,this)}}onAdd(){const e=this.getMap();Ya(e),this.idleListener=e.addListener("idle",this.render.bind(this)),this.render()}onRemove(){this.idleListener&&google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>qe.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new b5(this.markers,this.clusters),n=this.getMap();this.clusters.forEach(r=>{if(r.markers.length===1)r.marker=r.markers[0];else if(r.marker=this.renderer.render(r,e,n),r.markers.forEach(i=>qe.setMap(i,null)),this.onClusterClick){const i=qe.isAdvancedMarker(r.marker)?Cn.GMP_CLICK:Cn.CLUSTER_CLICK;r.marker.addListener(i,s=>{google.maps.event.trigger(this,Cn.CLUSTER_CLICK,r),this.onClusterClick(s,r,n)})}qe.setMap(r.marker,n)})}}const E5="LocationBalloon-module__root__GtUl6q",x5="LocationBalloon-module__submit__lNcF4k",O5="LocationBalloon-module__details__--VOKk",P5="LocationBalloon-module__icon__X7DOVA",T5="LocationBalloon-module__header__5VQJDW",A5="LocationBalloon-module__titleContainer__BAO73U",L5="LocationBalloon-module__title__bX9pf8",R5="LocationBalloon-module__description__htav7b",k5="LocationBalloon-module__actions__c8dlOR",M5="LocationBalloon-module__close__7Ujvya",bt={root:E5,submit:x5,details:O5,icon:P5,header:T5,titleContainer:A5,title:L5,description:R5,actions:k5,close:M5},D5={default:Yd,llama:ef},N5=({SSR:t,className:e,hideDetails:n,location:r,location_name:i,name:s,onCloseClick:o,onDetails:a,onSubmit:c})=>{var f;const{logo:l="default"}=_e(),{isLoading:u,lmsData:d}=mo(),h=(f=d==null?void 0:d.location)==null?void 0:f.what3words,v=!!(h!=null&&h.id),m=D5[l];return S.jsxs("div",{className:J(bt.root,e),children:[S.jsxs("div",{className:bt.header,children:[S.jsxs("div",{className:bt.titleContainer,children:[u?S.jsx(Ze,{circle:!0,width:40,height:40}):S.jsx("div",{className:bt.icon,children:S.jsx(m,{})}),u?S.jsx(Ze,{width:200}):S.jsx("span",{className:bt.title,children:s||"{{ properties.point.name }}"})]}),S.jsx("div",{className:bt.close,children:S.jsx(Lr,{position:"relative",onClick:o})})]}),S.jsxs("div",{className:bt.description,children:[u?S.jsx(Ze,{width:300}):(r==null?void 0:r.full_address)||"{{ properties.point.location.full_address }}"," ",u?S.jsx(Ze,{width:300}):i||"{{ properties.point.location_name }}"]}),u?S.jsx(Ze,{width:150}):v&&S.jsx(pf,{what3words:h}),S.jsxs("div",{className:bt.actions,children:[S.jsx(rt,{id:op,variant:"primary",className:bt.submit,disabled:u,onClick:c,children:t?"{ choose }":S.jsx(It,{keyName:"choose",ns:"common"})}),!n&&S.jsxs(rt,{id:ed,as:"link",variant:"primary",className:bt.details,disabled:u,onClick:a,children:[t?"{ details }":S.jsx(It,{keyName:"details",ns:"common"}),S.jsx(_c,{})]})]})]})},j5=({handleCloseClick:t,handleDetailsClick:e,handlePointClick:n,handleSubmitClick:r,point:i,setMarkerRef:s})=>{const[o,a]=p.useState(!1),{hideDetails:c,iconType:l,palette:u}=_e(),d=p.useRef(null),{closeSamePoints:h}=Pt(),v=it(O=>O.location),m=(u==null?void 0:u.primary)||"#fc0",f=l==="omni-llama"?We.PinLlama:We.PinOmnic,w=!!i&&(v==null?void 0:v.uid)===i.uid,y=Bn("screenSm"),{isIdle:C}=te(),b=fc({isSelectedPoint:w}),E=C&&w&&b&&o;p.useEffect(()=>{d.current&&a(d.current.checkVisibility()??!1)},[i]);const x=p.useMemo(()=>{let O;if(i.type===30)switch(l){case"omni-llama":{w?O=We.PinLlamaSelected:O=We.PinLlama;break}case"we-chip":{w?O=We.PinWeChipSelected:O=We.PinWeChip;break}default:{w?O=We.PinOmnicSelected:O=ir(f,m);break}}else w?O=ir(We.PinPvz,"--owl-color-black"):O=ir(We.PinPvz,"--owl-color-grey-80");return xt(O,"Icon url is not defined"),O},[i.type,w,l,f,m]),g=p.useMemo(()=>({lat:i.location.latitude,lng:i.location.longitude}),[i.location.latitude,i.location.longitude]),_=()=>{h(),n(i)};return S.jsxs(S.Fragment,{children:[S.jsx(dc,{ref:O=>{d.current=O,s(O)},position:g,zIndex:w?9999:void 0,onClick:_,children:S.jsx("span",{dangerouslySetInnerHTML:{__html:x}})},i.uid),E&&!y&&S.jsx(Xd,{anchor:d.current||void 0,onCloseClick:t,children:S.jsx(N5,{...i,hideDetails:c,className:Re.balloon,onCloseClick:t,onSubmit:()=>r(i),onDetails:()=>e(i)})})]})},I5=({handleCloseClick:t,points:e,...n})=>{const{setSamePoints:r}=Pt(),{onSamePointsClusterClick:i}=_e(),s=ji(),o=p.useMemo(()=>(v,m)=>{if(!m)return;t();const f=m.markers??[],w=f.map(E=>{const x=E.position;if(!x)return{lat:NaN,lng:NaN};const g=typeof x.lat=="number"?x.lat:x.lat(),_=typeof x.lng=="number"?x.lng:x.lng();return{lat:g,lng:_}});if(!w.length)return;const{lat:y,lng:C}=w[0];if(w.every(E=>E.lat===y&&E.lng===C)){const E=e.filter(({location:{latitude:x,longitude:g}})=>x===y&&g===C);r(E),i==null||i(E);return}if(s instanceof google.maps.Map){const E=new google.maps.LatLngBounds;for(const x of f){const g=x.position;if(!g)continue;const _=(typeof g.lat=="number",g);E.extend(_)}s.fitBounds(E,150)}},[s,e,t,i,r]),a=p.useMemo(()=>({render:({count:v,position:m})=>{const f=document.createElement("div");return f.className=Re.cluster,f.innerHTML=`<span class="${Re.number}">${v}</span>`,new google.maps.marker.AdvancedMarkerElement({position:m,content:f,zIndex:v})}}),[]),c=p.useRef(new _5({renderer:a,map:null,onClusterClick:o})),l=p.useRef([]),[u,d]=p.useState([]);p.useEffect(()=>{d([]),c.current.clearMarkers()},[e,s]),p.useEffect(()=>{c.current.setMap(null),s&&c.current.setMap(s)},[s]),p.useEffect(()=>{!s||!u.length||c.current.addMarkers(u)},[u,s]);function h(v){u.length||d(v)}return S.jsx(S.Fragment,{children:e.map((v,m)=>{const f=m===0,w=m===e.length-1;return f&&(l.current=[]),S.jsx(j5,{point:v,handleCloseClick:t,setMarkerRef:y=>{y&&(l.current.push(y),w&&h([...l.current]))},...n},v.uid)})})},F5=p.memo(I5),B5=t=>{const e=Pt(Em);return S.jsx(F5,{points:e,...t})},V5=p.memo(B5),Nh=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:42,height:42,fill:"none",viewBox:"0 0 42 42",...t},N.createElement("rect",{width:42,height:42,fill:"#fff",rx:21}),N.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M31.003 28V17.766a3 3 0 0 0-1.579-2.643l-7.003-3.765a3 3 0 0 0-2.842 0l-7.003 3.765a3 3 0 0 0-1.58 2.643V28a3 3 0 0 0 3 3h14.008a3 3 0 0 0 3-3Zm-5.919 1h2.92a1 1 0 0 0 1-1V17.766a1 1 0 0 0-.527-.881l-7.003-3.766a1 1 0 0 0-.948 0l-7.003 3.766a1 1 0 0 0-.527.88v10.237a1 1 0 0 0 1 1h2.92a2.513 2.513 0 0 1-.05-.5v-7.606a2.5 2.5 0 0 1 2.5-2.5h3.268a2.5 2.5 0 0 1 2.5 2.5V28.5c0 .171-.017.338-.05.5Zm-2.426 0a.5.5 0 0 0 .476-.499v-7.606a.5.5 0 0 0-.5-.5h-3.269a.5.5 0 0 0-.5.5V28.5a.5.5 0 0 0 .476.5h3.317Z",clipRule:"evenodd"}),N.createElement("rect",{width:41,height:41,x:.5,y:.5,stroke:"#1D3665",strokeOpacity:.1,rx:20.5})),H5="DeliveryBalloon-module__root__Nu90iy",U5="DeliveryBalloon-module__details__eqUTaI",$5="DeliveryBalloon-module__wh__1lJtLN",z5="DeliveryBalloon-module__header__JVdyxN",q5="DeliveryBalloon-module__title__-zKKCt",G5="DeliveryBalloon-module__description__no5-ki",W5="DeliveryBalloon-module__actions__C-N0H-",Z5="DeliveryBalloon-module__errorVariant__e6uhZl",K5="DeliveryBalloon-module__logo__62gC5h",Mt={root:H5,details:U5,wh:$5,header:z5,title:q5,description:G5,actions:W5,errorVariant:Z5,logo:K5},Q5=({SSR:t,address:e,className:n,hasCloseButton:r,hideDetails:i,onClose:s,onDetails:o,variant:a})=>{const{onWarehouseSelect:c,warehouseSelection:l}=_e(),{setWarehousePoint:u,warehousePoint:d}=Le(),h=a==="error",v=a==="default",m=function(){return l?t?"{ courier_balloon.warehouse_title }":S.jsx(It,{keyName:"warehouse_title",ns:"courier_balloon"}):t?"{ courier_balloon.title }":S.jsx(It,{keyName:"title",ns:"courier_balloon"})}(),f=t?"{ courier_balloon.error_title }":S.jsx(It,{keyName:"error_title",ns:"courier_balloon"}),w=t?"{ courier_balloon.error_description }":S.jsx(It,{keyName:"error_description",ns:"courier_balloon"});function y(){d&&(c==null||c(d),u(null))}const{label:C,onClick:b}=l?{onClick:y,label:t?"{ select }":S.jsx(It,{keyName:"select",ns:"common"})}:{onClick:o,label:t?"{ details }":S.jsx(It,{keyName:"details",ns:"common"})};return S.jsxs("div",{className:J(Mt.root,n,Mt[`${a}Variant`]),children:[S.jsxs("div",{className:Mt.header,children:[S.jsx(Nh,{className:Mt.logo}),S.jsx("span",{className:Mt.title,children:h?f:m}),r&&S.jsx(Lr,{onClick:s})]}),S.jsx("div",{className:Mt.description,children:h?w:e||"{{ properties.address }}"}),v&&(!i||l)&&S.jsx("div",{className:Mt.actions,children:S.jsx(rt,{id:ed,as:"button",variant:"primary",className:J(Mt.details,l?Mt.wh:""),onClick:b,children:C})})]})},J5="Chip-module__root__zsoSyP",X5="Chip-module__active__BlTSFB",Iu={root:J5,active:X5},Fu=({active:t,children:e,className:n,...r})=>S.jsx("div",{...r,className:J(Iu.root,n,{[Iu.active]:t}),children:e}),Y5="TextArea-module__root__8YFknR",e6={root:Y5},Bu=p.forwardRef(({className:t,inputRef:e,onBlur:n,onChange:r,onFocus:i,...s},o)=>{const a=p.useRef(null);p.useImperativeHandle(o,()=>({focus:()=>{var l,u;(l=a.current)==null||l.focus(),i&&i({target:{value:(u=a.current)==null?void 0:u.value}})},blur:()=>{var l,u;(l=a.current)==null||l.blur(),n&&n({target:{value:(u=a.current)==null?void 0:u.value}})},setValue:l=>{r&&r({target:{value:l}}),a.current&&(a.current.value=l)}}),[n,r,i]);const c=Vh(e,a);return S.jsx("textarea",{...s,ref:c,className:J(e6.root,t),onBlur:n,onFocus:i,onChange:r})}),t6=({hideDeliveryTime:t,set:e})=>(n,r)=>{let i={...n};switch(r.type){case"SET_COMMENT":{i={...n,comment:r.payload};break}case"SET_DELIVERY_TIME":{i={...n,delivery_time:r.payload};break}case"SET_APARTMENT_NUMBER":{i={...n,apartment_number:r.payload};break}}return i.meta={...i.meta,valid:(t||!!i.delivery_time)&&!!i.apartment_number},e==null||e(i),i},n6="DeliveryDetailsView-module__title__azeoUr",r6="DeliveryDetailsView-module__logo__4zZtpM",i6="DeliveryDetailsView-module__header__oDE9He",s6="DeliveryDetailsView-module__content__6P27SY",o6="DeliveryDetailsView-module__section__2M3Qip",a6="DeliveryDetailsView-module__chips__KmYgha",c6="DeliveryDetailsView-module__actions__43XZ-V",l6="DeliveryDetailsView-module__submit__58LKBw",u6="DeliveryDetailsView-module__actionsHidden__SW-67b",d6="DeliveryDetailsView-module__commentSection__GlX1A2",f6="DeliveryDetailsView-module__comment__2pGG6h",Ue={title:n6,logo:r6,header:i6,content:s6,section:o6,chips:a6,actions:c6,submit:l6,actionsHidden:u6,commentSection:d6,comment:f6},h6=p.forwardRef(({classes:t,hideActions:e,location:n,onChange:r,onClose:i,onSubmit:s},o)=>{var g;const{hideDeliveryTime:a,inputs:c,locale:l}=_e(),{t:u}=mt(["details_modal","courier_balloon","common"]),d=p.useMemo(()=>t6({set:r,hideDeliveryTime:a}),[a,r]),[h,v]=p.useState(!1),[m,f]=p.useReducer(d,{comment:"",delivery_time:"",apartment_number:"",...n}),w=p.useCallback(async()=>{v(!0);try{xt(n.address,"Address is required");const _=await qh({address:n.address,algorithm:10,service:10,language:l||td});if(!Rd(_))return;const O=_==null?void 0:_.data.data,T={...m,address:O};return s==null||s(T),T}finally{v(!1)}},[l,n.address,s,m]);p.useImperativeHandle(o,()=>({submit:w}),[w]);const y=_=>()=>{f({payload:_,type:"SET_DELIVERY_TIME"})},C=_=>{f({payload:_.target.value,type:"SET_APARTMENT_NUMBER"})},b=_=>{f({payload:_.target.value,type:"SET_COMMENT"})},E=so(c==null?void 0:c.apartment),x=so(c==null?void 0:c.comment);return S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:J(Ue.header,t==null?void 0:t.header),children:[S.jsx(Lr,{onClick:i}),S.jsxs("div",{className:Ue.title,children:[S.jsx(Nh,{className:Ue.logo}),S.jsx("span",{children:u("title",{ns:"courier_balloon"})})]})]}),S.jsxs("div",{className:J(Ue.content,t==null?void 0:t.content),children:[S.jsxs("section",{className:Ue.section,children:[S.jsxs("span",{children:[u("address"),":"]}),S.jsx("p",{children:n.address})]}),!a&&S.jsxs("section",{className:Ue.section,children:[S.jsxs("span",{children:[u("delivery_time"),":"]}),S.jsxs("div",{className:Ue.chips,children:[S.jsx(Fu,{active:m.delivery_time==="8:00-13:00",onClick:y("8:00-13:00"),children:"8:00 - 13:00"}),S.jsx(Fu,{active:m.delivery_time==="14:00-22:00",onClick:y("14:00-22:00"),children:"14:00 - 22:00"})]})]}),S.jsxs("section",{className:Ue.section,children:[S.jsxs("span",{children:[u("apartment_number"),":"]}),S.jsx(Bu,{...E,rows:1,onChange:C})]}),S.jsxs("section",{className:J(Ue.section,Ue.commentSection),children:[S.jsxs("span",{children:[u("comment"),":"]}),S.jsx(Bu,{...x,className:Ue.comment,onChange:b})]})]}),S.jsx("div",{className:J(Ue.actions,{[Ue.actionsHidden]:e}),children:S.jsx(rt,{loading:h,disabled:!((g=m.meta)!=null&&g.valid)||h,variant:"primary",className:Ue.submit,onClick:w,children:u("choose",{ns:"common"})})})]})}),jh=p.memo(h6),p6={header:Re.deliveryDetailsViewHeader,content:Re.deliveryDetailsViewContent},m6=({hideDeliveryTime:t,hideDetails:e,onPointClick:n,point:r,setDeliveryPoint:i,setOpenDetails:s})=>{var R;const[o,a]=p.useState(!1),[c,l]=p.useState(!1),[u,d]=p.useState({...r,comment:"",delivery_time:"",apartment_number:""}),h=p.useRef(null),v=p.useRef(null),{warehouseSelection:m}=_e(),{warehousePoint:f}=Le(),w=fc({isSelectedPoint:!0}),y=((R=h.current)==null?void 0:R.checkVisibility())??!1;p.useEffect(()=>{setTimeout(()=>{a(!0)},100)},[]),p.useEffect(()=>{d({...r,comment:"",delivery_time:"",apartment_number:""})},[r]);const C=Bn("screenSm"),b=p.useMemo(()=>({lat:u.coords[0],lng:u.coords[1]}),[u.coords]),E=()=>{s==null||s(!0)},x=()=>{i==null||i(null)},g=p.useMemo(()=>ir(We.PinHome,"--owl-color-success"),[]),_=async()=>{var A;try{l(!0);const M=await((A=v.current)==null?void 0:A.submit());if(!M)return;n==null||n(M),s==null||s(!1),i==null||i(null)}finally{l(!1)}},O=S.jsx(Q5,{...u,hideDetails:e,hasCloseButton:C,variant:u.address?"default":"error",className:Re.balloon,onDetails:E,onClose:x}),T=m?!!f&&y:w&&!y,L=t?!!u.apartment_number:!!u.apartment_number&&!!u.delivery_time;return S.jsxs(S.Fragment,{children:[S.jsx(dc,{ref:h,position:b,children:S.jsx("span",{dangerouslySetInnerHTML:{__html:g}})}),C&&S.jsxs(ph,{minSnapHeight:u.address?200:void 0,submitDisabled:!L||c,submitLoading:c,hideFooter:!u.address,open:T,onDismiss:x,onSubmitClick:_,children:[u.address&&S.jsx(jh,{ref:v,hideActions:!0,classes:p6,location:r,onChange:d,onClose:x}),u.address?null:O]}),!C&&T&&S.jsx(Xd,{anchor:h.current||void 0,onCloseClick:x,children:O})]})},g6=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:48,height:66,viewBox:"0 0 48 66",fill:"none",...t},N.createElement("path",{d:"M23.999 66C35.0452 66 44 63.3137 44 59.9999C44 56.6863 35.0452 54 23.999 54C12.9548 54 4 56.6863 4 59.9999C4 63.3137 12.9548 66 23.999 66Z",fill:"url(#paint0_radial_2882_25472)",fillOpacity:.4}),N.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24 0C35.2114 0 48 8.2877 48 24.0882C48 34.5995 40.0114 48.4107 24 60C7.98857 48.4107 0 34.5995 0 24.0882C0 8.2877 12.7886 0 24 0Z",fill:"#cc0000"}),N.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.0042 24.2835C9.80882 16.3692 16.4453 10 24.2856 10C31.7119 10.1904 37.8053 16.1895 37.9957 23.7122C38.1861 31.4253 31.9975 37.8053 24.2856 37.9957C16.5736 38.1862 10.1946 31.9966 10.0042 24.2835ZM24 31.7778C28.2955 31.7778 31.7778 28.2955 31.7778 24C31.7778 19.7045 28.2955 16.2222 24 16.2222C19.7044 16.2222 16.2222 19.7045 16.2222 24C16.2222 28.2955 19.7044 31.7778 24 31.7778Z",fill:"#ffffff"}),N.createElement("defs",null,N.createElement("radialGradient",{id:"paint0_radial_2882_25472",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(24 60) rotate(90) scale(6 20)"},N.createElement("stop",null),N.createElement("stop",{offset:1,stopOpacity:0})))),v6={place:null,locationPin:null,mapKey:""},y6=t=>{var e,n;return(n=(e=t.place)==null?void 0:e.address_components)==null?void 0:n.find(r=>r.types.includes("locality"))},b6=t=>t.locationPin,hn=$t((t,e)=>({...v6,setMapKey(n){t({mapKey:n})},async setPlace(n,r,i){var c,l,u,d,h,v;const{map:s}=te.getState();let o,a;if(console.debug("[OmnicWidgetLocations::setDeliveryAdressPlace]",{value:n,types:r}),ua(n)){const m=await da(n,e().mapKey,r);o=(c=m==null?void 0:m.results)==null?void 0:c[0],i&&(o=(l=m==null?void 0:m.results)==null?void 0:l.find(f=>{var w;return(w=f.types)==null?void 0:w.includes(i)}))}else if(o=n,o!=null&&o.place_id){const{results:m}=await da(o.place_id,e().mapKey);a=(d=(u=m==null?void 0:m[0])==null?void 0:u.geometry)==null?void 0:d.viewport}else(h=o==null?void 0:o.geometry)!=null&&h.viewport?a=o.geometry.viewport:(v=o==null?void 0:o.geometry)!=null&&v.location&&(a=new google.maps.LatLngBounds,a.extend(o.geometry.location));return a&&(console.debug("[OmnicWidgetLocations::fitMapBounds]",a.toJSON()),s==null||s.fitBounds(a)),xt(o,"Place is not defined"),t({place:o}),o},async setPlaceAndPoint(n,r){var l;const i=r==null?void 0:r.types,s=ua(n)?await e().setPlace(n,i):await e().setPlace(n),o=(l=s.geometry)==null?void 0:l.location;xt(o,"Location is not defined");const a=[o.lat(),o.lng()],c={address:s.formatted_address,coords:a};return r!=null&&r.warehouseSelection&&Le.getState().setWarehousePoint({...s,coords:{lat:o.lat(),lng:o.lng()}}),(!(r!=null&&r.ignoreSelection)||r!=null&&r.warehouseSelection)&&Le.getState().setDeliverPoint(c),s},setPlaceSimple(n,r){var i,s,o;if(r!=null&&r.withNavigation){const{map:a}=te.getState();xt(a,"Map is not defined");let c;(i=n==null?void 0:n.geometry)!=null&&i.viewport?c=n.geometry.viewport:(s=n==null?void 0:n.geometry)!=null&&s.location&&(c=new google.maps.LatLngBounds,c.extend(n.geometry.location)),c&&(a.fitBounds(c),a.setZoom(12)),t({place:n,locationPin:(o=n==null?void 0:n.geometry)!=null&&o.location?{type:"place",place:n}:null});return}t({place:n})},setLocationPinCoordinates(n){t({locationPin:{type:"coordinates",coordinates:n}})},hideLocationPin(){t({locationPin:null})}})),w6="LocationPin-module__pin__DFrLoH",S6={pin:w6},C6=()=>{const t=hn(b6),e=p.useMemo(()=>{var r;if((t==null?void 0:t.type)==="coordinates")return{lat:t.coordinates[0],lng:t.coordinates[1]};const n=(r=t==null?void 0:t.place.geometry)==null?void 0:r.location;return n?{lat:n.lat(),lng:n.lng()}:null},[t]);return e?S.jsx(dc,{position:e,children:S.jsx("span",{className:S6.pin,children:S.jsx(g6,{})})}):null},So=()=>S.jsx(mh,{children:S.jsx(qs,{})});async function _6(){return(await Se.request({method:"GET",baseURL:"https://api.geo-data.omnic.solutions/api/1.0/",url:"/key-data",headers:{Authorization:"Token fa812020-3197-401a-9b39-345999046111"}})).data.data}function E6(t){return Lh({queryKey:["wl-map-key-wl"],queryFn:()=>_6(),refetchOnWindowFocus:!1,retry:2,enabled:t})}const Ih=p.createContext(null),Fh=({asGlobalProvider:t=!1,children:e,gMapId:n,gMapKey:r,locale:i,mapTheme:s})=>{const o=p.useRef(i),a=!r||!n,{data:c,isFetching:l}=E6(a),u=c==null?void 0:c.key;function d(){var y,C,b;switch(s){case"omnic":return(y=c==null?void 0:c.additional_data)==null?void 0:y.map_id_omnic;case"llama":return(C=c==null?void 0:c.additional_data)==null?void 0:C.map_id_llama;case"chip":return(b=c==null?void 0:c.additional_data)==null?void 0:b.map_id_chip;default:return"e130cd87a3f1b9cbe3cb5de4"}}const h=r||u||"AIzaSyDsI0AO8VsUrTPoyR9fF7T31FKx1a9TLO0",v=n||d(),m=p.useMemo(()=>({mapKey:h,mapId:v,isFetching:l}),[v,h,l]),{setMapKey:f}=hn();p.useEffect(()=>{f(h)},[h,f]);const w=()=>l?t?e:S.jsx(So,{}):S.jsx(Ym,{apiKey:h,language:o.current,libraries:cp,children:e});return S.jsx(Ih.Provider,{value:m,children:w()})},Bh=()=>{const t=p.useContext(Ih);if(!t)throw new Error("useMapKeyApiContext must be used within a MapKeyApiProvider");return t},x6=({children:t,className:e,...n})=>{const{disableDelivery:r,map:i,warehouseSelection:s}=_e(),{mapId:o}=Bh(),a=p.useMemo(()=>{var l,u;return{lat:((l=i==null?void 0:i.center)==null?void 0:l[0])??na[0],lng:((u=i==null?void 0:i.center)==null?void 0:u[1])??na[1]}},[i==null?void 0:i.center]),c=p.useCallback(async l=>{const u=l.detail.latLng;if(!u||r&&!s)return;te.getState().setDetailsOpen(!1),it.getState().setSelectedLocation(null);const d=[u.lat,u.lng];console.debug("[OmnicLocationsWidget::mapClick]",d);try{await hn.getState().setPlaceAndPoint(d,{warehouseSelection:s})}catch{Le.getState().setDeliverPoint({address:null,coords:d})}},[r,s]);return S.jsx(Jd,{disableDefaultUI:!0,mapId:o,defaultZoom:i==null?void 0:i.initialZoom,defaultCenter:a,className:J(Re.root,e),clickableIcons:!1,minZoom:4,maxZoom:20,restriction:{strictBounds:!0,latLngBounds:{north:85,south:-85,west:-179,east:179}},onClick:c,...n,children:t})},O6=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},N.createElement("rect",{width:2,height:20,x:9,fill:"#fff",rx:1}),N.createElement("rect",{width:2,height:20,x:20,y:9,fill:"#fff",rx:1,transform:"rotate(90 20 9)"}),N.createElement("circle",{cx:10,cy:10,r:8,fill:"#fff"}),N.createElement("circle",{cx:10,cy:10,r:6,fill:"currentcolor"}),N.createElement("circle",{cx:10,cy:10,r:4,fill:"#fff"})),P6=t=>{const e=document.createElement("div"),n=document.createElement("div");e.classList.add(Re.mapControl),n.classList.add(Re.mapControl),e.innerHTML="+",n.innerHTML="—",t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(n),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{const r=t.getZoom()||0;return t.setZoom(r+1)}),n.addEventListener("click",()=>{const r=t.getZoom()||0;return t.setZoom(r-1)})},T6=t=>{const e=document.createElement("div");e.classList.add(Re.mapControl),e.classList.add(Re.geolocationControl),e.innerHTML=Qh.renderToString(S.jsx(O6,{})),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{cc()})},A6=({className:t})=>{const e=fn(),n=te(Ip),r=te(Hp),i=Pt(Nd),s=Le(ec),o=ji(),{lmsData:a}=mo(),{cityName:c,countryAbbreviation:l,disableGeolocation:u,disableLocationPinOnMap:d,hideDeliveryTime:h,hideDetails:v,hideMapControls:m,onPointClick:f,regionName:w,skipPointInfo:y}=_e(),C=p.useCallback(B=>{console.debug("[OmnicLocationsWidget::loadMap]",B),te.getState().setMap(B),te.getState().setLoaded(),m||(P6(B),u||T6(B))},[u,m]),b=p.useCallback(()=>{console.debug("[OmnicLocationsWidget::unmountMap]"),te.getState().setMap(null)},[]);p.useEffect(()=>{if(o)return C(o),()=>{b()}},[o,C,b]);const E=p.useCallback(B=>{const z=a==null?void 0:a.location.what3words,se=z!=null&&z.id?z:void 0;f==null||f(B,se)},[f,a]),x=p.useRef(null),g=p.useRef(null),_=p.useCallback(B=>{const z=B.getSouthWest(),se=B.getNorthEast(),X=Ne=>Math.round(Ne*1e3)/1e3,le=`${X(z.lat())}:${X(z.lng())}:${X(se.lat())}:${X(se.lng())}`,Y=JSON.stringify(e??{});return`${le}|${Y}|${c??""}|${l??""}|${w??""}`},[c,l,e,w]),O=p.useCallback(()=>{te.getState().setIdle(!0),n&&(x.current&&window.clearTimeout(x.current),x.current=window.setTimeout(()=>{const B=n.getBounds();if(!B)return;const z=_(B);g.current!==z&&(g.current=z,console.debug("[OmnicLocationsWidget::changeBounds]",B),Pt.getState().loadNext({bounds:[[B.getSouthWest().lat(),B.getNorthEast().lat()],[B.getSouthWest().lng(),B.getNorthEast().lng()]],filter:e,city_name:c,country_abbreviation:l,region_name:w}))},250))},[_,c,l,e,n,w]);p.useEffect(()=>()=>{x.current&&window.clearTimeout(x.current)},[]);const T=p.useCallback(async B=>{Le.getState().setDeliverPoint(null),it.getState().setSelectedLocation(B)},[]),L=p.useCallback(()=>{console.debug("[OmnicLocationsWidget::tilesLoaded]")},[]),R=te.getState().setDetailsOpen,{getLMSData:A}=Ab(),M=B=>{if(A(B.code),y){E(B);return}R(!1),T(B)},j=()=>{R(!1),T(null)},F=B=>{R(!0),T(B)},G=B=>{E(B),R(!1),T(null)};return S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:J(Re.mapContainer,t),children:[S.jsxs(x6,{onIdle:O,onTilesLoaded:L,onBoundsChanged:()=>{te.getState().setIdle(!1)},children:[s&&S.jsx(m6,{hideDeliveryTime:h,hideDetails:v,point:s,setOpenDetails:te.getState().setDetailsOpen,setDeliveryPoint:Le.getState().setDeliverPoint,onPointClick:E}),d?null:S.jsx(C6,{}),S.jsx(V5,{handleCloseClick:j,handleDetailsClick:F,handlePointClick:M,handleSubmitClick:G})]}),(i||r)&&S.jsx(mh,{className:Re.overlay,children:S.jsx(qs,{})})]}),S.jsx(K4,{handleDetailsClick:F,handlePointClick:M}),S.jsx(E4,{handleCloseClick:j,handleSubmitClick:G})]})},L6=p.memo(A6),R6=t=>({google:L6})[t];function Vh(...t){return p.useCallback(e=>{for(const n of t)typeof n=="function"?n(e):n&&typeof n=="object"&&(n.current=e)},t)}const so=t=>{const e=p.useCallback(()=>{var n;(n=t==null?void 0:t.onClick)==null||n.call(t,t.name)},[t]);return{ref:t==null?void 0:t.ref,name:t==null?void 0:t.name,onClick:e}},k6=()=>{throw new Error("useMediaQuery is a client-only hook")};function M6(t){const e=p.useCallback(r=>{const i=window.matchMedia(t);return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[t]),n=()=>window.matchMedia(t).matches;return p.useSyncExternalStore(e,n,k6)}const D6="768px",N6="1024px",j6="1280px",I6="1536px",F6={screenSm:D6,screenMd:N6,screenLg:j6,screenXl:I6};function Bn(t){return M6(`(max-width: calc(${F6[t]} - 1px))`)}const Hh=Tv().use(mv()).use(ov()).init({defaultLanguage:"en",defaultNs:"common",ns:["common","courier_balloon","current_location","details_modal","header","location_aside","location_selector","receive_filter","send_filter","type_filter"],apiUrl:"https://tms.omnic.solutions",apiKey:"tgpak_gfpwentkga2g4zdngbzwozdinvztezlknu4xmnlpnbrgc"}),B6=t=>{p.useEffect(()=>{t&&(Hh.changeLanguage(t),$s.setLanguage(t))},[t])},V6=t=>{p.useEffect(()=>{if(t){const e=Object.keys(t);for(const n of e){const r=t[n];r&&Di(`--owl-color-${n}`,r)}}},[t])},H6=t=>{p.useEffect(()=>{t&&t!==void 0&&Di("--owl-button-radius",`${t}px`)},[t])},U6=t=>{p.useEffect(()=>{t&&t!==void 0&&Di("--owl-font",t)},[t])},$6=500,Dt=[];function Lc(t={}){const{country:e,debounceMs:n=$6,globalSearch:r,onCoordinatesSelect:i,onPlaceSelect:s,types:o}=t,a=r?void 0:e,c=uc("places"),[l,u]=p.useState(""),[d,h]=p.useState(""),[v,m]=p.useState(Dt),[f,w]=p.useState(!1),y=p.useMemo(()=>o,[JSON.stringify(o)]),C=p.useRef(null),b=p.useRef(),E=p.useRef(null),x=p.useRef(s),g=p.useRef(i);x.current=s,g.current=i;const _=p.useCallback(()=>c?(C.current||(C.current=new c.AutocompleteSessionToken),C.current):null,[c]),O=p.useCallback(()=>{C.current=null},[]),T=p.useCallback(()=>{m(Dt)},[]),L=p.useCallback(M=>{E.current=M,u(M)},[]),R=p.useCallback(M=>{h(M),L(M)},[L]);p.useEffect(()=>{if(E.current!==null&&E.current===l){E.current=null;return}E.current=null;const M=l.trim();if(!M){m(F=>F.length>0?Dt:F);return}clearTimeout(b.current);const j=Dd(M);if(j.kind!=="none"){if(w(!1),j.kind==="valid"&&g.current){m([{placeId:`coordinates:${j.normalized}`,mainText:"",secondaryText:j.normalized,description:j.normalized,type:"coordinates",coordinates:j.coordinates}]);return}m(F=>F.length>0?Dt:F);return}if(!c){m(F=>F.length>0?Dt:F);return}return b.current=setTimeout(async()=>{w(!0);try{const F=_(),G={input:M,...F&&{sessionToken:F},...a&&{includedRegionCodes:[a]},...(y==null?void 0:y.length)&&{includedPrimaryTypes:y}},{suggestions:B}=await c.AutocompleteSuggestion.fetchAutocompleteSuggestions(G),z=B.filter(se=>se.placePrediction!==null).map(se=>{var le,Y;const X=se.placePrediction;return{placeId:X.placeId,mainText:((le=X.mainText)==null?void 0:le.text)??"",secondaryText:((Y=X.secondaryText)==null?void 0:Y.text)??"",description:X.text.text}});m(z.length>0?z:Dt)}catch(F){console.error("[usePlaceAutocomplete] Failed to fetch suggestions:",F),m(Dt)}finally{w(!1)}},n),()=>clearTimeout(b.current)},[l,c,a,y,n,_]);const A=p.useCallback(async M=>{var j,F;if(M.type==="coordinates"&&M.coordinates){(j=g.current)==null||j.call(g,M.coordinates,M.description),O(),m(Dt);return}if(c)try{const G=new c.Place({id:M.placeId}),B=await Md(G);(F=x.current)==null||F.call(x,B),O(),m(Dt)}catch(G){console.error("[usePlaceAutocomplete] Failed to fetch place details:",G)}},[c,O]);return p.useMemo(()=>({value:l,selectedValue:d,setValue:u,commitValue:R,suggestions:v,isLoading:f,clearSuggestions:T,handleSelect:A}),[l,d,R,v,f,T,A])}const z6={open:!1},q6=t=>t.open,_n=$t(t=>({...z6,toggle(e){t(n=>({open:e??!n.open}))}})),G6=t=>{const e=t==="selector";p.useEffect(()=>{e&&_n.getState().toggle(!0)},[e])},W6=t=>{p.useEffect(()=>{t==="sharp"&&Di("--owl-radius","0")},[t])},Z6=({children:t})=>{const{cornersVariant:e,font:n,locale:r,palette:i,radius:s,startScreen:o}=_e();return U6(n),B6(r),V6(i),H6(s),G6(o),W6(e),S.jsx(S.Fragment,{children:t})},K6=({children:t})=>{const{disableGeolocation:e,map:n}=_e(),[r,i]=p.useState(e),{loaded:s}=te();return xt(n==null?void 0:n.center,"Map center is required"),xt(n==null?void 0:n.initialZoom,"Map initial zoom is required"),p.useEffect(()=>{!s||e||r||cc({success:o=>{n.center=[o.coords.latitude,o.coords.longitude],i(!0),it.getState().setIsTrackingEnabled(!0)},error:()=>{i(!0)}})},[e,r,s,n]),t},Q6=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:28,fill:"none",viewBox:"0 0 24 28",...t},N.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M24 11.777C24 4.052 17.606 0 12 0S0 4.052 0 11.777C0 16.915 3.994 22.334 12 28c8.006-5.666 12-11.085 12-16.224ZM12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z",clipRule:"evenodd"})),J6=()=>{_n.getState().toggle(!0),te.getState().setDetailsOpen(!1),Le.getState().setDeliverPoint(null),it.getState().setSelectedLocation(null)},X6="CurrentLocation-module__root__AeQCGT",Y6="CurrentLocation-module__icon__459m9q",ew="CurrentLocation-module__text__w-9v28",Xo={root:X6,icon:Y6,text:ew},Uh=({className:t})=>{const{t:e}=mt("current_location"),n=hn(y6),{location:r}=it(),s=(r==null?void 0:r.location.full_address)??(n==null?void 0:n.long_name)??e("choose_from_map");return S.jsxs("div",{role:"presentation",className:J(Xo.root,t),onClick:J6,children:[S.jsx(Q6,{className:Xo.icon}),S.jsx("span",{className:Xo.text,children:s})]})},tw=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:123,height:32,fill:"none",viewBox:"0 0 123 32",...t},N.createElement("path",{fill:"currentcolor",d:"M6.698 32a6.579 6.579 0 0 1-3.35-.889 6.718 6.718 0 0 1-2.443-2.4A6.285 6.285 0 0 1 0 25.422V6.578c0-1.215.302-2.311.905-3.29A6.718 6.718 0 0 1 3.35.889 6.579 6.579 0 0 1 6.698 0h19.188c1.207 0 2.308.296 3.304.889a6.72 6.72 0 0 1 2.444 2.4c.633.978.95 2.074.95 3.289v18.844a6.061 6.061 0 0 1-.95 3.29 6.72 6.72 0 0 1-2.444 2.4c-.996.592-2.097.888-3.304.888H6.698Zm.317-6.933h18.464V6.933H7.015v18.134ZM37.568 32V0h7.24l11.043 12.933L66.848 0h7.287v32h-7.06V10.533L55.85 23.69 44.582 10.578V32h-7.014Zm41.985 0V0h7.241l18.238 21.333V0h7.105v32h-7.241L86.568 10.578V32h-7.015Zm36.523 0V0H123v32h-6.924Z"})),nw=t=>N.createElement("svg",{width:119,height:44,viewBox:"0 0 119 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},N.createElement("path",{d:"M4.70489 0.199253H0V13.4418H10.7452V10.0105H4.70489V0.199253Z",fill:"black"}),N.createElement("path",{d:"M16.9359 0.199253H12.2287V13.4418H22.974V10.0105H16.9359V0.199253Z",fill:"black"}),N.createElement("path",{d:"M27.9807 0.199253L23.6569 13.4418H28.3442L28.9701 10.913H32.5644L33.1703 13.4418H37.9766L33.6354 0.199253H27.9807ZM29.6775 8.00558L30.7881 3.41028L31.879 8.00558H29.6775Z",fill:"black"}),N.createElement("path",{d:"M48.1266 6.0777L47.5404 8.54701H47.5008L46.9146 6.0777L45.3786 0.199253H38.7936V13.4418H42.9146V8.84631L42.8551 4.39405H42.9345L45.48 13.4418H49.2373L51.8222 4.39405H51.8817L51.8222 8.84631V13.4418H55.9233V0.199253H49.6626L48.1266 6.0777Z",fill:"black"}),N.createElement("path",{d:"M61.057 0.199253L56.7333 13.4418H61.4206L62.0465 10.913H65.6429L66.2489 13.4418H71.0552L66.7139 0.199253H61.057ZM62.7539 8.00558L63.8645 3.41028L64.9553 8.00558H62.7539Z",fill:"black"}),N.createElement("path",{d:"M85.656 6.77975C86.6916 6.6323 87.4541 6.28455 87.9389 5.73657C88.4238 5.18853 88.6662 4.51949 88.6662 3.72939C88.6662 2.55195 88.2562 1.67601 87.4344 1.1016C86.6145 0.513972 85.3607 0.212458 83.677 0.199253H76.0413V13.4418H84.2015C85.8301 13.4418 87.0354 13.1533 87.8177 12.5789C88.611 11.9913 89.0099 11.1132 89.0099 9.95118C89.0099 9.09505 88.7411 8.38636 88.2011 7.82518C87.6612 7.26393 86.8151 6.9228 85.656 6.80175V6.77975ZM80.5455 3.41028H82.6457C83.4545 3.41028 83.8577 3.7316 83.8577 4.37425C83.8577 5.01689 83.4545 5.33822 82.6457 5.33822H80.5455V3.41028ZM83.8797 10.1492C83.677 10.312 83.3685 10.3913 82.952 10.3913H80.5499V8.46561H82.952C83.3685 8.46561 83.6792 8.54701 83.8797 8.70549C84.0957 8.86619 84.2015 9.09945 84.2015 9.40754C84.2015 9.71567 84.0935 9.97757 83.8797 10.1492Z",fill:"black"}),N.createElement("path",{d:"M114.374 6.72035L118.616 0.199253H113.485L111.91 3.51152L110.354 0.199253H104.801L109.063 6.8414L104.638 13.4418H109.951L111.566 10.0105L113.325 13.4418H118.999L114.374 6.72035Z",fill:"black"}),N.createElement("path",{d:"M102.472 0.378544C102.053 0.125449 101.59 0 101.086 0H93.0312C92.5242 0 92.0549 0.127649 91.6252 0.378544C91.1931 0.631642 90.8517 0.972769 90.5982 1.40194C90.3448 1.8201 90.217 2.28667 90.217 2.80386V10.8369C90.217 11.3432 90.3448 11.8097 90.5982 12.2388C90.8517 12.6681 91.1931 13.0092 91.6252 13.2622C92.0549 13.5152 92.5242 13.6407 93.0312 13.6407H101.086C101.593 13.6407 102.053 13.513 102.472 13.2622C102.902 13.0092 103.245 12.6681 103.497 12.2388C103.763 11.8097 103.895 11.341 103.895 10.8369V2.80606C103.895 2.28667 103.761 1.8201 103.497 1.40414C103.243 0.974969 102.902 0.633842 102.472 0.380745V0.378544ZM100.116 9.89279H93.9611V3.75243H100.116V9.89279Z",fill:"black"}),N.createElement("path",{d:"M43.3879 27.3704C42.6166 26.8512 41.7372 26.4993 40.7478 26.3145L44.9726 21.5605H40.8226L36.1199 26.794V30.7935C37.0917 30.4415 37.9887 30.2655 38.8107 30.2655C39.5644 30.2655 40.2101 30.4085 40.7478 30.6923C41.6204 31.1455 42.0569 31.8319 42.0569 32.7559V32.8307C42.0569 33.1827 41.973 33.4269 41.8056 33.5611C41.6558 33.6953 41.3692 33.7635 40.9505 33.7635H32.8715C32.2345 33.7635 31.7983 33.6469 31.5625 33.4115C31.3444 33.1607 31.2363 32.6987 31.2363 32.0277V26.3431L27.0866 28.532V32.6569C27.0866 33.0925 27.0117 33.3873 26.8595 33.5369C26.7075 33.6887 26.4144 33.7635 25.9803 33.7635H23.7412C23.305 33.7635 23.0118 33.6887 22.8619 33.5369C22.7121 33.3851 22.6349 33.0925 22.6349 32.6569V26.8468L18.4852 29.0357V32.6591C18.4852 33.0947 18.4103 33.3895 18.2583 33.5391C18.1084 33.6909 17.8131 33.7657 17.379 33.7657H15.1664C14.73 33.7657 14.4369 33.6909 14.2871 33.5391C14.1372 33.3873 14.06 33.0947 14.06 32.6591V27.3506L9.91037 29.5395V35.9282C9.91037 37.6727 8.92967 38.5439 6.96835 38.5439C6.02952 38.5439 5.28242 38.2073 4.72931 37.5386C4.17615 36.8522 3.89848 35.9458 3.89848 34.8216C3.89848 33.6975 4.18276 32.5161 4.75355 31.4249L0.830824 32.2543C0.277676 33.2113 0 34.3091 0 35.5498C0 37.2944 0.50246 38.8033 1.50958 40.0771C2.801 41.7381 4.61911 42.5674 6.96835 42.5674C8.6454 42.5674 10.0779 42.1736 11.2701 41.3861C12.5946 40.5149 13.4497 39.2895 13.8353 37.7123C14.1372 37.7629 14.4568 37.7871 14.7917 37.7871H18.0114C19.0009 37.7365 19.8559 37.4858 20.5767 37.0326C21.3655 37.5364 22.2956 37.7871 23.3689 37.7871H26.5885C27.7125 37.7365 28.6513 37.4352 29.405 36.8808C30.3262 37.4836 31.4259 37.7871 32.6996 37.7871H41.3581C42.7157 37.7871 43.8309 37.4022 44.7036 36.63C45.7107 35.7566 46.2132 34.5334 46.2132 32.9561V32.7053C46.2132 30.3909 45.2745 28.6134 43.3967 27.3726L43.3879 27.3704Z",fill:"#6A4A9D"}),N.createElement("path",{d:"M66.0266 39.8246C65.4051 39.8246 64.9026 40.0094 64.517 40.3789C64.1313 40.7639 63.9397 41.2677 63.9397 41.8881C63.9397 42.5084 64.1335 43.0123 64.517 43.3973C64.9026 43.7998 65.4051 44 66.0266 44C66.648 44 67.1416 43.8064 67.5097 43.4215C67.8953 43.0365 68.0869 42.5238 68.0869 41.8881C68.0869 41.2523 67.8931 40.7639 67.5097 40.3789C67.1416 40.0094 66.6458 39.8246 66.0266 39.8246Z",fill:"#6A4A9D"}),N.createElement("path",{d:"M65.0208 32.6578C65.0208 33.0933 64.9459 33.3881 64.7938 33.5377C64.6418 33.6896 64.3487 33.7644 63.9124 33.7644H59.5733V30.6954C59.5733 29.3205 59.1788 28.2051 58.3922 27.3495C57.4864 26.3441 56.2038 25.8403 54.5444 25.8403C53.002 25.8403 51.752 26.3353 50.7956 27.3253C49.74 28.4165 49.2111 29.9079 49.2111 31.802C49.2111 33.1109 49.6143 34.2835 50.4187 35.3241C51.3751 36.5494 52.6666 37.2862 54.2932 37.5372C54.745 37.6032 55.124 37.6472 55.4259 37.6626C55.3599 37.997 55.124 38.283 54.7207 38.5182C54.3351 38.769 53.9076 38.8946 53.4382 38.8946C52.532 38.8946 51.5339 38.5754 50.4452 37.9398V41.5366C51.5691 42.2229 52.6841 42.5683 53.7908 42.5683C55.1835 42.5683 56.3979 42.1987 57.438 41.4619C58.6962 40.5731 59.3993 39.3478 59.5513 37.788H64.2936C65.6691 37.788 66.793 37.3942 67.6635 36.6044C68.6684 35.6981 69.173 34.4485 69.173 32.8558V26.3397L65.0235 28.5285V32.6534L65.0208 32.6578ZM55.4259 33.6896C55.3599 33.672 55.2674 33.6654 55.1484 33.6654C54.864 33.6147 54.6612 33.573 54.5444 33.5399C53.707 33.3221 53.2861 32.693 53.2861 31.6524C53.2861 30.3787 53.7048 29.7407 54.5444 29.7407C55.1306 29.7407 55.4237 30.0597 55.4237 30.6977V33.6918L55.4259 33.6896Z",fill:"#6A4A9D"}),N.createElement("path",{d:"M95.419 25.837C94.0615 25.837 92.9465 26.2221 92.0734 26.9942C91.0839 27.883 90.5903 29.1149 90.5903 30.6923V32.6547C90.5903 33.0903 90.5155 33.3851 90.3633 33.5347C90.2135 33.6865 89.9182 33.7613 89.4839 33.7613H85.3124C84.8761 33.7613 84.583 33.6865 84.431 33.5347C84.2811 33.3829 84.204 33.0903 84.204 32.6547V21.5605L80.0544 23.7495V32.8571C80.0544 34.2497 80.4489 35.3892 81.2357 36.278C82.1237 37.2834 83.3556 37.7871 84.9334 37.7871H89.8587C90.8305 37.7871 91.6943 37.5782 92.4507 37.158C93.2726 37.5782 94.3282 37.7871 95.6196 37.7871C97.0608 37.7871 98.2354 37.2922 99.1411 36.3022C100.181 35.1956 100.701 33.6953 100.701 31.7989C100.701 30.1731 100.292 28.8224 99.4694 27.7489C98.513 26.4751 97.1644 25.837 95.419 25.837ZM95.3948 33.7613C94.9584 33.7613 94.7403 33.5853 94.7403 33.2333V30.5427C94.7403 30.0059 94.9673 29.7375 95.419 29.7375C96.2234 29.7375 96.6267 30.3755 96.6267 31.6493C96.6267 33.0573 96.2168 33.7635 95.3948 33.7635V33.7613Z",fill:"#6A4A9D"}),N.createElement("path",{d:"M114.85 32.0277C114.85 32.6987 114.734 33.1607 114.498 33.4115C114.28 33.6469 113.852 33.7635 113.215 33.7635H112.31V24.8317L108.159 27.0448V33.7613H105.167L103.08 37.7871H113.392C115.036 37.7871 116.36 37.2921 117.365 36.3021C118.456 35.2462 119 33.8295 119 32.0497V21.5605L114.85 23.7737V32.0277Z",fill:"#6A4A9D"})),rw="Header-module__root__Pe4MYp",iw="Header-module__nav__wtnkmT",sw="Header-module__navItem__-Fy63Z",ow="Header-module__logo__xO2bWO",ti={root:rw,nav:iw,navItem:sw,logo:ow},aw={llama:nw,default:tw},cw=()=>{const{hideLogo:t,logo:e="default"}=_e();if(t)return null;const n=aw[e];return S.jsx("div",{className:ti.logo,children:S.jsx(n,{})})},lw=({className:t})=>{const{t:e}=mt("header"),{disableDelivery:n}=_e(),r=te(Fp),i=Le(ec);p.useEffect(()=>{i?te.getState().setMode("location_delivery"):te.getState().setMode("self_pickup")},[i]);const s=()=>{Le.getState().setDeliverPoint(null),te.getState().setMode("self_pickup")},o=()=>{Le.getState().setDeliverPoint(null),te.getState().setMode("location_delivery")},a=r==="self_pickup",c=r==="location_delivery";return S.jsxs("div",{className:J(ti.root,t),children:[S.jsx(cw,{}),S.jsxs("nav",{className:ti.nav,children:[!n&&S.jsx(rt,{as:"link",className:ti.navItem,variant:a?"primary":"secondary",onClick:s,children:e("self_pickup")}),!n&&S.jsx(rt,{as:"link",className:ti.navItem,variant:c?"primary":"secondary",onClick:o,children:e("courier_delivery")}),S.jsx(Uh,{})]})]})},uw=p.memo(lw),dw={open:!1},Tr=$t(t=>({...dw,toggle(e){te.getState().setDetailsOpen(!1),Le.getState().setDeliverPoint(null),it.getState().setSelectedLocation(null),t(n=>({open:e??!n.open}))}})),fw="Layout-module__root__qzPL-f",hw="Layout-module__headerHidden__JEN-d0",pw="Layout-module__sidebarHidden__x017O3",mw="Layout-module__sidebarOpen__IZnIjs",Es={root:fw,headerHidden:hw,sidebarHidden:pw,sidebarOpen:mw},gw=({children:t})=>{const{hideFilters:e,hideHeader:n}=_e(),r=Tr(i=>i.open);return S.jsx("div",{className:J(Es.root,{[Es.sidebarOpen]:r,[Es.headerHidden]:n,[Es.sidebarHidden]:e}),children:t})},vw=({children:t})=>{const e=Pt(xm);return Pt(Nd)&&!e?S.jsx(So,{}):S.jsx(S.Fragment,{children:t})},yw="Aside-module__root__EotK2f",bw="Aside-module__open__Zwmbs5",ww="Aside-module__overlay__slLdHF",Sw="Aside-module__container__28P4wq",xs={root:yw,open:bw,overlay:ww,container:Sw},Cw=({children:t,className:e,open:n})=>S.jsxs("div",{className:J(xs.root,e,{[xs.open]:n}),children:[S.jsx("div",{className:xs.overlay}),S.jsx("div",{className:xs.container,children:t})]}),_w="Input-module__locationSearchRoot__svh-f9",Ew="Input-module__endAdornment__m40K5R",xw="Input-module__input__505b7i",Ow="Input-module__startAdornment__D-sJ0N",Pw="Input-module__locationSearchInput__2YK1MG",Tw="Input-module__label__gmqtsf",Aw="Input-module__inputContainer__vubIa-",er={locationSearchRoot:_w,endAdornment:Ew,input:xw,startAdornment:Ow,locationSearchInput:Pw,label:Tw,inputContainer:Aw},Lw=p.forwardRef(({className:t,endAdornment:e,inputRef:n,label:r,onBlur:i,onChange:s,startAdornment:o,...a},c)=>{const l=p.useId(),u=p.useRef(null);p.useImperativeHandle(c,()=>({focus:()=>{var h;(h=u.current)==null||h.focus()},blur:()=>{var h;(h=u.current)==null||h.blur()},setValue:h=>{if(s){s({target:{value:h}});return}if(i){i({target:{value:h}});return}u.current&&(u.current.value=h)}}),[i,s]);const d=Vh(n,u);return S.jsxs("label",{htmlFor:a.id??l,className:J(er.locationSearchRoot,t),children:[r&&S.jsx("span",{className:er.label,children:r}),S.jsxs("div",{className:er.inputContainer,children:[o&&S.jsx("div",{className:er.startAdornment,children:o}),S.jsx("input",{...a,ref:d,id:a.id??l,className:er.locationSearchInput,onChange:s,onBlur:i}),e&&S.jsx("div",{className:er.endAdornment,children:e})]})]})}),Rw="PlaceAutocomplete-module__container__fdiqiO",kw="PlaceAutocomplete-module__dropdown__u-0PdK",Mw="PlaceAutocomplete-module__item__zHJqmC",Dw="PlaceAutocomplete-module__itemMain__-skwdB",Nw="PlaceAutocomplete-module__itemSecondary__sD5QDK",jw="PlaceAutocomplete-module__itemArrow__CtQ5GG",Iw="PlaceAutocomplete-module__endAdornmentGroup__qV8aNt",Fw="PlaceAutocomplete-module__clearButton__--lW5O",Bw="PlaceAutocomplete-module__clearIcon__VlatWK",Vt={container:Rw,dropdown:kw,item:Mw,itemMain:Dw,itemSecondary:Nw,itemArrow:jw,endAdornmentGroup:Iw,clearButton:Fw,clearIcon:Bw},Vw=({onSelect:t,suggestions:e})=>S.jsx("div",{className:Vt.dropdown,role:"listbox",children:e.map(n=>S.jsxs("div",{className:Vt.item,role:"option","aria-selected":!1,onPointerDown:r=>r.preventDefault(),onClick:()=>t(n),onKeyDown:r=>{r.key==="Enter"&&t(n)},children:[S.jsx("span",{className:Vt.itemMain,children:n.mainText}),n.secondaryText&&S.jsx("span",{className:Vt.itemSecondary,children:n.secondaryText}),S.jsx(_c,{className:Vt.itemArrow})]},n.placeId))}),Rc=({autocomplete:t,children:e,className:n,endAdornment:r,inputRef:i,label:s,name:o,onClear:a,onClick:c,onFocus:l,placeholder:u})=>{const d=p.useRef(null),h=t.suggestions.length>0,v=p.useRef(t.clearSuggestions);v.current=t.clearSuggestions,p.useEffect(()=>{if(!h)return;const E=x=>{d.current&&!d.current.contains(x.target)&&v.current()};return document.addEventListener("click",E),()=>document.removeEventListener("click",E)},[h]);const m=E=>{t.setValue(E.target.value)},f=E=>{t.commitValue(E.description),t.clearSuggestions(),t.handleSelect(E)},w=()=>{t.commitValue(""),t.clearSuggestions(),a==null||a()},y=!!a&&t.value.length>0,C=y||r?S.jsxs("div",{className:Vt.endAdornmentGroup,children:[y&&S.jsx("button",{type:"button",className:Vt.clearButton,"aria-label":"Clear address",onPointerDown:E=>E.preventDefault(),onClick:w,children:S.jsx(gh,{className:Vt.clearIcon})}),r]}):void 0,b={value:t.value,onChange:m,inputRef:i,onFocus:l,onClick:c,placeholder:u,name:o,label:s,endAdornment:C};return S.jsxs("div",{ref:d,className:J(Vt.container,n),children:[typeof e=="function"?e(b):S.jsx(Lw,{...b}),h&&S.jsx(Vw,{suggestions:t.suggestions,onSelect:f})]})},Hw="LocationAside-module__submit__CSKcqi",Uw="LocationAside-module__container__S1NejR",$w="LocationAside-module__selector__hl74ke",zw="LocationAside-module__label__0Zk8at",qw="LocationAside-module__header__N1wgyn",Gw="LocationAside-module__close__VsE88z",Os={submit:Hw,container:Uw,selector:$w,label:zw,header:qw,close:Gw},Ww=p.forwardRef((t,e)=>{const{t:n}=mt(["location_aside","common"]),r=_n(q6),{country:i,globalSearch:s,hideCloseButtonOnLocationScreen:o,inputs:a,onCloseLocationSelector:c,onLocationSelect:l}=_e(),u=p.useRef(null);p.useImperativeHandle(e,()=>({open:()=>_n.getState().toggle(!0),close:()=>_n.getState().toggle(!1)}),[]);const d=p.useCallback(f=>{_n.getState().toggle(!1),hn.getState().setPlaceSimple(f,{withNavigation:!0}),l==null||l(f)},[l]),h=Lc({country:i,globalSearch:s,onPlaceSelect:d}),v=()=>{_n.getState().toggle(!1),c==null||c()},m=so(a==null?void 0:a.city);return S.jsx(Cw,{open:r,children:S.jsx("div",{ref:u,className:Os.container,children:S.jsxs("div",{className:Os.selector,children:[S.jsxs("div",{className:Os.header,children:[S.jsx("div",{className:Os.label,children:n("choose_city")}),!o&&S.jsx(Lr,{position:"relative",onClick:v})]}),S.jsx(Rc,{autocomplete:h,inputRef:m.ref,name:m.name,placeholder:n("placeholder"),onClick:m.onClick})]})})})}),Zw=p.memo(Ww),Kw=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},N.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M14.617 16.032a9 9 0 1 1 1.414-1.414l3.676 3.675a1 1 0 0 1-1.414 1.414l-3.676-3.675ZM2 9a7 7 0 1 1 12.04 4.858 1.005 1.005 0 0 0-.182.182A7 7 0 0 1 2 9Z",clipRule:"evenodd"})),Qw=({className:t})=>{const{t:e}=mt("location_selector"),{country:n,globalSearch:r,inputs:i,onLocationSelect:s}=_e(),o=p.useCallback(h=>{hn.getState().setPlaceSimple(h,{withNavigation:!0}),s==null||s(h)},[s]),a=p.useCallback(h=>{const[v,m]=h,f=te.getState().map;f==null||f.setCenter({lat:v,lng:m}),f==null||f.setZoom(16),hn.getState().setLocationPinCoordinates(h)},[]),c=Lc({country:n,globalSearch:r,types:[],onCoordinatesSelect:a,onPlaceSelect:o}),l=()=>{te.getState().setDetailsOpen(!1),Le.getState().setDeliverPoint(null),it.getState().setSelectedLocation(null)},u=p.useCallback(()=>{hn.getState().hideLocationPin()},[]),d=so(i==null?void 0:i.address);return S.jsx(Rc,{autocomplete:c,className:t,endAdornment:S.jsx(Kw,{}),inputRef:d.ref,name:d.name,placeholder:e("placeholder"),onClear:u,onClick:d.onClick,onFocus:l})},Jw=({className:t})=>te(Vp)?S.jsx(Qw,{className:t}):null,Xw=p.memo(Jw),Yw="DeliveryDetailsModal-module__root__qwKnjX",e8={root:Yw},t8=({className:t,location:e,onClose:n,onSubmit:r})=>S.jsx("div",{className:J(e8.root,t),children:S.jsx(jh,{location:e,onClose:n,onSubmit:r})}),n8="LocationDetailsModal-module__root__PyRnLM",r8={root:n8},i8=({className:t,location:e,onClose:n,onSubmit:r})=>{const i=()=>{r==null||r(e)};return S.jsx("div",{className:J(r8.root,t),children:S.jsx(mf,{location:e,onClose:n,onSubmit:i})})},s8="MapContainer-module__root__1Os6Q-",o8="MapContainer-module__mapWrapper__Cwe7qC",a8="MapContainer-module__locationSelector__Pr1zS-",c8="MapContainer-module__filterButton__CW3Qv7",l8="MapContainer-module__sidebarOpen__lGMVrJ",u8="MapContainer-module__filterIcon__T01XsJ",d8="MapContainer-module__details__gM8LWX",Ht={root:s8,mapWrapper:o8,locationSelector:a8,filterButton:c8,sidebarOpen:l8,filterIcon:u8,details:d8},f8=()=>{const{onPointClick:t}=_e(),e=te(tc),n=it($p),r=Le(ec),i=p.useCallback(()=>{te.getState().setDetailsOpen(!1)},[]),s=p.useCallback(o=>{t==null||t(o),te.getState().setDetailsOpen(!1),it.getState().setSelectedLocation(null),Le.getState().setDeliverPoint(null)},[t]);return S.jsxs(S.Fragment,{children:[(r==null?void 0:r.address)&&e&&S.jsx(t8,{location:r,className:Ht.details,onClose:i,onSubmit:s}),n&&e&&S.jsx(i8,{location:n,className:Ht.details,onClose:i,onSubmit:s})]})},h8=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:60,height:40,fill:"none",viewBox:"0 0 60 40",...t},N.createElement("path",{d:"M0 0h52a8 8 0 0 1 8 8v24a8 8 0 0 1-8 8H0V0Z"}),N.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,strokeWidth:1.5,d:"M32.093 10h13.814c1.151 0 2.093.91 2.093 2.02v2.223c0 .808-.523 1.818-1.047 2.324l-4.5 3.839c-.627.505-1.046 1.515-1.046 2.323v4.344c0 .607-.419 1.415-.942 1.718L39 29.7c-1.36.808-3.244-.101-3.244-1.717v-5.355c0-.707-.419-1.616-.837-2.121l-3.977-4.041c-.523-.506-.942-1.415-.942-2.02V12.12c0-1.21.942-2.12 2.093-2.12Z"})),p8=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:28,height:28,fill:"none",viewBox:"0 0 28 28",...t},N.createElement("rect",{width:28,height:28,fill:"#333",rx:4}),N.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,d:"M9.165 7h9.67c.806 0 1.465.636 1.465 1.414V9.97c0 .566-.366 1.273-.733 1.627l-3.15 2.687c-.44.353-.732 1.06-.732 1.627v3.04c0 .425-.293.99-.66 1.203L14 20.79c-.952.566-2.271-.07-2.271-1.202V15.84c0-.495-.293-1.132-.586-1.485l-2.784-2.83c-.366-.353-.659-.99-.659-1.413V8.485C7.7 7.636 8.36 7 9.165 7Z"})),m8=()=>{const t=Tr(i=>i.open),e=Tr(i=>i.toggle),n=Bn("screenSm"),r=()=>{e(!0)};return S.jsxs("div",{role:"presentation",className:J(Ht.filterButton,{[Ht.sidebarOpen]:t}),onClick:n?void 0:r,children:[n&&S.jsx(Uh,{}),n?S.jsx(p8,{className:Ht.filterIcon,onClick:r}):S.jsx(h8,{className:Ht.filterIcon})]})},g8=({children:t,className:e})=>{const{hideFilters:n,hideSearchInput:r}=_e(),i=te(tc);return S.jsxs("div",{className:J(Ht.root,e),children:[!r&&!i&&S.jsx(Xw,{className:Ht.locationSelector}),!n&&S.jsx(m8,{}),S.jsx("div",{className:Ht.mapWrapper,children:t}),S.jsx(f8,{})]})},v8=p.memo(g8),y8="Separator-module__root__eQtZey",b8={root:y8},Yo=({className:t,...e})=>S.jsx("hr",{className:J(b8.root,t),...e}),w8="Sidebar-module__root__4j1MA3",S8="Sidebar-module__closeButton__HLXy1c",C8="Sidebar-module__open__mqQXF6",_8="Sidebar-module__header__Afp6uz",E8="Sidebar-module__typeFilter__GN46u9",x8="Sidebar-module__separator__6I4QoJ",O8="Sidebar-module__withRightPadding__2u1Ina",P8="Sidebar-module__sheetContent__SaoncI",T8="Sidebar-module__doneButton__4aeaSD",Ft={root:w8,closeButton:S8,open:C8,header:_8,typeFilter:E8,separator:x8,withRightPadding:O8,sheetContent:P8,doneButton:T8},A8=()=>{const{t}=mt("common"),e=Bn("screenSm"),n=Tr(i=>i.toggle),r=()=>{n(!1)};return S.jsxs("div",{className:Ft.header,children:[e&&S.jsx("div",{role:"presentation",className:Ft.doneButton,onClick:r,children:t("done")}),!e&&S.jsx(Lr,{className:Ft.closeButton,onClick:r})]})},L8="Radio-module__root__7ElY2W",R8="Radio-module__label__c-sYW3",Vu={root:L8,label:R8},k8=({className:t,label:e,labelProps:n={},...r})=>{const i=p.useId(),{className:s,...o}=n;return S.jsxs("label",{htmlFor:i,className:J(Vu.label,s),...o,children:[S.jsx("input",{id:i,type:"radio",className:J(Vu.root,t),...r}),e]})},lr=t=>S.jsx(k8,{...t,type:"checkbox"}),M8="RadioGroup-module__root__ewZw-x",D8="RadioGroup-module__body__k8BJAs",N8="RadioGroup-module__legend__tcfV7q",ea={root:M8,body:D8,legend:N8},$h=({children:t,className:e,label:n,onChange:r,value:i,...s})=>S.jsxs("div",{className:J(ea.root,e),...s,children:[n&&S.jsx("span",{className:ea.legend,children:n}),S.jsx("div",{className:ea.body,children:p.Children.map(t,o=>p.isValidElement(o)?p.cloneElement(o,{checked:!!(i!=null&&i[o.props.value]),onChange:a=>r==null?void 0:r({...i,[a.target.value]:a.target.checked})}):null)})]}),j8=({className:t,onChange:e})=>{const{t:n}=mt("receive_filter"),r=fn(Wp);return S.jsxs($h,{value:r,label:n("title"),className:t,onChange:e,children:[S.jsx(lr,{name:"receive",value:ht.DressingRoom,label:n("dressing_room")}),S.jsx(lr,{name:"receive",value:ht.CheckOrder,label:n("check_order")}),S.jsx(lr,{name:"receive",value:ht.PayByCash,label:n("pay_by_cash")})]})},I8=p.memo(j8),F8=({className:t,onChange:e})=>{const{t:n}=mt("send_filter"),r=fn(Gp);return S.jsxs($h,{className:t,value:r,label:n("title"),onChange:e,children:[S.jsx(lr,{name:"send",value:pt.Return,label:n("sending_returns")}),S.jsx(lr,{name:"send",value:pt.Shipping,label:n("shipping")}),S.jsx(lr,{name:"send",value:pt.Payment,label:n("payment")})]})},B8=p.memo(F8),V8="TypeFilter-module__root__WH5EQV",H8="TypeFilter-module__button__f0mSfo",Ps={root:V8,button:H8},U8=({className:t,onChange:e,value:n})=>{const{t:r}=mt("type_filter"),i=s=>()=>e==null?void 0:e(s);return S.jsxs("div",{className:J(Ps.root,t),children:[S.jsx(rt,{className:Ps.button,variant:n===jt.All?"primary":"secondary",onClick:i(jt.All),children:r("all")}),S.jsx(rt,{className:Ps.button,variant:n===jt.PostOffice?"primary":"secondary",onClick:i(jt.PostOffice),children:r("post_office")}),S.jsx(rt,{className:Ps.button,variant:n===jt.PickPoint?"primary":"secondary",onClick:i(jt.PickPoint),children:r("pick_point")})]})},$8=({className:t,onChange:e})=>{const n=fn(qp);return S.jsx(U8,{value:n,className:t,onChange:e})},z8=p.memo($8),q8=({className:t})=>{const e=Bn("screenSm"),n=Tr(c=>c.open),r=p.useCallback(c=>fn.getState().setFilter({type:c}),[]),i=p.useCallback(c=>fn.getState().setFilter({send:c}),[]),s=p.useCallback(c=>fn.getState().setFilter({receive:c}),[]),o=p.useCallback(()=>Tr.getState().toggle(!1),[]),a=S.jsxs(S.Fragment,{children:[S.jsx(A8,{}),S.jsxs("div",{className:Ft.withRightPadding,children:[S.jsx(z8,{className:Ft.typeFilter,onChange:r}),S.jsx(Yo,{className:Ft.separator}),S.jsx(I8,{onChange:s}),S.jsx(Yo,{}),S.jsx(B8,{onChange:i}),S.jsx(Yo,{})]})]});return e?S.jsx(fh,{initialFocusRef:!1,open:n,snapPoints:({maxHeight:c})=>c-hh,onDismiss:o,children:S.jsx("div",{className:Ft.sheetContent,children:a})}):S.jsx("div",{className:J(Ft.root,t,{[Ft.open]:n}),children:a})},G8="App-module__map__Kf-2JS",W8="App-module__sidebar__ORIzGk",Z8="App-module__header__bgP9DA",ta={map:G8,sidebar:W8,header:Z8},K8=new xh,Q8=({children:t})=>{const{isFetching:e}=Bh();return e?S.jsx(So,{}):t},zh=({config:t,options:e,withGlobalProvider:n=!1})=>{const r=Vm(t),{INN:i,cityName:s,countryAbbreviation:o,hideFilters:a,hideHeader:c,map:l,regionName:u}=r;xt(i,"INN is required"),Hm(i,e),xt(l==null?void 0:l.provider,"Map provider is required");const d=R6(l.provider);Om({cityName:s,countryAbbreviation:o,regionName:u});const h=S.jsx(K6,{children:S.jsx(Z6,{children:S.jsx(Lv,{tolgee:Hh,fallback:S.jsx(So,{}),children:S.jsx(vw,{children:S.jsxs(gw,{children:[!c&&S.jsx(uw,{className:ta.header}),!a&&S.jsx(q8,{className:ta.sidebar}),S.jsx(v8,{className:ta.map,children:S.jsx(d,{})}),S.jsx(Zw,{})]})})})})});return S.jsx(Yh,{baseColor:"#f3f3f3",highlightColor:"#ecebeb",children:S.jsx(nd.Provider,{value:r,children:n?S.jsx(Q8,{children:h}):S.jsx(Th,{client:K8,children:S.jsx(Fh,{gMapId:r.gMapId,gMapKey:r.gMapKey,mapTheme:r.mapTheme,locale:r.locale,children:h})})})})},qh=async t=>pi.request({baseURL:"https://api.geo-data.omnic.solutions/api/1.0/",method:"POST",url:"normalize/address",data:t,headers:{Authorization:"Token 9877f9631b2e30570cc1c5aa8c740b0c912efe99a8b6c45c21cf4bd394adc7e9"}}),J8=new xh,Gh=p.createContext(null),Hu=t=>JSON.stringify(t,(e,n)=>typeof n=="function"?void 0:n),X8=(t,e)=>({...t,...e,inputs:e!=null&&e.inputs?{...t.inputs,...e.inputs}:t.inputs,handlers:e!=null&&e.handlers?{...t.handlers,...e.handlers}:t.handlers}),Y8=({children:t,launchConfig:e})=>{const[n,r]=p.useState(),[i,s]=p.useState(),a=p.useRef(e).current,c=p.useRef(),l=p.useRef(null),u=p.useRef(null),d=p.useCallback(m=>{if(!m){c.current=void 0,s(x=>x===void 0?x:void 0);return}const{onCloseLocationSelector:f,onLocationSelect:w,onPointClick:y,onSamePointsClusterClick:C,onWarehouseSelect:b,...E}=m;c.current={onCloseLocationSelector:f,onLocationSelect:w,onPointClick:y,onSamePointsClusterClick:C,onWarehouseSelect:b},s(x=>{const g=Hu(x),_=Hu(E);return g===_?x:E})},[]),h=p.useMemo(()=>({onCloseLocationSelector:(...m)=>{var f,w,y,C;return((w=(f=c.current)==null?void 0:f.onCloseLocationSelector)==null?void 0:w.call(f,...m))??((C=(y=a.config).onCloseLocationSelector)==null?void 0:C.call(y,...m))},onLocationSelect:(...m)=>{var f,w,y,C;return((w=(f=c.current)==null?void 0:f.onLocationSelect)==null?void 0:w.call(f,...m))??((C=(y=a.config).onLocationSelect)==null?void 0:C.call(y,...m))},onPointClick:(...m)=>{var f,w,y,C;return((w=(f=c.current)==null?void 0:f.onPointClick)==null?void 0:w.call(f,...m))??((C=(y=a.config).onPointClick)==null?void 0:C.call(y,...m))},onSamePointsClusterClick:(...m)=>{var f,w,y,C;return((w=(f=c.current)==null?void 0:f.onSamePointsClusterClick)==null?void 0:w.call(f,...m))??((C=(y=a.config).onSamePointsClusterClick)==null?void 0:C.call(y,...m))},onWarehouseSelect:(...m)=>{var f,w,y,C;return((w=(f=c.current)==null?void 0:f.onWarehouseSelect)==null?void 0:w.call(f,...m))??((C=(y=a.config).onWarehouseSelect)==null?void 0:C.call(y,...m))}}),[a.config]),v=p.useMemo(()=>({widgetOutHolderRef:l,widgetLocationsRef:u,setLocale:r,setMapPlaceholderConfig:d}),[d]);return S.jsx(Gh.Provider,{value:v,children:a&&S.jsx(Th,{client:J8,children:S.jsxs(Fh,{asGlobalProvider:!0,gMapId:a.config.gMapId,gMapKey:a.config.gMapKey,mapTheme:a.config.mapTheme,locale:a.config.locale,children:[S.jsx("div",{ref:l,style:{position:"fixed",left:"-9999px",top:"-9999px"},children:S.jsx("div",{ref:u,id:"@omnic/widget-locations",style:{height:"100%",width:"100%"},children:S.jsx(zh,{withGlobalProvider:!0,options:a.options,config:X8(a.config,{...h,...i,...n&&{locale:n}})})})}),t]})})})};function Wh(){const t=p.useContext(Gh);if(!t)throw new Error("Please use hook useWidgetLocationsContext inside WidgetLocationsProvider");return t}const e9=t=>t===void 0||typeof t=="object"&&Object.keys(t).length===0,t9=({config:t})=>{const{setMapPlaceholderConfig:e,widgetLocationsRef:n,widgetOutHolderRef:r}=Wh(),i=p.useRef(null);return p.useEffect(()=>{const s=e9(t)?void 0:t;e(s)},[t,e]),p.useEffect(()=>{const s=r.current,o=n.current,a=i.current;return o&&a&&a.appendChild(o),()=>{o&&s&&s.appendChild(o)}},[n,r]),S.jsx("div",{ref:i,style:{width:"100%",height:"100%"}})};exports.EReceiveFilter=ht;exports.ESendFilter=pt;exports.ETypeFilter=jt;exports.MapPlaceholder=t9;exports.PlaceAutocomplete=Rc;exports.Widget=zh;exports.WidgetLocationsProvider=Y8;exports.createPointsIterator=la;exports.fetchPointsRequest=ca;exports.fromHoursMinutesToMinutes=Zp;exports.fromMinutesToHoursMinutes=Kp;exports.getAddressFormGeocode=da;exports.getBoundsFromPoint=Qp;exports.getCurrentPosition=cc;exports.getNormalizedAddress=qh;exports.getPropertyValue=kd;exports.isCoordinates=ua;exports.isDeliveryPoint=gm;exports.isHttpSuccess=Rd;exports.isPlaceId=Ld;exports.parseCoordinates=Dd;exports.placeToPlaceResult=Md;exports.replaceSvgCurrentColor=ir;exports.setWidgetCSSProperty=Di;exports.usePlaceAutocomplete=Lc;exports.useWidgetLocationsContext=Wh;
229
+ </svg>`,a=`Cluster of ${e} markers`,c=Number(google.maps.Marker.MAX_ZINDEX)+e;if(qe.isAdvancedMarkerAvailable(i)){const d=new DOMParser().parseFromString(o,"image/svg+xml").documentElement;d.setAttribute("transform","translate(0 25)");const h={map:i,position:n,zIndex:c,title:a,content:d};return new google.maps.marker.AdvancedMarkerElement(h)}const l={position:n,zIndex:c,title:a,icon:{url:`data:image/svg+xml;base64,${btoa(o)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(l)}}function S5(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class Ac{constructor(){S5(Ac,google.maps.OverlayView)}}var _n;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click",t.GMP_CLICK="gmp-click"})(_n||(_n={}));const C5=(t,e,n)=>{e.bounds&&n.fitBounds(e.bounds)};class _5 extends Ac{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new y5(r),renderer:s=new w5,onClusterClick:o=C5}){super(),this.map=null,this.idleListener=null,this.markers=[...n],this.clusters=[],this.algorithm=i,this.renderer=s,this.onClusterClick=o,e&&this.setMap(e)}addMarker(e,n){this.markers.includes(e)||(this.markers.push(e),n||this.render())}addMarkers(e,n){e.forEach(r=>{this.addMarker(r,!0)}),n||this.render()}removeMarker(e,n){const r=this.markers.indexOf(e);return r===-1?!1:(qe.setMap(e,null),this.markers.splice(r,1),n||this.render(),!0)}removeMarkers(e,n){let r=!1;return e.forEach(i=>{r=this.removeMarker(i,!0)||r}),r&&!n&&this.render(),r}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,_n.CLUSTERING_BEGIN,this);const{clusters:n,changed:r}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(r||r==null){const i=new Set;for(const o of n)o.markers.length==1&&i.add(o.markers[0]);const s=[];for(const o of this.clusters)o.marker!=null&&(o.markers.length==1?i.has(o.marker)||qe.setMap(o.marker,null):s.push(o.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>s.forEach(o=>qe.setMap(o,null)))}google.maps.event.trigger(this,_n.CLUSTERING_END,this)}}onAdd(){const e=this.getMap();Ya(e),this.idleListener=e.addListener("idle",this.render.bind(this)),this.render()}onRemove(){this.idleListener&&google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>qe.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new b5(this.markers,this.clusters),n=this.getMap();this.clusters.forEach(r=>{if(r.markers.length===1)r.marker=r.markers[0];else if(r.marker=this.renderer.render(r,e,n),r.markers.forEach(i=>qe.setMap(i,null)),this.onClusterClick){const i=qe.isAdvancedMarker(r.marker)?_n.GMP_CLICK:_n.CLUSTER_CLICK;r.marker.addListener(i,s=>{google.maps.event.trigger(this,_n.CLUSTER_CLICK,r),this.onClusterClick(s,r,n)})}qe.setMap(r.marker,n)})}}const E5="LocationBalloon-module__root__GtUl6q",x5="LocationBalloon-module__submit__lNcF4k",O5="LocationBalloon-module__details__--VOKk",P5="LocationBalloon-module__icon__X7DOVA",T5="LocationBalloon-module__header__5VQJDW",A5="LocationBalloon-module__titleContainer__BAO73U",R5="LocationBalloon-module__title__bX9pf8",L5="LocationBalloon-module__description__htav7b",k5="LocationBalloon-module__actions__c8dlOR",M5="LocationBalloon-module__close__7Ujvya",bt={root:E5,submit:x5,details:O5,icon:P5,header:T5,titleContainer:A5,title:R5,description:L5,actions:k5,close:M5},D5={default:Yd,llama:ef},N5=({SSR:t,className:e,hideDetails:n,location:r,location_name:i,name:s,onCloseClick:o,onDetails:a,onSubmit:c})=>{var f;const{logo:l="default"}=Ee(),{isLoading:u,lmsData:d}=mo(),h=(f=d==null?void 0:d.location)==null?void 0:f.what3words,v=!!(h!=null&&h.id),m=D5[l];return S.jsxs("div",{className:Y(bt.root,e),children:[S.jsxs("div",{className:bt.header,children:[S.jsxs("div",{className:bt.titleContainer,children:[u?S.jsx(Ze,{circle:!0,width:40,height:40}):S.jsx("div",{className:bt.icon,children:S.jsx(m,{})}),u?S.jsx(Ze,{width:200}):S.jsx("span",{className:bt.title,children:s||"{{ properties.point.name }}"})]}),S.jsx("div",{className:bt.close,children:S.jsx(Ar,{position:"relative",onClick:o})})]}),S.jsxs("div",{className:bt.description,children:[u?S.jsx(Ze,{width:300}):(r==null?void 0:r.full_address)||"{{ properties.point.location.full_address }}"," ",u?S.jsx(Ze,{width:300}):i||"{{ properties.point.location_name }}"]}),u?S.jsx(Ze,{width:150}):v&&S.jsx(pf,{what3words:h}),S.jsxs("div",{className:bt.actions,children:[S.jsx(it,{id:op,variant:"primary",className:bt.submit,disabled:u,onClick:c,children:t?"{ choose }":S.jsx(Ft,{keyName:"choose",ns:"common"})}),!n&&S.jsxs(it,{id:ed,as:"link",variant:"primary",className:bt.details,disabled:u,onClick:a,children:[t?"{ details }":S.jsx(Ft,{keyName:"details",ns:"common"}),S.jsx(_c,{})]})]})]})},j5=({handleCloseClick:t,handleDetailsClick:e,handlePointClick:n,handleSubmitClick:r,point:i,setMarkerRef:s})=>{const[o,a]=p.useState(!1),{hideDetails:c,iconType:l,palette:u}=Ee(),d=p.useRef(null),{closeSamePoints:h}=At(),v=Ke(O=>O.location),m=(u==null?void 0:u.primary)||"#fc0",f=l==="omni-llama"?We.PinLlama:We.PinOmnic,w=!!i&&(v==null?void 0:v.uid)===i.uid,y=Bn("screenSm"),{isIdle:C}=X(),b=fc({isSelectedPoint:w}),E=C&&w&&b&&o;p.useEffect(()=>{d.current&&a(d.current.checkVisibility()??!1)},[i]);const x=p.useMemo(()=>{let O;if(i.type===30)switch(l){case"omni-llama":{w?O=We.PinLlamaSelected:O=We.PinLlama;break}case"we-chip":{w?O=We.PinWeChipSelected:O=We.PinWeChip;break}default:{w?O=We.PinOmnicSelected:O=rr(f,m);break}}else w?O=rr(We.PinPvz,"--owl-color-black"):O=rr(We.PinPvz,"--owl-color-grey-80");return Ot(O,"Icon url is not defined"),O},[i.type,w,l,f,m]),g=p.useMemo(()=>({lat:i.location.latitude,lng:i.location.longitude}),[i.location.latitude,i.location.longitude]),_=()=>{h(),n(i)};return S.jsxs(S.Fragment,{children:[S.jsx(dc,{ref:O=>{d.current=O,s(O)},position:g,zIndex:w?9999:void 0,onClick:_,children:S.jsx("span",{dangerouslySetInnerHTML:{__html:x}})},i.uid),E&&!y&&S.jsx(Xd,{anchor:d.current||void 0,onCloseClick:t,children:S.jsx(N5,{...i,hideDetails:c,className:ke.balloon,onCloseClick:t,onSubmit:()=>r(i),onDetails:()=>e(i)})})]})},I5=({handleCloseClick:t,points:e,...n})=>{const{setSamePoints:r}=At(),{onSamePointsClusterClick:i}=Ee(),s=ji(),o=p.useMemo(()=>(v,m)=>{if(!m)return;t();const f=m.markers??[],w=f.map(E=>{const x=E.position;if(!x)return{lat:NaN,lng:NaN};const g=typeof x.lat=="number"?x.lat:x.lat(),_=typeof x.lng=="number"?x.lng:x.lng();return{lat:g,lng:_}});if(!w.length)return;const{lat:y,lng:C}=w[0];if(w.every(E=>E.lat===y&&E.lng===C)){const E=e.filter(({location:{latitude:x,longitude:g}})=>x===y&&g===C);r(E),i==null||i(E);return}if(s instanceof google.maps.Map){const E=new google.maps.LatLngBounds;for(const x of f){const g=x.position;if(!g)continue;const _=(typeof g.lat=="number",g);E.extend(_)}s.fitBounds(E,150)}},[s,e,t,i,r]),a=p.useMemo(()=>({render:({count:v,position:m})=>{const f=document.createElement("div");return f.className=ke.cluster,f.innerHTML=`<span class="${ke.number}">${v}</span>`,new google.maps.marker.AdvancedMarkerElement({position:m,content:f,zIndex:v})}}),[]),c=p.useRef(new _5({renderer:a,map:null,onClusterClick:o})),l=p.useRef([]),[u,d]=p.useState([]);p.useEffect(()=>{d([]),c.current.clearMarkers()},[e,s]),p.useEffect(()=>{c.current.setMap(null),s&&c.current.setMap(s)},[s]),p.useEffect(()=>{!s||!u.length||c.current.addMarkers(u)},[u,s]);function h(v){u.length||d(v)}return S.jsx(S.Fragment,{children:e.map((v,m)=>{const f=m===0,w=m===e.length-1;return f&&(l.current=[]),S.jsx(j5,{point:v,handleCloseClick:t,setMarkerRef:y=>{y&&(l.current.push(y),w&&h([...l.current]))},...n},v.uid)})})},F5=p.memo(I5),B5=t=>{const e=At(Em);return S.jsx(F5,{points:e,...t})},V5=p.memo(B5),Nh=t=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:42,height:42,fill:"none",viewBox:"0 0 42 42",...t},j.createElement("rect",{width:42,height:42,fill:"#fff",rx:21}),j.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M31.003 28V17.766a3 3 0 0 0-1.579-2.643l-7.003-3.765a3 3 0 0 0-2.842 0l-7.003 3.765a3 3 0 0 0-1.58 2.643V28a3 3 0 0 0 3 3h14.008a3 3 0 0 0 3-3Zm-5.919 1h2.92a1 1 0 0 0 1-1V17.766a1 1 0 0 0-.527-.881l-7.003-3.766a1 1 0 0 0-.948 0l-7.003 3.766a1 1 0 0 0-.527.88v10.237a1 1 0 0 0 1 1h2.92a2.513 2.513 0 0 1-.05-.5v-7.606a2.5 2.5 0 0 1 2.5-2.5h3.268a2.5 2.5 0 0 1 2.5 2.5V28.5c0 .171-.017.338-.05.5Zm-2.426 0a.5.5 0 0 0 .476-.499v-7.606a.5.5 0 0 0-.5-.5h-3.269a.5.5 0 0 0-.5.5V28.5a.5.5 0 0 0 .476.5h3.317Z",clipRule:"evenodd"}),j.createElement("rect",{width:41,height:41,x:.5,y:.5,stroke:"#1D3665",strokeOpacity:.1,rx:20.5})),H5="DeliveryBalloon-module__root__Nu90iy",U5="DeliveryBalloon-module__details__eqUTaI",$5="DeliveryBalloon-module__wh__1lJtLN",z5="DeliveryBalloon-module__header__JVdyxN",q5="DeliveryBalloon-module__title__-zKKCt",G5="DeliveryBalloon-module__description__no5-ki",W5="DeliveryBalloon-module__actions__C-N0H-",Z5="DeliveryBalloon-module__errorVariant__e6uhZl",K5="DeliveryBalloon-module__logo__62gC5h",Nt={root:H5,details:U5,wh:$5,header:z5,title:q5,description:G5,actions:W5,errorVariant:Z5,logo:K5},Q5=({SSR:t,address:e,className:n,hasCloseButton:r,hideDetails:i,onClose:s,onDetails:o,variant:a})=>{const{onWarehouseSelect:c,warehouseSelection:l}=Ee(),{setWarehousePoint:u,warehousePoint:d}=xe(),h=a==="error",v=a==="default",m=function(){return l?t?"{ courier_balloon.warehouse_title }":S.jsx(Ft,{keyName:"warehouse_title",ns:"courier_balloon"}):t?"{ courier_balloon.title }":S.jsx(Ft,{keyName:"title",ns:"courier_balloon"})}(),f=t?"{ courier_balloon.error_title }":S.jsx(Ft,{keyName:"error_title",ns:"courier_balloon"}),w=t?"{ courier_balloon.error_description }":S.jsx(Ft,{keyName:"error_description",ns:"courier_balloon"});function y(){d&&(c==null||c(d),u(null))}const{label:C,onClick:b}=l?{onClick:y,label:t?"{ select }":S.jsx(Ft,{keyName:"select",ns:"common"})}:{onClick:o,label:t?"{ details }":S.jsx(Ft,{keyName:"details",ns:"common"})};return S.jsxs("div",{className:Y(Nt.root,n,Nt[`${a}Variant`]),children:[S.jsxs("div",{className:Nt.header,children:[S.jsx(Nh,{className:Nt.logo}),S.jsx("span",{className:Nt.title,children:h?f:m}),r&&S.jsx(Ar,{onClick:s})]}),S.jsx("div",{className:Nt.description,children:h?w:e||"{{ properties.address }}"}),v&&(!i||l)&&S.jsx("div",{className:Nt.actions,children:S.jsx(it,{id:ed,as:"button",variant:"primary",className:Y(Nt.details,l?Nt.wh:""),onClick:b,children:C})})]})},J5="Chip-module__root__zsoSyP",X5="Chip-module__active__BlTSFB",Iu={root:J5,active:X5},Fu=({active:t,children:e,className:n,...r})=>S.jsx("div",{...r,className:Y(Iu.root,n,{[Iu.active]:t}),children:e}),Y5="TextArea-module__root__8YFknR",e6={root:Y5},Bu=p.forwardRef(({className:t,inputRef:e,onBlur:n,onChange:r,onFocus:i,...s},o)=>{const a=p.useRef(null);p.useImperativeHandle(o,()=>({focus:()=>{var l,u;(l=a.current)==null||l.focus(),i&&i({target:{value:(u=a.current)==null?void 0:u.value}})},blur:()=>{var l,u;(l=a.current)==null||l.blur(),n&&n({target:{value:(u=a.current)==null?void 0:u.value}})},setValue:l=>{r&&r({target:{value:l}}),a.current&&(a.current.value=l)}}),[n,r,i]);const c=Vh(e,a);return S.jsx("textarea",{...s,ref:c,className:Y(e6.root,t),onBlur:n,onFocus:i,onChange:r})}),t6=({hideDeliveryTime:t,set:e})=>(n,r)=>{let i={...n};switch(r.type){case"SET_COMMENT":{i={...n,comment:r.payload};break}case"SET_DELIVERY_TIME":{i={...n,delivery_time:r.payload};break}case"SET_APARTMENT_NUMBER":{i={...n,apartment_number:r.payload};break}}return i.meta={...i.meta,valid:(t||!!i.delivery_time)&&!!i.apartment_number},e==null||e(i),i},n6="DeliveryDetailsView-module__title__azeoUr",r6="DeliveryDetailsView-module__logo__4zZtpM",i6="DeliveryDetailsView-module__header__oDE9He",s6="DeliveryDetailsView-module__content__6P27SY",o6="DeliveryDetailsView-module__section__2M3Qip",a6="DeliveryDetailsView-module__chips__KmYgha",c6="DeliveryDetailsView-module__actions__43XZ-V",l6="DeliveryDetailsView-module__submit__58LKBw",u6="DeliveryDetailsView-module__actionsHidden__SW-67b",d6="DeliveryDetailsView-module__commentSection__GlX1A2",f6="DeliveryDetailsView-module__comment__2pGG6h",Ue={title:n6,logo:r6,header:i6,content:s6,section:o6,chips:a6,actions:c6,submit:l6,actionsHidden:u6,commentSection:d6,comment:f6},h6=p.forwardRef(({classes:t,hideActions:e,location:n,onChange:r,onClose:i,onSubmit:s},o)=>{var g;const{hideDeliveryTime:a,inputs:c,locale:l}=Ee(),{t:u}=mt(["details_modal","courier_balloon","common"]),d=p.useMemo(()=>t6({set:r,hideDeliveryTime:a}),[a,r]),[h,v]=p.useState(!1),[m,f]=p.useReducer(d,{comment:"",delivery_time:"",apartment_number:"",...n}),w=p.useCallback(async()=>{v(!0);try{Ot(n.address,"Address is required");const _=await qh({address:n.address,algorithm:10,service:10,language:l||td});if(!Ld(_))return;const O=_==null?void 0:_.data.data,T={...m,address:O};return s==null||s(T),T}finally{v(!1)}},[l,n.address,s,m]);p.useImperativeHandle(o,()=>({submit:w}),[w]);const y=_=>()=>{f({payload:_,type:"SET_DELIVERY_TIME"})},C=_=>{f({payload:_.target.value,type:"SET_APARTMENT_NUMBER"})},b=_=>{f({payload:_.target.value,type:"SET_COMMENT"})},E=so(c==null?void 0:c.apartment),x=so(c==null?void 0:c.comment);return S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:Y(Ue.header,t==null?void 0:t.header),children:[S.jsx(Ar,{onClick:i}),S.jsxs("div",{className:Ue.title,children:[S.jsx(Nh,{className:Ue.logo}),S.jsx("span",{children:u("title",{ns:"courier_balloon"})})]})]}),S.jsxs("div",{className:Y(Ue.content,t==null?void 0:t.content),children:[S.jsxs("section",{className:Ue.section,children:[S.jsxs("span",{children:[u("address"),":"]}),S.jsx("p",{children:n.address})]}),!a&&S.jsxs("section",{className:Ue.section,children:[S.jsxs("span",{children:[u("delivery_time"),":"]}),S.jsxs("div",{className:Ue.chips,children:[S.jsx(Fu,{active:m.delivery_time==="8:00-13:00",onClick:y("8:00-13:00"),children:"8:00 - 13:00"}),S.jsx(Fu,{active:m.delivery_time==="14:00-22:00",onClick:y("14:00-22:00"),children:"14:00 - 22:00"})]})]}),S.jsxs("section",{className:Ue.section,children:[S.jsxs("span",{children:[u("apartment_number"),":"]}),S.jsx(Bu,{...E,rows:1,onChange:C})]}),S.jsxs("section",{className:Y(Ue.section,Ue.commentSection),children:[S.jsxs("span",{children:[u("comment"),":"]}),S.jsx(Bu,{...x,className:Ue.comment,onChange:b})]})]}),S.jsx("div",{className:Y(Ue.actions,{[Ue.actionsHidden]:e}),children:S.jsx(it,{loading:h,disabled:!((g=m.meta)!=null&&g.valid)||h,variant:"primary",className:Ue.submit,onClick:w,children:u("choose",{ns:"common"})})})]})}),jh=p.memo(h6),p6={header:ke.deliveryDetailsViewHeader,content:ke.deliveryDetailsViewContent},m6=({hideDeliveryTime:t,hideDetails:e,onPointClick:n,point:r,setDeliveryPoint:i,setOpenDetails:s})=>{var L;const[o,a]=p.useState(!1),[c,l]=p.useState(!1),[u,d]=p.useState({...r,comment:"",delivery_time:"",apartment_number:""}),h=p.useRef(null),v=p.useRef(null),{warehouseSelection:m}=Ee(),{warehousePoint:f}=xe(),w=fc({isSelectedPoint:!0}),y=((L=h.current)==null?void 0:L.checkVisibility())??!1;p.useEffect(()=>{setTimeout(()=>{a(!0)},100)},[]),p.useEffect(()=>{d({...r,comment:"",delivery_time:"",apartment_number:""})},[r]);const C=Bn("screenSm"),b=p.useMemo(()=>({lat:u.coords[0],lng:u.coords[1]}),[u.coords]),E=()=>{s==null||s(!0)},x=()=>{i==null||i(null)},g=p.useMemo(()=>rr(We.PinHome,"--owl-color-success"),[]),_=async()=>{var A;try{l(!0);const D=await((A=v.current)==null?void 0:A.submit());if(!D)return;n==null||n(D),s==null||s(!1),i==null||i(null)}finally{l(!1)}},O=S.jsx(Q5,{...u,hideDetails:e,hasCloseButton:C,variant:u.address?"default":"error",className:ke.balloon,onDetails:E,onClose:x}),T=m?!!f&&y:w&&!y,R=t?!!u.apartment_number:!!u.apartment_number&&!!u.delivery_time;return S.jsxs(S.Fragment,{children:[S.jsx(dc,{ref:h,position:b,children:S.jsx("span",{dangerouslySetInnerHTML:{__html:g}})}),C&&S.jsxs(ph,{minSnapHeight:u.address?200:void 0,submitDisabled:!R||c,submitLoading:c,hideFooter:!u.address,open:T,onDismiss:x,onSubmitClick:_,children:[u.address&&S.jsx(jh,{ref:v,hideActions:!0,classes:p6,location:r,onChange:d,onClose:x}),u.address?null:O]}),!C&&T&&S.jsx(Xd,{anchor:h.current||void 0,onCloseClick:x,children:O})]})},g6=t=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:48,height:66,viewBox:"0 0 48 66",fill:"none",...t},j.createElement("path",{d:"M23.999 66C35.0452 66 44 63.3137 44 59.9999C44 56.6863 35.0452 54 23.999 54C12.9548 54 4 56.6863 4 59.9999C4 63.3137 12.9548 66 23.999 66Z",fill:"url(#paint0_radial_2882_25472)",fillOpacity:.4}),j.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24 0C35.2114 0 48 8.2877 48 24.0882C48 34.5995 40.0114 48.4107 24 60C7.98857 48.4107 0 34.5995 0 24.0882C0 8.2877 12.7886 0 24 0Z",fill:"#cc0000"}),j.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.0042 24.2835C9.80882 16.3692 16.4453 10 24.2856 10C31.7119 10.1904 37.8053 16.1895 37.9957 23.7122C38.1861 31.4253 31.9975 37.8053 24.2856 37.9957C16.5736 38.1862 10.1946 31.9966 10.0042 24.2835ZM24 31.7778C28.2955 31.7778 31.7778 28.2955 31.7778 24C31.7778 19.7045 28.2955 16.2222 24 16.2222C19.7044 16.2222 16.2222 19.7045 16.2222 24C16.2222 28.2955 19.7044 31.7778 24 31.7778Z",fill:"#ffffff"}),j.createElement("defs",null,j.createElement("radialGradient",{id:"paint0_radial_2882_25472",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(24 60) rotate(90) scale(6 20)"},j.createElement("stop",null),j.createElement("stop",{offset:1,stopOpacity:0})))),v6={open:!1},y6=t=>t.open,sn=zt(t=>({...v6,toggle(e){t(n=>({open:e??!n.open}))}})),b6={place:null,locationPin:null,mapKey:"",searchResetEpoch:0},w6=t=>{var e,n;return(n=(e=t.place)==null?void 0:e.address_components)==null?void 0:n.find(r=>r.types.includes("locality"))},S6=t=>t.locationPin,Tt=zt((t,e)=>({...b6,setMapKey(n){t({mapKey:n})},async setPlace(n,r,i){var c,l,u,d,h,v;const{map:s}=X.getState();let o,a;if(console.debug("[OmnicWidgetLocations::setDeliveryAdressPlace]",{value:n,types:r}),ua(n)){const m=await da(n,e().mapKey,r);o=(c=m==null?void 0:m.results)==null?void 0:c[0],i&&(o=(l=m==null?void 0:m.results)==null?void 0:l.find(f=>{var w;return(w=f.types)==null?void 0:w.includes(i)}))}else if(o=n,o!=null&&o.place_id){const{results:m}=await da(o.place_id,e().mapKey);a=(d=(u=m==null?void 0:m[0])==null?void 0:u.geometry)==null?void 0:d.viewport}else(h=o==null?void 0:o.geometry)!=null&&h.viewport?a=o.geometry.viewport:(v=o==null?void 0:o.geometry)!=null&&v.location&&(a=new google.maps.LatLngBounds,a.extend(o.geometry.location));return a&&(console.debug("[OmnicWidgetLocations::fitMapBounds]",a.toJSON()),s==null||s.fitBounds(a)),Ot(o,"Place is not defined"),t({place:o}),o},async setPlaceAndPoint(n,r){var l;const i=r==null?void 0:r.types,s=ua(n)?await e().setPlace(n,i):await e().setPlace(n),o=(l=s.geometry)==null?void 0:l.location;Ot(o,"Location is not defined");const a=[o.lat(),o.lng()],c={address:s.formatted_address,coords:a};return r!=null&&r.warehouseSelection&&xe.getState().setWarehousePoint({...s,coords:{lat:o.lat(),lng:o.lng()}}),(!(r!=null&&r.ignoreSelection)||r!=null&&r.warehouseSelection)&&xe.getState().setDeliverPoint(c),s},setPlaceSimple(n,r){var i,s,o;if(r!=null&&r.withNavigation){const{map:a}=X.getState();Ot(a,"Map is not defined");let c;(i=n==null?void 0:n.geometry)!=null&&i.viewport?c=n.geometry.viewport:(s=n==null?void 0:n.geometry)!=null&&s.location&&(c=new google.maps.LatLngBounds,c.extend(n.geometry.location)),c&&(a.fitBounds(c),a.setZoom(12)),t({place:n,locationPin:(o=n==null?void 0:n.geometry)!=null&&o.location?{type:"place",place:n}:null});return}t({place:n})},setLocationPinCoordinates(n){t({locationPin:{type:"coordinates",coordinates:n}})},hideLocationPin(){t({locationPin:null})},resetSearch(){t(n=>({place:null,locationPin:null,searchResetEpoch:n.searchResetEpoch+1})),xe.getState().setDeliverPoint(null),xe.getState().setWarehousePoint(null),Ke.getState().setSelectedLocation(null),X.getState().setDetailsOpen(!1),sn.getState().toggle(!1)}})),C6="LocationPin-module__pin__DFrLoH",_6={pin:C6},E6=()=>{const t=Tt(S6),e=p.useMemo(()=>{var r;if((t==null?void 0:t.type)==="coordinates")return{lat:t.coordinates[0],lng:t.coordinates[1]};const n=(r=t==null?void 0:t.place.geometry)==null?void 0:r.location;return n?{lat:n.lat(),lng:n.lng()}:null},[t]);return e?S.jsx(dc,{position:e,children:S.jsx("span",{className:_6.pin,children:S.jsx(g6,{})})}):null},So=()=>S.jsx(mh,{children:S.jsx(qs,{})});async function x6(){return(await Se.request({method:"GET",baseURL:"https://api.geo-data.omnic.solutions/api/1.0/",url:"/key-data",headers:{Authorization:"Token fa812020-3197-401a-9b39-345999046111"}})).data.data}function O6(t){return Rh({queryKey:["wl-map-key-wl"],queryFn:()=>x6(),refetchOnWindowFocus:!1,retry:2,enabled:t})}const Ih=p.createContext(null),Fh=({asGlobalProvider:t=!1,children:e,gMapId:n,gMapKey:r,locale:i,mapTheme:s})=>{const o=p.useRef(i),a=!r||!n,{data:c,isFetching:l}=O6(a),u=c==null?void 0:c.key;function d(){var y,C,b;switch(s){case"omnic":return(y=c==null?void 0:c.additional_data)==null?void 0:y.map_id_omnic;case"llama":return(C=c==null?void 0:c.additional_data)==null?void 0:C.map_id_llama;case"chip":return(b=c==null?void 0:c.additional_data)==null?void 0:b.map_id_chip;default:return"e130cd87a3f1b9cbe3cb5de4"}}const h=r||u||"AIzaSyDsI0AO8VsUrTPoyR9fF7T31FKx1a9TLO0",v=n||d(),m=p.useMemo(()=>({mapKey:h,mapId:v,isFetching:l}),[v,h,l]),{setMapKey:f}=Tt();p.useEffect(()=>{f(h)},[h,f]);const w=()=>l?t?e:S.jsx(So,{}):S.jsx(Ym,{apiKey:h,language:o.current,libraries:cp,children:e});return S.jsx(Ih.Provider,{value:m,children:w()})},Bh=()=>{const t=p.useContext(Ih);if(!t)throw new Error("useMapKeyApiContext must be used within a MapKeyApiProvider");return t},P6=({children:t,className:e,...n})=>{const{disableDelivery:r,map:i,warehouseSelection:s}=Ee(),{mapId:o}=Bh(),a=p.useMemo(()=>{var l,u;return{lat:((l=i==null?void 0:i.center)==null?void 0:l[0])??na[0],lng:((u=i==null?void 0:i.center)==null?void 0:u[1])??na[1]}},[i==null?void 0:i.center]),c=p.useCallback(async l=>{const u=l.detail.latLng;if(!u||r&&!s)return;X.getState().setDetailsOpen(!1),Ke.getState().setSelectedLocation(null);const d=[u.lat,u.lng];console.debug("[OmnicLocationsWidget::mapClick]",d);try{await Tt.getState().setPlaceAndPoint(d,{warehouseSelection:s})}catch{xe.getState().setDeliverPoint({address:null,coords:d})}},[r,s]);return S.jsx(Jd,{disableDefaultUI:!0,mapId:o,defaultZoom:i==null?void 0:i.initialZoom,defaultCenter:a,className:Y(ke.root,e),clickableIcons:!1,minZoom:4,maxZoom:20,restriction:{strictBounds:!0,latLngBounds:{north:85,south:-85,west:-179,east:179}},onClick:c,...n,children:t})},T6=t=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},j.createElement("rect",{width:2,height:20,x:9,fill:"#fff",rx:1}),j.createElement("rect",{width:2,height:20,x:20,y:9,fill:"#fff",rx:1,transform:"rotate(90 20 9)"}),j.createElement("circle",{cx:10,cy:10,r:8,fill:"#fff"}),j.createElement("circle",{cx:10,cy:10,r:6,fill:"currentcolor"}),j.createElement("circle",{cx:10,cy:10,r:4,fill:"#fff"})),A6=t=>{const e=document.createElement("div"),n=document.createElement("div");e.classList.add(ke.mapControl),n.classList.add(ke.mapControl),e.innerHTML="+",n.innerHTML="—",t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(n),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{const r=t.getZoom()||0;return t.setZoom(r+1)}),n.addEventListener("click",()=>{const r=t.getZoom()||0;return t.setZoom(r-1)})},R6=t=>{const e=document.createElement("div");e.classList.add(ke.mapControl),e.classList.add(ke.geolocationControl),e.innerHTML=Qh.renderToString(S.jsx(T6,{})),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{cc()})},L6=({className:t})=>{const e=pn(),n=X(Ip),r=X(Hp),i=At(Nd),s=xe(ec),o=ji(),{lmsData:a}=mo(),{cityName:c,countryAbbreviation:l,disableGeolocation:u,disableLocationPinOnMap:d,hideDeliveryTime:h,hideDetails:v,hideMapControls:m,onPointClick:f,regionName:w,skipPointInfo:y}=Ee(),C=p.useCallback(I=>{console.debug("[OmnicLocationsWidget::loadMap]",I),X.getState().setMap(I),X.getState().setLoaded(),m||(A6(I),u||R6(I))},[u,m]),b=p.useCallback(()=>{console.debug("[OmnicLocationsWidget::unmountMap]"),X.getState().setMap(null)},[]);p.useEffect(()=>{if(o)return C(o),()=>{b()}},[o,C,b]);const E=p.useCallback(I=>{const z=a==null?void 0:a.location.what3words,le=z!=null&&z.id?z:void 0;f==null||f(I,le)},[f,a]),x=p.useRef(null),g=p.useRef(null),_=p.useCallback(I=>{const z=I.getSouthWest(),le=I.getNorthEast(),ne=Oe=>Math.round(Oe*1e3)/1e3,se=`${ne(z.lat())}:${ne(z.lng())}:${ne(le.lat())}:${ne(le.lng())}`,Z=JSON.stringify(e??{});return`${se}|${Z}|${c??""}|${l??""}|${w??""}`},[c,l,e,w]),O=p.useCallback(()=>{X.getState().setIdle(!0),n&&(x.current&&window.clearTimeout(x.current),x.current=window.setTimeout(()=>{const I=n.getBounds();if(!I)return;const z=_(I);g.current!==z&&(g.current=z,console.debug("[OmnicLocationsWidget::changeBounds]",I),At.getState().loadNext({bounds:[[I.getSouthWest().lat(),I.getNorthEast().lat()],[I.getSouthWest().lng(),I.getNorthEast().lng()]],filter:e,city_name:c,country_abbreviation:l,region_name:w}))},250))},[_,c,l,e,n,w]);p.useEffect(()=>()=>{x.current&&window.clearTimeout(x.current)},[]);const T=p.useCallback(async I=>{xe.getState().setDeliverPoint(null),Ke.getState().setSelectedLocation(I)},[]),R=p.useCallback(()=>{console.debug("[OmnicLocationsWidget::tilesLoaded]")},[]),L=X.getState().setDetailsOpen,{getLMSData:A}=Ab(),D=I=>{if(A(I.code),y){E(I);return}L(!1),T(I)},N=()=>{L(!1),T(null)},V=I=>{L(!0),T(I)},q=I=>{E(I),L(!1),T(null)};return S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:Y(ke.mapContainer,t),children:[S.jsxs(P6,{onIdle:O,onTilesLoaded:R,onBoundsChanged:()=>{X.getState().setIdle(!1)},children:[s&&S.jsx(m6,{hideDeliveryTime:h,hideDetails:v,point:s,setOpenDetails:X.getState().setDetailsOpen,setDeliveryPoint:xe.getState().setDeliverPoint,onPointClick:E}),d?null:S.jsx(E6,{}),S.jsx(V5,{handleCloseClick:N,handleDetailsClick:V,handlePointClick:D,handleSubmitClick:q})]}),(i||r)&&S.jsx(mh,{className:ke.overlay,children:S.jsx(qs,{})})]}),S.jsx(K4,{handleDetailsClick:V,handlePointClick:D}),S.jsx(E4,{handleCloseClick:N,handleSubmitClick:q})]})},k6=p.memo(L6),M6=t=>({google:k6})[t];function Vh(...t){return p.useCallback(e=>{for(const n of t)typeof n=="function"?n(e):n&&typeof n=="object"&&(n.current=e)},t)}const so=t=>{const e=p.useCallback(()=>{var n;(n=t==null?void 0:t.onClick)==null||n.call(t,t.name)},[t]);return{ref:t==null?void 0:t.ref,name:t==null?void 0:t.name,onClick:e}},D6=()=>{throw new Error("useMediaQuery is a client-only hook")};function N6(t){const e=p.useCallback(r=>{const i=window.matchMedia(t);return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[t]),n=()=>window.matchMedia(t).matches;return p.useSyncExternalStore(e,n,D6)}const j6="768px",I6="1024px",F6="1280px",B6="1536px",V6={screenSm:j6,screenMd:I6,screenLg:F6,screenXl:B6};function Bn(t){return N6(`(max-width: calc(${V6[t]} - 1px))`)}const Hh=Tv().use(mv()).use(ov()).init({defaultLanguage:"en",defaultNs:"common",ns:["common","courier_balloon","current_location","details_modal","header","location_aside","location_selector","receive_filter","send_filter","type_filter"],apiUrl:"https://tms.omnic.solutions",apiKey:"tgpak_gfpwentkga2g4zdngbzwozdinvztezlknu4xmnlpnbrgc"}),H6=t=>{p.useEffect(()=>{t&&(Hh.changeLanguage(t),$s.setLanguage(t))},[t])},U6=t=>{p.useEffect(()=>{if(t){const e=Object.keys(t);for(const n of e){const r=t[n];r&&Di(`--owl-color-${n}`,r)}}},[t])},$6=t=>{p.useEffect(()=>{t&&t!==void 0&&Di("--owl-button-radius",`${t}px`)},[t])},z6=t=>{p.useEffect(()=>{t&&t!==void 0&&Di("--owl-font",t)},[t])},q6=500,wt=[];function Rc(t={}){const{country:e,debounceMs:n=q6,globalSearch:r,onCoordinatesSelect:i,onPlaceSelect:s,types:o}=t,a=r?void 0:e,c=uc("places"),[l,u]=p.useState(""),[d,h]=p.useState(""),[v,m]=p.useState(wt),[f,w]=p.useState(!1),y=p.useMemo(()=>o,[JSON.stringify(o)]),C=p.useRef(null),b=p.useRef(),E=p.useRef(null),x=p.useRef(0),g=p.useRef(s),_=p.useRef(i);g.current=s,_.current=i;const O=p.useCallback(()=>c?(C.current||(C.current=new c.AutocompleteSessionToken),C.current):null,[c]),T=p.useCallback(()=>{C.current=null},[]),R=p.useCallback(()=>{m(wt)},[]),L=p.useCallback(N=>{E.current=N,u(N)},[]),A=p.useCallback(N=>{h(N),L(N)},[L]);p.useEffect(()=>{if(E.current!==null&&E.current===l){E.current=null;return}E.current=null;const N=l.trim();if(!N){m(I=>I.length>0?wt:I);return}clearTimeout(b.current);const V=Dd(N);if(V.kind!=="none"){if(w(!1),V.kind==="valid"&&_.current){m([{placeId:`coordinates:${V.normalized}`,mainText:"",secondaryText:V.normalized,description:V.normalized,type:"coordinates",coordinates:V.coordinates}]);return}m(I=>I.length>0?wt:I);return}if(!c){m(I=>I.length>0?wt:I);return}x.current+=1;const q=x.current;return b.current=setTimeout(async()=>{w(!0);try{const I=O(),z={input:N,...I&&{sessionToken:I},...a&&{includedRegionCodes:[a]},...(y==null?void 0:y.length)&&{includedPrimaryTypes:y}},{suggestions:le}=await c.AutocompleteSuggestion.fetchAutocompleteSuggestions(z);if(q!==x.current)return;const ne=le.filter(se=>se.placePrediction!==null).map(se=>{var Oe,Ce;const Z=se.placePrediction;return{placeId:Z.placeId,mainText:((Oe=Z.mainText)==null?void 0:Oe.text)??"",secondaryText:((Ce=Z.secondaryText)==null?void 0:Ce.text)??"",description:Z.text.text}});m(ne.length>0?ne:wt)}catch(I){if(q!==x.current)return;console.error("[usePlaceAutocomplete] Failed to fetch suggestions:",I),m(wt)}finally{q===x.current&&w(!1)}},n),()=>clearTimeout(b.current)},[l,c,a,y,n,O]),p.useEffect(()=>Tt.subscribe((V,q)=>{V.searchResetEpoch!==q.searchResetEpoch&&(clearTimeout(b.current),x.current+=1,E.current="",u(""),h(""),m(wt),w(!1))}),[]);const D=p.useCallback(async N=>{var V,q;if(N.type==="coordinates"&&N.coordinates){(V=_.current)==null||V.call(_,N.coordinates,N.description),T(),m(wt);return}if(c)try{const I=new c.Place({id:N.placeId}),z=await Md(I);(q=g.current)==null||q.call(g,z),T(),m(wt)}catch(I){console.error("[usePlaceAutocomplete] Failed to fetch place details:",I)}},[c,T]);return p.useMemo(()=>({value:l,selectedValue:d,setValue:u,commitValue:A,suggestions:v,isLoading:f,clearSuggestions:R,handleSelect:D}),[l,d,A,v,f,R,D])}const G6=t=>{const e=t==="selector";p.useEffect(()=>{e&&sn.getState().toggle(!0)},[e])},W6=t=>{p.useEffect(()=>{t==="sharp"&&Di("--owl-radius","0")},[t])},Z6=({children:t})=>{const{cornersVariant:e,font:n,locale:r,palette:i,radius:s,startScreen:o}=Ee();return z6(n),H6(r),U6(i),$6(s),G6(o),W6(e),S.jsx(S.Fragment,{children:t})},K6=({children:t})=>{const{disableGeolocation:e,map:n}=Ee(),[r,i]=p.useState(e),{loaded:s}=X();return Ot(n==null?void 0:n.center,"Map center is required"),Ot(n==null?void 0:n.initialZoom,"Map initial zoom is required"),p.useEffect(()=>{!s||e||r||cc({success:o=>{n.center=[o.coords.latitude,o.coords.longitude],i(!0),Ke.getState().setIsTrackingEnabled(!0)},error:()=>{i(!0)}})},[e,r,s,n]),t},Q6=t=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:28,fill:"none",viewBox:"0 0 24 28",...t},j.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M24 11.777C24 4.052 17.606 0 12 0S0 4.052 0 11.777C0 16.915 3.994 22.334 12 28c8.006-5.666 12-11.085 12-16.224ZM12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z",clipRule:"evenodd"})),J6=()=>{sn.getState().toggle(!0),X.getState().setDetailsOpen(!1),xe.getState().setDeliverPoint(null),Ke.getState().setSelectedLocation(null)},X6="CurrentLocation-module__root__AeQCGT",Y6="CurrentLocation-module__icon__459m9q",ew="CurrentLocation-module__text__w-9v28",Xo={root:X6,icon:Y6,text:ew},Uh=({className:t})=>{const{t:e}=mt("current_location"),n=Tt(w6),{location:r}=Ke(),s=(r==null?void 0:r.location.full_address)??(n==null?void 0:n.long_name)??e("choose_from_map");return S.jsxs("div",{role:"presentation",className:Y(Xo.root,t),onClick:J6,children:[S.jsx(Q6,{className:Xo.icon}),S.jsx("span",{className:Xo.text,children:s})]})},tw=t=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:123,height:32,fill:"none",viewBox:"0 0 123 32",...t},j.createElement("path",{fill:"currentcolor",d:"M6.698 32a6.579 6.579 0 0 1-3.35-.889 6.718 6.718 0 0 1-2.443-2.4A6.285 6.285 0 0 1 0 25.422V6.578c0-1.215.302-2.311.905-3.29A6.718 6.718 0 0 1 3.35.889 6.579 6.579 0 0 1 6.698 0h19.188c1.207 0 2.308.296 3.304.889a6.72 6.72 0 0 1 2.444 2.4c.633.978.95 2.074.95 3.289v18.844a6.061 6.061 0 0 1-.95 3.29 6.72 6.72 0 0 1-2.444 2.4c-.996.592-2.097.888-3.304.888H6.698Zm.317-6.933h18.464V6.933H7.015v18.134ZM37.568 32V0h7.24l11.043 12.933L66.848 0h7.287v32h-7.06V10.533L55.85 23.69 44.582 10.578V32h-7.014Zm41.985 0V0h7.241l18.238 21.333V0h7.105v32h-7.241L86.568 10.578V32h-7.015Zm36.523 0V0H123v32h-6.924Z"})),nw=t=>j.createElement("svg",{width:119,height:44,viewBox:"0 0 119 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},j.createElement("path",{d:"M4.70489 0.199253H0V13.4418H10.7452V10.0105H4.70489V0.199253Z",fill:"black"}),j.createElement("path",{d:"M16.9359 0.199253H12.2287V13.4418H22.974V10.0105H16.9359V0.199253Z",fill:"black"}),j.createElement("path",{d:"M27.9807 0.199253L23.6569 13.4418H28.3442L28.9701 10.913H32.5644L33.1703 13.4418H37.9766L33.6354 0.199253H27.9807ZM29.6775 8.00558L30.7881 3.41028L31.879 8.00558H29.6775Z",fill:"black"}),j.createElement("path",{d:"M48.1266 6.0777L47.5404 8.54701H47.5008L46.9146 6.0777L45.3786 0.199253H38.7936V13.4418H42.9146V8.84631L42.8551 4.39405H42.9345L45.48 13.4418H49.2373L51.8222 4.39405H51.8817L51.8222 8.84631V13.4418H55.9233V0.199253H49.6626L48.1266 6.0777Z",fill:"black"}),j.createElement("path",{d:"M61.057 0.199253L56.7333 13.4418H61.4206L62.0465 10.913H65.6429L66.2489 13.4418H71.0552L66.7139 0.199253H61.057ZM62.7539 8.00558L63.8645 3.41028L64.9553 8.00558H62.7539Z",fill:"black"}),j.createElement("path",{d:"M85.656 6.77975C86.6916 6.6323 87.4541 6.28455 87.9389 5.73657C88.4238 5.18853 88.6662 4.51949 88.6662 3.72939C88.6662 2.55195 88.2562 1.67601 87.4344 1.1016C86.6145 0.513972 85.3607 0.212458 83.677 0.199253H76.0413V13.4418H84.2015C85.8301 13.4418 87.0354 13.1533 87.8177 12.5789C88.611 11.9913 89.0099 11.1132 89.0099 9.95118C89.0099 9.09505 88.7411 8.38636 88.2011 7.82518C87.6612 7.26393 86.8151 6.9228 85.656 6.80175V6.77975ZM80.5455 3.41028H82.6457C83.4545 3.41028 83.8577 3.7316 83.8577 4.37425C83.8577 5.01689 83.4545 5.33822 82.6457 5.33822H80.5455V3.41028ZM83.8797 10.1492C83.677 10.312 83.3685 10.3913 82.952 10.3913H80.5499V8.46561H82.952C83.3685 8.46561 83.6792 8.54701 83.8797 8.70549C84.0957 8.86619 84.2015 9.09945 84.2015 9.40754C84.2015 9.71567 84.0935 9.97757 83.8797 10.1492Z",fill:"black"}),j.createElement("path",{d:"M114.374 6.72035L118.616 0.199253H113.485L111.91 3.51152L110.354 0.199253H104.801L109.063 6.8414L104.638 13.4418H109.951L111.566 10.0105L113.325 13.4418H118.999L114.374 6.72035Z",fill:"black"}),j.createElement("path",{d:"M102.472 0.378544C102.053 0.125449 101.59 0 101.086 0H93.0312C92.5242 0 92.0549 0.127649 91.6252 0.378544C91.1931 0.631642 90.8517 0.972769 90.5982 1.40194C90.3448 1.8201 90.217 2.28667 90.217 2.80386V10.8369C90.217 11.3432 90.3448 11.8097 90.5982 12.2388C90.8517 12.6681 91.1931 13.0092 91.6252 13.2622C92.0549 13.5152 92.5242 13.6407 93.0312 13.6407H101.086C101.593 13.6407 102.053 13.513 102.472 13.2622C102.902 13.0092 103.245 12.6681 103.497 12.2388C103.763 11.8097 103.895 11.341 103.895 10.8369V2.80606C103.895 2.28667 103.761 1.8201 103.497 1.40414C103.243 0.974969 102.902 0.633842 102.472 0.380745V0.378544ZM100.116 9.89279H93.9611V3.75243H100.116V9.89279Z",fill:"black"}),j.createElement("path",{d:"M43.3879 27.3704C42.6166 26.8512 41.7372 26.4993 40.7478 26.3145L44.9726 21.5605H40.8226L36.1199 26.794V30.7935C37.0917 30.4415 37.9887 30.2655 38.8107 30.2655C39.5644 30.2655 40.2101 30.4085 40.7478 30.6923C41.6204 31.1455 42.0569 31.8319 42.0569 32.7559V32.8307C42.0569 33.1827 41.973 33.4269 41.8056 33.5611C41.6558 33.6953 41.3692 33.7635 40.9505 33.7635H32.8715C32.2345 33.7635 31.7983 33.6469 31.5625 33.4115C31.3444 33.1607 31.2363 32.6987 31.2363 32.0277V26.3431L27.0866 28.532V32.6569C27.0866 33.0925 27.0117 33.3873 26.8595 33.5369C26.7075 33.6887 26.4144 33.7635 25.9803 33.7635H23.7412C23.305 33.7635 23.0118 33.6887 22.8619 33.5369C22.7121 33.3851 22.6349 33.0925 22.6349 32.6569V26.8468L18.4852 29.0357V32.6591C18.4852 33.0947 18.4103 33.3895 18.2583 33.5391C18.1084 33.6909 17.8131 33.7657 17.379 33.7657H15.1664C14.73 33.7657 14.4369 33.6909 14.2871 33.5391C14.1372 33.3873 14.06 33.0947 14.06 32.6591V27.3506L9.91037 29.5395V35.9282C9.91037 37.6727 8.92967 38.5439 6.96835 38.5439C6.02952 38.5439 5.28242 38.2073 4.72931 37.5386C4.17615 36.8522 3.89848 35.9458 3.89848 34.8216C3.89848 33.6975 4.18276 32.5161 4.75355 31.4249L0.830824 32.2543C0.277676 33.2113 0 34.3091 0 35.5498C0 37.2944 0.50246 38.8033 1.50958 40.0771C2.801 41.7381 4.61911 42.5674 6.96835 42.5674C8.6454 42.5674 10.0779 42.1736 11.2701 41.3861C12.5946 40.5149 13.4497 39.2895 13.8353 37.7123C14.1372 37.7629 14.4568 37.7871 14.7917 37.7871H18.0114C19.0009 37.7365 19.8559 37.4858 20.5767 37.0326C21.3655 37.5364 22.2956 37.7871 23.3689 37.7871H26.5885C27.7125 37.7365 28.6513 37.4352 29.405 36.8808C30.3262 37.4836 31.4259 37.7871 32.6996 37.7871H41.3581C42.7157 37.7871 43.8309 37.4022 44.7036 36.63C45.7107 35.7566 46.2132 34.5334 46.2132 32.9561V32.7053C46.2132 30.3909 45.2745 28.6134 43.3967 27.3726L43.3879 27.3704Z",fill:"#6A4A9D"}),j.createElement("path",{d:"M66.0266 39.8246C65.4051 39.8246 64.9026 40.0094 64.517 40.3789C64.1313 40.7639 63.9397 41.2677 63.9397 41.8881C63.9397 42.5084 64.1335 43.0123 64.517 43.3973C64.9026 43.7998 65.4051 44 66.0266 44C66.648 44 67.1416 43.8064 67.5097 43.4215C67.8953 43.0365 68.0869 42.5238 68.0869 41.8881C68.0869 41.2523 67.8931 40.7639 67.5097 40.3789C67.1416 40.0094 66.6458 39.8246 66.0266 39.8246Z",fill:"#6A4A9D"}),j.createElement("path",{d:"M65.0208 32.6578C65.0208 33.0933 64.9459 33.3881 64.7938 33.5377C64.6418 33.6896 64.3487 33.7644 63.9124 33.7644H59.5733V30.6954C59.5733 29.3205 59.1788 28.2051 58.3922 27.3495C57.4864 26.3441 56.2038 25.8403 54.5444 25.8403C53.002 25.8403 51.752 26.3353 50.7956 27.3253C49.74 28.4165 49.2111 29.9079 49.2111 31.802C49.2111 33.1109 49.6143 34.2835 50.4187 35.3241C51.3751 36.5494 52.6666 37.2862 54.2932 37.5372C54.745 37.6032 55.124 37.6472 55.4259 37.6626C55.3599 37.997 55.124 38.283 54.7207 38.5182C54.3351 38.769 53.9076 38.8946 53.4382 38.8946C52.532 38.8946 51.5339 38.5754 50.4452 37.9398V41.5366C51.5691 42.2229 52.6841 42.5683 53.7908 42.5683C55.1835 42.5683 56.3979 42.1987 57.438 41.4619C58.6962 40.5731 59.3993 39.3478 59.5513 37.788H64.2936C65.6691 37.788 66.793 37.3942 67.6635 36.6044C68.6684 35.6981 69.173 34.4485 69.173 32.8558V26.3397L65.0235 28.5285V32.6534L65.0208 32.6578ZM55.4259 33.6896C55.3599 33.672 55.2674 33.6654 55.1484 33.6654C54.864 33.6147 54.6612 33.573 54.5444 33.5399C53.707 33.3221 53.2861 32.693 53.2861 31.6524C53.2861 30.3787 53.7048 29.7407 54.5444 29.7407C55.1306 29.7407 55.4237 30.0597 55.4237 30.6977V33.6918L55.4259 33.6896Z",fill:"#6A4A9D"}),j.createElement("path",{d:"M95.419 25.837C94.0615 25.837 92.9465 26.2221 92.0734 26.9942C91.0839 27.883 90.5903 29.1149 90.5903 30.6923V32.6547C90.5903 33.0903 90.5155 33.3851 90.3633 33.5347C90.2135 33.6865 89.9182 33.7613 89.4839 33.7613H85.3124C84.8761 33.7613 84.583 33.6865 84.431 33.5347C84.2811 33.3829 84.204 33.0903 84.204 32.6547V21.5605L80.0544 23.7495V32.8571C80.0544 34.2497 80.4489 35.3892 81.2357 36.278C82.1237 37.2834 83.3556 37.7871 84.9334 37.7871H89.8587C90.8305 37.7871 91.6943 37.5782 92.4507 37.158C93.2726 37.5782 94.3282 37.7871 95.6196 37.7871C97.0608 37.7871 98.2354 37.2922 99.1411 36.3022C100.181 35.1956 100.701 33.6953 100.701 31.7989C100.701 30.1731 100.292 28.8224 99.4694 27.7489C98.513 26.4751 97.1644 25.837 95.419 25.837ZM95.3948 33.7613C94.9584 33.7613 94.7403 33.5853 94.7403 33.2333V30.5427C94.7403 30.0059 94.9673 29.7375 95.419 29.7375C96.2234 29.7375 96.6267 30.3755 96.6267 31.6493C96.6267 33.0573 96.2168 33.7635 95.3948 33.7635V33.7613Z",fill:"#6A4A9D"}),j.createElement("path",{d:"M114.85 32.0277C114.85 32.6987 114.734 33.1607 114.498 33.4115C114.28 33.6469 113.852 33.7635 113.215 33.7635H112.31V24.8317L108.159 27.0448V33.7613H105.167L103.08 37.7871H113.392C115.036 37.7871 116.36 37.2921 117.365 36.3021C118.456 35.2462 119 33.8295 119 32.0497V21.5605L114.85 23.7737V32.0277Z",fill:"#6A4A9D"})),rw="Header-module__root__Pe4MYp",iw="Header-module__nav__wtnkmT",sw="Header-module__navItem__-Fy63Z",ow="Header-module__logo__xO2bWO",ti={root:rw,nav:iw,navItem:sw,logo:ow},aw={llama:nw,default:tw},cw=()=>{const{hideLogo:t,logo:e="default"}=Ee();if(t)return null;const n=aw[e];return S.jsx("div",{className:ti.logo,children:S.jsx(n,{})})},lw=({className:t})=>{const{t:e}=mt("header"),{disableDelivery:n}=Ee(),r=X(Fp),i=xe(ec);p.useEffect(()=>{i?X.getState().setMode("location_delivery"):X.getState().setMode("self_pickup")},[i]);const s=()=>{xe.getState().setDeliverPoint(null),X.getState().setMode("self_pickup")},o=()=>{xe.getState().setDeliverPoint(null),X.getState().setMode("location_delivery")},a=r==="self_pickup",c=r==="location_delivery";return S.jsxs("div",{className:Y(ti.root,t),children:[S.jsx(cw,{}),S.jsxs("nav",{className:ti.nav,children:[!n&&S.jsx(it,{as:"link",className:ti.navItem,variant:a?"primary":"secondary",onClick:s,children:e("self_pickup")}),!n&&S.jsx(it,{as:"link",className:ti.navItem,variant:c?"primary":"secondary",onClick:o,children:e("courier_delivery")}),S.jsx(Uh,{})]})]})},uw=p.memo(lw),dw={open:!1},Pr=zt(t=>({...dw,toggle(e){X.getState().setDetailsOpen(!1),xe.getState().setDeliverPoint(null),Ke.getState().setSelectedLocation(null),t(n=>({open:e??!n.open}))}})),fw="Layout-module__root__qzPL-f",hw="Layout-module__headerHidden__JEN-d0",pw="Layout-module__sidebarHidden__x017O3",mw="Layout-module__sidebarOpen__IZnIjs",Es={root:fw,headerHidden:hw,sidebarHidden:pw,sidebarOpen:mw},gw=({children:t})=>{const{hideFilters:e,hideHeader:n}=Ee(),r=Pr(i=>i.open);return S.jsx("div",{className:Y(Es.root,{[Es.sidebarOpen]:r,[Es.headerHidden]:n,[Es.sidebarHidden]:e}),children:t})},vw=({children:t})=>{const e=At(xm);return At(Nd)&&!e?S.jsx(So,{}):S.jsx(S.Fragment,{children:t})},yw="Aside-module__root__EotK2f",bw="Aside-module__open__Zwmbs5",ww="Aside-module__overlay__slLdHF",Sw="Aside-module__container__28P4wq",xs={root:yw,open:bw,overlay:ww,container:Sw},Cw=({children:t,className:e,open:n})=>S.jsxs("div",{className:Y(xs.root,e,{[xs.open]:n}),children:[S.jsx("div",{className:xs.overlay}),S.jsx("div",{className:xs.container,children:t})]}),_w="Input-module__locationSearchRoot__svh-f9",Ew="Input-module__label__gmqtsf",xw="Input-module__inputContainer__vubIa-",Ow="Input-module__locationSearchInput__2YK1MG",Pw="Input-module__endAdornment__m40K5R",Zr={locationSearchRoot:_w,label:Ew,inputContainer:xw,locationSearchInput:Ow,endAdornment:Pw},Tw=p.forwardRef(({className:t,endAdornment:e,inputRef:n,label:r,onBlur:i,onChange:s,...o},a)=>{const c=p.useId(),l=p.useRef(null);p.useImperativeHandle(a,()=>({focus:()=>{var d;(d=l.current)==null||d.focus()},blur:()=>{var d;(d=l.current)==null||d.blur()},setValue:d=>{if(s){s({target:{value:d}});return}if(i){i({target:{value:d}});return}l.current&&(l.current.value=d)}}),[i,s]);const u=Vh(n,l);return S.jsxs("label",{htmlFor:o.id??c,className:Y(Zr.locationSearchRoot,t),children:[r&&S.jsx("span",{className:Zr.label,children:r}),S.jsxs("div",{className:Zr.inputContainer,children:[S.jsx("input",{...o,ref:u,id:o.id??c,className:Zr.locationSearchInput,onChange:s,onBlur:i}),e&&S.jsx("div",{className:Zr.endAdornment,children:e})]})]})}),Aw="PlaceAutocomplete-module__container__fdiqiO",Rw="PlaceAutocomplete-module__dropdown__u-0PdK",Lw="PlaceAutocomplete-module__item__zHJqmC",kw="PlaceAutocomplete-module__itemMain__-skwdB",Mw="PlaceAutocomplete-module__itemSecondary__sD5QDK",Dw="PlaceAutocomplete-module__itemArrow__CtQ5GG",Nw="PlaceAutocomplete-module__endAdornmentGroup__qV8aNt",jw="PlaceAutocomplete-module__clearButton__--lW5O",Iw="PlaceAutocomplete-module__clearIcon__VlatWK",Ht={container:Aw,dropdown:Rw,item:Lw,itemMain:kw,itemSecondary:Mw,itemArrow:Dw,endAdornmentGroup:Nw,clearButton:jw,clearIcon:Iw},Fw=({onSelect:t,suggestions:e})=>S.jsx("div",{className:Ht.dropdown,role:"listbox",children:e.map(n=>S.jsxs("div",{className:Ht.item,role:"option","aria-selected":!1,onPointerDown:r=>r.preventDefault(),onClick:()=>t(n),onKeyDown:r=>{r.key==="Enter"&&t(n)},children:[S.jsx("span",{className:Ht.itemMain,children:n.mainText}),n.secondaryText&&S.jsx("span",{className:Ht.itemSecondary,children:n.secondaryText}),S.jsx(_c,{className:Ht.itemArrow})]},n.placeId))}),Lc=({autocomplete:t,children:e,className:n,endAdornment:r,inputRef:i,label:s,name:o,onClear:a,onClick:c,onFocus:l,placeholder:u})=>{const d=p.useRef(null),h=t.suggestions.length>0,v=p.useRef(t.clearSuggestions);v.current=t.clearSuggestions,p.useEffect(()=>{if(!h)return;const E=x=>{d.current&&!d.current.contains(x.target)&&v.current()};return document.addEventListener("click",E),()=>document.removeEventListener("click",E)},[h]);const m=E=>{t.setValue(E.target.value)},f=E=>{t.commitValue(E.description),t.clearSuggestions(),t.handleSelect(E)},w=()=>{t.commitValue(""),t.clearSuggestions(),a==null||a()},y=!!a&&t.value.length>0,C=y||r?S.jsxs("div",{className:Ht.endAdornmentGroup,children:[y&&S.jsx("button",{type:"button",className:Ht.clearButton,"aria-label":"Clear address",onPointerDown:E=>E.preventDefault(),onClick:w,children:S.jsx(gh,{className:Ht.clearIcon})}),r]}):void 0,b={value:t.value,onChange:m,inputRef:i,onFocus:l,onClick:c,placeholder:u,name:o,label:s,endAdornment:C};return S.jsxs("div",{ref:d,className:Y(Ht.container,n),children:[typeof e=="function"?e(b):S.jsx(Tw,{...b}),h&&S.jsx(Fw,{suggestions:t.suggestions,onSelect:f})]})},Bw="LocationAside-module__submit__CSKcqi",Vw="LocationAside-module__container__S1NejR",Hw="LocationAside-module__selector__hl74ke",Uw="LocationAside-module__label__0Zk8at",$w="LocationAside-module__header__N1wgyn",zw="LocationAside-module__close__VsE88z",Os={submit:Bw,container:Vw,selector:Hw,label:Uw,header:$w,close:zw},qw=p.forwardRef((t,e)=>{const{t:n}=mt(["location_aside","common"]),r=sn(y6),{country:i,globalSearch:s,hideCloseButtonOnLocationScreen:o,inputs:a,onCloseLocationSelector:c,onLocationSelect:l}=Ee(),u=p.useRef(null);p.useImperativeHandle(e,()=>({open:()=>sn.getState().toggle(!0),close:()=>sn.getState().toggle(!1)}),[]);const d=p.useCallback(f=>{sn.getState().toggle(!1),Tt.getState().setPlaceSimple(f,{withNavigation:!0}),l==null||l(f)},[l]),h=Rc({country:i,globalSearch:s,onPlaceSelect:d}),v=()=>{sn.getState().toggle(!1),c==null||c()},m=so(a==null?void 0:a.city);return S.jsx(Cw,{open:r,children:S.jsx("div",{ref:u,className:Os.container,children:S.jsxs("div",{className:Os.selector,children:[S.jsxs("div",{className:Os.header,children:[S.jsx("div",{className:Os.label,children:n("choose_city")}),!o&&S.jsx(Ar,{position:"relative",onClick:v})]}),S.jsx(Lc,{autocomplete:h,inputRef:m.ref,name:m.name,placeholder:n("placeholder"),onClick:m.onClick})]})})})}),Gw=p.memo(qw),Ww=t=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},j.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M14.617 16.032a9 9 0 1 1 1.414-1.414l3.676 3.675a1 1 0 0 1-1.414 1.414l-3.676-3.675ZM2 9a7 7 0 1 1 12.04 4.858 1.005 1.005 0 0 0-.182.182A7 7 0 0 1 2 9Z",clipRule:"evenodd"})),Zw=({className:t})=>{const{t:e}=mt("location_selector"),{country:n,globalSearch:r,inputs:i,onLocationSelect:s}=Ee(),o=p.useCallback(h=>{Tt.getState().setPlaceSimple(h,{withNavigation:!0}),s==null||s(h)},[s]),a=p.useCallback(h=>{const[v,m]=h,f=X.getState().map;f==null||f.setCenter({lat:v,lng:m}),f==null||f.setZoom(16),Tt.getState().setLocationPinCoordinates(h)},[]),c=Rc({country:n,globalSearch:r,types:[],onCoordinatesSelect:a,onPlaceSelect:o}),l=()=>{X.getState().setDetailsOpen(!1),xe.getState().setDeliverPoint(null),Ke.getState().setSelectedLocation(null)},u=p.useCallback(()=>{Tt.getState().hideLocationPin()},[]),d=so(i==null?void 0:i.address);return S.jsx(Lc,{autocomplete:c,className:t,endAdornment:S.jsx(Ww,{}),inputRef:d.ref,name:d.name,placeholder:e("placeholder"),onClear:u,onClick:d.onClick,onFocus:l})},Kw=({className:t})=>X(Vp)?S.jsx(Zw,{className:t}):null,Qw=p.memo(Kw),Jw="DeliveryDetailsModal-module__root__qwKnjX",Xw={root:Jw},Yw=({className:t,location:e,onClose:n,onSubmit:r})=>S.jsx("div",{className:Y(Xw.root,t),children:S.jsx(jh,{location:e,onClose:n,onSubmit:r})}),e8="LocationDetailsModal-module__root__PyRnLM",t8={root:e8},n8=({className:t,location:e,onClose:n,onSubmit:r})=>{const i=()=>{r==null||r(e)};return S.jsx("div",{className:Y(t8.root,t),children:S.jsx(mf,{location:e,onClose:n,onSubmit:i})})},r8="MapContainer-module__root__1Os6Q-",i8="MapContainer-module__mapWrapper__Cwe7qC",s8="MapContainer-module__locationSelector__Pr1zS-",o8="MapContainer-module__filterButton__CW3Qv7",a8="MapContainer-module__sidebarOpen__lGMVrJ",c8="MapContainer-module__filterIcon__T01XsJ",l8="MapContainer-module__details__gM8LWX",Ut={root:r8,mapWrapper:i8,locationSelector:s8,filterButton:o8,sidebarOpen:a8,filterIcon:c8,details:l8},u8=()=>{const{onPointClick:t}=Ee(),e=X(tc),n=Ke($p),r=xe(ec),i=p.useCallback(()=>{X.getState().setDetailsOpen(!1)},[]),s=p.useCallback(o=>{t==null||t(o),X.getState().setDetailsOpen(!1),Ke.getState().setSelectedLocation(null),xe.getState().setDeliverPoint(null)},[t]);return S.jsxs(S.Fragment,{children:[(r==null?void 0:r.address)&&e&&S.jsx(Yw,{location:r,className:Ut.details,onClose:i,onSubmit:s}),n&&e&&S.jsx(n8,{location:n,className:Ut.details,onClose:i,onSubmit:s})]})},d8=t=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:60,height:40,fill:"none",viewBox:"0 0 60 40",...t},j.createElement("path",{d:"M0 0h52a8 8 0 0 1 8 8v24a8 8 0 0 1-8 8H0V0Z"}),j.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,strokeWidth:1.5,d:"M32.093 10h13.814c1.151 0 2.093.91 2.093 2.02v2.223c0 .808-.523 1.818-1.047 2.324l-4.5 3.839c-.627.505-1.046 1.515-1.046 2.323v4.344c0 .607-.419 1.415-.942 1.718L39 29.7c-1.36.808-3.244-.101-3.244-1.717v-5.355c0-.707-.419-1.616-.837-2.121l-3.977-4.041c-.523-.506-.942-1.415-.942-2.02V12.12c0-1.21.942-2.12 2.093-2.12Z"})),f8=t=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:28,height:28,fill:"none",viewBox:"0 0 28 28",...t},j.createElement("rect",{width:28,height:28,fill:"#333",rx:4}),j.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,d:"M9.165 7h9.67c.806 0 1.465.636 1.465 1.414V9.97c0 .566-.366 1.273-.733 1.627l-3.15 2.687c-.44.353-.732 1.06-.732 1.627v3.04c0 .425-.293.99-.66 1.203L14 20.79c-.952.566-2.271-.07-2.271-1.202V15.84c0-.495-.293-1.132-.586-1.485l-2.784-2.83c-.366-.353-.659-.99-.659-1.413V8.485C7.7 7.636 8.36 7 9.165 7Z"})),h8=()=>{const t=Pr(i=>i.open),e=Pr(i=>i.toggle),n=Bn("screenSm"),r=()=>{e(!0)};return S.jsxs("div",{role:"presentation",className:Y(Ut.filterButton,{[Ut.sidebarOpen]:t}),onClick:n?void 0:r,children:[n&&S.jsx(Uh,{}),n?S.jsx(f8,{className:Ut.filterIcon,onClick:r}):S.jsx(d8,{className:Ut.filterIcon})]})},p8=({children:t,className:e})=>{const{hideFilters:n,hideSearchInput:r}=Ee(),i=X(tc);return S.jsxs("div",{className:Y(Ut.root,e),children:[!r&&!i&&S.jsx(Qw,{className:Ut.locationSelector}),!n&&S.jsx(h8,{}),S.jsx("div",{className:Ut.mapWrapper,children:t}),S.jsx(u8,{})]})},m8=p.memo(p8),g8="Separator-module__root__eQtZey",v8={root:g8},Yo=({className:t,...e})=>S.jsx("hr",{className:Y(v8.root,t),...e}),y8="Sidebar-module__root__4j1MA3",b8="Sidebar-module__closeButton__HLXy1c",w8="Sidebar-module__open__mqQXF6",S8="Sidebar-module__header__Afp6uz",C8="Sidebar-module__typeFilter__GN46u9",_8="Sidebar-module__separator__6I4QoJ",E8="Sidebar-module__withRightPadding__2u1Ina",x8="Sidebar-module__sheetContent__SaoncI",O8="Sidebar-module__doneButton__4aeaSD",Bt={root:y8,closeButton:b8,open:w8,header:S8,typeFilter:C8,separator:_8,withRightPadding:E8,sheetContent:x8,doneButton:O8},P8=()=>{const{t}=mt("common"),e=Bn("screenSm"),n=Pr(i=>i.toggle),r=()=>{n(!1)};return S.jsxs("div",{className:Bt.header,children:[e&&S.jsx("div",{role:"presentation",className:Bt.doneButton,onClick:r,children:t("done")}),!e&&S.jsx(Ar,{className:Bt.closeButton,onClick:r})]})},T8="Radio-module__root__7ElY2W",A8="Radio-module__label__c-sYW3",Vu={root:T8,label:A8},R8=({className:t,label:e,labelProps:n={},...r})=>{const i=p.useId(),{className:s,...o}=n;return S.jsxs("label",{htmlFor:i,className:Y(Vu.label,s),...o,children:[S.jsx("input",{id:i,type:"radio",className:Y(Vu.root,t),...r}),e]})},cr=t=>S.jsx(R8,{...t,type:"checkbox"}),L8="RadioGroup-module__root__ewZw-x",k8="RadioGroup-module__body__k8BJAs",M8="RadioGroup-module__legend__tcfV7q",ea={root:L8,body:k8,legend:M8},$h=({children:t,className:e,label:n,onChange:r,value:i,...s})=>S.jsxs("div",{className:Y(ea.root,e),...s,children:[n&&S.jsx("span",{className:ea.legend,children:n}),S.jsx("div",{className:ea.body,children:p.Children.map(t,o=>p.isValidElement(o)?p.cloneElement(o,{checked:!!(i!=null&&i[o.props.value]),onChange:a=>r==null?void 0:r({...i,[a.target.value]:a.target.checked})}):null)})]}),D8=({className:t,onChange:e})=>{const{t:n}=mt("receive_filter"),r=pn(Wp);return S.jsxs($h,{value:r,label:n("title"),className:t,onChange:e,children:[S.jsx(cr,{name:"receive",value:ht.DressingRoom,label:n("dressing_room")}),S.jsx(cr,{name:"receive",value:ht.CheckOrder,label:n("check_order")}),S.jsx(cr,{name:"receive",value:ht.PayByCash,label:n("pay_by_cash")})]})},N8=p.memo(D8),j8=({className:t,onChange:e})=>{const{t:n}=mt("send_filter"),r=pn(Gp);return S.jsxs($h,{className:t,value:r,label:n("title"),onChange:e,children:[S.jsx(cr,{name:"send",value:pt.Return,label:n("sending_returns")}),S.jsx(cr,{name:"send",value:pt.Shipping,label:n("shipping")}),S.jsx(cr,{name:"send",value:pt.Payment,label:n("payment")})]})},I8=p.memo(j8),F8="TypeFilter-module__root__WH5EQV",B8="TypeFilter-module__button__f0mSfo",Ps={root:F8,button:B8},V8=({className:t,onChange:e,value:n})=>{const{t:r}=mt("type_filter"),i=s=>()=>e==null?void 0:e(s);return S.jsxs("div",{className:Y(Ps.root,t),children:[S.jsx(it,{className:Ps.button,variant:n===It.All?"primary":"secondary",onClick:i(It.All),children:r("all")}),S.jsx(it,{className:Ps.button,variant:n===It.PostOffice?"primary":"secondary",onClick:i(It.PostOffice),children:r("post_office")}),S.jsx(it,{className:Ps.button,variant:n===It.PickPoint?"primary":"secondary",onClick:i(It.PickPoint),children:r("pick_point")})]})},H8=({className:t,onChange:e})=>{const n=pn(qp);return S.jsx(V8,{value:n,className:t,onChange:e})},U8=p.memo(H8),$8=({className:t})=>{const e=Bn("screenSm"),n=Pr(c=>c.open),r=p.useCallback(c=>pn.getState().setFilter({type:c}),[]),i=p.useCallback(c=>pn.getState().setFilter({send:c}),[]),s=p.useCallback(c=>pn.getState().setFilter({receive:c}),[]),o=p.useCallback(()=>Pr.getState().toggle(!1),[]),a=S.jsxs(S.Fragment,{children:[S.jsx(P8,{}),S.jsxs("div",{className:Bt.withRightPadding,children:[S.jsx(U8,{className:Bt.typeFilter,onChange:r}),S.jsx(Yo,{className:Bt.separator}),S.jsx(N8,{onChange:s}),S.jsx(Yo,{}),S.jsx(I8,{onChange:i}),S.jsx(Yo,{})]})]});return e?S.jsx(fh,{initialFocusRef:!1,open:n,snapPoints:({maxHeight:c})=>c-hh,onDismiss:o,children:S.jsx("div",{className:Bt.sheetContent,children:a})}):S.jsx("div",{className:Y(Bt.root,t,{[Bt.open]:n}),children:a})},z8="App-module__map__Kf-2JS",q8="App-module__sidebar__ORIzGk",G8="App-module__header__bgP9DA",ta={map:z8,sidebar:q8,header:G8},W8=new xh,Z8=({children:t})=>{const{isFetching:e}=Bh();return e?S.jsx(So,{}):t},zh=({config:t,options:e,withGlobalProvider:n=!1})=>{const r=Vm(t),{INN:i,cityName:s,countryAbbreviation:o,hideFilters:a,hideHeader:c,map:l,regionName:u}=r;Ot(i,"INN is required"),Hm(i,e),Ot(l==null?void 0:l.provider,"Map provider is required");const d=M6(l.provider);Om({cityName:s,countryAbbreviation:o,regionName:u});const h=S.jsx(K6,{children:S.jsx(Z6,{children:S.jsx(Rv,{tolgee:Hh,fallback:S.jsx(So,{}),children:S.jsx(vw,{children:S.jsxs(gw,{children:[!c&&S.jsx(uw,{className:ta.header}),!a&&S.jsx($8,{className:ta.sidebar}),S.jsx(m8,{className:ta.map,children:S.jsx(d,{})}),S.jsx(Gw,{})]})})})})});return S.jsx(Yh,{baseColor:"#f3f3f3",highlightColor:"#ecebeb",children:S.jsx(nd.Provider,{value:r,children:n?S.jsx(Z8,{children:h}):S.jsx(Th,{client:W8,children:S.jsx(Fh,{gMapId:r.gMapId,gMapKey:r.gMapKey,mapTheme:r.mapTheme,locale:r.locale,children:h})})})})},qh=async t=>pi.request({baseURL:"https://api.geo-data.omnic.solutions/api/1.0/",method:"POST",url:"normalize/address",data:t,headers:{Authorization:"Token 9877f9631b2e30570cc1c5aa8c740b0c912efe99a8b6c45c21cf4bd394adc7e9"}}),K8=new xh,Gh=p.createContext(null),Hu=t=>JSON.stringify(t,(e,n)=>typeof n=="function"?void 0:n),Q8=(t,e)=>({...t,...e,inputs:e!=null&&e.inputs?{...t.inputs,...e.inputs}:t.inputs,handlers:e!=null&&e.handlers?{...t.handlers,...e.handlers}:t.handlers}),J8=({children:t,launchConfig:e})=>{const[n,r]=p.useState(),[i,s]=p.useState(),a=p.useRef(e).current,c=p.useRef(),l=p.useRef(null),u=p.useRef(null),d=p.useCallback(m=>{if(!m){c.current=void 0,s(x=>x===void 0?x:void 0);return}const{onCloseLocationSelector:f,onLocationSelect:w,onPointClick:y,onSamePointsClusterClick:C,onWarehouseSelect:b,...E}=m;c.current={onCloseLocationSelector:f,onLocationSelect:w,onPointClick:y,onSamePointsClusterClick:C,onWarehouseSelect:b},s(x=>{const g=Hu(x),_=Hu(E);return g===_?x:E})},[]),h=p.useMemo(()=>({onCloseLocationSelector:(...m)=>{var f,w,y,C;return((w=(f=c.current)==null?void 0:f.onCloseLocationSelector)==null?void 0:w.call(f,...m))??((C=(y=a.config).onCloseLocationSelector)==null?void 0:C.call(y,...m))},onLocationSelect:(...m)=>{var f,w,y,C;return((w=(f=c.current)==null?void 0:f.onLocationSelect)==null?void 0:w.call(f,...m))??((C=(y=a.config).onLocationSelect)==null?void 0:C.call(y,...m))},onPointClick:(...m)=>{var f,w,y,C;return((w=(f=c.current)==null?void 0:f.onPointClick)==null?void 0:w.call(f,...m))??((C=(y=a.config).onPointClick)==null?void 0:C.call(y,...m))},onSamePointsClusterClick:(...m)=>{var f,w,y,C;return((w=(f=c.current)==null?void 0:f.onSamePointsClusterClick)==null?void 0:w.call(f,...m))??((C=(y=a.config).onSamePointsClusterClick)==null?void 0:C.call(y,...m))},onWarehouseSelect:(...m)=>{var f,w,y,C;return((w=(f=c.current)==null?void 0:f.onWarehouseSelect)==null?void 0:w.call(f,...m))??((C=(y=a.config).onWarehouseSelect)==null?void 0:C.call(y,...m))}}),[a.config]),v=p.useMemo(()=>({widgetOutHolderRef:l,widgetLocationsRef:u,setLocale:r,setMapPlaceholderConfig:d}),[d]);return S.jsx(Gh.Provider,{value:v,children:a&&S.jsx(Th,{client:K8,children:S.jsxs(Fh,{asGlobalProvider:!0,gMapId:a.config.gMapId,gMapKey:a.config.gMapKey,mapTheme:a.config.mapTheme,locale:a.config.locale,children:[S.jsx("div",{ref:l,style:{position:"fixed",left:"-9999px",top:"-9999px"},children:S.jsx("div",{ref:u,id:"@omnic/widget-locations",style:{height:"100%",width:"100%"},children:S.jsx(zh,{withGlobalProvider:!0,options:a.options,config:Q8(a.config,{...h,...i,...n&&{locale:n}})})})}),t]})})})};function Wh(){const t=p.useContext(Gh);if(!t)throw new Error("Please use hook useWidgetLocationsContext inside WidgetLocationsProvider");return t}const X8=t=>t===void 0||typeof t=="object"&&Object.keys(t).length===0,Y8=({config:t})=>{const{setMapPlaceholderConfig:e,widgetLocationsRef:n,widgetOutHolderRef:r}=Wh(),i=p.useRef(null);return p.useEffect(()=>{const s=X8(t)?void 0:t;e(s)},[t,e]),p.useEffect(()=>{const s=r.current,o=n.current,a=i.current;return o&&a&&a.appendChild(o),()=>{o&&s&&s.appendChild(o)}},[n,r]),p.useEffect(()=>()=>{Tt.getState().resetSearch()},[]),S.jsx("div",{ref:i,style:{width:"100%",height:"100%"}})};exports.EReceiveFilter=ht;exports.ESendFilter=pt;exports.ETypeFilter=It;exports.MapPlaceholder=Y8;exports.PlaceAutocomplete=Lc;exports.Widget=zh;exports.WidgetLocationsProvider=J8;exports.createPointsIterator=la;exports.fetchPointsRequest=ca;exports.fromHoursMinutesToMinutes=Zp;exports.fromMinutesToHoursMinutes=Kp;exports.getAddressFormGeocode=da;exports.getBoundsFromPoint=Qp;exports.getCurrentPosition=cc;exports.getNormalizedAddress=qh;exports.getPropertyValue=kd;exports.isCoordinates=ua;exports.isDeliveryPoint=gm;exports.isHttpSuccess=Ld;exports.isPlaceId=Rd;exports.parseCoordinates=Dd;exports.placeToPlaceResult=Md;exports.replaceSvgCurrentColor=rr;exports.setWidgetCSSProperty=Di;exports.usePlaceAutocomplete=Rc;exports.useWidgetLocationsContext=Wh;