@omnic/widget-locations 1.1.85 → 1.1.86

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)},F=(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){F(t,e,i,n)},get _(){return P(t,e,r)}}),Q=(t,e,n)=>(Oo(t,e,"access private method"),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react/jsx-runtime"),p=require("react"),Hs=require("react-dom"),$h=require("react-dom/server");function zh(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 I=zh(p),qu=p.createContext({}),Gu=!0;function qh({baseColor:t,highlightColor:e,width:n,height:r,borderRadius:i,circle:s,direction:o,duration:a,enableAnimation:c=Gu,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(qu),f={...a};for(const[y,E]of Object.entries(a))typeof E>"u"&&delete f[y];const v={...d,...f,circle:s},m={...o,...qh(v)};let h="react-loading-skeleton";n&&(h+=` ${n}`);const S=(c=v.inline)!==null&&c!==void 0?c:!1,b=[],_=Math.ceil(t);for(let y=0;y<_;y++){let E=m;if(_>t&&y===_-1){const g=(l=E.width)!==null&&l!==void 0?l:"100%",C=t%1,O=typeof g=="number"?g*C:`calc(${g} * ${C})`;E={...E,width:O}}const x=p.createElement("span",{className:h,style:E,key:y},"‌");S?b.push(x):b.push(p.createElement(p.Fragment,{key:y},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:Gu},e?b.map((y,E)=>p.createElement(e,{key:E},y)):b)}function Gh({children:t,...e}){return p.createElement(qu.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 Wh=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}},Zh=Wh;const Ot=ao(Zh);let Ji;const Kh=new Uint8Array(16);function Qh(){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(Kh)}const Te=[];for(let t=0;t<256;++t)Te.push((t+256).toString(16).slice(1));function Jh(t,e=0){return Te[t[e+0]]+Te[t[e+1]]+Te[t[e+2]]+Te[t[e+3]]+"-"+Te[t[e+4]]+Te[t[e+5]]+"-"+Te[t[e+6]]+Te[t[e+7]]+"-"+Te[t[e+8]]+Te[t[e+9]]+"-"+Te[t[e+10]]+Te[t[e+11]]+Te[t[e+12]]+Te[t[e+13]]+Te[t[e+14]]+Te[t[e+15]]}const Xh=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Uc={randomUUID:Xh};function Wu(t,e,n){if(Uc.randomUUID&&!e&&!t)return Uc.randomUUID();t=t||{};const r=t.random||(t.rng||Qh)();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 Jh(r)}const Yh=Wu(),Zu=Wu(),ep=6,na=[49.3478969,14.0983344],Ku="en",tp=["places","geocoding"],gn={logo:"default",locale:Ku,map:{provider:"google",center:na,initialZoom:ep}},Qu=p.createContext(gn),_e=()=>p.useContext(Qu);var Nt=(t=>(t[t.All=0]="All",t[t.PickPoint=20]="PickPoint",t[t.PostOffice=30]="PostOffice",t))(Nt||{}),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||{}),np={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 $c=t=>{let e;const n=new Set,r=(u,d)=>{const f=typeof u=="function"?u(e):u;if(!Object.is(f,e)){const v=e;e=d??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(m=>m(e,v))}},i=()=>e,c={setState:r,getState:i,getInitialState:()=>l,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(np?"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},rp=t=>t?$c(t):$c;var Ju={exports:{}},Xu={},Yu={exports:{}},ed={};/**
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)},F=(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){F(t,e,i,n)},get _(){return P(t,e,r)}}),Q=(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"),zh=require("react-dom/server");function qh(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 I=qh(p),Gu=p.createContext({}),Wu=!0;function Gh({baseColor:t,highlightColor:e,width:n,height:r,borderRadius:i,circle:s,direction:o,duration:a,enableAnimation:c=Wu,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(Gu),h={...a};for(const[b,E]of Object.entries(a))typeof E>"u"&&delete h[b];const v={...d,...h,circle:s},m={...o,...Gh(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:Wu},e?y.map((b,E)=>p.createElement(e,{key:E},b)):y)}function Wh({children:t,...e}){return p.createElement(Gu.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 Zh=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}},Kh=Zh;const Ot=ao(Kh);let Ji;const Qh=new Uint8Array(16);function Jh(){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(Qh)}const Te=[];for(let t=0;t<256;++t)Te.push((t+256).toString(16).slice(1));function Xh(t,e=0){return Te[t[e+0]]+Te[t[e+1]]+Te[t[e+2]]+Te[t[e+3]]+"-"+Te[t[e+4]]+Te[t[e+5]]+"-"+Te[t[e+6]]+Te[t[e+7]]+"-"+Te[t[e+8]]+Te[t[e+9]]+"-"+Te[t[e+10]]+Te[t[e+11]]+Te[t[e+12]]+Te[t[e+13]]+Te[t[e+14]]+Te[t[e+15]]}const Yh=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Uc={randomUUID:Yh};function Zu(t,e,n){if(Uc.randomUUID&&!e&&!t)return Uc.randomUUID();t=t||{};const r=t.random||(t.rng||Jh)();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 Xh(r)}const ep=Zu(),Ku=Zu(),tp=6,na=[49.3478969,14.0983344],Qu="en",np=["places","geocoding"],gn={logo:"default",locale:Qu,map:{provider:"google",center:na,initialZoom:tp}},Ju=p.createContext(gn),_e=()=>p.useContext(Ju);var Nt=(t=>(t[t.All=0]="All",t[t.PickPoint=20]="PickPoint",t[t.PostOffice=30]="PostOffice",t))(Nt||{}),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||{}),rp={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 $c=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:()=>{(rp?"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},ip=t=>t?$c(t):$c;var Xu={exports:{}},Yu={},ed={exports:{}},td={};/**
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 Cr=p;function ip(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var sp=typeof Object.is=="function"?Object.is:ip,op=Cr.useState,ap=Cr.useEffect,cp=Cr.useLayoutEffect,lp=Cr.useDebugValue;function up(t,e){var n=e(),r=op({inst:{value:n,getSnapshot:e}}),i=r[0].inst,s=r[1];return cp(function(){i.value=n,i.getSnapshot=e,To(i)&&s({inst:i})},[t,n,e]),ap(function(){return To(i)&&s({inst:i}),t(function(){To(i)&&s({inst:i})})},[t]),lp(n),n}function To(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!sp(t,n)}catch{return!0}}function dp(t,e){return e()}var fp=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?dp:up;ed.useSyncExternalStore=Cr.useSyncExternalStore!==void 0?Cr.useSyncExternalStore:fp;Yu.exports=ed;var hp=Yu.exports;/**
9
+ */var Cr=p;function sp(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var op=typeof Object.is=="function"?Object.is:sp,ap=Cr.useState,cp=Cr.useEffect,lp=Cr.useLayoutEffect,up=Cr.useDebugValue;function dp(t,e){var n=e(),r=ap({inst:{value:n,getSnapshot:e}}),i=r[0].inst,s=r[1];return lp(function(){i.value=n,i.getSnapshot=e,To(i)&&s({inst:i})},[t,n,e]),cp(function(){return To(i)&&s({inst:i}),t(function(){To(i)&&s({inst:i})})},[t]),up(n),n}function To(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!op(t,n)}catch{return!0}}function fp(t,e){return e()}var hp=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?fp:dp;td.useSyncExternalStore=Cr.useSyncExternalStore!==void 0?Cr.useSyncExternalStore:hp;ed.exports=td;var pp=ed.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,pp=hp;function mp(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var gp=typeof Object.is=="function"?Object.is:mp,vp=pp.useSyncExternalStore,yp=co.useRef,bp=co.useEffect,wp=co.useMemo,Sp=co.useDebugValue;Xu.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var s=yp(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=wp(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,gp(u,v))return m;var h=r(v);return i!==void 0&&i(m,h)?m:(u=v,d=h)}var l=!1,u,d,f=n===void 0?null:n;return[function(){return c(e())},f===null?void 0:function(){return c(f())}]},[e,n,r,i]);var a=vp(t,s[0],s[1]);return bp(function(){o.hasValue=!0,o.value=a},[a]),Sp(a),a};Ju.exports=Xu;var Cp=Ju.exports;const _p=ao(Cp);var td={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:Ep}=p,{useSyncExternalStoreWithSelector:xp}=_p;let zc=!1;const Op=t=>t;function Tp(t,e=Op,n){(td?"production":void 0)!=="production"&&n&&!zc&&(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"),zc=!0);const r=xp(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return Ep(r),r}const qc=t=>{(td?"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"?rp(t):t,n=(r,i)=>Tp(e,r,i);return Object.assign(n,e),n},Ht=t=>t?qc(t):qc,Pp={location:null,warehousePoint:null},ec=t=>t.location,Re=Ht()(t=>({...Pp,setDeliverPoint(e){t({location:e})},setWarehousePoint(e){t({warehousePoint:e})}})),Ap={map:null,mode:"self_pickup",bounds:null,blurred:!1,loaded:!1,loading:!0,detailsOpen:!1,isIdle:!1},Rp=t=>t.map,Lp=t=>t.mode,kp=t=>t.bounds,Mp=t=>t.blurred,Dp=t=>t.loaded,jp=t=>t.loading,tc=t=>t.detailsOpen,Z=Ht()(t=>({...Ap,setLoaded(){t({loaded:!0,loading:!1})},setMode(e){t({mode:e})},setBounds(e){t({bounds:e})},setDetailsOpen(e){t({detailsOpen:e})},setBlurred(e){t({blurred:e})},setMap(e){t({map:e})},setIdle(e){t({isIdle:e})}})),Np={isTrackingEnabled:!1,location:null},Ip=t=>t.location,it=Ht()(t=>({...Np,setSelectedLocation(e){t({location:e})},setIsTrackingEnabled(e){t({isTrackingEnabled:e})}})),Fp={query:"",type:Nt.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}},Bp=t=>t.type,Vp=t=>t.send,Hp=t=>t.receive,un=Ht(t=>({...Fp,setFilter(e){Z.getState().setDetailsOpen(!1),Re.getState().setDeliverPoint(null),it.getState().setSelectedLocation(null),t(e)}})),Up=t=>{const[e,n]=t.split(":");return Number(e)*60+Number(n)},$p=t=>{const e=Math.floor(t/60),n=t%60;return`${e<10?`0${e}`:e}:${n<10?`0${n}`:n}`},zp=(t,e)=>[[t[0]-e,t[0]+e],[t[1]-e,t[1]+e]];function nd(t,e){return function(){return t.apply(e,arguments)}}const{toString:qp}=Object.prototype,{getPrototypeOf:nc}=Object,lo=(t=>e=>{const n=qp.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),At=t=>(t=t.toLowerCase(),e=>lo(e)===t),uo=t=>e=>typeof e===t,{isArray:Pr}=Array,fi=uo("undefined");function Gp(t){return t!==null&&!fi(t)&&t.constructor!==null&&!fi(t.constructor)&&nt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const rd=At("ArrayBuffer");function Wp(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&rd(t.buffer),e}const Zp=uo("string"),nt=uo("function"),id=uo("number"),fo=t=>t!==null&&typeof t=="object",Kp=t=>t===!0||t===!1,Ps=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)},Qp=At("Date"),Jp=At("File"),Xp=At("Blob"),Yp=At("FileList"),e0=t=>fo(t)&&nt(t.pipe),t0=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]"))},n0=At("URLSearchParams"),r0=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Li(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),Pr(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 sd(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 od=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ad=t=>!fi(t)&&t!==od;function ra(){const{caseless:t}=ad(this)&&this||{},e={},n=(r,i)=>{const s=t&&sd(e,i)||i;Ps(e[s])&&Ps(r)?e[s]=ra(e[s],r):Ps(r)?e[s]=ra({},r):Pr(r)?e[s]=r.slice():e[s]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Li(arguments[r],n);return e}const i0=(t,e,n,{allOwnKeys:r}={})=>(Li(e,(i,s)=>{n&&nt(i)?t[s]=nd(i,n):t[s]=i},{allOwnKeys:r}),t),s0=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),o0=(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)},a0=(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},c0=(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},l0=t=>{if(!t)return null;if(Pr(t))return t;let e=t.length;if(!id(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},u0=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&nc(Uint8Array)),d0=(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])}},f0=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},h0=At("HTMLFormElement"),p0=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Gc=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),m0=At("RegExp"),cd=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Li(n,(i,s)=>{let o;(o=e(i,s,t))!==!1&&(r[s]=o||i)}),Object.defineProperties(t,r)},g0=t=>{cd(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+"'")})}})},v0=(t,e)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return Pr(t)?r(t):r(String(t).split(e)),n},y0=()=>{},b0=(t,e)=>(t=+t,Number.isFinite(t)?t:e),Po="abcdefghijklmnopqrstuvwxyz",Wc="0123456789",ld={DIGIT:Wc,ALPHA:Po,ALPHA_DIGIT:Po+Po.toUpperCase()+Wc},w0=(t=16,e=ld.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function S0(t){return!!(t&&nt(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const C0=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=Pr(r)?[]:{};return Li(r,(o,a)=>{const c=n(o,i+1);!fi(c)&&(s[a]=c)}),e[i]=void 0,s}}return r};return n(t,0)},_0=At("AsyncFunction"),E0=t=>t&&(fo(t)||nt(t))&&nt(t.then)&&nt(t.catch),k={isArray:Pr,isArrayBuffer:rd,isBuffer:Gp,isFormData:t0,isArrayBufferView:Wp,isString:Zp,isNumber:id,isBoolean:Kp,isObject:fo,isPlainObject:Ps,isUndefined:fi,isDate:Qp,isFile:Jp,isBlob:Xp,isRegExp:m0,isFunction:nt,isStream:e0,isURLSearchParams:n0,isTypedArray:u0,isFileList:Yp,forEach:Li,merge:ra,extend:i0,trim:r0,stripBOM:s0,inherits:o0,toFlatObject:a0,kindOf:lo,kindOfTest:At,endsWith:c0,toArray:l0,forEachEntry:d0,matchAll:f0,isHTMLForm:h0,hasOwnProperty:Gc,hasOwnProp:Gc,reduceDescriptors:cd,freezeMethods:g0,toObjectSet:v0,toCamelCase:p0,noop:y0,toFiniteNumber:b0,findKey:sd,global:od,isContextDefined:ad,ALPHABET:ld,generateString:w0,isSpecCompliantForm:S0,toJSONObject:C0,isAsyncFn:_0,isThenable:E0};function ee(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(ee,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 ud=ee.prototype,dd={};["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=>{dd[t]={value:t}});Object.defineProperties(ee,dd);Object.defineProperty(ud,"isAxiosError",{value:!0});ee.from=(t,e,n,r,i,s)=>{const o=Object.create(ud);return k.toFlatObject(t,o,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),ee.call(o,t.message,e,n,r,i),o.cause=t,o.name=t.name,s&&Object.assign(o,s),o};const x0=null;function ia(t){return k.isPlainObject(t)||k.isArray(t)}function fd(t){return k.endsWith(t,"[]")?t.slice(0,-2):t}function Zc(t,e,n){return t?t.concat(e).map(function(i,s){return i=fd(i),!n&&s?"["+i+"]":i}).join(n?".":""):e}function O0(t){return k.isArray(t)&&!t.some(ia)}const T0=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(h,S){return!k.isUndefined(S[h])});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 ee("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,h,S){let b=m;if(m&&!S&&typeof m=="object"){if(k.endsWith(h,"{}"))h=r?h:h.slice(0,-2),m=JSON.stringify(m);else if(k.isArray(m)&&O0(m)||(k.isFileList(m)||k.endsWith(h,"[]"))&&(b=k.toArray(m)))return h=fd(h),b.forEach(function(y,E){!(k.isUndefined(y)||y===null)&&e.append(o===!0?Zc([h],E,s):o===null?h:h+"[]",l(y))}),!1}return ia(m)?!0:(e.append(Zc(S,h,s),l(m)),!1)}const d=[],f=Object.assign(T0,{defaultVisitor:u,convertValue:l,isVisitable:ia});function v(m,h){if(!k.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+h.join("."));d.push(m),k.forEach(m,function(b,_){(!(k.isUndefined(b)||b===null)&&i.call(e,b,k.isString(_)?_.trim():_,h,f))===!0&&v(b,h?h.concat(_):[_])}),d.pop()}}if(!k.isObject(t))throw new TypeError("data must be an object");return v(t),e}function Kc(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 hd=rc.prototype;hd.append=function(e,n){this._pairs.push([e,n])};hd.toString=function(e){const n=e?function(r){return e.call(this,r,Kc)}:Kc;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function P0(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function pd(t,e,n){if(!e)return t;const r=n&&n.encode||P0,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 Qc{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 md={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},A0=typeof URLSearchParams<"u"?URLSearchParams:rc,R0=typeof FormData<"u"?FormData:null,L0=typeof Blob<"u"?Blob:null,k0={isBrowser:!0,classes:{URLSearchParams:A0,FormData:R0,Blob:L0},protocols:["http","https","file","blob","url","data"]},gd=typeof window<"u"&&typeof document<"u",M0=(t=>gd&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),D0=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",j0=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:gd,hasStandardBrowserEnv:M0,hasStandardBrowserWebWorkerEnv:D0},Symbol.toStringTag,{value:"Module"})),Et={...j0,...k0};function N0(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 I0(t){return k.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function F0(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 vd(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]=F0(i[o])),!a)}if(k.isFormData(t)&&k.isFunction(t.entries)){const n={};return k.forEachEntry(t,(r,i)=>{e(I0(r),i,n,0)}),n}return null}function B0(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:md,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(vd(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 N0(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),B0(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"?ee.from(a,ee.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,V0=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"]),H0=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]&&V0[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Jc=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 U0(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 $0=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 z0(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function q0(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())&&!$0(e)?o(H0(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 U0(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?z0(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[Jc]=this[Jc]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=Ir(o);r[a]||(q0(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 Vt=po;function Ro(t,e){const n=this||sc,r=e||n,i=Vt.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 yd(t){return!!(t&&t.__CANCEL__)}function ki(t,e,n){ee.call(this,t??"canceled",ee.ERR_CANCELED,e,n),this.name="CanceledError"}k.inherits(ki,ee,{__CANCEL__:!0});function G0(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new ee("Request failed with status code "+n.status,[ee.ERR_BAD_REQUEST,ee.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const W0=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 Z0(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function K0(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function bd(t,e){return t&&!Z0(e)?K0(t,e):e}const Q0=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 J0(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function X0(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,f=0;for(;d!==i;)f+=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(f*1e3/v):void 0}}function Xc(t,e){let n=0;const r=X0(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 Y0=typeof XMLHttpRequest<"u",em=Y0&&function(t){return new Promise(function(n,r){let i=t.data;const s=Vt.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[h,...S]=u?u.split(";").map(b=>b.trim()).filter(Boolean):[];s.setContentType([h||"multipart/form-data",...S].join("; "))}}let d=new XMLHttpRequest;if(t.auth){const h=t.auth.username||"",S=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";s.set("Authorization","Basic "+btoa(h+":"+S))}const f=bd(t.baseURL,t.url);d.open(t.method.toUpperCase(),pd(f,t.params,t.paramsSerializer),!0),d.timeout=t.timeout;function v(){if(!d)return;const h=Vt.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),b={data:!o||o==="text"||o==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:h,config:t,request:d};G0(function(y){n(y),l()},function(y){r(y),l()},b),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 ee("Request aborted",ee.ECONNABORTED,t,d)),d=null)},d.onerror=function(){r(new ee("Network Error",ee.ERR_NETWORK,t,d)),d=null},d.ontimeout=function(){let S=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const b=t.transitional||md;t.timeoutErrorMessage&&(S=t.timeoutErrorMessage),r(new ee(S,b.clarifyTimeoutError?ee.ETIMEDOUT:ee.ECONNABORTED,t,d)),d=null},Et.hasStandardBrowserEnv&&(a&&k.isFunction(a)&&(a=a(t)),a||a!==!1&&Q0(f))){const h=t.xsrfHeaderName&&t.xsrfCookieName&&W0.read(t.xsrfCookieName);h&&s.set(t.xsrfHeaderName,h)}i===void 0&&s.setContentType(null),"setRequestHeader"in d&&k.forEach(s.toJSON(),function(S,b){d.setRequestHeader(b,S)}),k.isUndefined(t.withCredentials)||(d.withCredentials=!!t.withCredentials),o&&o!=="json"&&(d.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&d.addEventListener("progress",Xc(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",Xc(t.onUploadProgress)),(t.cancelToken||t.signal)&&(c=h=>{d&&(r(!h||h.type?new ki(null,t,d):h),d.abort(),d=null)},t.cancelToken&&t.cancelToken.subscribe(c),t.signal&&(t.signal.aborted?c():t.signal.addEventListener("abort",c)));const m=J0(f);if(m&&Et.protocols.indexOf(m)===-1){r(new ee("Unsupported protocol "+m+":",ee.ERR_BAD_REQUEST,t));return}d.send(i||null)})},sa={http:x0,xhr:em};k.forEach(sa,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Yc=t=>`- ${t}`,tm=t=>k.isFunction(t)||t===null||t===!1,wd={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,!tm(n)&&(r=sa[(o=String(n)).toLowerCase()],r===void 0))throw new ee(`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,mp=pp;function gp(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var vp=typeof Object.is=="function"?Object.is:gp,yp=mp.useSyncExternalStore,bp=co.useRef,wp=co.useEffect,Sp=co.useMemo,Cp=co.useDebugValue;Yu.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var s=bp(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=Sp(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,vp(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=yp(t,s[0],s[1]);return wp(function(){o.hasValue=!0,o.value=a},[a]),Cp(a),a};Xu.exports=Yu;var _p=Xu.exports;const Ep=ao(_p);var nd={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:xp}=p,{useSyncExternalStoreWithSelector:Op}=Ep;let zc=!1;const Tp=t=>t;function Pp(t,e=Tp,n){(nd?"production":void 0)!=="production"&&n&&!zc&&(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"),zc=!0);const r=Op(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return xp(r),r}const qc=t=>{(nd?"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"?ip(t):t,n=(r,i)=>Pp(e,r,i);return Object.assign(n,e),n},Ht=t=>t?qc(t):qc,Ap={location:null,warehousePoint:null},ec=t=>t.location,Re=Ht()(t=>({...Ap,setDeliverPoint(e){t({location:e})},setWarehousePoint(e){t({warehousePoint:e})}})),Rp={map:null,mode:"self_pickup",bounds:null,blurred:!1,loaded:!1,loading:!0,detailsOpen:!1,isIdle:!1},Lp=t=>t.map,kp=t=>t.mode,Mp=t=>t.bounds,Dp=t=>t.blurred,jp=t=>t.loaded,Np=t=>t.loading,tc=t=>t.detailsOpen,Z=Ht()(t=>({...Rp,setLoaded(){t({loaded:!0,loading:!1})},setMode(e){t({mode:e})},setBounds(e){t({bounds:e})},setDetailsOpen(e){t({detailsOpen:e})},setBlurred(e){t({blurred:e})},setMap(e){t({map:e})},setIdle(e){t({isIdle:e})}})),Ip={isTrackingEnabled:!1,location:null},Fp=t=>t.location,it=Ht()(t=>({...Ip,setSelectedLocation(e){t({location:e})},setIsTrackingEnabled(e){t({isTrackingEnabled:e})}})),Bp={query:"",type:Nt.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}},Vp=t=>t.type,Hp=t=>t.send,Up=t=>t.receive,un=Ht(t=>({...Bp,setFilter(e){Z.getState().setDetailsOpen(!1),Re.getState().setDeliverPoint(null),it.getState().setSelectedLocation(null),t(e)}})),$p=t=>{const[e,n]=t.split(":");return Number(e)*60+Number(n)},zp=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 rd(t,e){return function(){return t.apply(e,arguments)}}const{toString:Gp}=Object.prototype,{getPrototypeOf:nc}=Object,lo=(t=>e=>{const n=Gp.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),At=t=>(t=t.toLowerCase(),e=>lo(e)===t),uo=t=>e=>typeof e===t,{isArray:Pr}=Array,fi=uo("undefined");function Wp(t){return t!==null&&!fi(t)&&t.constructor!==null&&!fi(t.constructor)&&nt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const id=At("ArrayBuffer");function Zp(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&id(t.buffer),e}const Kp=uo("string"),nt=uo("function"),sd=uo("number"),fo=t=>t!==null&&typeof t=="object",Qp=t=>t===!0||t===!1,Ps=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)},Jp=At("Date"),Xp=At("File"),Yp=At("Blob"),e0=At("FileList"),t0=t=>fo(t)&&nt(t.pipe),n0=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]"))},r0=At("URLSearchParams"),i0=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Li(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),Pr(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 od(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 ad=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,cd=t=>!fi(t)&&t!==ad;function ra(){const{caseless:t}=cd(this)&&this||{},e={},n=(r,i)=>{const s=t&&od(e,i)||i;Ps(e[s])&&Ps(r)?e[s]=ra(e[s],r):Ps(r)?e[s]=ra({},r):Pr(r)?e[s]=r.slice():e[s]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Li(arguments[r],n);return e}const s0=(t,e,n,{allOwnKeys:r}={})=>(Li(e,(i,s)=>{n&&nt(i)?t[s]=rd(i,n):t[s]=i},{allOwnKeys:r}),t),o0=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),a0=(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)},c0=(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},l0=(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},u0=t=>{if(!t)return null;if(Pr(t))return t;let e=t.length;if(!sd(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},d0=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&nc(Uint8Array)),f0=(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])}},h0=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},p0=At("HTMLFormElement"),m0=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Gc=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),g0=At("RegExp"),ld=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Li(n,(i,s)=>{let o;(o=e(i,s,t))!==!1&&(r[s]=o||i)}),Object.defineProperties(t,r)},v0=t=>{ld(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+"'")})}})},y0=(t,e)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return Pr(t)?r(t):r(String(t).split(e)),n},b0=()=>{},w0=(t,e)=>(t=+t,Number.isFinite(t)?t:e),Po="abcdefghijklmnopqrstuvwxyz",Wc="0123456789",ud={DIGIT:Wc,ALPHA:Po,ALPHA_DIGIT:Po+Po.toUpperCase()+Wc},S0=(t=16,e=ud.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function C0(t){return!!(t&&nt(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const _0=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=Pr(r)?[]:{};return Li(r,(o,a)=>{const c=n(o,i+1);!fi(c)&&(s[a]=c)}),e[i]=void 0,s}}return r};return n(t,0)},E0=At("AsyncFunction"),x0=t=>t&&(fo(t)||nt(t))&&nt(t.then)&&nt(t.catch),k={isArray:Pr,isArrayBuffer:id,isBuffer:Wp,isFormData:n0,isArrayBufferView:Zp,isString:Kp,isNumber:sd,isBoolean:Qp,isObject:fo,isPlainObject:Ps,isUndefined:fi,isDate:Jp,isFile:Xp,isBlob:Yp,isRegExp:g0,isFunction:nt,isStream:t0,isURLSearchParams:r0,isTypedArray:d0,isFileList:e0,forEach:Li,merge:ra,extend:s0,trim:i0,stripBOM:o0,inherits:a0,toFlatObject:c0,kindOf:lo,kindOfTest:At,endsWith:l0,toArray:u0,forEachEntry:f0,matchAll:h0,isHTMLForm:p0,hasOwnProperty:Gc,hasOwnProp:Gc,reduceDescriptors:ld,freezeMethods:v0,toObjectSet:y0,toCamelCase:m0,noop:b0,toFiniteNumber:w0,findKey:od,global:ad,isContextDefined:cd,ALPHABET:ud,generateString:S0,isSpecCompliantForm:C0,toJSONObject:_0,isAsyncFn:E0,isThenable:x0};function ee(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(ee,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 dd=ee.prototype,fd={};["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=>{fd[t]={value:t}});Object.defineProperties(ee,fd);Object.defineProperty(dd,"isAxiosError",{value:!0});ee.from=(t,e,n,r,i,s)=>{const o=Object.create(dd);return k.toFlatObject(t,o,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),ee.call(o,t.message,e,n,r,i),o.cause=t,o.name=t.name,s&&Object.assign(o,s),o};const O0=null;function ia(t){return k.isPlainObject(t)||k.isArray(t)}function hd(t){return k.endsWith(t,"[]")?t.slice(0,-2):t}function Zc(t,e,n){return t?t.concat(e).map(function(i,s){return i=hd(i),!n&&s?"["+i+"]":i}).join(n?".":""):e}function T0(t){return k.isArray(t)&&!t.some(ia)}const P0=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 ee("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)&&T0(m)||(k.isFileList(m)||k.endsWith(f,"[]"))&&(y=k.toArray(m)))return f=hd(f),y.forEach(function(b,E){!(k.isUndefined(b)||b===null)&&e.append(o===!0?Zc([f],E,s):o===null?f:f+"[]",l(b))}),!1}return ia(m)?!0:(e.append(Zc(w,f,s),l(m)),!1)}const d=[],h=Object.assign(P0,{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 Kc(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 pd=rc.prototype;pd.append=function(e,n){this._pairs.push([e,n])};pd.toString=function(e){const n=e?function(r){return e.call(this,r,Kc)}:Kc;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function A0(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function md(t,e,n){if(!e)return t;const r=n&&n.encode||A0,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 Qc{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 gd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},R0=typeof URLSearchParams<"u"?URLSearchParams:rc,L0=typeof FormData<"u"?FormData:null,k0=typeof Blob<"u"?Blob:null,M0={isBrowser:!0,classes:{URLSearchParams:R0,FormData:L0,Blob:k0},protocols:["http","https","file","blob","url","data"]},vd=typeof window<"u"&&typeof document<"u",D0=(t=>vd&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),j0=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",N0=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:vd,hasStandardBrowserEnv:D0,hasStandardBrowserWebWorkerEnv:j0},Symbol.toStringTag,{value:"Module"})),Et={...N0,...M0};function I0(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 F0(t){return k.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function B0(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 yd(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]=B0(i[o])),!a)}if(k.isFormData(t)&&k.isFunction(t.entries)){const n={};return k.forEachEntry(t,(r,i)=>{e(F0(r),i,n,0)}),n}return null}function V0(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:gd,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(yd(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 I0(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),V0(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"?ee.from(a,ee.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,H0=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"]),U0=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]&&H0[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Jc=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 $0(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 z0=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 G0(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())&&!z0(e)?o(U0(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 $0(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[Jc]=this[Jc]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=Ir(o);r[a]||(G0(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 Vt=po;function Ro(t,e){const n=this||sc,r=e||n,i=Vt.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 bd(t){return!!(t&&t.__CANCEL__)}function ki(t,e,n){ee.call(this,t??"canceled",ee.ERR_CANCELED,e,n),this.name="CanceledError"}k.inherits(ki,ee,{__CANCEL__:!0});function W0(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new ee("Request failed with status code "+n.status,[ee.ERR_BAD_REQUEST,ee.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Z0=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 K0(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Q0(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function wd(t,e){return t&&!K0(e)?Q0(t,e):e}const J0=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 X0(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Y0(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 Xc(t,e){let n=0;const r=Y0(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 em=typeof XMLHttpRequest<"u",tm=em&&function(t){return new Promise(function(n,r){let i=t.data;const s=Vt.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=wd(t.baseURL,t.url);d.open(t.method.toUpperCase(),md(h,t.params,t.paramsSerializer),!0),d.timeout=t.timeout;function v(){if(!d)return;const f=Vt.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};W0(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 ee("Request aborted",ee.ECONNABORTED,t,d)),d=null)},d.onerror=function(){r(new ee("Network Error",ee.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||gd;t.timeoutErrorMessage&&(w=t.timeoutErrorMessage),r(new ee(w,y.clarifyTimeoutError?ee.ETIMEDOUT:ee.ECONNABORTED,t,d)),d=null},Et.hasStandardBrowserEnv&&(a&&k.isFunction(a)&&(a=a(t)),a||a!==!1&&J0(h))){const f=t.xsrfHeaderName&&t.xsrfCookieName&&Z0.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",Xc(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",Xc(t.onUploadProgress)),(t.cancelToken||t.signal)&&(c=f=>{d&&(r(!f||f.type?new ki(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=X0(h);if(m&&Et.protocols.indexOf(m)===-1){r(new ee("Unsupported protocol "+m+":",ee.ERR_BAD_REQUEST,t));return}d.send(i||null)})},sa={http:O0,xhr:tm};k.forEach(sa,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Yc=t=>`- ${t}`,nm=t=>k.isFunction(t)||t===null||t===!1,Sd={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,!nm(n)&&(r=sa[(o=String(n)).toLowerCase()],r===void 0))throw new ee(`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(Yc).join(`
21
- `):" "+Yc(s[0]):"as no adapter specified";throw new ee("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 ki(null,t)}function el(t){return Lo(t),t.headers=Vt.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),wd.getAdapter(t.adapter||sc.adapter)(t).then(function(r){return Lo(t),r.data=Ro.call(t,t.transformResponse,r),r.headers=Vt.from(r.headers),r},function(r){return yd(r)||(Lo(t),r&&r.response&&(r.response.data=Ro.call(t,t.transformResponse,r.response),r.response.headers=Vt.from(r.response.headers))),Promise.reject(r)})}const tl=t=>t instanceof Vt?{...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(tl(l),tl(u),!0)};return k.forEach(Object.keys(Object.assign({},t,e)),function(u){const d=c[u]||i,f=d(t[u],e[u],u);k.isUndefined(f)&&d!==a||(n[u]=f)}),n}const Sd="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 nl={};oc.transitional=function(e,n,r){function i(s,o){return"[Axios v"+Sd+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,a)=>{if(e===!1)throw new ee(i(o," has been removed"+(n?" in "+n:"")),ee.ERR_DEPRECATED);return n&&!nl[o]&&(nl[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 nm(t,e,n){if(typeof t!="object")throw new ee("options must be an object",ee.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 ee("option "+s+" must be "+c,ee.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ee("Unknown option "+s,ee.ERR_BAD_OPTION)}}const oa={assertOptions:nm,validators:oc},Gt=oa.validators;class Us{constructor(e){this.defaults=e,this.interceptors={request:new Qc,response:new Qc}}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:Gt.transitional(Gt.boolean),forcedJSONParsing:Gt.transitional(Gt.boolean),clarifyTimeoutError:Gt.transitional(Gt.boolean)},!1),i!=null&&(k.isFunction(i)?n.paramsSerializer={serialize:i}:oa.assertOptions(i,{encode:Gt.function,serialize:Gt.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=Vt.concat(o,s);const a=[];let c=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(c=c&&h.synchronous,a.unshift(h.fulfilled,h.rejected))});const l=[];this.interceptors.response.forEach(function(h){l.push(h.fulfilled,h.rejected)});let u,d=0,f;if(!c){const m=[el.bind(this),void 0];for(m.unshift.apply(m,a),m.push.apply(m,l),f=m.length,u=Promise.resolve(n);d<f;)u=u.then(m[d++],m[d++]);return u}f=a.length;let v=n;for(d=0;d<f;){const m=a[d++],h=a[d++];try{v=m(v)}catch(S){h.call(this,S);break}}try{u=el.call(this,v)}catch(m){return Promise.reject(m)}for(d=0,f=l.length;d<f;)u=u.then(l[d++],l[d++]);return u}getUri(e){e=_r(this.defaults,e);const n=bd(e.baseURL,e.url);return pd(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 ki(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 rm=ac;function im(t){return function(n){return t.apply(null,n)}}function sm(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 om=aa;function Cd(t){const e=new Rs(t),n=nd(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 Cd(_r(t,i))},n}const Se=Cd(sc);Se.Axios=Rs;Se.CanceledError=ki;Se.CancelToken=rm;Se.isCancel=yd;Se.VERSION=Sd;Se.toFormData=ho;Se.AxiosError=ee;Se.Cancel=Se.CanceledError;Se.all=function(e){return Promise.all(e)};Se.spread=im;Se.isAxiosError=sm;Se.mergeConfig=_r;Se.AxiosHeaders=Vt;Se.formToJSON=t=>vd(k.isHTMLForm(t)?new FormData(t):t);Se.getAdapter=wd.getAdapter;Se.HttpStatusCode=om;Se.default=Se;const hi=Se.create({baseURL:"https://ecomgate.omnic.solutions/api/1.0.0/type-1/public/"}),am=512,cm={[ht.CheckOrder]:["is_check_order","is_delivery"],[ht.DressingRoom]:["is_dressing_room","is_delivery"],[ht.PayByCash]:["pay_by_cash","pay_by_card","is_delivery"]},lm={[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:am,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,f]of Object.entries(r==null?void 0:r.receive)){if(!f)continue;const v=cm[d];for(const m of v)a[m]=!0}if(r!=null&&r.send)for(const[d,f]of Object.entries(r==null?void 0:r.send)){if(!f)continue;const v=lm[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 hi.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 hi.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)}}},_d=":root",Mi=(t,e)=>{var n;(n=document.querySelector(_d))==null||n.style.setProperty(t,e)};var $s={};(function(t){var e,n,r=Qi&&Qi.__awaiter||function(g,C,O,A){return new(O=O||Promise)(function(R,L){function T(H){try{N(A.next(H))}catch(B){L(B)}}function D(H){try{N(A.throw(H))}catch(B){L(B)}}function N(H){var B;H.done?R(H.value):((B=H.value)instanceof O?B:new O(function($){$(B)})).then(T,D)}N((A=A.apply(g,C||[])).next())})},i=Qi&&Qi.__rest||function(g,C){var O={};for(R in g)Object.prototype.hasOwnProperty.call(g,R)&&C.indexOf(R)<0&&(O[R]=g[R]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var A=0,R=Object.getOwnPropertySymbols(g);A<R.length;A++)C.indexOf(R[A])<0&&Object.prototype.propertyIsEnumerable.call(g,R[A])&&(O[R[A]]=g[R[A]]);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,C=i(g,["outputFormat"]),C=new URLSearchParams(C).toString(),O=s+`/${O}?`+C;try{var A=yield(yield fetch(O)).json(),{status:R,error_message:L}=A;if(R==="OK")return A;throw new Error(`Geocoding failed: ${L}. Server returned status code ${R}.`)}catch(T){throw T instanceof Error?new Error("Geocoding request failed: "+T.message):new Error("Geocoding request failed with unknown error: "+T)}})}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 f(g){o.components=g}function v(g){o.bounds=g}function m(g){o.result_type=g}function h(g){o.location_type=g}function S(g){o.outputFormat=g}function b(g){o.enable_address_descriptor=g}function _(g,C,O){if(typeof g!="string"||typeof C!="string")throw new Error(`Both requestType and value are required and must be of type string.
23
- requestType: ${typeof g}, value: `+typeof C);return a(Object.assign(Object.assign(Object.assign({},o),O),{[g]:C}))}function y(g,C,O,A){var R={outputFormat:n.JSON};return C&&(R.key=C),O&&(R.language=O),A&&(R.region=A),_(e.ADDRESS,g,R)}function E(g,C,O,A){var R={outputFormat:n.JSON};return C&&(R.key=C),O&&(R.language=O),A&&(R.region=A),_(e.PLACE_ID,g,R)}function x(g,C,O,A,R,L){var T={outputFormat:n.JSON};return O&&(T.key=O),A&&(T.language=A),R&&(T.region=R),L&&(T.location_type=L),_(e.LATLNG,g+","+C,T)}t.setDefaults=c,t.setKey=l,t.setLanguage=u,t.setRegion=d,t.setComponents=f,t.setBounds=v,t.setResultType=m,t.setLocationType=h,t.setOutputFormat=S,t.enableAddressDescriptor=b,t.geocode=_,t.fromAddress=y,t.fromPlaceId=E,t.fromLatLng=x})($s);const Ed=t=>typeof t=="string",ua=t=>Array.isArray(t)&&t.length===2;async function da(t,e,n){var s;let r;if(Ed(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=Z.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})},xd=t=>t.status===200,Od=t=>{const e=document.querySelector(_d);return e?getComputedStyle(e).getPropertyValue(t):null},rr=(t,e)=>{let n=t;const r=(e.includes("--owl")?Od(e):e)||"";return n=n.replaceAll("currentColor",r),n},um=t=>"comment"in t&&"address"in t&&"apartment_number"in t&&"delivery_time"in t;async function Td(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 dm={points:[],samePoints:[],error:!1,loaded:!1,loading:!1,reloading:!1,requestId:0},fm=t=>t.points,hm=t=>t.loaded,Pd=t=>t.loading,Pt=Ht()((t,e)=>({...dm,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}),Z.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=kp(Z.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})}}})),pm=({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=un.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])},Qt=".",lc=Symbol("target"),Ad=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 mm(t){return(typeof t=="object"?t===null:typeof t!="function")||t instanceof RegExp}const Be=Array.isArray;function zs(t){return typeof t=="symbol"}const $e={after(t,e){return Be(t)?t.slice(e.length):e===""?t:t.slice(e.length+1)},concat(t,e){return Be(t)?(t=[...t],e&&t.push(e),t):e&&e.toString!==void 0?(t!==""&&(t+=Qt),zs(e)?t+e.toString():t+e):t},initial(t){if(Be(t))return t.slice(0,-1);if(t==="")return t;const e=t.lastIndexOf(Qt);return e===-1?"":t.slice(0,e)},last(t){if(Be(t))return t.at(-1)??"";if(t==="")return t;const e=t.lastIndexOf(Qt);return e===-1?t:t.slice(e+1)},walk(t,e){if(Be(t))for(const n of t)e(n);else if(t!==""){let n=0,r=t.indexOf(Qt);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(Qt,n)}},get(t,e){return this.walk(e,n=>{t&&(t=t[n])}),t},isSubPath(t,e){if(Be(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]===Qt:!1},isRootPath(t){return Be(t)?t.length===0:t===""}};function gm(t){return typeof t=="object"&&typeof t.next=="function"}function vm(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 rl(t,e,n){return t.isUnsubscribed||e.ignoreSymbols&&zs(n)||e.ignoreUnderscores&&n.charAt(0)==="_"||"ignoreKeys"in e&&e.ignoreKeys.includes(n)}let ym=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,$e.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 zn(t,e){return t.length!==e.length||t.some((n,r)=>e[r]!==n)}const Rd=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),bm=new Set(["concat","includes","indexOf","join","keys","lastIndexOf"]),Ld={push:Xi,pop:Xi,shift:Xi,unshift:Xi,copyWithin:zn,reverse:zn,sort:zn,splice:zn,flat:zn,fill:zn},wm=new Set([...Rd,...bm,...Object.keys(Ld)]);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 kd=["keys","values","entries"],Md=new Set(["has","toString"]),Dd={add:Yi,clear:Yi,delete:Yi,forEach:Yi},Sm=new Set([...Md,...Object.keys(Dd),...kd]);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 Cm=new Set([...Md,"get"]),jd={set:es,clear:es,delete:es,forEach:es},_m=new Set([...Cm,...Object.keys(jd),...kd]);class dn{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 Rd.has(e)}_shallowClone(e){let n=e;if(ha(e))n={...e};else if(Be(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?(Be(i)?this._onIsChanged=Ld[n]:i instanceof Set?this._onIsChanged=Dd[n]:i instanceof Map&&(this._onIsChanged=jd[n]),i):r}update(e,n,r){const i=$e.after(e,this._path);if(n!=="length"){let s=this.clone;$e.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],$e.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 $e.isRootPath(this._path)||$e.isSubPath(e,this._path)}}class il extends dn{static isHandledMethod(e){return wm.has(e)}}class Em extends dn{undo(e){e.setTime(this.clone.getTime())}isChanged(e,n){return!n(this.clone.valueOf(),e.valueOf())}}class sl extends dn{static isHandledMethod(e){return Sm.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 ol extends dn{static isHandledMethod(e){return _m.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 xm extends dn{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 Om extends dn{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 yn{constructor(e){this._stack=[],this._hasOnValidate=e}static isHandledType(e){return ha(e)||Be(e)||fa(e)}static isHandledMethod(e,n){return ha(e)?dn.isHandledMethod(n):Be(e)?il.isHandledMethod(n):e instanceof Set?sl.isHandledMethod(n):e instanceof Map?ol.isHandledMethod(n):fa(e)}get isCloning(){return this._stack.length>0}start(e,n,r){let i=dn;Be(e)?i=il:e instanceof Date?i=Em:e instanceof Set?i=sl:e instanceof Map?i=ol:e instanceof WeakSet?i=xm:e instanceof WeakMap&&(i=Om),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=yn.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 Tm={equals:Object.is,isShallow:!1,pathAsArray:!1,ignoreSymbols:!1,ignoreUnderscores:!1,ignoreDetached:!1,details:!1},ti=(t,e,n={})=>{n={...Tm,...n};const r=Symbol("ProxyTarget"),{equals:i,isShallow:s,ignoreDetached:o,details:a}=n,c=new ym(i),l=typeof n.onValidate=="function",u=new yn(l),d=(y,E,x,g,C)=>!l||u.isCloning||n.onValidate($e.concat(c.getPath(y),E),x,g,C)===!0,f=(y,E,x,g)=>{!rl(c,n,E)&&!(o&&c.isDetached(y,t))&&v(c.getPath(y),E,x,g)},v=(y,E,x,g,C)=>{u.isCloning&&u.isPartOfClone(y)?u.update(y,E,g):e($e.concat(y,E),x,g,C)},m=y=>y&&(y[r]??y),h=(y,E,x,g)=>{if(mm(y)||x==="constructor"||s&&!yn.isHandledMethod(E,x)||rl(c,n,x)||c.isGetInvariant(E,x)||o&&c.isDetached(E,t))return y;g===void 0&&(g=c.getPath(E));const C=$e.concat(g,x),O=c.getPath(y);return O&&S(C,O)?c.getProxy(y,O,b,r):c.getProxy(y,C,b,r)},S=(y,E)=>{if(zs(y)||y.length<=E.length||Be(E)&&E.length===0)return!1;const x=Be(y)?y:y.split(Qt),g=Be(E)?E:E.split(Qt);return x.length<=g.length?!1:!g.some((C,O)=>C!==x[O])},b={get(y,E,x){if(zs(E)){if(E===r||E===lc)return y;if(E===Ad&&!c.isUnsubscribed&&c.getPath(y).length===0)return c.unsubscribe(),y}const g=fa(y)?Reflect.get(y,E):Reflect.get(y,E,x);return h(g,y,E)},set(y,E,x,g){x=m(x);const C=y[r]??y,O=C[E];if(i(O,x)&&E in y)return!0;const A=d(y,E,x,O);return A&&c.setProperty(C,E,x,g,O)?(f(y,E,y[E],O),!0):!A},defineProperty(y,E,x){if(!c.isSameDescriptor(x,y,E)){const g=y[E];d(y,E,x.value,g)&&c.defineProperty(y,E,x,g)&&f(y,E,x.value,g)}return!0},deleteProperty(y,E){if(!Reflect.has(y,E))return!0;const x=Reflect.get(y,E),g=d(y,E,void 0,x);return g&&c.deleteProperty(y,E,x)?(f(y,E,void 0,x),!0):!g},apply(y,E,x){const g=E[r]??E;if(c.isUnsubscribed)return Reflect.apply(y,g,x);if((a===!1||a!==!0&&!a.includes(y.name))&&yn.isHandledType(g)){let C=$e.initial(c.getPath(y));const O=yn.isHandledMethod(g,y.name);u.start(g,C,x);let A=Reflect.apply(y,u.preferredThisArg(y,E,g),O?x.map(T=>m(T)):x);const R=u.isChanged(g,i),L=u.stop();if(yn.isHandledType(A)&&O&&(E instanceof Map&&y.name==="get"&&(C=$e.concat(C,x[0])),A=c.getProxy(A,C,b)),R){const T={name:y.name,args:x,result:A},D=u.isCloning?$e.initial(C):C,N=u.isCloning?$e.last(C):"";d($e.get(t,D),N,g,L,T)?v(D,N,g,L,T):u.undo(g)}return(E instanceof Map||E instanceof Set)&&gm(A)?vm(A,y,E,C,h):A}return Reflect.apply(y,E,x)}},_=c.getProxy(t,n.pathAsArray?[]:"",b);return e=e.bind(_),l&&(n.onValidate=n.onValidate.bind(_)),_};ti.target=t=>(t==null?void 0:t[lc])??t;ti.unsubscribe=t=>(t==null?void 0:t[Ad])??t;const Pm=t=>{const e=t??window.OMNIC_WIDGET_LOCATIONS_CONFIG,[n,r]=p.useState({...gn,...e,map:{...gn.map,...e==null?void 0:e.map},palette:{...gn.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={...gn,...t,map:{...gn.map,...t.map},palette:{...gn.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=ti(window.OMNIC_WIDGET_LOCATIONS_CONFIG,function(){const o={...n,...ti.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&&ti.unsubscribe(window.OMNIC_WIDGET_LOCATIONS_CONFIG)}},[n,s]),n},Am=(t,e)=>{console.debug("[OmnicWidgetLocations::axios]",{INN:t,options:e}),hi.defaults.headers.get.Authorization=`INN ${t}`,e!=null&&e.baseURL&&(hi.defaults.baseURL=e.baseURL)};var Nd={exports:{}};/*!
21
+ `):" "+Yc(s[0]):"as no adapter specified";throw new ee("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 ki(null,t)}function el(t){return Lo(t),t.headers=Vt.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),Sd.getAdapter(t.adapter||sc.adapter)(t).then(function(r){return Lo(t),r.data=Ro.call(t,t.transformResponse,r),r.headers=Vt.from(r.headers),r},function(r){return bd(r)||(Lo(t),r&&r.response&&(r.response.data=Ro.call(t,t.transformResponse,r.response),r.response.headers=Vt.from(r.response.headers))),Promise.reject(r)})}const tl=t=>t instanceof Vt?{...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(tl(l),tl(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 Cd="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 nl={};oc.transitional=function(e,n,r){function i(s,o){return"[Axios v"+Cd+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,a)=>{if(e===!1)throw new ee(i(o," has been removed"+(n?" in "+n:"")),ee.ERR_DEPRECATED);return n&&!nl[o]&&(nl[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 rm(t,e,n){if(typeof t!="object")throw new ee("options must be an object",ee.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 ee("option "+s+" must be "+c,ee.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ee("Unknown option "+s,ee.ERR_BAD_OPTION)}}const oa={assertOptions:rm,validators:oc},Gt=oa.validators;class Us{constructor(e){this.defaults=e,this.interceptors={request:new Qc,response:new Qc}}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:Gt.transitional(Gt.boolean),forcedJSONParsing:Gt.transitional(Gt.boolean),clarifyTimeoutError:Gt.transitional(Gt.boolean)},!1),i!=null&&(k.isFunction(i)?n.paramsSerializer={serialize:i}:oa.assertOptions(i,{encode:Gt.function,serialize:Gt.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=Vt.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=[el.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=el.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=wd(e.baseURL,e.url);return md(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 ki(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 im=ac;function sm(t){return function(n){return t.apply(null,n)}}function om(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 am=aa;function _d(t){const e=new Rs(t),n=rd(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 _d(_r(t,i))},n}const Se=_d(sc);Se.Axios=Rs;Se.CanceledError=ki;Se.CancelToken=im;Se.isCancel=bd;Se.VERSION=Cd;Se.toFormData=ho;Se.AxiosError=ee;Se.Cancel=Se.CanceledError;Se.all=function(e){return Promise.all(e)};Se.spread=sm;Se.isAxiosError=om;Se.mergeConfig=_r;Se.AxiosHeaders=Vt;Se.formToJSON=t=>yd(k.isHTMLForm(t)?new FormData(t):t);Se.getAdapter=Sd.getAdapter;Se.HttpStatusCode=am;Se.default=Se;const hi=Se.create({baseURL:"https://ecomgate.omnic.solutions/api/1.0.0/type-1/public/"}),cm=512,lm={[ht.CheckOrder]:["is_check_order","is_delivery"],[ht.DressingRoom]:["is_dressing_room","is_delivery"],[ht.PayByCash]:["pay_by_cash","pay_by_card","is_delivery"]},um={[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:cm,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=lm[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=um[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 hi.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 hi.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)}}},Ed=":root",Mi=(t,e)=>{var n;(n=document.querySelector(Ed))==null||n.style.setProperty(t,e)};var $s={};(function(t){var e,n,r=Qi&&Qi.__awaiter||function(g,_,O,A){return new(O=O||Promise)(function(R,L){function T(H){try{N(A.next(H))}catch(B){L(B)}}function D(H){try{N(A.throw(H))}catch(B){L(B)}}function N(H){var B;H.done?R(H.value):((B=H.value)instanceof O?B:new O(function($){$(B)})).then(T,D)}N((A=A.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 A=0,R=Object.getOwnPropertySymbols(g);A<R.length;A++)_.indexOf(R[A])<0&&Object.prototype.propertyIsEnumerable.call(g,R[A])&&(O[R[A]]=g[R[A]]);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 A=yield(yield fetch(O)).json(),{status:R,error_message:L}=A;if(R==="OK")return A;throw new Error(`Geocoding failed: ${L}. Server returned status code ${R}.`)}catch(T){throw T instanceof Error?new Error("Geocoding request failed: "+T.message):new Error("Geocoding request failed with unknown error: "+T)}})}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,A){var R={outputFormat:n.JSON};return _&&(R.key=_),O&&(R.language=O),A&&(R.region=A),C(e.ADDRESS,g,R)}function E(g,_,O,A){var R={outputFormat:n.JSON};return _&&(R.key=_),O&&(R.language=O),A&&(R.region=A),C(e.PLACE_ID,g,R)}function x(g,_,O,A,R,L){var T={outputFormat:n.JSON};return O&&(T.key=O),A&&(T.language=A),R&&(T.region=R),L&&(T.location_type=L),C(e.LATLNG,g+","+_,T)}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 xd=t=>typeof t=="string",ua=t=>Array.isArray(t)&&t.length===2;async function da(t,e,n){var s;let r;if(xd(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=Z.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})},Od=t=>t.status===200,Td=t=>{const e=document.querySelector(Ed);return e?getComputedStyle(e).getPropertyValue(t):null},rr=(t,e)=>{let n=t;const r=(e.includes("--owl")?Td(e):e)||"";return n=n.replaceAll("currentColor",r),n},dm=t=>"comment"in t&&"address"in t&&"apartment_number"in t&&"delivery_time"in t;async function Pd(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 fm={points:[],samePoints:[],error:!1,loaded:!1,loading:!1,reloading:!1,requestId:0},hm=t=>t.points,pm=t=>t.loaded,Ad=t=>t.loading,Pt=Ht()((t,e)=>({...fm,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}),Z.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=Mp(Z.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})}}})),mm=({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=un.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])},Qt=".",lc=Symbol("target"),Rd=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 gm(t){return(typeof t=="object"?t===null:typeof t!="function")||t instanceof RegExp}const Be=Array.isArray;function zs(t){return typeof t=="symbol"}const $e={after(t,e){return Be(t)?t.slice(e.length):e===""?t:t.slice(e.length+1)},concat(t,e){return Be(t)?(t=[...t],e&&t.push(e),t):e&&e.toString!==void 0?(t!==""&&(t+=Qt),zs(e)?t+e.toString():t+e):t},initial(t){if(Be(t))return t.slice(0,-1);if(t==="")return t;const e=t.lastIndexOf(Qt);return e===-1?"":t.slice(0,e)},last(t){if(Be(t))return t.at(-1)??"";if(t==="")return t;const e=t.lastIndexOf(Qt);return e===-1?t:t.slice(e+1)},walk(t,e){if(Be(t))for(const n of t)e(n);else if(t!==""){let n=0,r=t.indexOf(Qt);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(Qt,n)}},get(t,e){return this.walk(e,n=>{t&&(t=t[n])}),t},isSubPath(t,e){if(Be(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]===Qt:!1},isRootPath(t){return Be(t)?t.length===0:t===""}};function vm(t){return typeof t=="object"&&typeof t.next=="function"}function ym(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 rl(t,e,n){return t.isUnsubscribed||e.ignoreSymbols&&zs(n)||e.ignoreUnderscores&&n.charAt(0)==="_"||"ignoreKeys"in e&&e.ignoreKeys.includes(n)}let bm=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,$e.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 zn(t,e){return t.length!==e.length||t.some((n,r)=>e[r]!==n)}const Ld=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),wm=new Set(["concat","includes","indexOf","join","keys","lastIndexOf"]),kd={push:Xi,pop:Xi,shift:Xi,unshift:Xi,copyWithin:zn,reverse:zn,sort:zn,splice:zn,flat:zn,fill:zn},Sm=new Set([...Ld,...wm,...Object.keys(kd)]);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 Md=["keys","values","entries"],Dd=new Set(["has","toString"]),jd={add:Yi,clear:Yi,delete:Yi,forEach:Yi},Cm=new Set([...Dd,...Object.keys(jd),...Md]);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 _m=new Set([...Dd,"get"]),Nd={set:es,clear:es,delete:es,forEach:es},Em=new Set([..._m,...Object.keys(Nd),...Md]);class dn{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 Ld.has(e)}_shallowClone(e){let n=e;if(ha(e))n={...e};else if(Be(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?(Be(i)?this._onIsChanged=kd[n]:i instanceof Set?this._onIsChanged=jd[n]:i instanceof Map&&(this._onIsChanged=Nd[n]),i):r}update(e,n,r){const i=$e.after(e,this._path);if(n!=="length"){let s=this.clone;$e.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],$e.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 $e.isRootPath(this._path)||$e.isSubPath(e,this._path)}}class il extends dn{static isHandledMethod(e){return Sm.has(e)}}class xm extends dn{undo(e){e.setTime(this.clone.getTime())}isChanged(e,n){return!n(this.clone.valueOf(),e.valueOf())}}class sl extends dn{static isHandledMethod(e){return Cm.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 ol extends dn{static isHandledMethod(e){return Em.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 Om extends dn{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 Tm extends dn{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 yn{constructor(e){this._stack=[],this._hasOnValidate=e}static isHandledType(e){return ha(e)||Be(e)||fa(e)}static isHandledMethod(e,n){return ha(e)?dn.isHandledMethod(n):Be(e)?il.isHandledMethod(n):e instanceof Set?sl.isHandledMethod(n):e instanceof Map?ol.isHandledMethod(n):fa(e)}get isCloning(){return this._stack.length>0}start(e,n,r){let i=dn;Be(e)?i=il:e instanceof Date?i=xm:e instanceof Set?i=sl:e instanceof Map?i=ol:e instanceof WeakSet?i=Om:e instanceof WeakMap&&(i=Tm),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=yn.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 Pm={equals:Object.is,isShallow:!1,pathAsArray:!1,ignoreSymbols:!1,ignoreUnderscores:!1,ignoreDetached:!1,details:!1},ti=(t,e,n={})=>{n={...Pm,...n};const r=Symbol("ProxyTarget"),{equals:i,isShallow:s,ignoreDetached:o,details:a}=n,c=new bm(i),l=typeof n.onValidate=="function",u=new yn(l),d=(b,E,x,g,_)=>!l||u.isCloning||n.onValidate($e.concat(c.getPath(b),E),x,g,_)===!0,h=(b,E,x,g)=>{!rl(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($e.concat(b,E),x,g,_)},m=b=>b&&(b[r]??b),f=(b,E,x,g)=>{if(gm(b)||x==="constructor"||s&&!yn.isHandledMethod(E,x)||rl(c,n,x)||c.isGetInvariant(E,x)||o&&c.isDetached(E,t))return b;g===void 0&&(g=c.getPath(E));const _=$e.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||Be(E)&&E.length===0)return!1;const x=Be(b)?b:b.split(Qt),g=Be(E)?E:E.split(Qt);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===Rd&&!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 A=d(b,E,x,O);return A&&c.setProperty(_,E,x,g,O)?(h(b,E,b[E],O),!0):!A},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))&&yn.isHandledType(g)){let _=$e.initial(c.getPath(b));const O=yn.isHandledMethod(g,b.name);u.start(g,_,x);let A=Reflect.apply(b,u.preferredThisArg(b,E,g),O?x.map(T=>m(T)):x);const R=u.isChanged(g,i),L=u.stop();if(yn.isHandledType(A)&&O&&(E instanceof Map&&b.name==="get"&&(_=$e.concat(_,x[0])),A=c.getProxy(A,_,y)),R){const T={name:b.name,args:x,result:A},D=u.isCloning?$e.initial(_):_,N=u.isCloning?$e.last(_):"";d($e.get(t,D),N,g,L,T)?v(D,N,g,L,T):u.undo(g)}return(E instanceof Map||E instanceof Set)&&vm(A)?ym(A,b,E,_,f):A}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};ti.target=t=>(t==null?void 0:t[lc])??t;ti.unsubscribe=t=>(t==null?void 0:t[Rd])??t;const Am=t=>{const e=t??window.OMNIC_WIDGET_LOCATIONS_CONFIG,[n,r]=p.useState({...gn,...e,map:{...gn.map,...e==null?void 0:e.map},palette:{...gn.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={...gn,...t,map:{...gn.map,...t.map},palette:{...gn.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=ti(window.OMNIC_WIDGET_LOCATIONS_CONFIG,function(){const o={...n,...ti.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&&ti.unsubscribe(window.OMNIC_WIDGET_LOCATIONS_CONFIG)}},[n,s]),n},Rm=(t,e)=>{console.debug("[OmnicWidgetLocations::axios]",{INN:t,options:e}),hi.defaults.headers.get.Authorization=`INN ${t}`,e!=null&&e.baseURL&&(hi.defaults.baseURL=e.baseURL)};var Id={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})()})(Nd);var Rm=Nd.exports;const K=ao(Rm),Lm={lmsData:null,isLoading:!1},mo=Ht()(t=>({...Lm,setLMSData:e=>t({lmsData:e}),setLoading:e=>t({isLoading:e})}));var km=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 Id=ao(km);function Tt(){return Tt=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},Tt.apply(null,arguments)}function kn(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 Mm(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 Dm(t){var e=Mm(t,"string");return typeof e=="symbol"?e:e+""}const Bt={NOT_LOADED:"NOT_LOADED",LOADING:"LOADING",LOADED:"LOADED",FAILED:"FAILED",AUTH_FAILURE:"AUTH_FAILURE"},jm="https://maps.googleapis.com/maps/api/js";class pi{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,f=>"_"+f[0].toLowerCase());c.set(d,String(u))}c.set("loading","async"),c.set("callback","__googleMapsCallback__"),a.async=!0,a.src=jm+"?"+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)}}pi.loadingStatus=Bt.NOT_LOADED;pi.serializedApiParams=void 0;pi.listeners=[];const Nm=["onLoad","onError","apiKey","version","libraries"],Im=["children"],Fm="GMP_visgl_rgmlibrary_v1_default",Di=p.createContext(null);function Bm(){const[t,e]=p.useState({});return{mapInstances:t,addMapInstance:(s,o="default")=>{e(a=>Tt({},a,{[o]:s}))},removeMapInstance:(s="default")=>{e(o=>kn(o,[s].map(Dm)))},clearMapInstances:()=>{e({})}}}function Vm(t){const{onLoad:e,onError:n,apiKey:r,version:i,libraries:s=[]}=t,o=kn(t,Nm),[a,c]=p.useState(pi.loadingStatus),[l,u]=p.useReducer((m,h)=>m[h.name]?m:Tt({},m,{[h.name]:h.value}),{}),d=p.useMemo(()=>s==null?void 0:s.join(","),[s]),f=p.useMemo(()=>JSON.stringify(Tt({apiKey:r,version:i},o)),[r,i,o]),v=p.useCallback(async m=>{var h;if(l[m])return l[m];if(!((h=google)!=null&&(h=h.maps)!=null&&h.importLibrary))throw new Error("[api-provider-internal] importLibrary was called before google.maps.importLibrary was defined.");const S=await window.google.maps.importLibrary(m);return u({name:m,value:S}),S},[l]);return p.useEffect(()=>{(async()=>{try{const m=Tt({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=Fm:m.solutionChannel===""&&delete m.solutionChannel,await pi.load(m,h=>c(h));for(const h of["core","maps",...s])await v(h);e&&e()}catch(m){n?n(m):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",m)}})()},[r,d,f]),{status:a,loadedLibraries:l,importLibrary:v}}const Hm=t=>{const{children:e}=t,n=kn(t,Im),{mapInstances:r,addMapInstance:i,removeMapInstance:s,clearMapInstances:o}=Bm(),{status:a,loadedLibraries:c,importLibrary:l}=Vm(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(Di.Provider,{value:u},e)};function Um(t,e){for(const n of Gm){const r=e[n],i=Fd[n];p.useEffect(()=>{if(!t||!r)return;const s=google.maps.event.addListener(t,i,o=>{r($m(i,t,o))});return()=>s.remove()},[t,i,r])}}function $m(t,e,n){const r={type:t,map:e,detail:{},stoppable:!1,stop:()=>{}};if(zm.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(qm.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 Fd={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"},zm=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],qm=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],Gm=Object.keys(Fd);function Bd(t,e){const n=p.useRef(t);return e(t,n.current)||(n.current=t),n.current}function Wm(t,e,n){p.useEffect(t,[Bd(e,n)])}function Zm(t,e){Wm(t,e,Id)}const Km=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 Qm(t,e){const n={},r=Object.keys(e);for(const i of r)Km.has(i)&&(n[i]=e[i]);Zm(()=>{t&&t.setOptions(n)},[n])}function Vd(){var t;return((t=p.useContext(Di))==null?void 0:t.status)||Bt.NOT_LOADED}function Jm(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 Xm(t){return!t||typeof t!="object"||!("lat"in t&&"lng"in t)?!1:Number.isFinite(t.lat)&&Number.isFinite(t.lng)}function Hd(t){return Xm(t)?t:t.toJSON()}function Ym(t,e,n){const r=n.center?Hd(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 eg=()=>{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 tg(){const[t,e]=p.useState(null),n=p.useCallback(r=>e(r),[e]);return[t,n]}function Ud(){return Vd()===Bt.LOADED}function ng(){const[,t]=p.useReducer(e=>e+1,0);return t}function rg(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 ig(t){const e=ng(),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",()=>{rg(t,n),e()});return()=>r.remove()},[t,e]),n}const sg=["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"],og=["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 ag(t,e){const n=Ud(),[r,i]=p.useState(null),[s,o]=tg(),a=ig(r),{id:c,defaultBounds:l,defaultCenter:u,defaultZoom:d,defaultHeading:f,defaultTilt:v,reuseMaps:m,renderingType:h,colorScheme:S}=t,b=kn(t,sg),_=t.zoom!==void 0||t.defaultZoom!==void 0,y=t.center!==void 0||t.defaultCenter!==void 0;!l&&(!_||!y)&&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"),!b.center&&u&&(b.center=u),!b.zoom&&Number.isFinite(d)&&(b.zoom=d),!b.heading&&Number.isFinite(f)&&(b.heading=f),!b.tilt&&Number.isFinite(v)&&(b.tilt=v);for(const x of Object.keys(b))b[x]===void 0&&delete b[x];const E=p.useRef(void 0);return p.useEffect(()=>{if(!s||!n)return;const{addMapInstance:x,removeMapInstance:g}=e,{mapId:C}=t,O=`${C||"default"}:${h||"default"}:${S||"LIGHT"}`;let A,R;if(m&&Ls.has(O)?(R=Ls.pop(O),A=R.getDiv(),s.appendChild(A),R.setOptions(b),setTimeout(()=>R.setCenter(R.getCenter()),0)):(A=document.createElement("div"),A.style.height="100%",s.appendChild(A),R=new google.maps.Map(A,Tt({},b,h?{renderingType:h}:{},S?{colorScheme:S}:{}))),i(R),x(R,c),l){const{padding:L}=l,T=kn(l,og);R.fitBounds(T,L)}else(!_||!y)&&R.fitBounds({east:180,west:-180,south:-90,north:90});if(E.current){const{mapId:L,cameraState:T}=E.current;L!==C&&R.setOptions(T)}return()=>{E.current={mapId:C,cameraState:a.current},A.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 $d=p.createContext(null),zd=t=>{const{children:e,id:n,className:r,style:i}=t,s=p.useContext(Di),o=Vd();if(!s)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[a,c,l]=ag(t,s);Ym(a,l,t),Um(a,t),Qm(a,t);const u=Jm(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 f=t.center?Hd(t.center):null;let v=null,m=null;f&&Number.isFinite(f.lat)&&Number.isFinite(f.lng)&&(v=f.lat,m=f.lng);const h=p.useMemo(()=>{var _,y,E,x,g;return{center:{lat:(_=v)!=null?_:0,lng:(y=m)!=null?y: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(h);const _=a.addListener("bounds_changed",()=>{a.moveCamera(h)});return()=>_.remove()},[a,d,h]);const S=p.useMemo(()=>Tt({width:"100%",height:"100%",position:"relative",zIndex:u?-1:0},i),[i,u]),b=p.useMemo(()=>({map:a}),[a]);return o===Bt.AUTH_FAILURE?p.createElement("div",{style:Tt({position:"relative"},r?{}:S),className:r},p.createElement(eg,null)):p.createElement("div",Tt({ref:c,"data-testid":"map",style:r?void 0:S,className:r},n?{id:n}:{}),a?p.createElement($d.Provider,{value:b},e):null)};zd.deckGLViewProps=!0;const al=new Set;function cg(...t){const e=JSON.stringify(t);al.has(e)||(al.add(e),console.error(...t))}const ji=(t=null)=>{const e=p.useContext(Di),{map:n}=p.useContext($d)||{};if(e===null)return cg("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=Ud(),n=p.useContext(Di);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 cl(t,e,n){p.useEffect(()=>{if(!(!t||!e||!n))return t.addEventListener(e,n),()=>t.removeEventListener(e,n)},[t,e,n])}function lg(t){return t.content!==void 0}function ll(t){return t.nodeType===Node.ELEMENT_NODE}const ug=p.createContext(null),dg={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%"]},fg=({children:t,styles:e,className:n,anchorPoint:r})=>{const[i,s]=r??dg.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 hg(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:f,onDragStart:v,onDragEnd:m,collisionBehavior:h,clickable:S,draggable:b,position:_,title:y,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 C=null;return x>0&&(C=document.createElement("div"),C.isCustomMarker=!0,g.content=C,i(C)),()=>{var O;g.map=null,(O=C)==null||O.remove(),n(null),i(null)}},[s,o,x]),p.useEffect(()=>{!(e!=null&&e.content)||!ll(e.content)||x>0||(e.content.className=l??"")},[e,l,x]),ts(e,"position",_),ts(e,"title",y??""),ts(e,"zIndex",E),ts(e,"collisionBehavior",h),p.useEffect(()=>{e&&(b!==void 0?e.gmpDraggable=b:f||v||m?e.gmpDraggable=!0:e.gmpDraggable=!1)},[e,b,f,m,v]),p.useEffect(()=>{if(!e)return;const g=S!==void 0||!!c||!!u||!!d;e.gmpClickable=g,g&&e!=null&&e.content&&ll(e.content)&&(e.content.style.pointerEvents="none",e.content.firstElementChild&&(e.content.firstElementChild.style.pointerEvents="all"))},[e,S,c,u,d]),tr(e,"click",c),tr(e,"drag",f),tr(e,"dragstart",v),tr(e,"dragend",m),cl(e==null?void 0:e.element,"mouseenter",u),cl(e==null?void 0:e.element,"mouseleave",d),[e,r]}const qd=p.forwardRef((t,e)=>{const{children:n,style:r,className:i,anchorPoint:s}=t,[o,a]=hg(t),c=p.useMemo(()=>o?{marker:o}:null,[o]);return p.useImperativeHandle(e,()=>o,[o]),a?p.createElement(ug.Provider,{value:c},Hs.createPortal(p.createElement(fg,{anchorPoint:s,styles:r,className:i},n),a)):null});function pg(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)&&ul(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&&ul(r,i,s)}}function ul(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&&!gg(e)?t[e]=n+"px":e==="float"?t.cssFloat=n:t[e]=(""+n).trim()}const mg=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 gg(t){return mg.has(t)}const vg=["children","headerContent","style","className","pixelOffset","anchor","shouldFocus","onClose","onCloseClick"],Gd=t=>{const{children:e,headerContent:n,style:r,className:i,pixelOffset:s,anchor:o,shouldFocus:a,onClose:c,onCloseClick:l}=t,u=kn(t,vg),d=uc("maps"),[f,v]=p.useState(null),m=p.useRef(null),h=p.useRef(null),S=Bd(u,Id);p.useEffect(()=>{if(!d)return;m.current=document.createElement("div"),h.current=document.createElement("div");const y=S;s&&(y.pixelOffset=new google.maps.Size(s[0],s[1])),n&&(y.headerContent=typeof n=="string"?n:h.current);const E=new google.maps.InfoWindow(S);return E.setContent(m.current),v(E),()=>{var x,g;E.setContent(null),(x=m.current)==null||x.remove(),(g=h.current)==null||g.remove(),m.current=null,h.current=null,v(null)}},[d]);const b=p.useRef(null);p.useEffect(()=>{!f||!m.current||(pg(m.current,r||null,b.current),b.current=r||null,i!==m.current.className&&(m.current.className=i||""))},[f,i,r]),p.useEffect(()=>{if(!f)return;const y=S;s?y.pixelOffset=new google.maps.Size(s[0],s[1]):y.pixelOffset=null,n?y.headerContent=typeof n=="string"?n:h.current:y.headerContent=null,f.setOptions(S)},[S,s,n]),tr(f,"close",c),tr(f,"closeclick",l);const _=ji();return p.useEffect(()=>{if(!_||!f||o===null)return;const y=!!o,E={map:_};if(o&&(E.anchor=o,lg(o)&&o.content instanceof Element)){const g=o.content,C=g==null?void 0:g.getBoundingClientRect();if(C&&g!=null&&g.isCustomMarker){var x;const O=(x=o.content.firstElementChild)==null?void 0:x.firstElementChild,A=O==null?void 0:O.getBoundingClientRect(),R=A.x-C.x+(A.width-C.width)/2,L=A.y-C.y,T=S;T.pixelOffset=new google.maps.Size(s?s[0]+R:R,s?s[1]+L:L),f.setOptions(T)}}return a!==void 0&&(E.shouldFocus=a),f.open(E),()=>{y&&f.set("anchor",null),f.close()}},[f,o,_,a,S,s]),p.createElement(p.Fragment,null,m.current&&Hs.createPortal(e,m.current),h.current!==null&&Hs.createPortal(n,h.current))},yg=["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"];function bg(t){const[e,n]=p.useState(null),r=ji(),{onClick:i,onDrag:s,onDragStart:o,onDragEnd:a,onMouseOver:c,onMouseOut:l}=t,u=kn(t,yg),{position:d,draggable:f}=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(!!f),()=>{m.clearInstanceListeners(v)}},[e,f,i,s,o,a,c,l]),p.useEffect(()=>{e&&u&&e.setOptions(u)},[e,u]),p.useEffect(()=>{f||!d||!e||e.setPosition(d)},[f,d,e]),e}p.forwardRef((t,e)=>{const n=bg(t);return p.useImperativeHandle(e,()=>n,[n]),p.createElement(p.Fragment,null)});const wg=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 12 12",...t},I.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"})),Wd=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:26,height:8,fill:"none",viewBox:"0 0 26 8",...t},I.createElement("g",{fill:"#000"},I.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"}))),Zd=t=>I.createElement("svg",{width:48,height:48,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},I.createElement("rect",{width:48,height:48,fill:"#6A4A9D"}),I.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 Sg(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 dl(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 Cg(t){return typeof t=="object"&&!Array.isArray(t)&&t!==null}function Kd(t){if(typeof t=="string")return[t];if(Array.isArray(t))return t}function tt(t){return Kd(t)||[]}function _g(t,e){return Cg(e)?tt(e==null?void 0:e[t]):tt(e)}function pa(t){return Array.from(new Set(t))}function Qd(t){return t&&t.replace(/\/+$/,"")}function Eg(t){if(typeof t=="string")return t;if(typeof(t==null?void 0:t.message)=="string")return t.message}const xg=(t,e)=>fetch(t,e),Jd=(t=xg)=>(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 kt(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 Og(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(f=>l.has(f)||u.namespaces.has(f)))!==-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(f=>l.add(f))});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(f=>l.namespaces.add(f)),d===void 0&&l.namespaces.add(n()),u)};return u}})}function Tg(t,e){let n=!0;function r(){return n}const i=Object.freeze({onPendingLanguageChange:kt(r),onLanguageChange:kt(r),onLoadingChange:kt(r),onFetchingChange:kt(r),onInitialLoaded:kt(r),onRunningChange:kt(r),onCacheChange:kt(r),onUpdate:Og(r,t,e),onPermanentChange:kt(r),onError:kt(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 fl 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 Pg extends Error{constructor(e,n){super(e),this.cause=n,this.name="LanguageDetectorError"}}class hl extends Error{constructor(e,n){super(e),this.cause=n,this.name="LanguageStorageError"}}const Xd=t=>{const e=new Map;return Object.entries(t).forEach(([n,r])=>{if(r!=null){if(typeof r=="object"){Xd(r).forEach((i,s)=>{e.set(n+"."+s,i)});return}e.set(n,r)}}),e},Zr=t=>{const[e,...n]=t.split(":"),r=n.join(":");return{language:e,namespace:r||""}},Mt=({language:t,namespace:e})=>e?`${t}:${e}`:t;function Ag(t,e,n,r,i,s,o){const a=new Map,c=new Map;let l={},u=0;function d(h,S,b){const _=Mt(h);c.set(_,{data:Xd(S),version:b}),t.onCacheChange.emit(h)}function f(h){let S;if(!S){const b=l[Mt(h)];typeof b=="function"&&(S=b())}return S||(S=e(h)),go(S)?S==null?void 0:S.catch(b=>{const _=new fl(h,b);throw t.onError.emit(_),console.error(_),_}):S}function v(h,S){var b;let _;return S&&(_=(b=n(h))===null||b===void 0?void 0:b.catch(y=>{const E=new fl(h,y,!0);return t.onError.emit(E),console.warn(E),f(h)})),_||(_=f(h)),_}const m=Object.freeze({addStaticData(h){h&&(l=Object.assign(Object.assign({},l),h),Object.entries(h).forEach(([S,b])=>{if(typeof b!="function"){const _=Zr(S),y=c.get(S);(!y||y.version===0)&&d(_,b,0)}}))},invalidate(){a.clear(),u+=1},addRecord(h,S){d(h,S,u)},exists(h,S=!1){const b=c.get(Mt(h));return b&&S?b.version===u:!!b},getRecord(h){var S;return(S=c.get(Mt(r(h))))===null||S===void 0?void 0:S.data},getTranslation(h,S){var b;return(b=c.get(Mt(h)))===null||b===void 0?void 0:b.data.get(S)},getTranslationNs(h,S,b){var _;for(const y of h)for(const E of S){const x=(_=c.get(Mt({language:E,namespace:y})))===null||_===void 0?void 0:_.data.get(b);if(x!=null)return[y]}return pa(h)},getTranslationFallback(h,S,b){var _;for(const y of h)for(const E of S){const x=(_=c.get(Mt({language:E,namespace:y})))===null||_===void 0?void 0:_.data.get(b);if(x!=null)return x}},changeTranslation(h,S,b){var _;const y=(_=c.get(Mt(h)))===null||_===void 0?void 0:_.data;y==null||y.set(S,b),t.onCacheChange.emit(Object.assign(Object.assign({},h),{key:S}))},isFetching(h){if(i())return!0;if(h===void 0)return a.size>0;const S=tt(h);return!!Array.from(a.keys()).find(b=>S.includes(Zr(b).namespace))},isLoading(h,S){const b=tt(S);return!!(i()||Array.from(a.keys()).find(_=>{const y=Zr(_);return(!b.length||b.includes(y.namespace))&&!m.exists({namespace:y.namespace,language:h})}))},async loadRecords(h,S){const b=h.map(y=>{const E=r(y),x=Mt(E),g=a.get(x);if(g)return{new:!1,promise:g,keyObject:E,cacheKey:x};const C=v(E,S)||Promise.resolve(void 0);return a.set(x,C),{new:!0,promise:C,keyObject:E,cacheKey:x}});s.notify(),o.notify();const _=await Promise.all(b.map(y=>y.promise));return b.forEach((y,E)=>{const x=a.get(y.cacheKey)!==y.promise;if(y.new&&!x){a.delete(y.cacheKey);const g=_[E];g?m.addRecord(y.keyObject,g):m.getRecord(y.keyObject)||m.addRecord(y.keyObject,{})}}),s.notify(),o.notify(),b.map(y=>m.getRecord(y.keyObject))},getAllRecords(){return Array.from(c.entries()).map(([S,b])=>Object.assign(Object.assign({},Zr(S)),{data:b.data}))}});return m}function Yd(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 Rg={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",Lg="https://app.tolgee.io",kg=({key:t})=>t,Mg={defaultNs:"",observerOptions:Rg,observerType:"invisible",onFormatError:ma,apiUrl:Lg,fetch:Jd(),onTranslationMissing:kg},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 pl(t,e){const n=ga(Mg,e==null?void 0:e.initialOptions,t);return n.apiUrl=Qd(n.apiUrl),t!=null&&t.fetch&&(n.fetch=Jd(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 Dg(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:T,event:D})=>{var N;const H=T.map(({key:B,ns:$,defaultValue:q})=>({key:B,defaultValue:q,fallbackNamespaces:r($),namespace:i({key:B,ns:$})[0],translation:s({key:B,ns:$})}));(N=l.ui)===null||N===void 0||N.handleElementClick(H,D)},d=(T,D)=>{var N;return((N=l.observer)===null||N===void 0?void 0:N.findPositions(T,D))||[]};function f(T){const D=s({key:T.key,ns:T.ns});return L.formatTranslation(Object.assign(Object.assign({},T),{translation:D,formatEnabled:!0}))}function v(){return{fetch:e().fetch}}function m(T){l.observer=T==null?void 0:T()}function h(){return!!l.observer}function S(T){T&&l.formatters.push(T)}function b(T){l.finalFormatter=T}function _(T){c.ui=T}function y(){return!!c.ui}function E(T){l.languageStorage=T}function x(T){l.languageDetector=T}function g(){return ko(a.onError,T=>new hl("Tolgee: Failed to load language",T),()=>{var T;return(T=l.languageStorage)===null||T===void 0?void 0:T.getLanguage(v())})}function C(){if(!l.languageDetector)return;const T=n();return ko(a.onError,D=>new Pg("Tolgee: Failed to detect language",D),()=>{var D;return(D=l.languageDetector)===null||D===void 0?void 0:D.getLanguage(Object.assign({availableLanguages:T},v()))})}function O(T){T&&l.backends.push(T)}function A(T){l.devBackend=T}function R(T,D){const N=Object.freeze({setFinalFormatter:b,addFormatter:S,setObserver:m,hasObserver:h,setUi:_,hasUi:y,setDevBackend:A,addBackend:O,setLanguageDetector:x,setLanguageStorage:E});D(T,N)}const L=Object.freeze({addPlugin:R,run(){var T,D;const{apiKey:N,apiUrl:H,projectId:B,observerOptions:$}=e();l.ui=(T=c.ui)===null||T===void 0?void 0:T.call(c,{apiKey:N,apiUrl:H,projectId:B,highlight:L.highlight,changeTranslation:o,findPositions:d,onPermanentChange:q=>a.onPermanentChange.emit(q)}),(D=l.observer)===null||D===void 0||D.run({mouseHighlight:!0,options:$,translate:f,onClick:u})},stop(){var T;l.ui=void 0,(T=l.observer)===null||T===void 0||T.stop()},getLanguageStorage(){return l.languageStorage},getInitialLanguage(){const T=n(),D=g();return ks(D,N=>(!T||T.includes(N))&&N?N:C())},setStoredLanguage(T){return ko(a.onError,D=>new hl("Tolgee: Failed to store language",D),()=>{var D;return(D=l.languageStorage)===null||D===void 0?void 0:D.setLanguage(T,v())})},getDevBackend(){return l.devBackend},getBackendRecord:({language:T,namespace:D})=>{for(const N of l.backends){const H=N.getRecord(Object.assign({language:T,namespace:D},v()));if(H!==void 0)return H}},getBackendDevRecord:({language:T,namespace:D})=>{var N;const{apiKey:H,apiUrl:B,projectId:$}=e();return(N=l.devBackend)===null||N===void 0?void 0:N.getRecord(Object.assign({apiKey:H,apiUrl:B,projectId:$,language:T,namespace:D},v()))},getLanguageDetector(){return l.languageDetector},retranslate(){var T;(T=l.observer)===null||T===void 0||T.retranslate()},highlight:(T,D)=>{var N,H;return((H=(N=l.observer)===null||N===void 0?void 0:N.highlight)===null||H===void 0?void 0:H.call(N,T,D))||{unhighlight(){}}},unwrap(T){var D;return l.observer?(D=l.observer)===null||D===void 0?void 0:D.unwrap(T):{text:T,keys:[]}},wrap(T){var D;return l.observer?(D=l.observer)===null||D===void 0?void 0:D.wrap(T):T.translation},hasDevBackend(){return!!L.getDevBackend()},formatTranslation(T){var D,{formatEnabled:N}=T,H=Yd(T,["formatEnabled"]);const{key:B,translation:$,defaultValue:q,noWrap:ae,params:le,ns:ue,orEmpty:ne}=H,qe=$??q;let Ee="";$==null&&(Ee=e().onTranslationMissing(H));let me=qe??(ne?"":Ee);const Ut=t(),$t=N||!(!((D=l.observer)===null||D===void 0)&&D.outputNotFormattable),Lr=gt=>l.observer&&!ae?l.observer.wrap({key:B,translation:gt,defaultValue:q,params:le,ns:ue}):gt;me=Lr(me);try{if(qe&&Ut&&$t)for(const gt of l.formatters)me=gt.format({translation:me,language:Ut,params:le});l.finalFormatter&&qe&&Ut&&$t&&(me=l.finalFormatter.format({translation:me,language:Ut,params:le}))}catch(gt){console.error(gt);const Vi=Eg(gt)||ma,In=e().onFormatError,Ke=typeof In;Ke==="string"?me=In:Ke==="function"?me=In(Vi,H):me=ma,me=Lr(me)}return me}});return L}const ml=(t,e,n)=>{let r=t;return Object.freeze({init(i){r=i},notify(){const i=e();r!==i&&n(i),r=i}})};function jg(t,e,n){let r=pl(),i;const s=Object.freeze({init(o){r=pl(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,..._g(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=>Zr(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:Qd(o.apiUrl)}):i=void 0}});return s}function Ng(t){var{ns:e,noWrap:n,orEmpty:r,params:i,language:s}=t,o=Yd(t,["ns","noWrap","orEmpty","params","language"]);return Object.assign(Object.assign({},{ns:e,noWrap:n,orEmpty:r,language:s}),{params:Object.assign({},o)})}const ef=(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({},Ng(r)),n)),n};function Ig({options:t}){const e=Tg(c,l),n=ml(!1,()=>o.isFetching(),e.onFetchingChange.emit),r=ml(!1,()=>x.isLoading(),e.onLoadingChange.emit),i=jg(e.onLanguageChange,e.onPendingLanguageChange,e.onRunningChange),s=Dg(i.getLanguage,i.getInitialOptions,i.getAvailableLanguages,u,S,b,f,e),o=Ag(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 f(g,C,O){const A=i.withDefaultNs(g),R=o.getTranslation(A,C);return o.changeTranslation(A,C,O),{revert(){o.changeTranslation(A,C,R)}}}function v(g){i.init(g),o.addStaticData(i.getInitialOptions().staticData)}function m(g,C){const O=i.getFallbackLangs(g),A=d(C),R=[];return O.forEach(L=>{A.forEach(T=>{o.exists({language:L,namespace:T},!0)||R.push({language:L,namespace:T})})}),R}function h(g,C){const O=m(g,C);if(O.length)return ks(x.loadRecords(O),()=>{})}function S({key:g,ns:C}){const O=i.getFallbackLangs(),A=u(C??void 0);return o.getTranslationNs(A,O,g)}function b({key:g,ns:C,language:O}){const A=u(C??void 0),R=i.getFallbackLangs(O);return o.getTranslationFallback(A,R,g)}function _(){const g=ks(y(),()=>h());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 y(){if(i.getLanguage())return;const C=s.getInitialLanguage();return ks(C,O=>{const A=O||i.getInitialOptions().defaultLanguage;A&&i.setLanguage(A)})}function E(){if((s.getLanguageDetector()||s.getLanguageStorage())&&!i.getAvailableLanguages())throw new Error(dl("availableLanguages"));if(!i.getLanguage()&&!i.getInitialOptions().defaultLanguage)throw new Error(dl(["defaultLanguage","language"]))}const x=Object.freeze(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),i),s),o),{init:v,getTranslation:b,changeTranslation:f,getTranslationNs:S,getDefaultAndFallbackNs:u,async changeLanguage(g){i.getPendingLanguage()===g&&i.getLanguage()===g||(i.setPendingLanguage(g),i.isRunning()&&await h(g),g===i.getPendingLanguage()&&(i.setLanguage(g),await s.setStoredLanguage(g)))},async addActiveNs(g,C){C||i.addActiveNs(g),i.isRunning()&&await h(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 C=i.getLanguage();if(!C)return!1;const O=i.getFallbackLangs(C),A=d(g),R=[];return O.forEach(L=>{A.forEach(T=>{o.exists({language:L,namespace:T})||R.push({language:L,namespace:T})})}),R.length===0},t:(...g)=>{const C=ef(...g),O=b(C);return s.formatTranslation(Object.assign(Object.assign({},C),{translation:O}))},isDev(){return!!(i.getInitialOptions().apiKey&&i.getInitialOptions().apiUrl)},run(){return E(),i.isRunning()||(i.setRunning(!0),s.run(),a=_()),Promise.resolve(a)},stop(){i.isRunning()&&(s.stop(),i.setRunning(!1))}}));return x}function Fg(t){const e=Ig({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 Bg=()=>{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=Fg(ga(t.options,n));return t.plugins.forEach(r.addPlugin),r}});return e},tf=0,va=1,Vg=2;class Hg extends Error{constructor(e,n,r){let i;e===tf?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 gl(t){return/\s/.test(t)}const Wt=0,ya=1,Ms=2,Mo=3,Do=4,Ug=new Set([Ms,ya,Wt]),ba="'",$g=new Set(["{","}",ba]),zg=t=>/[0-9a-zA-Z_]/.test(t);function qg(t){let e=Wt,n="",r="",i="";const s=[],o=[];let a=0;function c(f){throw new Hg(f,a,t)}const l=()=>{s.push(n),n=""},u=()=>{zg(i)||c(va),r+=i},d=()=>{r===""&&c(tf),o.push(r),r=""};for(a=0;a<t.length;a++)switch(i=t[a],e){case Wt:i===ba?(n+=i,e=ya):i==="{"?(l(),e=Mo):(n+=i,e=Wt);break;case ya:$g.has(i)?(n=n.slice(0,-1)+i,e=Ms):(n+=i,e=Wt);break;case Ms:i===ba?e=Wt:(n+=i,e=Ms);break;case Mo:i==="}"?(d(),e=Wt):gl(i)?r!==""&&(d(),e=Do):(u(),e=Mo);break;case Do:i=="}"?e=Wt:gl(i)?e=Do:c(va)}return Ug.has(e)||c(Vg),l(),[s,o]}function Gg(t,e){const[n,r]=qg(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 Wg(){return{format:({translation:t,params:e})=>Gg(t,e)}}const Zg=()=>(t,e)=>(e.setFinalFormatter(Wg()),t);var jo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},vl={};(function(t){function e(b,_){var y;return b instanceof Buffer?y=b:y=Buffer.from(b.buffer,b.byteOffset,b.byteLength),y.toString(_)}var n=function(b){return Buffer.from(b)};function r(b){for(var _=0,y=Math.min(256*256,b.length+1),E=new Uint16Array(y),x=[],g=0;;){var C=_<b.length;if(!C||g>=y-1){var O=E.subarray(0,g),A=O;if(x.push(String.fromCharCode.apply(null,A)),!C)return x.join("");b=b.subarray(_),_=0,g=0}var R=b[_++];if(!(R&128))E[g++]=R;else if((R&224)===192){var L=b[_++]&63;E[g++]=(R&31)<<6|L}else if((R&240)===224){var L=b[_++]&63,T=b[_++]&63;E[g++]=(R&31)<<12|L<<6|T}else if((R&248)===240){var L=b[_++]&63,T=b[_++]&63,D=b[_++]&63,N=(R&7)<<18|L<<12|T<<6|D;N>65535&&(N-=65536,E[g++]=N>>>10&1023|55296,N=56320|N&1023),E[g++]=N}}}function i(b){for(var _=0,y=b.length,E=0,x=Math.max(32,y+(y>>>1)+7),g=new Uint8Array(x>>>3<<3);_<y;){var C=b.charCodeAt(_++);if(C>=55296&&C<=56319){if(_<y){var O=b.charCodeAt(_);(O&64512)===56320&&(++_,C=((C&1023)<<10)+(O&1023)+65536)}if(C>=55296&&C<=56319)continue}if(E+4>g.length){x+=8,x*=1+_/b.length*2,x=x>>>3<<3;var A=new Uint8Array(x);A.set(g),g=A}if(C&4294967168)if(!(C&4294965248))g[E++]=C>>>6&31|192;else if(!(C&4294901760))g[E++]=C>>>12&15|224,g[E++]=C>>>6&63|128;else if(!(C&4292870144))g[E++]=C>>>18&7|240,g[E++]=C>>>12&63|128,g[E++]=C>>>6&63|128;else continue;else{g[E++]=C;continue}g[E++]=C&63|128}return g.slice?g.slice(0,E):g.subarray(0,E)}var s="Failed to ",o=function(b,_,y){if(b)throw new Error("".concat(s).concat(_,": the '").concat(y,"' option is unsupported."))},a=typeof Buffer=="function"&&Buffer.from,c=a?n:i;function l(){this.encoding="utf-8"}l.prototype.encode=function(b,_){return o(_&&_.stream,"encode","stream"),c(b)};function u(b){var _;try{var y=new Blob([b],{type:"text/plain;charset=UTF-8"});_=URL.createObjectURL(y);var E=new XMLHttpRequest;return E.open("GET",_,!1),E.send(),E.responseText}finally{_&&URL.revokeObjectURL(_)}}var d=!a&&typeof Blob=="function"&&typeof URL=="function"&&typeof URL.createObjectURL=="function",f=["utf-8","utf8","unicode-1-1-utf-8"],v=r;a?v=e:d&&(v=function(b){try{return u(b)}catch{return r(b)}});var m="construct 'TextDecoder'",h="".concat(s," ").concat(m,": the ");function S(b,_){o(_&&_.fatal,m,"fatal"),b=b||"utf-8";var y;if(a?y=Buffer.isEncoding(b):y=f.indexOf(b.toLowerCase())!==-1,!y)throw new RangeError("".concat(h," encoding label provided ('").concat(b,"') is invalid."));this.encoding=b,this.fatal=!1,this.ignoreBOM=!1}S.prototype.decode=function(b,_){o(_&&_.stream,"decode","stream");var y;return b instanceof Uint8Array?y=b:b.buffer instanceof ArrayBuffer?y=new Uint8Array(b.buffer):y=new Uint8Array(b),v(y,this.encoding)},t.TextEncoder=t.TextEncoder||l,t.TextDecoder=t.TextDecoder||S})(typeof window<"u"?window:jo);var Kg=Sg({__proto__:null,default:vl},[vl]),No;(No=console.assert)===null||No===void 0||No.call(console,Kg);const Qg="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";function Jg(t){const e=Qg.indexOf(t);if(e===-1)throw new Error("Invalid character found: "+t);return e}function Xg(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 Yg(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|Jg(t[o]),n+=5,n>=8&&(s[i++]=r>>>n-8&255,n-=8);return Xg(s.buffer)}function ev(t){if(t)try{const[e,n]=t.split("_");if(e==="tgpak"){const[r]=Yg(n).split("_");return Number(r)}}catch{console.warn("Tolgee: Api key can't be parsed")}}function tv(t){if(!t)return;const[e]=t.split("_");return e==="tgpak"?"tgpak":e==="tgpat"?"tgpat":"legacy"}function nv(){return{getRecord({apiUrl:t,apiKey:e,language:n,namespace:r,projectId:i,fetch:s}){var o;const a=(o=ev(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}`),tv(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 rv=()=>(t,e)=>(e.setDevBackend(nv()),t);function iv(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 sv({message:t,recievingMessage:e,data:n,attempts:r=1,timeout:i=300}){let s=!1;const o=()=>new Promise((c,l)=>{const u=iv(e,f);window.postMessage({type:t,data:n},window.origin);const d=setTimeout(m,i);function f(h){clearTimeout(d),v(),c(h)}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 ov(){let t;async function e(n){t==null||t();const{cancel:r,promise:i}=sv({message:"TOLGEE_READY",recievingMessage:["TOLGEE_PLUGIN_READY","TOLGEE_PLUGIN_UPDATED"],data:n,attempts:4});return t=r,i}return{update:e}}const av="tolgee-in-context-tools.umd.min.js",cv="@tolgee/in-context-tools",lv="InContextTools",uv="https://cdn.jsdelivr.net/npm";function dv(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 fv(t){return Io||(Io=dv(`${uv}/@tolgee/web@${t}/dist/${av}`).then(()=>window[cv][lv])),Io}const nf="__tolgee_apiKey",rf="__tolgee_apiUrl";function yl(){const t=sessionStorage.getItem(nf)||void 0,e=sessionStorage.getItem(rf)||void 0;if(!(!t||!e))return{apiKey:t,apiUrl:e}}function hv(){sessionStorage.removeItem(nf),sessionStorage.removeItem(rf)}function pv(t){document.readyState!=="loading"?Promise.resolve().then(()=>{t()}):document.addEventListener&&document.addEventListener("DOMContentLoaded",t)}let sf=()=>t=>t;const mv=()=>{if(typeof window>"u")return!1;try{return typeof sessionStorage<"u"&&sessionStorage}catch(t){return console.error("sessionStorage not available",t),!1}};mv()&&(sf=()=>t=>{const e=ov(),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 fv("5.22.0");return o=>{const a=yl();return o.addPlugin(s({credentials:a})),o}};return t.on("running",({value:s})=>{s&&pv(()=>{e.update(n()).catch(hv)})}),yl()&&r().then(s=>{t.addPlugin(s)}).catch(s=>{console.error("Tolgee: Failed to load in-context tools"),console.error(s)}),t});function gv(){return Bg().use(sf())}const vv={useSuspense:!0};let Fo;const of=()=>(Fo||(Fo=p.createContext(void 0)),Fo),yv=({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({},vv),e),a=of();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 bv;function wv(){return bv}const Sv=()=>{const t=of(),e=p.useContext(t)||wv();if(!e)throw new Error("Couldn't find tolgee instance, did you forgot to use `TolgeeProvider`?");return e},Cv=()=>{const[t,e]=p.useState(0),n=p.useCallback(()=>{e(r=>r+1)},[e]);return{instance:t,rerender:n}},af=(t,e)=>{const{tolgee:n,options:r}=Sv(),i=Kd(t),s=tt(i).join(":"),o=Object.assign(Object.assign({},r),e),{rerender:a,instance:c}=Cv(),l=p.useRef(),u=p.useRef([]);u.current=[];const d=m=>{var h;u.current.push(m),(h=l.current)===null||h===void 0||h.subscribeNs(m)},f=n.isLoaded(i);p.useEffect(()=>{const m=n.onNsUpdate(a);return l.current=m,m.subscribeNs(i),u.current.forEach(h=>{m.subscribeNs(h)}),()=>{m.unsubscribe()}},[s,n]),p.useEffect(()=>(n.addActiveNs(i),()=>n.removeActiveNs(i)),[s,n]);const v=p.useCallback(m=>{var h;const S=(h=m.ns)!==null&&h!==void 0?h:i==null?void 0:i[0];return d(S),n.t(Object.assign(Object.assign({},m),{ns:S}))},[n,c]);if(o.useSuspense&&!f)throw n.addActiveNs(i,!0);return{t:v,isLoading:!f}},mt=(t,e)=>{const{t:n,isLoading:r}=af(t,e);return{t:p.useCallback((...s)=>{const o=ef(...s);return n(o)},[n]),isLoading:r}},_v=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,Ev=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:_v(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}=af();return p.createElement(Ev,Object.assign({t:e},t))},xv="Spinner-module__loader__U4GVhD",Ov={loader:xv},qs=({className:t})=>w.jsx("div",{className:K(Ov.loader,t),children:"Loading..."}),Tv="Button-module__root__8RX49h",Pv="Button-module__primary__st6yY9",Av="Button-module__secondary__j-3rjz",Rv="Button-module__loading__QfItr2",Lv="Button-module__spinner__kVZYqS",Br={root:Tv,primary:Pv,secondary:Av,loading:Rv,spinner:Lv},rt=({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 w.jsxs("a",{className:K(s),...c,"data-disabled":a,children:[!n&&t,n&&w.jsx(qs,{className:Br.spinner})]})}if(i.as==="button"){const{as:o,...a}=i;return w.jsxs("button",{type:"button",className:K(s),...a,children:[!n&&t,n&&w.jsx(qs,{className:Br.spinner})]})}Ot(!1,"Invalid button type")};rt.defaultProps={as:"button"};const kv=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},I.createElement("g",{clipPath:"url(#a)"},I.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"})),I.createElement("defs",null,I.createElement("clipPath",{id:"a"},I.createElement("path",{fill:"#fff",d:"M0 0h20v20H0z"})))),Mv="CloseButton-module__root__2m1asd",Dv="CloseButton-module__absolutePositionVariant__lGX4cQ",jv="CloseButton-module__relativePositionVariant__LqTTWf",bl={root:Mv,absolutePositionVariant:Dv,relativePositionVariant:jv},Ar=({className:t,position:e="absolute",...n})=>w.jsx("div",{...n,className:K(bl.root,t,bl[`${e}PositionVariant`]),children:w.jsx(kv,{})}),Nv=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:13,height:12,viewBox:"0 0 13 12",fill:"none",...t},I.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"})),Iv="W3WLink-module__likeButton__RhAlpN",Fv="W3WLink-module__title__eo6M7L",wl={likeButton:Iv,title:Fv},Bv=()=>w.jsxs("a",{className:wl.likeButton,title:"about what3words",href:"https://what3words.com/about",target:"_blank",rel:"noreferrer",children:[w.jsx("span",{className:wl.title,children:"what3words"}),w.jsx(Nv,{})]}),Vv=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,viewBox:"0 0 20 20",fill:"none",...t},I.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:"black"})),Hv=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,viewBox:"0 0 20 20",fill:"none",...t},I.createElement("path",{d:"M20 0H0V20H20V0Z",fill:"black"}),I.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"}),I.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"}),I.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"})),Uv="W3WLink-module__mainWrapper__BeGCpA",$v="W3WLink-module__link__yq50q-",Sl={mainWrapper:Uv,link:$v},cf=({what3words:t})=>{const{id:e,link:n}=t;return w.jsxs("div",{className:Sl.mainWrapper,children:[w.jsx(Hv,{}),w.jsx("a",{className:Sl.link,href:n,title:"w3w link",target:"_blank",rel:"noreferrer",children:e}),w.jsx(Vv,{})]})},Cl={day:"",statusValue:"No data",isAvailable:!1,closes:""};function zv(t){const[e,n]=p.useState({...Cl,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 f;const c=new Date(Date.now()),l=c.getDay()||7,u=c.toLocaleTimeString("en-GB"),d=(f=a.find(({dayNumber:v})=>v===l))==null?void 0:f.time;if(d){const v=d.split("-"),m=v[v.length-1],S=d.split(", ").some(b=>{const[_,y]=b.split("-");return y.trim()<_.trim()?u>=_||u<y:u>=_&&u<y});return{day:i[l],statusValue:r(S?"open":"close"),isAvailable:S,closes:m}}return{...Cl,statusValue:r("close")}}const o=function(){if(t)return Object.entries(t).reduce((c,[l,u])=>{if(u==null?void 0:u.length){const f=+l,v=u.join(", "),m={dayNumber:f,dayName:i[f],time:v};c.push(m)}return c},[])}();o!=null&&o.length&&n({...s(o),workSchedule:o})},[t]),e}const qv="LocationView-module__title__-wT0bl",Gv="LocationView-module__logo__jDjNMt",Wv="LocationView-module__header__K0gBYX",Zv="LocationView-module__content__wtOPjm",Kv="LocationView-module__sectionTitle__cNIgnC",Qv="LocationView-module__scheduleContainer__Qbb9sE",Jv="LocationView-module__workStatus__9yJNqr",Xv="LocationView-module__scheduleButton__RQPquM",Yv="LocationView-module__scheduleList__lPVLXP",e1="LocationView-module__scheduleListItem__gcCPSg",t1="LocationView-module__svgWrapper__zKM438",n1="LocationView-module__section__2J1zAJ",r1="LocationView-module__w3wSection__PdU7j4",i1="LocationView-module__chips__ALwJDx",s1="LocationView-module__services__IgJ4ba",o1="LocationView-module__images__-wKmRM",a1="LocationView-module__image__T1E-gt",c1="LocationView-module__actions__NuafMj",l1="LocationView-module__actionsHidden__-vX5kK",u1="LocationView-module__submit__c-Hc8u",d1="LocationView-module__scheduleItem__RhAgat",ve={title:qv,logo:Gv,header:Wv,content:Zv,sectionTitle:Kv,scheduleContainer:Qv,workStatus:Jv,scheduleButton:Xv,scheduleList:Yv,scheduleListItem:e1,svgWrapper:t1,section:n1,w3wSection:r1,chips:i1,services:s1,images:o1,image:a1,actions:c1,actionsHidden:l1,submit:u1,scheduleItem:d1},f1={default:Wd,llama:Zd},h1=({classes:t,hideActions:e,location:n,onClose:r,onSubmit:i})=>{var y,E,x;const[s,o]=p.useState(!1),{t:a}=mt(["details_modal","common"]),{isLoading:c,lmsData:l}=mo(),{closes:u,isAvailable:d,statusValue:f,workSchedule:v}=zv(n.timetable),m=(y=l==null?void 0:l.location)==null?void 0:y.what3words,h=!!(m!=null&&m.id),{logo:S="default"}=_e(),b=f1[S];function _(){o(g=>!g)}return w.jsxs(w.Fragment,{children:[w.jsxs("div",{className:K(ve.header,t==null?void 0:t.header),children:[w.jsx(Ar,{onClick:r}),w.jsxs("div",{className:ve.title,children:[w.jsx("div",{className:ve.logo,children:w.jsx(b,{})}),w.jsx("span",{children:n.name})]})]}),w.jsxs("div",{className:K(ve.content,t==null?void 0:t.content),children:[w.jsxs("section",{className:ve.section,children:[w.jsxs("span",{children:[a("address"),":"]}),c?w.jsx(Ze,{width:200}):w.jsx("p",{children:(E=n.location)==null?void 0:E.full_address})]}),c?w.jsx(Ze,{}):h&&w.jsxs("section",{className:ve.w3wSection,children:[w.jsx(cf,{what3words:m}),w.jsx(Bv,{})]}),w.jsxs("div",{className:ve.scheduleContainer,children:[w.jsxs("span",{className:ve.sectionTitle,children:[a("schedule"),":"]}),w.jsxs("button",{type:"button","aria-label":"open schedule",className:ve.scheduleButton,onClick:_,children:[w.jsx("span",{className:ve.workStatus,"data-available":d,children:f}),u&&w.jsxs("span",{children:[a("closes")," ",u]}),w.jsx("span",{className:ve.svgWrapper,"data-open":s,children:w.jsx(wg,{})})]}),w.jsx("ul",{className:ve.scheduleList,"data-open":s,children:v.map(({dayName:g,time:C})=>{const A=!C?a("weekend"):C;return w.jsxs("li",{className:ve.scheduleListItem,children:[w.jsxs("span",{children:[g,":"]}),w.jsx("span",{children:A})]},g)})})]}),(n.pay_by_card||n.pay_by_card)&&w.jsxs("section",{className:ve.section,children:[w.jsxs("span",{children:[a("payment_method"),":"]}),c?w.jsx(Ze,{width:300}):w.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")]})]}),w.jsxs("section",{className:ve.section,children:[w.jsxs("span",{children:[a("services"),":"]}),w.jsxs("div",{className:ve.services,children:[n.is_pickup&&(c?w.jsx(Ze,{width:150}):w.jsx("p",{children:a("is_pickup")})),n.is_delivery&&(c?w.jsx(Ze,{width:150}):w.jsx("p",{children:a("is_delivery")})),n.is_dressing_room&&(c?w.jsx(Ze,{width:150}):w.jsx("p",{children:a("is_dressing_room")})),n.is_check_order&&(c?w.jsx(Ze,{width:150}):w.jsx("p",{children:a("is_check_order")}))]})]}),w.jsxs("section",{className:ve.section,children:[w.jsxs("span",{children:[a("location"),":"]}),c?w.jsx(Ze,{width:100}):w.jsx("p",{children:n.location_name})]}),((x=n.images)==null?void 0:x.length)>0&&w.jsx("section",{className:ve.images,children:n.images.map(g=>w.jsx("img",{src:g,alt:n.name,className:ve.image},g))})]}),w.jsx("div",{className:K(ve.actions,{[ve.actionsHidden]:e}),children:w.jsx(rt,{variant:"primary",className:ve.submit,disabled:c,onClick:i,children:a("choose",{ns:"common"})})})]})},lf=p.memo(h1),dc=({isSelectedPoint:t})=>{const e=Z(tc),[n,r]=p.useState(!0);return p.useEffect(()=>{r(t?!e:!0)},[e,t]),n};var p1=m1()?p.useLayoutEffect:p.useEffect;function m1(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function g1(){var t=p.useState(Object.create(null)),e=t[1];return p.useCallback(function(){e(Object.create(null))},[])}var v1=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=g1();return p1(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})()})(Id);var Lm=Id.exports;const K=ao(Lm),km={lmsData:null,isLoading:!1},mo=Ht()(t=>({...km,setLMSData:e=>t({lmsData:e}),setLoading:e=>t({isLoading:e})}));var Mm=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 Fd=ao(Mm);function Tt(){return Tt=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},Tt.apply(null,arguments)}function kn(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 Dm(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 jm(t){var e=Dm(t,"string");return typeof e=="symbol"?e:e+""}const Bt={NOT_LOADED:"NOT_LOADED",LOADING:"LOADING",LOADED:"LOADED",FAILED:"FAILED",AUTH_FAILURE:"AUTH_FAILURE"},Nm="https://maps.googleapis.com/maps/api/js";class pi{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=Nm+"?"+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)}}pi.loadingStatus=Bt.NOT_LOADED;pi.serializedApiParams=void 0;pi.listeners=[];const Im=["onLoad","onError","apiKey","version","libraries"],Fm=["children"],Bm="GMP_visgl_rgmlibrary_v1_default",Di=p.createContext(null);function Vm(){const[t,e]=p.useState({});return{mapInstances:t,addMapInstance:(s,o="default")=>{e(a=>Tt({},a,{[o]:s}))},removeMapInstance:(s="default")=>{e(o=>kn(o,[s].map(jm)))},clearMapInstances:()=>{e({})}}}function Hm(t){const{onLoad:e,onError:n,apiKey:r,version:i,libraries:s=[]}=t,o=kn(t,Im),[a,c]=p.useState(pi.loadingStatus),[l,u]=p.useReducer((m,f)=>m[f.name]?m:Tt({},m,{[f.name]:f.value}),{}),d=p.useMemo(()=>s==null?void 0:s.join(","),[s]),h=p.useMemo(()=>JSON.stringify(Tt({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=Tt({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=Bm:m.solutionChannel===""&&delete m.solutionChannel,await pi.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 Um=t=>{const{children:e}=t,n=kn(t,Fm),{mapInstances:r,addMapInstance:i,removeMapInstance:s,clearMapInstances:o}=Vm(),{status:a,loadedLibraries:c,importLibrary:l}=Hm(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(Di.Provider,{value:u},e)};function $m(t,e){for(const n of Wm){const r=e[n],i=Bd[n];p.useEffect(()=>{if(!t||!r)return;const s=google.maps.event.addListener(t,i,o=>{r(zm(i,t,o))});return()=>s.remove()},[t,i,r])}}function zm(t,e,n){const r={type:t,map:e,detail:{},stoppable:!1,stop:()=>{}};if(qm.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(Gm.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 Bd={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"},qm=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],Gm=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],Wm=Object.keys(Bd);function Vd(t,e){const n=p.useRef(t);return e(t,n.current)||(n.current=t),n.current}function Zm(t,e,n){p.useEffect(t,[Vd(e,n)])}function Km(t,e){Zm(t,e,Fd)}const Qm=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 Jm(t,e){const n={},r=Object.keys(e);for(const i of r)Qm.has(i)&&(n[i]=e[i]);Km(()=>{t&&t.setOptions(n)},[n])}function Hd(){var t;return((t=p.useContext(Di))==null?void 0:t.status)||Bt.NOT_LOADED}function Xm(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 Ym(t){return!t||typeof t!="object"||!("lat"in t&&"lng"in t)?!1:Number.isFinite(t.lat)&&Number.isFinite(t.lng)}function Ud(t){return Ym(t)?t:t.toJSON()}function eg(t,e,n){const r=n.center?Ud(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 tg=()=>{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 ng(){const[t,e]=p.useState(null),n=p.useCallback(r=>e(r),[e]);return[t,n]}function $d(){return Hd()===Bt.LOADED}function rg(){const[,t]=p.useReducer(e=>e+1,0);return t}function ig(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 sg(t){const e=rg(),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",()=>{ig(t,n),e()});return()=>r.remove()},[t,e]),n}const og=["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"],ag=["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 cg(t,e){const n=$d(),[r,i]=p.useState(null),[s,o]=ng(),a=sg(r),{id:c,defaultBounds:l,defaultCenter:u,defaultZoom:d,defaultHeading:h,defaultTilt:v,reuseMaps:m,renderingType:f,colorScheme:w}=t,y=kn(t,og),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 A,R;if(m&&Ls.has(O)?(R=Ls.pop(O),A=R.getDiv(),s.appendChild(A),R.setOptions(y),setTimeout(()=>R.setCenter(R.getCenter()),0)):(A=document.createElement("div"),A.style.height="100%",s.appendChild(A),R=new google.maps.Map(A,Tt({},y,f?{renderingType:f}:{},w?{colorScheme:w}:{}))),i(R),x(R,c),l){const{padding:L}=l,T=kn(l,ag);R.fitBounds(T,L)}else(!C||!b)&&R.fitBounds({east:180,west:-180,south:-90,north:90});if(E.current){const{mapId:L,cameraState:T}=E.current;L!==_&&R.setOptions(T)}return()=>{E.current={mapId:_,cameraState:a.current},A.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 zd=p.createContext(null),qd=t=>{const{children:e,id:n,className:r,style:i}=t,s=p.useContext(Di),o=Hd();if(!s)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[a,c,l]=cg(t,s);eg(a,l,t),$m(a,t),Jm(a,t);const u=Xm(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?Ud(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(()=>Tt({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:Tt({position:"relative"},r?{}:w),className:r},p.createElement(tg,null)):p.createElement("div",Tt({ref:c,"data-testid":"map",style:r?void 0:w,className:r},n?{id:n}:{}),a?p.createElement(zd.Provider,{value:y},e):null)};qd.deckGLViewProps=!0;const al=new Set;function lg(...t){const e=JSON.stringify(t);al.has(e)||(al.add(e),console.error(...t))}const ji=(t=null)=>{const e=p.useContext(Di),{map:n}=p.useContext(zd)||{};if(e===null)return lg("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=$d(),n=p.useContext(Di);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 cl(t,e,n){p.useEffect(()=>{if(!(!t||!e||!n))return t.addEventListener(e,n),()=>t.removeEventListener(e,n)},[t,e,n])}function ug(t){return t.content!==void 0}function ll(t){return t.nodeType===Node.ELEMENT_NODE}const dg=p.createContext(null),fg={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%"]},hg=({children:t,styles:e,className:n,anchorPoint:r})=>{const[i,s]=r??fg.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 pg(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)||!ll(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&&ll(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),cl(e==null?void 0:e.element,"mouseenter",u),cl(e==null?void 0:e.element,"mouseleave",d),[e,r]}const Gd=p.forwardRef((t,e)=>{const{children:n,style:r,className:i,anchorPoint:s}=t,[o,a]=pg(t),c=p.useMemo(()=>o?{marker:o}:null,[o]);return p.useImperativeHandle(e,()=>o,[o]),a?p.createElement(dg.Provider,{value:c},Hs.createPortal(p.createElement(hg,{anchorPoint:s,styles:r,className:i},n),a)):null});function mg(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)&&ul(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&&ul(r,i,s)}}function ul(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&&!vg(e)?t[e]=n+"px":e==="float"?t.cssFloat=n:t[e]=(""+n).trim()}const gg=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 vg(t){return gg.has(t)}const yg=["children","headerContent","style","className","pixelOffset","anchor","shouldFocus","onClose","onCloseClick"],Wd=t=>{const{children:e,headerContent:n,style:r,className:i,pixelOffset:s,anchor:o,shouldFocus:a,onClose:c,onCloseClick:l}=t,u=kn(t,yg),d=uc("maps"),[h,v]=p.useState(null),m=p.useRef(null),f=p.useRef(null),w=Vd(u,Fd);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||(mg(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,ug(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,A=O==null?void 0:O.getBoundingClientRect(),R=A.x-_.x+(A.width-_.width)/2,L=A.y-_.y,T=w;T.pixelOffset=new google.maps.Size(s?s[0]+R:R,s?s[1]+L:L),h.setOptions(T)}}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))},bg=["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"];function wg(t){const[e,n]=p.useState(null),r=ji(),{onClick:i,onDrag:s,onDragStart:o,onDragEnd:a,onMouseOver:c,onMouseOut:l}=t,u=kn(t,bg),{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=wg(t);return p.useImperativeHandle(e,()=>n,[n]),p.createElement(p.Fragment,null)});const Sg=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 12 12",...t},I.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"})),Zd=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:26,height:8,fill:"none",viewBox:"0 0 26 8",...t},I.createElement("g",{fill:"#000"},I.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"}))),Kd=t=>I.createElement("svg",{width:48,height:48,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},I.createElement("rect",{width:48,height:48,fill:"#6A4A9D"}),I.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 Cg(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 dl(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 _g(t){return typeof t=="object"&&!Array.isArray(t)&&t!==null}function Qd(t){if(typeof t=="string")return[t];if(Array.isArray(t))return t}function tt(t){return Qd(t)||[]}function Eg(t,e){return _g(e)?tt(e==null?void 0:e[t]):tt(e)}function pa(t){return Array.from(new Set(t))}function Jd(t){return t&&t.replace(/\/+$/,"")}function xg(t){if(typeof t=="string")return t;if(typeof(t==null?void 0:t.message)=="string")return t.message}const Og=(t,e)=>fetch(t,e),Xd=(t=Og)=>(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 kt(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 Tg(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 Pg(t,e){let n=!0;function r(){return n}const i=Object.freeze({onPendingLanguageChange:kt(r),onLanguageChange:kt(r),onLoadingChange:kt(r),onFetchingChange:kt(r),onInitialLoaded:kt(r),onRunningChange:kt(r),onCacheChange:kt(r),onUpdate:Tg(r,t,e),onPermanentChange:kt(r),onError:kt(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 fl 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 Ag extends Error{constructor(e,n){super(e),this.cause=n,this.name="LanguageDetectorError"}}class hl extends Error{constructor(e,n){super(e),this.cause=n,this.name="LanguageStorageError"}}const Yd=t=>{const e=new Map;return Object.entries(t).forEach(([n,r])=>{if(r!=null){if(typeof r=="object"){Yd(r).forEach((i,s)=>{e.set(n+"."+s,i)});return}e.set(n,r)}}),e},Zr=t=>{const[e,...n]=t.split(":"),r=n.join(":");return{language:e,namespace:r||""}},Mt=({language:t,namespace:e})=>e?`${t}:${e}`:t;function Rg(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=Mt(f);c.set(C,{data:Yd(w),version:y}),t.onCacheChange.emit(f)}function h(f){let w;if(!w){const y=l[Mt(f)];typeof y=="function"&&(w=y())}return w||(w=e(f)),go(w)?w==null?void 0:w.catch(y=>{const C=new fl(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 fl(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=Zr(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(Mt(f));return y&&w?y.version===u:!!y},getRecord(f){var w;return(w=c.get(Mt(r(f))))===null||w===void 0?void 0:w.data},getTranslation(f,w){var y;return(y=c.get(Mt(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(Mt({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(Mt({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(Mt(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(Zr(y).namespace))},isLoading(f,w){const y=tt(w);return!!(i()||Array.from(a.keys()).find(C=>{const b=Zr(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=Mt(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({},Zr(w)),{data:y.data}))}});return m}function ef(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 Lg={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",kg="https://app.tolgee.io",Mg=({key:t})=>t,Dg={defaultNs:"",observerOptions:Lg,observerType:"invisible",onFormatError:ma,apiUrl:kg,fetch:Xd(),onTranslationMissing:Mg},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 pl(t,e){const n=ga(Dg,e==null?void 0:e.initialOptions,t);return n.apiUrl=Jd(n.apiUrl),t!=null&&t.fetch&&(n.fetch=Xd(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 jg(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:T,event:D})=>{var N;const H=T.map(({key:B,ns:$,defaultValue:q})=>({key:B,defaultValue:q,fallbackNamespaces:r($),namespace:i({key:B,ns:$})[0],translation:s({key:B,ns:$})}));(N=l.ui)===null||N===void 0||N.handleElementClick(H,D)},d=(T,D)=>{var N;return((N=l.observer)===null||N===void 0?void 0:N.findPositions(T,D))||[]};function h(T){const D=s({key:T.key,ns:T.ns});return L.formatTranslation(Object.assign(Object.assign({},T),{translation:D,formatEnabled:!0}))}function v(){return{fetch:e().fetch}}function m(T){l.observer=T==null?void 0:T()}function f(){return!!l.observer}function w(T){T&&l.formatters.push(T)}function y(T){l.finalFormatter=T}function C(T){c.ui=T}function b(){return!!c.ui}function E(T){l.languageStorage=T}function x(T){l.languageDetector=T}function g(){return ko(a.onError,T=>new hl("Tolgee: Failed to load language",T),()=>{var T;return(T=l.languageStorage)===null||T===void 0?void 0:T.getLanguage(v())})}function _(){if(!l.languageDetector)return;const T=n();return ko(a.onError,D=>new Ag("Tolgee: Failed to detect language",D),()=>{var D;return(D=l.languageDetector)===null||D===void 0?void 0:D.getLanguage(Object.assign({availableLanguages:T},v()))})}function O(T){T&&l.backends.push(T)}function A(T){l.devBackend=T}function R(T,D){const N=Object.freeze({setFinalFormatter:y,addFormatter:w,setObserver:m,hasObserver:f,setUi:C,hasUi:b,setDevBackend:A,addBackend:O,setLanguageDetector:x,setLanguageStorage:E});D(T,N)}const L=Object.freeze({addPlugin:R,run(){var T,D;const{apiKey:N,apiUrl:H,projectId:B,observerOptions:$}=e();l.ui=(T=c.ui)===null||T===void 0?void 0:T.call(c,{apiKey:N,apiUrl:H,projectId:B,highlight:L.highlight,changeTranslation:o,findPositions:d,onPermanentChange:q=>a.onPermanentChange.emit(q)}),(D=l.observer)===null||D===void 0||D.run({mouseHighlight:!0,options:$,translate:h,onClick:u})},stop(){var T;l.ui=void 0,(T=l.observer)===null||T===void 0||T.stop()},getLanguageStorage(){return l.languageStorage},getInitialLanguage(){const T=n(),D=g();return ks(D,N=>(!T||T.includes(N))&&N?N:_())},setStoredLanguage(T){return ko(a.onError,D=>new hl("Tolgee: Failed to store language",D),()=>{var D;return(D=l.languageStorage)===null||D===void 0?void 0:D.setLanguage(T,v())})},getDevBackend(){return l.devBackend},getBackendRecord:({language:T,namespace:D})=>{for(const N of l.backends){const H=N.getRecord(Object.assign({language:T,namespace:D},v()));if(H!==void 0)return H}},getBackendDevRecord:({language:T,namespace:D})=>{var N;const{apiKey:H,apiUrl:B,projectId:$}=e();return(N=l.devBackend)===null||N===void 0?void 0:N.getRecord(Object.assign({apiKey:H,apiUrl:B,projectId:$,language:T,namespace:D},v()))},getLanguageDetector(){return l.languageDetector},retranslate(){var T;(T=l.observer)===null||T===void 0||T.retranslate()},highlight:(T,D)=>{var N,H;return((H=(N=l.observer)===null||N===void 0?void 0:N.highlight)===null||H===void 0?void 0:H.call(N,T,D))||{unhighlight(){}}},unwrap(T){var D;return l.observer?(D=l.observer)===null||D===void 0?void 0:D.unwrap(T):{text:T,keys:[]}},wrap(T){var D;return l.observer?(D=l.observer)===null||D===void 0?void 0:D.wrap(T):T.translation},hasDevBackend(){return!!L.getDevBackend()},formatTranslation(T){var D,{formatEnabled:N}=T,H=ef(T,["formatEnabled"]);const{key:B,translation:$,defaultValue:q,noWrap:ae,params:le,ns:ue,orEmpty:ne}=H,qe=$??q;let Ee="";$==null&&(Ee=e().onTranslationMissing(H));let me=qe??(ne?"":Ee);const Ut=t(),$t=N||!(!((D=l.observer)===null||D===void 0)&&D.outputNotFormattable),Lr=gt=>l.observer&&!ae?l.observer.wrap({key:B,translation:gt,defaultValue:q,params:le,ns:ue}):gt;me=Lr(me);try{if(qe&&Ut&&$t)for(const gt of l.formatters)me=gt.format({translation:me,language:Ut,params:le});l.finalFormatter&&qe&&Ut&&$t&&(me=l.finalFormatter.format({translation:me,language:Ut,params:le}))}catch(gt){console.error(gt);const Vi=xg(gt)||ma,In=e().onFormatError,Ke=typeof In;Ke==="string"?me=In:Ke==="function"?me=In(Vi,H):me=ma,me=Lr(me)}return me}});return L}const ml=(t,e,n)=>{let r=t;return Object.freeze({init(i){r=i},notify(){const i=e();r!==i&&n(i),r=i}})};function Ng(t,e,n){let r=pl(),i;const s=Object.freeze({init(o){r=pl(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,...Eg(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=>Zr(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:Jd(o.apiUrl)}):i=void 0}});return s}function Ig(t){var{ns:e,noWrap:n,orEmpty:r,params:i,language:s}=t,o=ef(t,["ns","noWrap","orEmpty","params","language"]);return Object.assign(Object.assign({},{ns:e,noWrap:n,orEmpty:r,language:s}),{params:Object.assign({},o)})}const tf=(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({},Ig(r)),n)),n};function Fg({options:t}){const e=Pg(c,l),n=ml(!1,()=>o.isFetching(),e.onFetchingChange.emit),r=ml(!1,()=>x.isLoading(),e.onLoadingChange.emit),i=Ng(e.onLanguageChange,e.onPendingLanguageChange,e.onRunningChange),s=jg(i.getLanguage,i.getInitialOptions,i.getAvailableLanguages,u,w,y,h,e),o=Rg(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 A=i.withDefaultNs(g),R=o.getTranslation(A,_);return o.changeTranslation(A,_,O),{revert(){o.changeTranslation(A,_,R)}}}function v(g){i.init(g),o.addStaticData(i.getInitialOptions().staticData)}function m(g,_){const O=i.getFallbackLangs(g),A=d(_),R=[];return O.forEach(L=>{A.forEach(T=>{o.exists({language:L,namespace:T},!0)||R.push({language:L,namespace:T})})}),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(),A=u(_??void 0);return o.getTranslationNs(A,O,g)}function y({key:g,ns:_,language:O}){const A=u(_??void 0),R=i.getFallbackLangs(O);return o.getTranslationFallback(A,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 A=O||i.getInitialOptions().defaultLanguage;A&&i.setLanguage(A)})}function E(){if((s.getLanguageDetector()||s.getLanguageStorage())&&!i.getAvailableLanguages())throw new Error(dl("availableLanguages"));if(!i.getLanguage()&&!i.getInitialOptions().defaultLanguage)throw new Error(dl(["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(_),A=d(g),R=[];return O.forEach(L=>{A.forEach(T=>{o.exists({language:L,namespace:T})||R.push({language:L,namespace:T})})}),R.length===0},t:(...g)=>{const _=tf(...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 Bg(t){const e=Fg({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 Vg=()=>{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=Bg(ga(t.options,n));return t.plugins.forEach(r.addPlugin),r}});return e},nf=0,va=1,Hg=2;class Ug extends Error{constructor(e,n,r){let i;e===nf?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 gl(t){return/\s/.test(t)}const Wt=0,ya=1,Ms=2,Mo=3,Do=4,$g=new Set([Ms,ya,Wt]),ba="'",zg=new Set(["{","}",ba]),qg=t=>/[0-9a-zA-Z_]/.test(t);function Gg(t){let e=Wt,n="",r="",i="";const s=[],o=[];let a=0;function c(h){throw new Ug(h,a,t)}const l=()=>{s.push(n),n=""},u=()=>{qg(i)||c(va),r+=i},d=()=>{r===""&&c(nf),o.push(r),r=""};for(a=0;a<t.length;a++)switch(i=t[a],e){case Wt:i===ba?(n+=i,e=ya):i==="{"?(l(),e=Mo):(n+=i,e=Wt);break;case ya:zg.has(i)?(n=n.slice(0,-1)+i,e=Ms):(n+=i,e=Wt);break;case Ms:i===ba?e=Wt:(n+=i,e=Ms);break;case Mo:i==="}"?(d(),e=Wt):gl(i)?r!==""&&(d(),e=Do):(u(),e=Mo);break;case Do:i=="}"?e=Wt:gl(i)?e=Do:c(va)}return $g.has(e)||c(Hg),l(),[s,o]}function Wg(t,e){const[n,r]=Gg(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 Zg(){return{format:({translation:t,params:e})=>Wg(t,e)}}const Kg=()=>(t,e)=>(e.setFinalFormatter(Zg()),t);var jo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},vl={};(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),A=O;if(x.push(String.fromCharCode.apply(null,A)),!_)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,T=y[C++]&63;E[g++]=(R&31)<<12|L<<6|T}else if((R&248)===240){var L=y[C++]&63,T=y[C++]&63,D=y[C++]&63,N=(R&7)<<18|L<<12|T<<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 A=new Uint8Array(x);A.set(g),g=A}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:jo);var Qg=Cg({__proto__:null,default:vl},[vl]),No;(No=console.assert)===null||No===void 0||No.call(console,Qg);const Jg="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";function Xg(t){const e=Jg.indexOf(t);if(e===-1)throw new Error("Invalid character found: "+t);return e}function Yg(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 ev(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|Xg(t[o]),n+=5,n>=8&&(s[i++]=r>>>n-8&255,n-=8);return Yg(s.buffer)}function tv(t){if(t)try{const[e,n]=t.split("_");if(e==="tgpak"){const[r]=ev(n).split("_");return Number(r)}}catch{console.warn("Tolgee: Api key can't be parsed")}}function nv(t){if(!t)return;const[e]=t.split("_");return e==="tgpak"?"tgpak":e==="tgpat"?"tgpat":"legacy"}function rv(){return{getRecord({apiUrl:t,apiKey:e,language:n,namespace:r,projectId:i,fetch:s}){var o;const a=(o=tv(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}`),nv(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 iv=()=>(t,e)=>(e.setDevBackend(rv()),t);function sv(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 ov({message:t,recievingMessage:e,data:n,attempts:r=1,timeout:i=300}){let s=!1;const o=()=>new Promise((c,l)=>{const u=sv(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 av(){let t;async function e(n){t==null||t();const{cancel:r,promise:i}=ov({message:"TOLGEE_READY",recievingMessage:["TOLGEE_PLUGIN_READY","TOLGEE_PLUGIN_UPDATED"],data:n,attempts:4});return t=r,i}return{update:e}}const cv="tolgee-in-context-tools.umd.min.js",lv="@tolgee/in-context-tools",uv="InContextTools",dv="https://cdn.jsdelivr.net/npm";function fv(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 hv(t){return Io||(Io=fv(`${dv}/@tolgee/web@${t}/dist/${cv}`).then(()=>window[lv][uv])),Io}const rf="__tolgee_apiKey",sf="__tolgee_apiUrl";function yl(){const t=sessionStorage.getItem(rf)||void 0,e=sessionStorage.getItem(sf)||void 0;if(!(!t||!e))return{apiKey:t,apiUrl:e}}function pv(){sessionStorage.removeItem(rf),sessionStorage.removeItem(sf)}function mv(t){document.readyState!=="loading"?Promise.resolve().then(()=>{t()}):document.addEventListener&&document.addEventListener("DOMContentLoaded",t)}let of=()=>t=>t;const gv=()=>{if(typeof window>"u")return!1;try{return typeof sessionStorage<"u"&&sessionStorage}catch(t){return console.error("sessionStorage not available",t),!1}};gv()&&(of=()=>t=>{const e=av(),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 hv("5.22.0");return o=>{const a=yl();return o.addPlugin(s({credentials:a})),o}};return t.on("running",({value:s})=>{s&&mv(()=>{e.update(n()).catch(pv)})}),yl()&&r().then(s=>{t.addPlugin(s)}).catch(s=>{console.error("Tolgee: Failed to load in-context tools"),console.error(s)}),t});function vv(){return Vg().use(of())}const yv={useSuspense:!0};let Fo;const af=()=>(Fo||(Fo=p.createContext(void 0)),Fo),bv=({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({},yv),e),a=af();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 wv;function Sv(){return wv}const Cv=()=>{const t=af(),e=p.useContext(t)||Sv();if(!e)throw new Error("Couldn't find tolgee instance, did you forgot to use `TolgeeProvider`?");return e},_v=()=>{const[t,e]=p.useState(0),n=p.useCallback(()=>{e(r=>r+1)},[e]);return{instance:t,rerender:n}},cf=(t,e)=>{const{tolgee:n,options:r}=Cv(),i=Qd(t),s=tt(i).join(":"),o=Object.assign(Object.assign({},r),e),{rerender:a,instance:c}=_v(),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}=cf(t,e);return{t:p.useCallback((...s)=>{const o=tf(...s);return n(o)},[n]),isLoading:r}},Ev=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,xv=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:Ev(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}=cf();return p.createElement(xv,Object.assign({t:e},t))},Ov="Spinner-module__loader__U4GVhD",Tv={loader:Ov},qs=({className:t})=>S.jsx("div",{className:K(Tv.loader,t),children:"Loading..."}),Pv="Button-module__root__8RX49h",Av="Button-module__primary__st6yY9",Rv="Button-module__secondary__j-3rjz",Lv="Button-module__loading__QfItr2",kv="Button-module__spinner__kVZYqS",Br={root:Pv,primary:Av,secondary:Rv,loading:Lv,spinner:kv},rt=({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:K(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:K(s),...a,children:[!n&&t,n&&S.jsx(qs,{className:Br.spinner})]})}Ot(!1,"Invalid button type")};rt.defaultProps={as:"button"};const Mv=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},I.createElement("g",{clipPath:"url(#a)"},I.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"})),I.createElement("defs",null,I.createElement("clipPath",{id:"a"},I.createElement("path",{fill:"#fff",d:"M0 0h20v20H0z"})))),Dv="CloseButton-module__root__2m1asd",jv="CloseButton-module__absolutePositionVariant__lGX4cQ",Nv="CloseButton-module__relativePositionVariant__LqTTWf",bl={root:Dv,absolutePositionVariant:jv,relativePositionVariant:Nv},Ar=({className:t,position:e="absolute",...n})=>S.jsx("div",{...n,className:K(bl.root,t,bl[`${e}PositionVariant`]),children:S.jsx(Mv,{})}),Iv=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:13,height:12,viewBox:"0 0 13 12",fill:"none",...t},I.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"})),Fv="W3WLink-module__likeButton__RhAlpN",Bv="W3WLink-module__title__eo6M7L",wl={likeButton:Fv,title:Bv},Vv=()=>S.jsxs("a",{className:wl.likeButton,title:"about what3words",href:"https://what3words.com/about",target:"_blank",rel:"noreferrer",children:[S.jsx("span",{className:wl.title,children:"what3words"}),S.jsx(Iv,{})]}),Hv=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,viewBox:"0 0 20 20",fill:"none",...t},I.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:"black"})),Uv=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,viewBox:"0 0 20 20",fill:"none",...t},I.createElement("path",{d:"M20 0H0V20H20V0Z",fill:"black"}),I.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"}),I.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"}),I.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"})),$v="W3WLink-module__mainWrapper__BeGCpA",zv="W3WLink-module__link__yq50q-",Sl={mainWrapper:$v,link:zv},lf=({what3words:t})=>{const{id:e,link:n}=t;return S.jsxs("div",{className:Sl.mainWrapper,children:[S.jsx(Uv,{}),S.jsx("a",{className:Sl.link,href:n,title:"w3w link",target:"_blank",rel:"noreferrer",children:e}),S.jsx(Hv,{})]})},Cl={day:"",statusValue:"No data",isAvailable:!1,closes:""};function qv(t){const[e,n]=p.useState({...Cl,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{...Cl,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 Gv="LocationView-module__title__-wT0bl",Wv="LocationView-module__logo__jDjNMt",Zv="LocationView-module__header__K0gBYX",Kv="LocationView-module__content__wtOPjm",Qv="LocationView-module__sectionTitle__cNIgnC",Jv="LocationView-module__scheduleContainer__Qbb9sE",Xv="LocationView-module__workStatus__9yJNqr",Yv="LocationView-module__scheduleButton__RQPquM",e1="LocationView-module__scheduleList__lPVLXP",t1="LocationView-module__scheduleListItem__gcCPSg",n1="LocationView-module__svgWrapper__zKM438",r1="LocationView-module__section__2J1zAJ",i1="LocationView-module__w3wSection__PdU7j4",s1="LocationView-module__chips__ALwJDx",o1="LocationView-module__services__IgJ4ba",a1="LocationView-module__images__-wKmRM",c1="LocationView-module__image__T1E-gt",l1="LocationView-module__actions__NuafMj",u1="LocationView-module__actionsHidden__-vX5kK",d1="LocationView-module__submit__c-Hc8u",f1="LocationView-module__scheduleItem__RhAgat",ve={title:Gv,logo:Wv,header:Zv,content:Kv,sectionTitle:Qv,scheduleContainer:Jv,workStatus:Xv,scheduleButton:Yv,scheduleList:e1,scheduleListItem:t1,svgWrapper:n1,section:r1,w3wSection:i1,chips:s1,services:o1,images:a1,image:c1,actions:l1,actionsHidden:u1,submit:d1,scheduleItem:f1},h1={default:Zd,llama:Kd},p1=({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}=qv(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=h1[w];function C(){o(g=>!g)}return S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:K(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:K(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(lf,{what3words:m}),S.jsx(Vv,{})]}),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(Sg,{})})]}),S.jsx("ul",{className:ve.scheduleList,"data-open":s,children:v.map(({dayName:g,time:_})=>{const A=!_?a("weekend"):_;return S.jsxs("li",{className:ve.scheduleListItem,children:[S.jsxs("span",{children:[g,":"]}),S.jsx("span",{children:A})]},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:K(ve.actions,{[ve.actionsHidden]:e}),children:S.jsx(rt,{variant:"primary",className:ve.submit,disabled:c,onClick:i,children:a("choose",{ns:"common"})})})]})},uf=p.memo(p1),dc=({isSelectedPoint:t})=>{const e=Z(tc),[n,r]=p.useState(!0);return p.useEffect(()=>{r(t?!e:!0)},[e,t]),n};var m1=g1()?p.useLayoutEffect:p.useEffect;function g1(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function v1(){var t=p.useState(Object.create(null)),e=t[1];return p.useCallback(function(){e(Object.create(null))},[])}var y1=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=v1();return m1(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 j=function(){return j=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},j.apply(this,arguments)};function fc(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 X(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 te(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 ce;(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"})(ce||(ce={}));var Er;(function(t){t.Parent="#_parent",t.Internal="#_internal"})(Er||(Er={}));var Sa=ce.Start,hc=ce.Stop,Ni=ce.Raise,vo=ce.Send,uf=ce.Cancel,y1=ce.NullEvent,pc=ce.Assign;ce.After;ce.DoneState;var df=ce.Log,b1=ce.Init,Ca=ce.Invoke;ce.ErrorExecution;var _l=ce.ErrorPlatform,w1=ce.ErrorCustom,ff=ce.Update,S1=ce.Choose,C1=ce.Pure,hf=".",El={},_a="xstate.guard",_1="",ns;function mc(t,e,n){n===void 0&&(n=hf);var r=ni(t,n),i=ni(e,n);return oe(i)?oe(r)?i===r:!1:oe(r)?r in i:Object.keys(r).every(function(s){return s in i?mc(r[s],i[s]):!1})}function pf(t){try{return oe(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 E1(t){return typeof t=="object"&&"value"in t&&"context"in t&&"event"in t&&"_event"in t}function ni(t,e){if(E1(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 Kr(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 xl(t,e,n){var r,i,s={};try{for(var o=X(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 x1=function(t){return function(e){var n,r,i=e;try{for(var s=X(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 O1(t,e){return function(n){var r,i,s=n;try{for(var o=X(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(oe(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([],te(t),!1))}function mf(t){return Rr(t)?t:[t]}function ct(t){return t===void 0?[]:mf(t)}function Ws(t,e,n){var r,i;if(re(t))return t(e,n.data);var s={};try{for(var o=X(Object.keys(t)),a=o.next();!a.done;a=o.next()){var c=a.value,l=t[c];re(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 T1(t){return/^(done|error)\./.test(t)}function Ol(t){return!!(t instanceof Promise||t!==null&&(re(t)||typeof t=="object")&&re(t.then))}function P1(t){return t!==null&&typeof t=="object"&&"transition"in t&&typeof t.transition=="function"}function A1(t,e){var n,r,i=te([[],[]],2),s=i[0],o=i[1];try{for(var a=X(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 gf(t,e){return Kr(t.states,function(n,r){if(n){var i=(oe(e)?void 0:e[r])||(n?n.current:void 0);if(i)return{current:i,states:gf(n,i)}}})}function R1(t,e){return{current:e,states:gf(t,e)}}function Tl(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(re(l))d=l(s,e.data,u);else try{for(var f=X(Object.keys(l)),v=f.next();!v.done;v=f.next()){var m=v.value,h=l[m];d[m]=re(h)?h(s,e.data,u):h}}catch(S){a={error:S}}finally{try{v&&!v.done&&(c=f.return)&&c.call(f)}finally{if(a)throw a.error}}return Object.assign({},s,d)},t);return i}var L1=function(){};function Rr(t){return Array.isArray(t)}function re(t){return typeof t=="function"}function oe(t){return typeof t=="string"}function vf(t,e){if(t)return oe(t)?{type:_a,name:t,predicate:e?e[t]:void 0}:re(t)?{type:_a,name:t.name,predicate:t}:t}function k1(t){try{return"subscribe"in t&&re(t.subscribe)}catch{return!1}}var Xt=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();ns={},ns[Xt]=function(){return this},ns[Symbol.observable]=function(){return this};function xr(t){return!!t&&"__xstatenode"in t}function M1(t){return!!t&&typeof t.send=="function"}function yo(t,e){return oe(t)||typeof t=="number"?j({type:t},e):t}function Pe(t,e){if(!oe(t)&&"$$type"in t&&t.$$type==="scxml")return t;var n=yo(t);return j({name:n.type,data:n,$$type:"scxml",type:"external"},e)}function qn(t,e){var n=mf(e).map(function(r){return typeof r>"u"||typeof r=="string"||xr(r)?{target:r,event:t}:j(j({},r),{event:t})});return n}function D1(t){if(!(t===void 0||t===_1))return ct(t)}function yf(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 bf(t){return typeof t=="string"?{type:t}:t}function js(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===Ni||t.type===vo&&t.to===Er.Internal)&&typeof t.delay!="number"}var ir=Pe({type:b1});function Oa(t,e){return e&&e[t]||void 0}function mi(t,e){var n;if(oe(t)||typeof t=="number"){var r=Oa(t,e);re(r)?n={type:t,exec:r}:r?n=r:n={type:t,exec:void 0}}else if(re(t))n={type:t.name||t.toString(),exec:t};else{var r=Oa(t.type,e);if(re(r))n=j(j({},t),{exec:r});else if(r){var i=r.type||t.type;n=j(j(j({},r),t),{type:i})}else n=t}return n}var Yt=function(t,e){if(!t)return[];var n=Rr(t)?t:[t];return n.map(function(r){return mi(r,e)})};function gc(t){var e=mi(t);return j(j({id:oe(t)?t:e.id},e),{type:e.type})}function j1(t,e){return{type:Ni,event:typeof t=="function"?t:yo(t),delay:e?e.delay:void 0,id:e==null?void 0:e.id}}function N1(t,e,n,r){var i={_event:n},s=Pe(re(t.event)?t.event(e,n.data,i):t.event),o;if(oe(t.delay)){var a=r&&r[t.delay];o=re(a)?a(e,n.data,i):a}else o=re(t.delay)?t.delay(e,n.data,i):t.delay;return j(j({},t),{type:Ni,_event:s,delay:o})}function I1(t,e){return{to:e?e.to:void 0,type:vo,event:re(t)?t:yo(t),delay:e?e.delay:void 0,id:e&&e.id!==void 0?e.id:re(t)?t.name:pf(t)}}function F1(t,e,n,r){var i={_event:n},s=Pe(re(t.event)?t.event(e,n.data,i):t.event),o;if(oe(t.delay)){var a=r&&r[t.delay];o=re(a)?a(e,n.data,i):a}else o=re(t.delay)?t.delay(e,n.data,i):t.delay;var c=re(t.to)?t.to(e,n.data,i):t.to;return j(j({},t),{to:c,_event:s,event:s.data,delay:o})}var B1=function(t,e,n){return j(j({},t),{value:oe(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})},V1=function(t){return{type:uf,sendId:t}};function H1(t){var e=gc(t);return{type:ce.Start,activity:e,exec:void 0}}function U1(t){var e=re(t)?t:gc(t);return{type:ce.Stop,activity:e,exec:void 0}}function $1(t,e,n){var r=re(t.activity)?t.activity(e,n.data):t.activity,i=typeof r=="string"?{id:r}:r,s={type:ce.Stop,activity:i};return s}var z1=function(t){return{type:pc,assignment:t}};function q1(t,e){var n=e?"#".concat(e):"";return"".concat(ce.After,"(").concat(t,")").concat(n)}function is(t,e){var n="".concat(ce.DoneState,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function Ns(t,e){var n="".concat(ce.DoneInvoke,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function Qr(t,e){var n="".concat(ce.ErrorPlatform,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}var G1=function(t){var e,n,r=[];try{for(var i=X(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===pc){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?[]:G1(i),c=a.length?Tl(n,r,a,e):n,l=o?[n]:void 0,u=[];function d(m,h){var S;switch(h.type){case Ni:{var b=N1(h,c,r,t.options.delays);return s&&typeof b.delay=="number"&&s(b,c,r),b}case vo:var _=F1(h,c,r,t.options.delays);return s&&_.to!==Er.Internal&&(m==="entry"?u.push(_):s(_,c,r)),_;case df:{var y=B1(h,c,r);return s==null||s(y,c,r),y}case S1:{var E=h,x=(S=E.conds.find(function(B){var $=vf(B.cond,t.options.guards);return!$||yf(t,$,c,r,s?void 0:e)}))===null||S===void 0?void 0:S.actions;if(!x)return[];var g=te(Zs(t,e,c,r,[{type:m,actions:Yt(ct(x),t.options.actions)}],s,o),2),C=g[0],O=g[1];return c=O,l==null||l.push(c),C}case C1:{var x=h.get(c,r.data);if(!x)return[];var A=te(Zs(t,e,c,r,[{type:m,actions:Yt(ct(x),t.options.actions)}],s,o),2),R=A[0],L=A[1];return c=L,l==null||l.push(c),R}case hc:{var y=$1(h,c,r);return s==null||s(y,n,r),y}case pc:{c=Tl(c,r,[h],s?void 0:e),l==null||l.push(c);break}default:var T=mi(h,t.options.actions),D=T.exec;if(s)s(T,c,r);else if(D&&l){var N=l.length-1,H=j(j({},T),{exec:function(B){for(var $=[],q=1;q<arguments.length;q++)$[q-1]=arguments[q];D.apply(void 0,he([l[N]],te($),!1))}});T=H}return T}}function f(m){var h,S,b=[];try{for(var _=X(m.actions),y=_.next();!y.done;y=_.next()){var E=y.value,x=d(m.type,E);x&&(b=b.concat(x))}}catch(g){h={error:g}}finally{try{y&&!y.done&&(S=_.return)&&S.call(_)}finally{if(h)throw h.error}}return u.forEach(function(g){s(g,c,r)}),u.length=0,b}var v=ye(i.map(f));return[v,c]}var Yn=function(t,e){var n=e(t);return n};function wf(t){var e;return e={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:t}}},e[Xt]=function(){return this},e}function W1(t,e,n,r){var i,s=bf(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?Sf(o,t.id,a):wf(t.id);return c.meta=t,c}function Sf(t,e,n){var r=wf(e);if(r.deferred=!0,xr(t)){var i=r.state=Yn(void 0,function(){return(n?t.withContext(n):t).initialState});r.getSnapshot=function(){return i}}return r}function Z1(t){try{return typeof t.send=="function"}catch{return!1}}function K1(t){return Z1(t)&&"id"in t}function Q1(t){var e;return j((e={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},e[Xt]=function(){return this},e),t)}var Ks=function(t){return t.type==="atomic"||t.type==="final"};function Cf(t){return Object.keys(t.states).map(function(e){return t.states[e]})}function gi(t){return Cf(t).filter(function(e){return e.type!=="history"})}function _f(t){var e=[t];return Ks(t)?e:e.concat(ye(gi(t).map(_f)))}function Jr(t,e){var n,r,i,s,o,a,c,l,u=new Set(t),d=Ta(u),f=new Set(e);try{for(var v=X(f),m=v.next();!m.done;m=v.next())for(var h=m.value,S=h.parent;S&&!f.has(S);)f.add(S),S=S.parent}catch(A){n={error:A}}finally{try{m&&!m.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}var b=Ta(f);try{for(var _=X(f),y=_.next();!y.done;y=_.next()){var h=y.value;if(h.type==="compound"&&(!b.get(h)||!b.get(h).length))d.get(h)?d.get(h).forEach(function(R){return f.add(R)}):h.initialStateNodes.forEach(function(R){return f.add(R)});else if(h.type==="parallel")try{for(var E=(o=void 0,X(gi(h))),x=E.next();!x.done;x=E.next()){var g=x.value;f.has(g)||(f.add(g),d.get(g)?d.get(g).forEach(function(R){return f.add(R)}):g.initialStateNodes.forEach(function(R){return f.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(A){i={error:A}}finally{try{y&&!y.done&&(s=_.return)&&s.call(_)}finally{if(i)throw i.error}}try{for(var C=X(f),O=C.next();!O.done;O=C.next())for(var h=O.value,S=h.parent;S&&!f.has(S);)f.add(S),S=S.parent}catch(A){c={error:A}}finally{try{O&&!O.done&&(l=C.return)&&l.call(C)}finally{if(c)throw c.error}}return f}function Ef(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]=Ef(s,e)}),i}function Ta(t){var e,n,r=new Map;try{for(var i=X(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 J1(t,e){var n=Jr([t],e);return Ef(t,Ta(n))}function Xr(t,e){return Array.isArray(t)?t.some(function(n){return n===e}):t instanceof Set?t.has(e):!1}function X1(t){return he([],te(new Set(ye(he([],te(t.map(function(e){return e.ownEvents})),!1)))),!1)}function Is(t,e){return e.type==="compound"?gi(e).some(function(n){return n.type==="final"&&Xr(t,n)}):e.type==="parallel"?gi(e).every(function(n){return Is(t,n)}):!1}function Y1(t){return t===void 0&&(t=[]),t.reduce(function(e,n){return n.meta!==void 0&&(e[n.id]=n.meta),e},{})}function Pl(t){return new Set(ye(t.map(function(e){return e.tags})))}function xf(t,e){if(t===e)return!0;if(t===void 0||e===void 0)return!1;if(oe(t)||oe(e))return t===e;var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(i){return xf(t[i],e[i])})}function ey(t){return typeof t!="object"||t===null?!1:"value"in t&&"_event"in t}function ty(t,e){var n=t.exec,r=j(j({},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=El,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||El,this.meta=Y1(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 X1(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="."),oe(e))return[e];var i=Object.keys(e);return i.concat.apply(i,he([],te(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=fc(e,["configuration","transitions","tags","machine"]);return j(j({},r),{tags:Array.from(n)})},t.prototype.matches=function(e){return mc(e,this.value)},t.prototype.hasTag=function(e){return this.tags.has(e)},t.prototype.can=function(e){var n;L1(!!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}(),ny={deferEvents:!1},Al=function(){function t(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=j(j({},ny),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,ry=0,Vr={bookId:function(){return"x:".concat(ry++)},register:function(t,e){return Bo.set(t,e),t},get:function(t){return Bo.get(t)},free:function(t){Bo.delete(t)}};function vc(){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 iy(){var t=vc();if(t&&"__xstate__"in t)return t.__xstate__}function sy(t){if(vc()){var e=iy();e&&e.register(t)}}function oy(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=Q1({id:e.id,send:function(l){i.push(l),o()},getSnapshot:function(){return n},subscribe:function(l,u,d){var f=js(l,u,d);return r.add(f),f.next(n),{unsubscribe:function(){r.delete(f)}}}}),c={parent:e.parent,self:a,id:e.id||"anonymous",observers:r};return n=t.start?t.start(c):n,a}var ay={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 cy=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 f=Pe(yo(u,d));if(r.status===xe.Stopped)return r.state;if(r.status!==xe.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(f.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(f.data)));return r.scheduler.schedule(function(){r.forward(f);var v=r._nextState(f);r.update(v,f)}),r._state},this.sendTo=function(u,d,f){var v=r.parent&&(d===Er.Parent||r.parent.id===d),m=v?r.parent:oe(d)?d===Er.Internal?r:r.children.get(d)||Vr.get(d):M1(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 h=j(j({},u),{name:u.name===w1?"".concat(Qr(r.id)):u.name,origin:r.sessionId});!f&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([m,h]):m.send(h)}}else!f&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([m,u.data]):m.send(u.data)},this._exec=function(u,d,f,v){v===void 0&&(v=r.machine.options.actions);var m=u.exec||Oa(u.type,v),h=re(m)?m:m?m.exec:u.exec;if(h)try{return h(d,f.data,r.machine.config.predictableActionArguments?{action:u,_event:f}:{action:u,state:r.state,_event:f})}catch(N){throw r.parent&&r.parent.send({type:"xstate.error",data:N}),N}switch(u.type){case Ni:{var S=u;r.defer(S);break}case vo:var b=u;if(typeof b.delay=="number"){r.defer(b);return}else b.to?r.sendTo(b._event,b.to,f===ir):r.send(b._event);break;case uf:r.cancel(u.sendId);break;case Sa:{if(r.status!==xe.Running)return;var _=u.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[_.id||_.type])break;if(_.type===ce.Invoke){var y=bf(_.src),E=r.machine.options.services?r.machine.options.services[y.type]:void 0,x=_.id,g=_.data,C="autoForward"in _?_.autoForward:!!_.forward;if(!E)return;var O=g?Ws(g,d,f):void 0;if(typeof E=="string")return;var A=re(E)?E(d,f.data,{data:O,src:y,meta:_.meta}):E;if(!A)return;var R=void 0;xr(A)&&(A=O?A.withContext(O):A,R={autoForward:C}),r.spawn(A,x,R)}else r.spawnActivity(_);break}case hc:{r.stopChild(u.activity.id);break}case df:var L=u,T=L.label,D=L.value;T?r.logger(T,D):r.logger(D);break}};var i=j(j({},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 Al({deferEvents:this.options.deferEvents}),this.sessionId=Vr.bookId()}return Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:Yn(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=X(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 f=void 0;f=this._outgoingQueue.shift();)f[0].send(f[1]);if(this.children.forEach(function(A){d.state.children[A.id]=A}),this.devTools&&this.devTools.send(n.data,e),e.event)try{for(var v=X(this.eventListeners),m=v.next();!m.done;m=v.next()){var h=m.value;h(e.event)}}catch(A){r={error:A}}finally{try{m&&!m.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}try{for(var S=X(this.listeners),b=S.next();!b.done;b=S.next()){var h=b.value;h(e,e.event)}}catch(A){s={error:A}}finally{try{b&&!b.done&&(o=S.return)&&o.call(S)}finally{if(s)throw s.error}}try{for(var _=X(this.contextListeners),y=_.next();!y.done;y=_.next()){var E=y.value;E(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(A){a={error:A}}finally{try{y&&!y.done&&(c=_.return)&&c.call(_)}finally{if(a)throw a.error}}if(this.state.done){var x=e.configuration.find(function(A){return A.type==="final"&&A.parent===d.machine}),g=x&&x.doneData?Ws(x.doneData,e.context,n):void 0;this._doneEvent=Ns(this.id,g);try{for(var C=X(this.doneListeners),O=C.next();!O.done;O=C.next()){var h=O.value;h(this._doneEvent)}}catch(A){l={error:A}}finally{try{O&&!O.done&&(u=C.return)&&u.call(C)}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===xe.Running&&e(this.state,this.state.event),this},t.prototype.subscribe=function(e,n,r){var i=this,s=js(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(),Vr.register(this.sessionId,this),this.initialized=!0,this.status=xe.Running;var r=e===void 0?this.initialState:Yn(this,function(){return ey(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,ir)}),this},t.prototype._stopChildren=function(){this.children.forEach(function(e){re(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=X(this.listeners),f=d.next();!f.done;f=d.next()){var v=f.value;this.listeners.delete(v)}}catch(C){e={error:C}}finally{try{f&&!f.done&&(n=d.return)&&n.call(d)}finally{if(e)throw e.error}}try{for(var m=X(this.stopListeners),h=m.next();!h.done;h=m.next()){var v=h.value;v(),this.stopListeners.delete(v)}}catch(C){r={error:C}}finally{try{h&&!h.done&&(i=m.return)&&i.call(m)}finally{if(r)throw r.error}}try{for(var S=X(this.contextListeners),b=S.next();!b.done;b=S.next()){var v=b.value;this.contextListeners.delete(v)}}catch(C){s={error:C}}finally{try{b&&!b.done&&(o=S.return)&&o.call(S)}finally{if(s)throw s.error}}try{for(var _=X(this.doneListeners),y=_.next();!y.done;y=_.next()){var v=y.value;this.doneListeners.delete(v)}}catch(C){a={error:C}}finally{try{y&&!y.done&&(c=_.return)&&c.call(_)}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=X(Object.keys(this.delayedEventsMap)),x=E.next();!x.done;x=E.next()){var g=x.value;this.clock.clearTimeout(this.delayedEventsMap[g])}}catch(C){l={error:C}}finally{try{x&&!x.done&&(u=E.return)&&u.call(E)}finally{if(l)throw l.error}}this.scheduler.clear(),this.scheduler=new Al({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=Pe({type:"xstate.stop"}),s=Yn(e,function(){var o=ye(he([],te(e.state.configuration),!1).sort(function(d,f){return f.order-d.order}).map(function(d){return Yt(d.onExit,e.machine.options.actions)})),a=te(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(),Vr.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=Pe(v);n.forward(m),o=Yn(n,function(){return n.machine.transition(o,m,void 0,r||void 0)}),c.push.apply(c,he([],te(n.machine.config.predictableActionArguments?o.actions:o.actions.map(function(h){return ty(h,o)})),!1)),a=a||!!o.changed};try{for(var u=X(e),d=u.next();!d.done;d=u.next()){var f=d.value;l(f)}}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,Pe(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=Pe(e);if(i.name.indexOf(_l)===0&&!this.state.nextEvents.some(function(o){return o.indexOf(_l)===0}))throw i.data.data;var s=Yn(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=X(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),re(n.stop)&&n.stop())},t.prototype.spawn=function(e,n,r){if(this.status!==xe.Running)return Sf(e,n);if(Ol(e))return this.spawnPromise(Promise.resolve(e),n);if(re(e))return this.spawnCallback(e,n);if(K1(e))return this.spawnActor(e,n);if(k1(e))return this.spawnObservable(e,n);if(xr(e))return this.spawnMachine(e,j(j({},r),{id:n}));if(P1(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,j(j({},this.options),{parent:this,id:n.id||e.id})),s=j(j({},ay),n);s.sync&&i.onTransition(function(a){r.send(ff,{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(Pe(a,{origin:i.id}))}).start(),o},t.prototype.spawnBehavior=function(e,n){var r=oy(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(Pe(Ns(n,c),{origin:n})))},function(c){if(!s){i.removeChild(n);var l=Qr(n,c);try{i.send(Pe(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=js(c,l,u),f=!1;return e.then(function(v){f||(d.next(v),!f&&d.complete())},function(v){f||d.error(v)}),{unsubscribe:function(){return f=!0}}},stop:function(){s=!0},toJSON:function(){return{id:n}},getSnapshot:function(){return o}},r[Xt]=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(f){c=f,a.forEach(function(v){return v(f)}),!s&&i.send(Pe(f,{origin:n}))},u;try{u=e(l,function(f){o.add(f)})}catch(f){this.send(Qr(n,f))}if(Ol(u))return this.spawnPromise(u,n);var d=(r={id:n,send:function(f){return o.forEach(function(v){return v(f)})},subscribe:function(f){var v=js(f);return a.add(v.next),{unsubscribe:function(){a.delete(v.next)}}},stop:function(){s=!0,re(u)&&u()},toJSON:function(){return{id:n}},getSnapshot:function(){return c}},r[Xt]=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(Pe(c,{origin:n}))},function(c){i.removeChild(n),i.send(Pe(Qr(n,c),{origin:n}))},function(){i.removeChild(n),i.send(Pe(Ns(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[Xt]=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[Xt]=function(){return this},r))},t.prototype.attachDev=function(){var e=vc();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(j(j({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:j({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}sy(this)}},t.prototype.toJSON=function(){return{id:this.id}},t.prototype[Xt]=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=Of,t}();function Of(t,e){var n=new cy(t,e);return n}function ly(t){if(typeof t=="string"){var e={type:t};return e.toString=function(){return t},e}return t}function ss(t){return j(j({type:Ca},t),{toJSON:function(){t.onDone,t.onError;var e=fc(t,["onDone","onError"]);return j(j({},e),{type:Ca,src:ly(t.src)})}})}var os="",Pa="#",Vo="*",Gn={},Wn=function(t){return t[0]===Pa},uy=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},dy=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(uy(),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:hf),this.id=this.config.id||he([this.machine.key],te(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?Kr(this.config.states,function(l,u){var d,f=new t(l,{},void 0,{parent:s,key:u});return Object.assign(s.idMap,j((d={},d[f.id]=f,d),f.idMap)),f}):Gn;var a=0;function c(l){var u,d;l.order=a++;try{for(var f=X(Cf(l)),v=f.next();!v.done;v=f.next()){var m=v.value;c(m)}}catch(h){u={error:h}}finally{try{v&&!v.done&&(d=f.return)&&d.call(f)}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 mi(l)}),this.onExit=ct(this.config.exit||this.config.onExit).map(function(l){return mi(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,f;if(xr(l)){var v=rs(s.id,u);return s.machine.options.services=j((d={},d[v]=l,d),s.machine.options.services),ss({src:v,id:v})}else if(oe(l.src)){var v=l.id||rs(s.id,u);return ss(j(j({},l),{id:v,src:l.src}))}else if(xr(l.src)||re(l.src)){var v=l.id||rs(s.id,u);return s.machine.options.services=j((f={},f[v]=l.src,f),s.machine.options.services),ss(j(j({id:v},l),{src:v}))}else{var m=l.src;return ss(j(j({id:rs(s.id,u)},l),{src:m}))}}),this.activities=ct(this.config.activities).concat(this.invoke).map(function(l){return gc(l)}),this.transition=this.transition.bind(this),this.tags=ct(this.config.tags)}return t.prototype._init=function(){this.__cache.transitions||_f(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:j(j({},i),e.actions),activities:j(j({},s),e.activities),guards:j(j({},o),e.guards),services:j(j({},a),e.services),delays:j(j({},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 re(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:Kr(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=re(s)?"".concat(e.id,":delay[").concat(o,"]"):s,c=q1(a,e.id);return e.onEntry.push(I1(c,{delay:s})),e.onExit.push(V1(c)),c},i=Rr(n)?n.map(function(s,o){var a=r(s.delay,o);return j(j({},s),{event:a})}):ye(Object.keys(n).map(function(s,o){var a=n[s],c=oe(a)?{target:a}:a,l=isNaN(+s)?s:+s,u=r(l,o);return ct(c).map(function(d){return j(j({},d),{event:u,delay:l})})}));return i.map(function(s){var o=s.delay;return j(j({},e.formatTransition(s)),{delay:o})})},t.prototype.getStateNodes=function(e){var n,r=this;if(!e)return[];var i=e instanceof Ye?e.value:ni(e,this.delimiter);if(oe(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([],te(ye(o.map(function(c){return r.getStateNode(c).getStateNodes(i[c])}))),!1)),a},t.prototype.handles=function(e){var n=pf(e);return this.events.includes(n)},t.prototype.resolveState=function(e){var n=e instanceof Ye?e:Ye.create(e),r=Array.from(Jr([],this.getStateNodes(n.value)));return new Ye(j(j({},n),{value:this.resolve(n.value),configuration:r,done:Is(r,this),tags:Pl(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=X(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),f=d._transition(u,n,r);f&&(o[l]=f)}}}catch(b){i={error:b}}finally{try{c&&!c.done&&(s=a.return)&&s.call(a)}finally{if(i)throw i.error}}var v=Object.keys(o).map(function(b){return o[b]}),m=ye(v.map(function(b){return b.transitions})),h=v.some(function(b){return b.transitions.length>0});if(!h)return this.next(n,r);var S=ye(Object.keys(o).map(function(b){return o[b].configuration}));return{transitions:m,exitSet:ye(v.map(function(b){return b.exitSet})),configuration:S,source:n,actions:ye(Object.keys(o).map(function(b){return o[b].actions}))}},t.prototype._transition=function(e,n,r){return oe(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,Pe(n))},t.prototype.next=function(e,n){var r,i,s=this,o=n.name,a=[],c=[],l;try{for(var u=X(this.getCandidates(o)),d=u.next();!d.done;d=u.next()){var f=d.value,v=f.cond,m=f.in,h=e.context,S=m?oe(m)&&Wn(m)?e.matches(ni(this.getStateNodeById(m).path,this.delimiter)):mc(ni(m,this.delimiter),x1(this.path.slice(0,-2))(e.value)):!0,b=!1;try{b=!v||yf(this.machine,v,h,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(b&&S){f.target!==void 0&&(c=f.target),a.push.apply(a,he([],te(f.actions),!1)),l=f;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 _=ye(c.map(function(E){return s.getRelativeStateNodes(E,e.historyValue)})),y=!!l.internal;return{transitions:[l],exitSet:y?[]:ye(c.map(function(E){return s.getPotentiallyReenteringNodes(E)})),configuration:_,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,f=this,v=o?Jr([],this.getStateNodes(o.value)):[],m=new Set;try{for(var h=X(Array.from(e).sort(function(L,T){return L.order-T.order})),S=h.next();!S.done;S=h.next()){var b=S.value;(!Xr(v,b)||Xr(r.exitSet,b)||b.parent&&m.has(b.parent))&&m.add(b)}}catch(L){c={error:L}}finally{try{S&&!S.done&&(l=h.return)&&l.call(h)}finally{if(c)throw c.error}}try{for(var _=X(v),y=_.next();!y.done;y=_.next()){var b=y.value;(!Xr(e,b)||Xr(r.exitSet,b.parent))&&r.exitSet.push(b)}}catch(L){u={error:L}}finally{try{y&&!y.done&&(d=_.return)&&d.call(_)}finally{if(u)throw u.error}}r.exitSet.sort(function(L,T){return T.order-L.order});var E=Array.from(m).sort(function(L,T){return L.order-T.order}),x=new Set(r.exitSet),g=ye(E.map(function(L){var T=[];if(L.type!=="final")return T;var D=L.parent;if(!D.parent)return T;T.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"&&gi(N).every(function(H){return Is(r.configuration,H)})&&T.push(is(N.id)),T})),C=E.map(function(L){var T=L.onEntry,D=L.activities.map(function(N){return H1(N)});return{type:"entry",actions:Yt(a?he(he([],te(T),!1),te(D),!1):he(he([],te(D),!1),te(T),!1),f.machine.options.actions)}}).concat({type:"state_done",actions:g.map(function(L){return j1(L)})}),O=Array.from(x).map(function(L){return{type:"exit",actions:Yt(he(he([],te(L.onExit),!1),te(L.activities.map(function(T){return U1(T)})),!1),f.machine.options.actions)}}),A=O.concat({type:"transition",actions:Yt(r.actions,this.machine.options.actions)}).concat(C);if(n){var R=Yt(ye(he([],te(e),!1).sort(function(L,T){return T.order-L.order}).map(function(L){return L.onExit})),this.machine.options.actions).filter(function(L){return!xa(L)});return A.concat({type:"stop",actions:R})}return A},t.prototype.transition=function(e,n,r,i){e===void 0&&(e=this.initialState);var s=Pe(n),o;if(e instanceof Ye)o=r===void 0?e:this.resolveState(Ye.from(e,r));else{var a=oe(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)&&!T1(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=Jr([],this.getStateNodes(o.value)),d=l.configuration.length?Jr(u,l.configuration):u;return l.configuration=he([],te(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([],te(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,f=!n||e.transitions.length>0,v=f?e.configuration:n?n.configuration:[],m=Is(v,this),h=f?J1(this.machine,d):void 0,S=n?n.historyValue?n.historyValue:e.source?this.machine.historyValue(n.value):void 0:void 0,b=this.getActions(new Set(v),m,e,r,s,n,i),_=n?j({},n.activities):{};try{for(var y=X(b),E=y.next();!E.done;E=y.next()){var x=E.value;try{for(var g=(c=void 0,X(x.actions)),C=g.next();!C.done;C=g.next()){var O=C.value;O.type===Sa?_[O.activity.id||O.activity.type]=O:O.type===hc&&(_[O.activity.id||O.activity.type]=!1)}}catch(Ee){c={error:Ee}}finally{try{C&&!C.done&&(l=g.return)&&l.call(g)}finally{if(c)throw c.error}}}}catch(Ee){o={error:Ee}}finally{try{E&&!E.done&&(a=y.return)&&a.call(y)}finally{if(o)throw o.error}}var A=te(Zs(this,n,r,s,b,i,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),R=A[0],L=A[1],T=te(A1(R,xa),2),D=T[0],N=T[1],H=R.filter(function(Ee){var me;return Ee.type===Sa&&((me=Ee.activity)===null||me===void 0?void 0:me.type)===Ca}),B=H.reduce(function(Ee,me){return Ee[me.activity.id]=W1(me.activity,u.machine,L,s),Ee},n?j({},n.children):{}),$=new Ye({value:h||n.value,context:L,_event:s,_sessionid:n?n._sessionid:null,historyValue:h?S?R1(S,h):void 0:n?n.historyValue:void 0,history:!h||e.source?n:void 0,actions:h?N:[],activities:h?_:n?n.activities:{},events:[],configuration:v,transitions:e.transitions,children:B,done:m,tags:Pl(v),machine:this}),q=r!==L;$.changed=s.name===ff||q;var ae=$.history;ae&&delete ae.history;var le=!m&&(this._transient||d.some(function(Ee){return Ee._transient}));if(!f&&(!le||s.name===os))return $;var ue=$;if(!m)for(le&&(ue=this.resolveRaisedTransition(ue,{type:y1},s,i));D.length;){var ne=D.shift();ue=this.resolveRaisedTransition(ue,ne._event,s,i)}var qe=ue.changed||(ae?!!ue.actions.length||q||typeof ae.value!=typeof ue.value||!xf(ue.value,ae.value):void 0);return ue.changed=qe,ue.history=ae,ue},t.prototype.getStateNode=function(e){if(Wn(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=Wn(e)?e.slice(Pa.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"&&Wn(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||Gn;switch(this.type){case"parallel":return Kr(this.initialStateValue,function(s,o){return s?r.getStateNode(o).resolve(e[o]||s):Gn});case"compound":if(oe(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?Kr(e,function(s,o){return s?r.getStateNode(o).resolve(s):Gn}):this.initialStateValue||{};default:return e||Gn}},t.prototype.getResolvedPath=function(e){if(Wn(e)){var n=this.machine.idMap[e.slice(Pa.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=xl(this.states,function(r){return r.initialStateValue||Gn},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;oe(n.target)?e=Wn(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=te(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:xl(this.states,function(n,r){if(!e)return n.historyValue();var i=oe(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=O1(r.path,"states")(e).current;return oe(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=X(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,X(u.events)),f=d.next();!f.done;f=d.next()){var v=f.value;o.add("".concat(v))}}catch(m){r={error:m}}finally{try{f&&!f.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(!oe(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=D1(e.target),i="internal"in e?e.internal:r?r.some(function(c){return oe(c)&&c[0]===n.delimiter}):!0,s=this.machine.options.guards,o=this.resolveTarget(r),a=j(j({},e),{actions:Yt(ct(e.actions)),cond:vf(e.cond,s),target:o,source:this,internal:i,eventType:e.event,toJSON:function(){return j(j({},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=fc(s,[typeof o=="symbol"?o:o+""]);i=ye(Object.keys(l).map(function(_){var y=qn(_,l[_]);return y}).concat(qn(Vo,c)))}var u=this.config.always?qn("",this.config.always):[],d=this.config.onDone?qn(String(is(this.id)),this.config.onDone):[],f=ye(this.invoke.map(function(_){var y=[];return _.onDone&&y.push.apply(y,he([],te(qn(String(Ns(_.id)),_.onDone)),!1)),_.onError&&y.push.apply(y,he([],te(qn(String(Qr(_.id)),_.onError)),!1)),y})),v=this.after,m=ye(he(he(he(he([],te(d),!1),te(f),!1),te(i),!1),te(u),!1).map(function(_){return ct(_).map(function(y){return r.formatTransition(y)})}));try{for(var h=X(v),S=h.next();!S.done;S=h.next()){var b=S.value;m.push(b)}}catch(_){e={error:_}}finally{try{S&&!S.done&&(n=h.return)&&n.call(h)}finally{if(e)throw e.error}}return m},t}();function fy(t,e,n){return n===void 0&&(n=t.context),new dy(t,e,n)}var hy=z1,Aa;(function(t){t[t.Effect=1]="Effect",t[t.LayoutEffect=2]="LayoutEffect"})(Aa||(Aa={}));var ri=p.useLayoutEffect;function Rl(t){var e=I.useRef();return e.current||(e.current={v:t()}),e.current.v}var py=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},my=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 gy(t,e){var n,r,i=py([[],[]],2),s=i[0],o=i[1];try{for(var a=my(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},Ll=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 kl(t,e){var n=t.exec,r=n(e.context,e._event.data,{action:t,state:e,_event:e._event});r()}function vy(t){var e=p.useRef([]),n=p.useRef([]);ri(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(gy(a,function(d){return d.exec.__effect===Aa.Effect}),2),l=c[0],u=c[1];(s=e.current).push.apply(s,Ll([],Hr(l.map(function(d){return[d,i]})),!1)),(o=n.current).push.apply(o,Ll([],Hr(u.map(function(d){return[d,i]})),!1))}});return function(){r.unsubscribe()}},[]),ri(function(){for(;n.current.length;){var r=Hr(n.current.shift(),2),i=r[0],s=r[1];kl(i,s)}}),p.useEffect(function(){for(;e.current.length;){var r=Hr(e.current.shift(),2),i=r[0],s=r[1];kl(i,s)}})}var ii=function(){return ii=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},ii.apply(this,arguments)},yy=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 by(t,e,n){if(typeof t=="object")return t;var r=function(){};return{next:t,error:e||r,complete:n||r}}function wy(t,e,n){e===void 0&&(e={});var r=Rl(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=yy(e,["context","guards","actions","activities","services","delays","state"]),f=Rl(function(){var v={context:i,guards:s,actions:o,activities:a,services:c,delays:l},m=r.withConfig(v,function(){return ii(ii({},r.context),i)});return Of(m,ii({deferEvents:!0},d))});return ri(function(){var v;return n&&(v=f.subscribe(by(n))),function(){v==null||v.unsubscribe()}},[n]),ri(function(){return f.start(u?Ye.create(u):void 0),function(){f.stop()}},[]),ri(function(){Object.assign(f.machine.options.actions,o),Object.assign(f.machine.options.guards,s),Object.assign(f.machine.options.activities,a),Object.assign(f.machine.options.services,c),Object.assign(f.machine.options.delays,l)},[o,s,a,c,l]),vy(f),f}var Sy=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 Cy(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=wy(t,e,n),i=Sy(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 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 _y(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 Ey(){const t=p.useState(!1),e=t[1];return p.useCallback(()=>e(r=>!r),[])}function pn(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 xy(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=xy(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 Oy(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 Tf 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 yc;function Ty(t,e){yc={fn:t,transform:e}}let Pf;function Py(t){Pf=t}let Af=t=>typeof window<"u"?window.requestAnimationFrame(t):-1,Qs;function Ay(t){Qs=t}let Rf=()=>Date.now(),Ry=t=>t.current,Lf;function Ly(t){Lf=t}class ky extends Tf{constructor(e,n){super(),this.update=void 0,this.payload=e.style?we({},e,{style:Lf(e.style)}):e,this.update=n,this.attach()}}const My=t=>W.fun(t)&&!(t.prototype instanceof p.Component),Dy=t=>p.forwardRef((n,r)=>{const i=Ey(),s=p.useRef(!0),o=p.useRef(null),a=p.useRef(null),c=p.useCallback(f=>{const v=o.current,m=()=>{let h=!1;a.current&&(h=yc.fn(a.current,o.current.getAnimatedValue())),(!a.current||h===!1)&&i()};o.current=new ky(f,m),v&&v.detach()},[]);p.useEffect(()=>()=>{s.current=!1,o.current&&o.current.detach()},[]),p.useImperativeHandle(r,()=>Ry(a)),c(n);const l=o.current.getValue();l.scrollTop,l.scrollLeft;const u=sr(l,["scrollTop","scrollLeft"]),d=My(t)?void 0:f=>a.current=Oy(f,r);return p.createElement(t,we({},u,{ref:d}))});let si=!1;const An=new Set,kf=()=>{if(!si)return!1;let t=Rf();for(let e of An){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,f=u instanceof dt,v=Array.isArray(i.initialVelocity)?i.initialVelocity[a]:i.initialVelocity;if(f&&(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 _=0;_<m;++_){let y=-i.tension*(d-u),E=-i.friction*v,x=(y+E)/i.mass;v=v+x*1/1e3,d=d+v*1/1e3}let h=i.clamp&&i.tension!==0?l<u?d>u:d<u:!1,S=Math.abs(v)<=i.precision,b=i.tension!==0?Math.abs(u-d)<=i.precision:!0;s=h||S&&b,c.lastVelocity=v,c.lastTime=t}f&&!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||(An.delete(e),e.stop(!0))}return An.size?Af(kf):si=!1,si},jy=t=>{An.has(t)||An.add(t),si||(si=!0,Af(kf))},Ny=t=>{An.has(t)&&An.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=Fy(l,s);return Iy(l,s[u],s[u+1],i[u],i[u+1],c,o,a,r.map)}}function Iy(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 Fy(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 Zn=(t,e,n)=>t&&new Or(t,e,n),By={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 Mf(t,e){"update"in t?e.add(t):t.getChildren().forEach(n=>Mf(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&&Mf(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 Vy 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 Hy=0,Uy=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=Hy++}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),f=a[d.delay]&&a[d.delay].to;a[d.delay]=we({},a[d.delay],d,{to:we({},f,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(),jy(this);return this}stop(e){return this.listeners.forEach(n=>n(e)),this.listeners=[],this}pause(e){return this.stop(!0),e&&Ny(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,f=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((h,S)=>{let b=S[0],_=S[1],y=h[b]||{};const E=W.num(_),x=W.str(_)&&!_.startsWith("#")&&!/\d/.test(_)&&!Pf[_],g=W.arr(_),C=!E&&!g&&!x;let O=W.und(i[b])?_:i[b],A=E||g||x?_:1,R=nr(c,b);m&&(A=m.animations[b].parent);let L=y.parent,T=y.interpolation,D=as(m?A.getPayload():A),N,H=_;C&&(H=Qs({range:[0,1],output:[_,_]})(1));let B=T&&T.getValue();const q=!W.und(L)&&y.animatedValues.some(ne=>!ne.done),ae=!W.equ(H,B),le=!W.equ(H,y.previous),ue=!W.equ(R,y.config);if(d||le&&ae||ue){if(E||x)L=T=y.parent||new La(O);else if(g)L=T=y.parent||new Vy(O);else if(C){let ne=y.interpolation&&y.interpolation.calc(y.parent.value);ne=ne!==void 0&&!d?ne:O,y.parent?(L=y.parent,L.setValue(0,!1)):L=new La(0);const qe={output:[ne,_]};y.interpolation?(T=y.interpolation,y.interpolation.updateConfig(qe)):T=L.interpolate(qe)}return D=as(m?A.getPayload():A),N=as(L.getPayload()),d&&!C&&L.setValue(O,!1),this.hasChanged=!0,N.forEach(ne=>{ne.startPosition=ne.value,ne.lastPosition=ne.value,ne.lastVelocity=q?ne.lastVelocity:void 0,ne.lastTime=q?ne.lastTime:void 0,ne.startTime=Rf(),ne.done=!1,ne.animatedStyles.clear()}),nr(f,b)&&L.setValue(C?A:_,!1),we({},h,{[b]:we({},y,{name:b,parent:L,interpolation:T,animatedValues:N,toValues:D,previous:H,config:R,fromValues:as(L.getValue()),immediate:nr(f,b),initialVelocity:pn(R.velocity,0),clamp:pn(R.clamp,!1),precision:pn(R.precision,.01),tension:pn(R.tension,170),friction:pn(R.friction,26),mass:pn(R.mass,1),duration:R.duration,easing:pn(R.easing,ne=>ne),decay:R.decay})})}else return ae?h:(C&&(L.setValue(1,!1),T.updateConfig({output:[H,H]})),L.done=!0,this.hasChanged=!0,we({},h,{[b]:we({},h[b],{previous:H})}))},this.animations),this.hasChanged){this.configs=Object.values(this.animations),this.values={},this.interpolations={};for(let h in this.animations)this.interpolations[h]=this.animations[h].interpolation,this.values[h]=this.animations[h].interpolation.getValue()}return this}destroy(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0}};const $y=(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,f)=>{const v=new Uy,m=i?nr(e,f,v):e[f];return f===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,f)=>{d.update(i?nr(u,f,d):u[f]),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},zy=t=>{const e=W.fun(t),n=$y(1,e?t:[t]),r=n[0],i=n[1],s=n[2];return e?[r[0],i,s]:r};class qy extends Tf{constructor(e){e===void 0&&(e={}),super(),e.transform&&!(e.transform instanceof dt)&&(e=yc.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 Gy=new RegExp("rgb"+bo(ft,ft,ft)),Wy=new RegExp("rgba"+bo(ft,ft,ft,ft)),Zy=new RegExp("hsl"+bo(ft,Ys,Ys)),Ky=new RegExp("hsla"+bo(ft,Ys,Ys,ft)),Qy=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Jy=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Xy=/^#([0-9a-fA-F]{6})$/,Yy=/^#([0-9a-fA-F]{8})$/;function e2(t){let e;return typeof t=="number"?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=Xy.exec(t))?parseInt(e[1]+"ff",16)>>>0:Xs.hasOwnProperty(t)?Xs[t]:(e=Gy.exec(t))?(Kn(e[1])<<24|Kn(e[2])<<16|Kn(e[3])<<8|255)>>>0:(e=Wy.exec(t))?(Kn(e[1])<<24|Kn(e[2])<<16|Kn(e[3])<<8|jl(e[4]))>>>0:(e=Qy.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=Yy.exec(t))?parseInt(e[1],16)>>>0:(e=Jy.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=Zy.exec(t))?(Ml(Dl(e[1]),cs(e[2]),cs(e[3]))|255)>>>0:(e=Ky.exec(t))?(Ml(Dl(e[1]),cs(e[2]),cs(e[3]))|jl(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 Ml(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 Kn(t){const e=parseInt(t,10);return e<0?0:e>255?255:e}function Dl(t){return(parseFloat(t)%360+360)%360/360}function jl(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 Nl(t){let e=e2(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,t2=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,n2=new RegExp(`(${Object.keys(Xs).join("|")})`,"g"),r2=t=>{const e=t.output.map(i=>i.replace(t2,Nl)).map(i=>i.replace(n2,Nl)),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 oi={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 i2=(t,e)=>t+e.charAt(0).toUpperCase()+e.substring(1),s2=["Webkit","Ms","Moz","O"];oi=Object.keys(oi).reduce((t,e)=>(s2.forEach(n=>t[i2(n,e)]=t[e]),t),oi);function o2(t,e,n){return e==null||typeof e=="boolean"||e===""?"":!n&&typeof e=="number"&&e!==0&&!(oi.hasOwnProperty(t)&&oi[t])?e+"px":(""+e).trim()}const Il={};Ly(t=>new qy(t));Ay(r2);Py(Xs);Ty((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=o2(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:Il[u]||(Il[u]=u.replace(/([A-Z])/g,f=>"-"+f.toLowerCase()));typeof t.getAttribute(d)<"u"&&t.setAttribute(d,c[u])}return}else return!1},t=>t);const a2=["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"],c2=_y(Dy,!1),l2=c2(a2);function Fl(t,e){return t.map(function(n,r){return n+e[r]})}function Df(t,e){return t.map(function(n,r){return n-e[r]})}function ka(t){return Math.hypot.apply(Math,t)}function u2(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 d2(t,e,n){return Math.max(e,Math.min(t,n))}function f2(t,e){return Math.pow(t,e*5)}function Bl(t,e,n){return e===0||Math.abs(e)===1/0?f2(t,n):t*e*n/(e+n*t)}function ai(t,e,n,r){return r===void 0&&(r=.15),r===0?d2(t,e,n):t<e?-Bl(e-t,n-e,r)+e:t>n?+Bl(t-n,n-e,r)+n:t}function Vl(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 h2(t,e,n){return e&&Vl(t.prototype,e),n&&Vl(t,n),t}function Ve(){return Ve=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},Ve.apply(this,arguments)}function jf(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function p2(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 m2(t,e){if(t){if(typeof t=="string")return Hl(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 Hl(t,e)}}function Hl(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=m2(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 Nf(){}function If(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.length===0?Nf: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 en(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 bc(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]=bc(t[o],a);break;case"boolean":a&&(n[o]=t[o]);break}}return n}var g2=180,v2=.15,y2=.5,b2=60,w2={threshold:function(e){return e===void 0&&(e=0),en(e)},rubberband:function(e){switch(e===void 0&&(e=0),e){case!0:return en(v2);case!1:return en(0);default:return en(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:en(e)}},Ff=Ve({},w2,{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 Ff.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]]}}),S2=typeof window<"u"&&window.document&&window.document.createElement,C2={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=S2?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}}},_2=Ve({},Ff,{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=en(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=y2),en(e)},swipeDistance:function(e){return e===void 0&&(e=b2),en(e)},delay:function(e){switch(e===void 0&&(e=0),e){case!0:return g2;case!1:return 0;default:return e}}});function E2(t){return t===void 0&&(t={}),bc(t,C2)}function x2(t){return t===void 0&&(t={}),bc(t,_2)}function O2(t){var e=t.domTarget,n=t.eventOptions,r=t.window,i=t.enabled,s=p2(t,["domTarget","eventOptions","window","enabled"]),o=E2({domTarget:e,eventOptions:n,window:r,enabled:i});return o.drag=x2(s),o}function Ur(t){return Ve({_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:Nf,canceled:!1,memo:void 0,args:void 0},t)}function Bf(){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 vn=new Map,T2=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=Ve({},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,f=l._active,v=l._intentional,m=l.lastOffset,h=l.movement,S=this.getInternalMovement(r,this.state),b=v[0]===!1?Ul(S[0],c[0]):v[0],_=v[1]===!1?Ul(S[1],c[1]):v[1],y=this.checkIntentionality([b,_],S);if(y._blocked)return Ve({},y,{_movement:S,delta:[0,0]});var E=y._intentional,x=S,g,C;if(E[0]!==!1&&v[0]===!1&&(C=ds(s,this.state),g=ds(o,this.state),d[0]=C[0],u[0]=g[0]),E[1]!==!1&&v[1]===!1){var O,A;C=(O=C)!=null?O:ds(s,this.state),g=(A=g)!=null?A:ds(o,this.state),d[1]=C[1],u[1]=g[1]}var R=[E[0]!==!1?S[0]-E[0]:d[0],E[1]!==!1?S[1]-E[1]:d[1]],L=Fl(R,m),T=f?a:[0,0];return R=$l(u,Fl(R,d),T),Ve({},y,{intentional:E[0]!==!1||E[1]!==!1,_initial:d,_movement:x,movement:R,values:r,offset:$l(u,L,T),delta:Df(R,h)})},e.clean=function(){this.clearTimeout()},h2(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 Ul(t,e){return Math.abs(t)>=e?Ma(t)*e:!1}function $l(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],f=u[1];return[ai(r,c,l,s),ai(i,d,f,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 P2(t,e,n){var r=t.state.offset,i=n.timeStamp;return Ve({},Bf()[t.stateKey],{_active:!0,values:e,initial:e,offset:r,lastOffset:r,startTime:i})}function A2(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,Ve({},e,{event:n})].concat(i))}}var R2=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 f=d[u],v=f[0],m=f[1];Da(r,v,A2(m,Ve({},n.state.shared,{args:s})))}return n.config.domTarget?D2(n,r):j2(n,r)},this.effect=function(){return n.config.domTarget&&n.bind(),n.clean},this.clean=function(){var r=Hf(n.config),i=n.config.eventOptions;r&&Ii(r,Vf(n.domListeners),i),Object.values(n.timeouts).forEach(clearTimeout),L2(n)},this.state=Bf(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function L2(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];Ii(n,o,r)}t.windowListeners={}}}function k2(t,e){var n=t.config,r=t.windowListeners;n.window&&(Ii(n.window,r[e],n.eventOptions),delete r[e])}function M2(t,e,n){var r=t.config,i=t.windowListeners;n===void 0&&(n=[]),r.window&&(Ii(r.window,i[e],r.eventOptions),Uf(r.window,i[e]=n,r.eventOptions))}function D2(t,e){var n=t.config,r=t.domListeners,i=Hf(n);if(!i)throw new Error("domTarget must be defined");var s=n.eventOptions;Ii(i,Vf(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,If.apply(void 0,u)])}Uf(i,r,s)}function j2(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]=If.apply(void 0,u)}return r}function Vf(t){return t===void 0&&(t=[]),t.splice(0,t.length)}function Hf(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 Uf(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 Ii(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 N2(t,e,n){n===void 0&&(n={});var r=F2(t),i=p.useMemo(function(){return new R2(r)},[]);return i.config=e,i.handlers=t,i.nativeRefs=n,p.useEffect(i.effect,[]),i.config.domTarget?I2:i.bind}function I2(){}function F2(t){var e=new Set;return t.drag&&e.add(vn.get("drag")),t.wheel&&e.add(vn.get("wheel")),t.scroll&&e.add(vn.get("scroll")),t.move&&e.add(vn.get("move")),t.pinch&&e.add(vn.get("pinch")),t.hover&&e.add(vn.get("hover")),e}var B2=function(t){jf(e,t);function e(){return t.apply(this,arguments)||this}var n=e.prototype;return n.getInternalMovement=function(i,s){return Df(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,u2(o.movement,o.delta,a))}return o},n.mapStateValues=function(i){return{xy:i.values,vxvy:i.velocities}},e}(T2);function $f(t){if("touches"in t){var e=t.targetTouches,n=t.changedTouches;return e.length>0?e:n}return null}function zl(t){var e="buttons"in t?t.buttons:0,n=$f(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=$f(t),n=e?e[0]:t,r=n.clientX,i=n.clientY;return[r,i]}var V2=3,H2=220,U2=function(t){jf(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||(M2(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=zl(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>=V2&&(l=!1),r.updateGestureState(Ve({},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],f=r.state._intentional,v=f[0],m=f[1],h=r.config.swipeVelocity,S=h[0],b=h[1],_=r.config.swipeDistance,y=_[0],E=_[1],x=Ve({},$o(us(r),i),r.getMovement(r.state.values)),g=[0,0];x.elapsedTime<H2&&(v!==!1&&Math.abs(a)>S&&Math.abs(u)>y&&(g[0]=Ma(a)),m!==!1&&Math.abs(c)>b&&Math.abs(d)>E&&(g[1]=Ma(c))),r.updateGestureState(Ve({},x,{tap:s,swipe:g})),r.fireGestureHandler(s===!0)}},r.clean=function(){t.prototype.clean.call(us(r)),r.state._delayedEvent=!1,k2(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(zl(i)),this.updateGestureState(Ve({},P2(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}(B2);function $2(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 z2(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 q2(t,e){e===void 0&&(e={}),vn.set("drag",U2);var n=p.useRef();return n.current||(n.current=$2(O2,z2)),N2({drag:t},n.current(e))}/*!
40
+ ***************************************************************************** */var j=function(){return j=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},j.apply(this,arguments)};function fc(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 X(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 te(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 ce;(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"})(ce||(ce={}));var Er;(function(t){t.Parent="#_parent",t.Internal="#_internal"})(Er||(Er={}));var Sa=ce.Start,hc=ce.Stop,Ni=ce.Raise,vo=ce.Send,df=ce.Cancel,b1=ce.NullEvent,pc=ce.Assign;ce.After;ce.DoneState;var ff=ce.Log,w1=ce.Init,Ca=ce.Invoke;ce.ErrorExecution;var _l=ce.ErrorPlatform,S1=ce.ErrorCustom,hf=ce.Update,C1=ce.Choose,_1=ce.Pure,pf=".",El={},_a="xstate.guard",E1="",ns;function mc(t,e,n){n===void 0&&(n=pf);var r=ni(t,n),i=ni(e,n);return oe(i)?oe(r)?i===r:!1:oe(r)?r in i:Object.keys(r).every(function(s){return s in i?mc(r[s],i[s]):!1})}function mf(t){try{return oe(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 x1(t){return typeof t=="object"&&"value"in t&&"context"in t&&"event"in t&&"_event"in t}function ni(t,e){if(x1(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 Kr(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 xl(t,e,n){var r,i,s={};try{for(var o=X(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 O1=function(t){return function(e){var n,r,i=e;try{for(var s=X(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 T1(t,e){return function(n){var r,i,s=n;try{for(var o=X(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(oe(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([],te(t),!1))}function gf(t){return Rr(t)?t:[t]}function ct(t){return t===void 0?[]:gf(t)}function Ws(t,e,n){var r,i;if(re(t))return t(e,n.data);var s={};try{for(var o=X(Object.keys(t)),a=o.next();!a.done;a=o.next()){var c=a.value,l=t[c];re(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 P1(t){return/^(done|error)\./.test(t)}function Ol(t){return!!(t instanceof Promise||t!==null&&(re(t)||typeof t=="object")&&re(t.then))}function A1(t){return t!==null&&typeof t=="object"&&"transition"in t&&typeof t.transition=="function"}function R1(t,e){var n,r,i=te([[],[]],2),s=i[0],o=i[1];try{for(var a=X(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 vf(t,e){return Kr(t.states,function(n,r){if(n){var i=(oe(e)?void 0:e[r])||(n?n.current:void 0);if(i)return{current:i,states:vf(n,i)}}})}function L1(t,e){return{current:e,states:vf(t,e)}}function Tl(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(re(l))d=l(s,e.data,u);else try{for(var h=X(Object.keys(l)),v=h.next();!v.done;v=h.next()){var m=v.value,f=l[m];d[m]=re(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 k1=function(){};function Rr(t){return Array.isArray(t)}function re(t){return typeof t=="function"}function oe(t){return typeof t=="string"}function yf(t,e){if(t)return oe(t)?{type:_a,name:t,predicate:e?e[t]:void 0}:re(t)?{type:_a,name:t.name,predicate:t}:t}function M1(t){try{return"subscribe"in t&&re(t.subscribe)}catch{return!1}}var Xt=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();ns={},ns[Xt]=function(){return this},ns[Symbol.observable]=function(){return this};function xr(t){return!!t&&"__xstatenode"in t}function D1(t){return!!t&&typeof t.send=="function"}function yo(t,e){return oe(t)||typeof t=="number"?j({type:t},e):t}function Pe(t,e){if(!oe(t)&&"$$type"in t&&t.$$type==="scxml")return t;var n=yo(t);return j({name:n.type,data:n,$$type:"scxml",type:"external"},e)}function qn(t,e){var n=gf(e).map(function(r){return typeof r>"u"||typeof r=="string"||xr(r)?{target:r,event:t}:j(j({},r),{event:t})});return n}function j1(t){if(!(t===void 0||t===E1))return ct(t)}function bf(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 wf(t){return typeof t=="string"?{type:t}:t}function js(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===Ni||t.type===vo&&t.to===Er.Internal)&&typeof t.delay!="number"}var ir=Pe({type:w1});function Oa(t,e){return e&&e[t]||void 0}function mi(t,e){var n;if(oe(t)||typeof t=="number"){var r=Oa(t,e);re(r)?n={type:t,exec:r}:r?n=r:n={type:t,exec:void 0}}else if(re(t))n={type:t.name||t.toString(),exec:t};else{var r=Oa(t.type,e);if(re(r))n=j(j({},t),{exec:r});else if(r){var i=r.type||t.type;n=j(j(j({},r),t),{type:i})}else n=t}return n}var Yt=function(t,e){if(!t)return[];var n=Rr(t)?t:[t];return n.map(function(r){return mi(r,e)})};function gc(t){var e=mi(t);return j(j({id:oe(t)?t:e.id},e),{type:e.type})}function N1(t,e){return{type:Ni,event:typeof t=="function"?t:yo(t),delay:e?e.delay:void 0,id:e==null?void 0:e.id}}function I1(t,e,n,r){var i={_event:n},s=Pe(re(t.event)?t.event(e,n.data,i):t.event),o;if(oe(t.delay)){var a=r&&r[t.delay];o=re(a)?a(e,n.data,i):a}else o=re(t.delay)?t.delay(e,n.data,i):t.delay;return j(j({},t),{type:Ni,_event:s,delay:o})}function F1(t,e){return{to:e?e.to:void 0,type:vo,event:re(t)?t:yo(t),delay:e?e.delay:void 0,id:e&&e.id!==void 0?e.id:re(t)?t.name:mf(t)}}function B1(t,e,n,r){var i={_event:n},s=Pe(re(t.event)?t.event(e,n.data,i):t.event),o;if(oe(t.delay)){var a=r&&r[t.delay];o=re(a)?a(e,n.data,i):a}else o=re(t.delay)?t.delay(e,n.data,i):t.delay;var c=re(t.to)?t.to(e,n.data,i):t.to;return j(j({},t),{to:c,_event:s,event:s.data,delay:o})}var V1=function(t,e,n){return j(j({},t),{value:oe(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})},H1=function(t){return{type:df,sendId:t}};function U1(t){var e=gc(t);return{type:ce.Start,activity:e,exec:void 0}}function $1(t){var e=re(t)?t:gc(t);return{type:ce.Stop,activity:e,exec:void 0}}function z1(t,e,n){var r=re(t.activity)?t.activity(e,n.data):t.activity,i=typeof r=="string"?{id:r}:r,s={type:ce.Stop,activity:i};return s}var q1=function(t){return{type:pc,assignment:t}};function G1(t,e){var n=e?"#".concat(e):"";return"".concat(ce.After,"(").concat(t,")").concat(n)}function is(t,e){var n="".concat(ce.DoneState,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function Ns(t,e){var n="".concat(ce.DoneInvoke,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function Qr(t,e){var n="".concat(ce.ErrorPlatform,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}var W1=function(t){var e,n,r=[];try{for(var i=X(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===pc){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?[]:W1(i),c=a.length?Tl(n,r,a,e):n,l=o?[n]:void 0,u=[];function d(m,f){var w;switch(f.type){case Ni:{var y=I1(f,c,r,t.options.delays);return s&&typeof y.delay=="number"&&s(y,c,r),y}case vo:var C=B1(f,c,r,t.options.delays);return s&&C.to!==Er.Internal&&(m==="entry"?u.push(C):s(C,c,r)),C;case ff:{var b=V1(f,c,r);return s==null||s(b,c,r),b}case C1:{var E=f,x=(w=E.conds.find(function(B){var $=yf(B.cond,t.options.guards);return!$||bf(t,$,c,r,s?void 0:e)}))===null||w===void 0?void 0:w.actions;if(!x)return[];var g=te(Zs(t,e,c,r,[{type:m,actions:Yt(ct(x),t.options.actions)}],s,o),2),_=g[0],O=g[1];return c=O,l==null||l.push(c),_}case _1:{var x=f.get(c,r.data);if(!x)return[];var A=te(Zs(t,e,c,r,[{type:m,actions:Yt(ct(x),t.options.actions)}],s,o),2),R=A[0],L=A[1];return c=L,l==null||l.push(c),R}case hc:{var b=z1(f,c,r);return s==null||s(b,n,r),b}case pc:{c=Tl(c,r,[f],s?void 0:e),l==null||l.push(c);break}default:var T=mi(f,t.options.actions),D=T.exec;if(s)s(T,c,r);else if(D&&l){var N=l.length-1,H=j(j({},T),{exec:function(B){for(var $=[],q=1;q<arguments.length;q++)$[q-1]=arguments[q];D.apply(void 0,he([l[N]],te($),!1))}});T=H}return T}}function h(m){var f,w,y=[];try{for(var C=X(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 Yn=function(t,e){var n=e(t);return n};function Sf(t){var e;return e={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:t}}},e[Xt]=function(){return this},e}function Z1(t,e,n,r){var i,s=wf(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?Cf(o,t.id,a):Sf(t.id);return c.meta=t,c}function Cf(t,e,n){var r=Sf(e);if(r.deferred=!0,xr(t)){var i=r.state=Yn(void 0,function(){return(n?t.withContext(n):t).initialState});r.getSnapshot=function(){return i}}return r}function K1(t){try{return typeof t.send=="function"}catch{return!1}}function Q1(t){return K1(t)&&"id"in t}function J1(t){var e;return j((e={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},e[Xt]=function(){return this},e),t)}var Ks=function(t){return t.type==="atomic"||t.type==="final"};function _f(t){return Object.keys(t.states).map(function(e){return t.states[e]})}function gi(t){return _f(t).filter(function(e){return e.type!=="history"})}function Ef(t){var e=[t];return Ks(t)?e:e.concat(ye(gi(t).map(Ef)))}function Jr(t,e){var n,r,i,s,o,a,c,l,u=new Set(t),d=Ta(u),h=new Set(e);try{for(var v=X(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(A){n={error:A}}finally{try{m&&!m.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}var y=Ta(h);try{for(var C=X(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,X(gi(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(A){i={error:A}}finally{try{b&&!b.done&&(s=C.return)&&s.call(C)}finally{if(i)throw i.error}}try{for(var _=X(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(A){c={error:A}}finally{try{O&&!O.done&&(l=_.return)&&l.call(_)}finally{if(c)throw c.error}}return h}function xf(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]=xf(s,e)}),i}function Ta(t){var e,n,r=new Map;try{for(var i=X(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 X1(t,e){var n=Jr([t],e);return xf(t,Ta(n))}function Xr(t,e){return Array.isArray(t)?t.some(function(n){return n===e}):t instanceof Set?t.has(e):!1}function Y1(t){return he([],te(new Set(ye(he([],te(t.map(function(e){return e.ownEvents})),!1)))),!1)}function Is(t,e){return e.type==="compound"?gi(e).some(function(n){return n.type==="final"&&Xr(t,n)}):e.type==="parallel"?gi(e).every(function(n){return Is(t,n)}):!1}function ey(t){return t===void 0&&(t=[]),t.reduce(function(e,n){return n.meta!==void 0&&(e[n.id]=n.meta),e},{})}function Pl(t){return new Set(ye(t.map(function(e){return e.tags})))}function Of(t,e){if(t===e)return!0;if(t===void 0||e===void 0)return!1;if(oe(t)||oe(e))return t===e;var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(i){return Of(t[i],e[i])})}function ty(t){return typeof t!="object"||t===null?!1:"value"in t&&"_event"in t}function ny(t,e){var n=t.exec,r=j(j({},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=El,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||El,this.meta=ey(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 Y1(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="."),oe(e))return[e];var i=Object.keys(e);return i.concat.apply(i,he([],te(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=fc(e,["configuration","transitions","tags","machine"]);return j(j({},r),{tags:Array.from(n)})},t.prototype.matches=function(e){return mc(e,this.value)},t.prototype.hasTag=function(e){return this.tags.has(e)},t.prototype.can=function(e){var n;k1(!!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}(),ry={deferEvents:!1},Al=function(){function t(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=j(j({},ry),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,iy=0,Vr={bookId:function(){return"x:".concat(iy++)},register:function(t,e){return Bo.set(t,e),t},get:function(t){return Bo.get(t)},free:function(t){Bo.delete(t)}};function vc(){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 sy(){var t=vc();if(t&&"__xstate__"in t)return t.__xstate__}function oy(t){if(vc()){var e=sy();e&&e.register(t)}}function ay(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=J1({id:e.id,send:function(l){i.push(l),o()},getSnapshot:function(){return n},subscribe:function(l,u,d){var h=js(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 cy={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 ly=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=Pe(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===Er.Parent||r.parent.id===d),m=v?r.parent:oe(d)?d===Er.Internal?r:r.children.get(d)||Vr.get(d):D1(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=j(j({},u),{name:u.name===S1?"".concat(Qr(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=re(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 Ni:{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 df: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===ce.Invoke){var b=wf(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 A=re(E)?E(d,h.data,{data:O,src:b,meta:C.meta}):E;if(!A)return;var R=void 0;xr(A)&&(A=O?A.withContext(O):A,R={autoForward:_}),r.spawn(A,x,R)}else r.spawnActivity(C);break}case hc:{r.stopChild(u.activity.id);break}case ff:var L=u,T=L.label,D=L.value;T?r.logger(T,D):r.logger(D);break}};var i=j(j({},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 Al({deferEvents:this.options.deferEvents}),this.sessionId=Vr.bookId()}return Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:Yn(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=X(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(A){d.state.children[A.id]=A}),this.devTools&&this.devTools.send(n.data,e),e.event)try{for(var v=X(this.eventListeners),m=v.next();!m.done;m=v.next()){var f=m.value;f(e.event)}}catch(A){r={error:A}}finally{try{m&&!m.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}try{for(var w=X(this.listeners),y=w.next();!y.done;y=w.next()){var f=y.value;f(e,e.event)}}catch(A){s={error:A}}finally{try{y&&!y.done&&(o=w.return)&&o.call(w)}finally{if(s)throw s.error}}try{for(var C=X(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(A){a={error:A}}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(A){return A.type==="final"&&A.parent===d.machine}),g=x&&x.doneData?Ws(x.doneData,e.context,n):void 0;this._doneEvent=Ns(this.id,g);try{for(var _=X(this.doneListeners),O=_.next();!O.done;O=_.next()){var f=O.value;f(this._doneEvent)}}catch(A){l={error:A}}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===xe.Running&&e(this.state,this.state.event),this},t.prototype.subscribe=function(e,n,r){var i=this,s=js(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(),Vr.register(this.sessionId,this),this.initialized=!0,this.status=xe.Running;var r=e===void 0?this.initialState:Yn(this,function(){return ty(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,ir)}),this},t.prototype._stopChildren=function(){this.children.forEach(function(e){re(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=X(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=X(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=X(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=X(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=X(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 Al({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=Pe({type:"xstate.stop"}),s=Yn(e,function(){var o=ye(he([],te(e.state.configuration),!1).sort(function(d,h){return h.order-d.order}).map(function(d){return Yt(d.onExit,e.machine.options.actions)})),a=te(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(),Vr.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=Pe(v);n.forward(m),o=Yn(n,function(){return n.machine.transition(o,m,void 0,r||void 0)}),c.push.apply(c,he([],te(n.machine.config.predictableActionArguments?o.actions:o.actions.map(function(f){return ny(f,o)})),!1)),a=a||!!o.changed};try{for(var u=X(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,Pe(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=Pe(e);if(i.name.indexOf(_l)===0&&!this.state.nextEvents.some(function(o){return o.indexOf(_l)===0}))throw i.data.data;var s=Yn(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=X(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),re(n.stop)&&n.stop())},t.prototype.spawn=function(e,n,r){if(this.status!==xe.Running)return Cf(e,n);if(Ol(e))return this.spawnPromise(Promise.resolve(e),n);if(re(e))return this.spawnCallback(e,n);if(Q1(e))return this.spawnActor(e,n);if(M1(e))return this.spawnObservable(e,n);if(xr(e))return this.spawnMachine(e,j(j({},r),{id:n}));if(A1(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,j(j({},this.options),{parent:this,id:n.id||e.id})),s=j(j({},cy),n);s.sync&&i.onTransition(function(a){r.send(hf,{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(Pe(a,{origin:i.id}))}).start(),o},t.prototype.spawnBehavior=function(e,n){var r=ay(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(Pe(Ns(n,c),{origin:n})))},function(c){if(!s){i.removeChild(n);var l=Qr(n,c);try{i.send(Pe(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=js(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[Xt]=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(Pe(h,{origin:n}))},u;try{u=e(l,function(h){o.add(h)})}catch(h){this.send(Qr(n,h))}if(Ol(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=js(h);return a.add(v.next),{unsubscribe:function(){a.delete(v.next)}}},stop:function(){s=!0,re(u)&&u()},toJSON:function(){return{id:n}},getSnapshot:function(){return c}},r[Xt]=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(Pe(c,{origin:n}))},function(c){i.removeChild(n),i.send(Pe(Qr(n,c),{origin:n}))},function(){i.removeChild(n),i.send(Pe(Ns(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[Xt]=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[Xt]=function(){return this},r))},t.prototype.attachDev=function(){var e=vc();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(j(j({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:j({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}oy(this)}},t.prototype.toJSON=function(){return{id:this.id}},t.prototype[Xt]=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=Tf,t}();function Tf(t,e){var n=new ly(t,e);return n}function uy(t){if(typeof t=="string"){var e={type:t};return e.toString=function(){return t},e}return t}function ss(t){return j(j({type:Ca},t),{toJSON:function(){t.onDone,t.onError;var e=fc(t,["onDone","onError"]);return j(j({},e),{type:Ca,src:uy(t.src)})}})}var os="",Pa="#",Vo="*",Gn={},Wn=function(t){return t[0]===Pa},dy=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},fy=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(dy(),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:pf),this.id=this.config.id||he([this.machine.key],te(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?Kr(this.config.states,function(l,u){var d,h=new t(l,{},void 0,{parent:s,key:u});return Object.assign(s.idMap,j((d={},d[h.id]=h,d),h.idMap)),h}):Gn;var a=0;function c(l){var u,d;l.order=a++;try{for(var h=X(_f(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 mi(l)}),this.onExit=ct(this.config.exit||this.config.onExit).map(function(l){return mi(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=j((d={},d[v]=l,d),s.machine.options.services),ss({src:v,id:v})}else if(oe(l.src)){var v=l.id||rs(s.id,u);return ss(j(j({},l),{id:v,src:l.src}))}else if(xr(l.src)||re(l.src)){var v=l.id||rs(s.id,u);return s.machine.options.services=j((h={},h[v]=l.src,h),s.machine.options.services),ss(j(j({id:v},l),{src:v}))}else{var m=l.src;return ss(j(j({id:rs(s.id,u)},l),{src:m}))}}),this.activities=ct(this.config.activities).concat(this.invoke).map(function(l){return gc(l)}),this.transition=this.transition.bind(this),this.tags=ct(this.config.tags)}return t.prototype._init=function(){this.__cache.transitions||Ef(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:j(j({},i),e.actions),activities:j(j({},s),e.activities),guards:j(j({},o),e.guards),services:j(j({},a),e.services),delays:j(j({},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 re(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:Kr(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=re(s)?"".concat(e.id,":delay[").concat(o,"]"):s,c=G1(a,e.id);return e.onEntry.push(F1(c,{delay:s})),e.onExit.push(H1(c)),c},i=Rr(n)?n.map(function(s,o){var a=r(s.delay,o);return j(j({},s),{event:a})}):ye(Object.keys(n).map(function(s,o){var a=n[s],c=oe(a)?{target:a}:a,l=isNaN(+s)?s:+s,u=r(l,o);return ct(c).map(function(d){return j(j({},d),{event:u,delay:l})})}));return i.map(function(s){var o=s.delay;return j(j({},e.formatTransition(s)),{delay:o})})},t.prototype.getStateNodes=function(e){var n,r=this;if(!e)return[];var i=e instanceof Ye?e.value:ni(e,this.delimiter);if(oe(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([],te(ye(o.map(function(c){return r.getStateNode(c).getStateNodes(i[c])}))),!1)),a},t.prototype.handles=function(e){var n=mf(e);return this.events.includes(n)},t.prototype.resolveState=function(e){var n=e instanceof Ye?e:Ye.create(e),r=Array.from(Jr([],this.getStateNodes(n.value)));return new Ye(j(j({},n),{value:this.resolve(n.value),configuration:r,done:Is(r,this),tags:Pl(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=X(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 oe(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,Pe(n))},t.prototype.next=function(e,n){var r,i,s=this,o=n.name,a=[],c=[],l;try{for(var u=X(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?oe(m)&&Wn(m)?e.matches(ni(this.getStateNodeById(m).path,this.delimiter)):mc(ni(m,this.delimiter),O1(this.path.slice(0,-2))(e.value)):!0,y=!1;try{y=!v||bf(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([],te(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?Jr([],this.getStateNodes(o.value)):[],m=new Set;try{for(var f=X(Array.from(e).sort(function(L,T){return L.order-T.order})),w=f.next();!w.done;w=f.next()){var y=w.value;(!Xr(v,y)||Xr(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=X(v),b=C.next();!b.done;b=C.next()){var y=b.value;(!Xr(e,y)||Xr(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,T){return T.order-L.order});var E=Array.from(m).sort(function(L,T){return L.order-T.order}),x=new Set(r.exitSet),g=ye(E.map(function(L){var T=[];if(L.type!=="final")return T;var D=L.parent;if(!D.parent)return T;T.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"&&gi(N).every(function(H){return Is(r.configuration,H)})&&T.push(is(N.id)),T})),_=E.map(function(L){var T=L.onEntry,D=L.activities.map(function(N){return U1(N)});return{type:"entry",actions:Yt(a?he(he([],te(T),!1),te(D),!1):he(he([],te(D),!1),te(T),!1),h.machine.options.actions)}}).concat({type:"state_done",actions:g.map(function(L){return N1(L)})}),O=Array.from(x).map(function(L){return{type:"exit",actions:Yt(he(he([],te(L.onExit),!1),te(L.activities.map(function(T){return $1(T)})),!1),h.machine.options.actions)}}),A=O.concat({type:"transition",actions:Yt(r.actions,this.machine.options.actions)}).concat(_);if(n){var R=Yt(ye(he([],te(e),!1).sort(function(L,T){return T.order-L.order}).map(function(L){return L.onExit})),this.machine.options.actions).filter(function(L){return!xa(L)});return A.concat({type:"stop",actions:R})}return A},t.prototype.transition=function(e,n,r,i){e===void 0&&(e=this.initialState);var s=Pe(n),o;if(e instanceof Ye)o=r===void 0?e:this.resolveState(Ye.from(e,r));else{var a=oe(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)&&!P1(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=Jr([],this.getStateNodes(o.value)),d=l.configuration.length?Jr(u,l.configuration):u;return l.configuration=he([],te(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([],te(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?X1(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?j({},n.activities):{};try{for(var b=X(y),E=b.next();!E.done;E=b.next()){var x=E.value;try{for(var g=(c=void 0,X(x.actions)),_=g.next();!_.done;_=g.next()){var O=_.value;O.type===Sa?C[O.activity.id||O.activity.type]=O:O.type===hc&&(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 A=te(Zs(this,n,r,s,y,i,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),R=A[0],L=A[1],T=te(R1(R,xa),2),D=T[0],N=T[1],H=R.filter(function(Ee){var me;return Ee.type===Sa&&((me=Ee.activity)===null||me===void 0?void 0:me.type)===Ca}),B=H.reduce(function(Ee,me){return Ee[me.activity.id]=Z1(me.activity,u.machine,L,s),Ee},n?j({},n.children):{}),$=new Ye({value:f||n.value,context:L,_event:s,_sessionid:n?n._sessionid:null,historyValue:f?w?L1(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:B,done:m,tags:Pl(v),machine:this}),q=r!==L;$.changed=s.name===hf||q;var ae=$.history;ae&&delete ae.history;var le=!m&&(this._transient||d.some(function(Ee){return Ee._transient}));if(!h&&(!le||s.name===os))return $;var ue=$;if(!m)for(le&&(ue=this.resolveRaisedTransition(ue,{type:b1},s,i));D.length;){var ne=D.shift();ue=this.resolveRaisedTransition(ue,ne._event,s,i)}var qe=ue.changed||(ae?!!ue.actions.length||q||typeof ae.value!=typeof ue.value||!Of(ue.value,ae.value):void 0);return ue.changed=qe,ue.history=ae,ue},t.prototype.getStateNode=function(e){if(Wn(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=Wn(e)?e.slice(Pa.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"&&Wn(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||Gn;switch(this.type){case"parallel":return Kr(this.initialStateValue,function(s,o){return s?r.getStateNode(o).resolve(e[o]||s):Gn});case"compound":if(oe(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?Kr(e,function(s,o){return s?r.getStateNode(o).resolve(s):Gn}):this.initialStateValue||{};default:return e||Gn}},t.prototype.getResolvedPath=function(e){if(Wn(e)){var n=this.machine.idMap[e.slice(Pa.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=xl(this.states,function(r){return r.initialStateValue||Gn},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;oe(n.target)?e=Wn(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=te(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:xl(this.states,function(n,r){if(!e)return n.historyValue();var i=oe(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=T1(r.path,"states")(e).current;return oe(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=X(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,X(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(!oe(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=j1(e.target),i="internal"in e?e.internal:r?r.some(function(c){return oe(c)&&c[0]===n.delimiter}):!0,s=this.machine.options.guards,o=this.resolveTarget(r),a=j(j({},e),{actions:Yt(ct(e.actions)),cond:yf(e.cond,s),target:o,source:this,internal:i,eventType:e.event,toJSON:function(){return j(j({},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=fc(s,[typeof o=="symbol"?o:o+""]);i=ye(Object.keys(l).map(function(C){var b=qn(C,l[C]);return b}).concat(qn(Vo,c)))}var u=this.config.always?qn("",this.config.always):[],d=this.config.onDone?qn(String(is(this.id)),this.config.onDone):[],h=ye(this.invoke.map(function(C){var b=[];return C.onDone&&b.push.apply(b,he([],te(qn(String(Ns(C.id)),C.onDone)),!1)),C.onError&&b.push.apply(b,he([],te(qn(String(Qr(C.id)),C.onError)),!1)),b})),v=this.after,m=ye(he(he(he(he([],te(d),!1),te(h),!1),te(i),!1),te(u),!1).map(function(C){return ct(C).map(function(b){return r.formatTransition(b)})}));try{for(var f=X(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 hy(t,e,n){return n===void 0&&(n=t.context),new fy(t,e,n)}var py=q1,Aa;(function(t){t[t.Effect=1]="Effect",t[t.LayoutEffect=2]="LayoutEffect"})(Aa||(Aa={}));var ri=p.useLayoutEffect;function Rl(t){var e=I.useRef();return e.current||(e.current={v:t()}),e.current.v}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},gy=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 vy(t,e){var n,r,i=my([[],[]],2),s=i[0],o=i[1];try{for(var a=gy(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},Ll=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 kl(t,e){var n=t.exec,r=n(e.context,e._event.data,{action:t,state:e,_event:e._event});r()}function yy(t){var e=p.useRef([]),n=p.useRef([]);ri(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(vy(a,function(d){return d.exec.__effect===Aa.Effect}),2),l=c[0],u=c[1];(s=e.current).push.apply(s,Ll([],Hr(l.map(function(d){return[d,i]})),!1)),(o=n.current).push.apply(o,Ll([],Hr(u.map(function(d){return[d,i]})),!1))}});return function(){r.unsubscribe()}},[]),ri(function(){for(;n.current.length;){var r=Hr(n.current.shift(),2),i=r[0],s=r[1];kl(i,s)}}),p.useEffect(function(){for(;e.current.length;){var r=Hr(e.current.shift(),2),i=r[0],s=r[1];kl(i,s)}})}var ii=function(){return ii=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},ii.apply(this,arguments)},by=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 wy(t,e,n){if(typeof t=="object")return t;var r=function(){};return{next:t,error:e||r,complete:n||r}}function Sy(t,e,n){e===void 0&&(e={});var r=Rl(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=by(e,["context","guards","actions","activities","services","delays","state"]),h=Rl(function(){var v={context:i,guards:s,actions:o,activities:a,services:c,delays:l},m=r.withConfig(v,function(){return ii(ii({},r.context),i)});return Tf(m,ii({deferEvents:!0},d))});return ri(function(){var v;return n&&(v=h.subscribe(wy(n))),function(){v==null||v.unsubscribe()}},[n]),ri(function(){return h.start(u?Ye.create(u):void 0),function(){h.stop()}},[]),ri(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]),yy(h),h}var Cy=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 _y(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=Sy(t,e,n),i=Cy(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 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 Ey(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 xy(){const t=p.useState(!1),e=t[1];return p.useCallback(()=>e(r=>!r),[])}function pn(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 Oy(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=Oy(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 Ty(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 Pf 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 yc;function Py(t,e){yc={fn:t,transform:e}}let Af;function Ay(t){Af=t}let Rf=t=>typeof window<"u"?window.requestAnimationFrame(t):-1,Qs;function Ry(t){Qs=t}let Lf=()=>Date.now(),Ly=t=>t.current,kf;function ky(t){kf=t}class My extends Pf{constructor(e,n){super(),this.update=void 0,this.payload=e.style?we({},e,{style:kf(e.style)}):e,this.update=n,this.attach()}}const Dy=t=>W.fun(t)&&!(t.prototype instanceof p.Component),jy=t=>p.forwardRef((n,r)=>{const i=xy(),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=yc.fn(a.current,o.current.getAnimatedValue())),(!a.current||f===!1)&&i()};o.current=new My(h,m),v&&v.detach()},[]);p.useEffect(()=>()=>{s.current=!1,o.current&&o.current.detach()},[]),p.useImperativeHandle(r,()=>Ly(a)),c(n);const l=o.current.getValue();l.scrollTop,l.scrollLeft;const u=sr(l,["scrollTop","scrollLeft"]),d=Dy(t)?void 0:h=>a.current=Ty(h,r);return p.createElement(t,we({},u,{ref:d}))});let si=!1;const An=new Set,Mf=()=>{if(!si)return!1;let t=Lf();for(let e of An){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||(An.delete(e),e.stop(!0))}return An.size?Rf(Mf):si=!1,si},Ny=t=>{An.has(t)||An.add(t),si||(si=!0,Rf(Mf))},Iy=t=>{An.has(t)&&An.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=By(l,s);return Fy(l,s[u],s[u+1],i[u],i[u+1],c,o,a,r.map)}}function Fy(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 By(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 Zn=(t,e,n)=>t&&new Or(t,e,n),Vy={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 Df(t,e){"update"in t?e.add(t):t.getChildren().forEach(n=>Df(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&&Df(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 Hy 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 Uy=0,$y=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=Uy++}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(),Ny(this);return this}stop(e){return this.listeners.forEach(n=>n(e)),this.listeners=[],this}pause(e){return this.stop(!0),e&&Iy(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)&&!Af[C],g=W.arr(C),_=!E&&!g&&!x;let O=W.und(i[y])?C:i[y],A=E||g||x?C:1,R=nr(c,y);m&&(A=m.animations[y].parent);let L=b.parent,T=b.interpolation,D=as(m?A.getPayload():A),N,H=C;_&&(H=Qs({range:[0,1],output:[C,C]})(1));let B=T&&T.getValue();const q=!W.und(L)&&b.animatedValues.some(ne=>!ne.done),ae=!W.equ(H,B),le=!W.equ(H,b.previous),ue=!W.equ(R,b.config);if(d||le&&ae||ue){if(E||x)L=T=b.parent||new La(O);else if(g)L=T=b.parent||new Hy(O);else if(_){let ne=b.interpolation&&b.interpolation.calc(b.parent.value);ne=ne!==void 0&&!d?ne:O,b.parent?(L=b.parent,L.setValue(0,!1)):L=new La(0);const qe={output:[ne,C]};b.interpolation?(T=b.interpolation,b.interpolation.updateConfig(qe)):T=L.interpolate(qe)}return D=as(m?A.getPayload():A),N=as(L.getPayload()),d&&!_&&L.setValue(O,!1),this.hasChanged=!0,N.forEach(ne=>{ne.startPosition=ne.value,ne.lastPosition=ne.value,ne.lastVelocity=q?ne.lastVelocity:void 0,ne.lastTime=q?ne.lastTime:void 0,ne.startTime=Lf(),ne.done=!1,ne.animatedStyles.clear()}),nr(h,y)&&L.setValue(_?A:C,!1),we({},f,{[y]:we({},b,{name:y,parent:L,interpolation:T,animatedValues:N,toValues:D,previous:H,config:R,fromValues:as(L.getValue()),immediate:nr(h,y),initialVelocity:pn(R.velocity,0),clamp:pn(R.clamp,!1),precision:pn(R.precision,.01),tension:pn(R.tension,170),friction:pn(R.friction,26),mass:pn(R.mass,1),duration:R.duration,easing:pn(R.easing,ne=>ne),decay:R.decay})})}else return ae?f:(_&&(L.setValue(1,!1),T.updateConfig({output:[H,H]})),L.done=!0,this.hasChanged=!0,we({},f,{[y]:we({},f[y],{previous:H})}))},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 zy=(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 $y,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},qy=t=>{const e=W.fun(t),n=zy(1,e?t:[t]),r=n[0],i=n[1],s=n[2];return e?[r[0],i,s]:r};class Gy extends Pf{constructor(e){e===void 0&&(e={}),super(),e.transform&&!(e.transform instanceof dt)&&(e=yc.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 Wy=new RegExp("rgb"+bo(ft,ft,ft)),Zy=new RegExp("rgba"+bo(ft,ft,ft,ft)),Ky=new RegExp("hsl"+bo(ft,Ys,Ys)),Qy=new RegExp("hsla"+bo(ft,Ys,Ys,ft)),Jy=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Xy=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Yy=/^#([0-9a-fA-F]{6})$/,e2=/^#([0-9a-fA-F]{8})$/;function t2(t){let e;return typeof t=="number"?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=Yy.exec(t))?parseInt(e[1]+"ff",16)>>>0:Xs.hasOwnProperty(t)?Xs[t]:(e=Wy.exec(t))?(Kn(e[1])<<24|Kn(e[2])<<16|Kn(e[3])<<8|255)>>>0:(e=Zy.exec(t))?(Kn(e[1])<<24|Kn(e[2])<<16|Kn(e[3])<<8|jl(e[4]))>>>0:(e=Jy.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=e2.exec(t))?parseInt(e[1],16)>>>0:(e=Xy.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=Ky.exec(t))?(Ml(Dl(e[1]),cs(e[2]),cs(e[3]))|255)>>>0:(e=Qy.exec(t))?(Ml(Dl(e[1]),cs(e[2]),cs(e[3]))|jl(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 Ml(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 Kn(t){const e=parseInt(t,10);return e<0?0:e>255?255:e}function Dl(t){return(parseFloat(t)%360+360)%360/360}function jl(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 Nl(t){let e=t2(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,n2=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,r2=new RegExp(`(${Object.keys(Xs).join("|")})`,"g"),i2=t=>{const e=t.output.map(i=>i.replace(n2,Nl)).map(i=>i.replace(r2,Nl)),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 oi={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 s2=(t,e)=>t+e.charAt(0).toUpperCase()+e.substring(1),o2=["Webkit","Ms","Moz","O"];oi=Object.keys(oi).reduce((t,e)=>(o2.forEach(n=>t[s2(n,e)]=t[e]),t),oi);function a2(t,e,n){return e==null||typeof e=="boolean"||e===""?"":!n&&typeof e=="number"&&e!==0&&!(oi.hasOwnProperty(t)&&oi[t])?e+"px":(""+e).trim()}const Il={};ky(t=>new Gy(t));Ry(i2);Ay(Xs);Py((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=a2(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:Il[u]||(Il[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 c2=["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"],l2=Ey(jy,!1),u2=l2(c2);function Fl(t,e){return t.map(function(n,r){return n+e[r]})}function jf(t,e){return t.map(function(n,r){return n-e[r]})}function ka(t){return Math.hypot.apply(Math,t)}function d2(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 f2(t,e,n){return Math.max(e,Math.min(t,n))}function h2(t,e){return Math.pow(t,e*5)}function Bl(t,e,n){return e===0||Math.abs(e)===1/0?h2(t,n):t*e*n/(e+n*t)}function ai(t,e,n,r){return r===void 0&&(r=.15),r===0?f2(t,e,n):t<e?-Bl(e-t,n-e,r)+e:t>n?+Bl(t-n,n-e,r)+n:t}function Vl(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 p2(t,e,n){return e&&Vl(t.prototype,e),n&&Vl(t,n),t}function Ve(){return Ve=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},Ve.apply(this,arguments)}function Nf(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function m2(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 g2(t,e){if(t){if(typeof t=="string")return Hl(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 Hl(t,e)}}function Hl(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=g2(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 If(){}function Ff(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.length===0?If: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 en(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 bc(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]=bc(t[o],a);break;case"boolean":a&&(n[o]=t[o]);break}}return n}var v2=180,y2=.15,b2=.5,w2=60,S2={threshold:function(e){return e===void 0&&(e=0),en(e)},rubberband:function(e){switch(e===void 0&&(e=0),e){case!0:return en(y2);case!1:return en(0);default:return en(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:en(e)}},Bf=Ve({},S2,{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 Bf.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]]}}),C2=typeof window<"u"&&window.document&&window.document.createElement,_2={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=C2?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}}},E2=Ve({},Bf,{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=en(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=b2),en(e)},swipeDistance:function(e){return e===void 0&&(e=w2),en(e)},delay:function(e){switch(e===void 0&&(e=0),e){case!0:return v2;case!1:return 0;default:return e}}});function x2(t){return t===void 0&&(t={}),bc(t,_2)}function O2(t){return t===void 0&&(t={}),bc(t,E2)}function T2(t){var e=t.domTarget,n=t.eventOptions,r=t.window,i=t.enabled,s=m2(t,["domTarget","eventOptions","window","enabled"]),o=x2({domTarget:e,eventOptions:n,window:r,enabled:i});return o.drag=O2(s),o}function Ur(t){return Ve({_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:If,canceled:!1,memo:void 0,args:void 0},t)}function Vf(){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 vn=new Map,P2=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=Ve({},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?Ul(w[0],c[0]):v[0],C=v[1]===!1?Ul(w[1],c[1]):v[1],b=this.checkIntentionality([y,C],w);if(b._blocked)return Ve({},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,A;_=(O=_)!=null?O:ds(s,this.state),g=(A=g)!=null?A: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=Fl(R,m),T=h?a:[0,0];return R=$l(u,Fl(R,d),T),Ve({},b,{intentional:E[0]!==!1||E[1]!==!1,_initial:d,_movement:x,movement:R,values:r,offset:$l(u,L,T),delta:jf(R,f)})},e.clean=function(){this.clearTimeout()},p2(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 Ul(t,e){return Math.abs(t)>=e?Ma(t)*e:!1}function $l(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[ai(r,c,l,s),ai(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 A2(t,e,n){var r=t.state.offset,i=n.timeStamp;return Ve({},Vf()[t.stateKey],{_active:!0,values:e,initial:e,offset:r,lastOffset:r,startTime:i})}function R2(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,Ve({},e,{event:n})].concat(i))}}var L2=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,R2(m,Ve({},n.state.shared,{args:s})))}return n.config.domTarget?j2(n,r):N2(n,r)},this.effect=function(){return n.config.domTarget&&n.bind(),n.clean},this.clean=function(){var r=Uf(n.config),i=n.config.eventOptions;r&&Ii(r,Hf(n.domListeners),i),Object.values(n.timeouts).forEach(clearTimeout),k2(n)},this.state=Vf(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function k2(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];Ii(n,o,r)}t.windowListeners={}}}function M2(t,e){var n=t.config,r=t.windowListeners;n.window&&(Ii(n.window,r[e],n.eventOptions),delete r[e])}function D2(t,e,n){var r=t.config,i=t.windowListeners;n===void 0&&(n=[]),r.window&&(Ii(r.window,i[e],r.eventOptions),$f(r.window,i[e]=n,r.eventOptions))}function j2(t,e){var n=t.config,r=t.domListeners,i=Uf(n);if(!i)throw new Error("domTarget must be defined");var s=n.eventOptions;Ii(i,Hf(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,Ff.apply(void 0,u)])}$f(i,r,s)}function N2(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]=Ff.apply(void 0,u)}return r}function Hf(t){return t===void 0&&(t=[]),t.splice(0,t.length)}function Uf(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 $f(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 Ii(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 I2(t,e,n){n===void 0&&(n={});var r=B2(t),i=p.useMemo(function(){return new L2(r)},[]);return i.config=e,i.handlers=t,i.nativeRefs=n,p.useEffect(i.effect,[]),i.config.domTarget?F2:i.bind}function F2(){}function B2(t){var e=new Set;return t.drag&&e.add(vn.get("drag")),t.wheel&&e.add(vn.get("wheel")),t.scroll&&e.add(vn.get("scroll")),t.move&&e.add(vn.get("move")),t.pinch&&e.add(vn.get("pinch")),t.hover&&e.add(vn.get("hover")),e}var V2=function(t){Nf(e,t);function e(){return t.apply(this,arguments)||this}var n=e.prototype;return n.getInternalMovement=function(i,s){return jf(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,d2(o.movement,o.delta,a))}return o},n.mapStateValues=function(i){return{xy:i.values,vxvy:i.velocities}},e}(P2);function zf(t){if("touches"in t){var e=t.targetTouches,n=t.changedTouches;return e.length>0?e:n}return null}function zl(t){var e="buttons"in t?t.buttons:0,n=zf(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=zf(t),n=e?e[0]:t,r=n.clientX,i=n.clientY;return[r,i]}var H2=3,U2=220,$2=function(t){Nf(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||(D2(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=zl(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>=H2&&(l=!1),r.updateGestureState(Ve({},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=Ve({},$o(us(r),i),r.getMovement(r.state.values)),g=[0,0];x.elapsedTime<U2&&(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(Ve({},x,{tap:s,swipe:g})),r.fireGestureHandler(s===!0)}},r.clean=function(){t.prototype.clean.call(us(r)),r.state._delayedEvent=!1,M2(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(zl(i)),this.updateGestureState(Ve({},A2(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}(V2);function z2(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 q2(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 G2(t,e){e===void 0&&(e={}),vn.set("drag",$2);var n=p.useRef();return n.current||(n.current=z2(T2,q2)),I2({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
- */var zf=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],eo=zf.join(","),qf=typeof Element>"u",Mn=qf?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ja=!qf&&Element.prototype.getRootNode?function(t){return t.getRootNode()}:function(t){return t.ownerDocument},Gf=function(e,n,r){var i=Array.prototype.slice.apply(e.querySelectorAll(eo));return n&&Mn.call(e,eo)&&i.unshift(e),i=i.filter(r),i},Wf=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=Mn.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),f=!r.shadowRootFilter||r.shadowRootFilter(o);if(d&&f){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},Zf=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},G2=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},Kf=function(e){return e.tagName==="INPUT"},W2=function(e){return Kf(e)&&e.type==="hidden"},Z2=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},K2=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},Q2=function(e){if(!e.name)return!0;var n=e.form||ja(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=K2(i,e.form);return!s||s===e},J2=function(e){return Kf(e)&&e.type==="radio"},X2=function(e){return J2(e)&&!Q2(e)},Gl=function(e){var n=e.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},Y2=function(e,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var s=Mn.call(e,"details>summary:first-of-type"),o=s?e.parentElement:e;if(Mn.call(o,"details:not([open]) *"))return!0;var a=ja(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=ja(e);if(u&&!u.shadowRoot&&i(u)===!0)return Gl(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 Gl(e);return!1},e3=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 Mn.call(n,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}n=n.parentElement}return!1},to=function(e,n){return!(n.disabled||W2(n)||Y2(n,e)||Z2(n)||e3(n))},Na=function(e,n){return!(X2(n)||Zf(n)<0||!to(e,n))},t3=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},n3=function t(e){var n=[],r=[];return e.forEach(function(i,s){var o=!!i.scope,a=o?i.scope:i,c=Zf(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(G2).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(n)},r3=function(e,n){n=n||{};var r;return n.getShadowRoot?r=Wf([e],n.includeContainer,{filter:Na.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:t3}):r=Gf(e,n.includeContainer,Na.bind(null,n)),n3(r)},i3=function(e,n){n=n||{};var r;return n.getShadowRoot?r=Wf([e],n.includeContainer,{filter:to.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Gf(e,n.includeContainer,to.bind(null,n)),r},fs=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Mn.call(e,eo)===!1?!1:Na(n,e)},s3=zf.concat("iframe").join(","),zo=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Mn.call(e,s3)===!1?!1:to(n,e)};/*!
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(","),Gf=typeof Element>"u",Mn=Gf?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ja=!Gf&&Element.prototype.getRootNode?function(t){return t.getRootNode()}:function(t){return t.ownerDocument},Wf=function(e,n,r){var i=Array.prototype.slice.apply(e.querySelectorAll(eo));return n&&Mn.call(e,eo)&&i.unshift(e),i=i.filter(r),i},Zf=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=Mn.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},Kf=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},W2=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},Qf=function(e){return e.tagName==="INPUT"},Z2=function(e){return Qf(e)&&e.type==="hidden"},K2=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},Q2=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},J2=function(e){if(!e.name)return!0;var n=e.form||ja(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=Q2(i,e.form);return!s||s===e},X2=function(e){return Qf(e)&&e.type==="radio"},Y2=function(e){return X2(e)&&!J2(e)},Gl=function(e){var n=e.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},e3=function(e,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var s=Mn.call(e,"details>summary:first-of-type"),o=s?e.parentElement:e;if(Mn.call(o,"details:not([open]) *"))return!0;var a=ja(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=ja(e);if(u&&!u.shadowRoot&&i(u)===!0)return Gl(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 Gl(e);return!1},t3=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 Mn.call(n,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}n=n.parentElement}return!1},to=function(e,n){return!(n.disabled||Z2(n)||e3(n,e)||K2(n)||t3(n))},Na=function(e,n){return!(Y2(n)||Kf(n)<0||!to(e,n))},n3=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},r3=function t(e){var n=[],r=[];return e.forEach(function(i,s){var o=!!i.scope,a=o?i.scope:i,c=Kf(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(W2).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(n)},i3=function(e,n){n=n||{};var r;return n.getShadowRoot?r=Zf([e],n.includeContainer,{filter:Na.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:n3}):r=Wf(e,n.includeContainer,Na.bind(null,n)),r3(r)},s3=function(e,n){n=n||{};var r;return n.getShadowRoot?r=Zf([e],n.includeContainer,{filter:to.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Wf(e,n.includeContainer,to.bind(null,n)),r},fs=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Mn.call(e,eo)===!1?!1:Na(n,e)},o3=qf.concat("iframe").join(","),zo=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Mn.call(e,o3)===!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 Wl(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 Zl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Wl(Object(n),!0).forEach(function(r){o3(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function o3(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Kl=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()}}}(),a3=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},c3=function(e){return e.key==="Escape"||e.key==="Esc"||e.keyCode===27},l3=function(e){return e.key==="Tab"||e.keyCode===9},Ql=function(e){return setTimeout(e,0)},Jl=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},u3=function(e,n){var r=(n==null?void 0:n.document)||document,i=Zl({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,C,O){return g&&g[C]!==void 0?g[C]:i[O||C]},c=function(g){return s.containerGroups.findIndex(function(C){var O=C.container,A=C.tabbableNodes;return O.contains(g)||A.find(function(R){return R===g})})},l=function(g){var C=i[g];if(typeof C=="function"){for(var O=arguments.length,A=new Array(O>1?O-1:0),R=1;R<O;R++)A[R-1]=arguments[R];C=C.apply(void 0,A)}if(C===!0&&(C=void 0),!C){if(C===void 0||C===!1)return C;throw new Error("`".concat(g,"` was specified but was not a node, or did not return a node"))}var L=C;if(typeof C=="string"&&(L=r.querySelector(C),!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 C=s.tabbableGroups[0],O=C&&C.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 C=r3(g,i.tabbableOptions),O=i3(g,i.tabbableOptions);return{container:g,tabbableNodes:C,focusableNodes:O,firstTabbableNode:C.length>0?C[0]:null,lastTabbableNode:C.length>0?C[C.length-1]:null,nextTabbableNode:function(R){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,T=O.findIndex(function(D){return D===R});if(!(T<0))return L?O.slice(T+1).find(function(D){return fs(D,i.tabbableOptions)}):O.slice(0,T).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")},f=function x(g){if(g!==!1&&g!==r.activeElement){if(!g||!g.focus){x(u());return}g.focus({preventScroll:!!i.preventScroll}),s.mostRecentlyFocusedNode=g,a3(g)&&g.select()}},v=function(g){var C=l("setReturnFocus",g);return C||(C===!1?!1:g)},m=function(g){var C=hs(g);if(!(c(C)>=0)){if($r(i.clickOutsideDeactivates,g)){o.deactivate({returnFocus:i.returnFocusOnDeactivate&&!zo(C,i.tabbableOptions)});return}$r(i.allowOutsideClick,g)||g.preventDefault()}},h=function(g){var C=hs(g),O=c(C)>=0;O||C instanceof Document?O&&(s.mostRecentlyFocusedNode=C):(g.stopImmediatePropagation(),f(s.mostRecentlyFocusedNode||u()))},S=function(g){var C=hs(g);d();var O=null;if(s.tabbableGroups.length>0){var A=c(C),R=A>=0?s.containerGroups[A]:void 0;if(A<0)g.shiftKey?O=s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:O=s.tabbableGroups[0].firstTabbableNode;else if(g.shiftKey){var L=Jl(s.tabbableGroups,function($){var q=$.firstTabbableNode;return C===q});if(L<0&&(R.container===C||zo(C,i.tabbableOptions)&&!fs(C,i.tabbableOptions)&&!R.nextTabbableNode(C,!1))&&(L=A),L>=0){var T=L===0?s.tabbableGroups.length-1:L-1,D=s.tabbableGroups[T];O=D.lastTabbableNode}}else{var N=Jl(s.tabbableGroups,function($){var q=$.lastTabbableNode;return C===q});if(N<0&&(R.container===C||zo(C,i.tabbableOptions)&&!fs(C,i.tabbableOptions)&&!R.nextTabbableNode(C))&&(N=A),N>=0){var H=N===s.tabbableGroups.length-1?0:N+1,B=s.tabbableGroups[H];O=B.firstTabbableNode}}}else O=l("fallbackFocus");O&&(g.preventDefault(),f(O))},b=function(g){if(c3(g)&&$r(i.escapeDeactivates,g)!==!1){g.preventDefault(),o.deactivate();return}if(l3(g)){S(g);return}},_=function(g){var C=hs(g);c(C)>=0||$r(i.clickOutsideDeactivates,g)||$r(i.allowOutsideClick,g)||(g.preventDefault(),g.stopImmediatePropagation())},y=function(){if(s.active)return Kl.activateTrap(o),s.delayInitialFocusTimer=i.delayInitialFocus?Ql(function(){f(u())}):f(u()),r.addEventListener("focusin",h,!0),r.addEventListener("mousedown",m,{capture:!0,passive:!1}),r.addEventListener("touchstart",m,{capture:!0,passive:!1}),r.addEventListener("click",_,{capture:!0,passive:!1}),r.addEventListener("keydown",b,{capture:!0,passive:!1}),o},E=function(){if(s.active)return r.removeEventListener("focusin",h,!0),r.removeEventListener("mousedown",m,!0),r.removeEventListener("touchstart",m,!0),r.removeEventListener("click",_,!0),r.removeEventListener("keydown",b,!0),o};return o={get active(){return s.active},get paused(){return s.paused},activate:function(g){if(s.active)return this;var C=a(g,"onActivate"),O=a(g,"onPostActivate"),A=a(g,"checkCanFocusTrap");A||d(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=r.activeElement,C&&C();var R=function(){A&&d(),y(),O&&O()};return A?(A(s.containers.concat()).then(R,R),this):(R(),this)},deactivate:function(g){if(!s.active)return this;var C=Zl({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},g);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,E(),s.active=!1,s.paused=!1,Kl.deactivateTrap(o);var O=a(C,"onDeactivate"),A=a(C,"onPostDeactivate"),R=a(C,"checkCanReturnFocus"),L=a(C,"returnFocus","returnFocusOnDeactivate");O&&O();var T=function(){Ql(function(){L&&f(v(s.nodeFocusedBeforeActivation)),A&&A()})};return L&&R?(R(v(s.nodeFocusedBeforeActivation)).then(T,T),this):(T(),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(),y(),this)},updateContainerElements:function(g){var C=[].concat(g).filter(Boolean);return s.containers=C.map(function(O){return typeof O=="string"?r.querySelector(O):O}),s.active&&d(),this}},o.updateContainerElements(e),o};function d3(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 wc=!1;if(typeof window<"u"){var Xl={get passive(){wc=!0}};window.addEventListener("testPassive",null,Xl),window.removeEventListener("testPassive",null,Xl)}var Qf=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),ln=[],no=!1,Jf=-1,ci=void 0,li=void 0,Xf=function(e){return ln.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(e))})},ro=function(e){var n=e||window.event;return Xf(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},f3=function(e){if(li===void 0){var n=!!e&&e.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;n&&r>0&&(li=document.body.style.paddingRight,document.body.style.paddingRight=r+"px")}ci===void 0&&(ci=document.body.style.overflow,document.body.style.overflow="hidden")},h3=function(){li!==void 0&&(document.body.style.paddingRight=li,li=void 0),ci!==void 0&&(document.body.style.overflow=ci,ci=void 0)},p3=function(e){return e?e.scrollHeight-e.scrollTop<=e.clientHeight:!1},m3=function(e,n){var r=e.targetTouches[0].clientY-Jf;return Xf(e.target)?!1:n&&n.scrollTop===0&&r>0||p3(n)&&r<0?ro(e):(e.stopPropagation(),!0)},g3=function(e,n){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!ln.some(function(i){return i.targetElement===e})){var r={targetElement:e,options:n||{}};ln=[].concat(d3(ln),[r]),Qf?(e.ontouchstart=function(i){i.targetTouches.length===1&&(Jf=i.targetTouches[0].clientY)},e.ontouchmove=function(i){i.targetTouches.length===1&&m3(i,e)},no||(document.addEventListener("touchmove",ro,wc?{passive:!1}:void 0),no=!0)):f3(n)}},v3=function(e){if(!e){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}ln=ln.filter(function(n){return n.targetElement!==e}),Qf?(e.ontouchstart=null,e.ontouchmove=null,no&&ln.length===0&&(document.removeEventListener("touchmove",ro,wc?{passive:!1}:void 0),no=!1)):ln.length||h3()},Rn=[],y3=function(){return Rn.some(function(t){return t.activeTargets.length>0})},b3=function(){return Rn.some(function(t){return t.skippedTargets.length>0})},Yl="ResizeObserver loop completed with undelivered notifications.",w3=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:Yl}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=Yl),window.dispatchEvent(t)},vi;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(vi||(vi={}));var Ln=function(t){return Object.freeze(t)},S3=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,Ln(this)}return t}(),Yf=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,Ln(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}(),Sc=function(t){return t instanceof SVGElement&&"getBBox"in t},eh=function(t){if(Sc(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)},eu=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)},C3=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},ui=typeof window<"u"?window:{},ps=new WeakMap,tu=/auto|scroll/,_3=/^tb|vertical/,E3=/msie|trident/i.test(ui.navigator&&ui.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 S3((n?e:t)||0,(n?t:e)||0)},nu=Ln({devicePixelContentBoxSize:or(),borderBoxSize:or(),contentBoxSize:or(),contentRect:new Yf(0,0,0,0)}),th=function(t,e){if(e===void 0&&(e=!1),ps.has(t)&&!e)return ps.get(t);if(eh(t))return ps.set(t,nu),nu;var n=getComputedStyle(t),r=Sc(t)&&t.ownerSVGElement&&t.getBBox(),i=!E3&&n.boxSizing==="border-box",s=_3.test(n.writingMode||""),o=!r&&tu.test(n.overflowY||""),a=!r&&tu.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),f=r?0:yt(n.borderTopWidth),v=r?0:yt(n.borderRightWidth),m=r?0:yt(n.borderBottomWidth),h=r?0:yt(n.borderLeftWidth),S=d+l,b=c+u,_=h+v,y=f+m,E=a?t.offsetHeight-y-t.clientHeight:0,x=o?t.offsetWidth-_-t.clientWidth:0,g=i?S+_:0,C=i?b+y:0,O=r?r.width:yt(n.width)-g-x,A=r?r.height:yt(n.height)-C-E,R=O+S+x+_,L=A+b+E+y,T=Ln({devicePixelContentBoxSize:or(Math.round(O*devicePixelRatio),Math.round(A*devicePixelRatio),s),borderBoxSize:or(R,L,s),contentBoxSize:or(O,A,s),contentRect:new Yf(d,c,O,A)});return ps.set(t,T),T},nh=function(t,e,n){var r=th(t,n),i=r.borderBoxSize,s=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(e){case vi.DEVICE_PIXEL_CONTENT_BOX:return o;case vi.BORDER_BOX:return i;default:return s}},x3=function(){function t(e){var n=th(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=Ln([n.borderBoxSize]),this.contentBoxSize=Ln([n.contentBoxSize]),this.devicePixelContentBoxSize=Ln([n.devicePixelContentBoxSize])}return t}(),rh=function(t){if(eh(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},O3=function(){var t=1/0,e=[];Rn.forEach(function(o){if(o.activeTargets.length!==0){var a=[];o.activeTargets.forEach(function(l){var u=new x3(l.target),d=rh(l.target);a.push(u),l.lastReportedSize=nh(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},ru=function(t){Rn.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(rh(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},T3=function(){var t=0;for(ru(t);y3();)t=O3(),ru(t);return b3()&&w3(),t>0},qo,ih=[],P3=function(){return ih.splice(0).forEach(function(t){return t()})},A3=function(t){if(!qo){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return P3()}).observe(n,r),qo=function(){n.textContent="".concat(e?e--:e++)}}ih.push(t),qo()},R3=function(t){A3(function(){requestAnimationFrame(t)})},Bs=0,L3=function(){return!!Bs},k3=250,M3={attributes:!0,characterData:!0,childList:!0,subtree:!0},iu=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],su=function(t){return t===void 0&&(t=0),Date.now()+t},Go=!1,D3=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=k3),!Go){Go=!0;var r=su(e);R3(function(){var i=!1;try{i=T3()}finally{if(Go=!1,e=r-su(),!L3())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,M3)};document.body?n():ui.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),iu.forEach(function(n){return ui.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),iu.forEach(function(n){return ui.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),Ia=new D3,ou=function(t){!Bs&&t>0&&Ia.start(),Bs+=t,!Bs&&Ia.stop()},j3=function(t){return!Sc(t)&&!C3(t)&&getComputedStyle(t).display==="inline"},N3=function(){function t(e,n){this.target=e,this.observedBox=n||vi.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=nh(this.target,this.observedBox,!0);return j3(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),I3=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),ms=new WeakMap,au=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 I3(e,n);ms.set(e,r)},t.observe=function(e,n,r){var i=ms.get(e),s=i.observationTargets.length===0;au(i.observationTargets,n)<0&&(s&&Rn.push(i),i.observationTargets.push(new N3(n,r&&r.box)),ou(1),Ia.schedule())},t.unobserve=function(e,n){var r=ms.get(e),i=au(r.observationTargets,n),s=r.observationTargets.length===1;i>=0&&(s&&Rn.splice(Rn.indexOf(r),1),r.observationTargets.splice(i,1),ou(-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}(),F3=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(!eu(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(!eu(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 di=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 B3={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 di(function(){if(t.current&&r){var l=new F3(c);return l.observe(t.current,B3),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 cu={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},lu={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},V3=fy({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({},cu,lu)}}},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({},cu,lu)}}},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:[hy({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"}}}),H3=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],U3=["velocity"],$3=["onRest","config"],sh=By.default,z3=sh.tension,ys=sh.friction,q3=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,f=t.maxHeight,v=t.defaultSnap,m=v===void 0?W3:v,h=t.snapPoints,S=h===void 0?Z3:h,b=t.blocking,_=b===void 0||b,y=t.scrollLocking,E=y===void 0||y,x=t.style,g=t.onSpringStart,C=t.onSpringCancel,O=t.onSpringEnd,A=t.reserveScrollBarGap,R=A===void 0?_:A,L=t.expandOnContentDrag,T=L!==void 0&&L,D=Vs(t,H3),N=function(){var M=p.useState(!1),z=M[0],V=M[1],Y=p.useState({}),pe=Y[0],ie=Y[1],de=p.useCallback(function(fe){return ie(function(ge){var G;return De({},ge,((G={})[fe]=!1,G))}),function(){ie(function(ge){var G;return De({},ge,((G={})[fe]=!0,G))})}},[]);return p.useEffect(function(){var fe=Object.values(pe);fe.length!==0&&fe.every(Boolean)&&V(!0)},[pe]),{ready:z,registerReady:de}}(),H=N.ready,B=N.registerReady,$=p.useRef(!1),q=p.useRef(g),ae=p.useRef(C),le=p.useRef(O);p.useEffect(function(){q.current=g,ae.current=C,le.current=O},[C,g,O]);var ue,ne,qe=zy(function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}}),Ee=qe[0],me=qe[1],Ut=p.useRef(null),$t=p.useRef(null),Lr=p.useRef(null),gt=p.useRef(null),Vi=p.useRef(null),In=p.useRef(null),Ke=p.useRef(0),Fn=p.useRef(),Co=p.useRef(!1),zt=(ue=p.useMemo(function(){return typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null},[]),ne=p.useRef(ue==null?void 0:ue.matches),p.useDebugValue(ne.current?"reduce":"no-preference"),p.useEffect(function(){var M=function(z){ne.current=z.matches};return ue==null||ue.addListener(M),function(){return ue==null?void 0:ue.removeListener(M)}},[ue]),ne),Bn=function(M){var z=M.targetRef,V=M.enabled,Y=M.reserveScrollBarGap,pe=p.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return p.useDebugValue(V?"Enabled":"Disabled"),p.useEffect(function(){if(!V)return pe.current.deactivate(),void(pe.current={activate:function(){},deactivate:function(){}});var ie=z.current,de=!1;pe.current={activate:function(){de||(de=!0,g3(ie,{allowTouchMove:function(fe){return fe.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:Y}))},deactivate:function(){de&&(de=!1,v3(ie))}}},[V,z,Y]),pe}({targetRef:$t,enabled:H&&E,reserveScrollBarGap:R}),Vn=function(M){var z=M.targetRef,V=M.enabled,Y=p.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return p.useDebugValue(V?"Enabled":"Disabled"),p.useEffect(function(){if(!V)return Y.current.deactivate(),void(Y.current={activate:function(){},deactivate:function(){}});var pe=z.current,ie=!1,de=[],fe=[];Y.current={activate:function(){if(!ie){ie=!0;var ge=pe.parentNode;document.querySelectorAll("body > *").forEach(function(G){if(G!==ge){var se=G.getAttribute("aria-hidden");se!==null&&se!=="false"||(de.push(se),fe.push(G),G.setAttribute("aria-hidden","true"))}})}},deactivate:function(){ie&&(ie=!1,fe.forEach(function(ge,G){var se=de[G];se===null?ge.removeAttribute("aria-hidden"):ge.setAttribute("aria-hidden",se)}),de=[],fe=[])}}},[z,V]),Y}({targetRef:Ut,enabled:H&&_}),Hn=function(M){var z=M.targetRef,V=M.fallbackRef,Y=M.initialFocusRef,pe=M.enabled,ie=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 ie.current.deactivate(),void(ie.current={activate:function(){},deactivate:function(){}});var de=V.current,fe=u3(z.current,{onActivate:void 0,initialFocus:Y?function(){return(Y==null?void 0:Y.current)||de}:void 0,fallbackFocus:de,escapeDeactivates:!1,clickOutsideDeactivates:!1}),ge=!1;ie.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,V,Y,z]),ie}({targetRef:Ut,fallbackRef:In,initialFocusRef:u||void 0,enabled:H&&_&&u!==!1}),Hi=function(M){var z=M.getSnapPoints,V=M.heightRef,Y=M.lastSnapRef,pe=M.ready,ie=function(Oe){var ot=Oe.contentRef,Lt=Oe.controlledMaxHeight,Ne=Oe.footerEnabled,hn=Oe.footerRef,$n=Oe.headerEnabled,at=Oe.headerRef,jr=Oe.registerReady,qi=Oe.resizeSourceRef,kc=p.useMemo(function(){return jr("contentHeight")},[jr]),Mc=function(Nr,Ic,Gi){var Wi=p.useMemo(function(){return Ic("maxHeight")},[Ic]),Fc=p.useState(function(){return vs(Nr)||typeof window<"u"?window.innerHeight:0}),Bc=Fc[0],xo=Fc[1],Vc=Bc>0,Zi=p.useRef(0);return p.useDebugValue(Nr?"controlled":"auto"),p.useEffect(function(){Vc&&Wi()},[Vc,Wi]),di(function(){if(Nr)return xo(vs(Nr)),void(Gi.current="maxheightprop");var Hc=function(){Zi.current||(Zi.current=requestAnimationFrame(function(){xo(window.innerHeight),Gi.current="window",Zi.current=0}))};return window.addEventListener("resize",Hc),xo(window.innerHeight),Gi.current="window",Wi(),function(){window.removeEventListener("resize",Hc),cancelAnimationFrame(Zi.current)}},[Nr,Wi,Gi]),Bc}(Lt,jr,qi),_o=Wo(at,{label:"headerHeight",enabled:$n,resizeSourceRef:qi}),Dc=Wo(ot,{label:"contentHeight",enabled:!0,resizeSourceRef:qi}),Eo=Wo(hn,{label:"footerHeight",enabled:Ne,resizeSourceRef:qi}),jc=Math.min(Mc-_o-Eo,Dc)+_o+Eo;p.useDebugValue("minHeight: "+jc);var Nc=Dc>0;return p.useEffect(function(){Nc&&kc()},[Nc,kc]),{maxHeight:Mc,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=ie.maxHeight,fe=ie.minHeight,ge=ie.headerHeight,G=ie.footerHeight,se=function(Oe,ot){var Lt=[].concat(Oe).map(vs).reduce(function(at,jr){return at.add(zr(jr,0,ot)),at},new Set),Ne=Array.from(Lt),hn=Math.min.apply(Math,Ne);if(Number.isNaN(hn))throw new TypeError("minSnap is NaN");var $n=Math.max.apply(Math,Ne);if(Number.isNaN($n))throw new TypeError("maxSnap is NaN");return{snapPoints:Ne,minSnap:hn,maxSnap:$n}}(pe?z({height:V.current,footerHeight:G,headerHeight:ge,minHeight:fe,maxHeight:de}):[0],de),Je=se.snapPoints,Un=se.minSnap,st=se.maxSnap;return p.useDebugValue("minSnap: "+Un+", maxSnap:"+st),{minSnap:Un,maxSnap:st,findSnap:function(Oe){var ot=vs(typeof Oe=="function"?Oe({footerHeight:G,headerHeight:ge,height:V.current,minHeight:fe,maxHeight:de,snapPoints:Je,lastSnap:Y.current}):Oe);return Je.reduce(function(Lt,Ne){return Math.abs(Ne-ot)<Math.abs(Lt-ot)?Ne:Lt},Un)},maxHeight:de}}({contentRef:Lr,controlledMaxHeight:f,footerEnabled:!!s,footerRef:Vi,getSnapPoints:S,headerEnabled:o!==!1,headerRef:gt,heightRef:Ke,lastSnapRef:l,ready:H,registerReady:B,resizeSourceRef:Fn}),kr=Hi.minSnap,Mr=Hi.maxSnap,Dr=Hi.maxHeight,Ui=Hi.findSnap,Rt=p.useRef(Dr),Qe=p.useRef(kr),Ce=p.useRef(Mr),$i=p.useRef(Ui),vt=p.useRef(0);di(function(){Rt.current=Dr,Ce.current=Mr,Qe.current=kr,$i.current=Ui,vt.current=Ui(m)},[Ui,m,Dr,Mr,kr]);var je=p.useCallback(function(M){var z=M.onRest,V=M.config,Y=(V=V===void 0?{}:V).velocity,pe=Y===void 0?1:Y,ie=Vs(V,U3),de=Vs(M,$3);return new Promise(function(fe){return me(De({},de,{config:De({velocity:pe},ie,{mass:1,tension:z3,friction:Math.max(ys,ys+(ys-ys*pe))}),onRest:function(){var ge=[].slice.call(arguments);fe.apply(void 0,ge),z==null||z.apply(void 0,ge)}}))})},[me]),Lc=Cy(V3,{devTools:!1,actions:{onOpenCancel:p.useCallback(function(){return ae.current==null?void 0:ae.current({type:"OPEN"})},[]),onSnapCancel:p.useCallback(function(M){return ae.current==null?void 0:ae.current({type:"SNAP",source:M.snapSource})},[]),onCloseCancel:p.useCallback(function(){return ae.current==null?void 0:ae.current({type:"CLOSE"})},[]),onResizeCancel:p.useCallback(function(){return ae.current==null?void 0:ae.current({type:"RESIZE",source:Fn.current})},[]),onOpenEnd:p.useCallback(function(){return le.current==null?void 0:le.current({type:"OPEN"})},[]),onSnapEnd:p.useCallback(function(M,z){return le.current==null?void 0:le.current({type:"SNAP",source:M.snapSource})},[]),onResizeEnd:p.useCallback(function(){return le.current==null?void 0:le.current({type:"RESIZE",source:Fn.current})},[])},context:{initialState:c},services:{onSnapStart:p.useCallback(function(M,z){try{return Promise.resolve(q.current==null?void 0:q.current({type:"SNAP",source:z.payload.source||"custom"}))}catch(V){return Promise.reject(V)}},[]),onOpenStart:p.useCallback(function(){try{return Promise.resolve(q.current==null?void 0:q.current({type:"OPEN"}))}catch(M){return Promise.reject(M)}},[]),onCloseStart:p.useCallback(function(){try{return Promise.resolve(q.current==null?void 0:q.current({type:"CLOSE"}))}catch(M){return Promise.reject(M)}},[]),onResizeStart:p.useCallback(function(){try{return Promise.resolve(q.current==null?void 0:q.current({type:"RESIZE",source:Fn.current}))}catch(M){return Promise.reject(M)}},[]),onSnapEnd:p.useCallback(function(M,z){try{return Promise.resolve(le.current==null?void 0:le.current({type:"SNAP",source:M.snapSource}))}catch(V){return Promise.reject(V)}},[]),onOpenEnd:p.useCallback(function(){try{return Promise.resolve(le.current==null?void 0:le.current({type:"OPEN"}))}catch(M){return Promise.reject(M)}},[]),onCloseEnd:p.useCallback(function(){try{return Promise.resolve(le.current==null?void 0:le.current({type:"CLOSE"}))}catch(M){return Promise.reject(M)}},[]),onResizeEnd:p.useCallback(function(){try{return Promise.resolve(le.current==null?void 0:le.current({type:"RESIZE",source:Fn.current}))}catch(M){return Promise.reject(M)}},[]),renderVisuallyHidden:p.useCallback(function(M,z){try{return Promise.resolve(je({y:vt.current,ready:0,maxHeight:Rt.current,maxSnap:Ce.current,minSnap:vt.current,immediate:!0})).then(function(){})}catch(V){return Promise.reject(V)}},[je]),activate:p.useCallback(function(M,z){try{return $.current=!0,Promise.resolve(Promise.all([Bn.current.activate(),Hn.current.activate(),Vn.current.activate()])).then(function(){})}catch(V){return Promise.reject(V)}},[Vn,Hn,Bn]),deactivate:p.useCallback(function(){try{return Bn.current.deactivate(),Hn.current.deactivate(),Vn.current.deactivate(),$.current=!1,Promise.resolve()}catch(M){return Promise.reject(M)}},[Vn,Hn,Bn]),openImmediately:p.useCallback(function(){try{return Ke.current=vt.current,Promise.resolve(je({y:vt.current,ready:1,maxHeight:Rt.current,maxSnap:Ce.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:Rt.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:Rt.current,maxSnap:Ce.current,minSnap:vt.current,immediate:zt.current})).then(function(){})})}catch(M){return Promise.reject(M)}},[je,zt]),snapSmoothly:p.useCallback(function(M,z){try{var V=$i.current(M.y);return Ke.current=V,l.current=V,Promise.resolve(je({y:V,ready:1,maxHeight:Rt.current,maxSnap:Ce.current,minSnap:Qe.current,immediate:zt.current,config:{velocity:M.velocity}})).then(function(){})}catch(Y){return Promise.reject(Y)}},[je,l,zt]),resizeSmoothly:p.useCallback(function(){try{var M=$i.current(Ke.current);return Ke.current=M,l.current=M,Promise.resolve(je({y:M,ready:1,maxHeight:Rt.current,maxSnap:Ce.current,minSnap:Qe.current,immediate:Fn.current!=="element"||zt.current})).then(function(){})}catch(z){return Promise.reject(z)}},[je,l,zt]),closeSmoothly:p.useCallback(function(M,z){try{return je({minSnap:Ke.current,immediate:!0}),Ke.current=0,Promise.resolve(je({y:0,maxHeight:Rt.current,maxSnap:Ce.current,immediate:zt.current})).then(function(){return Promise.resolve(je({ready:0,immediate:!0})).then(function(){})})}catch(V){return Promise.reject(V)}},[je,zt])}}),Hh=Lc[0],qt=Lc[1];p.useEffect(function(){H&&qt(a?"OPEN":"CLOSE")},[a,qt,H]),di(function(){(Dr||Mr||kr)&&qt("RESIZE")},[Dr,Mr,kr,qt]),p.useEffect(function(){return function(){Bn.current.deactivate(),Hn.current.deactivate(),Vn.current.deactivate()}},[Vn,Hn,Bn]),p.useImperativeHandle(e,function(){return{snapTo:function(M,z){var V=z===void 0?{}:z,Y=V.velocity,pe=Y===void 0?1:Y,ie=V.source,de=ie===void 0?"custom":ie;qt("SNAP",{payload:{y:$i.current(M),velocity:pe,source:de}})},get height(){return Ke.current}}},[qt]),p.useEffect(function(){var M=$t.current,z=function(Y){Co.current&&Y.preventDefault()},V=function(Y){M.scrollTop<0&&(requestAnimationFrame(function(){M.style.overflow="hidden",M.scrollTop=0,M.style.removeProperty("overflow")}),Y.preventDefault())};return T&&(M.addEventListener("scroll",z),M.addEventListener("touchmove",z),M.addEventListener("touchstart",V)),function(){M.removeEventListener("scroll",z),M.removeEventListener("touchmove",z),M.removeEventListener("touchstart",V)}},[T,$t]);var zi=q2(function(M){var z=M.args,V=(z=z===void 0?[]:z)[0],Y=(V=V===void 0?{}:V).closeOnTap,pe=Y!==void 0&&Y,ie=V.isContentDragging,de=ie!==void 0&&ie,fe=M.cancel,ge=M.direction[1],G=M.down,se=M.first,Je=M.last,Un=M.memo,st=Un===void 0?Ee.y.getValue():Un,Oe=M.tap,ot=M.velocity,Lt=-1*M.movement[1];if(!$.current)return fe(),st;if(d&&pe&&Oe)return fe(),setTimeout(function(){return d()},0),st;if(Oe)return st;var Ne=st+Lt,hn=Lt*ot,$n=Math.max(Qe.current,Math.min(Ce.current,Ne+2*hn));if(!G&&d&&ge>0&&Ne+hn<Qe.current/2)return fe(),d(),st;var at=G?d||Qe.current!==Ce.current?ai(Ne,d?0:Qe.current,Ce.current,.55):Ne<Qe.current?ai(Ne,Qe.current,2*Ce.current,.55):ai(Ne,Qe.current/2,Ce.current,.55):$n;return T&&de?(at>=Ce.current&&(at=Ce.current),st===Ce.current&&$t.current.scrollTop>0&&(at=Ce.current),Co.current=at<Ce.current):Co.current=!1,se&&qt("DRAG"),Je?(qt("SNAP",{payload:{y:at,velocity:ot>.05?ot:1,source:"dragging"}}),st):(me({y:at,ready:1,maxHeight:Rt.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 Uh=function(M){var z,V=M.spring,Y=Zn([V.y,V.maxHeight],function(G,se){return Math.round(zr(se-G,0,16))+"px"}),pe=Zn([V.y,V.minSnap,V.maxSnap],function(G,se,Je){return zr(G,se,Je)+"px"}),ie=Zn([V.y,V.minSnap,V.maxSnap],function(G,se,Je){return G<se?se-G+"px":G>Je?Je-G+"px":"0px"}),de=Zn([V.y,V.maxSnap],function(G,se){return G>=se?Math.ceil(G-se):0}),fe=Zn([V.y,V.minSnap],function(G,se){if(!se)return 0;var Je=Math.max(se/2-45,0);return zr((G-Je)*(1/(Math.min(se/2+45,se)-Je)+0),0,1)}),ge=Zn([V.y,V.minSnap],function(G,se){return se?zr(G/se,0,1):0});return(z={})["--rsbs-content-opacity"]=fe,z["--rsbs-backdrop-opacity"]=ge,z["--rsbs-antigap-scale-y"]=de,z["--rsbs-overlay-translate-y"]=ie,z["--rsbs-overlay-rounded"]=Y,z["--rsbs-overlay-h"]=pe,z}({spring:Ee});return p.createElement(l2.div,De({},D,{"data-rsbs-root":!0,"data-rsbs-state":G3.find(Hh.matches),"data-rsbs-is-blocking":_,"data-rsbs-is-dismissable":!!d,"data-rsbs-has-header":!!o,"data-rsbs-has-footer":!!s,className:i,ref:Ut,style:De({},Uh,x,{opacity:Ee.ready})}),r,_&&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:In,onKeyDown:function(M){M.key==="Escape"&&(M.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:$t},T?zi({isContentDragging:!0}):{}),p.createElement("div",{"data-rsbs-content":!0,ref:Lr},n)),s&&p.createElement("div",De({key:"footer",ref:Vi,"data-rsbs-footer":!0},zi()),s)))}),G3=["closed","opening","open","closing","dragging","snapping","resizing"];function W3(t){var e=t.lastSnap;return e??Math.min.apply(Math,t.snapPoints)}function Z3(t){return t.minHeight}var K3=["onSpringStart","onSpringEnd","skipInitialTransition"],oh=p.forwardRef(function(t,e){var n=t.onSpringStart,r=t.onSpringEnd,i=t.skipInitialTransition,s=Vs(t,K3),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");di(function(){if(s.open)return cancelAnimationFrame(l.current),c(!0),function(){d.current="CLOSED"}},[s.open]);var f=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(v1,{"data-rsbs-portal":!0},p.createElement(q3,De({},s,{lastSnapRef:u,ref:e,initialState:d.current,onSpringStart:f,onSpringEnd:v}))):null});const ah=28,Q3="MapGoogle-module__root__Vi-sMl",J3="MapGoogle-module__mapContainer__OCCTIX",X3="MapGoogle-module__balloon__4UVhuT",Y3="MapGoogle-module__details__4osNXn",eb="MapGoogle-module__cluster__5qmRds",tb="MapGoogle-module__number__JdGUGZ",nb="MapGoogle-module__overlay__g-nEoT",rb="MapGoogle-module__mapControl__mzyTwr",ib="MapGoogle-module__geolocationControl__1exHgA",sb="MapGoogle-module__bottomSheet__avcBmY",ob="MapGoogle-module__locationViewContent__xwLeDh",ab="MapGoogle-module__locationViewHeader__maBLv0",cb="MapGoogle-module__deliveryDetailsViewContent__wH-RCe",lb="MapGoogle-module__deliveryDetailsViewHeader__4AKoBe",ub="MapGoogle-module__sheetSubmit__rPQG26",Le={root:Q3,mapContainer:J3,balloon:X3,details:Y3,cluster:eb,number:tb,overlay:nb,mapControl:rb,geolocationControl:ib,bottomSheet:sb,locationViewContent:ob,locationViewHeader:ab,deliveryDetailsViewContent:cb,deliveryDetailsViewHeader:lb,sheetSubmit:ub},ch=({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]),w.jsx(oh,{expandOnContentDrag:!0,open:c,initialFocusRef:!1,defaultSnap:({snapPoints:u})=>Math.min(...u),blocking:!1,snapPoints:({footerHeight:u,headerHeight:d,maxHeight:f,minHeight:v})=>[n==null?v:d+u+n,f-ah],footer:e?null:w.jsx(rt,{disabled:s,loading:o,variant:"primary",className:Le.sheetSubmit,onClick:r,children:w.jsx(It,{keyName:"choose",ns:"common"})}),sibling:w.jsx("div",{role:"presentation","data-rsbs-backdrop":"true",onClick:u=>{var d;u.stopPropagation(),u.preventDefault(),(d=a.onDismiss)==null||d.call(a)}}),children:w.jsx("div",{className:Le.bottomSheet,children:t})})},db={header:Le.locationViewHeader,content:Le.locationViewContent},fb=({handleCloseClick:t,handleSubmitClick:e})=>{const n=Nn("screenSm"),r=it(c=>c.location),i=!!r,s=dc({isSelectedPoint:i}),{isIdle:o}=Z(),a=o&&i&&s;return n&&r?w.jsx(ch,{minSnapHeight:300,open:!!a,onDismiss:t,onSubmitClick:()=>e(r),children:w.jsx(lf,{hideActions:!0,classes:db,location:r,onClose:t})}):null},hb="Overlay-module__root__3qTsUC",pb={root:hb},lh=({children:t,className:e})=>w.jsx("div",{className:K(pb.root,e),children:t}),mb=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32",fill:"none",...t},I.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"})),gb='<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>',vb=`<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" viewBox="0 0 48 66" fill="none">
50
+ */function Wl(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 Zl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Wl(Object(n),!0).forEach(function(r){a3(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function a3(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Kl=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()}}}(),c3=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},l3=function(e){return e.key==="Escape"||e.key==="Esc"||e.keyCode===27},u3=function(e){return e.key==="Tab"||e.keyCode===9},Ql=function(e){return setTimeout(e,0)},Jl=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},d3=function(e,n){var r=(n==null?void 0:n.document)||document,i=Zl({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,A=_.tabbableNodes;return O.contains(g)||A.find(function(R){return R===g})})},l=function(g){var _=i[g];if(typeof _=="function"){for(var O=arguments.length,A=new Array(O>1?O-1:0),R=1;R<O;R++)A[R-1]=arguments[R];_=_.apply(void 0,A)}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 _=i3(g,i.tabbableOptions),O=s3(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,T=O.findIndex(function(D){return D===R});if(!(T<0))return L?O.slice(T+1).find(function(D){return fs(D,i.tabbableOptions)}):O.slice(0,T).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,c3(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 A=c(_),R=A>=0?s.containerGroups[A]:void 0;if(A<0)g.shiftKey?O=s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:O=s.tabbableGroups[0].firstTabbableNode;else if(g.shiftKey){var L=Jl(s.tabbableGroups,function($){var q=$.firstTabbableNode;return _===q});if(L<0&&(R.container===_||zo(_,i.tabbableOptions)&&!fs(_,i.tabbableOptions)&&!R.nextTabbableNode(_,!1))&&(L=A),L>=0){var T=L===0?s.tabbableGroups.length-1:L-1,D=s.tabbableGroups[T];O=D.lastTabbableNode}}else{var N=Jl(s.tabbableGroups,function($){var q=$.lastTabbableNode;return _===q});if(N<0&&(R.container===_||zo(_,i.tabbableOptions)&&!fs(_,i.tabbableOptions)&&!R.nextTabbableNode(_))&&(N=A),N>=0){var H=N===s.tabbableGroups.length-1?0:N+1,B=s.tabbableGroups[H];O=B.firstTabbableNode}}}else O=l("fallbackFocus");O&&(g.preventDefault(),h(O))},y=function(g){if(l3(g)&&$r(i.escapeDeactivates,g)!==!1){g.preventDefault(),o.deactivate();return}if(u3(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 Kl.activateTrap(o),s.delayInitialFocusTimer=i.delayInitialFocus?Ql(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"),A=a(g,"checkCanFocusTrap");A||d(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=r.activeElement,_&&_();var R=function(){A&&d(),b(),O&&O()};return A?(A(s.containers.concat()).then(R,R),this):(R(),this)},deactivate:function(g){if(!s.active)return this;var _=Zl({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},g);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,E(),s.active=!1,s.paused=!1,Kl.deactivateTrap(o);var O=a(_,"onDeactivate"),A=a(_,"onPostDeactivate"),R=a(_,"checkCanReturnFocus"),L=a(_,"returnFocus","returnFocusOnDeactivate");O&&O();var T=function(){Ql(function(){L&&h(v(s.nodeFocusedBeforeActivation)),A&&A()})};return L&&R?(R(v(s.nodeFocusedBeforeActivation)).then(T,T),this):(T(),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 f3(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 wc=!1;if(typeof window<"u"){var Xl={get passive(){wc=!0}};window.addEventListener("testPassive",null,Xl),window.removeEventListener("testPassive",null,Xl)}var Jf=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),ln=[],no=!1,Xf=-1,ci=void 0,li=void 0,Yf=function(e){return ln.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(e))})},ro=function(e){var n=e||window.event;return Yf(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},h3=function(e){if(li===void 0){var n=!!e&&e.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;n&&r>0&&(li=document.body.style.paddingRight,document.body.style.paddingRight=r+"px")}ci===void 0&&(ci=document.body.style.overflow,document.body.style.overflow="hidden")},p3=function(){li!==void 0&&(document.body.style.paddingRight=li,li=void 0),ci!==void 0&&(document.body.style.overflow=ci,ci=void 0)},m3=function(e){return e?e.scrollHeight-e.scrollTop<=e.clientHeight:!1},g3=function(e,n){var r=e.targetTouches[0].clientY-Xf;return Yf(e.target)?!1:n&&n.scrollTop===0&&r>0||m3(n)&&r<0?ro(e):(e.stopPropagation(),!0)},v3=function(e,n){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!ln.some(function(i){return i.targetElement===e})){var r={targetElement:e,options:n||{}};ln=[].concat(f3(ln),[r]),Jf?(e.ontouchstart=function(i){i.targetTouches.length===1&&(Xf=i.targetTouches[0].clientY)},e.ontouchmove=function(i){i.targetTouches.length===1&&g3(i,e)},no||(document.addEventListener("touchmove",ro,wc?{passive:!1}:void 0),no=!0)):h3(n)}},y3=function(e){if(!e){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}ln=ln.filter(function(n){return n.targetElement!==e}),Jf?(e.ontouchstart=null,e.ontouchmove=null,no&&ln.length===0&&(document.removeEventListener("touchmove",ro,wc?{passive:!1}:void 0),no=!1)):ln.length||p3()},Rn=[],b3=function(){return Rn.some(function(t){return t.activeTargets.length>0})},w3=function(){return Rn.some(function(t){return t.skippedTargets.length>0})},Yl="ResizeObserver loop completed with undelivered notifications.",S3=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:Yl}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=Yl),window.dispatchEvent(t)},vi;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(vi||(vi={}));var Ln=function(t){return Object.freeze(t)},C3=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,Ln(this)}return t}(),eh=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,Ln(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}(),Sc=function(t){return t instanceof SVGElement&&"getBBox"in t},th=function(t){if(Sc(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)},eu=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)},_3=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},ui=typeof window<"u"?window:{},ps=new WeakMap,tu=/auto|scroll/,E3=/^tb|vertical/,x3=/msie|trident/i.test(ui.navigator&&ui.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 C3((n?e:t)||0,(n?t:e)||0)},nu=Ln({devicePixelContentBoxSize:or(),borderBoxSize:or(),contentBoxSize:or(),contentRect:new eh(0,0,0,0)}),nh=function(t,e){if(e===void 0&&(e=!1),ps.has(t)&&!e)return ps.get(t);if(th(t))return ps.set(t,nu),nu;var n=getComputedStyle(t),r=Sc(t)&&t.ownerSVGElement&&t.getBBox(),i=!x3&&n.boxSizing==="border-box",s=E3.test(n.writingMode||""),o=!r&&tu.test(n.overflowY||""),a=!r&&tu.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,A=r?r.height:yt(n.height)-_-E,R=O+w+x+C,L=A+y+E+b,T=Ln({devicePixelContentBoxSize:or(Math.round(O*devicePixelRatio),Math.round(A*devicePixelRatio),s),borderBoxSize:or(R,L,s),contentBoxSize:or(O,A,s),contentRect:new eh(d,c,O,A)});return ps.set(t,T),T},rh=function(t,e,n){var r=nh(t,n),i=r.borderBoxSize,s=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(e){case vi.DEVICE_PIXEL_CONTENT_BOX:return o;case vi.BORDER_BOX:return i;default:return s}},O3=function(){function t(e){var n=nh(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=Ln([n.borderBoxSize]),this.contentBoxSize=Ln([n.contentBoxSize]),this.devicePixelContentBoxSize=Ln([n.devicePixelContentBoxSize])}return t}(),ih=function(t){if(th(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},T3=function(){var t=1/0,e=[];Rn.forEach(function(o){if(o.activeTargets.length!==0){var a=[];o.activeTargets.forEach(function(l){var u=new O3(l.target),d=ih(l.target);a.push(u),l.lastReportedSize=rh(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},ru=function(t){Rn.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(ih(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},P3=function(){var t=0;for(ru(t);b3();)t=T3(),ru(t);return w3()&&S3(),t>0},qo,sh=[],A3=function(){return sh.splice(0).forEach(function(t){return t()})},R3=function(t){if(!qo){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return A3()}).observe(n,r),qo=function(){n.textContent="".concat(e?e--:e++)}}sh.push(t),qo()},L3=function(t){R3(function(){requestAnimationFrame(t)})},Bs=0,k3=function(){return!!Bs},M3=250,D3={attributes:!0,characterData:!0,childList:!0,subtree:!0},iu=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],su=function(t){return t===void 0&&(t=0),Date.now()+t},Go=!1,j3=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=M3),!Go){Go=!0;var r=su(e);L3(function(){var i=!1;try{i=P3()}finally{if(Go=!1,e=r-su(),!k3())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,D3)};document.body?n():ui.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),iu.forEach(function(n){return ui.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),iu.forEach(function(n){return ui.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),Ia=new j3,ou=function(t){!Bs&&t>0&&Ia.start(),Bs+=t,!Bs&&Ia.stop()},N3=function(t){return!Sc(t)&&!_3(t)&&getComputedStyle(t).display==="inline"},I3=function(){function t(e,n){this.target=e,this.observedBox=n||vi.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=rh(this.target,this.observedBox,!0);return N3(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),F3=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),ms=new WeakMap,au=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 F3(e,n);ms.set(e,r)},t.observe=function(e,n,r){var i=ms.get(e),s=i.observationTargets.length===0;au(i.observationTargets,n)<0&&(s&&Rn.push(i),i.observationTargets.push(new I3(n,r&&r.box)),ou(1),Ia.schedule())},t.unobserve=function(e,n){var r=ms.get(e),i=au(r.observationTargets,n),s=r.observationTargets.length===1;i>=0&&(s&&Rn.splice(Rn.indexOf(r),1),r.observationTargets.splice(i,1),ou(-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}(),B3=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(!eu(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(!eu(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 di=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 V3={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 di(function(){if(t.current&&r){var l=new B3(c);return l.observe(t.current,V3),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 cu={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},lu={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},H3=hy({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({},cu,lu)}}},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({},cu,lu)}}},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:[py({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"}}}),U3=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],$3=["velocity"],z3=["onRest","config"],oh=Vy.default,q3=oh.tension,ys=oh.friction,G3=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?Z3:v,f=t.snapPoints,w=f===void 0?K3: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,A=t.reserveScrollBarGap,R=A===void 0?C:A,L=t.expandOnContentDrag,T=L!==void 0&&L,D=Vs(t,U3),N=function(){var M=p.useState(!1),z=M[0],V=M[1],Y=p.useState({}),pe=Y[0],ie=Y[1],de=p.useCallback(function(fe){return ie(function(ge){var G;return De({},ge,((G={})[fe]=!1,G))}),function(){ie(function(ge){var G;return De({},ge,((G={})[fe]=!0,G))})}},[]);return p.useEffect(function(){var fe=Object.values(pe);fe.length!==0&&fe.every(Boolean)&&V(!0)},[pe]),{ready:z,registerReady:de}}(),H=N.ready,B=N.registerReady,$=p.useRef(!1),q=p.useRef(g),ae=p.useRef(_),le=p.useRef(O);p.useEffect(function(){q.current=g,ae.current=_,le.current=O},[_,g,O]);var ue,ne,qe=qy(function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}}),Ee=qe[0],me=qe[1],Ut=p.useRef(null),$t=p.useRef(null),Lr=p.useRef(null),gt=p.useRef(null),Vi=p.useRef(null),In=p.useRef(null),Ke=p.useRef(0),Fn=p.useRef(),Co=p.useRef(!1),zt=(ue=p.useMemo(function(){return typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null},[]),ne=p.useRef(ue==null?void 0:ue.matches),p.useDebugValue(ne.current?"reduce":"no-preference"),p.useEffect(function(){var M=function(z){ne.current=z.matches};return ue==null||ue.addListener(M),function(){return ue==null?void 0:ue.removeListener(M)}},[ue]),ne),Bn=function(M){var z=M.targetRef,V=M.enabled,Y=M.reserveScrollBarGap,pe=p.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return p.useDebugValue(V?"Enabled":"Disabled"),p.useEffect(function(){if(!V)return pe.current.deactivate(),void(pe.current={activate:function(){},deactivate:function(){}});var ie=z.current,de=!1;pe.current={activate:function(){de||(de=!0,v3(ie,{allowTouchMove:function(fe){return fe.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:Y}))},deactivate:function(){de&&(de=!1,y3(ie))}}},[V,z,Y]),pe}({targetRef:$t,enabled:H&&E,reserveScrollBarGap:R}),Vn=function(M){var z=M.targetRef,V=M.enabled,Y=p.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return p.useDebugValue(V?"Enabled":"Disabled"),p.useEffect(function(){if(!V)return Y.current.deactivate(),void(Y.current={activate:function(){},deactivate:function(){}});var pe=z.current,ie=!1,de=[],fe=[];Y.current={activate:function(){if(!ie){ie=!0;var ge=pe.parentNode;document.querySelectorAll("body > *").forEach(function(G){if(G!==ge){var se=G.getAttribute("aria-hidden");se!==null&&se!=="false"||(de.push(se),fe.push(G),G.setAttribute("aria-hidden","true"))}})}},deactivate:function(){ie&&(ie=!1,fe.forEach(function(ge,G){var se=de[G];se===null?ge.removeAttribute("aria-hidden"):ge.setAttribute("aria-hidden",se)}),de=[],fe=[])}}},[z,V]),Y}({targetRef:Ut,enabled:H&&C}),Hn=function(M){var z=M.targetRef,V=M.fallbackRef,Y=M.initialFocusRef,pe=M.enabled,ie=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 ie.current.deactivate(),void(ie.current={activate:function(){},deactivate:function(){}});var de=V.current,fe=d3(z.current,{onActivate:void 0,initialFocus:Y?function(){return(Y==null?void 0:Y.current)||de}:void 0,fallbackFocus:de,escapeDeactivates:!1,clickOutsideDeactivates:!1}),ge=!1;ie.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,V,Y,z]),ie}({targetRef:Ut,fallbackRef:In,initialFocusRef:u||void 0,enabled:H&&C&&u!==!1}),Hi=function(M){var z=M.getSnapPoints,V=M.heightRef,Y=M.lastSnapRef,pe=M.ready,ie=function(Oe){var ot=Oe.contentRef,Lt=Oe.controlledMaxHeight,Ne=Oe.footerEnabled,hn=Oe.footerRef,$n=Oe.headerEnabled,at=Oe.headerRef,jr=Oe.registerReady,qi=Oe.resizeSourceRef,kc=p.useMemo(function(){return jr("contentHeight")},[jr]),Mc=function(Nr,Ic,Gi){var Wi=p.useMemo(function(){return Ic("maxHeight")},[Ic]),Fc=p.useState(function(){return vs(Nr)||typeof window<"u"?window.innerHeight:0}),Bc=Fc[0],xo=Fc[1],Vc=Bc>0,Zi=p.useRef(0);return p.useDebugValue(Nr?"controlled":"auto"),p.useEffect(function(){Vc&&Wi()},[Vc,Wi]),di(function(){if(Nr)return xo(vs(Nr)),void(Gi.current="maxheightprop");var Hc=function(){Zi.current||(Zi.current=requestAnimationFrame(function(){xo(window.innerHeight),Gi.current="window",Zi.current=0}))};return window.addEventListener("resize",Hc),xo(window.innerHeight),Gi.current="window",Wi(),function(){window.removeEventListener("resize",Hc),cancelAnimationFrame(Zi.current)}},[Nr,Wi,Gi]),Bc}(Lt,jr,qi),_o=Wo(at,{label:"headerHeight",enabled:$n,resizeSourceRef:qi}),Dc=Wo(ot,{label:"contentHeight",enabled:!0,resizeSourceRef:qi}),Eo=Wo(hn,{label:"footerHeight",enabled:Ne,resizeSourceRef:qi}),jc=Math.min(Mc-_o-Eo,Dc)+_o+Eo;p.useDebugValue("minHeight: "+jc);var Nc=Dc>0;return p.useEffect(function(){Nc&&kc()},[Nc,kc]),{maxHeight:Mc,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=ie.maxHeight,fe=ie.minHeight,ge=ie.headerHeight,G=ie.footerHeight,se=function(Oe,ot){var Lt=[].concat(Oe).map(vs).reduce(function(at,jr){return at.add(zr(jr,0,ot)),at},new Set),Ne=Array.from(Lt),hn=Math.min.apply(Math,Ne);if(Number.isNaN(hn))throw new TypeError("minSnap is NaN");var $n=Math.max.apply(Math,Ne);if(Number.isNaN($n))throw new TypeError("maxSnap is NaN");return{snapPoints:Ne,minSnap:hn,maxSnap:$n}}(pe?z({height:V.current,footerHeight:G,headerHeight:ge,minHeight:fe,maxHeight:de}):[0],de),Je=se.snapPoints,Un=se.minSnap,st=se.maxSnap;return p.useDebugValue("minSnap: "+Un+", maxSnap:"+st),{minSnap:Un,maxSnap:st,findSnap:function(Oe){var ot=vs(typeof Oe=="function"?Oe({footerHeight:G,headerHeight:ge,height:V.current,minHeight:fe,maxHeight:de,snapPoints:Je,lastSnap:Y.current}):Oe);return Je.reduce(function(Lt,Ne){return Math.abs(Ne-ot)<Math.abs(Lt-ot)?Ne:Lt},Un)},maxHeight:de}}({contentRef:Lr,controlledMaxHeight:h,footerEnabled:!!s,footerRef:Vi,getSnapPoints:w,headerEnabled:o!==!1,headerRef:gt,heightRef:Ke,lastSnapRef:l,ready:H,registerReady:B,resizeSourceRef:Fn}),kr=Hi.minSnap,Mr=Hi.maxSnap,Dr=Hi.maxHeight,Ui=Hi.findSnap,Rt=p.useRef(Dr),Qe=p.useRef(kr),Ce=p.useRef(Mr),$i=p.useRef(Ui),vt=p.useRef(0);di(function(){Rt.current=Dr,Ce.current=Mr,Qe.current=kr,$i.current=Ui,vt.current=Ui(m)},[Ui,m,Dr,Mr,kr]);var je=p.useCallback(function(M){var z=M.onRest,V=M.config,Y=(V=V===void 0?{}:V).velocity,pe=Y===void 0?1:Y,ie=Vs(V,$3),de=Vs(M,z3);return new Promise(function(fe){return me(De({},de,{config:De({velocity:pe},ie,{mass:1,tension:q3,friction:Math.max(ys,ys+(ys-ys*pe))}),onRest:function(){var ge=[].slice.call(arguments);fe.apply(void 0,ge),z==null||z.apply(void 0,ge)}}))})},[me]),Lc=_y(H3,{devTools:!1,actions:{onOpenCancel:p.useCallback(function(){return ae.current==null?void 0:ae.current({type:"OPEN"})},[]),onSnapCancel:p.useCallback(function(M){return ae.current==null?void 0:ae.current({type:"SNAP",source:M.snapSource})},[]),onCloseCancel:p.useCallback(function(){return ae.current==null?void 0:ae.current({type:"CLOSE"})},[]),onResizeCancel:p.useCallback(function(){return ae.current==null?void 0:ae.current({type:"RESIZE",source:Fn.current})},[]),onOpenEnd:p.useCallback(function(){return le.current==null?void 0:le.current({type:"OPEN"})},[]),onSnapEnd:p.useCallback(function(M,z){return le.current==null?void 0:le.current({type:"SNAP",source:M.snapSource})},[]),onResizeEnd:p.useCallback(function(){return le.current==null?void 0:le.current({type:"RESIZE",source:Fn.current})},[])},context:{initialState:c},services:{onSnapStart:p.useCallback(function(M,z){try{return Promise.resolve(q.current==null?void 0:q.current({type:"SNAP",source:z.payload.source||"custom"}))}catch(V){return Promise.reject(V)}},[]),onOpenStart:p.useCallback(function(){try{return Promise.resolve(q.current==null?void 0:q.current({type:"OPEN"}))}catch(M){return Promise.reject(M)}},[]),onCloseStart:p.useCallback(function(){try{return Promise.resolve(q.current==null?void 0:q.current({type:"CLOSE"}))}catch(M){return Promise.reject(M)}},[]),onResizeStart:p.useCallback(function(){try{return Promise.resolve(q.current==null?void 0:q.current({type:"RESIZE",source:Fn.current}))}catch(M){return Promise.reject(M)}},[]),onSnapEnd:p.useCallback(function(M,z){try{return Promise.resolve(le.current==null?void 0:le.current({type:"SNAP",source:M.snapSource}))}catch(V){return Promise.reject(V)}},[]),onOpenEnd:p.useCallback(function(){try{return Promise.resolve(le.current==null?void 0:le.current({type:"OPEN"}))}catch(M){return Promise.reject(M)}},[]),onCloseEnd:p.useCallback(function(){try{return Promise.resolve(le.current==null?void 0:le.current({type:"CLOSE"}))}catch(M){return Promise.reject(M)}},[]),onResizeEnd:p.useCallback(function(){try{return Promise.resolve(le.current==null?void 0:le.current({type:"RESIZE",source:Fn.current}))}catch(M){return Promise.reject(M)}},[]),renderVisuallyHidden:p.useCallback(function(M,z){try{return Promise.resolve(je({y:vt.current,ready:0,maxHeight:Rt.current,maxSnap:Ce.current,minSnap:vt.current,immediate:!0})).then(function(){})}catch(V){return Promise.reject(V)}},[je]),activate:p.useCallback(function(M,z){try{return $.current=!0,Promise.resolve(Promise.all([Bn.current.activate(),Hn.current.activate(),Vn.current.activate()])).then(function(){})}catch(V){return Promise.reject(V)}},[Vn,Hn,Bn]),deactivate:p.useCallback(function(){try{return Bn.current.deactivate(),Hn.current.deactivate(),Vn.current.deactivate(),$.current=!1,Promise.resolve()}catch(M){return Promise.reject(M)}},[Vn,Hn,Bn]),openImmediately:p.useCallback(function(){try{return Ke.current=vt.current,Promise.resolve(je({y:vt.current,ready:1,maxHeight:Rt.current,maxSnap:Ce.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:Rt.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:Rt.current,maxSnap:Ce.current,minSnap:vt.current,immediate:zt.current})).then(function(){})})}catch(M){return Promise.reject(M)}},[je,zt]),snapSmoothly:p.useCallback(function(M,z){try{var V=$i.current(M.y);return Ke.current=V,l.current=V,Promise.resolve(je({y:V,ready:1,maxHeight:Rt.current,maxSnap:Ce.current,minSnap:Qe.current,immediate:zt.current,config:{velocity:M.velocity}})).then(function(){})}catch(Y){return Promise.reject(Y)}},[je,l,zt]),resizeSmoothly:p.useCallback(function(){try{var M=$i.current(Ke.current);return Ke.current=M,l.current=M,Promise.resolve(je({y:M,ready:1,maxHeight:Rt.current,maxSnap:Ce.current,minSnap:Qe.current,immediate:Fn.current!=="element"||zt.current})).then(function(){})}catch(z){return Promise.reject(z)}},[je,l,zt]),closeSmoothly:p.useCallback(function(M,z){try{return je({minSnap:Ke.current,immediate:!0}),Ke.current=0,Promise.resolve(je({y:0,maxHeight:Rt.current,maxSnap:Ce.current,immediate:zt.current})).then(function(){return Promise.resolve(je({ready:0,immediate:!0})).then(function(){})})}catch(V){return Promise.reject(V)}},[je,zt])}}),Uh=Lc[0],qt=Lc[1];p.useEffect(function(){H&&qt(a?"OPEN":"CLOSE")},[a,qt,H]),di(function(){(Dr||Mr||kr)&&qt("RESIZE")},[Dr,Mr,kr,qt]),p.useEffect(function(){return function(){Bn.current.deactivate(),Hn.current.deactivate(),Vn.current.deactivate()}},[Vn,Hn,Bn]),p.useImperativeHandle(e,function(){return{snapTo:function(M,z){var V=z===void 0?{}:z,Y=V.velocity,pe=Y===void 0?1:Y,ie=V.source,de=ie===void 0?"custom":ie;qt("SNAP",{payload:{y:$i.current(M),velocity:pe,source:de}})},get height(){return Ke.current}}},[qt]),p.useEffect(function(){var M=$t.current,z=function(Y){Co.current&&Y.preventDefault()},V=function(Y){M.scrollTop<0&&(requestAnimationFrame(function(){M.style.overflow="hidden",M.scrollTop=0,M.style.removeProperty("overflow")}),Y.preventDefault())};return T&&(M.addEventListener("scroll",z),M.addEventListener("touchmove",z),M.addEventListener("touchstart",V)),function(){M.removeEventListener("scroll",z),M.removeEventListener("touchmove",z),M.removeEventListener("touchstart",V)}},[T,$t]);var zi=G2(function(M){var z=M.args,V=(z=z===void 0?[]:z)[0],Y=(V=V===void 0?{}:V).closeOnTap,pe=Y!==void 0&&Y,ie=V.isContentDragging,de=ie!==void 0&&ie,fe=M.cancel,ge=M.direction[1],G=M.down,se=M.first,Je=M.last,Un=M.memo,st=Un===void 0?Ee.y.getValue():Un,Oe=M.tap,ot=M.velocity,Lt=-1*M.movement[1];if(!$.current)return fe(),st;if(d&&pe&&Oe)return fe(),setTimeout(function(){return d()},0),st;if(Oe)return st;var Ne=st+Lt,hn=Lt*ot,$n=Math.max(Qe.current,Math.min(Ce.current,Ne+2*hn));if(!G&&d&&ge>0&&Ne+hn<Qe.current/2)return fe(),d(),st;var at=G?d||Qe.current!==Ce.current?ai(Ne,d?0:Qe.current,Ce.current,.55):Ne<Qe.current?ai(Ne,Qe.current,2*Ce.current,.55):ai(Ne,Qe.current/2,Ce.current,.55):$n;return T&&de?(at>=Ce.current&&(at=Ce.current),st===Ce.current&&$t.current.scrollTop>0&&(at=Ce.current),Co.current=at<Ce.current):Co.current=!1,se&&qt("DRAG"),Je?(qt("SNAP",{payload:{y:at,velocity:ot>.05?ot:1,source:"dragging"}}),st):(me({y:at,ready:1,maxHeight:Rt.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 $h=function(M){var z,V=M.spring,Y=Zn([V.y,V.maxHeight],function(G,se){return Math.round(zr(se-G,0,16))+"px"}),pe=Zn([V.y,V.minSnap,V.maxSnap],function(G,se,Je){return zr(G,se,Je)+"px"}),ie=Zn([V.y,V.minSnap,V.maxSnap],function(G,se,Je){return G<se?se-G+"px":G>Je?Je-G+"px":"0px"}),de=Zn([V.y,V.maxSnap],function(G,se){return G>=se?Math.ceil(G-se):0}),fe=Zn([V.y,V.minSnap],function(G,se){if(!se)return 0;var Je=Math.max(se/2-45,0);return zr((G-Je)*(1/(Math.min(se/2+45,se)-Je)+0),0,1)}),ge=Zn([V.y,V.minSnap],function(G,se){return se?zr(G/se,0,1):0});return(z={})["--rsbs-content-opacity"]=fe,z["--rsbs-backdrop-opacity"]=ge,z["--rsbs-antigap-scale-y"]=de,z["--rsbs-overlay-translate-y"]=ie,z["--rsbs-overlay-rounded"]=Y,z["--rsbs-overlay-h"]=pe,z}({spring:Ee});return p.createElement(u2.div,De({},D,{"data-rsbs-root":!0,"data-rsbs-state":W3.find(Uh.matches),"data-rsbs-is-blocking":C,"data-rsbs-is-dismissable":!!d,"data-rsbs-has-header":!!o,"data-rsbs-has-footer":!!s,className:i,ref:Ut,style:De({},$h,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:In,onKeyDown:function(M){M.key==="Escape"&&(M.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:$t},T?zi({isContentDragging:!0}):{}),p.createElement("div",{"data-rsbs-content":!0,ref:Lr},n)),s&&p.createElement("div",De({key:"footer",ref:Vi,"data-rsbs-footer":!0},zi()),s)))}),W3=["closed","opening","open","closing","dragging","snapping","resizing"];function Z3(t){var e=t.lastSnap;return e??Math.min.apply(Math,t.snapPoints)}function K3(t){return t.minHeight}var Q3=["onSpringStart","onSpringEnd","skipInitialTransition"],ah=p.forwardRef(function(t,e){var n=t.onSpringStart,r=t.onSpringEnd,i=t.skipInitialTransition,s=Vs(t,Q3),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");di(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(y1,{"data-rsbs-portal":!0},p.createElement(G3,De({},s,{lastSnapRef:u,ref:e,initialState:d.current,onSpringStart:h,onSpringEnd:v}))):null});const ch=28,J3="MapGoogle-module__root__Vi-sMl",X3="MapGoogle-module__mapContainer__OCCTIX",Y3="MapGoogle-module__balloon__4UVhuT",eb="MapGoogle-module__details__4osNXn",tb="MapGoogle-module__cluster__5qmRds",nb="MapGoogle-module__number__JdGUGZ",rb="MapGoogle-module__overlay__g-nEoT",ib="MapGoogle-module__mapControl__mzyTwr",sb="MapGoogle-module__geolocationControl__1exHgA",ob="MapGoogle-module__bottomSheet__avcBmY",ab="MapGoogle-module__locationViewContent__xwLeDh",cb="MapGoogle-module__locationViewHeader__maBLv0",lb="MapGoogle-module__deliveryDetailsViewContent__wH-RCe",ub="MapGoogle-module__deliveryDetailsViewHeader__4AKoBe",db="MapGoogle-module__sheetSubmit__rPQG26",Le={root:J3,mapContainer:X3,balloon:Y3,details:eb,cluster:tb,number:nb,overlay:rb,mapControl:ib,geolocationControl:sb,bottomSheet:ob,locationViewContent:ab,locationViewHeader:cb,deliveryDetailsViewContent:lb,deliveryDetailsViewHeader:ub,sheetSubmit:db},lh=({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(ah,{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-ch],footer:e?null:S.jsx(rt,{disabled:s,loading:o,variant:"primary",className:Le.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:Le.bottomSheet,children:t})})},fb={header:Le.locationViewHeader,content:Le.locationViewContent},hb=({handleCloseClick:t,handleSubmitClick:e})=>{const n=Nn("screenSm"),r=it(c=>c.location),i=!!r,s=dc({isSelectedPoint:i}),{isIdle:o}=Z(),a=o&&i&&s;return n&&r?S.jsx(lh,{minSnapHeight:300,open:!!a,onDismiss:t,onSubmitClick:()=>e(r),children:S.jsx(uf,{hideActions:!0,classes:fb,location:r,onClose:t})}):null},pb="Overlay-module__root__3qTsUC",mb={root:pb},uh=({children:t,className:e})=>S.jsx("div",{className:K(mb.root,e),children:t}),gb=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32",fill:"none",...t},I.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"})),vb='<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>',yb=`<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" />
@@ -64,7 +64,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
64
64
  <stop offset="1" stop-opacity="0" />
65
65
  </radialGradient>
66
66
  </defs>
67
- </svg>`,yb=`<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" viewBox="0 0 48 66" fill="none">
67
+ </svg>`,bb=`<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" viewBox="0 0 48 66" fill="none">
68
68
  <path
69
69
  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"
70
70
  fill="url(#paint0_radial_10036_91748)" 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>`,bb=`<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" viewBox="0 0 48 66" fill="none">
84
+ </svg>`,wb=`<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>`,wb=`<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" viewBox="0 0 48 66" fill="none">
101
+ </svg>`,Sb=`<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" />
@@ -115,7 +115,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
115
115
  <stop offset="1" stop-opacity="0" />
116
116
  </radialGradient>
117
117
  </defs>
118
- </svg>`,Sb=`<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" fill="none" viewBox="0 0 48 66">
118
+ </svg>`,Cb=`<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" fill="none" viewBox="0 0 48 66">
119
119
  <path fill="url(#a)" fill-opacity=".4"
120
120
  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"
121
121
  style="mix-blend-mode:darken" />
@@ -153,7 +153,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
153
153
  <feBlend in="SourceGraphic" in2="effect1_backgroundBlur_958_9661" result="shape" />
154
154
  </filter>
155
155
  </defs>
156
- </svg>`,Cb=`<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" viewBox="0 0 48 66" fill="none">
156
+ </svg>`,_b=`<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" viewBox="0 0 48 66" fill="none">
157
157
  <path
158
158
  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"
159
159
  fill="url(#paint0_radial_12732_84274)" fill-opacity="0.4" />
@@ -176,7 +176,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
176
176
  <stop offset="1" stop-opacity="0" />
177
177
  </radialGradient>
178
178
  </defs>
179
- </svg>`,_b=`<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" viewBox="0 0 48 66" fill="none">
179
+ </svg>`,Eb=`<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" viewBox="0 0 48 66" fill="none">
180
180
  <path
181
181
  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"
182
182
  fill="url(#paint0_radial_12732_84297)" fill-opacity="0.4" />
@@ -199,18 +199,18 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
199
199
  <stop offset="1" stop-opacity="0" />
200
200
  </radialGradient>
201
201
  </defs>
202
- </svg>`,Eb=`<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
202
+ </svg>`,xb=`<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
203
203
  <rect width="48" height="48" fill="#6A4A9D"/>
204
204
  <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"/>
205
205
  </svg>
206
- `,xb=`<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
206
+ `,Ob=`<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
207
207
  <path
208
208
  d="M48 24C48 37.2548 37.2548 48 24 48C10.7452 48 0 37.2548 0 24C0 10.7452 10.7452 0 24 0C37.2548 0 48 10.7452 48 24Z"
209
209
  fill="currentColor" />
210
210
  <path fill-rule="evenodd" clip-rule="evenodd"
211
211
  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"
212
212
  fill="#000000" />
213
- </svg>`,Ob=`<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="none">
213
+ </svg>`,Tb=`<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="none">
214
214
  <rect width="48" height="48" fill="black" />
215
215
  <path
216
216
  d="M28.1433 19.2998C22.809 16.6897 22.3296 12.1691 22.88 9H20.3824C14.0984 9 9 14.217 9 20.6578V36.4793C11.3696 31.1249 12.9529 27.7475 20.2514 26.189C30.442 24.0131 38.6069 24.4126 28.1433 19.2982V19.2998ZM16.9937 22.161C15.5106 22.161 14.3096 20.9309 14.3096 19.4119C14.3096 17.8929 15.5106 16.6645 16.9937 16.6645C18.4768 16.6645 19.6763 17.8945 19.6763 19.4119C19.6763 20.9293 18.4753 22.161 16.9937 22.161Z"
@@ -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:Sb,PinHome:gb,PinOmnic:bb,PinWeChip:Cb,PinOmnicSelected:wb,PinWeChipSelected:_b,PinLlamaSelected:yb,PinLlama:vb,PointOmnic:xb,PointLlama:Eb,PointWeChip:Ob},Cc=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...t},I.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"})),Tb="PointItem-module__point__-1jMFG",Pb="PointItem-module__pointButton__-wAVuy",Ab="PointItem-module__pointData__CrnHK9",Rb="PointItem-module__title__I5whAh",Lb="PointItem-module__address__tRkAx3",kb="PointItem-module__arrow__AMAx4z",Qn={point:Tb,pointButton:Pb,pointData:Ab,title:Rb,address:Lb,arrow:kb},Mb=({handleDetailsClick:t,handlePointClick:e,point:n})=>{const{iconType:r,palette:i,skipPointInfo:s}=_e(),o=Nn("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 w.jsx("li",{className:Qn.point,children:w.jsxs("button",{className:Qn.pointButton,type:"button",tabIndex:0,onClick:l,children:[w.jsx("div",{dangerouslySetInnerHTML:{__html:c}}),w.jsxs("div",{className:Qn.pointData,children:[w.jsx("h3",{className:Qn.title,children:n.name}),w.jsx("p",{className:Qn.address,children:n.location.full_address})]}),w.jsx("span",{className:Qn.arrow,children:w.jsx(Cc,{})})]})},n.uid)},Db="SamePoints-module__container__oYvAF2",jb="SamePoints-module__header__nnMDp4",Nb="SamePoints-module__closeButton__gd1RzT",Ib="SamePoints-module__sameList__GhS89e",bs={container:Db,header:jb,closeButton:Nb,sameList:Ib},Fb=t=>{const{closeSamePoints:e,samePoints:n}=Pt(),{hideSearchInput:r}=_e(),i=!!n.length;return w.jsxs("div",{className:bs.container,"data-visible":i,"data-hide-search-input":r,children:[w.jsx("div",{className:bs.header,children:w.jsx("button",{className:bs.closeButton,type:"button","aria-label":"Close points",tabIndex:0,onClick:e,children:w.jsx(mb,{})})}),w.jsx("ul",{className:bs.sameList,children:n.map(s=>w.jsx(Mb,{point:s,...t},s.uid))})]})};var Fi=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(){}},Dn=typeof window>"u"||"Deno"in globalThis;function et(){}function Bb(t,e){return typeof t=="function"?t(e):t}function Fa(t){return typeof t=="number"&&t>=0&&t!==1/0}function uh(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 uu(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=t;if(o){if(r){if(e.queryHash!==_c(o,e.options))return!1}else if(!bi(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 du(t,e){const{exact:n,status:r,predicate:i,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(n){if(yi(e.options.mutationKey)!==yi(s))return!1}else if(!bi(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function _c(t,e){return((e==null?void 0:e.queryKeyHashFn)||yi)(t)}function yi(t){return JSON.stringify(t,(e,n)=>Va(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function bi(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(n=>!bi(t[n],e[n])):!1}function dh(t,e){if(t===e)return t;const n=fu(t)&&fu(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]=dh(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 fu(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Va(t){if(!hu(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!hu(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function hu(t){return Object.prototype.toString.call(t)==="[object Object]"}function Vb(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?dh(t,e):e}function Hb(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function Ub(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var Ec=Symbol();function fh(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===Ec?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var Sn,tn,lr,Nu,$b=(Nu=class extends Fi{constructor(){super();U(this,Sn,void 0);U(this,tn,void 0);U(this,lr,void 0);F(this,lr,e=>{if(!Dn&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){P(this,tn)||this.setEventListener(P(this,lr))}onUnsubscribe(){var e;this.hasListeners()||((e=P(this,tn))==null||e.call(this),F(this,tn,void 0))}setEventListener(e){var n;F(this,lr,e),(n=P(this,tn))==null||n.call(this),F(this,tn,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){P(this,Sn)!==e&&(F(this,Sn,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof P(this,Sn)=="boolean"?P(this,Sn):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Sn=new WeakMap,tn=new WeakMap,lr=new WeakMap,Nu),xc=new $b,ur,nn,dr,Iu,zb=(Iu=class extends Fi{constructor(){super();U(this,ur,!0);U(this,nn,void 0);U(this,dr,void 0);F(this,dr,e=>{if(!Dn&&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,nn)||this.setEventListener(P(this,dr))}onUnsubscribe(){var e;this.hasListeners()||((e=P(this,nn))==null||e.call(this),F(this,nn,void 0))}setEventListener(e){var n;F(this,dr,e),(n=P(this,nn))==null||n.call(this),F(this,nn,e(this.setOnline.bind(this)))}setOnline(e){P(this,ur)!==e&&(F(this,ur,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return P(this,ur)}},ur=new WeakMap,nn=new WeakMap,dr=new WeakMap,Iu),io=new zb;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 qb(t){return Math.min(1e3*2**t,3e4)}function hh(t){return(t??"online")==="online"?io.isOnline():!0}var ph=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 ph}function mh(t){let e=!1,n=0,r=!1,i;const s=Ua(),o=h=>{var S;r||(f(new ph(h)),(S=t.abort)==null||S.call(t))},a=()=>{e=!0},c=()=>{e=!1},l=()=>xc.isFocused()&&(t.networkMode==="always"||io.isOnline())&&t.canRun(),u=()=>hh(t.networkMode)&&t.canRun(),d=h=>{var S;r||(r=!0,(S=t.onSuccess)==null||S.call(t,h),i==null||i(),s.resolve(h))},f=h=>{var S;r||(r=!0,(S=t.onError)==null||S.call(t,h),i==null||i(),s.reject(h))},v=()=>new Promise(h=>{var S;i=b=>{(r||l())&&h(b)},(S=t.onPause)==null||S.call(t)}).then(()=>{var h;i=void 0,r||(h=t.onContinue)==null||h.call(t)}),m=()=>{if(r)return;let h;const S=n===0?t.initialPromise:void 0;try{h=S??t.fn()}catch(b){h=Promise.reject(b)}Promise.resolve(h).then(d).catch(b=>{var g;if(r)return;const _=t.retry??(Dn?0:3),y=t.retryDelay??qb,E=typeof y=="function"?y(n,b):y,x=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,b);if(e||!x){f(b);return}n++,(g=t.onFail)==null||g.call(t,n,b),Vb(E).then(()=>l()?void 0:v()).then(()=>{e?f(b):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 Gb(){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=Gb(),Cn,Fu,gh=(Fu=class{constructor(){U(this,Cn,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Fa(this.gcTime)&&F(this,Cn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Dn?1/0:5*60*1e3))}clearGcTimeout(){P(this,Cn)&&(clearTimeout(P(this,Cn)),F(this,Cn,void 0))}},Cn=new WeakMap,Fu),fr,hr,Xe,Me,wi,_n,lt,jt,Bu,Wb=(Bu=class extends gh{constructor(e){super();U(this,lt);U(this,fr,void 0);U(this,hr,void 0);U(this,Xe,void 0);U(this,Me,void 0);U(this,wi,void 0);U(this,_n,void 0);F(this,_n,!1),F(this,wi,e.defaultOptions),this.setOptions(e.options),this.observers=[],F(this,Xe,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,F(this,fr,Zb(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,Me))==null?void 0:e.promise}setOptions(e){this.options={...P(this,wi),...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 Q(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){Q(this,lt,jt).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,fr))}isActive(){return this.observers.some(e=>ut(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ec||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||!uh(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,_n)?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||Q(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,Me))return P(this,Me).continueRetry(),P(this,Me).promise}if(e&&this.setOptions(e),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,i=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(F(this,_n,!0),r.signal)})},s=()=>{const d=fh(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return i(f),F(this,_n,!1),this.options.persister?this.options.persister(d,f,this):d(f)},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),F(this,hr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((l=o.fetchOptions)==null?void 0:l.meta))&&Q(this,lt,jt).call(this,{type:"fetch",meta:(u=o.fetchOptions)==null?void 0:u.meta});const a=d=>{var f,v,m,h;Zo(d)&&d.silent||Q(this,lt,jt).call(this,{type:"error",error:d}),Zo(d)||((v=(f=P(this,Xe).config).onError)==null||v.call(f,d,this),(h=(m=P(this,Xe).config).onSettled)==null||h.call(m,this.state.data,d,this)),this.scheduleGc()};return F(this,Me,mh({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var f,v,m,h;if(d===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(S){a(S);return}(v=(f=P(this,Xe).config).onSuccess)==null||v.call(f,d,this),(h=(m=P(this,Xe).config).onSettled)==null||h.call(m,d,this.state.error,this),this.scheduleGc()},onError:a,onFail:(d,f)=>{Q(this,lt,jt).call(this,{type:"failed",failureCount:d,error:f})},onPause:()=>{Q(this,lt,jt).call(this,{type:"pause"})},onContinue:()=>{Q(this,lt,jt).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),P(this,Me).start()}},fr=new WeakMap,hr=new WeakMap,Xe=new WeakMap,Me=new WeakMap,wi=new WeakMap,_n=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,...vh(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),Ae.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),P(this,Xe).notify({query:this,type:"updated",action:e})})},Bu);function vh(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:hh(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Zb(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,Vu,Kb=(Vu=class extends Fi{constructor(e={}){super();U(this,wt,void 0);this.config=e,F(this,wt,new Map)}build(e,n,r){const i=n.queryKey,s=n.queryHash??_c(i,n);let o=this.get(s);return o||(o=new Wb({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=>uu(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>uu(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,Vu),St,Ie,En,Ct,Zt,Hu,Qb=(Hu=class extends gh{constructor(e){super();U(this,Ct);U(this,St,void 0);U(this,Ie,void 0);U(this,En,void 0);this.mutationId=e.mutationId,F(this,Ie,e.mutationCache),F(this,St,[]),this.state=e.state||Jb(),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,Ie).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){F(this,St,P(this,St).filter(n=>n!==e)),this.scheduleGc(),P(this,Ie).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){P(this,St).length||(this.state.status==="pending"?this.scheduleGc():P(this,Ie).remove(this))}continue(){var e;return((e=P(this,En))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,s,o,a,c,l,u,d,f,v,m,h,S,b,_,y,E,x,g,C;F(this,En,mh({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(O,A)=>{Q(this,Ct,Zt).call(this,{type:"failed",failureCount:O,error:A})},onPause:()=>{Q(this,Ct,Zt).call(this,{type:"pause"})},onContinue:()=>{Q(this,Ct,Zt).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>P(this,Ie).canRun(this)}));const n=this.state.status==="pending",r=!P(this,En).canStart();try{if(!n){Q(this,Ct,Zt).call(this,{type:"pending",variables:e,isPaused:r}),await((s=(i=P(this,Ie).config).onMutate)==null?void 0:s.call(i,e,this));const A=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,e));A!==this.state.context&&Q(this,Ct,Zt).call(this,{type:"pending",context:A,variables:e,isPaused:r})}const O=await P(this,En).start();return await((l=(c=P(this,Ie).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=(f=P(this,Ie).config).onSettled)==null?void 0:v.call(f,O,null,this.state.variables,this.state.context,this)),await((h=(m=this.options).onSettled)==null?void 0:h.call(m,O,null,e,this.state.context)),Q(this,Ct,Zt).call(this,{type:"success",data:O}),O}catch(O){try{throw await((b=(S=P(this,Ie).config).onError)==null?void 0:b.call(S,O,e,this.state.context,this)),await((y=(_=this.options).onError)==null?void 0:y.call(_,O,e,this.state.context)),await((x=(E=P(this,Ie).config).onSettled)==null?void 0:x.call(E,void 0,O,this.state.variables,this.state.context,this)),await((C=(g=this.options).onSettled)==null?void 0:C.call(g,void 0,O,e,this.state.context)),O}finally{Q(this,Ct,Zt).call(this,{type:"error",error:O})}}finally{P(this,Ie).runNext(this)}}},St=new WeakMap,Ie=new WeakMap,En=new WeakMap,Ct=new WeakSet,Zt=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,Ie).notify({mutation:this,type:"updated",action:e})})},Hu);function Jb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ge,Si,Uu,Xb=(Uu=class extends Fi{constructor(e={}){super();U(this,Ge,void 0);U(this,Si,void 0);this.config=e,F(this,Ge,new Map),F(this,Si,Date.now())}build(e,n,r){const i=new Qb({mutationCache:this,mutationId:++Ki(this,Si)._,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=>du(n,r))}findAll(e={}){return this.getAll().filter(n=>du(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,Si=new WeakMap,Uu);function ws(t){var e;return((e=t.options.scope)==null?void 0:e.id)??String(t.mutationId)}function pu(t){return{onFetch:(e,n)=>{var u,d,f,v,m;const r=e.options,i=(f=(d=(u=e.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:f.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 h=!1;const S=y=>{Object.defineProperty(y,"signal",{enumerable:!0,get:()=>(e.signal.aborted?h=!0:e.signal.addEventListener("abort",()=>{h=!0}),e.signal)})},b=fh(e.options,e.fetchOptions),_=async(y,E,x)=>{if(h)return Promise.reject();if(E==null&&y.pages.length)return Promise.resolve(y);const g={queryKey:e.queryKey,pageParam:E,direction:x?"backward":"forward",meta:e.options.meta};S(g);const C=await b(g),{maxPages:O}=e.options,A=x?Ub:Hb;return{pages:A(y.pages,C,O),pageParams:A(y.pageParams,E,O)}};if(i&&s.length){const y=i==="backward",E=y?Yb:mu,x={pages:s,pageParams:o},g=E(r,x);a=await _(x,g,y)}else{const y=t??s.length;do{const E=c===0?o[0]??r.initialPageParam:mu(r,a);if(c>0&&E==null)break;a=await _(a,E),c++}while(c<y)}return a};e.options.persister?e.fetchFn=()=>{var h,S;return(S=(h=e.options).persister)==null?void 0:S.call(h,l,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=l}}}function mu(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 Yb(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,rn,sn,pr,mr,on,gr,vr,$u,yh=($u=class{constructor(t={}){U(this,be,void 0);U(this,rn,void 0);U(this,sn,void 0);U(this,pr,void 0);U(this,mr,void 0);U(this,on,void 0);U(this,gr,void 0);U(this,vr,void 0);F(this,be,t.queryCache||new Kb),F(this,rn,t.mutationCache||new Xb),F(this,sn,t.defaultOptions||{}),F(this,pr,new Map),F(this,mr,new Map),F(this,on,0)}mount(){Ki(this,on)._++,P(this,on)===1&&(F(this,gr,xc.subscribe(async t=>{t&&(await this.resumePausedMutations(),P(this,be).onFocus())})),F(this,vr,io.subscribe(async t=>{t&&(await this.resumePausedMutations(),P(this,be).onOnline())})))}unmount(){var t,e;Ki(this,on)._--,P(this,on)===0&&((t=P(this,gr))==null||t.call(this),F(this,gr,void 0),(e=P(this,vr))==null||e.call(this),F(this,vr,void 0))}isFetching(t){return P(this,be).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return P(this,rn).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=Bb(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(ar(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=pu(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(et).catch(et)}ensureInfiniteQueryData(t){return t.behavior=pu(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return io.isOnline()?P(this,rn).resumePausedMutations():Promise.resolve()}getQueryCache(){return P(this,be)}getMutationCache(){return P(this,rn)}getDefaultOptions(){return P(this,sn)}setDefaultOptions(t){F(this,sn,t)}setQueryDefaults(t,e){P(this,pr).set(yi(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...P(this,pr).values()];let n={};return e.forEach(r=>{bi(t,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(t,e){P(this,mr).set(yi(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...P(this,mr).values()];let n={};return e.forEach(r=>{bi(t,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...P(this,sn).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=_c(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===Ec&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...P(this,sn).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){P(this,be).clear(),P(this,rn).clear()}},be=new WeakMap,rn=new WeakMap,sn=new WeakMap,pr=new WeakMap,mr=new WeakMap,on=new WeakMap,gr=new WeakMap,vr=new WeakMap,$u),Ue,J,Ci,Fe,xn,yr,an,_t,_i,br,wr,On,Tn,cn,Sr,Pn,Yr,Ei,$a,xi,za,Oi,qa,Ti,Ga,Pi,Wa,Ai,Za,Ri,Ka,oo,bh,zu,e4=(zu=class extends Fi{constructor(e,n){super();U(this,Pn);U(this,Ei);U(this,xi);U(this,Oi);U(this,Ti);U(this,Pi);U(this,Ai);U(this,Ri);U(this,oo);U(this,Ue,void 0);U(this,J,void 0);U(this,Ci,void 0);U(this,Fe,void 0);U(this,xn,void 0);U(this,yr,void 0);U(this,an,void 0);U(this,_t,void 0);U(this,_i,void 0);U(this,br,void 0);U(this,wr,void 0);U(this,On,void 0);U(this,Tn,void 0);U(this,cn,void 0);U(this,Sr,new Set);this.options=n,F(this,Ue,e),F(this,_t,null),F(this,an,Ua()),this.options.experimental_prefetchInRender||P(this,an).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,J).addObserver(this),gu(P(this,J),this.options)?Q(this,Pn,Yr).call(this):this.updateResult(),Q(this,Ti,Ga).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Qa(P(this,J),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Qa(P(this,J),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Q(this,Pi,Wa).call(this),Q(this,Ai,Za).call(this),P(this,J).removeObserver(this)}setOptions(e,n){const r=this.options,i=P(this,J);if(this.options=P(this,Ue).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ut(this.options.enabled,P(this,J))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Q(this,Ri,Ka).call(this),P(this,J).setOptions(this.options),r._defaulted&&!Ba(this.options,r)&&P(this,Ue).getQueryCache().notify({type:"observerOptionsUpdated",query:P(this,J),observer:this});const s=this.hasListeners();s&&vu(P(this,J),i,this.options,r)&&Q(this,Pn,Yr).call(this),this.updateResult(n),s&&(P(this,J)!==i||ut(this.options.enabled,P(this,J))!==ut(r.enabled,P(this,J))||ar(this.options.staleTime,P(this,J))!==ar(r.staleTime,P(this,J)))&&Q(this,Ei,$a).call(this);const o=Q(this,xi,za).call(this);s&&(P(this,J)!==i||ut(this.options.enabled,P(this,J))!==ut(r.enabled,P(this,J))||o!==P(this,cn))&&Q(this,Oi,qa).call(this,o)}getOptimisticResult(e){const n=P(this,Ue).getQueryCache().build(P(this,Ue),e),r=this.createResult(n,e);return n4(this,r)&&(F(this,Fe,r),F(this,yr,this.options),F(this,xn,P(this,J).state)),r}getCurrentResult(){return P(this,Fe)}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,J)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=P(this,Ue).defaultQueryOptions(e),r=P(this,Ue).getQueryCache().build(P(this,Ue),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(e){return Q(this,Pn,Yr).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),P(this,Fe)))}createResult(e,n){var O;const r=P(this,J),i=this.options,s=P(this,Fe),o=P(this,xn),a=P(this,yr),l=e!==r?e.state:P(this,Ci),{state:u}=e;let d={...u},f=!1,v;if(n._optimisticResults){const A=this.hasListeners(),R=!A&&gu(e,n),L=A&&vu(e,r,n,i);(R||L)&&(d={...d,...vh(u.data,e.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:h,status:S}=d;if(n.select&&d.data!==void 0)if(s&&d.data===(o==null?void 0:o.data)&&n.select===P(this,_i))v=P(this,br);else try{F(this,_i,n.select),v=n.select(d.data),v=Ha(s==null?void 0:s.data,v,n),F(this,br,v),F(this,_t,null)}catch(A){F(this,_t,A)}else v=d.data;if(n.placeholderData!==void 0&&v===void 0&&S==="pending"){let A;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))A=s.data;else if(A=typeof n.placeholderData=="function"?n.placeholderData((O=P(this,wr))==null?void 0:O.state.data,P(this,wr)):n.placeholderData,n.select&&A!==void 0)try{A=n.select(A),F(this,_t,null)}catch(R){F(this,_t,R)}A!==void 0&&(S="success",v=Ha(s==null?void 0:s.data,A,n),f=!0)}P(this,_t)&&(m=P(this,_t),v=P(this,br),h=Date.now(),S="error");const b=d.fetchStatus==="fetching",_=S==="pending",y=S==="error",E=_&&b,x=v!==void 0,C={status:S,fetchStatus:d.fetchStatus,isPending:_,isSuccess:S==="success",isError:y,isInitialLoading:E,isLoading:E,data:v,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:h,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:b,isRefetching:b&&!_,isLoadingError:y&&!x,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:y&&x,isStale:Oc(e,n),refetch:this.refetch,promise:P(this,an)};if(this.options.experimental_prefetchInRender){const A=T=>{C.status==="error"?T.reject(C.error):C.data!==void 0&&T.resolve(C.data)},R=()=>{const T=F(this,an,C.promise=Ua());A(T)},L=P(this,an);switch(L.status){case"pending":e.queryHash===r.queryHash&&A(L);break;case"fulfilled":(C.status==="error"||C.data!==L.value)&&R();break;case"rejected":(C.status!=="error"||C.error!==L.reason)&&R();break}}return C}updateResult(e){const n=P(this,Fe),r=this.createResult(P(this,J),this.options);if(F(this,xn,P(this,J).state),F(this,yr,this.options),P(this,xn).data!==void 0&&F(this,wr,P(this,J)),Ba(r,n))return;F(this,Fe,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,Fe)).some(l=>{const u=l;return P(this,Fe)[u]!==n[u]&&c.has(u)})};(e==null?void 0:e.listeners)!==!1&&s()&&(i.listeners=!0),Q(this,oo,bh).call(this,{...i,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Q(this,Ti,Ga).call(this)}},Ue=new WeakMap,J=new WeakMap,Ci=new WeakMap,Fe=new WeakMap,xn=new WeakMap,yr=new WeakMap,an=new WeakMap,_t=new WeakMap,_i=new WeakMap,br=new WeakMap,wr=new WeakMap,On=new WeakMap,Tn=new WeakMap,cn=new WeakMap,Sr=new WeakMap,Pn=new WeakSet,Yr=function(e){Q(this,Ri,Ka).call(this);let n=P(this,J).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(et)),n},Ei=new WeakSet,$a=function(){Q(this,Pi,Wa).call(this);const e=ar(this.options.staleTime,P(this,J));if(Dn||P(this,Fe).isStale||!Fa(e))return;const r=uh(P(this,Fe).dataUpdatedAt,e)+1;F(this,On,setTimeout(()=>{P(this,Fe).isStale||this.updateResult()},r))},xi=new WeakSet,za=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(P(this,J)):this.options.refetchInterval)??!1},Oi=new WeakSet,qa=function(e){Q(this,Ai,Za).call(this),F(this,cn,e),!(Dn||ut(this.options.enabled,P(this,J))===!1||!Fa(P(this,cn))||P(this,cn)===0)&&F(this,Tn,setInterval(()=>{(this.options.refetchIntervalInBackground||xc.isFocused())&&Q(this,Pn,Yr).call(this)},P(this,cn)))},Ti=new WeakSet,Ga=function(){Q(this,Ei,$a).call(this),Q(this,Oi,qa).call(this,Q(this,xi,za).call(this))},Pi=new WeakSet,Wa=function(){P(this,On)&&(clearTimeout(P(this,On)),F(this,On,void 0))},Ai=new WeakSet,Za=function(){P(this,Tn)&&(clearInterval(P(this,Tn)),F(this,Tn,void 0))},Ri=new WeakSet,Ka=function(){const e=P(this,Ue).getQueryCache().build(P(this,Ue),this.options);if(e===P(this,J))return;const n=P(this,J);F(this,J,e),F(this,Ci,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},oo=new WeakSet,bh=function(e){Ae.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(P(this,Fe))}),P(this,Ue).getQueryCache().notify({query:P(this,J),type:"observerResultsUpdated"})})},zu);function t4(t,e){return ut(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function gu(t,e){return t4(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&&Oc(t,e)}return!1}function vu(t,e,n,r){return(t!==e||ut(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&Oc(t,n)}function Oc(t,e){return ut(e.enabled,t)!==!1&&t.isStaleByTime(ar(e.staleTime,t))}function n4(t,e){return!Ba(t.getCurrentResult(),e)}var wh=I.createContext(void 0),r4=t=>{const e=I.useContext(wh);if(t)return t;if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Sh=({client:t,children:e})=>(I.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),w.jsx(wh.Provider,{value:t,children:e})),Ch=I.createContext(!1),i4=()=>I.useContext(Ch);Ch.Provider;function s4(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var o4=I.createContext(s4()),a4=()=>I.useContext(o4);function c4(t,e){return typeof t=="function"?t(...e):!!t}function l4(){}var u4=(t,e)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(e.isReset()||(t.retryOnMount=!1))},d4=t=>{I.useEffect(()=>{t.clearReset()},[t])},f4=({result:t,errorResetBoundary:e,throwOnError:n,query:r})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&c4(n,[t.error,r]),h4=t=>{t.suspense&&(t.staleTime===void 0&&(t.staleTime=1e3),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3)))},p4=(t,e)=>t.isLoading&&t.isFetching&&!e,m4=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,yu=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function g4(t,e,n){var u,d,f,v,m;const r=r4(n),i=i4(),s=a4(),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",h4(o),u4(o,s),d4(s);const a=!r.getQueryCache().get(o.queryHash),[c]=I.useState(()=>new e(r,o)),l=c.getOptimisticResult(o);if(I.useSyncExternalStore(I.useCallback(h=>{const S=i?()=>{}:c.subscribe(Ae.batchCalls(h));return c.updateResult(),S},[c,i]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),I.useEffect(()=>{c.setOptions(o,{listeners:!1})},[o,c]),m4(o,l))throw yu(o,c,s);if(f4({result:l,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw l.error;if((v=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||v.call(f,o,l),o.experimental_prefetchInRender&&!Dn&&p4(l,i)){const h=a?yu(o,c,s):(m=r.getQueryCache().get(o.queryHash))==null?void 0:m.promise;h==null||h.catch(l4).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?l:c.trackResult(l)}function _h(t,e){return g4(t,e4,e)}async function v4(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 y4(){const[t,e]=p.useState(""),{setLMSData:n,setLoading:r}=mo(),{data:i,isLoading:s}=_h({queryKey:["lms-data",t],queryFn:()=>v4(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 b4=Object.getOwnPropertyNames,w4=Object.getOwnPropertySymbols,S4=Object.prototype.hasOwnProperty;function bu(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 C4(t){return t!=null?t[Symbol.toStringTag]:void 0}function wu(t){return b4(t).concat(w4(t))}var _4=Object.hasOwn||function(t,e){return S4.call(t,e)};function jn(t,e){return t===e||!t&&!e&&t!==t&&e!==e}var E4="__v",x4="__o",O4="_owner",Su=Object.getOwnPropertyDescriptor,Cu=Object.keys;function T4(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 P4(t,e){return jn(t.getTime(),e.getTime())}function A4(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function R4(t,e){return t===e}function _u(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 f=o.value,v=a.value;if(n.equals(f[0],v[0],c,d,t,e,n)&&n.equals(f[1],v[1],f[0],v[0],t,e,n)){u=i[d]=!0;break}d++}if(!u)return!1;c++}return!0}var L4=jn;function k4(t,e,n){var r=Cu(t),i=r.length;if(Cu(e).length!==i)return!1;for(;i-- >0;)if(!Eh(t,e,n,r[i]))return!1;return!0}function qr(t,e,n){var r=wu(t),i=r.length;if(wu(e).length!==i)return!1;for(var s,o,a;i-- >0;)if(s=r[i],!Eh(t,e,n,s)||(o=Su(t,s),a=Su(e,s),(o||a)&&(!o||!a||o.configurable!==a.configurable||o.enumerable!==a.enumerable||o.writable!==a.writable)))return!1;return!0}function M4(t,e){return jn(t.valueOf(),e.valueOf())}function D4(t,e){return t.source===e.source&&t.flags===e.flags}function Eu(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 j4(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 N4(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 Eh(t,e,n,r){return(r===O4||r===x4||r===E4)&&(t.$$typeof||e.$$typeof)?!0:_4(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}var I4="[object Arguments]",F4="[object Boolean]",B4="[object Date]",V4="[object Error]",H4="[object Map]",U4="[object Number]",$4="[object Object]",z4="[object RegExp]",q4="[object Set]",G4="[object String]",W4="[object URL]",Z4=Array.isArray,xu=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,Ou=Object.assign,K4=Object.prototype.toString.call.bind(Object.prototype.toString);function Q4(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,f=t.areUrlsEqual,v=t.unknownTagComparators;return function(h,S,b){if(h===S)return!0;if(h==null||S==null)return!1;var _=typeof h;if(_!==typeof S)return!1;if(_!=="object")return _==="number"?o(h,S,b):_==="function"?i(h,S,b):!1;var y=h.constructor;if(y!==S.constructor)return!1;if(y===Object)return a(h,S,b);if(Z4(h))return e(h,S,b);if(xu!=null&&xu(h))return d(h,S,b);if(y===Date)return n(h,S,b);if(y===RegExp)return l(h,S,b);if(y===Map)return s(h,S,b);if(y===Set)return u(h,S,b);var E=K4(h);if(E===B4)return n(h,S,b);if(E===z4)return l(h,S,b);if(E===H4)return s(h,S,b);if(E===q4)return u(h,S,b);if(E===$4)return typeof h.then!="function"&&typeof S.then!="function"&&a(h,S,b);if(E===W4)return f(h,S,b);if(E===V4)return r(h,S,b);if(E===I4)return a(h,S,b);if(E===F4||E===U4||E===G4)return c(h,S,b);if(v){var x=v[E];if(!x){var g=C4(h);g&&(x=v[g])}if(x)return x(h,S,b)}return!1}}function J4(t){var e=t.circular,n=t.createCustomConfig,r=t.strict,i={areArraysEqual:r?qr:T4,areDatesEqual:P4,areErrorsEqual:A4,areFunctionsEqual:R4,areMapsEqual:r?bu(_u,qr):_u,areNumbersEqual:L4,areObjectsEqual:r?qr:k4,arePrimitiveWrappersEqual:M4,areRegExpsEqual:D4,areSetsEqual:r?bu(Eu,qr):Eu,areTypedArraysEqual:r?qr:j4,areUrlsEqual:N4,unknownTagComparators:void 0};if(n&&(i=Ou({},i,n(i))),e){var s=Ss(i.areArraysEqual),o=Ss(i.areMapsEqual),a=Ss(i.areObjectsEqual),c=Ss(i.areSetsEqual);i=Ou({},i,{areArraysEqual:s,areMapsEqual:o,areObjectsEqual:a,areSetsEqual:c})}return i}function X4(t){return function(e,n,r,i,s,o,a){return t(e,n,a)}}function Y4(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,f=d===void 0?e?new WeakMap:void 0:d,v=u.meta;return n(c,l,{cache:f,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 Tu=fn();fn({strict:!0});fn({circular:!0});fn({circular:!0,strict:!0});fn({createInternalComparator:function(){return jn}});fn({strict:!0,createInternalComparator:function(){return jn}});fn({circular:!0,createInternalComparator:function(){return jn}});fn({circular:!0,createInternalComparator:function(){return jn},strict:!0});function fn(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=J4(t),c=Q4(a),l=r?r(c):X4(c);return Y4({circular:n,comparator:c,createState:i,equals:l,strict:o})}const Pu=[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=Pu[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=Pu.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,f=c.pop()||0;if(d-f<=a){for(let S=f;S<=d;S++){const b=o[2*S],_=o[2*S+1];b>=e&&b<=r&&_>=n&&_<=i&&l.push(s[S])}continue}const v=f+d>>1,m=o[2*v],h=o[2*v+1];m>=e&&m<=r&&h>=n&&h<=i&&l.push(s[v]),(u===0?e<=m:n<=h)&&(c.push(f),c.push(v-1),c.push(1-u)),(u===0?r>=m:i>=h)&&(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,f=a.pop()||0;if(d-f<=o){for(let S=f;S<=d;S++)Au(s[2*S],s[2*S+1],e,n)<=l&&c.push(i[S]);continue}const v=f+d>>1,m=s[2*v],h=s[2*v+1];Au(m,h,e,n)<=l&&c.push(i[v]),(u===0?e-r<=m:n-r<=h)&&(a.push(f),a.push(v-1),a.push(1-u)),(u===0?e+r>=m:n+r>=h)&&(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;xh(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 xh(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),f=.5*Math.exp(2*d/3),v=.5*Math.sqrt(d*f*(l-f)/l)*(u-l/2<0?-1:1),m=Math.max(r,Math.floor(n-u*f/l+v)),h=Math.min(i,Math.floor(n+(l-u)*f/l+v));xh(t,e,n,m,h,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 Au(t,e,n,r){const i=t-n,s=e-r;return i*i+s*s}const e5={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},Ru=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),mn=2,Jt=3,Jo=4,Kt=5,Oh=6;class t5{constructor(e){this.options=Object.assign(Object.create(e5),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,f=Ru(Cs(u)),v=Ru(_s(d));o.push(f,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),f=this.getClusters([-180,i,s,o],n);return d.concat(f)}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 f=this.stride*d;u.push(l[f+Kt]>1?Lu(l,f,this.clusterProps):this.points[l[f+Jt]])}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 f of u){const v=f*this.stride;o[v+Jo]===e&&d.push(o[v+Kt]>1?Lu(o,v,this.clusterProps):this.points[o[v+Jt]])}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+Kt]>1;let u,d,f;if(l)u=Th(n,c,this.clusterProps),d=n[c],f=n[c+1];else{const h=this.points[n[c+Jt]];u=h.properties;const[S,b]=h.geometry.coordinates;d=Cs(S),f=_s(b)}const v={type:1,geometry:[[Math.round(this.options.extent*(d*s-r)),Math.round(this.options.extent*(f*s-i))]],tags:u};let m;l||this.options.generateId?m=n[c+Jt]:m=this.points[n[c+Jt]].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+mn]<=n)continue;c[d+mn]=n;const f=c[d],v=c[d+1],m=e.within(c[d],c[d+1],a),h=c[d+Kt];let S=h;for(const b of m){const _=b*u;c[_+mn]>n&&(S+=c[_+Kt])}if(S>h&&S>=o){let b=f*h,_=v*h,y,E=-1;const x=((d/u|0)<<5)+(n+1)+this.points.length;for(const g of m){const C=g*u;if(c[C+mn]<=n)continue;c[C+mn]=n;const O=c[C+Kt];b+=c[C]*O,_+=c[C+1]*O,c[C+Jo]=x,s&&(y||(y=this._map(c,d,!0),E=this.clusterProps.length,this.clusterProps.push(y)),s(y,this._map(c,C)))}c[d+Jo]=x,l.push(b/S,_/S,1/0,x,-1,S),s&&l.push(E)}else{for(let b=0;b<u;b++)l.push(c[d+b]);if(S>1)for(const b of m){const _=b*u;if(!(c[_+mn]<=n)){c[_+mn]=n;for(let y=0;y<u;y++)l.push(c[_+y])}}}}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+Kt]>1){const o=this.clusterProps[e[n+Oh]];return r?Object.assign({},o):o}const i=this.points[e[n+Jt]].properties,s=this.options.map(i);return r&&s===i?Object.assign({},s):s}}function Lu(t,e,n){return{type:"Feature",id:t[e+Jt],properties:Th(t,e,n),geometry:{type:"Point",coordinates:[n5(t[e]),r5(t[e+1])]}}}function Th(t,e,n){const r=t[e+Kt],i=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,s=t[e+Oh],o=s===-1?{}:Object.assign({},n[s]);return Object.assign(o,{cluster:!0,cluster_id:t[e+Jt],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 n5(t){return(t-.5)*360}function r5(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function i5(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 ze{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(ze.getPosition(n));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>ze.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(ze.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 s5{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return o5(e)}}const o5=t=>t.map(n=>new Xa({position:ze.getPosition(n),markers:[n]}));class a5 extends s5{constructor(e){var{maxZoom:n,radius:r=60}=e,i=i5(e,["maxZoom","radius"]);super({maxZoom:n}),this.markers=[],this.clusters=[],this.state={zoom:-1},this.superCluster=new t5(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(!Tu(e.markers,this.markers)){n=!0,this.markers=[...e.markers];const s=this.markers.map(o=>{const a=ze.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=!Tu(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:ze.getPosition(i)})}}class c5{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 l5{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:Cb,PinHome:vb,PinOmnic:wb,PinWeChip:_b,PinOmnicSelected:Sb,PinWeChipSelected:Eb,PinLlamaSelected:bb,PinLlama:yb,PointOmnic:Ob,PointLlama:xb,PointWeChip:Tb},Cc=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...t},I.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"})),Pb="PointItem-module__point__-1jMFG",Ab="PointItem-module__pointButton__-wAVuy",Rb="PointItem-module__pointData__CrnHK9",Lb="PointItem-module__title__I5whAh",kb="PointItem-module__address__tRkAx3",Mb="PointItem-module__arrow__AMAx4z",Qn={point:Pb,pointButton:Ab,pointData:Rb,title:Lb,address:kb,arrow:Mb},Db=({handleDetailsClick:t,handlePointClick:e,point:n})=>{const{iconType:r,palette:i,skipPointInfo:s}=_e(),o=Nn("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:Qn.point,children:S.jsxs("button",{className:Qn.pointButton,type:"button",tabIndex:0,onClick:l,children:[S.jsx("div",{dangerouslySetInnerHTML:{__html:c}}),S.jsxs("div",{className:Qn.pointData,children:[S.jsx("h3",{className:Qn.title,children:n.name}),S.jsx("p",{className:Qn.address,children:n.location.full_address})]}),S.jsx("span",{className:Qn.arrow,children:S.jsx(Cc,{})})]})},n.uid)},jb="SamePoints-module__container__oYvAF2",Nb="SamePoints-module__header__nnMDp4",Ib="SamePoints-module__closeButton__gd1RzT",Fb="SamePoints-module__sameList__GhS89e",bs={container:jb,header:Nb,closeButton:Ib,sameList:Fb},Bb=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(gb,{})})}),S.jsx("ul",{className:bs.sameList,children:n.map(s=>S.jsx(Db,{point:s,...t},s.uid))})]})};var Fi=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(){}},Dn=typeof window>"u"||"Deno"in globalThis;function et(){}function Vb(t,e){return typeof t=="function"?t(e):t}function Fa(t){return typeof t=="number"&&t>=0&&t!==1/0}function dh(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 uu(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=t;if(o){if(r){if(e.queryHash!==_c(o,e.options))return!1}else if(!bi(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 du(t,e){const{exact:n,status:r,predicate:i,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(n){if(yi(e.options.mutationKey)!==yi(s))return!1}else if(!bi(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function _c(t,e){return((e==null?void 0:e.queryKeyHashFn)||yi)(t)}function yi(t){return JSON.stringify(t,(e,n)=>Va(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function bi(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(n=>!bi(t[n],e[n])):!1}function fh(t,e){if(t===e)return t;const n=fu(t)&&fu(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]=fh(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 fu(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Va(t){if(!hu(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!hu(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function hu(t){return Object.prototype.toString.call(t)==="[object Object]"}function Hb(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?fh(t,e):e}function Ub(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function $b(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var Ec=Symbol();function hh(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===Ec?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var Sn,tn,lr,Iu,zb=(Iu=class extends Fi{constructor(){super();U(this,Sn,void 0);U(this,tn,void 0);U(this,lr,void 0);F(this,lr,e=>{if(!Dn&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){P(this,tn)||this.setEventListener(P(this,lr))}onUnsubscribe(){var e;this.hasListeners()||((e=P(this,tn))==null||e.call(this),F(this,tn,void 0))}setEventListener(e){var n;F(this,lr,e),(n=P(this,tn))==null||n.call(this),F(this,tn,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){P(this,Sn)!==e&&(F(this,Sn,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof P(this,Sn)=="boolean"?P(this,Sn):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Sn=new WeakMap,tn=new WeakMap,lr=new WeakMap,Iu),xc=new zb,ur,nn,dr,Fu,qb=(Fu=class extends Fi{constructor(){super();U(this,ur,!0);U(this,nn,void 0);U(this,dr,void 0);F(this,dr,e=>{if(!Dn&&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,nn)||this.setEventListener(P(this,dr))}onUnsubscribe(){var e;this.hasListeners()||((e=P(this,nn))==null||e.call(this),F(this,nn,void 0))}setEventListener(e){var n;F(this,dr,e),(n=P(this,nn))==null||n.call(this),F(this,nn,e(this.setOnline.bind(this)))}setOnline(e){P(this,ur)!==e&&(F(this,ur,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return P(this,ur)}},ur=new WeakMap,nn=new WeakMap,dr=new WeakMap,Fu),io=new qb;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 Gb(t){return Math.min(1e3*2**t,3e4)}function ph(t){return(t??"online")==="online"?io.isOnline():!0}var mh=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 mh}function gh(t){let e=!1,n=0,r=!1,i;const s=Ua(),o=f=>{var w;r||(h(new mh(f)),(w=t.abort)==null||w.call(t))},a=()=>{e=!0},c=()=>{e=!1},l=()=>xc.isFocused()&&(t.networkMode==="always"||io.isOnline())&&t.canRun(),u=()=>ph(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??(Dn?0:3),b=t.retryDelay??Gb,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),Hb(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 Wb(){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=Wb(),Cn,Bu,vh=(Bu=class{constructor(){U(this,Cn,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Fa(this.gcTime)&&F(this,Cn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Dn?1/0:5*60*1e3))}clearGcTimeout(){P(this,Cn)&&(clearTimeout(P(this,Cn)),F(this,Cn,void 0))}},Cn=new WeakMap,Bu),fr,hr,Xe,Me,wi,_n,lt,jt,Vu,Zb=(Vu=class extends vh{constructor(e){super();U(this,lt);U(this,fr,void 0);U(this,hr,void 0);U(this,Xe,void 0);U(this,Me,void 0);U(this,wi,void 0);U(this,_n,void 0);F(this,_n,!1),F(this,wi,e.defaultOptions),this.setOptions(e.options),this.observers=[],F(this,Xe,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,F(this,fr,Kb(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,Me))==null?void 0:e.promise}setOptions(e){this.options={...P(this,wi),...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 Q(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){Q(this,lt,jt).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,fr))}isActive(){return this.observers.some(e=>ut(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ec||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||!dh(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,_n)?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||Q(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,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:()=>(F(this,_n,!0),r.signal)})},s=()=>{const d=hh(this.options,n),h={queryKey:this.queryKey,meta:this.meta};return i(h),F(this,_n,!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),F(this,hr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((l=o.fetchOptions)==null?void 0:l.meta))&&Q(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||Q(this,lt,jt).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 F(this,Me,gh({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)=>{Q(this,lt,jt).call(this,{type:"failed",failureCount:d,error:h})},onPause:()=>{Q(this,lt,jt).call(this,{type:"pause"})},onContinue:()=>{Q(this,lt,jt).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),P(this,Me).start()}},fr=new WeakMap,hr=new WeakMap,Xe=new WeakMap,Me=new WeakMap,wi=new WeakMap,_n=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,...yh(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),Ae.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),P(this,Xe).notify({query:this,type:"updated",action:e})})},Vu);function yh(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ph(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Kb(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,Hu,Qb=(Hu=class extends Fi{constructor(e={}){super();U(this,wt,void 0);this.config=e,F(this,wt,new Map)}build(e,n,r){const i=n.queryKey,s=n.queryHash??_c(i,n);let o=this.get(s);return o||(o=new Zb({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=>uu(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>uu(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,Hu),St,Ie,En,Ct,Zt,Uu,Jb=(Uu=class extends vh{constructor(e){super();U(this,Ct);U(this,St,void 0);U(this,Ie,void 0);U(this,En,void 0);this.mutationId=e.mutationId,F(this,Ie,e.mutationCache),F(this,St,[]),this.state=e.state||Xb(),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,Ie).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){F(this,St,P(this,St).filter(n=>n!==e)),this.scheduleGc(),P(this,Ie).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){P(this,St).length||(this.state.status==="pending"?this.scheduleGc():P(this,Ie).remove(this))}continue(){var e;return((e=P(this,En))==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,_;F(this,En,gh({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(O,A)=>{Q(this,Ct,Zt).call(this,{type:"failed",failureCount:O,error:A})},onPause:()=>{Q(this,Ct,Zt).call(this,{type:"pause"})},onContinue:()=>{Q(this,Ct,Zt).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>P(this,Ie).canRun(this)}));const n=this.state.status==="pending",r=!P(this,En).canStart();try{if(!n){Q(this,Ct,Zt).call(this,{type:"pending",variables:e,isPaused:r}),await((s=(i=P(this,Ie).config).onMutate)==null?void 0:s.call(i,e,this));const A=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,e));A!==this.state.context&&Q(this,Ct,Zt).call(this,{type:"pending",context:A,variables:e,isPaused:r})}const O=await P(this,En).start();return await((l=(c=P(this,Ie).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,Ie).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)),Q(this,Ct,Zt).call(this,{type:"success",data:O}),O}catch(O){try{throw await((y=(w=P(this,Ie).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,Ie).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{Q(this,Ct,Zt).call(this,{type:"error",error:O})}}finally{P(this,Ie).runNext(this)}}},St=new WeakMap,Ie=new WeakMap,En=new WeakMap,Ct=new WeakSet,Zt=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,Ie).notify({mutation:this,type:"updated",action:e})})},Uu);function Xb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ge,Si,$u,Yb=($u=class extends Fi{constructor(e={}){super();U(this,Ge,void 0);U(this,Si,void 0);this.config=e,F(this,Ge,new Map),F(this,Si,Date.now())}build(e,n,r){const i=new Jb({mutationCache:this,mutationId:++Ki(this,Si)._,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=>du(n,r))}findAll(e={}){return this.getAll().filter(n=>du(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,Si=new WeakMap,$u);function ws(t){var e;return((e=t.options.scope)==null?void 0:e.id)??String(t.mutationId)}function pu(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=hh(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,A=x?$b:Ub;return{pages:A(b.pages,_,O),pageParams:A(b.pageParams,E,O)}};if(i&&s.length){const b=i==="backward",E=b?e4:mu,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:mu(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 mu(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 e4(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,rn,sn,pr,mr,on,gr,vr,zu,bh=(zu=class{constructor(t={}){U(this,be,void 0);U(this,rn,void 0);U(this,sn,void 0);U(this,pr,void 0);U(this,mr,void 0);U(this,on,void 0);U(this,gr,void 0);U(this,vr,void 0);F(this,be,t.queryCache||new Qb),F(this,rn,t.mutationCache||new Yb),F(this,sn,t.defaultOptions||{}),F(this,pr,new Map),F(this,mr,new Map),F(this,on,0)}mount(){Ki(this,on)._++,P(this,on)===1&&(F(this,gr,xc.subscribe(async t=>{t&&(await this.resumePausedMutations(),P(this,be).onFocus())})),F(this,vr,io.subscribe(async t=>{t&&(await this.resumePausedMutations(),P(this,be).onOnline())})))}unmount(){var t,e;Ki(this,on)._--,P(this,on)===0&&((t=P(this,gr))==null||t.call(this),F(this,gr,void 0),(e=P(this,vr))==null||e.call(this),F(this,vr,void 0))}isFetching(t){return P(this,be).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return P(this,rn).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=Vb(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(ar(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=pu(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(et).catch(et)}ensureInfiniteQueryData(t){return t.behavior=pu(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return io.isOnline()?P(this,rn).resumePausedMutations():Promise.resolve()}getQueryCache(){return P(this,be)}getMutationCache(){return P(this,rn)}getDefaultOptions(){return P(this,sn)}setDefaultOptions(t){F(this,sn,t)}setQueryDefaults(t,e){P(this,pr).set(yi(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...P(this,pr).values()];let n={};return e.forEach(r=>{bi(t,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(t,e){P(this,mr).set(yi(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...P(this,mr).values()];let n={};return e.forEach(r=>{bi(t,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...P(this,sn).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=_c(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===Ec&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...P(this,sn).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){P(this,be).clear(),P(this,rn).clear()}},be=new WeakMap,rn=new WeakMap,sn=new WeakMap,pr=new WeakMap,mr=new WeakMap,on=new WeakMap,gr=new WeakMap,vr=new WeakMap,zu),Ue,J,Ci,Fe,xn,yr,an,_t,_i,br,wr,On,Tn,cn,Sr,Pn,Yr,Ei,$a,xi,za,Oi,qa,Ti,Ga,Pi,Wa,Ai,Za,Ri,Ka,oo,wh,qu,t4=(qu=class extends Fi{constructor(e,n){super();U(this,Pn);U(this,Ei);U(this,xi);U(this,Oi);U(this,Ti);U(this,Pi);U(this,Ai);U(this,Ri);U(this,oo);U(this,Ue,void 0);U(this,J,void 0);U(this,Ci,void 0);U(this,Fe,void 0);U(this,xn,void 0);U(this,yr,void 0);U(this,an,void 0);U(this,_t,void 0);U(this,_i,void 0);U(this,br,void 0);U(this,wr,void 0);U(this,On,void 0);U(this,Tn,void 0);U(this,cn,void 0);U(this,Sr,new Set);this.options=n,F(this,Ue,e),F(this,_t,null),F(this,an,Ua()),this.options.experimental_prefetchInRender||P(this,an).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,J).addObserver(this),gu(P(this,J),this.options)?Q(this,Pn,Yr).call(this):this.updateResult(),Q(this,Ti,Ga).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Qa(P(this,J),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Qa(P(this,J),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Q(this,Pi,Wa).call(this),Q(this,Ai,Za).call(this),P(this,J).removeObserver(this)}setOptions(e,n){const r=this.options,i=P(this,J);if(this.options=P(this,Ue).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ut(this.options.enabled,P(this,J))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Q(this,Ri,Ka).call(this),P(this,J).setOptions(this.options),r._defaulted&&!Ba(this.options,r)&&P(this,Ue).getQueryCache().notify({type:"observerOptionsUpdated",query:P(this,J),observer:this});const s=this.hasListeners();s&&vu(P(this,J),i,this.options,r)&&Q(this,Pn,Yr).call(this),this.updateResult(n),s&&(P(this,J)!==i||ut(this.options.enabled,P(this,J))!==ut(r.enabled,P(this,J))||ar(this.options.staleTime,P(this,J))!==ar(r.staleTime,P(this,J)))&&Q(this,Ei,$a).call(this);const o=Q(this,xi,za).call(this);s&&(P(this,J)!==i||ut(this.options.enabled,P(this,J))!==ut(r.enabled,P(this,J))||o!==P(this,cn))&&Q(this,Oi,qa).call(this,o)}getOptimisticResult(e){const n=P(this,Ue).getQueryCache().build(P(this,Ue),e),r=this.createResult(n,e);return r4(this,r)&&(F(this,Fe,r),F(this,yr,this.options),F(this,xn,P(this,J).state)),r}getCurrentResult(){return P(this,Fe)}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,J)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=P(this,Ue).defaultQueryOptions(e),r=P(this,Ue).getQueryCache().build(P(this,Ue),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(e){return Q(this,Pn,Yr).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),P(this,Fe)))}createResult(e,n){var O;const r=P(this,J),i=this.options,s=P(this,Fe),o=P(this,xn),a=P(this,yr),l=e!==r?e.state:P(this,Ci),{state:u}=e;let d={...u},h=!1,v;if(n._optimisticResults){const A=this.hasListeners(),R=!A&&gu(e,n),L=A&&vu(e,r,n,i);(R||L)&&(d={...d,...yh(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,_i))v=P(this,br);else try{F(this,_i,n.select),v=n.select(d.data),v=Ha(s==null?void 0:s.data,v,n),F(this,br,v),F(this,_t,null)}catch(A){F(this,_t,A)}else v=d.data;if(n.placeholderData!==void 0&&v===void 0&&w==="pending"){let A;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))A=s.data;else if(A=typeof n.placeholderData=="function"?n.placeholderData((O=P(this,wr))==null?void 0:O.state.data,P(this,wr)):n.placeholderData,n.select&&A!==void 0)try{A=n.select(A),F(this,_t,null)}catch(R){F(this,_t,R)}A!==void 0&&(w="success",v=Ha(s==null?void 0:s.data,A,n),h=!0)}P(this,_t)&&(m=P(this,_t),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:Oc(e,n),refetch:this.refetch,promise:P(this,an)};if(this.options.experimental_prefetchInRender){const A=T=>{_.status==="error"?T.reject(_.error):_.data!==void 0&&T.resolve(_.data)},R=()=>{const T=F(this,an,_.promise=Ua());A(T)},L=P(this,an);switch(L.status){case"pending":e.queryHash===r.queryHash&&A(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,Fe),r=this.createResult(P(this,J),this.options);if(F(this,xn,P(this,J).state),F(this,yr,this.options),P(this,xn).data!==void 0&&F(this,wr,P(this,J)),Ba(r,n))return;F(this,Fe,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,Fe)).some(l=>{const u=l;return P(this,Fe)[u]!==n[u]&&c.has(u)})};(e==null?void 0:e.listeners)!==!1&&s()&&(i.listeners=!0),Q(this,oo,wh).call(this,{...i,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Q(this,Ti,Ga).call(this)}},Ue=new WeakMap,J=new WeakMap,Ci=new WeakMap,Fe=new WeakMap,xn=new WeakMap,yr=new WeakMap,an=new WeakMap,_t=new WeakMap,_i=new WeakMap,br=new WeakMap,wr=new WeakMap,On=new WeakMap,Tn=new WeakMap,cn=new WeakMap,Sr=new WeakMap,Pn=new WeakSet,Yr=function(e){Q(this,Ri,Ka).call(this);let n=P(this,J).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(et)),n},Ei=new WeakSet,$a=function(){Q(this,Pi,Wa).call(this);const e=ar(this.options.staleTime,P(this,J));if(Dn||P(this,Fe).isStale||!Fa(e))return;const r=dh(P(this,Fe).dataUpdatedAt,e)+1;F(this,On,setTimeout(()=>{P(this,Fe).isStale||this.updateResult()},r))},xi=new WeakSet,za=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(P(this,J)):this.options.refetchInterval)??!1},Oi=new WeakSet,qa=function(e){Q(this,Ai,Za).call(this),F(this,cn,e),!(Dn||ut(this.options.enabled,P(this,J))===!1||!Fa(P(this,cn))||P(this,cn)===0)&&F(this,Tn,setInterval(()=>{(this.options.refetchIntervalInBackground||xc.isFocused())&&Q(this,Pn,Yr).call(this)},P(this,cn)))},Ti=new WeakSet,Ga=function(){Q(this,Ei,$a).call(this),Q(this,Oi,qa).call(this,Q(this,xi,za).call(this))},Pi=new WeakSet,Wa=function(){P(this,On)&&(clearTimeout(P(this,On)),F(this,On,void 0))},Ai=new WeakSet,Za=function(){P(this,Tn)&&(clearInterval(P(this,Tn)),F(this,Tn,void 0))},Ri=new WeakSet,Ka=function(){const e=P(this,Ue).getQueryCache().build(P(this,Ue),this.options);if(e===P(this,J))return;const n=P(this,J);F(this,J,e),F(this,Ci,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},oo=new WeakSet,wh=function(e){Ae.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(P(this,Fe))}),P(this,Ue).getQueryCache().notify({query:P(this,J),type:"observerResultsUpdated"})})},qu);function n4(t,e){return ut(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function gu(t,e){return n4(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&&Oc(t,e)}return!1}function vu(t,e,n,r){return(t!==e||ut(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&Oc(t,n)}function Oc(t,e){return ut(e.enabled,t)!==!1&&t.isStaleByTime(ar(e.staleTime,t))}function r4(t,e){return!Ba(t.getCurrentResult(),e)}var Sh=I.createContext(void 0),i4=t=>{const e=I.useContext(Sh);if(t)return t;if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Ch=({client:t,children:e})=>(I.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),S.jsx(Sh.Provider,{value:t,children:e})),_h=I.createContext(!1),s4=()=>I.useContext(_h);_h.Provider;function o4(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var a4=I.createContext(o4()),c4=()=>I.useContext(a4);function l4(t,e){return typeof t=="function"?t(...e):!!t}function u4(){}var d4=(t,e)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(e.isReset()||(t.retryOnMount=!1))},f4=t=>{I.useEffect(()=>{t.clearReset()},[t])},h4=({result:t,errorResetBoundary:e,throwOnError:n,query:r})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&l4(n,[t.error,r]),p4=t=>{t.suspense&&(t.staleTime===void 0&&(t.staleTime=1e3),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3)))},m4=(t,e)=>t.isLoading&&t.isFetching&&!e,g4=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,yu=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function v4(t,e,n){var u,d,h,v,m;const r=i4(n),i=s4(),s=c4(),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",p4(o),d4(o,s),f4(s);const a=!r.getQueryCache().get(o.queryHash),[c]=I.useState(()=>new e(r,o)),l=c.getOptimisticResult(o);if(I.useSyncExternalStore(I.useCallback(f=>{const w=i?()=>{}:c.subscribe(Ae.batchCalls(f));return c.updateResult(),w},[c,i]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),I.useEffect(()=>{c.setOptions(o,{listeners:!1})},[o,c]),g4(o,l))throw yu(o,c,s);if(h4({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&&!Dn&&m4(l,i)){const f=a?yu(o,c,s):(m=r.getQueryCache().get(o.queryHash))==null?void 0:m.promise;f==null||f.catch(u4).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?l:c.trackResult(l)}function Eh(t,e){return v4(t,t4,e)}async function y4(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 b4(){const[t,e]=p.useState(""),{setLMSData:n,setLoading:r}=mo(),{data:i,isLoading:s}=Eh({queryKey:["lms-data",t],queryFn:()=>y4(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 w4=Object.getOwnPropertyNames,S4=Object.getOwnPropertySymbols,C4=Object.prototype.hasOwnProperty;function bu(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 _4(t){return t!=null?t[Symbol.toStringTag]:void 0}function wu(t){return w4(t).concat(S4(t))}var E4=Object.hasOwn||function(t,e){return C4.call(t,e)};function jn(t,e){return t===e||!t&&!e&&t!==t&&e!==e}var x4="__v",O4="__o",T4="_owner",Su=Object.getOwnPropertyDescriptor,Cu=Object.keys;function P4(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 A4(t,e){return jn(t.getTime(),e.getTime())}function R4(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function L4(t,e){return t===e}function _u(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 k4=jn;function M4(t,e,n){var r=Cu(t),i=r.length;if(Cu(e).length!==i)return!1;for(;i-- >0;)if(!xh(t,e,n,r[i]))return!1;return!0}function qr(t,e,n){var r=wu(t),i=r.length;if(wu(e).length!==i)return!1;for(var s,o,a;i-- >0;)if(s=r[i],!xh(t,e,n,s)||(o=Su(t,s),a=Su(e,s),(o||a)&&(!o||!a||o.configurable!==a.configurable||o.enumerable!==a.enumerable||o.writable!==a.writable)))return!1;return!0}function D4(t,e){return jn(t.valueOf(),e.valueOf())}function j4(t,e){return t.source===e.source&&t.flags===e.flags}function Eu(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 N4(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 I4(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 xh(t,e,n,r){return(r===T4||r===O4||r===x4)&&(t.$$typeof||e.$$typeof)?!0:E4(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}var F4="[object Arguments]",B4="[object Boolean]",V4="[object Date]",H4="[object Error]",U4="[object Map]",$4="[object Number]",z4="[object Object]",q4="[object RegExp]",G4="[object Set]",W4="[object String]",Z4="[object URL]",K4=Array.isArray,xu=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,Ou=Object.assign,Q4=Object.prototype.toString.call.bind(Object.prototype.toString);function J4(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(K4(f))return e(f,w,y);if(xu!=null&&xu(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=Q4(f);if(E===V4)return n(f,w,y);if(E===q4)return l(f,w,y);if(E===U4)return s(f,w,y);if(E===G4)return u(f,w,y);if(E===z4)return typeof f.then!="function"&&typeof w.then!="function"&&a(f,w,y);if(E===Z4)return h(f,w,y);if(E===H4)return r(f,w,y);if(E===F4)return a(f,w,y);if(E===B4||E===$4||E===W4)return c(f,w,y);if(v){var x=v[E];if(!x){var g=_4(f);g&&(x=v[g])}if(x)return x(f,w,y)}return!1}}function X4(t){var e=t.circular,n=t.createCustomConfig,r=t.strict,i={areArraysEqual:r?qr:P4,areDatesEqual:A4,areErrorsEqual:R4,areFunctionsEqual:L4,areMapsEqual:r?bu(_u,qr):_u,areNumbersEqual:k4,areObjectsEqual:r?qr:M4,arePrimitiveWrappersEqual:D4,areRegExpsEqual:j4,areSetsEqual:r?bu(Eu,qr):Eu,areTypedArraysEqual:r?qr:N4,areUrlsEqual:I4,unknownTagComparators:void 0};if(n&&(i=Ou({},i,n(i))),e){var s=Ss(i.areArraysEqual),o=Ss(i.areMapsEqual),a=Ss(i.areObjectsEqual),c=Ss(i.areSetsEqual);i=Ou({},i,{areArraysEqual:s,areMapsEqual:o,areObjectsEqual:a,areSetsEqual:c})}return i}function Y4(t){return function(e,n,r,i,s,o,a){return t(e,n,a)}}function e5(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 Tu=fn();fn({strict:!0});fn({circular:!0});fn({circular:!0,strict:!0});fn({createInternalComparator:function(){return jn}});fn({strict:!0,createInternalComparator:function(){return jn}});fn({circular:!0,createInternalComparator:function(){return jn}});fn({circular:!0,createInternalComparator:function(){return jn},strict:!0});function fn(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=X4(t),c=J4(a),l=r?r(c):Y4(c);return e5({circular:n,comparator:c,createState:i,equals:l,strict:o})}const Pu=[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=Pu[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=Pu.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++)Au(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];Au(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;Oh(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 Oh(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));Oh(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 Au(t,e,n,r){const i=t-n,s=e-r;return i*i+s*s}const t5={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},Ru=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),mn=2,Jt=3,Jo=4,Kt=5,Th=6;class n5{constructor(e){this.options=Object.assign(Object.create(t5),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=Ru(Cs(u)),v=Ru(_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+Kt]>1?Lu(l,h,this.clusterProps):this.points[l[h+Jt]])}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+Kt]>1?Lu(o,v,this.clusterProps):this.points[o[v+Jt]])}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+Kt]>1;let u,d,h;if(l)u=Ph(n,c,this.clusterProps),d=n[c],h=n[c+1];else{const f=this.points[n[c+Jt]];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+Jt]:m=this.points[n[c+Jt]].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+mn]<=n)continue;c[d+mn]=n;const h=c[d],v=c[d+1],m=e.within(c[d],c[d+1],a),f=c[d+Kt];let w=f;for(const y of m){const C=y*u;c[C+mn]>n&&(w+=c[C+Kt])}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[_+mn]<=n)continue;c[_+mn]=n;const O=c[_+Kt];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+mn]<=n)){c[C+mn]=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+Kt]>1){const o=this.clusterProps[e[n+Th]];return r?Object.assign({},o):o}const i=this.points[e[n+Jt]].properties,s=this.options.map(i);return r&&s===i?Object.assign({},s):s}}function Lu(t,e,n){return{type:"Feature",id:t[e+Jt],properties:Ph(t,e,n),geometry:{type:"Point",coordinates:[r5(t[e]),i5(t[e+1])]}}}function Ph(t,e,n){const r=t[e+Kt],i=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,s=t[e+Th],o=s===-1?{}:Object.assign({},n[s]);return Object.assign(o,{cluster:!0,cluster_id:t[e+Jt],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 r5(t){return(t-.5)*360}function i5(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function s5(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 ze{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(ze.getPosition(n));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>ze.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(ze.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 o5{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return a5(e)}}const a5=t=>t.map(n=>new Xa({position:ze.getPosition(n),markers:[n]}));class c5 extends o5{constructor(e){var{maxZoom:n,radius:r=60}=e,i=s5(e,["maxZoom","radius"]);super({maxZoom:n}),this.markers=[],this.clusters=[],this.state={zoom:-1},this.superCluster=new n5(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(!Tu(e.markers,this.markers)){n=!0,this.markers=[...e.markers];const s=this.markers.map(o=>{const a=ze.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=!Tu(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:ze.getPosition(i)})}}class l5{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 u5{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(ze.isAdvancedMarkerAvailable(i)){const d=new DOMParser().parseFromString(o,"image/svg+xml").documentElement;d.setAttribute("transform","translate(0 25)");const f={map:i,position:n,zIndex:c,title:a,content:d};return new google.maps.marker.AdvancedMarkerElement(f)}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 u5(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class Pc{constructor(){u5(Pc,google.maps.OverlayView)}}var bn;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click",t.GMP_CLICK="gmp-click"})(bn||(bn={}));const d5=(t,e,n)=>{e.bounds&&n.fitBounds(e.bounds)};class f5 extends Pc{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new a5(r),renderer:s=new l5,onClusterClick:o=d5}){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:(ze.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,bn.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)||ze.setMap(o.marker,null):s.push(o.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>s.forEach(o=>ze.setMap(o,null)))}google.maps.event.trigger(this,bn.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=>ze.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new c5(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=>ze.setMap(i,null)),this.onClusterClick){const i=ze.isAdvancedMarker(r.marker)?bn.GMP_CLICK:bn.CLUSTER_CLICK;r.marker.addListener(i,s=>{google.maps.event.trigger(this,bn.CLUSTER_CLICK,r),this.onClusterClick(s,r,n)})}ze.setMap(r.marker,n)})}}const h5="LocationBalloon-module__root__GtUl6q",p5="LocationBalloon-module__submit__lNcF4k",m5="LocationBalloon-module__details__--VOKk",g5="LocationBalloon-module__icon__X7DOVA",v5="LocationBalloon-module__header__5VQJDW",y5="LocationBalloon-module__titleContainer__BAO73U",b5="LocationBalloon-module__title__bX9pf8",w5="LocationBalloon-module__description__htav7b",S5="LocationBalloon-module__actions__c8dlOR",C5="LocationBalloon-module__close__7Ujvya",bt={root:h5,submit:p5,details:m5,icon:g5,header:v5,titleContainer:y5,title:b5,description:w5,actions:S5,close:C5},_5={default:Wd,llama:Zd},E5=({SSR:t,className:e,hideDetails:n,location:r,location_name:i,name:s,onCloseClick:o,onDetails:a,onSubmit:c})=>{var h;const{logo:l="default"}=_e(),{isLoading:u,lmsData:d}=mo(),f=(h=d==null?void 0:d.location)==null?void 0:h.what3words,v=!!(f!=null&&f.id),m=_5[l];return w.jsxs("div",{className:K(bt.root,e),children:[w.jsxs("div",{className:bt.header,children:[w.jsxs("div",{className:bt.titleContainer,children:[u?w.jsx(Ze,{circle:!0,width:40,height:40}):w.jsx("div",{className:bt.icon,children:w.jsx(m,{})}),u?w.jsx(Ze,{width:200}):w.jsx("span",{className:bt.title,children:s||"{{ properties.point.name }}"})]}),w.jsx("div",{className:bt.close,children:w.jsx(Ar,{position:"relative",onClick:o})})]}),w.jsxs("div",{className:bt.description,children:[u?w.jsx(Ze,{width:300}):(r==null?void 0:r.full_address)||"{{ properties.point.location.full_address }}"," ",u?w.jsx(Ze,{width:300}):i||"{{ properties.point.location_name }}"]}),u?w.jsx(Ze,{width:150}):v&&w.jsx(cf,{what3words:f}),w.jsxs("div",{className:bt.actions,children:[w.jsx(rt,{id:Yh,variant:"primary",className:bt.submit,disabled:u,onClick:c,children:t?"{ choose }":w.jsx(It,{keyName:"choose",ns:"common"})}),!n&&w.jsxs(rt,{id:Zu,as:"link",variant:"primary",className:bt.details,disabled:u,onClick:a,children:[t?"{ details }":w.jsx(It,{keyName:"details",ns:"common"}),w.jsx(Cc,{})]})]})]})},x5=({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:f}=Pt(),v=it(O=>O.location),m=(u==null?void 0:u.primary)||"#fc0",h=l==="omni-llama"?We.PinLlama:We.PinOmnic,S=!!i&&(v==null?void 0:v.uid)===i.uid,b=Nn("screenSm"),{isIdle:_}=Z(),y=dc({isSelectedPoint:S}),E=_&&S&&y&&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":{S?O=We.PinLlamaSelected:O=We.PinLlama;break}case"we-chip":{S?O=We.PinWeChipSelected:O=We.PinWeChip;break}default:{S?O=We.PinOmnicSelected:O=rr(h,m);break}}else S?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,S,l,h,m]),g=p.useMemo(()=>({lat:i.location.latitude,lng:i.location.longitude}),[i.location.latitude,i.location.longitude]),C=()=>{f(),n(i)};return w.jsxs(w.Fragment,{children:[w.jsx(qd,{ref:O=>{d.current=O,s(O)},position:g,zIndex:S?9999:void 0,onClick:C,children:w.jsx("span",{dangerouslySetInnerHTML:{__html:x}})},i.uid),E&&!b&&w.jsx(Gd,{anchor:d.current||void 0,onCloseClick:t,children:w.jsx(E5,{...i,hideDetails:c,className:Le.balloon,onCloseClick:t,onSubmit:()=>r(i),onDetails:()=>e(i)})})]})},O5=({handleCloseClick:t,points:e,...n})=>{const{setSamePoints:r}=Pt(),{onSamePointsClusterClick:i}=_e(),s=ji(),o=p.useMemo(()=>(v,m)=>{if(!m)return;t();const h=m.markers??[],S=h.map(E=>{const x=E.position;if(!x)return{lat:NaN,lng:NaN};const g=typeof x.lat=="number"?x.lat:x.lat(),C=typeof x.lng=="number"?x.lng:x.lng();return{lat:g,lng:C}});if(!S.length)return;const{lat:b,lng:_}=S[0];if(S.every(E=>E.lat===b&&E.lng===_)){const E=e.filter(({location:{latitude:x,longitude:g}})=>x===b&&g===_);r(E),i==null||i(E);return}if(s instanceof google.maps.Map){const E=new google.maps.LatLngBounds;for(const x of h){const g=x.position;if(!g)continue;const C=(typeof g.lat=="number",g);E.extend(C)}s.fitBounds(E,150)}},[s,e,t,i,r]),a=p.useMemo(()=>({render:({count:v,position:m})=>{const h=document.createElement("div");return h.className=Le.cluster,h.innerHTML=`<span class="${Le.number}">${v}</span>`,new google.maps.marker.AdvancedMarkerElement({position:m,content:h,zIndex:v})}}),[]),c=p.useRef(new f5({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 f(v){u.length||d(v)}return w.jsx(w.Fragment,{children:e.map((v,m)=>{const h=m===0,S=m===e.length-1;return h&&(l.current=[]),w.jsx(x5,{point:v,handleCloseClick:t,setMarkerRef:b=>{b&&(l.current.push(b),S&&f([...l.current]))},...n},v.uid)})})},T5=p.memo(O5),P5=t=>{const e=Pt(fm);return w.jsx(T5,{points:e,...t})},A5=p.memo(P5),Ph=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:42,height:42,fill:"none",viewBox:"0 0 42 42",...t},I.createElement("rect",{width:42,height:42,fill:"#fff",rx:21}),I.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"}),I.createElement("rect",{width:41,height:41,x:.5,y:.5,stroke:"#1D3665",strokeOpacity:.1,rx:20.5})),R5="DeliveryBalloon-module__root__Nu90iy",L5="DeliveryBalloon-module__details__eqUTaI",k5="DeliveryBalloon-module__wh__1lJtLN",M5="DeliveryBalloon-module__header__JVdyxN",D5="DeliveryBalloon-module__title__-zKKCt",j5="DeliveryBalloon-module__description__no5-ki",N5="DeliveryBalloon-module__actions__C-N0H-",I5="DeliveryBalloon-module__errorVariant__e6uhZl",F5="DeliveryBalloon-module__logo__62gC5h",Dt={root:R5,details:L5,wh:k5,header:M5,title:D5,description:j5,actions:N5,errorVariant:I5,logo:F5},B5=({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}=Re(),f=a==="error",v=a==="default",m=function(){return l?t?"{ courier_balloon.warehouse_title }":w.jsx(It,{keyName:"warehouse_title",ns:"courier_balloon"}):t?"{ courier_balloon.title }":w.jsx(It,{keyName:"title",ns:"courier_balloon"})}(),h=t?"{ courier_balloon.error_title }":w.jsx(It,{keyName:"error_title",ns:"courier_balloon"}),S=t?"{ courier_balloon.error_description }":w.jsx(It,{keyName:"error_description",ns:"courier_balloon"});function b(){d&&(c==null||c(d),u(null))}const{label:_,onClick:y}=l?{onClick:b,label:t?"{ select }":w.jsx(It,{keyName:"select",ns:"common"})}:{onClick:o,label:t?"{ details }":w.jsx(It,{keyName:"details",ns:"common"})};return w.jsxs("div",{className:K(Dt.root,n,Dt[`${a}Variant`]),children:[w.jsxs("div",{className:Dt.header,children:[w.jsx(Ph,{className:Dt.logo}),w.jsx("span",{className:Dt.title,children:f?h:m}),r&&w.jsx(Ar,{onClick:s})]}),w.jsx("div",{className:Dt.description,children:f?S:e||"{{ properties.address }}"}),v&&(!i||l)&&w.jsx("div",{className:Dt.actions,children:w.jsx(rt,{id:Zu,as:"button",variant:"primary",className:K(Dt.details,l?Dt.wh:""),onClick:y,children:_})})]})},V5="Chip-module__root__zsoSyP",H5="Chip-module__active__BlTSFB",ku={root:V5,active:H5},Mu=({active:t,children:e,className:n,...r})=>w.jsx("div",{...r,className:K(ku.root,n,{[ku.active]:t}),children:e}),U5="TextArea-module__root__8YFknR",$5={root:U5},Du=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=Mh(e,a);return w.jsx("textarea",{...s,ref:c,className:K($5.root,t),onBlur:n,onFocus:i,onChange:r})}),z5=({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},q5="DeliveryDetailsView-module__title__azeoUr",G5="DeliveryDetailsView-module__logo__4zZtpM",W5="DeliveryDetailsView-module__header__oDE9He",Z5="DeliveryDetailsView-module__content__6P27SY",K5="DeliveryDetailsView-module__section__2M3Qip",Q5="DeliveryDetailsView-module__chips__KmYgha",J5="DeliveryDetailsView-module__actions__43XZ-V",X5="DeliveryDetailsView-module__submit__58LKBw",Y5="DeliveryDetailsView-module__actionsHidden__SW-67b",e6="DeliveryDetailsView-module__commentSection__GlX1A2",t6="DeliveryDetailsView-module__comment__2pGG6h",He={title:q5,logo:G5,header:W5,content:Z5,section:K5,chips:Q5,actions:J5,submit:X5,actionsHidden:Y5,commentSection:e6,comment:t6},n6=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(()=>z5({set:r,hideDeliveryTime:a}),[a,r]),[f,v]=p.useState(!1),[m,h]=p.useReducer(d,{comment:"",delivery_time:"",apartment_number:"",...n}),S=p.useCallback(async()=>{v(!0);try{Ot(n.address,"Address is required");const C=await Fh({address:n.address,algorithm:10,service:10,language:l||Ku});if(!xd(C))return;const O=C==null?void 0:C.data.data,A={...m,address:O};return s==null||s(A),A}finally{v(!1)}},[l,n.address,s,m]);p.useImperativeHandle(o,()=>({submit:S}),[S]);const b=C=>()=>{h({payload:C,type:"SET_DELIVERY_TIME"})},_=C=>{h({payload:C.target.value,type:"SET_APARTMENT_NUMBER"})},y=C=>{h({payload:C.target.value,type:"SET_COMMENT"})},E=so(c==null?void 0:c.apartment),x=so(c==null?void 0:c.comment);return w.jsxs(w.Fragment,{children:[w.jsxs("div",{className:K(He.header,t==null?void 0:t.header),children:[w.jsx(Ar,{onClick:i}),w.jsxs("div",{className:He.title,children:[w.jsx(Ph,{className:He.logo}),w.jsx("span",{children:u("title",{ns:"courier_balloon"})})]})]}),w.jsxs("div",{className:K(He.content,t==null?void 0:t.content),children:[w.jsxs("section",{className:He.section,children:[w.jsxs("span",{children:[u("address"),":"]}),w.jsx("p",{children:n.address})]}),!a&&w.jsxs("section",{className:He.section,children:[w.jsxs("span",{children:[u("delivery_time"),":"]}),w.jsxs("div",{className:He.chips,children:[w.jsx(Mu,{active:m.delivery_time==="8:00-13:00",onClick:b("8:00-13:00"),children:"8:00 - 13:00"}),w.jsx(Mu,{active:m.delivery_time==="14:00-22:00",onClick:b("14:00-22:00"),children:"14:00 - 22:00"})]})]}),w.jsxs("section",{className:He.section,children:[w.jsxs("span",{children:[u("apartment_number"),":"]}),w.jsx(Du,{...E,rows:1,onChange:_})]}),w.jsxs("section",{className:K(He.section,He.commentSection),children:[w.jsxs("span",{children:[u("comment"),":"]}),w.jsx(Du,{...x,className:He.comment,onChange:y})]})]}),w.jsx("div",{className:K(He.actions,{[He.actionsHidden]:e}),children:w.jsx(rt,{loading:f,disabled:!((g=m.meta)!=null&&g.valid)||f,variant:"primary",className:He.submit,onClick:S,children:u("choose",{ns:"common"})})})]})}),Ah=p.memo(n6),r6={header:Le.deliveryDetailsViewHeader,content:Le.deliveryDetailsViewContent},i6=({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:""}),f=p.useRef(null),v=p.useRef(null),{warehouseSelection:m}=_e(),{warehousePoint:h}=Re(),S=dc({isSelectedPoint:!0}),b=((L=f.current)==null?void 0:L.checkVisibility())??!1;p.useEffect(()=>{setTimeout(()=>{a(!0)},100)},[]),p.useEffect(()=>{d({...r,comment:"",delivery_time:"",apartment_number:""})},[r]);const _=Nn("screenSm"),y=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"),[]),C=async()=>{var T;try{l(!0);const D=await((T=v.current)==null?void 0:T.submit());if(!D)return;n==null||n(D),s==null||s(!1),i==null||i(null)}finally{l(!1)}},O=w.jsx(B5,{...u,hideDetails:e,hasCloseButton:_,variant:u.address?"default":"error",className:Le.balloon,onDetails:E,onClose:x}),A=m?!!h&&b:S&&!b,R=t?!!u.apartment_number:!!u.apartment_number&&!!u.delivery_time;return w.jsxs(w.Fragment,{children:[w.jsx(qd,{ref:f,position:y,children:w.jsx("span",{dangerouslySetInnerHTML:{__html:g}})}),_&&w.jsxs(ch,{minSnapHeight:u.address?200:void 0,submitDisabled:!R||c,submitLoading:c,hideFooter:!u.address,open:A,onDismiss:x,onSubmitClick:C,children:[u.address&&w.jsx(Ah,{ref:v,hideActions:!0,classes:r6,location:r,onChange:d,onClose:x}),u.address?null:O]}),!_&&A&&w.jsx(Gd,{anchor:f.current||void 0,onCloseClick:x,children:O})]})},So=()=>w.jsx(lh,{children:w.jsx(qs,{})}),s6={place:null,mapKey:""},o6=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"))},Bi=Ht((t,e)=>({...s6,setMapKey(n){t({mapKey:n})},async setPlace(n,r,i){var c,l,u,d,f,v;const{map:s}=Z.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(h=>{var S;return(S=h.types)==null?void 0:S.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(f=o==null?void 0:o.geometry)!=null&&f.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&&Re.getState().setWarehousePoint({...s,coords:{lat:o.lat(),lng:o.lng()}}),(!(r!=null&&r.ignoreSelection)||r!=null&&r.warehouseSelection)&&Re.getState().setDeliverPoint(c),s},setPlaceSimple(n,r){var i,s;if(r!=null&&r.withNavigation){const{map:o}=Z.getState();Ot(o,"Map is not defined");let a;(i=n==null?void 0:n.geometry)!=null&&i.viewport?a=n.geometry.viewport:(s=n==null?void 0:n.geometry)!=null&&s.location&&(a=new google.maps.LatLngBounds,a.extend(n.geometry.location)),a&&(o.fitBounds(a),o.setZoom(12))}t({place:n})}}));async function a6(){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 c6(t){return _h({queryKey:["wl-map-key-wl"],queryFn:()=>a6(),refetchOnWindowFocus:!1,retry:2,enabled:t})}const Rh=p.createContext(null),Lh=({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}=c6(a),u=c==null?void 0:c.key;function d(){var b,_,y;switch(s){case"omnic":return(b=c==null?void 0:c.additional_data)==null?void 0:b.map_id_omnic;case"llama":return(_=c==null?void 0:c.additional_data)==null?void 0:_.map_id_llama;case"chip":return(y=c==null?void 0:c.additional_data)==null?void 0:y.map_id_chip;default:return"e130cd87a3f1b9cbe3cb5de4"}}const f=r||u||"AIzaSyDsI0AO8VsUrTPoyR9fF7T31FKx1a9TLO0",v=n||d(),m=p.useMemo(()=>({mapKey:f,mapId:v,isFetching:l}),[v,f,l]),{setMapKey:h}=Bi();p.useEffect(()=>{h(f)},[f,h]);const S=()=>l?t?e:w.jsx(So,{}):w.jsx(Hm,{apiKey:f,language:o.current,libraries:tp,children:e});return w.jsx(Rh.Provider,{value:m,children:S()})},kh=()=>{const t=p.useContext(Rh);if(!t)throw new Error("useMapKeyApiContext must be used within a MapKeyApiProvider");return t},l6=({children:t,className:e,...n})=>{const{disableDelivery:r,map:i,warehouseSelection:s}=_e(),{mapId:o}=kh(),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;Z.getState().setDetailsOpen(!1),it.getState().setSelectedLocation(null);const d=[u.lat,u.lng];console.debug("[OmnicLocationsWidget::mapClick]",d);try{await Bi.getState().setPlaceAndPoint(d,{warehouseSelection:s})}catch{Re.getState().setDeliverPoint({address:null,coords:d})}},[r,s]);return w.jsx(zd,{disableDefaultUI:!0,mapId:o,defaultZoom:i==null?void 0:i.initialZoom,defaultCenter:a,className:K(Le.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})},u6=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},I.createElement("rect",{width:2,height:20,x:9,fill:"#fff",rx:1}),I.createElement("rect",{width:2,height:20,x:20,y:9,fill:"#fff",rx:1,transform:"rotate(90 20 9)"}),I.createElement("circle",{cx:10,cy:10,r:8,fill:"#fff"}),I.createElement("circle",{cx:10,cy:10,r:6,fill:"currentcolor"}),I.createElement("circle",{cx:10,cy:10,r:4,fill:"#fff"})),d6=t=>{const e=document.createElement("div"),n=document.createElement("div");e.classList.add(Le.mapControl),n.classList.add(Le.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)})},f6=t=>{const e=document.createElement("div");e.classList.add(Le.mapControl),e.classList.add(Le.geolocationControl),e.innerHTML=$h.renderToString(w.jsx(u6,{})),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{cc()})},h6=({className:t})=>{const e=un(),n=Z(Rp),r=Z(jp),i=Pt(Pd),s=Re(ec),o=ji(),{lmsData:a}=mo(),{cityName:c,countryAbbreviation:l,disableGeolocation:u,hideDeliveryTime:d,hideDetails:f,hideMapControls:v,onPointClick:m,regionName:h,skipPointInfo:S}=_e(),b=p.useCallback(B=>{console.debug("[OmnicLocationsWidget::loadMap]",B),Z.getState().setMap(B),Z.getState().setLoaded(),v||(d6(B),u||f6(B))},[u,v]),_=p.useCallback(()=>{console.debug("[OmnicLocationsWidget::unmountMap]"),Z.getState().setMap(null)},[]);p.useEffect(()=>{if(o)return b(o),()=>{_()}},[o,b,_]);const y=p.useCallback(B=>{const $=a==null?void 0:a.location.what3words,q=$!=null&&$.id?$:void 0;m==null||m(B,q)},[m,a]),E=p.useRef(null),x=p.useRef(null),g=p.useCallback(B=>{const $=B.getSouthWest(),q=B.getNorthEast(),ae=ne=>Math.round(ne*1e3)/1e3,le=`${ae($.lat())}:${ae($.lng())}:${ae(q.lat())}:${ae(q.lng())}`,ue=JSON.stringify(e??{});return`${le}|${ue}|${c??""}|${l??""}|${h??""}`},[c,l,e,h]),C=p.useCallback(()=>{Z.getState().setIdle(!0),n&&(E.current&&window.clearTimeout(E.current),E.current=window.setTimeout(()=>{const B=n.getBounds();if(!B)return;const $=g(B);x.current!==$&&(x.current=$,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:h}))},250))},[g,c,l,e,n,h]);p.useEffect(()=>()=>{E.current&&window.clearTimeout(E.current)},[]);const O=p.useCallback(async B=>{Re.getState().setDeliverPoint(null),it.getState().setSelectedLocation(B)},[]),A=p.useCallback(()=>{console.debug("[OmnicLocationsWidget::tilesLoaded]")},[]),R=Z.getState().setDetailsOpen,{getLMSData:L}=y4(),T=B=>{if(L(B.code),S){y(B);return}R(!1),O(B)},D=()=>{R(!1),O(null)},N=B=>{R(!0),O(B)},H=B=>{y(B),R(!1),O(null)};return w.jsxs(w.Fragment,{children:[w.jsxs("div",{className:K(Le.mapContainer,t),children:[w.jsxs(l6,{onIdle:C,onTilesLoaded:A,onBoundsChanged:()=>{Z.getState().setIdle(!1)},children:[s&&w.jsx(i6,{hideDeliveryTime:d,hideDetails:f,point:s,setOpenDetails:Z.getState().setDetailsOpen,setDeliveryPoint:Re.getState().setDeliverPoint,onPointClick:y}),w.jsx(A5,{handleCloseClick:D,handleDetailsClick:N,handlePointClick:T,handleSubmitClick:H})]}),(i||r)&&w.jsx(lh,{className:Le.overlay,children:w.jsx(qs,{})})]}),w.jsx(Fb,{handleDetailsClick:N,handlePointClick:T}),w.jsx(fb,{handleCloseClick:D,handleSubmitClick:H})]})},p6=p.memo(h6),m6=t=>({google:p6})[t];function Mh(...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}},g6=()=>{throw new Error("useMediaQuery is a client-only hook")};function v6(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,g6)}const y6="768px",b6="1024px",w6="1280px",S6="1536px",C6={screenSm:y6,screenMd:b6,screenLg:w6,screenXl:S6};function Nn(t){return v6(`(max-width: calc(${C6[t]} - 1px))`)}const Dh=gv().use(rv()).use(Zg()).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"}),_6=t=>{p.useEffect(()=>{t&&(Dh.changeLanguage(t),$s.setLanguage(t))},[t])},E6=t=>{p.useEffect(()=>{if(t){const e=Object.keys(t);for(const n of e){const r=t[n];r&&Mi(`--owl-color-${n}`,r)}}},[t])},x6=t=>{p.useEffect(()=>{t&&t!==void 0&&Mi("--owl-button-radius",`${t}px`)},[t])},O6=t=>{p.useEffect(()=>{t&&t!==void 0&&Mi("--owl-font",t)},[t])},T6=500,Jn=[];function Ac(t={}){const{country:e,debounceMs:n=T6,globalSearch:r,onPlaceSelect:i,types:s}=t,o=r?void 0:e,a=uc("places"),[c,l]=p.useState(""),[u,d]=p.useState(""),[f,v]=p.useState(Jn),[m,h]=p.useState(!1),S=p.useMemo(()=>s,[JSON.stringify(s)]),b=p.useRef(null),_=p.useRef(),y=p.useRef(!1),E=p.useRef(i);E.current=i;const x=p.useCallback(()=>a?(b.current||(b.current=new a.AutocompleteSessionToken),b.current):null,[a]),g=p.useCallback(()=>{b.current=null},[]),C=p.useCallback(()=>{v(Jn)},[]),O=p.useCallback(T=>{y.current=!0,l(T)},[]),A=p.useCallback(T=>{d(T),O(T)},[O]),R=p.useCallback(()=>{const T=c.trim();if(C(),!T){d("");return}c!==u&&O(u)},[C,u,O,c]);p.useEffect(()=>{if(y.current){y.current=!1;return}if(!a||!c.trim()){v(T=>T.length>0?Jn:T);return}return clearTimeout(_.current),_.current=setTimeout(async()=>{h(!0);try{const T=x(),D={input:c,...T&&{sessionToken:T},...o&&{includedRegionCodes:[o]},...(S==null?void 0:S.length)&&{includedPrimaryTypes:S}},{suggestions:N}=await a.AutocompleteSuggestion.fetchAutocompleteSuggestions(D),H=N.filter(B=>B.placePrediction!==null).map(B=>{var q,ae;const $=B.placePrediction;return{placeId:$.placeId,mainText:((q=$.mainText)==null?void 0:q.text)??"",secondaryText:((ae=$.secondaryText)==null?void 0:ae.text)??"",description:$.text.text}});v(H.length>0?H:Jn)}catch(T){console.error("[usePlaceAutocomplete] Failed to fetch suggestions:",T),v(Jn)}finally{h(!1)}},n),()=>clearTimeout(_.current)},[c,a,o,S,n,x]);const L=p.useCallback(async T=>{var D;if(a)try{const N=new a.Place({id:T}),H=await Td(N);(D=E.current)==null||D.call(E,H),g(),v(Jn)}catch(N){console.error("[usePlaceAutocomplete] Failed to fetch place details:",N)}},[a,g]);return p.useMemo(()=>({value:c,selectedValue:u,setValue:l,commitValue:A,handleInputBlur:R,suggestions:f,isLoading:m,clearSuggestions:C,handleSelect:L}),[c,u,A,R,f,m,C,L])}const P6={open:!1},A6=t=>t.open,wn=Ht(t=>({...P6,toggle(e){t(n=>({open:e??!n.open}))}})),R6=t=>{const e=t==="selector";p.useEffect(()=>{e&&wn.getState().toggle(!0)},[e])},L6=t=>{p.useEffect(()=>{t==="sharp"&&Mi("--owl-radius","0")},[t])},k6=({children:t})=>{const{cornersVariant:e,font:n,locale:r,palette:i,radius:s,startScreen:o}=_e();return O6(n),_6(r),E6(i),x6(s),R6(o),L6(e),w.jsx(w.Fragment,{children:t})},M6=({children:t})=>{const{disableGeolocation:e,map:n}=_e(),[r,i]=p.useState(e),{loaded:s}=Z();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),it.getState().setIsTrackingEnabled(!0)},error:()=>{i(!0)}})},[e,r,s,n]),t},D6=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:28,fill:"none",viewBox:"0 0 24 28",...t},I.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=()=>{wn.getState().toggle(!0),Z.getState().setDetailsOpen(!1),Re.getState().setDeliverPoint(null),it.getState().setSelectedLocation(null)},N6="CurrentLocation-module__root__AeQCGT",I6="CurrentLocation-module__icon__459m9q",F6="CurrentLocation-module__text__w-9v28",Xo={root:N6,icon:I6,text:F6},jh=({className:t})=>{const{t:e}=mt("current_location"),n=Bi(o6),{location:r}=it(),s=(r==null?void 0:r.location.full_address)??(n==null?void 0:n.long_name)??e("choose_from_map");return w.jsxs("div",{role:"presentation",className:K(Xo.root,t),onClick:j6,children:[w.jsx(D6,{className:Xo.icon}),w.jsx("span",{className:Xo.text,children:s})]})},B6=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:123,height:32,fill:"none",viewBox:"0 0 123 32",...t},I.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"})),V6=t=>I.createElement("svg",{width:119,height:44,viewBox:"0 0 119 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},I.createElement("path",{d:"M4.70489 0.199253H0V13.4418H10.7452V10.0105H4.70489V0.199253Z",fill:"black"}),I.createElement("path",{d:"M16.9359 0.199253H12.2287V13.4418H22.974V10.0105H16.9359V0.199253Z",fill:"black"}),I.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"}),I.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"}),I.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"}),I.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"}),I.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"}),I.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"}),I.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"}),I.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"}),I.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"}),I.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"}),I.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"})),H6="Header-module__root__Pe4MYp",U6="Header-module__nav__wtnkmT",$6="Header-module__navItem__-Fy63Z",z6="Header-module__logo__xO2bWO",ei={root:H6,nav:U6,navItem:$6,logo:z6},q6={llama:V6,default:B6},G6=()=>{const{hideLogo:t,logo:e="default"}=_e();if(t)return null;const n=q6[e];return w.jsx("div",{className:ei.logo,children:w.jsx(n,{})})},W6=({className:t})=>{const{t:e}=mt("header"),{disableDelivery:n}=_e(),r=Z(Lp),i=Re(ec);p.useEffect(()=>{i?Z.getState().setMode("location_delivery"):Z.getState().setMode("self_pickup")},[i]);const s=()=>{Re.getState().setDeliverPoint(null),Z.getState().setMode("self_pickup")},o=()=>{Re.getState().setDeliverPoint(null),Z.getState().setMode("location_delivery")},a=r==="self_pickup",c=r==="location_delivery";return w.jsxs("div",{className:K(ei.root,t),children:[w.jsx(G6,{}),w.jsxs("nav",{className:ei.nav,children:[!n&&w.jsx(rt,{as:"link",className:ei.navItem,variant:a?"primary":"secondary",onClick:s,children:e("self_pickup")}),!n&&w.jsx(rt,{as:"link",className:ei.navItem,variant:c?"primary":"secondary",onClick:o,children:e("courier_delivery")}),w.jsx(jh,{})]})]})},Z6=p.memo(W6),K6={open:!1},Tr=Ht(t=>({...K6,toggle(e){Z.getState().setDetailsOpen(!1),Re.getState().setDeliverPoint(null),it.getState().setSelectedLocation(null),t(n=>({open:e??!n.open}))}})),Q6="Layout-module__root__qzPL-f",J6="Layout-module__headerHidden__JEN-d0",X6="Layout-module__sidebarHidden__x017O3",Y6="Layout-module__sidebarOpen__IZnIjs",Es={root:Q6,headerHidden:J6,sidebarHidden:X6,sidebarOpen:Y6},ew=({children:t})=>{const{hideFilters:e,hideHeader:n}=_e(),r=Tr(i=>i.open);return w.jsx("div",{className:K(Es.root,{[Es.sidebarOpen]:r,[Es.headerHidden]:n,[Es.sidebarHidden]:e}),children:t})},tw=({children:t})=>{const e=Pt(hm);return Pt(Pd)&&!e?w.jsx(So,{}):w.jsx(w.Fragment,{children:t})},nw="Aside-module__root__EotK2f",rw="Aside-module__open__Zwmbs5",iw="Aside-module__overlay__slLdHF",sw="Aside-module__container__28P4wq",xs={root:nw,open:rw,overlay:iw,container:sw},ow=({children:t,className:e,open:n})=>w.jsxs("div",{className:K(xs.root,e,{[xs.open]:n}),children:[w.jsx("div",{className:xs.overlay}),w.jsx("div",{className:xs.container,children:t})]}),aw="Input-module__locationSearchRoot__svh-f9",cw="Input-module__endAdornment__m40K5R",lw="Input-module__input__505b7i",uw="Input-module__startAdornment__D-sJ0N",dw="Input-module__locationSearchInput__2YK1MG",fw="Input-module__label__gmqtsf",hw="Input-module__inputContainer__vubIa-",Xn={locationSearchRoot:aw,endAdornment:cw,input:lw,startAdornment:uw,locationSearchInput:dw,label:fw,inputContainer:hw},pw=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 f;(f=u.current)==null||f.focus()},blur:()=>{var f;(f=u.current)==null||f.blur()},setValue:f=>{if(s){s({target:{value:f}});return}if(i){i({target:{value:f}});return}u.current&&(u.current.value=f)}}),[i,s]);const d=Mh(n,u);return w.jsxs("label",{htmlFor:a.id??l,className:K(Xn.locationSearchRoot,t),children:[r&&w.jsx("span",{className:Xn.label,children:r}),w.jsxs("div",{className:Xn.inputContainer,children:[o&&w.jsx("div",{className:Xn.startAdornment,children:o}),w.jsx("input",{...a,ref:d,id:a.id??l,className:Xn.locationSearchInput,onChange:s,onBlur:i}),e&&w.jsx("div",{className:Xn.endAdornment,children:e})]})]})}),mw="PlaceAutocomplete-module__container__fdiqiO",gw="PlaceAutocomplete-module__dropdown__u-0PdK",vw="PlaceAutocomplete-module__item__zHJqmC",yw="PlaceAutocomplete-module__itemMain__-skwdB",bw="PlaceAutocomplete-module__itemSecondary__sD5QDK",ww="PlaceAutocomplete-module__itemArrow__CtQ5GG",er={container:mw,dropdown:gw,item:vw,itemMain:yw,itemSecondary:bw,itemArrow:ww},Sw=({onSelect:t,suggestions:e})=>w.jsx("div",{className:er.dropdown,role:"listbox",children:e.map(n=>w.jsxs("div",{className:er.item,role:"option","aria-selected":!1,onPointerDown:r=>r.preventDefault(),onClick:()=>t(n),onKeyDown:r=>{r.key==="Enter"&&t(n)},children:[w.jsx("span",{className:er.itemMain,children:n.mainText}),n.secondaryText&&w.jsx("span",{className:er.itemSecondary,children:n.secondaryText}),w.jsx(Cc,{className:er.itemArrow})]},n.placeId))}),Rc=({autocomplete:t,children:e,className:n,endAdornment:r,inputRef:i,label:s,name:o,onBlur:a,onClick:c,onFocus:l,placeholder:u})=>{const d=p.useRef(null),f=t.suggestions.length>0,v=p.useRef(t.clearSuggestions);v.current=t.clearSuggestions,p.useEffect(()=>{if(!f)return;const _=y=>{d.current&&!d.current.contains(y.target)&&v.current()};return document.addEventListener("click",_),()=>document.removeEventListener("click",_)},[f]);const m=_=>{t.setValue(_.target.value)},h=_=>{t.commitValue(_.description),t.clearSuggestions(),t.handleSelect(_.placeId)},S=()=>{t.handleInputBlur(),a==null||a()},b={value:t.value,onChange:m,inputRef:i,onFocus:l,onBlur:S,onClick:c,placeholder:u,name:o,label:s,endAdornment:r};return w.jsxs("div",{ref:d,className:K(er.container,n),children:[typeof e=="function"?e(b):w.jsx(pw,{...b}),f&&w.jsx(Sw,{suggestions:t.suggestions,onSelect:h})]})},Cw="LocationAside-module__submit__CSKcqi",_w="LocationAside-module__container__S1NejR",Ew="LocationAside-module__selector__hl74ke",xw="LocationAside-module__label__0Zk8at",Ow="LocationAside-module__header__N1wgyn",Tw="LocationAside-module__close__VsE88z",Os={submit:Cw,container:_w,selector:Ew,label:xw,header:Ow,close:Tw},Pw=p.forwardRef((t,e)=>{const{t:n}=mt(["location_aside","common"]),r=wn(A6),{country:i,globalSearch:s,hideCloseButtonOnLocationScreen:o,inputs:a,onCloseLocationSelector:c,onLocationSelect:l}=_e(),u=p.useRef(null);p.useImperativeHandle(e,()=>({open:()=>wn.getState().toggle(!0),close:()=>wn.getState().toggle(!1)}),[]);const d=p.useCallback(h=>{wn.getState().toggle(!1),Bi.getState().setPlaceSimple(h,{withNavigation:!0}),l==null||l(h)},[l]),f=Ac({country:i,globalSearch:s,onPlaceSelect:d}),v=()=>{wn.getState().toggle(!1),c==null||c()},m=so(a==null?void 0:a.city);return w.jsx(ow,{open:r,children:w.jsx("div",{ref:u,className:Os.container,children:w.jsxs("div",{className:Os.selector,children:[w.jsxs("div",{className:Os.header,children:[w.jsx("div",{className:Os.label,children:n("choose_city")}),!o&&w.jsx(Ar,{position:"relative",onClick:v})]}),w.jsx(Rc,{autocomplete:f,inputRef:m.ref,name:m.name,placeholder:n("placeholder"),onClick:m.onClick})]})})})}),Aw=p.memo(Pw),Rw=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},I.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"})),Lw=({className:t})=>{const{t:e}=mt("location_selector"),{country:n,globalSearch:r,inputs:i,onLocationSelect:s}=_e(),o=p.useCallback(d=>{Bi.getState().setPlaceSimple(d,{withNavigation:!0}),s==null||s(d)},[s]),a=Ac({country:n,globalSearch:r,types:[],onPlaceSelect:o}),c=()=>{a.value&&Z.getState().setBlurred(!0),Z.getState().setDetailsOpen(!1),Re.getState().setDeliverPoint(null),it.getState().setSelectedLocation(null)},l=()=>{Z.getState().setBlurred(!1)},u=so(i==null?void 0:i.address);return w.jsx(Rc,{autocomplete:a,className:t,endAdornment:w.jsx(Rw,{}),inputRef:u.ref,name:u.name,placeholder:e("placeholder"),onBlur:l,onClick:u.onClick,onFocus:c})},kw=({className:t})=>Z(Dp)?w.jsx(Lw,{className:t}):null,Mw=p.memo(kw),Dw="DeliveryDetailsModal-module__root__qwKnjX",jw={root:Dw},Nw=({className:t,location:e,onClose:n,onSubmit:r})=>w.jsx("div",{className:K(jw.root,t),children:w.jsx(Ah,{location:e,onClose:n,onSubmit:r})}),Iw="LocationDetailsModal-module__root__PyRnLM",Fw={root:Iw},Bw=({className:t,location:e,onClose:n,onSubmit:r})=>{const i=()=>{r==null||r(e)};return w.jsx("div",{className:K(Fw.root,t),children:w.jsx(lf,{location:e,onClose:n,onSubmit:i})})},Vw="MapContainer-module__root__1Os6Q-",Hw="MapContainer-module__mapWrapper__Cwe7qC",Uw="MapContainer-module__wrapperBlurred__04NN2L",$w="MapContainer-module__locationSelector__Pr1zS-",zw="MapContainer-module__filterButton__CW3Qv7",qw="MapContainer-module__sidebarOpen__lGMVrJ",Gw="MapContainer-module__filterIcon__T01XsJ",Ww="MapContainer-module__details__gM8LWX",xt={root:Vw,mapWrapper:Hw,wrapperBlurred:Uw,locationSelector:$w,filterButton:zw,sidebarOpen:qw,filterIcon:Gw,details:Ww},Zw=()=>{const{onPointClick:t}=_e(),e=Z(tc),n=it(Ip),r=Re(ec),i=p.useCallback(()=>{Z.getState().setDetailsOpen(!1)},[]),s=p.useCallback(o=>{t==null||t(o),Z.getState().setDetailsOpen(!1),it.getState().setSelectedLocation(null),Re.getState().setDeliverPoint(null)},[t]);return w.jsxs(w.Fragment,{children:[(r==null?void 0:r.address)&&e&&w.jsx(Nw,{location:r,className:xt.details,onClose:i,onSubmit:s}),n&&e&&w.jsx(Bw,{location:n,className:xt.details,onClose:i,onSubmit:s})]})},Kw=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:60,height:40,fill:"none",viewBox:"0 0 60 40",...t},I.createElement("path",{d:"M0 0h52a8 8 0 0 1 8 8v24a8 8 0 0 1-8 8H0V0Z"}),I.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"})),Qw=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:28,height:28,fill:"none",viewBox:"0 0 28 28",...t},I.createElement("rect",{width:28,height:28,fill:"#333",rx:4}),I.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"})),Jw=()=>{const t=Tr(i=>i.open),e=Tr(i=>i.toggle),n=Nn("screenSm"),r=()=>{e(!0)};return w.jsxs("div",{role:"presentation",className:K(xt.filterButton,{[xt.sidebarOpen]:t}),onClick:n?void 0:r,children:[n&&w.jsx(jh,{}),n?w.jsx(Qw,{className:xt.filterIcon,onClick:r}):w.jsx(Kw,{className:xt.filterIcon})]})},Xw=({children:t,className:e})=>{const{hideFilters:n,hideSearchInput:r}=_e(),i=Z(Mp),s=Z(tc);return w.jsxs("div",{className:K(xt.root,e),children:[!r&&!s&&w.jsx(Mw,{className:xt.locationSelector}),!n&&w.jsx(Jw,{}),w.jsx("div",{className:K(xt.mapWrapper,{[xt.wrapperBlurred]:i}),children:t}),w.jsx(Zw,{})]})},Yw=p.memo(Xw),e8="Separator-module__root__eQtZey",t8={root:e8},Yo=({className:t,...e})=>w.jsx("hr",{className:K(t8.root,t),...e}),n8="Sidebar-module__root__4j1MA3",r8="Sidebar-module__closeButton__HLXy1c",i8="Sidebar-module__open__mqQXF6",s8="Sidebar-module__header__Afp6uz",o8="Sidebar-module__typeFilter__GN46u9",a8="Sidebar-module__separator__6I4QoJ",c8="Sidebar-module__withRightPadding__2u1Ina",l8="Sidebar-module__sheetContent__SaoncI",u8="Sidebar-module__doneButton__4aeaSD",Ft={root:n8,closeButton:r8,open:i8,header:s8,typeFilter:o8,separator:a8,withRightPadding:c8,sheetContent:l8,doneButton:u8},d8=()=>{const{t}=mt("common"),e=Nn("screenSm"),n=Tr(i=>i.toggle),r=()=>{n(!1)};return w.jsxs("div",{className:Ft.header,children:[e&&w.jsx("div",{role:"presentation",className:Ft.doneButton,onClick:r,children:t("done")}),!e&&w.jsx(Ar,{className:Ft.closeButton,onClick:r})]})},f8="Radio-module__root__7ElY2W",h8="Radio-module__label__c-sYW3",ju={root:f8,label:h8},p8=({className:t,label:e,labelProps:n={},...r})=>{const i=p.useId(),{className:s,...o}=n;return w.jsxs("label",{htmlFor:i,className:K(ju.label,s),...o,children:[w.jsx("input",{id:i,type:"radio",className:K(ju.root,t),...r}),e]})},cr=t=>w.jsx(p8,{...t,type:"checkbox"}),m8="RadioGroup-module__root__ewZw-x",g8="RadioGroup-module__body__k8BJAs",v8="RadioGroup-module__legend__tcfV7q",ea={root:m8,body:g8,legend:v8},Nh=({children:t,className:e,label:n,onChange:r,value:i,...s})=>w.jsxs("div",{className:K(ea.root,e),...s,children:[n&&w.jsx("span",{className:ea.legend,children:n}),w.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)})]}),y8=({className:t,onChange:e})=>{const{t:n}=mt("receive_filter"),r=un(Hp);return w.jsxs(Nh,{value:r,label:n("title"),className:t,onChange:e,children:[w.jsx(cr,{name:"receive",value:ht.DressingRoom,label:n("dressing_room")}),w.jsx(cr,{name:"receive",value:ht.CheckOrder,label:n("check_order")}),w.jsx(cr,{name:"receive",value:ht.PayByCash,label:n("pay_by_cash")})]})},b8=p.memo(y8),w8=({className:t,onChange:e})=>{const{t:n}=mt("send_filter"),r=un(Vp);return w.jsxs(Nh,{className:t,value:r,label:n("title"),onChange:e,children:[w.jsx(cr,{name:"send",value:pt.Return,label:n("sending_returns")}),w.jsx(cr,{name:"send",value:pt.Shipping,label:n("shipping")}),w.jsx(cr,{name:"send",value:pt.Payment,label:n("payment")})]})},S8=p.memo(w8),C8="TypeFilter-module__root__WH5EQV",_8="TypeFilter-module__button__f0mSfo",Ts={root:C8,button:_8},E8=({className:t,onChange:e,value:n})=>{const{t:r}=mt("type_filter"),i=s=>()=>e==null?void 0:e(s);return w.jsxs("div",{className:K(Ts.root,t),children:[w.jsx(rt,{className:Ts.button,variant:n===Nt.All?"primary":"secondary",onClick:i(Nt.All),children:r("all")}),w.jsx(rt,{className:Ts.button,variant:n===Nt.PostOffice?"primary":"secondary",onClick:i(Nt.PostOffice),children:r("post_office")}),w.jsx(rt,{className:Ts.button,variant:n===Nt.PickPoint?"primary":"secondary",onClick:i(Nt.PickPoint),children:r("pick_point")})]})},x8=({className:t,onChange:e})=>{const n=un(Bp);return w.jsx(E8,{value:n,className:t,onChange:e})},O8=p.memo(x8),T8=({className:t})=>{const e=Nn("screenSm"),n=Tr(c=>c.open),r=p.useCallback(c=>un.getState().setFilter({type:c}),[]),i=p.useCallback(c=>un.getState().setFilter({send:c}),[]),s=p.useCallback(c=>un.getState().setFilter({receive:c}),[]),o=p.useCallback(()=>Tr.getState().toggle(!1),[]),a=w.jsxs(w.Fragment,{children:[w.jsx(d8,{}),w.jsxs("div",{className:Ft.withRightPadding,children:[w.jsx(O8,{className:Ft.typeFilter,onChange:r}),w.jsx(Yo,{className:Ft.separator}),w.jsx(b8,{onChange:s}),w.jsx(Yo,{}),w.jsx(S8,{onChange:i}),w.jsx(Yo,{})]})]});return e?w.jsx(oh,{initialFocusRef:!1,open:n,snapPoints:({maxHeight:c})=>c-ah,onDismiss:o,children:w.jsx("div",{className:Ft.sheetContent,children:a})}):w.jsx("div",{className:K(Ft.root,t,{[Ft.open]:n}),children:a})},P8="App-module__map__Kf-2JS",A8="App-module__sidebar__ORIzGk",R8="App-module__header__bgP9DA",ta={map:P8,sidebar:A8,header:R8},L8=new yh,k8=({children:t})=>{const{isFetching:e}=kh();return e?w.jsx(So,{}):t},Ih=({config:t,options:e,withGlobalProvider:n=!1})=>{const r=Pm(t),{INN:i,cityName:s,countryAbbreviation:o,hideFilters:a,hideHeader:c,map:l,regionName:u}=r;Ot(i,"INN is required"),Am(i,e),Ot(l==null?void 0:l.provider,"Map provider is required");const d=m6(l.provider);pm({cityName:s,countryAbbreviation:o,regionName:u});const f=w.jsx(M6,{children:w.jsx(k6,{children:w.jsx(yv,{tolgee:Dh,fallback:w.jsx(So,{}),children:w.jsx(tw,{children:w.jsxs(ew,{children:[!c&&w.jsx(Z6,{className:ta.header}),!a&&w.jsx(T8,{className:ta.sidebar}),w.jsx(Yw,{className:ta.map,children:w.jsx(d,{})}),w.jsx(Aw,{})]})})})})});return w.jsx(Gh,{baseColor:"#f3f3f3",highlightColor:"#ecebeb",children:w.jsx(Qu.Provider,{value:r,children:n?w.jsx(k8,{children:f}):w.jsx(Sh,{client:L8,children:w.jsx(Lh,{gMapId:r.gMapId,gMapKey:r.gMapKey,mapTheme:r.mapTheme,locale:r.locale,children:f})})})})},Fh=async t=>hi.request({baseURL:"https://api.geo-data.omnic.solutions/api/1.0/",method:"POST",url:"normalize/address",data:t,headers:{Authorization:"Token 9877f9631b2e30570cc1c5aa8c740b0c912efe99a8b6c45c21cf4bd394adc7e9"}}),M8=new yh,Bh=p.createContext(null),D8=(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(null),l=p.useRef(null),u=p.useMemo(()=>({widgetOutHolderRef:c,widgetLocationsRef:l,setLocale:r,setMapPlaceholderConfig:s}),[]);return w.jsx(Bh.Provider,{value:u,children:a&&w.jsx(Sh,{client:M8,children:w.jsxs(Lh,{asGlobalProvider:!0,gMapId:a.config.gMapId,gMapKey:a.config.gMapKey,mapTheme:a.config.mapTheme,locale:a.config.locale,children:[w.jsx("div",{ref:c,style:{position:"fixed",left:"-9999px",top:"-9999px"},children:w.jsx("div",{ref:l,id:"@omnic/widget-locations",style:{height:"100%",width:"100%"},children:w.jsx(Ih,{withGlobalProvider:!0,options:a.options,config:D8(a.config,{...i,...n&&{locale:n}})})})}),t]})})})};function Vh(){const t=p.useContext(Bh);if(!t)throw new Error("Please use hook useWidgetLocationsContext inside WidgetLocationsProvider");return t}const N8=t=>t===void 0||typeof t=="object"&&Object.keys(t).length===0,I8=({config:t})=>{const{setMapPlaceholderConfig:e,widgetLocationsRef:n,widgetOutHolderRef:r}=Vh(),i=p.useRef(null);return p.useEffect(()=>(e(N8(t)?void 0:t),()=>{e(void 0)}),[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]),w.jsx("div",{ref:i,style:{width:"100%",height:"100%"}})};exports.EReceiveFilter=ht;exports.ESendFilter=pt;exports.ETypeFilter=Nt;exports.MapPlaceholder=I8;exports.PlaceAutocomplete=Rc;exports.Widget=Ih;exports.WidgetLocationsProvider=j8;exports.createPointsIterator=la;exports.fetchPointsRequest=ca;exports.fromHoursMinutesToMinutes=Up;exports.fromMinutesToHoursMinutes=$p;exports.getAddressFormGeocode=da;exports.getBoundsFromPoint=zp;exports.getCurrentPosition=cc;exports.getNormalizedAddress=Fh;exports.getPropertyValue=Od;exports.isCoordinates=ua;exports.isDeliveryPoint=um;exports.isHttpSuccess=xd;exports.isPlaceId=Ed;exports.placeToPlaceResult=Td;exports.replaceSvgCurrentColor=rr;exports.setWidgetCSSProperty=Mi;exports.usePlaceAutocomplete=Ac;exports.useWidgetLocationsContext=Vh;
229
+ </svg>`,a=`Cluster of ${e} markers`,c=Number(google.maps.Marker.MAX_ZINDEX)+e;if(ze.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 d5(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class Pc{constructor(){d5(Pc,google.maps.OverlayView)}}var bn;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click",t.GMP_CLICK="gmp-click"})(bn||(bn={}));const f5=(t,e,n)=>{e.bounds&&n.fitBounds(e.bounds)};class h5 extends Pc{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new c5(r),renderer:s=new u5,onClusterClick:o=f5}){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:(ze.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,bn.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)||ze.setMap(o.marker,null):s.push(o.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>s.forEach(o=>ze.setMap(o,null)))}google.maps.event.trigger(this,bn.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=>ze.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new l5(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=>ze.setMap(i,null)),this.onClusterClick){const i=ze.isAdvancedMarker(r.marker)?bn.GMP_CLICK:bn.CLUSTER_CLICK;r.marker.addListener(i,s=>{google.maps.event.trigger(this,bn.CLUSTER_CLICK,r),this.onClusterClick(s,r,n)})}ze.setMap(r.marker,n)})}}const p5="LocationBalloon-module__root__GtUl6q",m5="LocationBalloon-module__submit__lNcF4k",g5="LocationBalloon-module__details__--VOKk",v5="LocationBalloon-module__icon__X7DOVA",y5="LocationBalloon-module__header__5VQJDW",b5="LocationBalloon-module__titleContainer__BAO73U",w5="LocationBalloon-module__title__bX9pf8",S5="LocationBalloon-module__description__htav7b",C5="LocationBalloon-module__actions__c8dlOR",_5="LocationBalloon-module__close__7Ujvya",bt={root:p5,submit:m5,details:g5,icon:v5,header:y5,titleContainer:b5,title:w5,description:S5,actions:C5,close:_5},E5={default:Zd,llama:Kd},x5=({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=E5[l];return S.jsxs("div",{className:K(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(lf,{what3words:h}),S.jsxs("div",{className:bt.actions,children:[S.jsx(rt,{id:ep,variant:"primary",className:bt.submit,disabled:u,onClick:c,children:t?"{ choose }":S.jsx(It,{keyName:"choose",ns:"common"})}),!n&&S.jsxs(rt,{id:Ku,as:"link",variant:"primary",className:bt.details,disabled:u,onClick:a,children:[t?"{ details }":S.jsx(It,{keyName:"details",ns:"common"}),S.jsx(Cc,{})]})]})]})},O5=({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=Nn("screenSm"),{isIdle:C}=Z(),b=dc({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(Gd,{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(Wd,{anchor:d.current||void 0,onCloseClick:t,children:S.jsx(x5,{...i,hideDetails:c,className:Le.balloon,onCloseClick:t,onSubmit:()=>r(i),onDetails:()=>e(i)})})]})},T5=({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=Le.cluster,f.innerHTML=`<span class="${Le.number}">${v}</span>`,new google.maps.marker.AdvancedMarkerElement({position:m,content:f,zIndex:v})}}),[]),c=p.useRef(new h5({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(O5,{point:v,handleCloseClick:t,setMarkerRef:y=>{y&&(l.current.push(y),w&&h([...l.current]))},...n},v.uid)})})},P5=p.memo(T5),A5=t=>{const e=Pt(hm);return S.jsx(P5,{points:e,...t})},R5=p.memo(A5),Ah=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:42,height:42,fill:"none",viewBox:"0 0 42 42",...t},I.createElement("rect",{width:42,height:42,fill:"#fff",rx:21}),I.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"}),I.createElement("rect",{width:41,height:41,x:.5,y:.5,stroke:"#1D3665",strokeOpacity:.1,rx:20.5})),L5="DeliveryBalloon-module__root__Nu90iy",k5="DeliveryBalloon-module__details__eqUTaI",M5="DeliveryBalloon-module__wh__1lJtLN",D5="DeliveryBalloon-module__header__JVdyxN",j5="DeliveryBalloon-module__title__-zKKCt",N5="DeliveryBalloon-module__description__no5-ki",I5="DeliveryBalloon-module__actions__C-N0H-",F5="DeliveryBalloon-module__errorVariant__e6uhZl",B5="DeliveryBalloon-module__logo__62gC5h",Dt={root:L5,details:k5,wh:M5,header:D5,title:j5,description:N5,actions:I5,errorVariant:F5,logo:B5},V5=({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}=Re(),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:K(Dt.root,n,Dt[`${a}Variant`]),children:[S.jsxs("div",{className:Dt.header,children:[S.jsx(Ah,{className:Dt.logo}),S.jsx("span",{className:Dt.title,children:h?f:m}),r&&S.jsx(Ar,{onClick:s})]}),S.jsx("div",{className:Dt.description,children:h?w:e||"{{ properties.address }}"}),v&&(!i||l)&&S.jsx("div",{className:Dt.actions,children:S.jsx(rt,{id:Ku,as:"button",variant:"primary",className:K(Dt.details,l?Dt.wh:""),onClick:b,children:C})})]})},H5="Chip-module__root__zsoSyP",U5="Chip-module__active__BlTSFB",ku={root:H5,active:U5},Mu=({active:t,children:e,className:n,...r})=>S.jsx("div",{...r,className:K(ku.root,n,{[ku.active]:t}),children:e}),$5="TextArea-module__root__8YFknR",z5={root:$5},Du=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=Dh(e,a);return S.jsx("textarea",{...s,ref:c,className:K(z5.root,t),onBlur:n,onFocus:i,onChange:r})}),q5=({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},G5="DeliveryDetailsView-module__title__azeoUr",W5="DeliveryDetailsView-module__logo__4zZtpM",Z5="DeliveryDetailsView-module__header__oDE9He",K5="DeliveryDetailsView-module__content__6P27SY",Q5="DeliveryDetailsView-module__section__2M3Qip",J5="DeliveryDetailsView-module__chips__KmYgha",X5="DeliveryDetailsView-module__actions__43XZ-V",Y5="DeliveryDetailsView-module__submit__58LKBw",e6="DeliveryDetailsView-module__actionsHidden__SW-67b",t6="DeliveryDetailsView-module__commentSection__GlX1A2",n6="DeliveryDetailsView-module__comment__2pGG6h",He={title:G5,logo:W5,header:Z5,content:K5,section:Q5,chips:J5,actions:X5,submit:Y5,actionsHidden:e6,commentSection:t6,comment:n6},r6=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(()=>q5({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 Bh({address:n.address,algorithm:10,service:10,language:l||Qu});if(!Od(_))return;const O=_==null?void 0:_.data.data,A={...m,address:O};return s==null||s(A),A}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:K(He.header,t==null?void 0:t.header),children:[S.jsx(Ar,{onClick:i}),S.jsxs("div",{className:He.title,children:[S.jsx(Ah,{className:He.logo}),S.jsx("span",{children:u("title",{ns:"courier_balloon"})})]})]}),S.jsxs("div",{className:K(He.content,t==null?void 0:t.content),children:[S.jsxs("section",{className:He.section,children:[S.jsxs("span",{children:[u("address"),":"]}),S.jsx("p",{children:n.address})]}),!a&&S.jsxs("section",{className:He.section,children:[S.jsxs("span",{children:[u("delivery_time"),":"]}),S.jsxs("div",{className:He.chips,children:[S.jsx(Mu,{active:m.delivery_time==="8:00-13:00",onClick:y("8:00-13:00"),children:"8:00 - 13:00"}),S.jsx(Mu,{active:m.delivery_time==="14:00-22:00",onClick:y("14:00-22:00"),children:"14:00 - 22:00"})]})]}),S.jsxs("section",{className:He.section,children:[S.jsxs("span",{children:[u("apartment_number"),":"]}),S.jsx(Du,{...E,rows:1,onChange:C})]}),S.jsxs("section",{className:K(He.section,He.commentSection),children:[S.jsxs("span",{children:[u("comment"),":"]}),S.jsx(Du,{...x,className:He.comment,onChange:b})]})]}),S.jsx("div",{className:K(He.actions,{[He.actionsHidden]:e}),children:S.jsx(rt,{loading:h,disabled:!((g=m.meta)!=null&&g.valid)||h,variant:"primary",className:He.submit,onClick:w,children:u("choose",{ns:"common"})})})]})}),Rh=p.memo(r6),i6={header:Le.deliveryDetailsViewHeader,content:Le.deliveryDetailsViewContent},s6=({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}=_e(),{warehousePoint:f}=Re(),w=dc({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=Nn("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 T;try{l(!0);const D=await((T=v.current)==null?void 0:T.submit());if(!D)return;n==null||n(D),s==null||s(!1),i==null||i(null)}finally{l(!1)}},O=S.jsx(V5,{...u,hideDetails:e,hasCloseButton:C,variant:u.address?"default":"error",className:Le.balloon,onDetails:E,onClose:x}),A=m?!!f&&y:w&&!y,R=t?!!u.apartment_number:!!u.apartment_number&&!!u.delivery_time;return S.jsxs(S.Fragment,{children:[S.jsx(Gd,{ref:h,position:b,children:S.jsx("span",{dangerouslySetInnerHTML:{__html:g}})}),C&&S.jsxs(lh,{minSnapHeight:u.address?200:void 0,submitDisabled:!R||c,submitLoading:c,hideFooter:!u.address,open:A,onDismiss:x,onSubmitClick:_,children:[u.address&&S.jsx(Rh,{ref:v,hideActions:!0,classes:i6,location:r,onChange:d,onClose:x}),u.address?null:O]}),!C&&A&&S.jsx(Wd,{anchor:h.current||void 0,onCloseClick:x,children:O})]})},So=()=>S.jsx(uh,{children:S.jsx(qs,{})}),o6={place:null,mapKey:""},a6=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"))},Bi=Ht((t,e)=>({...o6,setMapKey(n){t({mapKey:n})},async setPlace(n,r,i){var c,l,u,d,h,v;const{map:s}=Z.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&&Re.getState().setWarehousePoint({...s,coords:{lat:o.lat(),lng:o.lng()}}),(!(r!=null&&r.ignoreSelection)||r!=null&&r.warehouseSelection)&&Re.getState().setDeliverPoint(c),s},setPlaceSimple(n,r){var i,s;if(r!=null&&r.withNavigation){const{map:o}=Z.getState();Ot(o,"Map is not defined");let a;(i=n==null?void 0:n.geometry)!=null&&i.viewport?a=n.geometry.viewport:(s=n==null?void 0:n.geometry)!=null&&s.location&&(a=new google.maps.LatLngBounds,a.extend(n.geometry.location)),a&&(o.fitBounds(a),o.setZoom(12))}t({place:n})}}));async function c6(){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 l6(t){return Eh({queryKey:["wl-map-key-wl"],queryFn:()=>c6(),refetchOnWindowFocus:!1,retry:2,enabled:t})}const Lh=p.createContext(null),kh=({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}=l6(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}=Bi();p.useEffect(()=>{f(h)},[h,f]);const w=()=>l?t?e:S.jsx(So,{}):S.jsx(Um,{apiKey:h,language:o.current,libraries:np,children:e});return S.jsx(Lh.Provider,{value:m,children:w()})},Mh=()=>{const t=p.useContext(Lh);if(!t)throw new Error("useMapKeyApiContext must be used within a MapKeyApiProvider");return t},u6=({children:t,className:e,...n})=>{const{disableDelivery:r,map:i,warehouseSelection:s}=_e(),{mapId:o}=Mh(),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;Z.getState().setDetailsOpen(!1),it.getState().setSelectedLocation(null);const d=[u.lat,u.lng];console.debug("[OmnicLocationsWidget::mapClick]",d);try{await Bi.getState().setPlaceAndPoint(d,{warehouseSelection:s})}catch{Re.getState().setDeliverPoint({address:null,coords:d})}},[r,s]);return S.jsx(qd,{disableDefaultUI:!0,mapId:o,defaultZoom:i==null?void 0:i.initialZoom,defaultCenter:a,className:K(Le.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})},d6=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},I.createElement("rect",{width:2,height:20,x:9,fill:"#fff",rx:1}),I.createElement("rect",{width:2,height:20,x:20,y:9,fill:"#fff",rx:1,transform:"rotate(90 20 9)"}),I.createElement("circle",{cx:10,cy:10,r:8,fill:"#fff"}),I.createElement("circle",{cx:10,cy:10,r:6,fill:"currentcolor"}),I.createElement("circle",{cx:10,cy:10,r:4,fill:"#fff"})),f6=t=>{const e=document.createElement("div"),n=document.createElement("div");e.classList.add(Le.mapControl),n.classList.add(Le.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)})},h6=t=>{const e=document.createElement("div");e.classList.add(Le.mapControl),e.classList.add(Le.geolocationControl),e.innerHTML=zh.renderToString(S.jsx(d6,{})),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{cc()})},p6=({className:t})=>{const e=un(),n=Z(Lp),r=Z(Np),i=Pt(Ad),s=Re(ec),o=ji(),{lmsData:a}=mo(),{cityName:c,countryAbbreviation:l,disableGeolocation:u,hideDeliveryTime:d,hideDetails:h,hideMapControls:v,onPointClick:m,regionName:f,skipPointInfo:w}=_e(),y=p.useCallback(B=>{console.debug("[OmnicLocationsWidget::loadMap]",B),Z.getState().setMap(B),Z.getState().setLoaded(),v||(f6(B),u||h6(B))},[u,v]),C=p.useCallback(()=>{console.debug("[OmnicLocationsWidget::unmountMap]"),Z.getState().setMap(null)},[]);p.useEffect(()=>{if(o)return y(o),()=>{C()}},[o,y,C]);const b=p.useCallback(B=>{const $=a==null?void 0:a.location.what3words,q=$!=null&&$.id?$:void 0;m==null||m(B,q)},[m,a]),E=p.useRef(null),x=p.useRef(null),g=p.useCallback(B=>{const $=B.getSouthWest(),q=B.getNorthEast(),ae=ne=>Math.round(ne*1e3)/1e3,le=`${ae($.lat())}:${ae($.lng())}:${ae(q.lat())}:${ae(q.lng())}`,ue=JSON.stringify(e??{});return`${le}|${ue}|${c??""}|${l??""}|${f??""}`},[c,l,e,f]),_=p.useCallback(()=>{Z.getState().setIdle(!0),n&&(E.current&&window.clearTimeout(E.current),E.current=window.setTimeout(()=>{const B=n.getBounds();if(!B)return;const $=g(B);x.current!==$&&(x.current=$,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:f}))},250))},[g,c,l,e,n,f]);p.useEffect(()=>()=>{E.current&&window.clearTimeout(E.current)},[]);const O=p.useCallback(async B=>{Re.getState().setDeliverPoint(null),it.getState().setSelectedLocation(B)},[]),A=p.useCallback(()=>{console.debug("[OmnicLocationsWidget::tilesLoaded]")},[]),R=Z.getState().setDetailsOpen,{getLMSData:L}=b4(),T=B=>{if(L(B.code),w){b(B);return}R(!1),O(B)},D=()=>{R(!1),O(null)},N=B=>{R(!0),O(B)},H=B=>{b(B),R(!1),O(null)};return S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:K(Le.mapContainer,t),children:[S.jsxs(u6,{onIdle:_,onTilesLoaded:A,onBoundsChanged:()=>{Z.getState().setIdle(!1)},children:[s&&S.jsx(s6,{hideDeliveryTime:d,hideDetails:h,point:s,setOpenDetails:Z.getState().setDetailsOpen,setDeliveryPoint:Re.getState().setDeliverPoint,onPointClick:b}),S.jsx(R5,{handleCloseClick:D,handleDetailsClick:N,handlePointClick:T,handleSubmitClick:H})]}),(i||r)&&S.jsx(uh,{className:Le.overlay,children:S.jsx(qs,{})})]}),S.jsx(Bb,{handleDetailsClick:N,handlePointClick:T}),S.jsx(hb,{handleCloseClick:D,handleSubmitClick:H})]})},m6=p.memo(p6),g6=t=>({google:m6})[t];function Dh(...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}},v6=()=>{throw new Error("useMediaQuery is a client-only hook")};function y6(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,v6)}const b6="768px",w6="1024px",S6="1280px",C6="1536px",_6={screenSm:b6,screenMd:w6,screenLg:S6,screenXl:C6};function Nn(t){return y6(`(max-width: calc(${_6[t]} - 1px))`)}const jh=vv().use(iv()).use(Kg()).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"}),E6=t=>{p.useEffect(()=>{t&&(jh.changeLanguage(t),$s.setLanguage(t))},[t])},x6=t=>{p.useEffect(()=>{if(t){const e=Object.keys(t);for(const n of e){const r=t[n];r&&Mi(`--owl-color-${n}`,r)}}},[t])},O6=t=>{p.useEffect(()=>{t&&t!==void 0&&Mi("--owl-button-radius",`${t}px`)},[t])},T6=t=>{p.useEffect(()=>{t&&t!==void 0&&Mi("--owl-font",t)},[t])},P6=500,Jn=[];function Ac(t={}){const{country:e,debounceMs:n=P6,globalSearch:r,onPlaceSelect:i,types:s}=t,o=r?void 0:e,a=uc("places"),[c,l]=p.useState(""),[u,d]=p.useState(""),[h,v]=p.useState(Jn),[m,f]=p.useState(!1),w=p.useMemo(()=>s,[JSON.stringify(s)]),y=p.useRef(null),C=p.useRef(),b=p.useRef(!1),E=p.useRef(i);E.current=i;const x=p.useCallback(()=>a?(y.current||(y.current=new a.AutocompleteSessionToken),y.current):null,[a]),g=p.useCallback(()=>{y.current=null},[]),_=p.useCallback(()=>{v(Jn)},[]),O=p.useCallback(T=>{b.current=!0,l(T)},[]),A=p.useCallback(T=>{d(T),O(T)},[O]),R=p.useCallback(()=>{const T=c.trim();if(_(),!T){d("");return}c!==u&&O(u)},[_,u,O,c]);p.useEffect(()=>{if(b.current){b.current=!1;return}if(!a||!c.trim()){v(T=>T.length>0?Jn:T);return}return clearTimeout(C.current),C.current=setTimeout(async()=>{f(!0);try{const T=x(),D={input:c,...T&&{sessionToken:T},...o&&{includedRegionCodes:[o]},...(w==null?void 0:w.length)&&{includedPrimaryTypes:w}},{suggestions:N}=await a.AutocompleteSuggestion.fetchAutocompleteSuggestions(D),H=N.filter(B=>B.placePrediction!==null).map(B=>{var q,ae;const $=B.placePrediction;return{placeId:$.placeId,mainText:((q=$.mainText)==null?void 0:q.text)??"",secondaryText:((ae=$.secondaryText)==null?void 0:ae.text)??"",description:$.text.text}});v(H.length>0?H:Jn)}catch(T){console.error("[usePlaceAutocomplete] Failed to fetch suggestions:",T),v(Jn)}finally{f(!1)}},n),()=>clearTimeout(C.current)},[c,a,o,w,n,x]);const L=p.useCallback(async T=>{var D;if(a)try{const N=new a.Place({id:T}),H=await Pd(N);(D=E.current)==null||D.call(E,H),g(),v(Jn)}catch(N){console.error("[usePlaceAutocomplete] Failed to fetch place details:",N)}},[a,g]);return p.useMemo(()=>({value:c,selectedValue:u,setValue:l,commitValue:A,handleInputBlur:R,suggestions:h,isLoading:m,clearSuggestions:_,handleSelect:L}),[c,u,A,R,h,m,_,L])}const A6={open:!1},R6=t=>t.open,wn=Ht(t=>({...A6,toggle(e){t(n=>({open:e??!n.open}))}})),L6=t=>{const e=t==="selector";p.useEffect(()=>{e&&wn.getState().toggle(!0)},[e])},k6=t=>{p.useEffect(()=>{t==="sharp"&&Mi("--owl-radius","0")},[t])},M6=({children:t})=>{const{cornersVariant:e,font:n,locale:r,palette:i,radius:s,startScreen:o}=_e();return T6(n),E6(r),x6(i),O6(s),L6(o),k6(e),S.jsx(S.Fragment,{children:t})},D6=({children:t})=>{const{disableGeolocation:e,map:n}=_e(),[r,i]=p.useState(e),{loaded:s}=Z();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),it.getState().setIsTrackingEnabled(!0)},error:()=>{i(!0)}})},[e,r,s,n]),t},j6=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:28,fill:"none",viewBox:"0 0 24 28",...t},I.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"})),N6=()=>{wn.getState().toggle(!0),Z.getState().setDetailsOpen(!1),Re.getState().setDeliverPoint(null),it.getState().setSelectedLocation(null)},I6="CurrentLocation-module__root__AeQCGT",F6="CurrentLocation-module__icon__459m9q",B6="CurrentLocation-module__text__w-9v28",Xo={root:I6,icon:F6,text:B6},Nh=({className:t})=>{const{t:e}=mt("current_location"),n=Bi(a6),{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:K(Xo.root,t),onClick:N6,children:[S.jsx(j6,{className:Xo.icon}),S.jsx("span",{className:Xo.text,children:s})]})},V6=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:123,height:32,fill:"none",viewBox:"0 0 123 32",...t},I.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"})),H6=t=>I.createElement("svg",{width:119,height:44,viewBox:"0 0 119 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},I.createElement("path",{d:"M4.70489 0.199253H0V13.4418H10.7452V10.0105H4.70489V0.199253Z",fill:"black"}),I.createElement("path",{d:"M16.9359 0.199253H12.2287V13.4418H22.974V10.0105H16.9359V0.199253Z",fill:"black"}),I.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"}),I.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"}),I.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"}),I.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"}),I.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"}),I.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"}),I.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"}),I.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"}),I.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"}),I.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"}),I.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"})),U6="Header-module__root__Pe4MYp",$6="Header-module__nav__wtnkmT",z6="Header-module__navItem__-Fy63Z",q6="Header-module__logo__xO2bWO",ei={root:U6,nav:$6,navItem:z6,logo:q6},G6={llama:H6,default:V6},W6=()=>{const{hideLogo:t,logo:e="default"}=_e();if(t)return null;const n=G6[e];return S.jsx("div",{className:ei.logo,children:S.jsx(n,{})})},Z6=({className:t})=>{const{t:e}=mt("header"),{disableDelivery:n}=_e(),r=Z(kp),i=Re(ec);p.useEffect(()=>{i?Z.getState().setMode("location_delivery"):Z.getState().setMode("self_pickup")},[i]);const s=()=>{Re.getState().setDeliverPoint(null),Z.getState().setMode("self_pickup")},o=()=>{Re.getState().setDeliverPoint(null),Z.getState().setMode("location_delivery")},a=r==="self_pickup",c=r==="location_delivery";return S.jsxs("div",{className:K(ei.root,t),children:[S.jsx(W6,{}),S.jsxs("nav",{className:ei.nav,children:[!n&&S.jsx(rt,{as:"link",className:ei.navItem,variant:a?"primary":"secondary",onClick:s,children:e("self_pickup")}),!n&&S.jsx(rt,{as:"link",className:ei.navItem,variant:c?"primary":"secondary",onClick:o,children:e("courier_delivery")}),S.jsx(Nh,{})]})]})},K6=p.memo(Z6),Q6={open:!1},Tr=Ht(t=>({...Q6,toggle(e){Z.getState().setDetailsOpen(!1),Re.getState().setDeliverPoint(null),it.getState().setSelectedLocation(null),t(n=>({open:e??!n.open}))}})),J6="Layout-module__root__qzPL-f",X6="Layout-module__headerHidden__JEN-d0",Y6="Layout-module__sidebarHidden__x017O3",ew="Layout-module__sidebarOpen__IZnIjs",Es={root:J6,headerHidden:X6,sidebarHidden:Y6,sidebarOpen:ew},tw=({children:t})=>{const{hideFilters:e,hideHeader:n}=_e(),r=Tr(i=>i.open);return S.jsx("div",{className:K(Es.root,{[Es.sidebarOpen]:r,[Es.headerHidden]:n,[Es.sidebarHidden]:e}),children:t})},nw=({children:t})=>{const e=Pt(pm);return Pt(Ad)&&!e?S.jsx(So,{}):S.jsx(S.Fragment,{children:t})},rw="Aside-module__root__EotK2f",iw="Aside-module__open__Zwmbs5",sw="Aside-module__overlay__slLdHF",ow="Aside-module__container__28P4wq",xs={root:rw,open:iw,overlay:sw,container:ow},aw=({children:t,className:e,open:n})=>S.jsxs("div",{className:K(xs.root,e,{[xs.open]:n}),children:[S.jsx("div",{className:xs.overlay}),S.jsx("div",{className:xs.container,children:t})]}),cw="Input-module__locationSearchRoot__svh-f9",lw="Input-module__endAdornment__m40K5R",uw="Input-module__input__505b7i",dw="Input-module__startAdornment__D-sJ0N",fw="Input-module__locationSearchInput__2YK1MG",hw="Input-module__label__gmqtsf",pw="Input-module__inputContainer__vubIa-",Xn={locationSearchRoot:cw,endAdornment:lw,input:uw,startAdornment:dw,locationSearchInput:fw,label:hw,inputContainer:pw},mw=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=Dh(n,u);return S.jsxs("label",{htmlFor:a.id??l,className:K(Xn.locationSearchRoot,t),children:[r&&S.jsx("span",{className:Xn.label,children:r}),S.jsxs("div",{className:Xn.inputContainer,children:[o&&S.jsx("div",{className:Xn.startAdornment,children:o}),S.jsx("input",{...a,ref:d,id:a.id??l,className:Xn.locationSearchInput,onChange:s,onBlur:i}),e&&S.jsx("div",{className:Xn.endAdornment,children:e})]})]})}),gw="PlaceAutocomplete-module__container__fdiqiO",vw="PlaceAutocomplete-module__dropdown__u-0PdK",yw="PlaceAutocomplete-module__item__zHJqmC",bw="PlaceAutocomplete-module__itemMain__-skwdB",ww="PlaceAutocomplete-module__itemSecondary__sD5QDK",Sw="PlaceAutocomplete-module__itemArrow__CtQ5GG",er={container:gw,dropdown:vw,item:yw,itemMain:bw,itemSecondary:ww,itemArrow:Sw},Cw=({onSelect:t,suggestions:e})=>S.jsx("div",{className:er.dropdown,role:"listbox",children:e.map(n=>S.jsxs("div",{className:er.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:er.itemMain,children:n.mainText}),n.secondaryText&&S.jsx("span",{className:er.itemSecondary,children:n.secondaryText}),S.jsx(Cc,{className:er.itemArrow})]},n.placeId))}),Rc=({autocomplete:t,children:e,className:n,endAdornment:r,inputRef:i,label:s,name:o,onBlur: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 C=b=>{d.current&&!d.current.contains(b.target)&&v.current()};return document.addEventListener("click",C),()=>document.removeEventListener("click",C)},[h]);const m=C=>{t.setValue(C.target.value)},f=C=>{t.commitValue(C.description),t.clearSuggestions(),t.handleSelect(C.placeId)},w=()=>{t.handleInputBlur(),a==null||a()},y={value:t.value,onChange:m,inputRef:i,onFocus:l,onBlur:w,onClick:c,placeholder:u,name:o,label:s,endAdornment:r};return S.jsxs("div",{ref:d,className:K(er.container,n),children:[typeof e=="function"?e(y):S.jsx(mw,{...y}),h&&S.jsx(Cw,{suggestions:t.suggestions,onSelect:f})]})},_w="LocationAside-module__submit__CSKcqi",Ew="LocationAside-module__container__S1NejR",xw="LocationAside-module__selector__hl74ke",Ow="LocationAside-module__label__0Zk8at",Tw="LocationAside-module__header__N1wgyn",Pw="LocationAside-module__close__VsE88z",Os={submit:_w,container:Ew,selector:xw,label:Ow,header:Tw,close:Pw},Aw=p.forwardRef((t,e)=>{const{t:n}=mt(["location_aside","common"]),r=wn(R6),{country:i,globalSearch:s,hideCloseButtonOnLocationScreen:o,inputs:a,onCloseLocationSelector:c,onLocationSelect:l}=_e(),u=p.useRef(null);p.useImperativeHandle(e,()=>({open:()=>wn.getState().toggle(!0),close:()=>wn.getState().toggle(!1)}),[]);const d=p.useCallback(f=>{wn.getState().toggle(!1),Bi.getState().setPlaceSimple(f,{withNavigation:!0}),l==null||l(f)},[l]),h=Ac({country:i,globalSearch:s,onPlaceSelect:d}),v=()=>{wn.getState().toggle(!1),c==null||c()},m=so(a==null?void 0:a.city);return S.jsx(aw,{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(Rc,{autocomplete:h,inputRef:m.ref,name:m.name,placeholder:n("placeholder"),onClick:m.onClick})]})})})}),Rw=p.memo(Aw),Lw=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},I.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"})),kw=({className:t})=>{const{t:e}=mt("location_selector"),{country:n,globalSearch:r,inputs:i,onLocationSelect:s}=_e(),o=p.useCallback(d=>{Bi.getState().setPlaceSimple(d,{withNavigation:!0}),s==null||s(d)},[s]),a=Ac({country:n,globalSearch:r,types:[],onPlaceSelect:o}),c=()=>{a.value&&Z.getState().setBlurred(!0),Z.getState().setDetailsOpen(!1),Re.getState().setDeliverPoint(null),it.getState().setSelectedLocation(null)},l=()=>{Z.getState().setBlurred(!1)},u=so(i==null?void 0:i.address);return S.jsx(Rc,{autocomplete:a,className:t,endAdornment:S.jsx(Lw,{}),inputRef:u.ref,name:u.name,placeholder:e("placeholder"),onBlur:l,onClick:u.onClick,onFocus:c})},Mw=({className:t})=>Z(jp)?S.jsx(kw,{className:t}):null,Dw=p.memo(Mw),jw="DeliveryDetailsModal-module__root__qwKnjX",Nw={root:jw},Iw=({className:t,location:e,onClose:n,onSubmit:r})=>S.jsx("div",{className:K(Nw.root,t),children:S.jsx(Rh,{location:e,onClose:n,onSubmit:r})}),Fw="LocationDetailsModal-module__root__PyRnLM",Bw={root:Fw},Vw=({className:t,location:e,onClose:n,onSubmit:r})=>{const i=()=>{r==null||r(e)};return S.jsx("div",{className:K(Bw.root,t),children:S.jsx(uf,{location:e,onClose:n,onSubmit:i})})},Hw="MapContainer-module__root__1Os6Q-",Uw="MapContainer-module__mapWrapper__Cwe7qC",$w="MapContainer-module__wrapperBlurred__04NN2L",zw="MapContainer-module__locationSelector__Pr1zS-",qw="MapContainer-module__filterButton__CW3Qv7",Gw="MapContainer-module__sidebarOpen__lGMVrJ",Ww="MapContainer-module__filterIcon__T01XsJ",Zw="MapContainer-module__details__gM8LWX",xt={root:Hw,mapWrapper:Uw,wrapperBlurred:$w,locationSelector:zw,filterButton:qw,sidebarOpen:Gw,filterIcon:Ww,details:Zw},Kw=()=>{const{onPointClick:t}=_e(),e=Z(tc),n=it(Fp),r=Re(ec),i=p.useCallback(()=>{Z.getState().setDetailsOpen(!1)},[]),s=p.useCallback(o=>{t==null||t(o),Z.getState().setDetailsOpen(!1),it.getState().setSelectedLocation(null),Re.getState().setDeliverPoint(null)},[t]);return S.jsxs(S.Fragment,{children:[(r==null?void 0:r.address)&&e&&S.jsx(Iw,{location:r,className:xt.details,onClose:i,onSubmit:s}),n&&e&&S.jsx(Vw,{location:n,className:xt.details,onClose:i,onSubmit:s})]})},Qw=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:60,height:40,fill:"none",viewBox:"0 0 60 40",...t},I.createElement("path",{d:"M0 0h52a8 8 0 0 1 8 8v24a8 8 0 0 1-8 8H0V0Z"}),I.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"})),Jw=t=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:28,height:28,fill:"none",viewBox:"0 0 28 28",...t},I.createElement("rect",{width:28,height:28,fill:"#333",rx:4}),I.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"})),Xw=()=>{const t=Tr(i=>i.open),e=Tr(i=>i.toggle),n=Nn("screenSm"),r=()=>{e(!0)};return S.jsxs("div",{role:"presentation",className:K(xt.filterButton,{[xt.sidebarOpen]:t}),onClick:n?void 0:r,children:[n&&S.jsx(Nh,{}),n?S.jsx(Jw,{className:xt.filterIcon,onClick:r}):S.jsx(Qw,{className:xt.filterIcon})]})},Yw=({children:t,className:e})=>{const{hideFilters:n,hideSearchInput:r}=_e(),i=Z(Dp),s=Z(tc);return S.jsxs("div",{className:K(xt.root,e),children:[!r&&!s&&S.jsx(Dw,{className:xt.locationSelector}),!n&&S.jsx(Xw,{}),S.jsx("div",{className:K(xt.mapWrapper,{[xt.wrapperBlurred]:i}),children:t}),S.jsx(Kw,{})]})},e8=p.memo(Yw),t8="Separator-module__root__eQtZey",n8={root:t8},Yo=({className:t,...e})=>S.jsx("hr",{className:K(n8.root,t),...e}),r8="Sidebar-module__root__4j1MA3",i8="Sidebar-module__closeButton__HLXy1c",s8="Sidebar-module__open__mqQXF6",o8="Sidebar-module__header__Afp6uz",a8="Sidebar-module__typeFilter__GN46u9",c8="Sidebar-module__separator__6I4QoJ",l8="Sidebar-module__withRightPadding__2u1Ina",u8="Sidebar-module__sheetContent__SaoncI",d8="Sidebar-module__doneButton__4aeaSD",Ft={root:r8,closeButton:i8,open:s8,header:o8,typeFilter:a8,separator:c8,withRightPadding:l8,sheetContent:u8,doneButton:d8},f8=()=>{const{t}=mt("common"),e=Nn("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(Ar,{className:Ft.closeButton,onClick:r})]})},h8="Radio-module__root__7ElY2W",p8="Radio-module__label__c-sYW3",ju={root:h8,label:p8},m8=({className:t,label:e,labelProps:n={},...r})=>{const i=p.useId(),{className:s,...o}=n;return S.jsxs("label",{htmlFor:i,className:K(ju.label,s),...o,children:[S.jsx("input",{id:i,type:"radio",className:K(ju.root,t),...r}),e]})},cr=t=>S.jsx(m8,{...t,type:"checkbox"}),g8="RadioGroup-module__root__ewZw-x",v8="RadioGroup-module__body__k8BJAs",y8="RadioGroup-module__legend__tcfV7q",ea={root:g8,body:v8,legend:y8},Ih=({children:t,className:e,label:n,onChange:r,value:i,...s})=>S.jsxs("div",{className:K(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)})]}),b8=({className:t,onChange:e})=>{const{t:n}=mt("receive_filter"),r=un(Up);return S.jsxs(Ih,{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")})]})},w8=p.memo(b8),S8=({className:t,onChange:e})=>{const{t:n}=mt("send_filter"),r=un(Hp);return S.jsxs(Ih,{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")})]})},C8=p.memo(S8),_8="TypeFilter-module__root__WH5EQV",E8="TypeFilter-module__button__f0mSfo",Ts={root:_8,button:E8},x8=({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:K(Ts.root,t),children:[S.jsx(rt,{className:Ts.button,variant:n===Nt.All?"primary":"secondary",onClick:i(Nt.All),children:r("all")}),S.jsx(rt,{className:Ts.button,variant:n===Nt.PostOffice?"primary":"secondary",onClick:i(Nt.PostOffice),children:r("post_office")}),S.jsx(rt,{className:Ts.button,variant:n===Nt.PickPoint?"primary":"secondary",onClick:i(Nt.PickPoint),children:r("pick_point")})]})},O8=({className:t,onChange:e})=>{const n=un(Vp);return S.jsx(x8,{value:n,className:t,onChange:e})},T8=p.memo(O8),P8=({className:t})=>{const e=Nn("screenSm"),n=Tr(c=>c.open),r=p.useCallback(c=>un.getState().setFilter({type:c}),[]),i=p.useCallback(c=>un.getState().setFilter({send:c}),[]),s=p.useCallback(c=>un.getState().setFilter({receive:c}),[]),o=p.useCallback(()=>Tr.getState().toggle(!1),[]),a=S.jsxs(S.Fragment,{children:[S.jsx(f8,{}),S.jsxs("div",{className:Ft.withRightPadding,children:[S.jsx(T8,{className:Ft.typeFilter,onChange:r}),S.jsx(Yo,{className:Ft.separator}),S.jsx(w8,{onChange:s}),S.jsx(Yo,{}),S.jsx(C8,{onChange:i}),S.jsx(Yo,{})]})]});return e?S.jsx(ah,{initialFocusRef:!1,open:n,snapPoints:({maxHeight:c})=>c-ch,onDismiss:o,children:S.jsx("div",{className:Ft.sheetContent,children:a})}):S.jsx("div",{className:K(Ft.root,t,{[Ft.open]:n}),children:a})},A8="App-module__map__Kf-2JS",R8="App-module__sidebar__ORIzGk",L8="App-module__header__bgP9DA",ta={map:A8,sidebar:R8,header:L8},k8=new bh,M8=({children:t})=>{const{isFetching:e}=Mh();return e?S.jsx(So,{}):t},Fh=({config:t,options:e,withGlobalProvider:n=!1})=>{const r=Am(t),{INN:i,cityName:s,countryAbbreviation:o,hideFilters:a,hideHeader:c,map:l,regionName:u}=r;Ot(i,"INN is required"),Rm(i,e),Ot(l==null?void 0:l.provider,"Map provider is required");const d=g6(l.provider);mm({cityName:s,countryAbbreviation:o,regionName:u});const h=S.jsx(D6,{children:S.jsx(M6,{children:S.jsx(bv,{tolgee:jh,fallback:S.jsx(So,{}),children:S.jsx(nw,{children:S.jsxs(tw,{children:[!c&&S.jsx(K6,{className:ta.header}),!a&&S.jsx(P8,{className:ta.sidebar}),S.jsx(e8,{className:ta.map,children:S.jsx(d,{})}),S.jsx(Rw,{})]})})})})});return S.jsx(Wh,{baseColor:"#f3f3f3",highlightColor:"#ecebeb",children:S.jsx(Ju.Provider,{value:r,children:n?S.jsx(M8,{children:h}):S.jsx(Ch,{client:k8,children:S.jsx(kh,{gMapId:r.gMapId,gMapKey:r.gMapKey,mapTheme:r.mapTheme,locale:r.locale,children:h})})})})},Bh=async t=>hi.request({baseURL:"https://api.geo-data.omnic.solutions/api/1.0/",method:"POST",url:"normalize/address",data:t,headers:{Authorization:"Token 9877f9631b2e30570cc1c5aa8c740b0c912efe99a8b6c45c21cf4bd394adc7e9"}}),D8=new bh,Vh=p.createContext(null),Nu=t=>JSON.stringify(t,(e,n)=>typeof n=="function"?void 0:n),j8=(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}),N8=({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=Nu(x),_=Nu(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(Vh.Provider,{value:v,children:a&&S.jsx(Ch,{client:D8,children:S.jsxs(kh,{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(Fh,{withGlobalProvider:!0,options:a.options,config:j8(a.config,{...h,...i,...n&&{locale:n}})})})}),t]})})})};function Hh(){const t=p.useContext(Vh);if(!t)throw new Error("Please use hook useWidgetLocationsContext inside WidgetLocationsProvider");return t}const I8=t=>t===void 0||typeof t=="object"&&Object.keys(t).length===0,F8=({config:t})=>{const{setMapPlaceholderConfig:e,widgetLocationsRef:n,widgetOutHolderRef:r}=Hh(),i=p.useRef(null);return p.useEffect(()=>{const s=I8(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=Nt;exports.MapPlaceholder=F8;exports.PlaceAutocomplete=Rc;exports.Widget=Fh;exports.WidgetLocationsProvider=N8;exports.createPointsIterator=la;exports.fetchPointsRequest=ca;exports.fromHoursMinutesToMinutes=$p;exports.fromMinutesToHoursMinutes=zp;exports.getAddressFormGeocode=da;exports.getBoundsFromPoint=qp;exports.getCurrentPosition=cc;exports.getNormalizedAddress=Bh;exports.getPropertyValue=Td;exports.isCoordinates=ua;exports.isDeliveryPoint=dm;exports.isHttpSuccess=Od;exports.isPlaceId=xd;exports.placeToPlaceResult=Pd;exports.replaceSvgCurrentColor=rr;exports.setWidgetCSSProperty=Mi;exports.usePlaceAutocomplete=Ac;exports.useWidgetLocationsContext=Hh;