@omnic/widget-locations 1.1.49 → 1.1.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/lib/hooks/usePointsLoader.d.ts +7 -1
- package/dist/lib/services/points.d.ts +8 -7
- package/dist/lib/stores/locationPoints.d.ts +11 -2
- package/dist/lib/types/config.d.ts +3 -0
- package/dist/lib/utils/createPointsIterator.d.ts +8 -2
- package/dist/lib/widget.cjs.js +25 -25
- package/dist/lib/widget.esm.js +1162 -1133
- package/package.json +2 -2
package/dist/lib/widget.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Vs=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var k=(t,e,n)=>(Vs(t,e,"read from private field"),n?n.call(t):e.get(t)),J=(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)},$=(t,e,n,r)=>(Vs(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);var ho=(t,e,n,r)=>({set _(i){$(t,e,i,n)},get _(){return k(t,e,r)}}),ve=(t,e,n)=>(Vs(t,e,"access private method"),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react/jsx-runtime"),c=require("react"),ti=require("react-dom"),zp=require("react-dom/server");function Df(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 U=Df(c),Af=Df(ti),If=c.createContext({}),jf=!0;function Hp({baseColor:t,highlightColor:e,width:n,height:r,borderRadius:i,circle:o,direction:s,duration:a,enableAnimation:l=jf,customHighlightBackground:u}){const f={};return s==="rtl"&&(f["--animation-direction"]="reverse"),typeof a=="number"&&(f["--animation-duration"]=`${a}s`),l||(f["--pseudo-element-display"]="none"),(typeof n=="string"||typeof n=="number")&&(f.width=n),(typeof r=="string"||typeof r=="number")&&(f.height=r),(typeof i=="string"||typeof i=="number")&&(f.borderRadius=i),o&&(f.borderRadius="50%"),typeof t<"u"&&(f["--base-color"]=t),typeof e<"u"&&(f["--highlight-color"]=e),typeof u=="string"&&(f["--custom-highlight-background"]=u),f}function _t({count:t=1,wrapper:e,className:n,containerClassName:r,containerTestId:i,circle:o=!1,style:s,...a}){var l,u,f;const d=c.useContext(If),h={...a};for(const[m,_]of Object.entries(a))typeof _>"u"&&delete h[m];const v={...d,...h,circle:o},y={...s,...Hp(v)};let g="react-loading-skeleton";n&&(g+=` ${n}`);const w=(l=v.inline)!==null&&l!==void 0?l:!1,C=[],L=Math.ceil(t);for(let m=0;m<L;m++){let _=y;if(L>t&&m===L-1){const p=(u=_.width)!==null&&u!==void 0?u:"100%",b=t%1,
|
|
1
|
+
"use strict";var Vs=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var k=(t,e,n)=>(Vs(t,e,"read from private field"),n?n.call(t):e.get(t)),J=(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)},$=(t,e,n,r)=>(Vs(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);var ho=(t,e,n,r)=>({set _(i){$(t,e,i,n)},get _(){return k(t,e,r)}}),ve=(t,e,n)=>(Vs(t,e,"access private method"),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react/jsx-runtime"),c=require("react"),ti=require("react-dom"),zp=require("react-dom/server");function Df(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 U=Df(c),Af=Df(ti),If=c.createContext({}),jf=!0;function Hp({baseColor:t,highlightColor:e,width:n,height:r,borderRadius:i,circle:o,direction:s,duration:a,enableAnimation:l=jf,customHighlightBackground:u}){const f={};return s==="rtl"&&(f["--animation-direction"]="reverse"),typeof a=="number"&&(f["--animation-duration"]=`${a}s`),l||(f["--pseudo-element-display"]="none"),(typeof n=="string"||typeof n=="number")&&(f.width=n),(typeof r=="string"||typeof r=="number")&&(f.height=r),(typeof i=="string"||typeof i=="number")&&(f.borderRadius=i),o&&(f.borderRadius="50%"),typeof t<"u"&&(f["--base-color"]=t),typeof e<"u"&&(f["--highlight-color"]=e),typeof u=="string"&&(f["--custom-highlight-background"]=u),f}function _t({count:t=1,wrapper:e,className:n,containerClassName:r,containerTestId:i,circle:o=!1,style:s,...a}){var l,u,f;const d=c.useContext(If),h={...a};for(const[m,_]of Object.entries(a))typeof _>"u"&&delete h[m];const v={...d,...h,circle:o},y={...s,...Hp(v)};let g="react-loading-skeleton";n&&(g+=` ${n}`);const w=(l=v.inline)!==null&&l!==void 0?l:!1,C=[],L=Math.ceil(t);for(let m=0;m<L;m++){let _=y;if(L>t&&m===L-1){const p=(u=_.width)!==null&&u!==void 0?u:"100%",b=t%1,E=typeof p=="number"?p*b:`calc(${p} * ${b})`;_={..._,width:E}}const x=c.createElement("span",{className:g,style:_,key:m},"");w?C.push(x):C.push(c.createElement(c.Fragment,{key:m},x,c.createElement("br",null)))}return c.createElement("span",{className:r,"data-testid":i,"aria-live":"polite","aria-busy":(f=v.enableAnimation)!==null&&f!==void 0?f:jf},e?C.map((m,_)=>c.createElement(e,{key:_},m)):C)}function $p({children:t,...e}){return c.createElement(If.Provider,{value:e},t)}var po=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Cl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Wp=function(t,e,n,r,i,o,s,a){if(!t){var l;if(e===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,s,a],f=0;l=new Error(e.replace(/%s/g,function(){return u[f++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},Gp=Wp;const yn=Cl(Gp);let go;const Zp=new Uint8Array(16);function qp(){if(!go&&(go=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!go))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return go(Zp)}const st=[];for(let t=0;t<256;++t)st.push((t+256).toString(16).slice(1));function Kp(t,e=0){return st[t[e+0]]+st[t[e+1]]+st[t[e+2]]+st[t[e+3]]+"-"+st[t[e+4]]+st[t[e+5]]+"-"+st[t[e+6]]+st[t[e+7]]+"-"+st[t[e+8]]+st[t[e+9]]+"-"+st[t[e+10]]+st[t[e+11]]+st[t[e+12]]+st[t[e+13]]+st[t[e+14]]+st[t[e+15]]}const Qp=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Jl={randomUUID:Qp};function Nf(t,e,n){if(Jl.randomUUID&&!e&&!t)return Jl.randomUUID();t=t||{};const r=t.random||(t.rng||qp)();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 Kp(r)}const Jp=Nf(),Bf=Nf(),Yp=[48,66],Xp=6,ba=[49.3478969,14.0983344],Ff="en",eg=["places","geocoding"],Jn={logo:"default",locale:Ff,map:{provider:"google",center:ba,initialZoom:Xp}},Uf=c.createContext(Jn),Xe=()=>c.useContext(Uf);var gn=(t=>(t[t.All=0]="All",t[t.PickPoint=20]="PickPoint",t[t.PostOffice=30]="PostOffice",t))(gn||{}),Gt=(t=>(t[t.PayByCash=0]="PayByCash",t[t.DressingRoom=1]="DressingRoom",t[t.CheckOrder=2]="CheckOrder",t))(Gt||{}),Zt=(t=>(t[t.Return=0]="Return",t[t.Payment=1]="Payment",t[t.Shipping=2]="Shipping",t))(Zt||{}),tg={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_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 Yl=t=>{let e;const n=new Set,r=(f,d)=>{const h=typeof f=="function"?f(e):f;if(!Object.is(h,e)){const v=e;e=d??(typeof h!="object"||h===null)?h:Object.assign({},e,h),n.forEach(y=>y(e,v))}},i=()=>e,l={setState:r,getState:i,getInitialState:()=>u,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{(tg?"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()}},u=e=t(r,i,l);return l},ng=t=>t?Yl(t):Yl;var Vf={exports:{}},zf={},Hf={exports:{}},$f={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* use-sync-external-store-shim.production.min.js
|
|
4
4
|
*
|
|
@@ -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 Es=c,hg=dg;function pg(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var gg=typeof Object.is=="function"?Object.is:pg,vg=hg.useSyncExternalStore,mg=Es.useRef,yg=Es.useEffect,bg=Es.useMemo,Cg=Es.useDebugValue;zf.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=mg(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=bg(function(){function l(v){if(!u){if(u=!0,f=v,v=r(v),i!==void 0&&s.hasValue){var y=s.value;if(i(y,v))return d=y}return d=v}if(y=d,gg(f,v))return y;var g=r(v);return i!==void 0&&i(y,g)?y:(f=v,d=g)}var u=!1,f,d,h=n===void 0?null:n;return[function(){return l(e())},h===null?void 0:function(){return l(h())}]},[e,n,r,i]);var a=vg(t,o[0],o[1]);return yg(function(){s.hasValue=!0,s.value=a},[a]),Cg(a),a};Vf.exports=zf;var wg=Vf.exports;const Sg=bl(wg);var Wf={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_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:Lg}=c,{useSyncExternalStoreWithSelector:xg}=Sg;let Yl=!1;const Eg=t=>t;function _g(t,e=Eg,n){(Wf?"production":void 0)!=="production"&&n&&!Yl&&(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"),Yl=!0);const r=xg(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return Lg(r),r}const Xl=t=>{(Wf?"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"?ng(t):t,n=(r,i)=>_g(e,r,i);return Object.assign(n,e),n},bn=t=>t?Xl(t):Xl,Mg={location:null},Cl=t=>t.location,Ot=bn()(t=>({...Mg,setDeliverPoint(e){t({location:e})}})),Og={map:null,mode:"self_pickup",bounds:null,blurred:!1,loaded:!1,loading:!0,detailsOpen:!1,isIdle:!1},Gf=t=>t.map,Pg=t=>t.mode,kg=t=>t.bounds,Tg=t=>t.blurred,Rg=t=>t.loaded,Dg=t=>t.loading,wl=t=>t.detailsOpen,be=bn()(t=>({...Og,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})}})),Ag={location:null},Ig=t=>t.location,on=bn()(t=>({...Ag,setSelectedLocation(e){t({location:e})}})),jg={query:"",type:gn.All,hours:["08:00","22:00"],send:{[Zt.Return]:!1,[Zt.Payment]:!1,[Zt.Shipping]:!1},receive:{[Gt.PayByCash]:!1,[Gt.CheckOrder]:!1,[Gt.DressingRoom]:!1}},Ng=t=>t.type,Bg=t=>t.send,Fg=t=>t.receive,Vn=bn(t=>({...jg,setFilter(e){be.getState().setDetailsOpen(!1),Ot.getState().setDeliverPoint(null),on.getState().setSelectedLocation(null),t(e)}})),Ug=t=>{const[e,n]=t.split(":");return Number(e)*60+Number(n)},Vg=t=>{const e=Math.floor(t/60),n=t%60;return`${e<10?`0${e}`:e}:${n<10?`0${n}`:n}`},zg=(t,e)=>[[t[0]-e,t[0]+e],[t[1]-e,t[1]+e]];function Zf(t,e){return function(){return t.apply(e,arguments)}}const{toString:Hg}=Object.prototype,{getPrototypeOf:Sl}=Object,_s=(t=>e=>{const n=Hg.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),an=t=>(t=t.toLowerCase(),e=>_s(e)===t),Ms=t=>e=>typeof e===t,{isArray:ni}=Array,Ui=Ms("undefined");function $g(t){return t!==null&&!Ui(t)&&t.constructor!==null&&!Ui(t.constructor)&&Nt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const qf=an("ArrayBuffer");function Wg(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&qf(t.buffer),e}const Gg=Ms("string"),Nt=Ms("function"),Kf=Ms("number"),Os=t=>t!==null&&typeof t=="object",Zg=t=>t===!0||t===!1,$o=t=>{if(_s(t)!=="object")return!1;const e=Sl(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},qg=an("Date"),Kg=an("File"),Qg=an("Blob"),Jg=an("FileList"),Yg=t=>Os(t)&&Nt(t.pipe),Xg=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Nt(t.append)&&((e=_s(t))==="formdata"||e==="object"&&Nt(t.toString)&&t.toString()==="[object FormData]"))},ev=an("URLSearchParams"),tv=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function io(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),ni(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{const o=n?Object.getOwnPropertyNames(t):Object.keys(t),s=o.length;let a;for(r=0;r<s;r++)a=o[r],e.call(null,t[a],a,t)}}function Qf(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 Jf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Yf=t=>!Ui(t)&&t!==Jf;function ba(){const{caseless:t}=Yf(this)&&this||{},e={},n=(r,i)=>{const o=t&&Qf(e,i)||i;$o(e[o])&&$o(r)?e[o]=ba(e[o],r):$o(r)?e[o]=ba({},r):ni(r)?e[o]=r.slice():e[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&io(arguments[r],n);return e}const nv=(t,e,n,{allOwnKeys:r}={})=>(io(e,(i,o)=>{n&&Nt(i)?t[o]=Zf(i,n):t[o]=i},{allOwnKeys:r}),t),rv=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),iv=(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)},ov=(t,e,n,r)=>{let i,o,s;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)s=i[o],(!r||r(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=n!==!1&&Sl(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},sv=(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},av=t=>{if(!t)return null;if(ni(t))return t;let e=t.length;if(!Kf(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},lv=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Sl(Uint8Array)),uv=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const o=i.value;e.call(t,o[0],o[1])}},cv=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},fv=an("HTMLFormElement"),dv=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),eu=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),hv=an("RegExp"),Xf=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};io(n,(i,o)=>{let s;(s=e(i,o,t))!==!1&&(r[o]=s||i)}),Object.defineProperties(t,r)},pv=t=>{Xf(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+"'")})}})},gv=(t,e)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return ni(t)?r(t):r(String(t).split(e)),n},vv=()=>{},mv=(t,e)=>(t=+t,Number.isFinite(t)?t:e),Hs="abcdefghijklmnopqrstuvwxyz",tu="0123456789",ed={DIGIT:tu,ALPHA:Hs,ALPHA_DIGIT:Hs+Hs.toUpperCase()+tu},yv=(t=16,e=ed.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function bv(t){return!!(t&&Nt(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Cv=t=>{const e=new Array(10),n=(r,i)=>{if(Os(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const o=ni(r)?[]:{};return io(r,(s,a)=>{const l=n(s,i+1);!Ui(l)&&(o[a]=l)}),e[i]=void 0,o}}return r};return n(t,0)},wv=an("AsyncFunction"),Sv=t=>t&&(Os(t)||Nt(t))&&Nt(t.then)&&Nt(t.catch),A={isArray:ni,isArrayBuffer:qf,isBuffer:$g,isFormData:Xg,isArrayBufferView:Wg,isString:Gg,isNumber:Kf,isBoolean:Zg,isObject:Os,isPlainObject:$o,isUndefined:Ui,isDate:qg,isFile:Kg,isBlob:Qg,isRegExp:hv,isFunction:Nt,isStream:Yg,isURLSearchParams:ev,isTypedArray:lv,isFileList:Jg,forEach:io,merge:ba,extend:nv,trim:tv,stripBOM:rv,inherits:iv,toFlatObject:ov,kindOf:_s,kindOfTest:an,endsWith:sv,toArray:av,forEachEntry:uv,matchAll:cv,isHTMLForm:fv,hasOwnProperty:eu,hasOwnProp:eu,reduceDescriptors:Xf,freezeMethods:pv,toObjectSet:gv,toCamelCase:dv,noop:vv,toFiniteNumber:mv,findKey:Qf,global:Jf,isContextDefined:Yf,ALPHABET:ed,generateString:yv,isSpecCompliantForm:bv,toJSONObject:Cv,isAsyncFn:wv,isThenable:Sv};function we(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)}A.inherits(we,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:A.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const td=we.prototype,nd={};["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=>{nd[t]={value:t}});Object.defineProperties(we,nd);Object.defineProperty(td,"isAxiosError",{value:!0});we.from=(t,e,n,r,i,o)=>{const s=Object.create(td);return A.toFlatObject(t,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),we.call(s,t.message,e,n,r,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};const Lv=null;function Ca(t){return A.isPlainObject(t)||A.isArray(t)}function rd(t){return A.endsWith(t,"[]")?t.slice(0,-2):t}function nu(t,e,n){return t?t.concat(e).map(function(i,o){return i=rd(i),!n&&o?"["+i+"]":i}).join(n?".":""):e}function xv(t){return A.isArray(t)&&!t.some(Ca)}const Ev=A.toFlatObject(A,{},null,function(e){return/^is[A-Z]/.test(e)});function Ps(t,e,n){if(!A.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=A.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,w){return!A.isUndefined(w[g])});const r=n.metaTokens,i=n.visitor||f,o=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&A.isSpecCompliantForm(e);if(!A.isFunction(i))throw new TypeError("visitor must be a function");function u(y){if(y===null)return"";if(A.isDate(y))return y.toISOString();if(!l&&A.isBlob(y))throw new we("Blob is not supported. Use a Buffer instead.");return A.isArrayBuffer(y)||A.isTypedArray(y)?l&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function f(y,g,w){let C=y;if(y&&!w&&typeof y=="object"){if(A.endsWith(g,"{}"))g=r?g:g.slice(0,-2),y=JSON.stringify(y);else if(A.isArray(y)&&xv(y)||(A.isFileList(y)||A.endsWith(g,"[]"))&&(C=A.toArray(y)))return g=rd(g),C.forEach(function(m,_){!(A.isUndefined(m)||m===null)&&e.append(s===!0?nu([g],_,o):s===null?g:g+"[]",u(m))}),!1}return Ca(y)?!0:(e.append(nu(w,g,o),u(y)),!1)}const d=[],h=Object.assign(Ev,{defaultVisitor:f,convertValue:u,isVisitable:Ca});function v(y,g){if(!A.isUndefined(y)){if(d.indexOf(y)!==-1)throw Error("Circular reference detected in "+g.join("."));d.push(y),A.forEach(y,function(C,L){(!(A.isUndefined(C)||C===null)&&i.call(e,C,A.isString(L)?L.trim():L,g,h))===!0&&v(C,g?g.concat(L):[L])}),d.pop()}}if(!A.isObject(t))throw new TypeError("data must be an object");return v(t),e}function ru(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function Ll(t,e){this._pairs=[],t&&Ps(t,this,e)}const id=Ll.prototype;id.append=function(e,n){this._pairs.push([e,n])};id.toString=function(e){const n=e?function(r){return e.call(this,r,ru)}:ru;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function _v(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function od(t,e,n){if(!e)return t;const r=n&&n.encode||_v,i=n&&n.serialize;let o;if(i?o=i(e,n):o=A.isURLSearchParams(e)?e.toString():new Ll(e,n).toString(r),o){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class iu{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){A.forEach(this.handlers,function(r){r!==null&&e(r)})}}const sd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Mv=typeof URLSearchParams<"u"?URLSearchParams:Ll,Ov=typeof FormData<"u"?FormData:null,Pv=typeof Blob<"u"?Blob:null,kv={isBrowser:!0,classes:{URLSearchParams:Mv,FormData:Ov,Blob:Pv},protocols:["http","https","file","blob","url","data"]},ad=typeof window<"u"&&typeof document<"u",Tv=(t=>ad&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),Rv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Dv=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ad,hasStandardBrowserEnv:Tv,hasStandardBrowserWebWorkerEnv:Rv},Symbol.toStringTag,{value:"Module"})),nn={...Dv,...kv};function Av(t,e){return Ps(t,new nn.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return nn.isNode&&A.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function Iv(t){return A.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function jv(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],e[o]=t[o];return e}function ld(t){function e(n,r,i,o){let s=n[o++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),l=o>=n.length;return s=!s&&A.isArray(i)?i.length:s,l?(A.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!A.isObject(i[s]))&&(i[s]=[]),e(n,r,i[s],o)&&A.isArray(i[s])&&(i[s]=jv(i[s])),!a)}if(A.isFormData(t)&&A.isFunction(t.entries)){const n={};return A.forEachEntry(t,(r,i)=>{e(Iv(r),i,n,0)}),n}return null}function Nv(t,e,n){if(A.isString(t))try{return(e||JSON.parse)(t),A.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const xl={transitional:sd,adapter:["xhr","http"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=A.isObject(e);if(o&&A.isHTMLForm(e)&&(e=new FormData(e)),A.isFormData(e))return i?JSON.stringify(ld(e)):e;if(A.isArrayBuffer(e)||A.isBuffer(e)||A.isStream(e)||A.isFile(e)||A.isBlob(e))return e;if(A.isArrayBufferView(e))return e.buffer;if(A.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Av(e,this.formSerializer).toString();if((a=A.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Ps(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),Nv(e)):e}],transformResponse:[function(e){const n=this.transitional||xl.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(e&&A.isString(e)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?we.from(a,we.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:nn.classes.FormData,Blob:nn.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};A.forEach(["delete","get","head","post","put","patch"],t=>{xl.headers[t]={}});const El=xl,Bv=A.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"]),Fv=t=>{const e={};let n,r,i;return t&&t.split(`
|
|
18
|
-
`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||e[n]&&Bv[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},
|
|
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[
|
|
20
|
-
`+o.map(
|
|
21
|
-
`):" "+
|
|
22
|
-
`+o):r.stack=o}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Kr(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&
|
|
23
|
-
requestType: ${typeof p}, value: `+typeof b);return a(Object.assign(Object.assign(Object.assign({},s),x),{[p]:b}))}function m(p,b,x,M){var O={outputFormat:n.JSON};return b&&(O.key=b),x&&(O.language=x),M&&(O.region=M),L(e.ADDRESS,p,O)}function _(p,b,x,M){var O={outputFormat:n.JSON};return b&&(O.key=b),x&&(O.language=x),M&&(O.region=M),L(e.PLACE_ID,p,O)}function E(p,b,x,M,O,T){var P={outputFormat:n.JSON};return x&&(P.key=x),M&&(P.language=M),O&&(P.region=O),T&&(P.location_type=T),L(e.LATLNG,p+","+b,P)}t.setDefaults=l,t.setKey=u,t.setLanguage=f,t.setRegion=d,t.setComponents=h,t.setBounds=v,t.setResultType=y,t.setLocationType=g,t.setOutputFormat=w,t.enableAddressDescriptor=C,t.geocode=L,t.fromAddress=m,t.fromPlaceId=_,t.fromLatLng=E})(os);const gd=t=>typeof t=="string",Ma=t=>Array.isArray(t)&&t.length===2;async function Oa(t,e,n){var o;let r;if(gd(t))r=await os.fromPlaceId(t,e);else{const[s,a]=t;r=await os.fromLatLng(s,a,e,void 0,void 0,n==null?void 0:n.join("|"))}const i=(o=r.results)==null?void 0:o.map(s=>{var u,f;const a=(u=s.geometry)==null?void 0:u.viewport,l=(f=s.geometry)==null?void 0:f.location;return{...s,geometry:{...s.geometry,viewport:new google.maps.LatLngBounds(a.southwest,a.northeast),location:new google.maps.LatLng(l)}}});return{...r,results:i}}const Ol=(t,e)=>{if(!navigator.geolocation){e==null||e(new GeolocationPositionError),console.error("Geolocation is not supported by your browser");return}navigator.geolocation.getCurrentPosition(t,e,{maximumAge:6e4,timeout:5e3,enableHighAccuracy:!0})},vd=t=>t.status===200,md=t=>{const e=document.querySelector(pd);return e?getComputedStyle(e).getPropertyValue(t):null},Pl=t=>{const e=new Blob([t],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(e)},Pr=(t,e)=>{let n=t;const r=(e.includes("--owl")?md(e):e)||"";return n=n.replaceAll("currentColor",r),n},lm=t=>"comment"in t&&"address"in t&&"apartment_number"in t&&"delivery_time"in t,um={points:[],samePoints:[],error:!1,loaded:!1,loading:!1,reloading:!1},cm=t=>t.points,fm=t=>t.loaded,yd=t=>t.loading,sn=bn()((t,e)=>({...um,setSamePoints(n){t({samePoints:n})},closeSamePoints(){t({samePoints:[]})},async loadNext(n,r){const{reloading:i}=e();t({error:!1,reloading:!0}),be.getState().setBounds(n);let o=0;try{await Ea(i,r,n)(a=>{t(o===0?{points:a.data.results}:{points:[...e().points,...a.data.results]}),o++})}catch{t({error:!0})}finally{t({reloading:!1})}},async loadFirst(n){const{loading:r}=e(),i=kg(be.getState());t({error:!1,loading:!0});let o=0;try{await Ea(r,n,i)(a=>{o>=1&&t({loading:!1,loaded:!0}),t(o===0?{points:a.data.results}:{points:[...e().points,...a.data.results]}),o++}),t({loading:!1,loaded:!0})}catch{t({error:!0,loading:!1})}finally{t({loading:!1})}}})),dm=()=>{c.useEffect(()=>{sn.getState().loadFirst(),console.debug("[OmnicWidgetLocations::pointsLoader]");const t=Vn.subscribe(e=>{sn.getState().loadFirst(e),console.debug("[OmnicWidgetLocations::filters]",e)});return()=>{t()}},[])},On=".",kl=Symbol("target"),bd=Symbol("unsubscribe");function Pa(t){return t instanceof Date||t instanceof Set||t instanceof Map||t instanceof WeakSet||t instanceof WeakMap||ArrayBuffer.isView(t)}function hm(t){return(typeof t=="object"?t===null:typeof t!="function")||t instanceof RegExp}const mt=Array.isArray;function ss(t){return typeof t=="symbol"}const Mt={after(t,e){return mt(t)?t.slice(e.length):e===""?t:t.slice(e.length+1)},concat(t,e){return mt(t)?(t=[...t],e&&t.push(e),t):e&&e.toString!==void 0?(t!==""&&(t+=On),ss(e)?t+e.toString():t+e):t},initial(t){if(mt(t))return t.slice(0,-1);if(t==="")return t;const e=t.lastIndexOf(On);return e===-1?"":t.slice(0,e)},last(t){if(mt(t))return t.at(-1)??"";if(t==="")return t;const e=t.lastIndexOf(On);return e===-1?t:t.slice(e+1)},walk(t,e){if(mt(t))for(const n of t)e(n);else if(t!==""){let n=0,r=t.indexOf(On);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(On,n)}},get(t,e){return this.walk(e,n=>{t&&(t=t[n])}),t},isSubPath(t,e){if(mt(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]===On:!1},isRootPath(t){return mt(t)?t.length===0:t===""}};function pm(t){return typeof t=="object"&&typeof t.next=="function"}function gm(t,e,n,r,i){const o=t.next;if(e.name==="entries")t.next=function(){const s=o.call(this);return s.done===!1&&(s.value[0]=i(s.value[0],e,s.value[0],r),s.value[1]=i(s.value[1],e,s.value[0],r)),s};else if(e.name==="values"){const s=n[kl].keys();t.next=function(){const a=o.call(this);return a.done===!1&&(a.value=i(a.value,e,s.next().value,r)),a}}else t.next=function(){const s=o.call(this);return s.done===!1&&(s.value=i(s.value,e,s.value,r)),s};return t}function du(t,e,n){return t.isUnsubscribed||e.ignoreSymbols&&ss(n)||e.ignoreUnderscores&&n.charAt(0)==="_"||"ignoreKeys"in e&&e.ignoreKeys.includes(n)}let vm=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 o=e[i],s=o??e;this._pathCache.set(s,n);let a=this._proxyCache.get(s);return a===void 0&&(a=o===void 0?new Proxy(e,r):e,this._proxyCache.set(s,a)),a}getPath(e){return this.isUnsubscribed?void 0:this._pathCache.get(e)}isDetached(e,n){return!Object.is(e,Mt.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,o){if(!this._equals(o,r)||!(n in e)){const s=this._getOwnPropertyDescriptor(e,n);return s!==void 0&&"set"in s?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 ka(t){return toString.call(t)==="[object Object]"}function vo(){return!0}function br(t,e){return t.length!==e.length||t.some((n,r)=>e[r]!==n)}const Cd=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),mm=new Set(["concat","includes","indexOf","join","keys","lastIndexOf"]),wd={push:vo,pop:vo,shift:vo,unshift:vo,copyWithin:br,reverse:br,sort:br,splice:br,flat:br,fill:br},ym=new Set([...Cd,...mm,...Object.keys(wd)]);function mo(t,e){if(t.size!==e.size)return!0;for(const n of t)if(!e.has(n))return!0;return!1}const Sd=["keys","values","entries"],Ld=new Set(["has","toString"]),xd={add:mo,clear:mo,delete:mo,forEach:mo},bm=new Set([...Ld,...Object.keys(xd),...Sd]);function yo(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([...Ld,"get"]),Ed={set:yo,clear:yo,delete:yo,forEach:yo},wm=new Set([...Cm,...Object.keys(Ed),...Sd]);class zn{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 Cd.has(e)}_shallowClone(e){let n=e;if(ka(e))n={...e};else if(mt(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?(mt(i)?this._onIsChanged=wd[n]:i instanceof Set?this._onIsChanged=xd[n]:i instanceof Map&&(this._onIsChanged=Ed[n]),i):r}update(e,n,r){const i=Mt.after(e,this._path);if(n!=="length"){let o=this.clone;Mt.walk(i,s=>{o!=null&&o[s]&&(this._clonedCache.has(o[s])||(o[s]=this._shallowClone(o[s])),o=o[s])}),this._hasOnValidate&&this._changes.push({path:i,property:n,previous:r}),o!=null&&o[n]&&(o[n]=r)}this._isChanged=!0}undo(e){let n;for(let r=this._changes.length-1;r!==-1;r--)n=this._changes[r],Mt.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 Mt.isRootPath(this._path)||Mt.isSubPath(e,this._path)}}class hu extends zn{static isHandledMethod(e){return ym.has(e)}}class Sm extends zn{undo(e){e.setTime(this.clone.getTime())}isChanged(e,n){return!n(this.clone.valueOf(),e.valueOf())}}class pu extends zn{static isHandledMethod(e){return bm.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 gu extends zn{static isHandledMethod(e){return wm.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 Lm extends zn{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 xm extends zn{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 Xn{constructor(e){this._stack=[],this._hasOnValidate=e}static isHandledType(e){return ka(e)||mt(e)||Pa(e)}static isHandledMethod(e,n){return ka(e)?zn.isHandledMethod(n):mt(e)?hu.isHandledMethod(n):e instanceof Set?pu.isHandledMethod(n):e instanceof Map?gu.isHandledMethod(n):Pa(e)}get isCloning(){return this._stack.length>0}start(e,n,r){let i=zn;mt(e)?i=hu:e instanceof Date?i=Sm:e instanceof Set?i=pu:e instanceof Map?i=gu:e instanceof WeakSet?i=Lm:e instanceof WeakMap&&(i=xm),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,o=Xn.isHandledMethod(r,i);return this._stack.at(-1).preferredThisArg(o,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 Em={equals:Object.is,isShallow:!1,pathAsArray:!1,ignoreSymbols:!1,ignoreUnderscores:!1,ignoreDetached:!1,details:!1},Oi=(t,e,n={})=>{n={...Em,...n};const r=Symbol("ProxyTarget"),{equals:i,isShallow:o,ignoreDetached:s,details:a}=n,l=new vm(i),u=typeof n.onValidate=="function",f=new Xn(u),d=(m,_,E,p,b)=>!u||f.isCloning||n.onValidate(Mt.concat(l.getPath(m),_),E,p,b)===!0,h=(m,_,E,p)=>{!du(l,n,_)&&!(s&&l.isDetached(m,t))&&v(l.getPath(m),_,E,p)},v=(m,_,E,p,b)=>{f.isCloning&&f.isPartOfClone(m)?f.update(m,_,p):e(Mt.concat(m,_),E,p,b)},y=m=>m&&(m[r]??m),g=(m,_,E,p)=>{if(hm(m)||E==="constructor"||o&&!Xn.isHandledMethod(_,E)||du(l,n,E)||l.isGetInvariant(_,E)||s&&l.isDetached(_,t))return m;p===void 0&&(p=l.getPath(_));const b=Mt.concat(p,E),x=l.getPath(m);return x&&w(b,x)?l.getProxy(m,x,C,r):l.getProxy(m,b,C,r)},w=(m,_)=>{if(ss(m)||m.length<=_.length||mt(_)&&_.length===0)return!1;const E=mt(m)?m:m.split(On),p=mt(_)?_:_.split(On);return E.length<=p.length?!1:!p.some((b,x)=>b!==E[x])},C={get(m,_,E){if(ss(_)){if(_===r||_===kl)return m;if(_===bd&&!l.isUnsubscribed&&l.getPath(m).length===0)return l.unsubscribe(),m}const p=Pa(m)?Reflect.get(m,_):Reflect.get(m,_,E);return g(p,m,_)},set(m,_,E,p){E=y(E);const b=m[r]??m,x=b[_];if(i(x,E)&&_ in m)return!0;const M=d(m,_,E,x);return M&&l.setProperty(b,_,E,p,x)?(h(m,_,m[_],x),!0):!M},defineProperty(m,_,E){if(!l.isSameDescriptor(E,m,_)){const p=m[_];d(m,_,E.value,p)&&l.defineProperty(m,_,E,p)&&h(m,_,E.value,p)}return!0},deleteProperty(m,_){if(!Reflect.has(m,_))return!0;const E=Reflect.get(m,_),p=d(m,_,void 0,E);return p&&l.deleteProperty(m,_,E)?(h(m,_,void 0,E),!0):!p},apply(m,_,E){const p=_[r]??_;if(l.isUnsubscribed)return Reflect.apply(m,p,E);if((a===!1||a!==!0&&!a.includes(m.name))&&Xn.isHandledType(p)){let b=Mt.initial(l.getPath(m));const x=Xn.isHandledMethod(p,m.name);f.start(p,b,E);let M=Reflect.apply(m,f.preferredThisArg(m,_,p),x?E.map(P=>y(P)):E);const O=f.isChanged(p,i),T=f.stop();if(Xn.isHandledType(M)&&x&&(_ instanceof Map&&m.name==="get"&&(b=Mt.concat(b,E[0])),M=l.getProxy(M,b,C)),O){const P={name:m.name,args:E,result:M},R=f.isCloning?Mt.initial(b):b,I=f.isCloning?Mt.last(b):"";d(Mt.get(t,R),I,p,T,P)?v(R,I,p,T,P):f.undo(p)}return(_ instanceof Map||_ instanceof Set)&&pm(M)?gm(M,m,_,b,g):M}return Reflect.apply(m,_,E)}},L=l.getProxy(t,n.pathAsArray?[]:"",C);return e=e.bind(L),u&&(n.onValidate=n.onValidate.bind(L)),L};Oi.target=t=>(t==null?void 0:t[kl])??t;Oi.unsubscribe=t=>(t==null?void 0:t[bd])??t;const _m=t=>{const e=t??window.OMNIC_WIDGET_LOCATIONS_CONFIG,[n,r]=c.useState({...Jn,...e,map:{...Jn.map,...e==null?void 0:e.map},palette:{...Jn.palette,...e==null?void 0:e.palette}}),i=t&&!window.OMNIC_WIDGET_LOCATIONS_CONFIG,o=!t&&window.OMNIC_WIDGET_LOCATIONS_CONFIG;return c.useEffect(()=>{if(!i)return;const s={...Jn,...t,map:{...Jn.map,...t.map},palette:{...Jn.palette,...t.palette}};console.debug("[OmnicLocationsWidget::reactConfig]",s),r(s)},[t,i]),c.useEffect(()=>{if(o)return console.debug("[OmnicLocationsWidget::windowConfig]",n),window.OMNIC_WIDGET_LOCATIONS_CONFIG=Oi(window.OMNIC_WIDGET_LOCATIONS_CONFIG,function(){const s={...n,...Oi.target(this)};s.map&&(s.map={...s.map}),s.palette&&(s.palette={...s.palette}),console.debug("[OmnicLocationsWidget::changeWindowConfig]",s),r({...s})}),()=>{window.OMNIC_WIDGET_LOCATIONS_CONFIG&&Oi.unsubscribe(window.OMNIC_WIDGET_LOCATIONS_CONFIG)}},[n,o]),n},Mm=(t,e)=>{console.debug("[OmnicWidgetLocations::axios]",{INN:t,options:e}),Vi.defaults.headers.get.Authorization=`INN ${t}`,e!=null&&e.baseURL&&(Vi.defaults.baseURL=e.baseURL)};var _d={exports:{}};/*!
|
|
17
|
+
*/var xs=c,hg=dg;function pg(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var gg=typeof Object.is=="function"?Object.is:pg,vg=hg.useSyncExternalStore,mg=xs.useRef,yg=xs.useEffect,bg=xs.useMemo,Cg=xs.useDebugValue;zf.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=mg(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=bg(function(){function l(v){if(!u){if(u=!0,f=v,v=r(v),i!==void 0&&s.hasValue){var y=s.value;if(i(y,v))return d=y}return d=v}if(y=d,gg(f,v))return y;var g=r(v);return i!==void 0&&i(y,g)?y:(f=v,d=g)}var u=!1,f,d,h=n===void 0?null:n;return[function(){return l(e())},h===null?void 0:function(){return l(h())}]},[e,n,r,i]);var a=vg(t,o[0],o[1]);return yg(function(){s.hasValue=!0,s.value=a},[a]),Cg(a),a};Vf.exports=zf;var wg=Vf.exports;const Sg=Cl(wg);var Wf={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_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:Lg}=c,{useSyncExternalStoreWithSelector:Eg}=Sg;let Xl=!1;const xg=t=>t;function _g(t,e=xg,n){(Wf?"production":void 0)!=="production"&&n&&!Xl&&(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"),Xl=!0);const r=Eg(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return Lg(r),r}const eu=t=>{(Wf?"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"?ng(t):t,n=(r,i)=>_g(e,r,i);return Object.assign(n,e),n},bn=t=>t?eu(t):eu,Mg={location:null},wl=t=>t.location,Ot=bn()(t=>({...Mg,setDeliverPoint(e){t({location:e})}})),Og={map:null,mode:"self_pickup",bounds:null,blurred:!1,loaded:!1,loading:!0,detailsOpen:!1,isIdle:!1},Gf=t=>t.map,Pg=t=>t.mode,kg=t=>t.bounds,Tg=t=>t.blurred,Rg=t=>t.loaded,Dg=t=>t.loading,Sl=t=>t.detailsOpen,be=bn()(t=>({...Og,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})}})),Ag={location:null},Ig=t=>t.location,on=bn()(t=>({...Ag,setSelectedLocation(e){t({location:e})}})),jg={query:"",type:gn.All,hours:["08:00","22:00"],send:{[Zt.Return]:!1,[Zt.Payment]:!1,[Zt.Shipping]:!1},receive:{[Gt.PayByCash]:!1,[Gt.CheckOrder]:!1,[Gt.DressingRoom]:!1}},Ng=t=>t.type,Bg=t=>t.send,Fg=t=>t.receive,Vn=bn(t=>({...jg,setFilter(e){be.getState().setDetailsOpen(!1),Ot.getState().setDeliverPoint(null),on.getState().setSelectedLocation(null),t(e)}})),Ug=t=>{const[e,n]=t.split(":");return Number(e)*60+Number(n)},Vg=t=>{const e=Math.floor(t/60),n=t%60;return`${e<10?`0${e}`:e}:${n<10?`0${n}`:n}`},zg=(t,e)=>[[t[0]-e,t[0]+e],[t[1]-e,t[1]+e]];function Zf(t,e){return function(){return t.apply(e,arguments)}}const{toString:Hg}=Object.prototype,{getPrototypeOf:Ll}=Object,_s=(t=>e=>{const n=Hg.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),an=t=>(t=t.toLowerCase(),e=>_s(e)===t),Ms=t=>e=>typeof e===t,{isArray:ni}=Array,Ui=Ms("undefined");function $g(t){return t!==null&&!Ui(t)&&t.constructor!==null&&!Ui(t.constructor)&&Nt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const qf=an("ArrayBuffer");function Wg(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&qf(t.buffer),e}const Gg=Ms("string"),Nt=Ms("function"),Kf=Ms("number"),Os=t=>t!==null&&typeof t=="object",Zg=t=>t===!0||t===!1,$o=t=>{if(_s(t)!=="object")return!1;const e=Ll(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},qg=an("Date"),Kg=an("File"),Qg=an("Blob"),Jg=an("FileList"),Yg=t=>Os(t)&&Nt(t.pipe),Xg=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Nt(t.append)&&((e=_s(t))==="formdata"||e==="object"&&Nt(t.toString)&&t.toString()==="[object FormData]"))},ev=an("URLSearchParams"),tv=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function io(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),ni(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{const o=n?Object.getOwnPropertyNames(t):Object.keys(t),s=o.length;let a;for(r=0;r<s;r++)a=o[r],e.call(null,t[a],a,t)}}function Qf(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 Jf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Yf=t=>!Ui(t)&&t!==Jf;function Ca(){const{caseless:t}=Yf(this)&&this||{},e={},n=(r,i)=>{const o=t&&Qf(e,i)||i;$o(e[o])&&$o(r)?e[o]=Ca(e[o],r):$o(r)?e[o]=Ca({},r):ni(r)?e[o]=r.slice():e[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&io(arguments[r],n);return e}const nv=(t,e,n,{allOwnKeys:r}={})=>(io(e,(i,o)=>{n&&Nt(i)?t[o]=Zf(i,n):t[o]=i},{allOwnKeys:r}),t),rv=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),iv=(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)},ov=(t,e,n,r)=>{let i,o,s;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)s=i[o],(!r||r(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=n!==!1&&Ll(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},sv=(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},av=t=>{if(!t)return null;if(ni(t))return t;let e=t.length;if(!Kf(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},lv=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Ll(Uint8Array)),uv=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const o=i.value;e.call(t,o[0],o[1])}},cv=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},fv=an("HTMLFormElement"),dv=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),tu=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),hv=an("RegExp"),Xf=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};io(n,(i,o)=>{let s;(s=e(i,o,t))!==!1&&(r[o]=s||i)}),Object.defineProperties(t,r)},pv=t=>{Xf(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+"'")})}})},gv=(t,e)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return ni(t)?r(t):r(String(t).split(e)),n},vv=()=>{},mv=(t,e)=>(t=+t,Number.isFinite(t)?t:e),Hs="abcdefghijklmnopqrstuvwxyz",nu="0123456789",ed={DIGIT:nu,ALPHA:Hs,ALPHA_DIGIT:Hs+Hs.toUpperCase()+nu},yv=(t=16,e=ed.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function bv(t){return!!(t&&Nt(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Cv=t=>{const e=new Array(10),n=(r,i)=>{if(Os(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const o=ni(r)?[]:{};return io(r,(s,a)=>{const l=n(s,i+1);!Ui(l)&&(o[a]=l)}),e[i]=void 0,o}}return r};return n(t,0)},wv=an("AsyncFunction"),Sv=t=>t&&(Os(t)||Nt(t))&&Nt(t.then)&&Nt(t.catch),I={isArray:ni,isArrayBuffer:qf,isBuffer:$g,isFormData:Xg,isArrayBufferView:Wg,isString:Gg,isNumber:Kf,isBoolean:Zg,isObject:Os,isPlainObject:$o,isUndefined:Ui,isDate:qg,isFile:Kg,isBlob:Qg,isRegExp:hv,isFunction:Nt,isStream:Yg,isURLSearchParams:ev,isTypedArray:lv,isFileList:Jg,forEach:io,merge:Ca,extend:nv,trim:tv,stripBOM:rv,inherits:iv,toFlatObject:ov,kindOf:_s,kindOfTest:an,endsWith:sv,toArray:av,forEachEntry:uv,matchAll:cv,isHTMLForm:fv,hasOwnProperty:tu,hasOwnProp:tu,reduceDescriptors:Xf,freezeMethods:pv,toObjectSet:gv,toCamelCase:dv,noop:vv,toFiniteNumber:mv,findKey:Qf,global:Jf,isContextDefined:Yf,ALPHABET:ed,generateString:yv,isSpecCompliantForm:bv,toJSONObject:Cv,isAsyncFn:wv,isThenable:Sv};function we(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)}I.inherits(we,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:I.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const td=we.prototype,nd={};["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=>{nd[t]={value:t}});Object.defineProperties(we,nd);Object.defineProperty(td,"isAxiosError",{value:!0});we.from=(t,e,n,r,i,o)=>{const s=Object.create(td);return I.toFlatObject(t,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),we.call(s,t.message,e,n,r,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};const Lv=null;function wa(t){return I.isPlainObject(t)||I.isArray(t)}function rd(t){return I.endsWith(t,"[]")?t.slice(0,-2):t}function ru(t,e,n){return t?t.concat(e).map(function(i,o){return i=rd(i),!n&&o?"["+i+"]":i}).join(n?".":""):e}function Ev(t){return I.isArray(t)&&!t.some(wa)}const xv=I.toFlatObject(I,{},null,function(e){return/^is[A-Z]/.test(e)});function Ps(t,e,n){if(!I.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=I.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,w){return!I.isUndefined(w[g])});const r=n.metaTokens,i=n.visitor||f,o=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&I.isSpecCompliantForm(e);if(!I.isFunction(i))throw new TypeError("visitor must be a function");function u(y){if(y===null)return"";if(I.isDate(y))return y.toISOString();if(!l&&I.isBlob(y))throw new we("Blob is not supported. Use a Buffer instead.");return I.isArrayBuffer(y)||I.isTypedArray(y)?l&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function f(y,g,w){let C=y;if(y&&!w&&typeof y=="object"){if(I.endsWith(g,"{}"))g=r?g:g.slice(0,-2),y=JSON.stringify(y);else if(I.isArray(y)&&Ev(y)||(I.isFileList(y)||I.endsWith(g,"[]"))&&(C=I.toArray(y)))return g=rd(g),C.forEach(function(m,_){!(I.isUndefined(m)||m===null)&&e.append(s===!0?ru([g],_,o):s===null?g:g+"[]",u(m))}),!1}return wa(y)?!0:(e.append(ru(w,g,o),u(y)),!1)}const d=[],h=Object.assign(xv,{defaultVisitor:f,convertValue:u,isVisitable:wa});function v(y,g){if(!I.isUndefined(y)){if(d.indexOf(y)!==-1)throw Error("Circular reference detected in "+g.join("."));d.push(y),I.forEach(y,function(C,L){(!(I.isUndefined(C)||C===null)&&i.call(e,C,I.isString(L)?L.trim():L,g,h))===!0&&v(C,g?g.concat(L):[L])}),d.pop()}}if(!I.isObject(t))throw new TypeError("data must be an object");return v(t),e}function iu(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function El(t,e){this._pairs=[],t&&Ps(t,this,e)}const id=El.prototype;id.append=function(e,n){this._pairs.push([e,n])};id.toString=function(e){const n=e?function(r){return e.call(this,r,iu)}:iu;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function _v(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function od(t,e,n){if(!e)return t;const r=n&&n.encode||_v,i=n&&n.serialize;let o;if(i?o=i(e,n):o=I.isURLSearchParams(e)?e.toString():new El(e,n).toString(r),o){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class ou{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){I.forEach(this.handlers,function(r){r!==null&&e(r)})}}const sd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Mv=typeof URLSearchParams<"u"?URLSearchParams:El,Ov=typeof FormData<"u"?FormData:null,Pv=typeof Blob<"u"?Blob:null,kv={isBrowser:!0,classes:{URLSearchParams:Mv,FormData:Ov,Blob:Pv},protocols:["http","https","file","blob","url","data"]},ad=typeof window<"u"&&typeof document<"u",Tv=(t=>ad&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),Rv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Dv=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ad,hasStandardBrowserEnv:Tv,hasStandardBrowserWebWorkerEnv:Rv},Symbol.toStringTag,{value:"Module"})),nn={...Dv,...kv};function Av(t,e){return Ps(t,new nn.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return nn.isNode&&I.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function Iv(t){return I.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function jv(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],e[o]=t[o];return e}function ld(t){function e(n,r,i,o){let s=n[o++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),l=o>=n.length;return s=!s&&I.isArray(i)?i.length:s,l?(I.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!I.isObject(i[s]))&&(i[s]=[]),e(n,r,i[s],o)&&I.isArray(i[s])&&(i[s]=jv(i[s])),!a)}if(I.isFormData(t)&&I.isFunction(t.entries)){const n={};return I.forEachEntry(t,(r,i)=>{e(Iv(r),i,n,0)}),n}return null}function Nv(t,e,n){if(I.isString(t))try{return(e||JSON.parse)(t),I.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const xl={transitional:sd,adapter:["xhr","http"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=I.isObject(e);if(o&&I.isHTMLForm(e)&&(e=new FormData(e)),I.isFormData(e))return i?JSON.stringify(ld(e)):e;if(I.isArrayBuffer(e)||I.isBuffer(e)||I.isStream(e)||I.isFile(e)||I.isBlob(e))return e;if(I.isArrayBufferView(e))return e.buffer;if(I.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Av(e,this.formSerializer).toString();if((a=I.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Ps(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),Nv(e)):e}],transformResponse:[function(e){const n=this.transitional||xl.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(e&&I.isString(e)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?we.from(a,we.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:nn.classes.FormData,Blob:nn.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};I.forEach(["delete","get","head","post","put","patch"],t=>{xl.headers[t]={}});const _l=xl,Bv=I.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"]),Fv=t=>{const e={};let n,r,i;return t&&t.split(`
|
|
18
|
+
`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||e[n]&&Bv[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},su=Symbol("internals");function fi(t){return t&&String(t).trim().toLowerCase()}function Wo(t){return t===!1||t==null?t:I.isArray(t)?t.map(Wo):String(t)}function Uv(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 Vv=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function $s(t,e,n,r,i){if(I.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!I.isString(e)){if(I.isString(r))return e.indexOf(r)!==-1;if(I.isRegExp(r))return r.test(e)}}function zv(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Hv(t,e){const n=I.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,o,s){return this[r].call(this,e,i,o,s)},configurable:!0})})}class ks{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function o(a,l,u){const f=fi(l);if(!f)throw new Error("header name must be a non-empty string");const d=I.findKey(i,f);(!d||i[d]===void 0||u===!0||u===void 0&&i[d]!==!1)&&(i[d||l]=Wo(a))}const s=(a,l)=>I.forEach(a,(u,f)=>o(u,f,l));return I.isPlainObject(e)||e instanceof this.constructor?s(e,n):I.isString(e)&&(e=e.trim())&&!Vv(e)?s(Fv(e),n):e!=null&&o(n,e,r),this}get(e,n){if(e=fi(e),e){const r=I.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return Uv(i);if(I.isFunction(n))return n.call(this,i,r);if(I.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=fi(e),e){const r=I.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||$s(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function o(s){if(s=fi(s),s){const a=I.findKey(r,s);a&&(!n||$s(r,r[a],a,n))&&(delete r[a],i=!0)}}return I.isArray(e)?e.forEach(o):o(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!e||$s(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const n=this,r={};return I.forEach(this,(i,o)=>{const s=I.findKey(r,o);if(s){n[s]=Wo(i),delete n[o];return}const a=e?zv(o):String(o).trim();a!==o&&delete n[o],n[a]=Wo(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return I.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&I.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[su]=this[su]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=fi(s);r[a]||(Hv(i,s),r[a]=!0)}return I.isArray(e)?e.forEach(o):o(e),this}}ks.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);I.reduceDescriptors(ks.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});I.freezeMethods(ks);const mn=ks;function Ws(t,e){const n=this||_l,r=e||n,i=mn.from(r.headers);let o=r.data;return I.forEach(t,function(a){o=a.call(n,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function ud(t){return!!(t&&t.__CANCEL__)}function oo(t,e,n){we.call(this,t??"canceled",we.ERR_CANCELED,e,n),this.name="CanceledError"}I.inherits(oo,we,{__CANCEL__:!0});function $v(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new we("Request failed with status code "+n.status,[we.ERR_BAD_REQUEST,we.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Wv=nn.hasStandardBrowserEnv?{write(t,e,n,r,i,o){const s=[t+"="+encodeURIComponent(e)];I.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),I.isString(r)&&s.push("path="+r),I.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.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 Gv(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Zv(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function cd(t,e){return t&&!Gv(e)?Zv(t,e):e}const qv=nn.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(o){let s=o;return e&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{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(s){const a=I.isString(s)?i(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function Kv(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Qv(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,o=0,s;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),f=r[o];s||(s=u),n[i]=l,r[i]=u;let d=o,h=0;for(;d!==i;)h+=n[d++],d=d%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),u-s<e)return;const v=f&&u-f;return v?Math.round(h*1e3/v):void 0}}function au(t,e){let n=0;const r=Qv(50,250);return i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-n,l=r(a),u=o<=s;n=o;const f={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&u?(s-o)/l:void 0,event:i};f[e?"download":"upload"]=!0,t(f)}}const Jv=typeof XMLHttpRequest<"u",Yv=Jv&&function(t){return new Promise(function(n,r){let i=t.data;const o=mn.from(t.headers).normalize();let{responseType:s,withXSRFToken:a}=t,l;function u(){t.cancelToken&&t.cancelToken.unsubscribe(l),t.signal&&t.signal.removeEventListener("abort",l)}let f;if(I.isFormData(i)){if(nn.hasStandardBrowserEnv||nn.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((f=o.getContentType())!==!1){const[g,...w]=f?f.split(";").map(C=>C.trim()).filter(Boolean):[];o.setContentType([g||"multipart/form-data",...w].join("; "))}}let d=new XMLHttpRequest;if(t.auth){const g=t.auth.username||"",w=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(g+":"+w))}const h=cd(t.baseURL,t.url);d.open(t.method.toUpperCase(),od(h,t.params,t.paramsSerializer),!0),d.timeout=t.timeout;function v(){if(!d)return;const g=mn.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),C={data:!s||s==="text"||s==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:g,config:t,request:d};$v(function(m){n(m),u()},function(m){r(m),u()},C),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 we("Request aborted",we.ECONNABORTED,t,d)),d=null)},d.onerror=function(){r(new we("Network Error",we.ERR_NETWORK,t,d)),d=null},d.ontimeout=function(){let w=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const C=t.transitional||sd;t.timeoutErrorMessage&&(w=t.timeoutErrorMessage),r(new we(w,C.clarifyTimeoutError?we.ETIMEDOUT:we.ECONNABORTED,t,d)),d=null},nn.hasStandardBrowserEnv&&(a&&I.isFunction(a)&&(a=a(t)),a||a!==!1&&qv(h))){const g=t.xsrfHeaderName&&t.xsrfCookieName&&Wv.read(t.xsrfCookieName);g&&o.set(t.xsrfHeaderName,g)}i===void 0&&o.setContentType(null),"setRequestHeader"in d&&I.forEach(o.toJSON(),function(w,C){d.setRequestHeader(C,w)}),I.isUndefined(t.withCredentials)||(d.withCredentials=!!t.withCredentials),s&&s!=="json"&&(d.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&d.addEventListener("progress",au(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",au(t.onUploadProgress)),(t.cancelToken||t.signal)&&(l=g=>{d&&(r(!g||g.type?new oo(null,t,d):g),d.abort(),d=null)},t.cancelToken&&t.cancelToken.subscribe(l),t.signal&&(t.signal.aborted?l():t.signal.addEventListener("abort",l)));const y=Kv(h);if(y&&nn.protocols.indexOf(y)===-1){r(new we("Unsupported protocol "+y+":",we.ERR_BAD_REQUEST,t));return}d.send(i||null)})},Sa={http:Lv,xhr:Yv};I.forEach(Sa,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const lu=t=>`- ${t}`,Xv=t=>I.isFunction(t)||t===null||t===!1,fd={getAdapter:t=>{t=I.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let o=0;o<e;o++){n=t[o];let s;if(r=n,!Xv(n)&&(r=Sa[(s=String(n)).toLowerCase()],r===void 0))throw new we(`Unknown adapter '${s}'`);if(r)break;i[s||"#"+o]=r}if(!r){const o=Object.entries(i).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=e?o.length>1?`since :
|
|
20
|
+
`+o.map(lu).join(`
|
|
21
|
+
`):" "+lu(o[0]):"as no adapter specified";throw new we("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:Sa};function Gs(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new oo(null,t)}function uu(t){return Gs(t),t.headers=mn.from(t.headers),t.data=Ws.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),fd.getAdapter(t.adapter||_l.adapter)(t).then(function(r){return Gs(t),r.data=Ws.call(t,t.transformResponse,r),r.headers=mn.from(r.headers),r},function(r){return ud(r)||(Gs(t),r&&r.response&&(r.response.data=Ws.call(t,t.transformResponse,r.response),r.response.headers=mn.from(r.response.headers))),Promise.reject(r)})}const cu=t=>t instanceof mn?{...t}:t;function Kr(t,e){e=e||{};const n={};function r(u,f,d){return I.isPlainObject(u)&&I.isPlainObject(f)?I.merge.call({caseless:d},u,f):I.isPlainObject(f)?I.merge({},f):I.isArray(f)?f.slice():f}function i(u,f,d){if(I.isUndefined(f)){if(!I.isUndefined(u))return r(void 0,u,d)}else return r(u,f,d)}function o(u,f){if(!I.isUndefined(f))return r(void 0,f)}function s(u,f){if(I.isUndefined(f)){if(!I.isUndefined(u))return r(void 0,u)}else return r(void 0,f)}function a(u,f,d){if(d in e)return r(u,f);if(d in t)return r(void 0,u)}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,f)=>i(cu(u),cu(f),!0)};return I.forEach(Object.keys(Object.assign({},t,e)),function(f){const d=l[f]||i,h=d(t[f],e[f],f);I.isUndefined(h)&&d!==a||(n[f]=h)}),n}const dd="1.6.8",Ml={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Ml[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const fu={};Ml.transitional=function(e,n,r){function i(o,s){return"[Axios v"+dd+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(e===!1)throw new we(i(s," has been removed"+(n?" in "+n:"")),we.ERR_DEPRECATED);return n&&!fu[s]&&(fu[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,s,a):!0}};function em(t,e,n){if(typeof t!="object")throw new we("options must be an object",we.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const o=r[i],s=e[o];if(s){const a=t[o],l=a===void 0||s(a,o,t);if(l!==!0)throw new we("option "+o+" must be "+l,we.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new we("Unknown option "+o,we.ERR_BAD_OPTION)}}const La={assertOptions:em,validators:Ml},Ln=La.validators;class is{constructor(e){this.defaults=e,this.interceptors={request:new ou,response:new ou}}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 o=i.stack?i.stack.replace(/^.+\n/,""):"";r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
22
|
+
`+o):r.stack=o}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Kr(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&La.assertOptions(r,{silentJSONParsing:Ln.transitional(Ln.boolean),forcedJSONParsing:Ln.transitional(Ln.boolean),clarifyTimeoutError:Ln.transitional(Ln.boolean)},!1),i!=null&&(I.isFunction(i)?n.paramsSerializer={serialize:i}:La.assertOptions(i,{encode:Ln.function,serialize:Ln.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&I.merge(o.common,o[n.method]);o&&I.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=mn.concat(s,o);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let f,d=0,h;if(!l){const y=[uu.bind(this),void 0];for(y.unshift.apply(y,a),y.push.apply(y,u),h=y.length,f=Promise.resolve(n);d<h;)f=f.then(y[d++],y[d++]);return f}h=a.length;let v=n;for(d=0;d<h;){const y=a[d++],g=a[d++];try{v=y(v)}catch(w){g.call(this,w);break}}try{f=uu.call(this,v)}catch(y){return Promise.reject(y)}for(d=0,h=u.length;d<h;)f=f.then(u[d++],u[d++]);return f}getUri(e){e=Kr(this.defaults,e);const n=cd(e.baseURL,e.url);return od(n,e.params,e.paramsSerializer)}}I.forEach(["delete","get","head","options"],function(e){is.prototype[e]=function(n,r){return this.request(Kr(r||{},{method:e,url:n,data:(r||{}).data}))}});I.forEach(["post","put","patch"],function(e){function n(r){return function(o,s,a){return this.request(Kr(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}is.prototype[e]=n(),is.prototype[e+"Form"]=n(!0)});const Go=is;class Ol{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},e(function(o,s,a){r.reason||(r.reason=new oo(o,s,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 Ol(function(i){e=i}),cancel:e}}}const tm=Ol;function nm(t){return function(n){return t.apply(null,n)}}function rm(t){return I.isObject(t)&&t.isAxiosError===!0}const Ea={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(Ea).forEach(([t,e])=>{Ea[e]=t});const im=Ea;function hd(t){const e=new Go(t),n=Zf(Go.prototype.request,e);return I.extend(n,Go.prototype,e,{allOwnKeys:!0}),I.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return hd(Kr(t,i))},n}const Qe=hd(_l);Qe.Axios=Go;Qe.CanceledError=oo;Qe.CancelToken=tm;Qe.isCancel=ud;Qe.VERSION=dd;Qe.toFormData=Ps;Qe.AxiosError=we;Qe.Cancel=Qe.CanceledError;Qe.all=function(e){return Promise.all(e)};Qe.spread=nm;Qe.isAxiosError=rm;Qe.mergeConfig=Kr;Qe.AxiosHeaders=mn;Qe.formToJSON=t=>ld(I.isHTMLForm(t)?new FormData(t):t);Qe.getAdapter=fd.getAdapter;Qe.HttpStatusCode=im;Qe.default=Qe;const Vi=Qe.create({baseURL:"https://ecomgate.omnic.solutions/api/1.0.0/type-1/public/"}),om=512,sm={[Gt.CheckOrder]:["is_check_order","is_delivery"],[Gt.DressingRoom]:["is_dressing_room","is_delivery"],[Gt.PayByCash]:["pay_by_cash","pay_by_card","is_delivery"]},am={[Zt.Return]:["is_pickup"],[Zt.Shipping]:["is_pickup"],[Zt.Payment]:["pay_by_cash","pay_by_card","is_pickup"]};async function*xa({bounds:t,loadPointsParams:{city_name:e,country_abbreviation:n,filter:r,region_name:i}={},options:{controller:o}={},q:s}){const a={status:30,page_size:om,country_abbreviation:n,region_name:i,city_name:e};if(s&&(a.q=s),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=sm[d];for(const y of v)a[y]=!0}if(r!=null&&r.send)for(const[d,h]of Object.entries(r==null?void 0:r.send)){if(!h)continue;const v=am[d];for(const y of v)a[y]=!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 l=await Vi.get("/locations/points",{params:a,signal:o==null?void 0:o.signal}),u=l.data.data.num_pages,f=l.data.data.current_page;for(;f<u;){yield l,a.page=f+1;const d=await Vi.get("/locations/points",{params:a,signal:o==null?void 0:o.signal});l.data.data.results=[...l.data.data.results,...d.data.data.results],l=d,f=d.data.data.current_page,u=d.data.data.num_pages}return yield l,l}const du=[],_a=({bounds:t,loadPointsParams:e,loading:n})=>{var i;const r=new AbortController;return n&&((i=du.pop())==null||i.abort()),du.push(r),async o=>{const s={controller:r};if(!t){const l=await xa({loadPointsParams:e,options:s}).next();o(l.value.data);return}for await(const a of xa({loadPointsParams:e,options:s,bounds:t}))o(a.data)}},pd=":root",so=(t,e)=>{var n;(n=document.querySelector(pd))==null||n.style.setProperty(t,e)},Ma=t=>{t.stopImmediatePropagation()};var os={};(function(t){var e,n,r=po&&po.__awaiter||function(p,b,E,P){return new(E=E||Promise)(function(O,T){function M(B){try{A(P.next(B))}catch(V){T(V)}}function R(B){try{A(P.throw(B))}catch(V){T(V)}}function A(B){var V;B.done?O(B.value):((V=B.value)instanceof E?V:new E(function(N){N(V)})).then(M,R)}A((P=P.apply(p,b||[])).next())})},i=po&&po.__rest||function(p,b){var E={};for(O in p)Object.prototype.hasOwnProperty.call(p,O)&&b.indexOf(O)<0&&(E[O]=p[O]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function")for(var P=0,O=Object.getOwnPropertySymbols(p);P<O.length;P++)b.indexOf(O[P])<0&&Object.prototype.propertyIsEnumerable.call(p,O[P])&&(E[O[P]]=p[O[P]]);return E};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(p){p.ADDRESS="address",p.LATLNG="latlng",p.PLACE_ID="place_id"}(e=t.RequestType||(t.RequestType={})),function(p){p.XML="xml",p.JSON="json"}(n=t.OutputFormat||(t.OutputFormat={}));const o="https://maps.googleapis.com/maps/api/geocode";let s={outputFormat:n.JSON};function a(p){return r(this,void 0,void 0,function*(){var E=p.outputFormat,b=i(p,["outputFormat"]),b=new URLSearchParams(b).toString(),E=o+`/${E}?`+b;try{var P=yield(yield fetch(E)).json(),{status:O,error_message:T}=P;if(O==="OK")return P;throw new Error(`Geocoding failed: ${T}. Server returned status code ${O}.`)}catch(M){throw M instanceof Error?new Error("Geocoding request failed: "+M.message):new Error("Geocoding request failed with unknown error: "+M)}})}function l(p){s=Object.assign(Object.assign({},s),p)}function u(p){s.key=p}function f(p){s.language=p}function d(p){s.region=p}function h(p){s.components=p}function v(p){s.bounds=p}function y(p){s.result_type=p}function g(p){s.location_type=p}function w(p){s.outputFormat=p}function C(p){s.enable_address_descriptor=p}function L(p,b,E){if(typeof p!="string"||typeof b!="string")throw new Error(`Both requestType and value are required and must be of type string.
|
|
23
|
+
requestType: ${typeof p}, value: `+typeof b);return a(Object.assign(Object.assign(Object.assign({},s),E),{[p]:b}))}function m(p,b,E,P){var O={outputFormat:n.JSON};return b&&(O.key=b),E&&(O.language=E),P&&(O.region=P),L(e.ADDRESS,p,O)}function _(p,b,E,P){var O={outputFormat:n.JSON};return b&&(O.key=b),E&&(O.language=E),P&&(O.region=P),L(e.PLACE_ID,p,O)}function x(p,b,E,P,O,T){var M={outputFormat:n.JSON};return E&&(M.key=E),P&&(M.language=P),O&&(M.region=O),T&&(M.location_type=T),L(e.LATLNG,p+","+b,M)}t.setDefaults=l,t.setKey=u,t.setLanguage=f,t.setRegion=d,t.setComponents=h,t.setBounds=v,t.setResultType=y,t.setLocationType=g,t.setOutputFormat=w,t.enableAddressDescriptor=C,t.geocode=L,t.fromAddress=m,t.fromPlaceId=_,t.fromLatLng=x})(os);const gd=t=>typeof t=="string",Oa=t=>Array.isArray(t)&&t.length===2;async function Pa(t,e,n){var o;let r;if(gd(t))r=await os.fromPlaceId(t,e);else{const[s,a]=t;r=await os.fromLatLng(s,a,e,void 0,void 0,n==null?void 0:n.join("|"))}const i=(o=r.results)==null?void 0:o.map(s=>{var u,f;const a=(u=s.geometry)==null?void 0:u.viewport,l=(f=s.geometry)==null?void 0:f.location;return{...s,geometry:{...s.geometry,viewport:new google.maps.LatLngBounds(a.southwest,a.northeast),location:new google.maps.LatLng(l)}}});return{...r,results:i}}const Pl=(t,e)=>{if(!navigator.geolocation){e==null||e(new GeolocationPositionError),console.error("Geolocation is not supported by your browser");return}navigator.geolocation.getCurrentPosition(t,e,{maximumAge:6e4,timeout:5e3,enableHighAccuracy:!0})},vd=t=>t.status===200,md=t=>{const e=document.querySelector(pd);return e?getComputedStyle(e).getPropertyValue(t):null},kl=t=>{const e=new Blob([t],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(e)},Pr=(t,e)=>{let n=t;const r=(e.includes("--owl")?md(e):e)||"";return n=n.replaceAll("currentColor",r),n},lm=t=>"comment"in t&&"address"in t&&"apartment_number"in t&&"delivery_time"in t,um={points:[],samePoints:[],error:!1,loaded:!1,loading:!1,reloading:!1},cm=t=>t.points,fm=t=>t.loaded,yd=t=>t.loading,sn=bn()((t,e)=>({...um,setSamePoints(n){t({samePoints:n})},closeSamePoints(){t({samePoints:[]})},async loadNext({bounds:n,...r}){const{reloading:i}=e();t({error:!1,reloading:!0}),be.getState().setBounds(n);let o=0;try{await _a({loading:i,bounds:n,loadPointsParams:r})(a=>{t(o===0?{points:a.data.results}:{points:[...e().points,...a.data.results]}),o++})}catch{t({error:!0})}finally{t({reloading:!1})}},async loadFirst(n){const{loading:r}=e(),i=kg(be.getState());t({error:!1,loading:!0});let o=0;try{await _a({loading:r,bounds:i,loadPointsParams:n})(a=>{o>=1&&t({loading:!1,loaded:!0}),t(o===0?{points:a.data.results}:{points:[...e().points,...a.data.results]}),o++}),t({loading:!1,loaded:!0})}catch{t({error:!0,loading:!1})}finally{t({loading:!1})}}})),dm=({cityName:t,countryAbbreviation:e,regionName:n})=>{c.useEffect(()=>{sn.getState().loadFirst({city_name:t,country_abbreviation:e,region_name:n}),console.debug("[OmnicWidgetLocations::pointsLoader]");const r=Vn.subscribe(i=>{sn.getState().loadFirst({filter:i,city_name:t,country_abbreviation:e,region_name:n}),console.debug("[OmnicWidgetLocations::filters]",i)});return()=>{r()}},[t,e,n])},On=".",Tl=Symbol("target"),bd=Symbol("unsubscribe");function ka(t){return t instanceof Date||t instanceof Set||t instanceof Map||t instanceof WeakSet||t instanceof WeakMap||ArrayBuffer.isView(t)}function hm(t){return(typeof t=="object"?t===null:typeof t!="function")||t instanceof RegExp}const mt=Array.isArray;function ss(t){return typeof t=="symbol"}const Mt={after(t,e){return mt(t)?t.slice(e.length):e===""?t:t.slice(e.length+1)},concat(t,e){return mt(t)?(t=[...t],e&&t.push(e),t):e&&e.toString!==void 0?(t!==""&&(t+=On),ss(e)?t+e.toString():t+e):t},initial(t){if(mt(t))return t.slice(0,-1);if(t==="")return t;const e=t.lastIndexOf(On);return e===-1?"":t.slice(0,e)},last(t){if(mt(t))return t.at(-1)??"";if(t==="")return t;const e=t.lastIndexOf(On);return e===-1?t:t.slice(e+1)},walk(t,e){if(mt(t))for(const n of t)e(n);else if(t!==""){let n=0,r=t.indexOf(On);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(On,n)}},get(t,e){return this.walk(e,n=>{t&&(t=t[n])}),t},isSubPath(t,e){if(mt(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]===On:!1},isRootPath(t){return mt(t)?t.length===0:t===""}};function pm(t){return typeof t=="object"&&typeof t.next=="function"}function gm(t,e,n,r,i){const o=t.next;if(e.name==="entries")t.next=function(){const s=o.call(this);return s.done===!1&&(s.value[0]=i(s.value[0],e,s.value[0],r),s.value[1]=i(s.value[1],e,s.value[0],r)),s};else if(e.name==="values"){const s=n[Tl].keys();t.next=function(){const a=o.call(this);return a.done===!1&&(a.value=i(a.value,e,s.next().value,r)),a}}else t.next=function(){const s=o.call(this);return s.done===!1&&(s.value=i(s.value,e,s.value,r)),s};return t}function hu(t,e,n){return t.isUnsubscribed||e.ignoreSymbols&&ss(n)||e.ignoreUnderscores&&n.charAt(0)==="_"||"ignoreKeys"in e&&e.ignoreKeys.includes(n)}let vm=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 o=e[i],s=o??e;this._pathCache.set(s,n);let a=this._proxyCache.get(s);return a===void 0&&(a=o===void 0?new Proxy(e,r):e,this._proxyCache.set(s,a)),a}getPath(e){return this.isUnsubscribed?void 0:this._pathCache.get(e)}isDetached(e,n){return!Object.is(e,Mt.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,o){if(!this._equals(o,r)||!(n in e)){const s=this._getOwnPropertyDescriptor(e,n);return s!==void 0&&"set"in s?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 Ta(t){return toString.call(t)==="[object Object]"}function vo(){return!0}function br(t,e){return t.length!==e.length||t.some((n,r)=>e[r]!==n)}const Cd=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),mm=new Set(["concat","includes","indexOf","join","keys","lastIndexOf"]),wd={push:vo,pop:vo,shift:vo,unshift:vo,copyWithin:br,reverse:br,sort:br,splice:br,flat:br,fill:br},ym=new Set([...Cd,...mm,...Object.keys(wd)]);function mo(t,e){if(t.size!==e.size)return!0;for(const n of t)if(!e.has(n))return!0;return!1}const Sd=["keys","values","entries"],Ld=new Set(["has","toString"]),Ed={add:mo,clear:mo,delete:mo,forEach:mo},bm=new Set([...Ld,...Object.keys(Ed),...Sd]);function yo(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([...Ld,"get"]),xd={set:yo,clear:yo,delete:yo,forEach:yo},wm=new Set([...Cm,...Object.keys(xd),...Sd]);class zn{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 Cd.has(e)}_shallowClone(e){let n=e;if(Ta(e))n={...e};else if(mt(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?(mt(i)?this._onIsChanged=wd[n]:i instanceof Set?this._onIsChanged=Ed[n]:i instanceof Map&&(this._onIsChanged=xd[n]),i):r}update(e,n,r){const i=Mt.after(e,this._path);if(n!=="length"){let o=this.clone;Mt.walk(i,s=>{o!=null&&o[s]&&(this._clonedCache.has(o[s])||(o[s]=this._shallowClone(o[s])),o=o[s])}),this._hasOnValidate&&this._changes.push({path:i,property:n,previous:r}),o!=null&&o[n]&&(o[n]=r)}this._isChanged=!0}undo(e){let n;for(let r=this._changes.length-1;r!==-1;r--)n=this._changes[r],Mt.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 Mt.isRootPath(this._path)||Mt.isSubPath(e,this._path)}}class pu extends zn{static isHandledMethod(e){return ym.has(e)}}class Sm extends zn{undo(e){e.setTime(this.clone.getTime())}isChanged(e,n){return!n(this.clone.valueOf(),e.valueOf())}}class gu extends zn{static isHandledMethod(e){return bm.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 vu extends zn{static isHandledMethod(e){return wm.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 Lm extends zn{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 Em extends zn{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 Xn{constructor(e){this._stack=[],this._hasOnValidate=e}static isHandledType(e){return Ta(e)||mt(e)||ka(e)}static isHandledMethod(e,n){return Ta(e)?zn.isHandledMethod(n):mt(e)?pu.isHandledMethod(n):e instanceof Set?gu.isHandledMethod(n):e instanceof Map?vu.isHandledMethod(n):ka(e)}get isCloning(){return this._stack.length>0}start(e,n,r){let i=zn;mt(e)?i=pu:e instanceof Date?i=Sm:e instanceof Set?i=gu:e instanceof Map?i=vu:e instanceof WeakSet?i=Lm:e instanceof WeakMap&&(i=Em),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,o=Xn.isHandledMethod(r,i);return this._stack.at(-1).preferredThisArg(o,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 xm={equals:Object.is,isShallow:!1,pathAsArray:!1,ignoreSymbols:!1,ignoreUnderscores:!1,ignoreDetached:!1,details:!1},Oi=(t,e,n={})=>{n={...xm,...n};const r=Symbol("ProxyTarget"),{equals:i,isShallow:o,ignoreDetached:s,details:a}=n,l=new vm(i),u=typeof n.onValidate=="function",f=new Xn(u),d=(m,_,x,p,b)=>!u||f.isCloning||n.onValidate(Mt.concat(l.getPath(m),_),x,p,b)===!0,h=(m,_,x,p)=>{!hu(l,n,_)&&!(s&&l.isDetached(m,t))&&v(l.getPath(m),_,x,p)},v=(m,_,x,p,b)=>{f.isCloning&&f.isPartOfClone(m)?f.update(m,_,p):e(Mt.concat(m,_),x,p,b)},y=m=>m&&(m[r]??m),g=(m,_,x,p)=>{if(hm(m)||x==="constructor"||o&&!Xn.isHandledMethod(_,x)||hu(l,n,x)||l.isGetInvariant(_,x)||s&&l.isDetached(_,t))return m;p===void 0&&(p=l.getPath(_));const b=Mt.concat(p,x),E=l.getPath(m);return E&&w(b,E)?l.getProxy(m,E,C,r):l.getProxy(m,b,C,r)},w=(m,_)=>{if(ss(m)||m.length<=_.length||mt(_)&&_.length===0)return!1;const x=mt(m)?m:m.split(On),p=mt(_)?_:_.split(On);return x.length<=p.length?!1:!p.some((b,E)=>b!==x[E])},C={get(m,_,x){if(ss(_)){if(_===r||_===Tl)return m;if(_===bd&&!l.isUnsubscribed&&l.getPath(m).length===0)return l.unsubscribe(),m}const p=ka(m)?Reflect.get(m,_):Reflect.get(m,_,x);return g(p,m,_)},set(m,_,x,p){x=y(x);const b=m[r]??m,E=b[_];if(i(E,x)&&_ in m)return!0;const P=d(m,_,x,E);return P&&l.setProperty(b,_,x,p,E)?(h(m,_,m[_],E),!0):!P},defineProperty(m,_,x){if(!l.isSameDescriptor(x,m,_)){const p=m[_];d(m,_,x.value,p)&&l.defineProperty(m,_,x,p)&&h(m,_,x.value,p)}return!0},deleteProperty(m,_){if(!Reflect.has(m,_))return!0;const x=Reflect.get(m,_),p=d(m,_,void 0,x);return p&&l.deleteProperty(m,_,x)?(h(m,_,void 0,x),!0):!p},apply(m,_,x){const p=_[r]??_;if(l.isUnsubscribed)return Reflect.apply(m,p,x);if((a===!1||a!==!0&&!a.includes(m.name))&&Xn.isHandledType(p)){let b=Mt.initial(l.getPath(m));const E=Xn.isHandledMethod(p,m.name);f.start(p,b,x);let P=Reflect.apply(m,f.preferredThisArg(m,_,p),E?x.map(M=>y(M)):x);const O=f.isChanged(p,i),T=f.stop();if(Xn.isHandledType(P)&&E&&(_ instanceof Map&&m.name==="get"&&(b=Mt.concat(b,x[0])),P=l.getProxy(P,b,C)),O){const M={name:m.name,args:x,result:P},R=f.isCloning?Mt.initial(b):b,A=f.isCloning?Mt.last(b):"";d(Mt.get(t,R),A,p,T,M)?v(R,A,p,T,M):f.undo(p)}return(_ instanceof Map||_ instanceof Set)&&pm(P)?gm(P,m,_,b,g):P}return Reflect.apply(m,_,x)}},L=l.getProxy(t,n.pathAsArray?[]:"",C);return e=e.bind(L),u&&(n.onValidate=n.onValidate.bind(L)),L};Oi.target=t=>(t==null?void 0:t[Tl])??t;Oi.unsubscribe=t=>(t==null?void 0:t[bd])??t;const _m=t=>{const e=t??window.OMNIC_WIDGET_LOCATIONS_CONFIG,[n,r]=c.useState({...Jn,...e,map:{...Jn.map,...e==null?void 0:e.map},palette:{...Jn.palette,...e==null?void 0:e.palette}}),i=t&&!window.OMNIC_WIDGET_LOCATIONS_CONFIG,o=!t&&window.OMNIC_WIDGET_LOCATIONS_CONFIG;return c.useEffect(()=>{if(!i)return;const s={...Jn,...t,map:{...Jn.map,...t.map},palette:{...Jn.palette,...t.palette}};console.debug("[OmnicLocationsWidget::reactConfig]",s),r(s)},[t,i]),c.useEffect(()=>{if(o)return console.debug("[OmnicLocationsWidget::windowConfig]",n),window.OMNIC_WIDGET_LOCATIONS_CONFIG=Oi(window.OMNIC_WIDGET_LOCATIONS_CONFIG,function(){const s={...n,...Oi.target(this)};s.map&&(s.map={...s.map}),s.palette&&(s.palette={...s.palette}),console.debug("[OmnicLocationsWidget::changeWindowConfig]",s),r({...s})}),()=>{window.OMNIC_WIDGET_LOCATIONS_CONFIG&&Oi.unsubscribe(window.OMNIC_WIDGET_LOCATIONS_CONFIG)}},[n,o]),n},Mm=(t,e)=>{console.debug("[OmnicWidgetLocations::axios]",{INN:t,options:e}),Vi.defaults.headers.get.Authorization=`INN ${t}`,e!=null&&e.baseURL&&(Vi.defaults.baseURL=e.baseURL)};var _d={exports:{}};/*!
|
|
24
24
|
Copyright (c) 2018 Jed Watson.
|
|
25
25
|
Licensed under the MIT License (MIT), see
|
|
26
26
|
http://jedwatson.github.io/classnames
|
|
27
|
-
*/(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var o="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(o=i(o,r(a)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var a in o)e.call(o,a)&&o[a]&&(s=i(s,a));return s}function i(o,s){return s?o?o+" "+s:o+s:o}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(_d);var Om=_d.exports;const Se=bl(Om),Pm={place:null,mapKey:""},Md=t=>t.place,km=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"))},qt=bn((t,e)=>({...Pm,setMapKey(n){t({mapKey:n})},async setPlace(n,r,i){var l,u,f,d,h,v;const{map:o}=be.getState();let s;if(console.debug("[OmnicWidgetLocations::setDeliveryAdressPlace]",{value:n,types:r}),Ma(n)){const y=await Oa(n,e().mapKey,r);s=(l=y==null?void 0:y.results)==null?void 0:l[0],i&&(s=(u=y==null?void 0:y.results)==null?void 0:u.find(g=>{var w;return(w=g.types)==null?void 0:w.includes(i)}))}else s=n;yn(s,"Place is not defined");let a;if(s!=null&&s.place_id){const{results:y}=await Oa(s.place_id,e().mapKey);a=(d=(f=y==null?void 0:y[0])==null?void 0:f.geometry)==null?void 0:d.viewport}else(h=s==null?void 0:s.geometry)!=null&&h.viewport?a=s.geometry.viewport:(v=s==null?void 0:s.geometry)!=null&&v.location&&(a=new google.maps.LatLngBounds,a.extend(s.geometry.location));return a&&(console.debug("[OmnicWidgetLocations::fitMapBounds]",a.toJSON()),o==null||o.fitBounds(a)),t({place:s}),s},async setPlaceAndPoint(n,r){var u;const i=r==null?void 0:r.types,o=Ma(n)?await e().setPlace(n,i):await e().setPlace(n),s=(u=o.geometry)==null?void 0:u.location;yn(s,"Location is not defined");const a=[s.lat(),s.lng()],l={address:o.formatted_address,coords:a};return r!=null&&r.ignoreSelection||Ot.getState().setDeliverPoint(l),o}})),Tm={lmsData:null,isLoading:!1},Ts=bn()(t=>({...Tm,setLMSData:e=>t({lmsData:e}),setLoading:e=>t({isLoading:e})})),Od=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:26,height:8,fill:"none",viewBox:"0 0 26 8",...t},U.createElement("g",{fill:"#000"},U.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"}))),Pd=t=>U.createElement("svg",{width:48,height:48,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},U.createElement("rect",{width:48,height:48,fill:"#6A4A9D"}),U.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 Rm(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 Rs(t){return!!(t&&typeof t.then=="function")}function Zo(t,e){return Rs(t)?Promise.resolve(t).then(e):e(t)}function Zs(t,e,n){function r(i){const o=e(i);throw t.emit(o),console.error(o),o}try{const i=n();return Rs(i)?i.catch(r):i}catch(i){r(i)}}function vu(t){const e=(Array.isArray(t)?t:[t]).map(o=>`'${o}'`),n=e.slice(-2).join(" or ");return`Tolgee: You need to specify ${[...e.slice(0,-2),n].join(", ")} option`}function Dm(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 jt(t){return kd(t)||[]}function Am(t,e){return Dm(e)?jt(e==null?void 0:e[t]):jt(e)}function Ta(t){return Array.from(new Set(t))}function Td(t){return t&&t.replace(/\/+$/,"")}function Im(t){if(typeof t=="string")return t;if(typeof(t==null?void 0:t.message)=="string")return t.message}const jm=(t,e)=>fetch(t,e),Rd=(t=jm)=>(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 dn(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 Nm(t,e,n){const r=new Set,i=new Set;function o(l){const u=new Set(e());i.forEach(f=>{(l===void 0||(l==null?void 0:l.findIndex(h=>u.has(h)||f.namespaces.has(h)))!==-1)&&f.fn({value:void 0})})}let s=[];function a(){if(s.length===0)return;const l=s;s=[],r.forEach(d=>{d({value:void 0})});let u=new Set;l.forEach(d=>{d===void 0?u=void 0:u!==void 0&&d.forEach(h=>u.add(h))});const f=u?Array.from(u.keys()):void 0;o(f)}return Object.freeze({emit(l,u){t()&&(s.push(l),u?setTimeout(a,0):a())},listen(l){return r.add(l),{unsubscribe:()=>{r.delete(l)}}},listenSome(l){const u={fn:d=>{l(d)},namespaces:new Set};i.add(u);const f={unsubscribe:()=>{i.delete(u)},subscribeNs:d=>(jt(d).forEach(h=>u.namespaces.add(h)),d===void 0&&u.namespaces.add(n()),f)};return f}})}function Bm(t,e){let n=!0;function r(){return n}const i=Object.freeze({onPendingLanguageChange:dn(r),onLanguageChange:dn(r),onLoadingChange:dn(r),onFetchingChange:dn(r),onInitialLoaded:dn(r),onRunningChange:dn(r),onCacheChange:dn(r),onUpdate:Nm(r,t,e),onPermanentChange:dn(r),onError:dn(r),setEmitterActive(o){n=o},on:(o,s)=>{switch(o){case"pendingLanguage":return i.onPendingLanguageChange.listen(s);case"language":return i.onLanguageChange.listen(s);case"loading":return i.onLoadingChange.listen(s);case"fetching":return i.onFetchingChange.listen(s);case"initialLoad":return i.onInitialLoaded.listen(s);case"running":return i.onRunningChange.listen(s);case"cache":return i.onCacheChange.listen(s);case"update":return i.onUpdate.listen(s);case"permanentChange":return i.onPermanentChange.listen(s);case"error":return i.onError.listen(s)}}});return i.onInitialLoaded.listen(()=>i.onUpdate.emit()),i.onLanguageChange.listen(()=>i.onUpdate.emit()),i.onCacheChange.listen(({value:o})=>i.onUpdate.emit([o.namespace],!0)),i}class mu extends Error{constructor(e,n,r=!1){const{language:i,namespace:o}=e;super(`Tolgee: Failed to fetch record for "${i}"${o&&` and "${o}"`}`),this.cause=n,this.isDev=r,this.name="RecordFetchError",this.language=i,this.namespace=o}}class Fm extends Error{constructor(e,n){super(e),this.cause=n,this.name="LanguageDetectorError"}}class yu extends Error{constructor(e,n){super(e),this.cause=n,this.name="LanguageStorageError"}}const Dd=t=>{const e=new Map;return Object.entries(t).forEach(([n,r])=>{if(r!=null){if(typeof r=="object"){Dd(r).forEach((i,o)=>{e.set(n+"."+o,i)});return}e.set(n,r)}}),e},wi=t=>{const[e,...n]=t.split(":"),r=n.join(":");return{language:e,namespace:r||""}},hn=({language:t,namespace:e})=>e?`${t}:${e}`:t;function Um(t,e,n,r,i,o,s){const a=new Map,l=new Map;let u={},f=0;function d(g,w,C){const L=hn(g);l.set(L,{data:Dd(w),version:C}),t.onCacheChange.emit(g)}function h(g){let w;if(!w){const C=u[hn(g)];typeof C=="function"&&(w=C())}return w||(w=e(g)),Rs(w)?w==null?void 0:w.catch(C=>{const L=new mu(g,C);throw t.onError.emit(L),console.error(L),L}):w}function v(g,w){var C;let L;return w&&(L=(C=n(g))===null||C===void 0?void 0:C.catch(m=>{const _=new mu(g,m,!0);return t.onError.emit(_),console.warn(_),h(g)})),L||(L=h(g)),L}const y=Object.freeze({addStaticData(g){g&&(u=Object.assign(Object.assign({},u),g),Object.entries(g).forEach(([w,C])=>{if(typeof C!="function"){const L=wi(w),m=l.get(w);(!m||m.version===0)&&d(L,C,0)}}))},invalidate(){a.clear(),f+=1},addRecord(g,w){d(g,w,f)},exists(g,w=!1){const C=l.get(hn(g));return C&&w?C.version===f:!!C},getRecord(g){var w;return(w=l.get(hn(r(g))))===null||w===void 0?void 0:w.data},getTranslation(g,w){var C;return(C=l.get(hn(g)))===null||C===void 0?void 0:C.data.get(w)},getTranslationNs(g,w,C){var L;for(const m of g)for(const _ of w){const E=(L=l.get(hn({language:_,namespace:m})))===null||L===void 0?void 0:L.data.get(C);if(E!=null)return[m]}return Ta(g)},getTranslationFallback(g,w,C){var L;for(const m of g)for(const _ of w){const E=(L=l.get(hn({language:_,namespace:m})))===null||L===void 0?void 0:L.data.get(C);if(E!=null)return E}},changeTranslation(g,w,C){var L;const m=(L=l.get(hn(g)))===null||L===void 0?void 0:L.data;m==null||m.set(w,C),t.onCacheChange.emit(Object.assign(Object.assign({},g),{key:w}))},isFetching(g){if(i())return!0;if(g===void 0)return a.size>0;const w=jt(g);return!!Array.from(a.keys()).find(C=>w.includes(wi(C).namespace))},isLoading(g,w){const C=jt(w);return!!(i()||Array.from(a.keys()).find(L=>{const m=wi(L);return(!C.length||C.includes(m.namespace))&&!y.exists({namespace:m.namespace,language:g})}))},async loadRecords(g,w){const C=g.map(m=>{const _=r(m),E=hn(_),p=a.get(E);if(p)return{new:!1,promise:p,keyObject:_,cacheKey:E};const b=v(_,w)||Promise.resolve(void 0);return a.set(E,b),{new:!0,promise:b,keyObject:_,cacheKey:E}});o.notify(),s.notify();const L=await Promise.all(C.map(m=>m.promise));return C.forEach((m,_)=>{const E=a.get(m.cacheKey)!==m.promise;if(m.new&&!E){a.delete(m.cacheKey);const p=L[_];p?y.addRecord(m.keyObject,p):y.getRecord(m.keyObject)||y.addRecord(m.keyObject,{})}}),o.notify(),s.notify(),C.map(m=>y.getRecord(m.keyObject))},getAllRecords(){return Array.from(l.entries()).map(([w,C])=>Object.assign(Object.assign({},wi(w)),{data:C.data}))}});return y}function Ad(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 Vm={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},Ra="invalid",zm="https://app.tolgee.io",Hm=({key:t})=>t,$m={defaultNs:"",observerOptions:Vm,observerType:"invisible",onFormatError:Ra,apiUrl:zm,fetch:Rd(),onTranslationMissing:Hm},Da=(...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 bu(t,e){const n=Da($m,e==null?void 0:e.initialOptions,t);return n.apiUrl=Td(n.apiUrl),t!=null&&t.fetch&&(n.fetch=Rd(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 Wm(t,e,n,r,i,o,s,a){const l={ui:void 0},u={formatters:[],finalFormatter:void 0,observer:void 0,devBackend:void 0,backends:[],ui:void 0,languageDetector:void 0,languageStorage:void 0},f=async({keysAndDefaults:P,event:R})=>{var I;const B=P.map(({key:V,ns:N,defaultValue:z})=>({key:V,defaultValue:z,fallbackNamespaces:r(N),namespace:i({key:V,ns:N})[0],translation:o({key:V,ns:N})}));(I=u.ui)===null||I===void 0||I.handleElementClick(B,R)},d=(P,R)=>{var I;return((I=u.observer)===null||I===void 0?void 0:I.findPositions(P,R))||[]};function h(P){const R=o({key:P.key,ns:P.ns});return T.formatTranslation(Object.assign(Object.assign({},P),{translation:R,formatEnabled:!0}))}function v(){return{fetch:e().fetch}}function y(P){u.observer=P==null?void 0:P()}function g(){return!!u.observer}function w(P){P&&u.formatters.push(P)}function C(P){u.finalFormatter=P}function L(P){l.ui=P}function m(){return!!l.ui}function _(P){u.languageStorage=P}function E(P){u.languageDetector=P}function p(){return Zs(a.onError,P=>new yu("Tolgee: Failed to load language",P),()=>{var P;return(P=u.languageStorage)===null||P===void 0?void 0:P.getLanguage(v())})}function b(){if(!u.languageDetector)return;const P=n();return Zs(a.onError,R=>new Fm("Tolgee: Failed to detect language",R),()=>{var R;return(R=u.languageDetector)===null||R===void 0?void 0:R.getLanguage(Object.assign({availableLanguages:P},v()))})}function x(P){P&&u.backends.push(P)}function M(P){u.devBackend=P}function O(P,R){const I=Object.freeze({setFinalFormatter:C,addFormatter:w,setObserver:y,hasObserver:g,setUi:L,hasUi:m,setDevBackend:M,addBackend:x,setLanguageDetector:E,setLanguageStorage:_});R(P,I)}const T=Object.freeze({addPlugin:O,run(){var P,R;const{apiKey:I,apiUrl:B,projectId:V,observerOptions:N}=e();u.ui=(P=l.ui)===null||P===void 0?void 0:P.call(l,{apiKey:I,apiUrl:B,projectId:V,highlight:T.highlight,changeTranslation:s,findPositions:d,onPermanentChange:z=>a.onPermanentChange.emit(z)}),(R=u.observer)===null||R===void 0||R.run({mouseHighlight:!0,options:N,translate:h,onClick:f})},stop(){var P;u.ui=void 0,(P=u.observer)===null||P===void 0||P.stop()},getLanguageStorage(){return u.languageStorage},getInitialLanguage(){const P=n(),R=p();return Zo(R,I=>(!P||P.includes(I))&&I?I:b())},setStoredLanguage(P){return Zs(a.onError,R=>new yu("Tolgee: Failed to store language",R),()=>{var R;return(R=u.languageStorage)===null||R===void 0?void 0:R.setLanguage(P,v())})},getDevBackend(){return u.devBackend},getBackendRecord:({language:P,namespace:R})=>{for(const I of u.backends){const B=I.getRecord(Object.assign({language:P,namespace:R},v()));if(B!==void 0)return B}},getBackendDevRecord:({language:P,namespace:R})=>{var I;const{apiKey:B,apiUrl:V,projectId:N}=e();return(I=u.devBackend)===null||I===void 0?void 0:I.getRecord(Object.assign({apiKey:B,apiUrl:V,projectId:N,language:P,namespace:R},v()))},getLanguageDetector(){return u.languageDetector},retranslate(){var P;(P=u.observer)===null||P===void 0||P.retranslate()},highlight:(P,R)=>{var I,B;return((B=(I=u.observer)===null||I===void 0?void 0:I.highlight)===null||B===void 0?void 0:B.call(I,P,R))||{unhighlight(){}}},unwrap(P){var R;return u.observer?(R=u.observer)===null||R===void 0?void 0:R.unwrap(P):{text:P,keys:[]}},wrap(P){var R;return u.observer?(R=u.observer)===null||R===void 0?void 0:R.wrap(P):P.translation},hasDevBackend(){return!!T.getDevBackend()},formatTranslation(P){var R,{formatEnabled:I}=P,B=Ad(P,["formatEnabled"]);const{key:V,translation:N,defaultValue:z,noWrap:Y,params:G,ns:H,orEmpty:Q}=B,oe=N??z;let te="";N==null&&(te=e().onTranslationMissing(B));let ee=oe??(Q?"":te);const D=t(),pe=I||!(!((R=u.observer)===null||R===void 0)&&R.outputNotFormattable),Pe=Z=>u.observer&&!Y?u.observer.wrap({key:V,translation:Z,defaultValue:z,params:G,ns:H}):Z;ee=Pe(ee);try{if(oe&&D&&pe)for(const Z of u.formatters)ee=Z.format({translation:ee,language:D,params:G});u.finalFormatter&&oe&&D&&pe&&(ee=u.finalFormatter.format({translation:ee,language:D,params:G}))}catch(Z){console.error(Z);const De=Im(Z)||Ra,Ae=e().onFormatError,ue=typeof Ae;ue==="string"?ee=Ae:ue==="function"?ee=Ae(De,B):ee=Ra,ee=Pe(ee)}return ee}});return T}const Cu=(t,e,n)=>{let r=t;return Object.freeze({init(i){r=i},notify(){const i=e();r!==i&&n(i),r=i}})};function Gm(t,e,n){let r=bu(),i;const o=Object.freeze({init(s){r=bu(s,r)},isRunning(){return r.isRunning},setRunning(s){r.isRunning!==s&&(r.isRunning=s,n.emit(s))},isInitialLoading(){return r.isInitialLoading},setInitialLoading(s){r.isInitialLoading=s},getLanguage(){return r.language||r.initialOptions.language},setLanguage(s){r.language!==s&&(r.language=s,t.emit(s))},getPendingLanguage(){return r.pendingLanguage||o.getLanguage()},setPendingLanguage(s){r.pendingLanguage!==s&&(r.pendingLanguage=s,e.emit(s))},getInitialOptions(){return Object.assign(Object.assign({},r.initialOptions),i)},addActiveNs(s){jt(s).forEach(l=>{const u=r.activeNamespaces.get(l);u!==void 0?r.activeNamespaces.set(l,u+1):r.activeNamespaces.set(l,1)})},removeActiveNs(s){jt(s).forEach(l=>{const u=r.activeNamespaces.get(l);u!==void 0&&u>1?r.activeNamespaces.set(l,u-1):r.activeNamespaces.delete(l)})},getRequiredNamespaces(){return Ta([...r.initialOptions.ns||[r.initialOptions.defaultNs],...jt(r.initialOptions.fallbackNs),...r.activeNamespaces.keys()])},getFallbackLangs(s){const a=s||o.getLanguage();return a?Ta([a,...Am(a,r.initialOptions.fallbackLanguage)]):[]},getFallbackNs(){return jt(r.initialOptions.fallbackNs)},getDefaultNs(s){return s===void 0?r.initialOptions.defaultNs:s},getAvailableLanguages(){if(r.initialOptions.availableLanguages)return r.initialOptions.availableLanguages;if(r.initialOptions.staticData){const s=Object.keys(r.initialOptions.staticData).map(a=>wi(a).language);return Array.from(new Set(s))}},withDefaultNs(s){return{namespace:s.namespace===void 0?o.getInitialOptions().defaultNs:s.namespace,language:s.language}},overrideCredentials(s){s?i=Object.assign(Object.assign({},s),{apiUrl:Td(s.apiUrl)}):i=void 0}});return o}function Zm(t){var{ns:e,noWrap:n,orEmpty:r,params:i,language:o}=t,s=Ad(t,["ns","noWrap","orEmpty","params","language"]);return Object.assign(Object.assign({},{ns:e,noWrap:n,orEmpty:r,language:o}),{params:Object.assign({},s)})}const Id=(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({},Zm(r)),n)),n};function qm({options:t}){const e=Bm(l,u),n=Cu(!1,()=>s.isFetching(),e.onFetchingChange.emit),r=Cu(!1,()=>E.isLoading(),e.onLoadingChange.emit),i=Gm(e.onLanguageChange,e.onPendingLanguageChange,e.onRunningChange),o=Wm(i.getLanguage,i.getInitialOptions,i.getAvailableLanguages,f,w,C,h,e),s=Um(e,o.getBackendRecord,o.getBackendDevRecord,i.withDefaultNs,i.isInitialLoading,n,r);t&&v(t);let a;e.onUpdate.listen(()=>{i.isRunning()&&o.retranslate()});function l(){return i.getFallbackNs()}function u(p){return i.getDefaultNs(p)}function f(p){return[...jt(u(p)),...l()]}function d(p){return[...jt(p??u()),...i.getRequiredNamespaces()]}function h(p,b,x){const M=i.withDefaultNs(p),O=s.getTranslation(M,b);return s.changeTranslation(M,b,x),{revert(){s.changeTranslation(M,b,O)}}}function v(p){i.init(p),s.addStaticData(i.getInitialOptions().staticData)}function y(p,b){const x=i.getFallbackLangs(p),M=d(b),O=[];return x.forEach(T=>{M.forEach(P=>{s.exists({language:T,namespace:P},!0)||O.push({language:T,namespace:P})})}),O}function g(p,b){const x=y(p,b);if(x.length)return Zo(E.loadRecords(x),()=>{})}function w({key:p,ns:b}){const x=i.getFallbackLangs(),M=f(b??void 0);return s.getTranslationNs(M,x,p)}function C({key:p,ns:b,language:x}){const M=f(b??void 0),O=i.getFallbackLangs(x);return s.getTranslationFallback(M,O,p)}function L(){const p=Zo(m(),()=>g());if(Rs(p))return i.setInitialLoading(!0),n.notify(),r.notify(),Promise.resolve(p).then(()=>{i.setInitialLoading(!1),n.notify(),r.notify(),e.onInitialLoaded.emit()});e.onInitialLoaded.emit()}function m(){if(i.getLanguage())return;const b=o.getInitialLanguage();return Zo(b,x=>{const M=x||i.getInitialOptions().defaultLanguage;M&&i.setLanguage(M)})}function _(){if((o.getLanguageDetector()||o.getLanguageStorage())&&!i.getAvailableLanguages())throw new Error(vu("availableLanguages"));if(!i.getLanguage()&&!i.getInitialOptions().defaultLanguage)throw new Error(vu(["defaultLanguage","language"]))}const E=Object.freeze(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),i),o),s),{init:v,getTranslation:C,changeTranslation:h,getTranslationNs:w,getDefaultAndFallbackNs:f,async changeLanguage(p){i.getPendingLanguage()===p&&i.getLanguage()===p||(i.setPendingLanguage(p),i.isRunning()&&await g(p),p===i.getPendingLanguage()&&(i.setLanguage(p),await o.setStoredLanguage(p)))},async addActiveNs(p,b){b||i.addActiveNs(p),i.isRunning()&&await g(void 0,p)},loadRecords(p){return s.loadRecords(p,E.isDev())},async loadRecord(p){return(await E.loadRecords([p]))[0]},isLoading(p){return s.isLoading(i.getLanguage(),p)},isLoaded(p){const b=i.getLanguage();if(!b)return!1;const x=i.getFallbackLangs(b),M=d(p),O=[];return x.forEach(T=>{M.forEach(P=>{s.exists({language:T,namespace:P})||O.push({language:T,namespace:P})})}),O.length===0},t:(...p)=>{const b=Id(...p),x=C(b);return o.formatTranslation(Object.assign(Object.assign({},b),{translation:x}))},isDev(){return!!(i.getInitialOptions().apiKey&&i.getInitialOptions().apiUrl)},run(){return _(),i.isRunning()||(i.setRunning(!0),o.run(),a=L()),Promise.resolve(a)},stop(){i.isRunning()&&(o.stop(),i.setRunning(!1))}}));return E}function Km(t){const e=qm({options:t});e.isDev()&&e.invalidate();function n(i){const o=e.isRunning();o&&e.stop(),i(),e.isDev()&&e.invalidate(),o&&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 Qm=()=>{const t={plugins:[],options:{}},e=Object.freeze({use(n){return t.plugins.push(n),e},updateDefaults(n){return t.options=Da(t.options,n),e},init(n){const r=Km(Da(t.options,n));return t.plugins.forEach(r.addPlugin),r}});return e},jd=0,Aa=1,Jm=2;class Ym extends Error{constructor(e,n,r){let i;e===jd?i="Empty parameter":e===Aa?i="Unexpected character":i="Unexpected end",super(`Tolgee parser: ${i} at ${n} in "${r}"`),this.code=e,this.index=n}}function wu(t){return/\s/.test(t)}const En=0,Ia=1,qo=2,qs=3,Ks=4,Xm=new Set([qo,Ia,En]),ja="'",e0=new Set(["{","}",ja]),t0=t=>/[0-9a-zA-Z_]/.test(t);function n0(t){let e=En,n="",r="",i="";const o=[],s=[];let a=0;function l(h){throw new Ym(h,a,t)}const u=()=>{o.push(n),n=""},f=()=>{t0(i)||l(Aa),r+=i},d=()=>{r===""&&l(jd),s.push(r),r=""};for(a=0;a<t.length;a++)switch(i=t[a],e){case En:i===ja?(n+=i,e=Ia):i==="{"?(u(),e=qs):(n+=i,e=En);break;case Ia:e0.has(i)?(n=n.slice(0,-1)+i,e=qo):(n+=i,e=En);break;case qo:i===ja?e=En:(n+=i,e=qo);break;case qs:i==="}"?(d(),e=En):wu(i)?r!==""&&(d(),e=Ks):(f(),e=qs);break;case Ks:i=="}"?e=En:wu(i)?e=Ks:l(Aa)}return Xm.has(e)||l(Jm),u(),[o,s]}function r0(t,e){const[n,r]=n0(t),i=[n[0]];for(let o=1;o<n.length;o++){const s=e==null?void 0:e[r[o-1]];if(s===void 0)throw new Error(`Missing parameter "${r[o-1]}" in "${t}"`);i.push(String(s)),i.push(n[o])}return i.join("")}function i0(){return{format:({translation:t,params:e})=>r0(t,e)}}const o0=()=>(t,e)=>(e.setFinalFormatter(i0()),t);var Qs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Su={};(function(t){function e(C,L){var m;return C instanceof Buffer?m=C:m=Buffer.from(C.buffer,C.byteOffset,C.byteLength),m.toString(L)}var n=function(C){return Buffer.from(C)};function r(C){for(var L=0,m=Math.min(256*256,C.length+1),_=new Uint16Array(m),E=[],p=0;;){var b=L<C.length;if(!b||p>=m-1){var x=_.subarray(0,p),M=x;if(E.push(String.fromCharCode.apply(null,M)),!b)return E.join("");C=C.subarray(L),L=0,p=0}var O=C[L++];if(!(O&128))_[p++]=O;else if((O&224)===192){var T=C[L++]&63;_[p++]=(O&31)<<6|T}else if((O&240)===224){var T=C[L++]&63,P=C[L++]&63;_[p++]=(O&31)<<12|T<<6|P}else if((O&248)===240){var T=C[L++]&63,P=C[L++]&63,R=C[L++]&63,I=(O&7)<<18|T<<12|P<<6|R;I>65535&&(I-=65536,_[p++]=I>>>10&1023|55296,I=56320|I&1023),_[p++]=I}}}function i(C){for(var L=0,m=C.length,_=0,E=Math.max(32,m+(m>>>1)+7),p=new Uint8Array(E>>>3<<3);L<m;){var b=C.charCodeAt(L++);if(b>=55296&&b<=56319){if(L<m){var x=C.charCodeAt(L);(x&64512)===56320&&(++L,b=((b&1023)<<10)+(x&1023)+65536)}if(b>=55296&&b<=56319)continue}if(_+4>p.length){E+=8,E*=1+L/C.length*2,E=E>>>3<<3;var M=new Uint8Array(E);M.set(p),p=M}if(b&4294967168)if(!(b&4294965248))p[_++]=b>>>6&31|192;else if(!(b&4294901760))p[_++]=b>>>12&15|224,p[_++]=b>>>6&63|128;else if(!(b&4292870144))p[_++]=b>>>18&7|240,p[_++]=b>>>12&63|128,p[_++]=b>>>6&63|128;else continue;else{p[_++]=b;continue}p[_++]=b&63|128}return p.slice?p.slice(0,_):p.subarray(0,_)}var o="Failed to ",s=function(C,L,m){if(C)throw new Error("".concat(o).concat(L,": the '").concat(m,"' option is unsupported."))},a=typeof Buffer=="function"&&Buffer.from,l=a?n:i;function u(){this.encoding="utf-8"}u.prototype.encode=function(C,L){return s(L&&L.stream,"encode","stream"),l(C)};function f(C){var L;try{var m=new Blob([C],{type:"text/plain;charset=UTF-8"});L=URL.createObjectURL(m);var _=new XMLHttpRequest;return _.open("GET",L,!1),_.send(),_.responseText}finally{L&&URL.revokeObjectURL(L)}}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(C){try{return f(C)}catch{return r(C)}});var y="construct 'TextDecoder'",g="".concat(o," ").concat(y,": the ");function w(C,L){s(L&&L.fatal,y,"fatal"),C=C||"utf-8";var m;if(a?m=Buffer.isEncoding(C):m=h.indexOf(C.toLowerCase())!==-1,!m)throw new RangeError("".concat(g," encoding label provided ('").concat(C,"') is invalid."));this.encoding=C,this.fatal=!1,this.ignoreBOM=!1}w.prototype.decode=function(C,L){s(L&&L.stream,"decode","stream");var m;return C instanceof Uint8Array?m=C:C.buffer instanceof ArrayBuffer?m=new Uint8Array(C.buffer):m=new Uint8Array(C),v(m,this.encoding)},t.TextEncoder=t.TextEncoder||u,t.TextDecoder=t.TextDecoder||w})(typeof window<"u"?window:Qs);var s0=Rm({__proto__:null,default:Su},[Su]),Js;(Js=console.assert)===null||Js===void 0||Js.call(console,s0);const a0="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";function l0(t){const e=a0.indexOf(t);if(e===-1)throw new Error("Invalid character found: "+t);return e}function u0(t){const e=new Uint8Array(t),n=e.length;let r="",i=Math.pow(2,16)-1;for(let o=0;o<n;o+=i)o+i>n&&(i=n-o),r+=String.fromCharCode.apply(null,e.subarray(o,o+i));return r}function c0(t){t=t.toUpperCase();const e=t.length;let n=0,r=0,i=0;const o=new Uint8Array(e*5/8|0);for(let s=0;s<e;s++)r=r<<5|l0(t[s]),n+=5,n>=8&&(o[i++]=r>>>n-8&255,n-=8);return u0(o.buffer)}function f0(t){if(t)try{const[e,n]=t.split("_");if(e==="tgpak"){const[r]=c0(n).split("_");return Number(r)}}catch{console.warn("Tolgee: Api key can't be parsed")}}function d0(t){if(!t)return;const[e]=t.split("_");return e==="tgpak"?"tgpak":e==="tgpat"?"tgpat":"legacy"}function h0(){return{getRecord({apiUrl:t,apiKey:e,language:n,namespace:r,projectId:i,fetch:o}){var s;const a=(s=f0(e))!==null&&s!==void 0?s:i;let l=a!==void 0?`${t}/v2/projects/${a}/translations/${n}`:`${t}/v2/projects/translations/${n}`;if(r&&(l+=`?ns=${r}`),d0(e)==="tgpat"&&i===void 0)throw new Error("You need to specify 'projectId' when using PAT key");return o(l,{headers:{"X-API-Key":e||"","Content-Type":"application/json"}}).then(u=>{if(u.ok)return u.json().then(f=>f[n]);throw new Error(u.statusText)})}}}const p0=()=>(t,e)=>(e.setDevBackend(h0()),t);function g0(t,e){const n=r=>{var i,o;t.includes((i=r.data)===null||i===void 0?void 0:i.type)&&e((o=r.data)===null||o===void 0?void 0:o.data)};return window.addEventListener("message",n,!1),{unsubscribe(){window.removeEventListener("message",n)}}}function v0({message:t,recievingMessage:e,data:n,attempts:r=1,timeout:i=300}){let o=!1;const s=()=>new Promise((l,u)=>{const f=g0(e,h);window.postMessage({type:t,data:n},window.origin);const d=setTimeout(y,i);function h(g){clearTimeout(d),v(),l(g)}function v(){f.unsubscribe()}function y(){v(),u()}});return{cancel(){o=!0},promise:(async()=>{for(let l=0;l<r;l++){if(o)return new Promise(()=>{});try{return await s()}catch{continue}}if(!o)throw`Didn't recieve ${e.join(" or ")} in time.`;return new Promise(()=>{})})()}}function m0(){let t;async function e(n){t==null||t();const{cancel:r,promise:i}=v0({message:"TOLGEE_READY",recievingMessage:["TOLGEE_PLUGIN_READY","TOLGEE_PLUGIN_UPDATED"],data:n,attempts:4});return t=r,i}return{update:e}}const y0="tolgee-in-context-tools.umd.min.js",b0="@tolgee/in-context-tools",C0="InContextTools",w0="https://cdn.jsdelivr.net/npm";function S0(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 Ys=null;function L0(t){return Ys||(Ys=S0(`${w0}/@tolgee/web@${t}/dist/${y0}`).then(()=>window[b0][C0])),Ys}const Nd="__tolgee_apiKey",Bd="__tolgee_apiUrl";function Lu(){const t=sessionStorage.getItem(Nd)||void 0,e=sessionStorage.getItem(Bd)||void 0;if(!(!t||!e))return{apiKey:t,apiUrl:e}}function x0(){sessionStorage.removeItem(Nd),sessionStorage.removeItem(Bd)}function E0(t){document.readyState!=="loading"?Promise.resolve().then(()=>{t()}):document.addEventListener&&document.addEventListener("DOMContentLoaded",t)}let Fd=()=>t=>t;const _0=()=>{if(typeof window>"u")return!1;try{return typeof sessionStorage<"u"&&sessionStorage}catch(t){return console.error("sessionStorage not available",t),!1}};_0()&&(Fd=()=>t=>{const e=m0(),n=()=>({uiPresent:!0,uiVersion:void 0,mode:t.isDev()?"development":"production",config:{apiUrl:t.getInitialOptions().apiUrl||"",apiKey:t.getInitialOptions().apiKey||""}}),r=async()=>{const o=await L0("5.22.0");return s=>{const a=Lu();return s.addPlugin(o({credentials:a})),s}};return t.on("running",({value:o})=>{o&&E0(()=>{e.update(n()).catch(x0)})}),Lu()&&r().then(o=>{t.addPlugin(o)}).catch(o=>{console.error("Tolgee: Failed to load in-context tools"),console.error(o)}),t});function M0(){return Qm().use(Fd())}const O0={useSuspense:!0};let Xs;const Ud=()=>(Xs||(Xs=c.createContext(void 0)),Xs),P0=({tolgee:t,options:e,children:n,fallback:r})=>{const[i,o]=c.useState(!t.isLoaded());c.useEffect(()=>{t.run().catch(l=>{console.error(l)}).finally(()=>{o(!1)})},[t]);const s=Object.assign(Object.assign({},O0),e),a=Ud();return s.useSuspense?c.createElement(a.Provider,{value:{tolgee:t,options:s}},i?r:c.createElement(c.Suspense,{fallback:r||null},n)):c.createElement(a.Provider,{value:{tolgee:t,options:s}},i?r:n)};let k0;function T0(){return k0}const R0=()=>{const t=Ud(),e=c.useContext(t)||T0();if(!e)throw new Error("Couldn't find tolgee instance, did you forgot to use `TolgeeProvider`?");return e},D0=()=>{const[t,e]=c.useState(0),n=c.useCallback(()=>{e(r=>r+1)},[e]);return{instance:t,rerender:n}},Vd=(t,e)=>{const{tolgee:n,options:r}=R0(),i=kd(t),o=jt(i).join(":"),s=Object.assign(Object.assign({},r),e),{rerender:a,instance:l}=D0(),u=c.useRef(),f=c.useRef([]);f.current=[];const d=y=>{var g;f.current.push(y),(g=u.current)===null||g===void 0||g.subscribeNs(y)},h=n.isLoaded(i);c.useEffect(()=>{const y=n.onNsUpdate(a);return u.current=y,y.subscribeNs(i),f.current.forEach(g=>{y.subscribeNs(g)}),()=>{y.unsubscribe()}},[o,n]),c.useEffect(()=>(n.addActiveNs(i),()=>n.removeActiveNs(i)),[o,n]);const v=c.useCallback(y=>{var g;const w=(g=y.ns)!==null&&g!==void 0?g:i==null?void 0:i[0];return d(w),n.t(Object.assign(Object.assign({},y),{ns:w}))},[n,l]);if(s.useSuspense&&!h)throw n.addActiveNs(i,!0);return{t:v,isLoading:!h}},ln=(t,e)=>{const{t:n,isLoading:r}=Vd(t,e);return{t:c.useCallback((...o)=>{const s=Id(...o);return n(s)},[n]),isLoading:r}},A0=t=>{if(!t)return;const e={};return Object.entries(t||{}).forEach(([n,r])=>{if(typeof r=="function")e[n]=i=>r(Na(i));else if(c.isValidElement(r)){const i=r;e[n]=o=>i.props.children===void 0&&(o!=null&&o.length)?c.cloneElement(i,{},Na(o)):c.cloneElement(i)}else e[n]=r}),e},Na=t=>Array.isArray(t)?c.Children.toArray(t):t,I0=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=Na(t.t({key:e,params:A0(t.params),defaultValue:n,noWrap:t.noWrap,ns:t.ns,language:t.language}));return c.createElement(c.Fragment,null,r)},tr=t=>{const{t:e}=Vd();return c.createElement(I0,Object.assign({t:e},t))},j0="Spinner-module__loader__U4GVhD",N0={loader:j0},as=({className:t})=>S.jsx("div",{className:Se(N0.loader,t),children:"Loading..."}),B0="Button-module__root__8RX49h",F0="Button-module__primary__st6yY9",U0="Button-module__secondary__j-3rjz",V0="Button-module__loading__QfItr2",z0="Button-module__spinner__kVZYqS",di={root:B0,primary:F0,secondary:U0,loading:V0,spinner:z0},Bt=({children:t,className:e,loading:n,variant:r="primary",...i})=>{const o=[di.root,e,di[r],{[di.loading]:n}];if(i.as==="link"){const{as:s,disabled:a,...l}=i;return S.jsxs("a",{className:Se(o),...l,"data-disabled":a,children:[!n&&t,n&&S.jsx(as,{className:di.spinner})]})}if(i.as==="button"){const{as:s,...a}=i;return S.jsxs("button",{type:"button",className:Se(o),...a,children:[!n&&t,n&&S.jsx(as,{className:di.spinner})]})}yn(!1,"Invalid button type")};Bt.defaultProps={as:"button"};const H0=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},U.createElement("g",{clipPath:"url(#a)"},U.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"})),U.createElement("defs",null,U.createElement("clipPath",{id:"a"},U.createElement("path",{fill:"#fff",d:"M0 0h20v20H0z"})))),$0="CloseButton-module__root__2m1asd",W0="CloseButton-module__absolutePositionVariant__lGX4cQ",G0="CloseButton-module__relativePositionVariant__LqTTWf",xu={root:$0,absolutePositionVariant:W0,relativePositionVariant:G0},ri=({className:t,position:e="absolute",...n})=>S.jsx("div",{...n,className:Se(xu.root,t,xu[`${e}PositionVariant`]),children:S.jsx(H0,{})}),Z0=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:13,height:12,viewBox:"0 0 13 12",fill:"none",...t},U.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"})),q0="W3WLink-module__likeButton__RhAlpN",K0="W3WLink-module__title__eo6M7L",Eu={likeButton:q0,title:K0},Q0=()=>S.jsxs("a",{className:Eu.likeButton,title:"about what3words",href:"https://what3words.com/about",target:"_blank",rel:"noreferrer",children:[S.jsx("span",{className:Eu.title,children:"what3words"}),S.jsx(Z0,{})]}),J0=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,viewBox:"0 0 20 20",fill:"none",...t},U.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"})),Y0=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,viewBox:"0 0 20 20",fill:"none",...t},U.createElement("path",{d:"M20 0H0V20H20V0Z",fill:"black"}),U.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"}),U.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"}),U.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"})),X0="W3WLink-module__mainWrapper__BeGCpA",ey="W3WLink-module__link__yq50q-",_u={mainWrapper:X0,link:ey},zd=({what3words:t})=>{const{id:e,link:n}=t;return S.jsxs("div",{className:_u.mainWrapper,children:[S.jsx(Y0,{}),S.jsx("a",{className:_u.link,href:n,title:"w3w link",target:"_blank",rel:"noreferrer",children:e}),S.jsx(J0,{})]})},ty="LocationView-module__title__-wT0bl",ny="LocationView-module__logo__jDjNMt",ry="LocationView-module__header__K0gBYX",iy="LocationView-module__content__wtOPjm",oy="LocationView-module__section__2J1zAJ",sy="LocationView-module__w3wSection__PdU7j4",ay="LocationView-module__chips__ALwJDx",ly="LocationView-module__services__IgJ4ba",uy="LocationView-module__images__-wKmRM",cy="LocationView-module__image__T1E-gt",fy="LocationView-module__actions__NuafMj",dy="LocationView-module__actionsHidden__-vX5kK",hy="LocationView-module__submit__c-Hc8u",py="LocationView-module__scheduleItem__RhAgat",rt={title:ty,logo:ny,header:ry,content:iy,section:oy,w3wSection:sy,chips:ay,services:ly,images:uy,image:cy,actions:fy,actionsHidden:dy,submit:hy,scheduleItem:py},gy={default:Od,llama:Pd},vy=({classes:t,hideActions:e,location:n,onClose:r,onSubmit:i})=>{var h,v,y,g;const{t:o}=ln(["details_modal","common"]),{isLoading:s,lmsData:a}=Ts(),l=(h=a==null?void 0:a.location)==null?void 0:h.what3words,u=!!(l!=null&&l.id),{logo:f="default"}=Xe(),d=gy[f];return S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:Se(rt.header,t==null?void 0:t.header),children:[S.jsx(ri,{onClick:r}),S.jsxs("div",{className:rt.title,children:[S.jsx("div",{className:rt.logo,children:S.jsx(d,{})}),S.jsx("span",{children:n.name})]})]}),S.jsxs("div",{className:Se(rt.content,t==null?void 0:t.content),children:[S.jsxs("section",{className:rt.section,children:[S.jsxs("span",{children:[o("address"),":"]}),s?S.jsx(_t,{width:200}):S.jsx("p",{children:(v=n.location)==null?void 0:v.full_address})]}),s?S.jsx(_t,{}):u&&S.jsxs("section",{className:rt.w3wSection,children:[S.jsx(zd,{what3words:l}),S.jsx(Q0,{})]}),((y=n.schedule)==null?void 0:y.length)>0&&S.jsxs("section",{className:rt.section,children:[S.jsxs("span",{children:[o("schedule"),":"]}),s?S.jsx(_t,{width:200}):n.schedule.map((w,C)=>S.jsx("p",{className:rt.scheduleItem,children:w},C))]}),(n.pay_by_card||n.pay_by_card)&&S.jsxs("section",{className:rt.section,children:[S.jsxs("span",{children:[o("payment_method"),":"]}),s?S.jsx(_t,{width:300}):S.jsxs("div",{className:rt.chips,children:[n.pay_by_cash&&o("pay_by_cash"),n.pay_by_card&&n.pay_by_cash&&", ",n.pay_by_card&&o("pay_by_card")]})]}),S.jsxs("section",{className:rt.section,children:[S.jsxs("span",{children:[o("services"),":"]}),S.jsxs("div",{className:rt.services,children:[n.is_pickup&&(s?S.jsx(_t,{width:150}):S.jsx("p",{children:o("is_pickup")})),n.is_delivery&&(s?S.jsx(_t,{width:150}):S.jsx("p",{children:o("is_delivery")})),n.is_dressing_room&&(s?S.jsx(_t,{width:150}):S.jsx("p",{children:o("is_dressing_room")})),n.is_check_order&&(s?S.jsx(_t,{width:150}):S.jsx("p",{children:o("is_check_order")}))]})]}),S.jsxs("section",{className:rt.section,children:[S.jsxs("span",{children:[o("location"),":"]}),s?S.jsx(_t,{width:100}):S.jsx("p",{children:n.location_name})]}),((g=n.images)==null?void 0:g.length)>0&&S.jsx("section",{className:rt.images,children:n.images.map(w=>S.jsx("img",{src:w,alt:n.name,className:rt.image},w))})]}),S.jsx("div",{className:Se(rt.actions,{[rt.actionsHidden]:e}),children:S.jsx(Bt,{variant:"primary",className:rt.submit,disabled:s,onClick:i,children:o("choose",{ns:"common"})})})]})},Hd=c.memo(vy),Tl=({isSelectedPoint:t})=>{const e=be(wl),[n,r]=c.useState(!0);return c.useEffect(()=>{r(t?!e:!0)},[e,t]),n};var my=yy()?c.useLayoutEffect:c.useEffect;function yy(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function by(){var t=c.useState(Object.create(null)),e=t[1];return c.useCallback(function(){e(Object.create(null))},[])}var Cy=function(e){var n=e.children,r=e.type,i=r===void 0?"reach-portal":r,o=c.useRef(null),s=c.useRef(null),a=by();return my(function(){if(o.current){var l=o.current.ownerDocument;return s.current=l==null?void 0:l.createElement(i),l.body.appendChild(s.current),a(),function(){s.current&&s.current.ownerDocument&&s.current.ownerDocument.body.removeChild(s.current)}}},[i,a]),s.current?ti.createPortal(n,s.current):c.createElement("span",{ref:o})};/*! *****************************************************************************
|
|
27
|
+
*/(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var o="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(o=i(o,r(a)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var a in o)e.call(o,a)&&o[a]&&(s=i(s,a));return s}function i(o,s){return s?o?o+" "+s:o+s:o}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(_d);var Om=_d.exports;const Se=Cl(Om),Pm={place:null,mapKey:""},Md=t=>t.place,km=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"))},qt=bn((t,e)=>({...Pm,setMapKey(n){t({mapKey:n})},async setPlace(n,r,i){var l,u,f,d,h,v;const{map:o}=be.getState();let s;if(console.debug("[OmnicWidgetLocations::setDeliveryAdressPlace]",{value:n,types:r}),Oa(n)){const y=await Pa(n,e().mapKey,r);s=(l=y==null?void 0:y.results)==null?void 0:l[0],i&&(s=(u=y==null?void 0:y.results)==null?void 0:u.find(g=>{var w;return(w=g.types)==null?void 0:w.includes(i)}))}else s=n;yn(s,"Place is not defined");let a;if(s!=null&&s.place_id){const{results:y}=await Pa(s.place_id,e().mapKey);a=(d=(f=y==null?void 0:y[0])==null?void 0:f.geometry)==null?void 0:d.viewport}else(h=s==null?void 0:s.geometry)!=null&&h.viewport?a=s.geometry.viewport:(v=s==null?void 0:s.geometry)!=null&&v.location&&(a=new google.maps.LatLngBounds,a.extend(s.geometry.location));return a&&(console.debug("[OmnicWidgetLocations::fitMapBounds]",a.toJSON()),o==null||o.fitBounds(a)),t({place:s}),s},async setPlaceAndPoint(n,r){var u;const i=r==null?void 0:r.types,o=Oa(n)?await e().setPlace(n,i):await e().setPlace(n),s=(u=o.geometry)==null?void 0:u.location;yn(s,"Location is not defined");const a=[s.lat(),s.lng()],l={address:o.formatted_address,coords:a};return r!=null&&r.ignoreSelection||Ot.getState().setDeliverPoint(l),o}})),Tm={lmsData:null,isLoading:!1},Ts=bn()(t=>({...Tm,setLMSData:e=>t({lmsData:e}),setLoading:e=>t({isLoading:e})})),Od=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:26,height:8,fill:"none",viewBox:"0 0 26 8",...t},U.createElement("g",{fill:"#000"},U.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"}))),Pd=t=>U.createElement("svg",{width:48,height:48,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},U.createElement("rect",{width:48,height:48,fill:"#6A4A9D"}),U.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 Rm(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 Rs(t){return!!(t&&typeof t.then=="function")}function Zo(t,e){return Rs(t)?Promise.resolve(t).then(e):e(t)}function Zs(t,e,n){function r(i){const o=e(i);throw t.emit(o),console.error(o),o}try{const i=n();return Rs(i)?i.catch(r):i}catch(i){r(i)}}function mu(t){const e=(Array.isArray(t)?t:[t]).map(o=>`'${o}'`),n=e.slice(-2).join(" or ");return`Tolgee: You need to specify ${[...e.slice(0,-2),n].join(", ")} option`}function Dm(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 jt(t){return kd(t)||[]}function Am(t,e){return Dm(e)?jt(e==null?void 0:e[t]):jt(e)}function Ra(t){return Array.from(new Set(t))}function Td(t){return t&&t.replace(/\/+$/,"")}function Im(t){if(typeof t=="string")return t;if(typeof(t==null?void 0:t.message)=="string")return t.message}const jm=(t,e)=>fetch(t,e),Rd=(t=jm)=>(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 dn(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 Nm(t,e,n){const r=new Set,i=new Set;function o(l){const u=new Set(e());i.forEach(f=>{(l===void 0||(l==null?void 0:l.findIndex(h=>u.has(h)||f.namespaces.has(h)))!==-1)&&f.fn({value:void 0})})}let s=[];function a(){if(s.length===0)return;const l=s;s=[],r.forEach(d=>{d({value:void 0})});let u=new Set;l.forEach(d=>{d===void 0?u=void 0:u!==void 0&&d.forEach(h=>u.add(h))});const f=u?Array.from(u.keys()):void 0;o(f)}return Object.freeze({emit(l,u){t()&&(s.push(l),u?setTimeout(a,0):a())},listen(l){return r.add(l),{unsubscribe:()=>{r.delete(l)}}},listenSome(l){const u={fn:d=>{l(d)},namespaces:new Set};i.add(u);const f={unsubscribe:()=>{i.delete(u)},subscribeNs:d=>(jt(d).forEach(h=>u.namespaces.add(h)),d===void 0&&u.namespaces.add(n()),f)};return f}})}function Bm(t,e){let n=!0;function r(){return n}const i=Object.freeze({onPendingLanguageChange:dn(r),onLanguageChange:dn(r),onLoadingChange:dn(r),onFetchingChange:dn(r),onInitialLoaded:dn(r),onRunningChange:dn(r),onCacheChange:dn(r),onUpdate:Nm(r,t,e),onPermanentChange:dn(r),onError:dn(r),setEmitterActive(o){n=o},on:(o,s)=>{switch(o){case"pendingLanguage":return i.onPendingLanguageChange.listen(s);case"language":return i.onLanguageChange.listen(s);case"loading":return i.onLoadingChange.listen(s);case"fetching":return i.onFetchingChange.listen(s);case"initialLoad":return i.onInitialLoaded.listen(s);case"running":return i.onRunningChange.listen(s);case"cache":return i.onCacheChange.listen(s);case"update":return i.onUpdate.listen(s);case"permanentChange":return i.onPermanentChange.listen(s);case"error":return i.onError.listen(s)}}});return i.onInitialLoaded.listen(()=>i.onUpdate.emit()),i.onLanguageChange.listen(()=>i.onUpdate.emit()),i.onCacheChange.listen(({value:o})=>i.onUpdate.emit([o.namespace],!0)),i}class yu extends Error{constructor(e,n,r=!1){const{language:i,namespace:o}=e;super(`Tolgee: Failed to fetch record for "${i}"${o&&` and "${o}"`}`),this.cause=n,this.isDev=r,this.name="RecordFetchError",this.language=i,this.namespace=o}}class Fm extends Error{constructor(e,n){super(e),this.cause=n,this.name="LanguageDetectorError"}}class bu extends Error{constructor(e,n){super(e),this.cause=n,this.name="LanguageStorageError"}}const Dd=t=>{const e=new Map;return Object.entries(t).forEach(([n,r])=>{if(r!=null){if(typeof r=="object"){Dd(r).forEach((i,o)=>{e.set(n+"."+o,i)});return}e.set(n,r)}}),e},wi=t=>{const[e,...n]=t.split(":"),r=n.join(":");return{language:e,namespace:r||""}},hn=({language:t,namespace:e})=>e?`${t}:${e}`:t;function Um(t,e,n,r,i,o,s){const a=new Map,l=new Map;let u={},f=0;function d(g,w,C){const L=hn(g);l.set(L,{data:Dd(w),version:C}),t.onCacheChange.emit(g)}function h(g){let w;if(!w){const C=u[hn(g)];typeof C=="function"&&(w=C())}return w||(w=e(g)),Rs(w)?w==null?void 0:w.catch(C=>{const L=new yu(g,C);throw t.onError.emit(L),console.error(L),L}):w}function v(g,w){var C;let L;return w&&(L=(C=n(g))===null||C===void 0?void 0:C.catch(m=>{const _=new yu(g,m,!0);return t.onError.emit(_),console.warn(_),h(g)})),L||(L=h(g)),L}const y=Object.freeze({addStaticData(g){g&&(u=Object.assign(Object.assign({},u),g),Object.entries(g).forEach(([w,C])=>{if(typeof C!="function"){const L=wi(w),m=l.get(w);(!m||m.version===0)&&d(L,C,0)}}))},invalidate(){a.clear(),f+=1},addRecord(g,w){d(g,w,f)},exists(g,w=!1){const C=l.get(hn(g));return C&&w?C.version===f:!!C},getRecord(g){var w;return(w=l.get(hn(r(g))))===null||w===void 0?void 0:w.data},getTranslation(g,w){var C;return(C=l.get(hn(g)))===null||C===void 0?void 0:C.data.get(w)},getTranslationNs(g,w,C){var L;for(const m of g)for(const _ of w){const x=(L=l.get(hn({language:_,namespace:m})))===null||L===void 0?void 0:L.data.get(C);if(x!=null)return[m]}return Ra(g)},getTranslationFallback(g,w,C){var L;for(const m of g)for(const _ of w){const x=(L=l.get(hn({language:_,namespace:m})))===null||L===void 0?void 0:L.data.get(C);if(x!=null)return x}},changeTranslation(g,w,C){var L;const m=(L=l.get(hn(g)))===null||L===void 0?void 0:L.data;m==null||m.set(w,C),t.onCacheChange.emit(Object.assign(Object.assign({},g),{key:w}))},isFetching(g){if(i())return!0;if(g===void 0)return a.size>0;const w=jt(g);return!!Array.from(a.keys()).find(C=>w.includes(wi(C).namespace))},isLoading(g,w){const C=jt(w);return!!(i()||Array.from(a.keys()).find(L=>{const m=wi(L);return(!C.length||C.includes(m.namespace))&&!y.exists({namespace:m.namespace,language:g})}))},async loadRecords(g,w){const C=g.map(m=>{const _=r(m),x=hn(_),p=a.get(x);if(p)return{new:!1,promise:p,keyObject:_,cacheKey:x};const b=v(_,w)||Promise.resolve(void 0);return a.set(x,b),{new:!0,promise:b,keyObject:_,cacheKey:x}});o.notify(),s.notify();const L=await Promise.all(C.map(m=>m.promise));return C.forEach((m,_)=>{const x=a.get(m.cacheKey)!==m.promise;if(m.new&&!x){a.delete(m.cacheKey);const p=L[_];p?y.addRecord(m.keyObject,p):y.getRecord(m.keyObject)||y.addRecord(m.keyObject,{})}}),o.notify(),s.notify(),C.map(m=>y.getRecord(m.keyObject))},getAllRecords(){return Array.from(l.entries()).map(([w,C])=>Object.assign(Object.assign({},wi(w)),{data:C.data}))}});return y}function Ad(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 Vm={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},Da="invalid",zm="https://app.tolgee.io",Hm=({key:t})=>t,$m={defaultNs:"",observerOptions:Vm,observerType:"invisible",onFormatError:Da,apiUrl:zm,fetch:Rd(),onTranslationMissing:Hm},Aa=(...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 Cu(t,e){const n=Aa($m,e==null?void 0:e.initialOptions,t);return n.apiUrl=Td(n.apiUrl),t!=null&&t.fetch&&(n.fetch=Rd(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 Wm(t,e,n,r,i,o,s,a){const l={ui:void 0},u={formatters:[],finalFormatter:void 0,observer:void 0,devBackend:void 0,backends:[],ui:void 0,languageDetector:void 0,languageStorage:void 0},f=async({keysAndDefaults:M,event:R})=>{var A;const B=M.map(({key:V,ns:N,defaultValue:z})=>({key:V,defaultValue:z,fallbackNamespaces:r(N),namespace:i({key:V,ns:N})[0],translation:o({key:V,ns:N})}));(A=u.ui)===null||A===void 0||A.handleElementClick(B,R)},d=(M,R)=>{var A;return((A=u.observer)===null||A===void 0?void 0:A.findPositions(M,R))||[]};function h(M){const R=o({key:M.key,ns:M.ns});return T.formatTranslation(Object.assign(Object.assign({},M),{translation:R,formatEnabled:!0}))}function v(){return{fetch:e().fetch}}function y(M){u.observer=M==null?void 0:M()}function g(){return!!u.observer}function w(M){M&&u.formatters.push(M)}function C(M){u.finalFormatter=M}function L(M){l.ui=M}function m(){return!!l.ui}function _(M){u.languageStorage=M}function x(M){u.languageDetector=M}function p(){return Zs(a.onError,M=>new bu("Tolgee: Failed to load language",M),()=>{var M;return(M=u.languageStorage)===null||M===void 0?void 0:M.getLanguage(v())})}function b(){if(!u.languageDetector)return;const M=n();return Zs(a.onError,R=>new Fm("Tolgee: Failed to detect language",R),()=>{var R;return(R=u.languageDetector)===null||R===void 0?void 0:R.getLanguage(Object.assign({availableLanguages:M},v()))})}function E(M){M&&u.backends.push(M)}function P(M){u.devBackend=M}function O(M,R){const A=Object.freeze({setFinalFormatter:C,addFormatter:w,setObserver:y,hasObserver:g,setUi:L,hasUi:m,setDevBackend:P,addBackend:E,setLanguageDetector:x,setLanguageStorage:_});R(M,A)}const T=Object.freeze({addPlugin:O,run(){var M,R;const{apiKey:A,apiUrl:B,projectId:V,observerOptions:N}=e();u.ui=(M=l.ui)===null||M===void 0?void 0:M.call(l,{apiKey:A,apiUrl:B,projectId:V,highlight:T.highlight,changeTranslation:s,findPositions:d,onPermanentChange:z=>a.onPermanentChange.emit(z)}),(R=u.observer)===null||R===void 0||R.run({mouseHighlight:!0,options:N,translate:h,onClick:f})},stop(){var M;u.ui=void 0,(M=u.observer)===null||M===void 0||M.stop()},getLanguageStorage(){return u.languageStorage},getInitialLanguage(){const M=n(),R=p();return Zo(R,A=>(!M||M.includes(A))&&A?A:b())},setStoredLanguage(M){return Zs(a.onError,R=>new bu("Tolgee: Failed to store language",R),()=>{var R;return(R=u.languageStorage)===null||R===void 0?void 0:R.setLanguage(M,v())})},getDevBackend(){return u.devBackend},getBackendRecord:({language:M,namespace:R})=>{for(const A of u.backends){const B=A.getRecord(Object.assign({language:M,namespace:R},v()));if(B!==void 0)return B}},getBackendDevRecord:({language:M,namespace:R})=>{var A;const{apiKey:B,apiUrl:V,projectId:N}=e();return(A=u.devBackend)===null||A===void 0?void 0:A.getRecord(Object.assign({apiKey:B,apiUrl:V,projectId:N,language:M,namespace:R},v()))},getLanguageDetector(){return u.languageDetector},retranslate(){var M;(M=u.observer)===null||M===void 0||M.retranslate()},highlight:(M,R)=>{var A,B;return((B=(A=u.observer)===null||A===void 0?void 0:A.highlight)===null||B===void 0?void 0:B.call(A,M,R))||{unhighlight(){}}},unwrap(M){var R;return u.observer?(R=u.observer)===null||R===void 0?void 0:R.unwrap(M):{text:M,keys:[]}},wrap(M){var R;return u.observer?(R=u.observer)===null||R===void 0?void 0:R.wrap(M):M.translation},hasDevBackend(){return!!T.getDevBackend()},formatTranslation(M){var R,{formatEnabled:A}=M,B=Ad(M,["formatEnabled"]);const{key:V,translation:N,defaultValue:z,noWrap:Y,params:G,ns:H,orEmpty:Q}=B,oe=N??z;let te="";N==null&&(te=e().onTranslationMissing(B));let ee=oe??(Q?"":te);const D=t(),pe=A||!(!((R=u.observer)===null||R===void 0)&&R.outputNotFormattable),Pe=Z=>u.observer&&!Y?u.observer.wrap({key:V,translation:Z,defaultValue:z,params:G,ns:H}):Z;ee=Pe(ee);try{if(oe&&D&&pe)for(const Z of u.formatters)ee=Z.format({translation:ee,language:D,params:G});u.finalFormatter&&oe&&D&&pe&&(ee=u.finalFormatter.format({translation:ee,language:D,params:G}))}catch(Z){console.error(Z);const De=Im(Z)||Da,Ae=e().onFormatError,ue=typeof Ae;ue==="string"?ee=Ae:ue==="function"?ee=Ae(De,B):ee=Da,ee=Pe(ee)}return ee}});return T}const wu=(t,e,n)=>{let r=t;return Object.freeze({init(i){r=i},notify(){const i=e();r!==i&&n(i),r=i}})};function Gm(t,e,n){let r=Cu(),i;const o=Object.freeze({init(s){r=Cu(s,r)},isRunning(){return r.isRunning},setRunning(s){r.isRunning!==s&&(r.isRunning=s,n.emit(s))},isInitialLoading(){return r.isInitialLoading},setInitialLoading(s){r.isInitialLoading=s},getLanguage(){return r.language||r.initialOptions.language},setLanguage(s){r.language!==s&&(r.language=s,t.emit(s))},getPendingLanguage(){return r.pendingLanguage||o.getLanguage()},setPendingLanguage(s){r.pendingLanguage!==s&&(r.pendingLanguage=s,e.emit(s))},getInitialOptions(){return Object.assign(Object.assign({},r.initialOptions),i)},addActiveNs(s){jt(s).forEach(l=>{const u=r.activeNamespaces.get(l);u!==void 0?r.activeNamespaces.set(l,u+1):r.activeNamespaces.set(l,1)})},removeActiveNs(s){jt(s).forEach(l=>{const u=r.activeNamespaces.get(l);u!==void 0&&u>1?r.activeNamespaces.set(l,u-1):r.activeNamespaces.delete(l)})},getRequiredNamespaces(){return Ra([...r.initialOptions.ns||[r.initialOptions.defaultNs],...jt(r.initialOptions.fallbackNs),...r.activeNamespaces.keys()])},getFallbackLangs(s){const a=s||o.getLanguage();return a?Ra([a,...Am(a,r.initialOptions.fallbackLanguage)]):[]},getFallbackNs(){return jt(r.initialOptions.fallbackNs)},getDefaultNs(s){return s===void 0?r.initialOptions.defaultNs:s},getAvailableLanguages(){if(r.initialOptions.availableLanguages)return r.initialOptions.availableLanguages;if(r.initialOptions.staticData){const s=Object.keys(r.initialOptions.staticData).map(a=>wi(a).language);return Array.from(new Set(s))}},withDefaultNs(s){return{namespace:s.namespace===void 0?o.getInitialOptions().defaultNs:s.namespace,language:s.language}},overrideCredentials(s){s?i=Object.assign(Object.assign({},s),{apiUrl:Td(s.apiUrl)}):i=void 0}});return o}function Zm(t){var{ns:e,noWrap:n,orEmpty:r,params:i,language:o}=t,s=Ad(t,["ns","noWrap","orEmpty","params","language"]);return Object.assign(Object.assign({},{ns:e,noWrap:n,orEmpty:r,language:o}),{params:Object.assign({},s)})}const Id=(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({},Zm(r)),n)),n};function qm({options:t}){const e=Bm(l,u),n=wu(!1,()=>s.isFetching(),e.onFetchingChange.emit),r=wu(!1,()=>x.isLoading(),e.onLoadingChange.emit),i=Gm(e.onLanguageChange,e.onPendingLanguageChange,e.onRunningChange),o=Wm(i.getLanguage,i.getInitialOptions,i.getAvailableLanguages,f,w,C,h,e),s=Um(e,o.getBackendRecord,o.getBackendDevRecord,i.withDefaultNs,i.isInitialLoading,n,r);t&&v(t);let a;e.onUpdate.listen(()=>{i.isRunning()&&o.retranslate()});function l(){return i.getFallbackNs()}function u(p){return i.getDefaultNs(p)}function f(p){return[...jt(u(p)),...l()]}function d(p){return[...jt(p??u()),...i.getRequiredNamespaces()]}function h(p,b,E){const P=i.withDefaultNs(p),O=s.getTranslation(P,b);return s.changeTranslation(P,b,E),{revert(){s.changeTranslation(P,b,O)}}}function v(p){i.init(p),s.addStaticData(i.getInitialOptions().staticData)}function y(p,b){const E=i.getFallbackLangs(p),P=d(b),O=[];return E.forEach(T=>{P.forEach(M=>{s.exists({language:T,namespace:M},!0)||O.push({language:T,namespace:M})})}),O}function g(p,b){const E=y(p,b);if(E.length)return Zo(x.loadRecords(E),()=>{})}function w({key:p,ns:b}){const E=i.getFallbackLangs(),P=f(b??void 0);return s.getTranslationNs(P,E,p)}function C({key:p,ns:b,language:E}){const P=f(b??void 0),O=i.getFallbackLangs(E);return s.getTranslationFallback(P,O,p)}function L(){const p=Zo(m(),()=>g());if(Rs(p))return i.setInitialLoading(!0),n.notify(),r.notify(),Promise.resolve(p).then(()=>{i.setInitialLoading(!1),n.notify(),r.notify(),e.onInitialLoaded.emit()});e.onInitialLoaded.emit()}function m(){if(i.getLanguage())return;const b=o.getInitialLanguage();return Zo(b,E=>{const P=E||i.getInitialOptions().defaultLanguage;P&&i.setLanguage(P)})}function _(){if((o.getLanguageDetector()||o.getLanguageStorage())&&!i.getAvailableLanguages())throw new Error(mu("availableLanguages"));if(!i.getLanguage()&&!i.getInitialOptions().defaultLanguage)throw new Error(mu(["defaultLanguage","language"]))}const x=Object.freeze(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),i),o),s),{init:v,getTranslation:C,changeTranslation:h,getTranslationNs:w,getDefaultAndFallbackNs:f,async changeLanguage(p){i.getPendingLanguage()===p&&i.getLanguage()===p||(i.setPendingLanguage(p),i.isRunning()&&await g(p),p===i.getPendingLanguage()&&(i.setLanguage(p),await o.setStoredLanguage(p)))},async addActiveNs(p,b){b||i.addActiveNs(p),i.isRunning()&&await g(void 0,p)},loadRecords(p){return s.loadRecords(p,x.isDev())},async loadRecord(p){return(await x.loadRecords([p]))[0]},isLoading(p){return s.isLoading(i.getLanguage(),p)},isLoaded(p){const b=i.getLanguage();if(!b)return!1;const E=i.getFallbackLangs(b),P=d(p),O=[];return E.forEach(T=>{P.forEach(M=>{s.exists({language:T,namespace:M})||O.push({language:T,namespace:M})})}),O.length===0},t:(...p)=>{const b=Id(...p),E=C(b);return o.formatTranslation(Object.assign(Object.assign({},b),{translation:E}))},isDev(){return!!(i.getInitialOptions().apiKey&&i.getInitialOptions().apiUrl)},run(){return _(),i.isRunning()||(i.setRunning(!0),o.run(),a=L()),Promise.resolve(a)},stop(){i.isRunning()&&(o.stop(),i.setRunning(!1))}}));return x}function Km(t){const e=qm({options:t});e.isDev()&&e.invalidate();function n(i){const o=e.isRunning();o&&e.stop(),i(),e.isDev()&&e.invalidate(),o&&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 Qm=()=>{const t={plugins:[],options:{}},e=Object.freeze({use(n){return t.plugins.push(n),e},updateDefaults(n){return t.options=Aa(t.options,n),e},init(n){const r=Km(Aa(t.options,n));return t.plugins.forEach(r.addPlugin),r}});return e},jd=0,Ia=1,Jm=2;class Ym extends Error{constructor(e,n,r){let i;e===jd?i="Empty parameter":e===Ia?i="Unexpected character":i="Unexpected end",super(`Tolgee parser: ${i} at ${n} in "${r}"`),this.code=e,this.index=n}}function Su(t){return/\s/.test(t)}const xn=0,ja=1,qo=2,qs=3,Ks=4,Xm=new Set([qo,ja,xn]),Na="'",e0=new Set(["{","}",Na]),t0=t=>/[0-9a-zA-Z_]/.test(t);function n0(t){let e=xn,n="",r="",i="";const o=[],s=[];let a=0;function l(h){throw new Ym(h,a,t)}const u=()=>{o.push(n),n=""},f=()=>{t0(i)||l(Ia),r+=i},d=()=>{r===""&&l(jd),s.push(r),r=""};for(a=0;a<t.length;a++)switch(i=t[a],e){case xn:i===Na?(n+=i,e=ja):i==="{"?(u(),e=qs):(n+=i,e=xn);break;case ja:e0.has(i)?(n=n.slice(0,-1)+i,e=qo):(n+=i,e=xn);break;case qo:i===Na?e=xn:(n+=i,e=qo);break;case qs:i==="}"?(d(),e=xn):Su(i)?r!==""&&(d(),e=Ks):(f(),e=qs);break;case Ks:i=="}"?e=xn:Su(i)?e=Ks:l(Ia)}return Xm.has(e)||l(Jm),u(),[o,s]}function r0(t,e){const[n,r]=n0(t),i=[n[0]];for(let o=1;o<n.length;o++){const s=e==null?void 0:e[r[o-1]];if(s===void 0)throw new Error(`Missing parameter "${r[o-1]}" in "${t}"`);i.push(String(s)),i.push(n[o])}return i.join("")}function i0(){return{format:({translation:t,params:e})=>r0(t,e)}}const o0=()=>(t,e)=>(e.setFinalFormatter(i0()),t);var Qs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Lu={};(function(t){function e(C,L){var m;return C instanceof Buffer?m=C:m=Buffer.from(C.buffer,C.byteOffset,C.byteLength),m.toString(L)}var n=function(C){return Buffer.from(C)};function r(C){for(var L=0,m=Math.min(256*256,C.length+1),_=new Uint16Array(m),x=[],p=0;;){var b=L<C.length;if(!b||p>=m-1){var E=_.subarray(0,p),P=E;if(x.push(String.fromCharCode.apply(null,P)),!b)return x.join("");C=C.subarray(L),L=0,p=0}var O=C[L++];if(!(O&128))_[p++]=O;else if((O&224)===192){var T=C[L++]&63;_[p++]=(O&31)<<6|T}else if((O&240)===224){var T=C[L++]&63,M=C[L++]&63;_[p++]=(O&31)<<12|T<<6|M}else if((O&248)===240){var T=C[L++]&63,M=C[L++]&63,R=C[L++]&63,A=(O&7)<<18|T<<12|M<<6|R;A>65535&&(A-=65536,_[p++]=A>>>10&1023|55296,A=56320|A&1023),_[p++]=A}}}function i(C){for(var L=0,m=C.length,_=0,x=Math.max(32,m+(m>>>1)+7),p=new Uint8Array(x>>>3<<3);L<m;){var b=C.charCodeAt(L++);if(b>=55296&&b<=56319){if(L<m){var E=C.charCodeAt(L);(E&64512)===56320&&(++L,b=((b&1023)<<10)+(E&1023)+65536)}if(b>=55296&&b<=56319)continue}if(_+4>p.length){x+=8,x*=1+L/C.length*2,x=x>>>3<<3;var P=new Uint8Array(x);P.set(p),p=P}if(b&4294967168)if(!(b&4294965248))p[_++]=b>>>6&31|192;else if(!(b&4294901760))p[_++]=b>>>12&15|224,p[_++]=b>>>6&63|128;else if(!(b&4292870144))p[_++]=b>>>18&7|240,p[_++]=b>>>12&63|128,p[_++]=b>>>6&63|128;else continue;else{p[_++]=b;continue}p[_++]=b&63|128}return p.slice?p.slice(0,_):p.subarray(0,_)}var o="Failed to ",s=function(C,L,m){if(C)throw new Error("".concat(o).concat(L,": the '").concat(m,"' option is unsupported."))},a=typeof Buffer=="function"&&Buffer.from,l=a?n:i;function u(){this.encoding="utf-8"}u.prototype.encode=function(C,L){return s(L&&L.stream,"encode","stream"),l(C)};function f(C){var L;try{var m=new Blob([C],{type:"text/plain;charset=UTF-8"});L=URL.createObjectURL(m);var _=new XMLHttpRequest;return _.open("GET",L,!1),_.send(),_.responseText}finally{L&&URL.revokeObjectURL(L)}}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(C){try{return f(C)}catch{return r(C)}});var y="construct 'TextDecoder'",g="".concat(o," ").concat(y,": the ");function w(C,L){s(L&&L.fatal,y,"fatal"),C=C||"utf-8";var m;if(a?m=Buffer.isEncoding(C):m=h.indexOf(C.toLowerCase())!==-1,!m)throw new RangeError("".concat(g," encoding label provided ('").concat(C,"') is invalid."));this.encoding=C,this.fatal=!1,this.ignoreBOM=!1}w.prototype.decode=function(C,L){s(L&&L.stream,"decode","stream");var m;return C instanceof Uint8Array?m=C:C.buffer instanceof ArrayBuffer?m=new Uint8Array(C.buffer):m=new Uint8Array(C),v(m,this.encoding)},t.TextEncoder=t.TextEncoder||u,t.TextDecoder=t.TextDecoder||w})(typeof window<"u"?window:Qs);var s0=Rm({__proto__:null,default:Lu},[Lu]),Js;(Js=console.assert)===null||Js===void 0||Js.call(console,s0);const a0="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";function l0(t){const e=a0.indexOf(t);if(e===-1)throw new Error("Invalid character found: "+t);return e}function u0(t){const e=new Uint8Array(t),n=e.length;let r="",i=Math.pow(2,16)-1;for(let o=0;o<n;o+=i)o+i>n&&(i=n-o),r+=String.fromCharCode.apply(null,e.subarray(o,o+i));return r}function c0(t){t=t.toUpperCase();const e=t.length;let n=0,r=0,i=0;const o=new Uint8Array(e*5/8|0);for(let s=0;s<e;s++)r=r<<5|l0(t[s]),n+=5,n>=8&&(o[i++]=r>>>n-8&255,n-=8);return u0(o.buffer)}function f0(t){if(t)try{const[e,n]=t.split("_");if(e==="tgpak"){const[r]=c0(n).split("_");return Number(r)}}catch{console.warn("Tolgee: Api key can't be parsed")}}function d0(t){if(!t)return;const[e]=t.split("_");return e==="tgpak"?"tgpak":e==="tgpat"?"tgpat":"legacy"}function h0(){return{getRecord({apiUrl:t,apiKey:e,language:n,namespace:r,projectId:i,fetch:o}){var s;const a=(s=f0(e))!==null&&s!==void 0?s:i;let l=a!==void 0?`${t}/v2/projects/${a}/translations/${n}`:`${t}/v2/projects/translations/${n}`;if(r&&(l+=`?ns=${r}`),d0(e)==="tgpat"&&i===void 0)throw new Error("You need to specify 'projectId' when using PAT key");return o(l,{headers:{"X-API-Key":e||"","Content-Type":"application/json"}}).then(u=>{if(u.ok)return u.json().then(f=>f[n]);throw new Error(u.statusText)})}}}const p0=()=>(t,e)=>(e.setDevBackend(h0()),t);function g0(t,e){const n=r=>{var i,o;t.includes((i=r.data)===null||i===void 0?void 0:i.type)&&e((o=r.data)===null||o===void 0?void 0:o.data)};return window.addEventListener("message",n,!1),{unsubscribe(){window.removeEventListener("message",n)}}}function v0({message:t,recievingMessage:e,data:n,attempts:r=1,timeout:i=300}){let o=!1;const s=()=>new Promise((l,u)=>{const f=g0(e,h);window.postMessage({type:t,data:n},window.origin);const d=setTimeout(y,i);function h(g){clearTimeout(d),v(),l(g)}function v(){f.unsubscribe()}function y(){v(),u()}});return{cancel(){o=!0},promise:(async()=>{for(let l=0;l<r;l++){if(o)return new Promise(()=>{});try{return await s()}catch{continue}}if(!o)throw`Didn't recieve ${e.join(" or ")} in time.`;return new Promise(()=>{})})()}}function m0(){let t;async function e(n){t==null||t();const{cancel:r,promise:i}=v0({message:"TOLGEE_READY",recievingMessage:["TOLGEE_PLUGIN_READY","TOLGEE_PLUGIN_UPDATED"],data:n,attempts:4});return t=r,i}return{update:e}}const y0="tolgee-in-context-tools.umd.min.js",b0="@tolgee/in-context-tools",C0="InContextTools",w0="https://cdn.jsdelivr.net/npm";function S0(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 Ys=null;function L0(t){return Ys||(Ys=S0(`${w0}/@tolgee/web@${t}/dist/${y0}`).then(()=>window[b0][C0])),Ys}const Nd="__tolgee_apiKey",Bd="__tolgee_apiUrl";function Eu(){const t=sessionStorage.getItem(Nd)||void 0,e=sessionStorage.getItem(Bd)||void 0;if(!(!t||!e))return{apiKey:t,apiUrl:e}}function E0(){sessionStorage.removeItem(Nd),sessionStorage.removeItem(Bd)}function x0(t){document.readyState!=="loading"?Promise.resolve().then(()=>{t()}):document.addEventListener&&document.addEventListener("DOMContentLoaded",t)}let Fd=()=>t=>t;const _0=()=>{if(typeof window>"u")return!1;try{return typeof sessionStorage<"u"&&sessionStorage}catch(t){return console.error("sessionStorage not available",t),!1}};_0()&&(Fd=()=>t=>{const e=m0(),n=()=>({uiPresent:!0,uiVersion:void 0,mode:t.isDev()?"development":"production",config:{apiUrl:t.getInitialOptions().apiUrl||"",apiKey:t.getInitialOptions().apiKey||""}}),r=async()=>{const o=await L0("5.22.0");return s=>{const a=Eu();return s.addPlugin(o({credentials:a})),s}};return t.on("running",({value:o})=>{o&&x0(()=>{e.update(n()).catch(E0)})}),Eu()&&r().then(o=>{t.addPlugin(o)}).catch(o=>{console.error("Tolgee: Failed to load in-context tools"),console.error(o)}),t});function M0(){return Qm().use(Fd())}const O0={useSuspense:!0};let Xs;const Ud=()=>(Xs||(Xs=c.createContext(void 0)),Xs),P0=({tolgee:t,options:e,children:n,fallback:r})=>{const[i,o]=c.useState(!t.isLoaded());c.useEffect(()=>{t.run().catch(l=>{console.error(l)}).finally(()=>{o(!1)})},[t]);const s=Object.assign(Object.assign({},O0),e),a=Ud();return s.useSuspense?c.createElement(a.Provider,{value:{tolgee:t,options:s}},i?r:c.createElement(c.Suspense,{fallback:r||null},n)):c.createElement(a.Provider,{value:{tolgee:t,options:s}},i?r:n)};let k0;function T0(){return k0}const R0=()=>{const t=Ud(),e=c.useContext(t)||T0();if(!e)throw new Error("Couldn't find tolgee instance, did you forgot to use `TolgeeProvider`?");return e},D0=()=>{const[t,e]=c.useState(0),n=c.useCallback(()=>{e(r=>r+1)},[e]);return{instance:t,rerender:n}},Vd=(t,e)=>{const{tolgee:n,options:r}=R0(),i=kd(t),o=jt(i).join(":"),s=Object.assign(Object.assign({},r),e),{rerender:a,instance:l}=D0(),u=c.useRef(),f=c.useRef([]);f.current=[];const d=y=>{var g;f.current.push(y),(g=u.current)===null||g===void 0||g.subscribeNs(y)},h=n.isLoaded(i);c.useEffect(()=>{const y=n.onNsUpdate(a);return u.current=y,y.subscribeNs(i),f.current.forEach(g=>{y.subscribeNs(g)}),()=>{y.unsubscribe()}},[o,n]),c.useEffect(()=>(n.addActiveNs(i),()=>n.removeActiveNs(i)),[o,n]);const v=c.useCallback(y=>{var g;const w=(g=y.ns)!==null&&g!==void 0?g:i==null?void 0:i[0];return d(w),n.t(Object.assign(Object.assign({},y),{ns:w}))},[n,l]);if(s.useSuspense&&!h)throw n.addActiveNs(i,!0);return{t:v,isLoading:!h}},ln=(t,e)=>{const{t:n,isLoading:r}=Vd(t,e);return{t:c.useCallback((...o)=>{const s=Id(...o);return n(s)},[n]),isLoading:r}},A0=t=>{if(!t)return;const e={};return Object.entries(t||{}).forEach(([n,r])=>{if(typeof r=="function")e[n]=i=>r(Ba(i));else if(c.isValidElement(r)){const i=r;e[n]=o=>i.props.children===void 0&&(o!=null&&o.length)?c.cloneElement(i,{},Ba(o)):c.cloneElement(i)}else e[n]=r}),e},Ba=t=>Array.isArray(t)?c.Children.toArray(t):t,I0=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=Ba(t.t({key:e,params:A0(t.params),defaultValue:n,noWrap:t.noWrap,ns:t.ns,language:t.language}));return c.createElement(c.Fragment,null,r)},tr=t=>{const{t:e}=Vd();return c.createElement(I0,Object.assign({t:e},t))},j0="Spinner-module__loader__U4GVhD",N0={loader:j0},as=({className:t})=>S.jsx("div",{className:Se(N0.loader,t),children:"Loading..."}),B0="Button-module__root__8RX49h",F0="Button-module__primary__st6yY9",U0="Button-module__secondary__j-3rjz",V0="Button-module__loading__QfItr2",z0="Button-module__spinner__kVZYqS",di={root:B0,primary:F0,secondary:U0,loading:V0,spinner:z0},Bt=({children:t,className:e,loading:n,variant:r="primary",...i})=>{const o=[di.root,e,di[r],{[di.loading]:n}];if(i.as==="link"){const{as:s,disabled:a,...l}=i;return S.jsxs("a",{className:Se(o),...l,"data-disabled":a,children:[!n&&t,n&&S.jsx(as,{className:di.spinner})]})}if(i.as==="button"){const{as:s,...a}=i;return S.jsxs("button",{type:"button",className:Se(o),...a,children:[!n&&t,n&&S.jsx(as,{className:di.spinner})]})}yn(!1,"Invalid button type")};Bt.defaultProps={as:"button"};const H0=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},U.createElement("g",{clipPath:"url(#a)"},U.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"})),U.createElement("defs",null,U.createElement("clipPath",{id:"a"},U.createElement("path",{fill:"#fff",d:"M0 0h20v20H0z"})))),$0="CloseButton-module__root__2m1asd",W0="CloseButton-module__absolutePositionVariant__lGX4cQ",G0="CloseButton-module__relativePositionVariant__LqTTWf",xu={root:$0,absolutePositionVariant:W0,relativePositionVariant:G0},ri=({className:t,position:e="absolute",...n})=>S.jsx("div",{...n,className:Se(xu.root,t,xu[`${e}PositionVariant`]),children:S.jsx(H0,{})}),Z0=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:13,height:12,viewBox:"0 0 13 12",fill:"none",...t},U.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"})),q0="W3WLink-module__likeButton__RhAlpN",K0="W3WLink-module__title__eo6M7L",_u={likeButton:q0,title:K0},Q0=()=>S.jsxs("a",{className:_u.likeButton,title:"about what3words",href:"https://what3words.com/about",target:"_blank",rel:"noreferrer",children:[S.jsx("span",{className:_u.title,children:"what3words"}),S.jsx(Z0,{})]}),J0=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,viewBox:"0 0 20 20",fill:"none",...t},U.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"})),Y0=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,viewBox:"0 0 20 20",fill:"none",...t},U.createElement("path",{d:"M20 0H0V20H20V0Z",fill:"black"}),U.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"}),U.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"}),U.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"})),X0="W3WLink-module__mainWrapper__BeGCpA",ey="W3WLink-module__link__yq50q-",Mu={mainWrapper:X0,link:ey},zd=({what3words:t})=>{const{id:e,link:n}=t;return S.jsxs("div",{className:Mu.mainWrapper,children:[S.jsx(Y0,{}),S.jsx("a",{className:Mu.link,href:n,title:"w3w link",target:"_blank",rel:"noreferrer",children:e}),S.jsx(J0,{})]})},ty="LocationView-module__title__-wT0bl",ny="LocationView-module__logo__jDjNMt",ry="LocationView-module__header__K0gBYX",iy="LocationView-module__content__wtOPjm",oy="LocationView-module__section__2J1zAJ",sy="LocationView-module__w3wSection__PdU7j4",ay="LocationView-module__chips__ALwJDx",ly="LocationView-module__services__IgJ4ba",uy="LocationView-module__images__-wKmRM",cy="LocationView-module__image__T1E-gt",fy="LocationView-module__actions__NuafMj",dy="LocationView-module__actionsHidden__-vX5kK",hy="LocationView-module__submit__c-Hc8u",py="LocationView-module__scheduleItem__RhAgat",rt={title:ty,logo:ny,header:ry,content:iy,section:oy,w3wSection:sy,chips:ay,services:ly,images:uy,image:cy,actions:fy,actionsHidden:dy,submit:hy,scheduleItem:py},gy={default:Od,llama:Pd},vy=({classes:t,hideActions:e,location:n,onClose:r,onSubmit:i})=>{var h,v,y,g;const{t:o}=ln(["details_modal","common"]),{isLoading:s,lmsData:a}=Ts(),l=(h=a==null?void 0:a.location)==null?void 0:h.what3words,u=!!(l!=null&&l.id),{logo:f="default"}=Xe(),d=gy[f];return S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:Se(rt.header,t==null?void 0:t.header),children:[S.jsx(ri,{onClick:r}),S.jsxs("div",{className:rt.title,children:[S.jsx("div",{className:rt.logo,children:S.jsx(d,{})}),S.jsx("span",{children:n.name})]})]}),S.jsxs("div",{className:Se(rt.content,t==null?void 0:t.content),children:[S.jsxs("section",{className:rt.section,children:[S.jsxs("span",{children:[o("address"),":"]}),s?S.jsx(_t,{width:200}):S.jsx("p",{children:(v=n.location)==null?void 0:v.full_address})]}),s?S.jsx(_t,{}):u&&S.jsxs("section",{className:rt.w3wSection,children:[S.jsx(zd,{what3words:l}),S.jsx(Q0,{})]}),((y=n.schedule)==null?void 0:y.length)>0&&S.jsxs("section",{className:rt.section,children:[S.jsxs("span",{children:[o("schedule"),":"]}),s?S.jsx(_t,{width:200}):n.schedule.map((w,C)=>S.jsx("p",{className:rt.scheduleItem,children:w},C))]}),(n.pay_by_card||n.pay_by_card)&&S.jsxs("section",{className:rt.section,children:[S.jsxs("span",{children:[o("payment_method"),":"]}),s?S.jsx(_t,{width:300}):S.jsxs("div",{className:rt.chips,children:[n.pay_by_cash&&o("pay_by_cash"),n.pay_by_card&&n.pay_by_cash&&", ",n.pay_by_card&&o("pay_by_card")]})]}),S.jsxs("section",{className:rt.section,children:[S.jsxs("span",{children:[o("services"),":"]}),S.jsxs("div",{className:rt.services,children:[n.is_pickup&&(s?S.jsx(_t,{width:150}):S.jsx("p",{children:o("is_pickup")})),n.is_delivery&&(s?S.jsx(_t,{width:150}):S.jsx("p",{children:o("is_delivery")})),n.is_dressing_room&&(s?S.jsx(_t,{width:150}):S.jsx("p",{children:o("is_dressing_room")})),n.is_check_order&&(s?S.jsx(_t,{width:150}):S.jsx("p",{children:o("is_check_order")}))]})]}),S.jsxs("section",{className:rt.section,children:[S.jsxs("span",{children:[o("location"),":"]}),s?S.jsx(_t,{width:100}):S.jsx("p",{children:n.location_name})]}),((g=n.images)==null?void 0:g.length)>0&&S.jsx("section",{className:rt.images,children:n.images.map(w=>S.jsx("img",{src:w,alt:n.name,className:rt.image},w))})]}),S.jsx("div",{className:Se(rt.actions,{[rt.actionsHidden]:e}),children:S.jsx(Bt,{variant:"primary",className:rt.submit,disabled:s,onClick:i,children:o("choose",{ns:"common"})})})]})},Hd=c.memo(vy),Rl=({isSelectedPoint:t})=>{const e=be(Sl),[n,r]=c.useState(!0);return c.useEffect(()=>{r(t?!e:!0)},[e,t]),n};var my=yy()?c.useLayoutEffect:c.useEffect;function yy(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function by(){var t=c.useState(Object.create(null)),e=t[1];return c.useCallback(function(){e(Object.create(null))},[])}var Cy=function(e){var n=e.children,r=e.type,i=r===void 0?"reach-portal":r,o=c.useRef(null),s=c.useRef(null),a=by();return my(function(){if(o.current){var l=o.current.ownerDocument;return s.current=l==null?void 0:l.createElement(i),l.body.appendChild(s.current),a(),function(){s.current&&s.current.ownerDocument&&s.current.ownerDocument.body.removeChild(s.current)}}},[i,a]),s.current?ti.createPortal(n,s.current):c.createElement("span",{ref:o})};/*! *****************************************************************************
|
|
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 F=function(){return F=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},F.apply(this,arguments)};function Rl(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 ye(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 Ee(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}function $e(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}var Fe;(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"})(Fe||(Fe={}));var Qr;(function(t){t.Parent="#_parent",t.Internal="#_internal"})(Qr||(Qr={}));var Ba=Fe.Start,Dl=Fe.Stop,ao=Fe.Raise,Ds=Fe.Send,$d=Fe.Cancel,wy=Fe.NullEvent,Al=Fe.Assign;Fe.After;Fe.DoneState;var Wd=Fe.Log,Sy=Fe.Init,Fa=Fe.Invoke;Fe.ErrorExecution;var Mu=Fe.ErrorPlatform,Ly=Fe.ErrorCustom,Gd=Fe.Update,xy=Fe.Choose,Ey=Fe.Pure,Zd=".",Ou={},Ua="xstate.guard",_y="",bo;function Il(t,e,n){n===void 0&&(n=Zd);var r=Pi(t,n),i=Pi(e,n);return Re(i)?Re(r)?i===r:!1:Re(r)?r in i:Object.keys(r).every(function(o){return o in i?Il(r[o],i[o]):!1})}function qd(t){try{return Re(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 Va(t,e){try{return ii(t)?t:t.toString().split(e)}catch{throw new Error("'".concat(t,"' is not a valid state path."))}}function My(t){return typeof t=="object"&&"value"in t&&"context"in t&&"event"in t&&"_event"in t}function Pi(t,e){if(My(t))return t.value;if(ii(t))return ls(t);if(typeof t!="string")return t;var n=Va(t,e);return ls(n)}function ls(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 Si(t,e){for(var n={},r=Object.keys(t),i=0;i<r.length;i++){var o=r[i];n[o]=e(t[o],o,t,i)}return n}function Pu(t,e,n){var r,i,o={};try{for(var s=ye(Object.keys(t)),a=s.next();!a.done;a=s.next()){var l=a.value,u=t[l];n(u)&&(o[l]=e(u,l,t))}}catch(f){r={error:f}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o}var Oy=function(t){return function(e){var n,r,i=e;try{for(var o=ye(t),s=o.next();!s.done;s=o.next()){var a=s.value;i=i[a]}}catch(l){n={error:l}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}};function Py(t,e){return function(n){var r,i,o=n;try{for(var s=ye(t),a=s.next();!a.done;a=s.next()){var l=a.value;o=o[e][l]}}catch(u){r={error:u}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o}}function Ko(t){if(!t)return[[]];if(Re(t))return[[t]];var e=Ze(Object.keys(t).map(function(n){var r=t[n];return typeof r!="string"&&(!r||!Object.keys(r).length)?[[n]]:Ko(t[n]).map(function(i){return[n].concat(i)})}));return e}function Ze(t){var e;return(e=[]).concat.apply(e,$e([],Ee(t),!1))}function Kd(t){return ii(t)?t:[t]}function Vt(t){return t===void 0?[]:Kd(t)}function us(t,e,n){var r,i;if(Oe(t))return t(e,n.data);var o={};try{for(var s=ye(Object.keys(t)),a=s.next();!a.done;a=s.next()){var l=a.value,u=t[l];Oe(u)?o[l]=u(e,n.data):o[l]=u}}catch(f){r={error:f}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o}function ky(t){return/^(done|error)\./.test(t)}function ku(t){return!!(t instanceof Promise||t!==null&&(Oe(t)||typeof t=="object")&&Oe(t.then))}function Ty(t){return t!==null&&typeof t=="object"&&"transition"in t&&typeof t.transition=="function"}function Ry(t,e){var n,r,i=Ee([[],[]],2),o=i[0],s=i[1];try{for(var a=ye(t),l=a.next();!l.done;l=a.next()){var u=l.value;e(u)?o.push(u):s.push(u)}}catch(f){n={error:f}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[o,s]}function Qd(t,e){return Si(t.states,function(n,r){if(n){var i=(Re(e)?void 0:e[r])||(n?n.current:void 0);if(i)return{current:i,states:Qd(n,i)}}})}function Dy(t,e){return{current:e,states:Qd(t,e)}}function Tu(t,e,n,r){var i=t&&n.reduce(function(o,s){var a,l,u=s.assignment,f={state:r,action:s,_event:e},d={};if(Oe(u))d=u(o,e.data,f);else try{for(var h=ye(Object.keys(u)),v=h.next();!v.done;v=h.next()){var y=v.value,g=u[y];d[y]=Oe(g)?g(o,e.data,f):g}}catch(w){a={error:w}}finally{try{v&&!v.done&&(l=h.return)&&l.call(h)}finally{if(a)throw a.error}}return Object.assign({},o,d)},t);return i}var Ay=function(){};function ii(t){return Array.isArray(t)}function Oe(t){return typeof t=="function"}function Re(t){return typeof t=="string"}function Jd(t,e){if(t)return Re(t)?{type:Ua,name:t,predicate:e?e[t]:void 0}:Oe(t)?{type:Ua,name:t.name,predicate:t}:t}function Iy(t){try{return"subscribe"in t&&Oe(t.subscribe)}catch{return!1}}var kn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();bo={},bo[kn]=function(){return this},bo[Symbol.observable]=function(){return this};function Jr(t){return!!t&&"__xstatenode"in t}function jy(t){return!!t&&typeof t.send=="function"}function As(t,e){return Re(t)||typeof t=="number"?F({type:t},e):t}function at(t,e){if(!Re(t)&&"$$type"in t&&t.$$type==="scxml")return t;var n=As(t);return F({name:n.type,data:n,$$type:"scxml",type:"external"},e)}function Cr(t,e){var n=Kd(e).map(function(r){return typeof r>"u"||typeof r=="string"||Jr(r)?{target:r,event:t}:F(F({},r),{event:t})});return n}function Ny(t){if(!(t===void 0||t===_y))return Vt(t)}function Yd(t,e,n,r,i){var o=t.options.guards,s={state:i,cond:e,_event:r};if(e.type===Ua)return((o==null?void 0:o[e.name])||e.predicate)(n,r.data,s);var a=o==null?void 0:o[e.type];if(!a)throw new Error("Guard '".concat(e.type,"' is not implemented on machine '").concat(t.id,"'."));return a(n,r.data,s)}function Xd(t){return typeof t=="string"?{type:t}:t}function Qo(t,e,n){var r=function(){},i=typeof t=="object",o=i?t:null;return{next:((i?t.next:t)||r).bind(o),error:((i?t.error:e)||r).bind(o),complete:((i?t.complete:n)||r).bind(o)}}function Co(t,e){return"".concat(t,":invocation[").concat(e,"]")}function za(t){return(t.type===ao||t.type===Ds&&t.to===Qr.Internal)&&typeof t.delay!="number"}var kr=at({type:Sy});function Ha(t,e){return e&&e[t]||void 0}function zi(t,e){var n;if(Re(t)||typeof t=="number"){var r=Ha(t,e);Oe(r)?n={type:t,exec:r}:r?n=r:n={type:t,exec:void 0}}else if(Oe(t))n={type:t.name||t.toString(),exec:t};else{var r=Ha(t.type,e);if(Oe(r))n=F(F({},t),{exec:r});else if(r){var i=r.type||t.type;n=F(F(F({},r),t),{type:i})}else n=t}return n}var Tn=function(t,e){if(!t)return[];var n=ii(t)?t:[t];return n.map(function(r){return zi(r,e)})};function jl(t){var e=zi(t);return F(F({id:Re(t)?t:e.id},e),{type:e.type})}function By(t,e){return{type:ao,event:typeof t=="function"?t:As(t),delay:e?e.delay:void 0,id:e==null?void 0:e.id}}function Fy(t,e,n,r){var i={_event:n},o=at(Oe(t.event)?t.event(e,n.data,i):t.event),s;if(Re(t.delay)){var a=r&&r[t.delay];s=Oe(a)?a(e,n.data,i):a}else s=Oe(t.delay)?t.delay(e,n.data,i):t.delay;return F(F({},t),{type:ao,_event:o,delay:s})}function Uy(t,e){return{to:e?e.to:void 0,type:Ds,event:Oe(t)?t:As(t),delay:e?e.delay:void 0,id:e&&e.id!==void 0?e.id:Oe(t)?t.name:qd(t)}}function Vy(t,e,n,r){var i={_event:n},o=at(Oe(t.event)?t.event(e,n.data,i):t.event),s;if(Re(t.delay)){var a=r&&r[t.delay];s=Oe(a)?a(e,n.data,i):a}else s=Oe(t.delay)?t.delay(e,n.data,i):t.delay;var l=Oe(t.to)?t.to(e,n.data,i):t.to;return F(F({},t),{to:l,_event:o,event:o.data,delay:s})}var zy=function(t,e,n){return F(F({},t),{value:Re(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})},Hy=function(t){return{type:$d,sendId:t}};function $y(t){var e=jl(t);return{type:Fe.Start,activity:e,exec:void 0}}function Wy(t){var e=Oe(t)?t:jl(t);return{type:Fe.Stop,activity:e,exec:void 0}}function Gy(t,e,n){var r=Oe(t.activity)?t.activity(e,n.data):t.activity,i=typeof r=="string"?{id:r}:r,o={type:Fe.Stop,activity:i};return o}var Zy=function(t){return{type:Al,assignment:t}};function qy(t,e){var n=e?"#".concat(e):"";return"".concat(Fe.After,"(").concat(t,")").concat(n)}function wo(t,e){var n="".concat(Fe.DoneState,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function Jo(t,e){var n="".concat(Fe.DoneInvoke,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function Li(t,e){var n="".concat(Fe.ErrorPlatform,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}var Ky=function(t){var e,n,r=[];try{for(var i=ye(t),o=i.next();!o.done;o=i.next())for(var s=o.value,a=0;a<s.actions.length;){if(s.actions[a].type===Al){r.push(s.actions[a]),s.actions.splice(a,1);continue}a++}}catch(l){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r};function cs(t,e,n,r,i,o,s){s===void 0&&(s=!1);var a=s?[]:Ky(i),l=a.length?Tu(n,r,a,e):n,u=s?[n]:void 0,f=[];function d(y,g){var w;switch(g.type){case ao:{var C=Fy(g,l,r,t.options.delays);return o&&typeof C.delay=="number"&&o(C,l,r),C}case Ds:var L=Vy(g,l,r,t.options.delays);return o&&L.to!==Qr.Internal&&(y==="entry"?f.push(L):o(L,l,r)),L;case Wd:{var m=zy(g,l,r);return o==null||o(m,l,r),m}case xy:{var _=g,E=(w=_.conds.find(function(V){var N=Jd(V.cond,t.options.guards);return!N||Yd(t,N,l,r,o?void 0:e)}))===null||w===void 0?void 0:w.actions;if(!E)return[];var p=Ee(cs(t,e,l,r,[{type:y,actions:Tn(Vt(E),t.options.actions)}],o,s),2),b=p[0],x=p[1];return l=x,u==null||u.push(l),b}case Ey:{var E=g.get(l,r.data);if(!E)return[];var M=Ee(cs(t,e,l,r,[{type:y,actions:Tn(Vt(E),t.options.actions)}],o,s),2),O=M[0],T=M[1];return l=T,u==null||u.push(l),O}case Dl:{var m=Gy(g,l,r);return o==null||o(m,n,r),m}case Al:{l=Tu(l,r,[g],o?void 0:e),u==null||u.push(l);break}default:var P=zi(g,t.options.actions),R=P.exec;if(o)o(P,l,r);else if(R&&u){var I=u.length-1,B=F(F({},P),{exec:function(V){for(var N=[],z=1;z<arguments.length;z++)N[z-1]=arguments[z];R.apply(void 0,$e([u[I]],Ee(N),!1))}});P=B}return P}}function h(y){var g,w,C=[];try{for(var L=ye(y.actions),m=L.next();!m.done;m=L.next()){var _=m.value,E=d(y.type,_);E&&(C=C.concat(E))}}catch(p){g={error:p}}finally{try{m&&!m.done&&(w=L.return)&&w.call(L)}finally{if(g)throw g.error}}return f.forEach(function(p){o(p,l,r)}),f.length=0,C}var v=Ze(i.map(h));return[v,l]}var Mr=function(t,e){var n=e(t);return n};function eh(t){var e;return e={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:t}}},e[kn]=function(){return this},e}function Qy(t,e,n,r){var i,o=Xd(t.src),s=(i=e==null?void 0:e.options.services)===null||i===void 0?void 0:i[o.type],a=t.data?us(t.data,n,r):void 0,l=s?th(s,t.id,a):eh(t.id);return l.meta=t,l}function th(t,e,n){var r=eh(e);if(r.deferred=!0,Jr(t)){var i=r.state=Mr(void 0,function(){return(n?t.withContext(n):t).initialState});r.getSnapshot=function(){return i}}return r}function Jy(t){try{return typeof t.send=="function"}catch{return!1}}function Yy(t){return Jy(t)&&"id"in t}function Xy(t){var e;return F((e={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},e[kn]=function(){return this},e),t)}var fs=function(t){return t.type==="atomic"||t.type==="final"};function nh(t){return Object.keys(t.states).map(function(e){return t.states[e]})}function Hi(t){return nh(t).filter(function(e){return e.type!=="history"})}function rh(t){var e=[t];return fs(t)?e:e.concat(Ze(Hi(t).map(rh)))}function xi(t,e){var n,r,i,o,s,a,l,u,f=new Set(t),d=$a(f),h=new Set(e);try{for(var v=ye(h),y=v.next();!y.done;y=v.next())for(var g=y.value,w=g.parent;w&&!h.has(w);)h.add(w),w=w.parent}catch(M){n={error:M}}finally{try{y&&!y.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}var C=$a(h);try{for(var L=ye(h),m=L.next();!m.done;m=L.next()){var g=m.value;if(g.type==="compound"&&(!C.get(g)||!C.get(g).length))d.get(g)?d.get(g).forEach(function(O){return h.add(O)}):g.initialStateNodes.forEach(function(O){return h.add(O)});else if(g.type==="parallel")try{for(var _=(s=void 0,ye(Hi(g))),E=_.next();!E.done;E=_.next()){var p=E.value;h.has(p)||(h.add(p),d.get(p)?d.get(p).forEach(function(O){return h.add(O)}):p.initialStateNodes.forEach(function(O){return h.add(O)}))}}catch(O){s={error:O}}finally{try{E&&!E.done&&(a=_.return)&&a.call(_)}finally{if(s)throw s.error}}}}catch(M){i={error:M}}finally{try{m&&!m.done&&(o=L.return)&&o.call(L)}finally{if(i)throw i.error}}try{for(var b=ye(h),x=b.next();!x.done;x=b.next())for(var g=x.value,w=g.parent;w&&!h.has(w);)h.add(w),w=w.parent}catch(M){l={error:M}}finally{try{x&&!x.done&&(u=b.return)&&u.call(b)}finally{if(l)throw l.error}}return h}function ih(t,e){var n=e.get(t);if(!n)return{};if(t.type==="compound"){var r=n[0];if(r){if(fs(r))return r.key}else return{}}var i={};return n.forEach(function(o){i[o.key]=ih(o,e)}),i}function $a(t){var e,n,r=new Map;try{for(var i=ye(t),o=i.next();!o.done;o=i.next()){var s=o.value;r.has(s)||r.set(s,[]),s.parent&&(r.has(s.parent)||r.set(s.parent,[]),r.get(s.parent).push(s))}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function e1(t,e){var n=xi([t],e);return ih(t,$a(n))}function Ei(t,e){return Array.isArray(t)?t.some(function(n){return n===e}):t instanceof Set?t.has(e):!1}function t1(t){return $e([],Ee(new Set(Ze($e([],Ee(t.map(function(e){return e.ownEvents})),!1)))),!1)}function Yo(t,e){return e.type==="compound"?Hi(e).some(function(n){return n.type==="final"&&Ei(t,n)}):e.type==="parallel"?Hi(e).every(function(n){return Yo(t,n)}):!1}function n1(t){return t===void 0&&(t=[]),t.reduce(function(e,n){return n.meta!==void 0&&(e[n.id]=n.meta),e},{})}function Ru(t){return new Set(Ze(t.map(function(e){return e.tags})))}function oh(t,e){if(t===e)return!0;if(t===void 0||e===void 0)return!1;if(Re(t)||Re(e))return t===e;var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(i){return oh(t[i],e[i])})}function r1(t){return typeof t!="object"||t===null?!1:"value"in t&&"_event"in t}function i1(t,e){var n=t.exec,r=F(F({},t),{exec:n!==void 0?function(){return n(e.context,e.event,{action:t,state:e,_event:e._event})}:void 0});return r}var At=function(){function t(e){var n=this,r;this.actions=[],this.activities=Ou,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||Ou,this.meta=n1(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 t1(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=kr;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=kr;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="."),Re(e))return[e];var i=Object.keys(e);return i.concat.apply(i,$e([],Ee(i.map(function(o){return r.toStrings(e[o],n).map(function(s){return o+n+s})})),!1))},t.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var n=e.tags;e.machine;var r=Rl(e,["configuration","transitions","tags","machine"]);return F(F({},r),{tags:Array.from(n)})},t.prototype.matches=function(e){return Il(e,this.value)},t.prototype.hasTag=function(e){return this.tags.has(e)},t.prototype.can=function(e){var n;Ay(!!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}(),o1={deferEvents:!1},Du=function(){function t(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=F(F({},o1),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}(),ea=new Map,s1=0,hi={bookId:function(){return"x:".concat(s1++)},register:function(t,e){return ea.set(t,e),t},get:function(t){return ea.get(t)},free:function(t){ea.delete(t)}};function Nl(){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 a1(){var t=Nl();if(t&&"__xstate__"in t)return t.__xstate__}function l1(t){if(Nl()){var e=a1();e&&e.register(t)}}function u1(t,e){e===void 0&&(e={});var n=t.initialState,r=new Set,i=[],o=!1,s=function(){if(!o){for(o=!0;i.length>0;){var u=i.shift();n=t.transition(n,u,l),r.forEach(function(f){return f.next(n)})}o=!1}},a=Xy({id:e.id,send:function(u){i.push(u),s()},getSnapshot:function(){return n},subscribe:function(u,f,d){var h=Qo(u,f,d);return r.add(h),h.next(n),{unsubscribe:function(){r.delete(h)}}}}),l={parent:e.parent,self:a,id:e.id||"anonymous",observers:r};return n=t.start?t.start(l):n,a}var c1={sync:!1,autoForward:!1},it;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(it||(it={}));var f1=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=it.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(f,d){if(ii(f))return r.batch(f),r.state;var h=at(As(f,d));if(r.status===it.Stopped)return r.state;if(r.status!==it.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(f,d,h){var v=r.parent&&(d===Qr.Parent||r.parent.id===d),y=v?r.parent:Re(d)?d===Qr.Internal?r:r.children.get(d)||hi.get(d):jy(d)?d:void 0;if(!y){if(!v)throw new Error("Unable to send event to child '".concat(d,"' from service '").concat(r.id,"'."));return}if("machine"in y){if(r.status!==it.Stopped||r.parent!==y||r.state.done){var g=F(F({},f),{name:f.name===Ly?"".concat(Li(r.id)):f.name,origin:r.sessionId});!h&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([y,g]):y.send(g)}}else!h&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([y,f.data]):y.send(f.data)},this._exec=function(f,d,h,v){v===void 0&&(v=r.machine.options.actions);var y=f.exec||Ha(f.type,v),g=Oe(y)?y:y?y.exec:f.exec;if(g)try{return g(d,h.data,r.machine.config.predictableActionArguments?{action:f,_event:h}:{action:f,state:r.state,_event:h})}catch(I){throw r.parent&&r.parent.send({type:"xstate.error",data:I}),I}switch(f.type){case ao:{var w=f;r.defer(w);break}case Ds:var C=f;if(typeof C.delay=="number"){r.defer(C);return}else C.to?r.sendTo(C._event,C.to,h===kr):r.send(C._event);break;case $d:r.cancel(f.sendId);break;case Ba:{if(r.status!==it.Running)return;var L=f.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[L.id||L.type])break;if(L.type===Fe.Invoke){var m=Xd(L.src),_=r.machine.options.services?r.machine.options.services[m.type]:void 0,E=L.id,p=L.data,b="autoForward"in L?L.autoForward:!!L.forward;if(!_)return;var x=p?us(p,d,h):void 0;if(typeof _=="string")return;var M=Oe(_)?_(d,h.data,{data:x,src:m,meta:L.meta}):_;if(!M)return;var O=void 0;Jr(M)&&(M=x?M.withContext(x):M,O={autoForward:b}),r.spawn(M,E,O)}else r.spawnActivity(L);break}case Dl:{r.stopChild(f.activity.id);break}case Wd:var T=f,P=T.label,R=T.value;P?r.logger(P,R):r.logger(R);break}};var i=F(F({},t.defaultOptions),n),o=i.clock,s=i.logger,a=i.parent,l=i.id,u=l!==void 0?l:e.id;this.id=u,this.logger=s,this.clock=o,this.parent=a,this.options=i,this.scheduler=new Du({deferEvents:this.options.deferEvents}),this.sessionId=hi.bookId()}return Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:Mr(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 o=ye(e.actions),s=o.next();!s.done;s=o.next()){var a=s.value;this.exec(a,e,n)}}catch(l){r={error:l}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},t.prototype.update=function(e,n){var r,i,o,s,a,l,u,f,d=this;if(e._sessionid=this.sessionId,this._state=e,(!this.machine.config.predictableActionArguments||n===kr)&&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(M){d.state.children[M.id]=M}),this.devTools&&this.devTools.send(n.data,e),e.event)try{for(var v=ye(this.eventListeners),y=v.next();!y.done;y=v.next()){var g=y.value;g(e.event)}}catch(M){r={error:M}}finally{try{y&&!y.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}try{for(var w=ye(this.listeners),C=w.next();!C.done;C=w.next()){var g=C.value;g(e,e.event)}}catch(M){o={error:M}}finally{try{C&&!C.done&&(s=w.return)&&s.call(w)}finally{if(o)throw o.error}}try{for(var L=ye(this.contextListeners),m=L.next();!m.done;m=L.next()){var _=m.value;_(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(M){a={error:M}}finally{try{m&&!m.done&&(l=L.return)&&l.call(L)}finally{if(a)throw a.error}}if(this.state.done){var E=e.configuration.find(function(M){return M.type==="final"&&M.parent===d.machine}),p=E&&E.doneData?us(E.doneData,e.context,n):void 0;this._doneEvent=Jo(this.id,p);try{for(var b=ye(this.doneListeners),x=b.next();!x.done;x=b.next()){var g=x.value;g(this._doneEvent)}}catch(M){u={error:M}}finally{try{x&&!x.done&&(f=b.return)&&f.call(b)}finally{if(u)throw u.error}}this._stop(),this._stopChildren(),hi.free(this.sessionId)}},t.prototype.onTransition=function(e){return this.listeners.add(e),this.status===it.Running&&e(this.state,this.state.event),this},t.prototype.subscribe=function(e,n,r){var i=this,o=Qo(e,n,r);this.listeners.add(o.next),this.status!==it.NotStarted&&o.next(this.state);var s=function(){i.doneListeners.delete(s),i.stopListeners.delete(s),o.complete()};return this.status===it.Stopped?o.complete():(this.onDone(s),this.onStop(s)),{unsubscribe:function(){i.listeners.delete(o.next),i.doneListeners.delete(s),i.stopListeners.delete(s)}}},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===it.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===it.Running)return this;this.machine._init(),hi.register(this.sessionId,this),this.initialized=!0,this.status=it.Running;var r=e===void 0?this.initialState:Mr(this,function(){return r1(e)?n.machine.resolveState(e):n.machine.resolveState(At.from(e,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(r,kr)}),this},t.prototype._stopChildren=function(){this.children.forEach(function(e){Oe(e.stop)&&e.stop()}),this.children.clear()},t.prototype._stop=function(){var e,n,r,i,o,s,a,l,u,f;try{for(var d=ye(this.listeners),h=d.next();!h.done;h=d.next()){var v=h.value;this.listeners.delete(v)}}catch(b){e={error:b}}finally{try{h&&!h.done&&(n=d.return)&&n.call(d)}finally{if(e)throw e.error}}try{for(var y=ye(this.stopListeners),g=y.next();!g.done;g=y.next()){var v=g.value;v(),this.stopListeners.delete(v)}}catch(b){r={error:b}}finally{try{g&&!g.done&&(i=y.return)&&i.call(y)}finally{if(r)throw r.error}}try{for(var w=ye(this.contextListeners),C=w.next();!C.done;C=w.next()){var v=C.value;this.contextListeners.delete(v)}}catch(b){o={error:b}}finally{try{C&&!C.done&&(s=w.return)&&s.call(w)}finally{if(o)throw o.error}}try{for(var L=ye(this.doneListeners),m=L.next();!m.done;m=L.next()){var v=m.value;this.doneListeners.delete(v)}}catch(b){a={error:b}}finally{try{m&&!m.done&&(l=L.return)&&l.call(L)}finally{if(a)throw a.error}}if(!this.initialized)return this;this.initialized=!1,this.status=it.Stopped,this._initialState=void 0;try{for(var _=ye(Object.keys(this.delayedEventsMap)),E=_.next();!E.done;E=_.next()){var p=E.value;this.clock.clearTimeout(this.delayedEventsMap[p])}}catch(b){u={error:b}}finally{try{E&&!E.done&&(f=_.return)&&f.call(_)}finally{if(u)throw u.error}}this.scheduler.clear(),this.scheduler=new Du({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=at({type:"xstate.stop"}),o=Mr(e,function(){var s=Ze($e([],Ee(e.state.configuration),!1).sort(function(d,h){return h.order-d.order}).map(function(d){return Tn(d.onExit,e.machine.options.actions)})),a=Ee(cs(e.machine,e.state,e.state.context,i,[{type:"exit",actions:s}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),l=a[0],u=a[1],f=new At({value:e.state.value,context:u,_event:i,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:l.filter(function(d){return!za(d)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return f.changed=!0,f});e.update(o,i),e._stopChildren(),hi.free(e.sessionId)}}),this},t.prototype.batch=function(e){var n=this;if(!(this.status===it.NotStarted&&this.options.deferEvents)){if(this.status!==it.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,o,s=n.state,a=!1,l=[],u=function(v){var y=at(v);n.forward(y),s=Mr(n,function(){return n.machine.transition(s,y,void 0,r||void 0)}),l.push.apply(l,$e([],Ee(n.machine.config.predictableActionArguments?s.actions:s.actions.map(function(g){return i1(g,s)})),!1)),a=a||!!s.changed};try{for(var f=ye(e),d=f.next();!d.done;d=f.next()){var h=d.value;u(h)}}catch(v){i={error:v}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}s.changed=a,s.actions=l,n.update(s,at(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=at(e);if(i.name.indexOf(Mu)===0&&!this.state.nextEvents.some(function(s){return s.indexOf(Mu)===0}))throw i.data.data;var o=Mr(this,function(){return r.machine.transition(r.state,i,void 0,n||void 0)});return o},t.prototype.nextState=function(e){return this._nextState(e,!1)},t.prototype.forward=function(e){var n,r;try{for(var i=ye(this.forwardTo),o=i.next();!o.done;o=i.next()){var s=o.value,a=this.children.get(s);if(!a)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(s,"'."));a.send(e)}}catch(l){n={error:l}}finally{try{o&&!o.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),Oe(n.stop)&&n.stop())},t.prototype.spawn=function(e,n,r){if(this.status!==it.Running)return th(e,n);if(ku(e))return this.spawnPromise(Promise.resolve(e),n);if(Oe(e))return this.spawnCallback(e,n);if(Yy(e))return this.spawnActor(e,n);if(Iy(e))return this.spawnObservable(e,n);if(Jr(e))return this.spawnMachine(e,F(F({},r),{id:n}));if(Ty(e))return this.spawnBehavior(e,n);throw new Error('Unable to spawn entity "'.concat(n,'" of type "').concat(typeof e,'".'))},t.prototype.spawnMachine=function(e,n){var r=this;n===void 0&&(n={});var i=new t(e,F(F({},this.options),{parent:this,id:n.id||e.id})),o=F(F({},c1),n);o.sync&&i.onTransition(function(a){r.send(Gd,{state:a,id:i.id})});var s=i;return this.children.set(i.id,s),o.autoForward&&this.forwardTo.add(i.id),i.onDone(function(a){r.removeChild(i.id),r.send(at(a,{origin:i.id}))}).start(),s},t.prototype.spawnBehavior=function(e,n){var r=u1(e,{id:n,parent:this});return this.children.set(n,r),r},t.prototype.spawnPromise=function(e,n){var r,i=this,o=!1,s;e.then(function(l){o||(s=l,i.removeChild(n),i.send(at(Jo(n,l),{origin:n})))},function(l){if(!o){i.removeChild(n);var u=Li(n,l);try{i.send(at(u,{origin:n}))}catch{i.devTools&&i.devTools.send(u,i.state),i.machine.strict&&i.stop()}}});var a=(r={id:n,send:function(){},subscribe:function(l,u,f){var d=Qo(l,u,f),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(){o=!0},toJSON:function(){return{id:n}},getSnapshot:function(){return s}},r[kn]=function(){return this},r);return this.children.set(n,a),a},t.prototype.spawnCallback=function(e,n){var r,i=this,o=!1,s=new Set,a=new Set,l,u=function(h){l=h,a.forEach(function(v){return v(h)}),!o&&i.send(at(h,{origin:n}))},f;try{f=e(u,function(h){s.add(h)})}catch(h){this.send(Li(n,h))}if(ku(f))return this.spawnPromise(f,n);var d=(r={id:n,send:function(h){return s.forEach(function(v){return v(h)})},subscribe:function(h){var v=Qo(h);return a.add(v.next),{unsubscribe:function(){a.delete(v.next)}}},stop:function(){o=!0,Oe(f)&&f()},toJSON:function(){return{id:n}},getSnapshot:function(){return l}},r[kn]=function(){return this},r);return this.children.set(n,d),d},t.prototype.spawnObservable=function(e,n){var r,i=this,o,s=e.subscribe(function(l){o=l,i.send(at(l,{origin:n}))},function(l){i.removeChild(n),i.send(at(Li(n,l),{origin:n}))},function(){i.removeChild(n),i.send(at(Jo(n),{origin:n}))}),a=(r={id:n,send:function(){},subscribe:function(l,u,f){return e.subscribe(l,u,f)},stop:function(){return s.unsubscribe()},getSnapshot:function(){return o},toJSON:function(){return{id:n}}},r[kn]=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[kn]=function(){return this},r))},t.prototype.attachDev=function(){var e=Nl();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var n=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(F(F({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:F({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}l1(this)}},t.prototype.toJSON=function(){return{id:this.id}},t.prototype[kn]=function(){return this},t.prototype.getSnapshot=function(){return this.status===it.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=sh,t}();function sh(t,e){var n=new f1(t,e);return n}function d1(t){if(typeof t=="string"){var e={type:t};return e.toString=function(){return t},e}return t}function So(t){return F(F({type:Fa},t),{toJSON:function(){t.onDone,t.onError;var e=Rl(t,["onDone","onError"]);return F(F({},e),{type:Fa,src:d1(t.src)})}})}var Lo="",Wa="#",ta="*",wr={},Sr=function(t){return t[0]===Wa},h1=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},p1=function(){function t(e,n,r,i){r===void 0&&(r="context"in e?e.context:void 0);var o=this,s;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(h1(),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:Zd),this.id=this.config.id||$e([this.machine.key],Ee(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:(s=this.config.schema)!==null&&s!==void 0?s:{},this.description=this.config.description,this.initial=this.config.initial,this.states=this.config.states?Si(this.config.states,function(u,f){var d,h=new t(u,{},void 0,{parent:o,key:f});return Object.assign(o.idMap,F((d={},d[h.id]=h,d),h.idMap)),h}):wr;var a=0;function l(u){var f,d;u.order=a++;try{for(var h=ye(nh(u)),v=h.next();!v.done;v=h.next()){var y=v.value;l(y)}}catch(g){f={error:g}}finally{try{v&&!v.done&&(d=h.return)&&d.call(h)}finally{if(f)throw f.error}}}l(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(u){var f=u.event;return f===Lo}):Lo in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=Vt(this.config.entry||this.config.onEntry).map(function(u){return zi(u)}),this.onExit=Vt(this.config.exit||this.config.onExit).map(function(u){return zi(u)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=Vt(this.config.invoke).map(function(u,f){var d,h;if(Jr(u)){var v=Co(o.id,f);return o.machine.options.services=F((d={},d[v]=u,d),o.machine.options.services),So({src:v,id:v})}else if(Re(u.src)){var v=u.id||Co(o.id,f);return So(F(F({},u),{id:v,src:u.src}))}else if(Jr(u.src)||Oe(u.src)){var v=u.id||Co(o.id,f);return o.machine.options.services=F((h={},h[v]=u.src,h),o.machine.options.services),So(F(F({id:v},u),{src:v}))}else{var y=u.src;return So(F(F({id:Co(o.id,f)},u),{src:y}))}}),this.activities=Vt(this.config.activities).concat(this.invoke).map(function(u){return jl(u)}),this.transition=this.transition.bind(this),this.tags=Vt(this.config.tags)}return t.prototype._init=function(){this.__cache.transitions||rh(this).forEach(function(e){return e.on})},t.prototype.withConfig=function(e,n){var r=this.options,i=r.actions,o=r.activities,s=r.guards,a=r.services,l=r.delays;return new t(this.config,{actions:F(F({},i),e.actions),activities:F(F({},o),e.activities),guards:F(F({},s),e.guards),services:F(F({},a),e.services),delays:F(F({},l),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 Oe(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:Si(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===Lo,r=this.transitions.filter(function(i){var o=i.eventType===e;return n?o:o||i.eventType===ta});return this.__cache.candidates[e]=r,r},t.prototype.getDelayedTransitions=function(){var e=this,n=this.config.after;if(!n)return[];var r=function(o,s){var a=Oe(o)?"".concat(e.id,":delay[").concat(s,"]"):o,l=qy(a,e.id);return e.onEntry.push(Uy(l,{delay:o})),e.onExit.push(Hy(l)),l},i=ii(n)?n.map(function(o,s){var a=r(o.delay,s);return F(F({},o),{event:a})}):Ze(Object.keys(n).map(function(o,s){var a=n[o],l=Re(a)?{target:a}:a,u=isNaN(+o)?o:+o,f=r(u,s);return Vt(l).map(function(d){return F(F({},d),{event:f,delay:u})})}));return i.map(function(o){var s=o.delay;return F(F({},e.formatTransition(o)),{delay:s})})},t.prototype.getStateNodes=function(e){var n,r=this;if(!e)return[];var i=e instanceof At?e.value:Pi(e,this.delimiter);if(Re(i)){var o=this.getStateNode(i).initial;return o!==void 0?this.getStateNodes((n={},n[i]=o,n)):[this,this.states[i]]}var s=Object.keys(i),a=[this];return a.push.apply(a,$e([],Ee(Ze(s.map(function(l){return r.getStateNode(l).getStateNodes(i[l])}))),!1)),a},t.prototype.handles=function(e){var n=qd(e);return this.events.includes(n)},t.prototype.resolveState=function(e){var n=e instanceof At?e:At.create(e),r=Array.from(xi([],this.getStateNodes(n.value)));return new At(F(F({},n),{value:this.resolve(n.value),configuration:r,done:Yo(r,this),tags:Ru(r),machine:this.machine}))},t.prototype.transitionLeafNode=function(e,n,r){var i=this.getStateNode(e),o=i.next(n,r);return!o||!o.transitions.length?this.next(n,r):o},t.prototype.transitionCompoundNode=function(e,n,r){var i=Object.keys(e),o=this.getStateNode(i[0]),s=o._transition(e[i[0]],n,r);return!s||!s.transitions.length?this.next(n,r):s},t.prototype.transitionParallelNode=function(e,n,r){var i,o,s={};try{for(var a=ye(Object.keys(e)),l=a.next();!l.done;l=a.next()){var u=l.value,f=e[u];if(f){var d=this.getStateNode(u),h=d._transition(f,n,r);h&&(s[u]=h)}}}catch(C){i={error:C}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}var v=Object.keys(s).map(function(C){return s[C]}),y=Ze(v.map(function(C){return C.transitions})),g=v.some(function(C){return C.transitions.length>0});if(!g)return this.next(n,r);var w=Ze(Object.keys(s).map(function(C){return s[C].configuration}));return{transitions:y,exitSet:Ze(v.map(function(C){return C.exitSet})),configuration:w,source:n,actions:Ze(Object.keys(s).map(function(C){return s[C].actions}))}},t.prototype._transition=function(e,n,r){return Re(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,at(n))},t.prototype.next=function(e,n){var r,i,o=this,s=n.name,a=[],l=[],u;try{for(var f=ye(this.getCandidates(s)),d=f.next();!d.done;d=f.next()){var h=d.value,v=h.cond,y=h.in,g=e.context,w=y?Re(y)&&Sr(y)?e.matches(Pi(this.getStateNodeById(y).path,this.delimiter)):Il(Pi(y,this.delimiter),Oy(this.path.slice(0,-2))(e.value)):!0,C=!1;try{C=!v||Yd(this.machine,v,g,n,e)}catch(_){throw new Error("Unable to evaluate guard '".concat(v.name||v.type,"' in transition for event '").concat(s,"' in state node '").concat(this.id,`':
|
|
42
|
-
`).concat(_.message))}if(C&&w){h.target!==void 0&&(l=h.target),a.push.apply(a,$e([],Ee(h.actions),!1)),u=h;break}}}catch(_){r={error:_}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}if(u){if(!l.length)return{transitions:[u],exitSet:[],configuration:e.value?[this]:[],source:e,actions:a};var L=Ze(l.map(function(_){return o.getRelativeStateNodes(_,e.historyValue)})),m=!!u.internal;return{transitions:[u],exitSet:m?[]:Ze(l.map(function(_){return o.getPotentiallyReenteringNodes(_)})),configuration:L,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,o,s,a){var l,u,f,d,h=this,v=s?xi([],this.getStateNodes(s.value)):[],y=new Set;try{for(var g=ye(Array.from(e).sort(function(T,P){return T.order-P.order})),w=g.next();!w.done;w=g.next()){var C=w.value;(!Ei(v,C)||Ei(r.exitSet,C)||C.parent&&y.has(C.parent))&&y.add(C)}}catch(T){l={error:T}}finally{try{w&&!w.done&&(u=g.return)&&u.call(g)}finally{if(l)throw l.error}}try{for(var L=ye(v),m=L.next();!m.done;m=L.next()){var C=m.value;(!Ei(e,C)||Ei(r.exitSet,C.parent))&&r.exitSet.push(C)}}catch(T){f={error:T}}finally{try{m&&!m.done&&(d=L.return)&&d.call(L)}finally{if(f)throw f.error}}r.exitSet.sort(function(T,P){return P.order-T.order});var _=Array.from(y).sort(function(T,P){return T.order-P.order}),E=new Set(r.exitSet),p=Ze(_.map(function(T){var P=[];if(T.type!=="final")return P;var R=T.parent;if(!R.parent)return P;P.push(wo(T.id,T.doneData),wo(R.id,T.doneData?us(T.doneData,i,o):void 0));var I=R.parent;return I.type==="parallel"&&Hi(I).every(function(B){return Yo(r.configuration,B)})&&P.push(wo(I.id)),P})),b=_.map(function(T){var P=T.onEntry,R=T.activities.map(function(I){return $y(I)});return{type:"entry",actions:Tn(a?$e($e([],Ee(P),!1),Ee(R),!1):$e($e([],Ee(R),!1),Ee(P),!1),h.machine.options.actions)}}).concat({type:"state_done",actions:p.map(function(T){return By(T)})}),x=Array.from(E).map(function(T){return{type:"exit",actions:Tn($e($e([],Ee(T.onExit),!1),Ee(T.activities.map(function(P){return Wy(P)})),!1),h.machine.options.actions)}}),M=x.concat({type:"transition",actions:Tn(r.actions,this.machine.options.actions)}).concat(b);if(n){var O=Tn(Ze($e([],Ee(e),!1).sort(function(T,P){return P.order-T.order}).map(function(T){return T.onExit})),this.machine.options.actions).filter(function(T){return!za(T)});return M.concat({type:"stop",actions:O})}return M},t.prototype.transition=function(e,n,r,i){e===void 0&&(e=this.initialState);var o=at(n),s;if(e instanceof At)s=r===void 0?e:this.resolveState(At.from(e,r));else{var a=Re(e)?this.resolve(ls(this.getResolvedPath(e))):this.resolve(e),l=r??this.machine.context;s=this.resolveState(At.from(a,l))}if(this.strict&&!this.events.includes(o.name)&&!ky(o.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(o.name,"'"));var u=this._transition(s.value,s,o)||{transitions:[],configuration:[],exitSet:[],source:s,actions:[]},f=xi([],this.getStateNodes(s.value)),d=u.configuration.length?xi(f,u.configuration):f;return u.configuration=$e([],Ee(d),!1),this.resolveTransition(u,s,s.context,i,o)},t.prototype.resolveRaisedTransition=function(e,n,r,i){var o,s=e.actions;return e=this.transition(e,n,void 0,i),e._event=r,e.event=r.data,(o=e.actions).unshift.apply(o,$e([],Ee(s),!1)),e},t.prototype.resolveTransition=function(e,n,r,i,o){var s,a,l,u,f=this;o===void 0&&(o=kr);var d=e.configuration,h=!n||e.transitions.length>0,v=h?e.configuration:n?n.configuration:[],y=Yo(v,this),g=h?e1(this.machine,d):void 0,w=n?n.historyValue?n.historyValue:e.source?this.machine.historyValue(n.value):void 0:void 0,C=this.getActions(new Set(v),y,e,r,o,n,i),L=n?F({},n.activities):{};try{for(var m=ye(C),_=m.next();!_.done;_=m.next()){var E=_.value;try{for(var p=(l=void 0,ye(E.actions)),b=p.next();!b.done;b=p.next()){var x=b.value;x.type===Ba?L[x.activity.id||x.activity.type]=x:x.type===Dl&&(L[x.activity.id||x.activity.type]=!1)}}catch(te){l={error:te}}finally{try{b&&!b.done&&(u=p.return)&&u.call(p)}finally{if(l)throw l.error}}}}catch(te){s={error:te}}finally{try{_&&!_.done&&(a=m.return)&&a.call(m)}finally{if(s)throw s.error}}var M=Ee(cs(this,n,r,o,C,i,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),O=M[0],T=M[1],P=Ee(Ry(O,za),2),R=P[0],I=P[1],B=O.filter(function(te){var ee;return te.type===Ba&&((ee=te.activity)===null||ee===void 0?void 0:ee.type)===Fa}),V=B.reduce(function(te,ee){return te[ee.activity.id]=Qy(ee.activity,f.machine,T,o),te},n?F({},n.children):{}),N=new At({value:g||n.value,context:T,_event:o,_sessionid:n?n._sessionid:null,historyValue:g?w?Dy(w,g):void 0:n?n.historyValue:void 0,history:!g||e.source?n:void 0,actions:g?I:[],activities:g?L:n?n.activities:{},events:[],configuration:v,transitions:e.transitions,children:V,done:y,tags:Ru(v),machine:this}),z=r!==T;N.changed=o.name===Gd||z;var Y=N.history;Y&&delete Y.history;var G=!y&&(this._transient||d.some(function(te){return te._transient}));if(!h&&(!G||o.name===Lo))return N;var H=N;if(!y)for(G&&(H=this.resolveRaisedTransition(H,{type:wy},o,i));R.length;){var Q=R.shift();H=this.resolveRaisedTransition(H,Q._event,o,i)}var oe=H.changed||(Y?!!H.actions.length||z||typeof Y.value!=typeof H.value||!oh(H.value,Y.value):void 0);return H.changed=oe,H.history=Y,H},t.prototype.getStateNode=function(e){if(Sr(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=Sr(e)?e.slice(Wa.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"&&Sr(e))try{return this.getStateNodeById(e.slice(1))}catch{}for(var n=Va(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||wr;switch(this.type){case"parallel":return Si(this.initialStateValue,function(o,s){return o?r.getStateNode(s).resolve(e[s]||o):wr});case"compound":if(Re(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?Si(e,function(o,s){return o?r.getStateNode(s).resolve(o):wr}):this.initialStateValue||{};default:return e||wr}},t.prototype.getResolvedPath=function(e){if(Sr(e)){var n=this.machine.idMap[e.slice(Wa.length)];if(!n)throw new Error("Unable to find state node '".concat(e,"'"));return n.path}return Va(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=Pu(this.states,function(r){return r.initialStateValue||wr},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=fs(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;Re(n.target)?e=Sr(n.target)?ls(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(fs(this))return[this];if(this.type==="compound"&&!this.initial)return[this];var n=Ko(this.initialStateValue);return Ze(n.map(function(r){return e.getFromRelativePath(r)}))},enumerable:!1,configurable:!0}),t.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var n=Ee(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 o=this.getStateNode(r);if(o.type==="history")return o.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:Pu(this.states,function(n,r){if(!e)return n.historyValue();var i=Re(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?Ze(Ko(i).map(function(s){return r.getFromRelativePath(s)})):r.initialStateNodes}var o=Py(r.path,"states")(e).current;return Re(o)?[r.getStateNode(o)]:Ze(Ko(o).map(function(s){return n.history==="deep"?r.getFromRelativePath(s):[r.states[s[0]]]}))},Object.defineProperty(t.prototype,"stateIds",{get:function(){var e=this,n=Ze(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 o=this.states,s=new Set(this.ownEvents);if(o)try{for(var a=ye(Object.keys(o)),l=a.next();!l.done;l=a.next()){var u=l.value,f=o[u];if(f.states)try{for(var d=(r=void 0,ye(f.events)),h=d.next();!h.done;h=d.next()){var v=h.value;s.add("".concat(v))}}catch(y){r={error:y}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}}}catch(y){e={error:y}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(s)},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(!Re(r))return r;var i=r[0]===n.delimiter;if(i&&!n.parent)return n.getStateNodeByPath(r.slice(1));var o=i?n.key+r:r;if(n.parent)try{var s=n.parent.getStateNodeByPath(o);return s}catch(a){throw new Error("Invalid transition definition for state node '".concat(n.id,`':
|
|
43
|
-
`).concat(a.message))}else return n.getStateNodeByPath(o)})},t.prototype.formatTransition=function(e){var n=this,r=Ny(e.target),i="internal"in e?e.internal:r?r.some(function(l){return Re(l)&&l[0]===n.delimiter}):!0,o=this.machine.options.guards,s=this.resolveTarget(r),a=F(F({},e),{actions:Tn(Vt(e.actions)),cond:Jd(e.cond,o),target:s,source:this,internal:i,eventType:e.event,toJSON:function(){return F(F({},a),{target:a.target?a.target.map(function(l){return"#".concat(l.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 o=this.config.on,s=ta,a=o[s],l=a===void 0?[]:a,u=Rl(o,[typeof s=="symbol"?s:s+""]);i=Ze(Object.keys(u).map(function(L){var m=Cr(L,u[L]);return m}).concat(Cr(ta,l)))}var f=this.config.always?Cr("",this.config.always):[],d=this.config.onDone?Cr(String(wo(this.id)),this.config.onDone):[],h=Ze(this.invoke.map(function(L){var m=[];return L.onDone&&m.push.apply(m,$e([],Ee(Cr(String(Jo(L.id)),L.onDone)),!1)),L.onError&&m.push.apply(m,$e([],Ee(Cr(String(Li(L.id)),L.onError)),!1)),m})),v=this.after,y=Ze($e($e($e($e([],Ee(d),!1),Ee(h),!1),Ee(i),!1),Ee(f),!1).map(function(L){return Vt(L).map(function(m){return r.formatTransition(m)})}));try{for(var g=ye(v),w=g.next();!w.done;w=g.next()){var C=w.value;y.push(C)}}catch(L){e={error:L}}finally{try{w&&!w.done&&(n=g.return)&&n.call(g)}finally{if(e)throw e.error}}return y},t}();function g1(t,e,n){return n===void 0&&(n=t.context),new p1(t,e,n)}var v1=Zy,Ga;(function(t){t[t.Effect=1]="Effect",t[t.LayoutEffect=2]="LayoutEffect"})(Ga||(Ga={}));var ki=c.useLayoutEffect;function Au(t){var e=U.useRef();return e.current||(e.current={v:t()}),e.current.v}var m1=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},y1=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 b1(t,e){var n,r,i=m1([[],[]],2),o=i[0],s=i[1];try{for(var a=y1(t),l=a.next();!l.done;l=a.next()){var u=l.value;e(u)?o.push(u):s.push(u)}}catch(f){n={error:f}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[o,s]}var pi=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Iu=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))};function ju(t,e){var n=t.exec,r=n(e.context,e._event.data,{action:t,state:e,_event:e._event});r()}function C1(t){var e=c.useRef([]),n=c.useRef([]);ki(function(){var r=t.subscribe(function(i){var o,s;if(i.actions.length){var a=i.actions.filter(function(d){return typeof d.exec=="function"&&"__effect"in d.exec}),l=pi(b1(a,function(d){return d.exec.__effect===Ga.Effect}),2),u=l[0],f=l[1];(o=e.current).push.apply(o,Iu([],pi(u.map(function(d){return[d,i]})),!1)),(s=n.current).push.apply(s,Iu([],pi(f.map(function(d){return[d,i]})),!1))}});return function(){r.unsubscribe()}},[]),ki(function(){for(;n.current.length;){var r=pi(n.current.shift(),2),i=r[0],o=r[1];ju(i,o)}}),c.useEffect(function(){for(;e.current.length;){var r=pi(e.current.shift(),2),i=r[0],o=r[1];ju(i,o)}})}var Ti=function(){return Ti=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},Ti.apply(this,arguments)},w1=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 S1(t,e,n){if(typeof t=="object")return t;var r=function(){};return{next:t,error:e||r,complete:n||r}}function L1(t,e,n){e===void 0&&(e={});var r=Au(function(){return typeof t=="function"?t():t}),i=e.context,o=e.guards,s=e.actions,a=e.activities,l=e.services,u=e.delays,f=e.state,d=w1(e,["context","guards","actions","activities","services","delays","state"]),h=Au(function(){var v={context:i,guards:o,actions:s,activities:a,services:l,delays:u},y=r.withConfig(v,function(){return Ti(Ti({},r.context),i)});return sh(y,Ti({deferEvents:!0},d))});return ki(function(){var v;return n&&(v=h.subscribe(S1(n))),function(){v==null||v.unsubscribe()}},[n]),ki(function(){return h.start(f?At.create(f):void 0),function(){h.stop()}},[]),ki(function(){Object.assign(h.machine.options.actions,s),Object.assign(h.machine.options.guards,o),Object.assign(h.machine.options.activities,a),Object.assign(h.machine.options.services,l),Object.assign(h.machine.options.delays,u)},[s,o,a,l,u]),C1(h),h}var x1=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function E1(t,e){e===void 0&&(e={});var n=c.useCallback(function(a){var l=a.changed===void 0&&Object.keys(a.children).length;(a.changed||l)&&s(a)},[]),r=L1(t,e,n),i=x1(c.useState(function(){var a=r.machine.initialState;return e.state?At.create(e.state):a}),2),o=i[0],s=i[1];return[o,r.send,r]}function Ke(){return Ke=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},Ke.apply(this,arguments)}function Tr(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}const de={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(de.str(t)||de.num(t))return t===e;if(de.obj(t)&&de.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 de.und(n)?t===e:!0}};function _1(t,e){return e===void 0&&(e=!0),n=>(de.arr(n)?n:Object.keys(n)).reduce((r,i)=>{const o=e?i[0].toLowerCase()+i.substring(1):i;return r[o]=t(o),r},t)}function M1(){const t=c.useState(!1),e=t[1];return c.useCallback(()=>e(r=>!r),[])}function Kn(t,e){return de.und(t)||de.nul(t)?e:t}function xo(t){return de.und(t)?[]:de.arr(t)?t:[t]}function Or(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 de.fun(t)?t(...n):t}function O1(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,Tr(t,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}function na(t){const e=O1(t);if(de.und(e))return Ke({to:e},t);const n=Object.keys(t).reduce((r,i)=>de.und(e[i])?Ke({},r,{[i]:t[i]}):r,{});return Ke({to:e},n)}function P1(t,e){return e&&(de.fun(e)?e(t):de.obj(e)&&(e.current=t)),t}class $t{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 Za extends $t{constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach(e=>e instanceof $t&&e.addChild(this)),this.detach=()=>this.payload.forEach(e=>e instanceof $t&&e.removeChild(this))}}class ah extends $t{constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach(e=>e instanceof $t&&e.addChild(this)),this.detach=()=>Object.values(this.payload).forEach(e=>e instanceof $t&&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 $t)||(n[r]=i instanceof $t?i[e?"getAnimatedValue":"getValue"]():i)}return n}getAnimatedValue(){return this.getValue(!0)}}let Bl;function k1(t,e){Bl={fn:t,transform:e}}let lh;function T1(t){lh=t}let uh=t=>typeof window<"u"?window.requestAnimationFrame(t):-1,ds;function R1(t){ds=t}let ch=()=>Date.now(),D1=t=>t.current,fh;function A1(t){fh=t}class I1 extends ah{constructor(e,n){super(),this.update=void 0,this.payload=e.style?Ke({},e,{style:fh(e.style)}):e,this.update=n,this.attach()}}const j1=t=>de.fun(t)&&!(t.prototype instanceof c.Component),N1=t=>c.forwardRef((n,r)=>{const i=M1(),o=c.useRef(!0),s=c.useRef(null),a=c.useRef(null),l=c.useCallback(h=>{const v=s.current,y=()=>{let g=!1;a.current&&(g=Bl.fn(a.current,s.current.getAnimatedValue())),(!a.current||g===!1)&&i()};s.current=new I1(h,y),v&&v.detach()},[]);c.useEffect(()=>()=>{o.current=!1,s.current&&s.current.detach()},[]),c.useImperativeHandle(r,()=>D1(a)),l(n);const u=s.current.getValue();u.scrollTop,u.scrollLeft;const f=Tr(u,["scrollTop","scrollLeft"]),d=j1(t)?void 0:h=>a.current=P1(h,r);return c.createElement(t,Ke({},f,{ref:d}))});let Ri=!1;const fr=new Set,dh=()=>{if(!Ri)return!1;let t=ch();for(let e of fr){let n=!1;for(let r=0;r<e.configs.length;r++){let i=e.configs[r],o,s;for(let a=0;a<i.animatedValues.length;a++){let l=i.animatedValues[a];if(l.done)continue;let u=i.fromValues[a],f=i.toValues[a],d=l.lastPosition,h=f instanceof $t,v=Array.isArray(i.initialVelocity)?i.initialVelocity[a]:i.initialVelocity;if(h&&(f=f.getValue()),i.immediate){l.setValue(f),l.done=!0;continue}if(typeof u=="string"||typeof f=="string"){l.setValue(f),l.done=!0;continue}if(i.duration!==void 0)d=u+i.easing((t-l.startTime)/i.duration)*(f-u),o=t>=l.startTime+i.duration;else if(i.decay)d=u+v/(1-.998)*(1-Math.exp(-(1-.998)*(t-l.startTime))),o=Math.abs(l.lastPosition-d)<.1,o&&(f=d);else{s=l.lastTime!==void 0?l.lastTime:t,v=l.lastVelocity!==void 0?l.lastVelocity:i.initialVelocity,t>s+64&&(s=t);let y=Math.floor(t-s);for(let L=0;L<y;++L){let m=-i.tension*(d-f),_=-i.friction*v,E=(m+_)/i.mass;v=v+E*1/1e3,d=d+v*1/1e3}let g=i.clamp&&i.tension!==0?u<f?d>f:d<f:!1,w=Math.abs(v)<=i.precision,C=i.tension!==0?Math.abs(f-d)<=i.precision:!0;o=g||w&&C,l.lastVelocity=v,l.lastTime=t}h&&!i.toValues[a].done&&(o=!1),o?(l.value!==f&&(d=f),l.done=!0):n=!0,l.setValue(d),l.lastPosition=d}e.props.onFrame&&(e.values[i.name]=i.interpolation.getValue())}e.props.onFrame&&e.props.onFrame(e.values),n||(fr.delete(e),e.stop(!0))}return fr.size?uh(dh):Ri=!1,Ri},B1=t=>{fr.has(t)||fr.add(t),Ri||(Ri=!0,uh(dh))},F1=t=>{fr.has(t)&&fr.delete(t)};function hs(t,e,n){if(typeof t=="function")return t;if(Array.isArray(t))return hs({range:t,output:e,extrapolate:n});if(ds&&typeof t.output[0]=="string")return ds(t);const r=t,i=r.output,o=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(u=>u);return u=>{const f=V1(u,o);return U1(u,o[f],o[f+1],i[f],i[f+1],l,s,a,r.map)}}function U1(t,e,n,r,i,o,s,a,l){let u=l?l(t):t;if(u<e){if(s==="identity")return u;s==="clamp"&&(u=e)}if(u>n){if(a==="identity")return u;a==="clamp"&&(u=n)}return r===i?r:e===n?t<=e?r:i:(e===-1/0?u=-u:n===1/0?u=u-e:u=(u-e)/(n-e),u=o(u),r===-1/0?u=-u:i===1/0?u=u+r:u=u*(i-r)+r,u)}function V1(t,e){for(var n=1;n<e.length-1&&!(e[n]>=t);++n);return n-1}class Yr extends Za{constructor(e,n,r,i){super(),this.calc=void 0,this.payload=e instanceof Za&&!(e instanceof Yr)?e.getPayload():Array.isArray(e)?e:[e],this.calc=hs(n,r,i)}getValue(){return this.calc(...this.payload.map(e=>e.getValue()))}updateConfig(e,n,r){this.calc=hs(e,n,r)}interpolate(e,n,r){return new Yr(this,e,n,r)}}const Lr=(t,e,n)=>t&&new Yr(t,e,n),z1={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 hh(t,e){"update"in t?e.add(t):t.getChildren().forEach(n=>hh(n,e))}class qa extends $t{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&&hh(this,this.animatedStyles),this.animatedStyles.forEach(e=>e.update())}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,n,r){return new Yr(this,e,n,r)}}class H1 extends Za{constructor(e){super(),this.payload=e.map(n=>new qa(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 Yr(this,e,n)}}let $1=0,W1=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=$1++}update(e){if(!e)return this;const n=na(e),r=n.delay,i=r===void 0?0:r,o=n.to,s=Tr(n,["delay","to"]);if(de.arr(o)||de.fun(o))this.queue.push(Ke({},s,{delay:i,to:o}));else if(o){let a={};Object.entries(o).forEach(l=>{let u=l[0],f=l[1];const d=Ke({to:{[u]:f},delay:Or(i,u)},s),h=a[d.delay]&&a[d.delay].to;a[d.delay]=Ke({},a[d.delay],d,{to:Ke({},h,d.to)})}),this.queue=Object.values(a)}return this.queue=this.queue.sort((a,l)=>a.delay-l.delay),this.diff(s),this}start(e){if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach(i=>{let o=i.from,s=o===void 0?{}:o,a=i.to,l=a===void 0?{}:a;de.obj(s)&&(this.merged=Ke({},s,this.merged)),de.obj(l)&&(this.merged=Ke({},this.merged,l))});const n=this.local=++this.guid,r=this.localQueue=this.queue;this.queue=[],r.forEach((i,o)=>{let s=i.delay,a=Tr(i,["delay"]);const l=f=>{o===r.length-1&&n===this.guid&&f&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),e&&e()};let u=de.arr(a.to)||de.fun(a.to);s?setTimeout(()=>{n===this.guid&&(u?this.runAsync(a,l):this.diff(a).start(l))},s):u?this.runAsync(a,l):this.diff(a).start(l)})}else de.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),B1(this);return this}stop(e){return this.listeners.forEach(n=>n(e)),this.listeners=[],this}pause(e){return this.stop(!0),e&&F1(this),this}runAsync(e,n){var r=this;e.delay;let i=Tr(e,["delay"]);const o=this.local;let s=Promise.resolve(void 0);if(de.arr(i.to))for(let a=0;a<i.to.length;a++){const l=a,u=Ke({},i,na(i.to[l]));de.arr(u.config)&&(u.config=u.config[l]),s=s.then(()=>{if(o===this.guid)return new Promise(f=>this.diff(u).start(f))})}else if(de.fun(i.to)){let a=0,l;s=s.then(()=>i.to(u=>{const f=Ke({},i,na(u));if(de.arr(f.config)&&(f.config=f.config[a]),a++,o===this.guid)return l=new Promise(d=>this.diff(f).start(d))},function(u){return u===void 0&&(u=!0),r.stop(u)}).then(()=>l))}s.then(n)}diff(e){this.props=Ke({},this.props,e);let n=this.props,r=n.from,i=r===void 0?{}:r,o=n.to,s=o===void 0?{}:o,a=n.config,l=a===void 0?{}:a,u=n.reverse,f=n.attach,d=n.reset,h=n.immediate;if(u){var v=[s,i];i=v[0],s=v[1]}this.merged=Ke({},i,this.merged,s),this.hasChanged=!1;let y=f&&f(this);if(this.animations=Object.entries(this.merged).reduce((g,w)=>{let C=w[0],L=w[1],m=g[C]||{};const _=de.num(L),E=de.str(L)&&!L.startsWith("#")&&!/\d/.test(L)&&!lh[L],p=de.arr(L),b=!_&&!p&&!E;let x=de.und(i[C])?L:i[C],M=_||p||E?L:1,O=Or(l,C);y&&(M=y.animations[C].parent);let T=m.parent,P=m.interpolation,R=xo(y?M.getPayload():M),I,B=L;b&&(B=ds({range:[0,1],output:[L,L]})(1));let V=P&&P.getValue();const z=!de.und(T)&&m.animatedValues.some(Q=>!Q.done),Y=!de.equ(B,V),G=!de.equ(B,m.previous),H=!de.equ(O,m.config);if(d||G&&Y||H){if(_||E)T=P=m.parent||new qa(x);else if(p)T=P=m.parent||new H1(x);else if(b){let Q=m.interpolation&&m.interpolation.calc(m.parent.value);Q=Q!==void 0&&!d?Q:x,m.parent?(T=m.parent,T.setValue(0,!1)):T=new qa(0);const oe={output:[Q,L]};m.interpolation?(P=m.interpolation,m.interpolation.updateConfig(oe)):P=T.interpolate(oe)}return R=xo(y?M.getPayload():M),I=xo(T.getPayload()),d&&!b&&T.setValue(x,!1),this.hasChanged=!0,I.forEach(Q=>{Q.startPosition=Q.value,Q.lastPosition=Q.value,Q.lastVelocity=z?Q.lastVelocity:void 0,Q.lastTime=z?Q.lastTime:void 0,Q.startTime=ch(),Q.done=!1,Q.animatedStyles.clear()}),Or(h,C)&&T.setValue(b?M:L,!1),Ke({},g,{[C]:Ke({},m,{name:C,parent:T,interpolation:P,animatedValues:I,toValues:R,previous:B,config:O,fromValues:xo(T.getValue()),immediate:Or(h,C),initialVelocity:Kn(O.velocity,0),clamp:Kn(O.clamp,!1),precision:Kn(O.precision,.01),tension:Kn(O.tension,170),friction:Kn(O.friction,26),mass:Kn(O.mass,1),duration:O.duration,easing:Kn(O.easing,Q=>Q),decay:O.decay})})}else return Y?g:(b&&(T.setValue(1,!1),P.updateConfig({output:[B,B]})),T.done=!0,this.hasChanged=!0,Ke({},g,{[C]:Ke({},g[C],{previous:B})}))},this.animations),this.hasChanged){this.configs=Object.values(this.animations),this.values={},this.interpolations={};for(let g in this.animations)this.interpolations[g]=this.animations[g].interpolation,this.values[g]=this.animations[g].interpolation.getValue()}return this}destroy(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0}};const G1=(t,e)=>{const n=c.useRef(!1),r=c.useRef(),i=de.fun(e),o=c.useMemo(()=>{r.current&&(r.current.map(d=>d.destroy()),r.current=void 0);let f;return[new Array(t).fill().map((d,h)=>{const v=new W1,y=i?Or(e,h,v):e[h];return h===0&&(f=y.ref),v.update(y),f||v.start(),v}),f]},[t]),s=o[0],a=o[1];r.current=s,c.useImperativeHandle(a,()=>({start:()=>Promise.all(r.current.map(f=>new Promise(d=>f.start(d)))),stop:f=>r.current.forEach(d=>d.stop(f)),get controllers(){return r.current}}));const l=c.useMemo(()=>f=>r.current.map((d,h)=>{d.update(i?Or(f,h,d):f[h]),a||d.start()}),[t]);c.useEffect(()=>{n.current?i||l(e):a||r.current.forEach(f=>f.start())}),c.useEffect(()=>(n.current=!0,()=>r.current.forEach(f=>f.destroy())),[]);const u=r.current.map(f=>f.getValues());return i?[u,l,f=>r.current.forEach(d=>d.pause(f))]:u},Z1=t=>{const e=de.fun(t),n=G1(1,e?t:[t]),r=n[0],i=n[1],o=n[2];return e?[r[0],i,o]:r};class q1 extends ah{constructor(e){e===void 0&&(e={}),super(),e.transform&&!(e.transform instanceof $t)&&(e=Bl.transform(e)),this.payload=e}}const ps={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},Wt="[-+]?\\d*\\.?\\d+",gs=Wt+"%";function Is(){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 K1=new RegExp("rgb"+Is(Wt,Wt,Wt)),Q1=new RegExp("rgba"+Is(Wt,Wt,Wt,Wt)),J1=new RegExp("hsl"+Is(Wt,gs,gs)),Y1=new RegExp("hsla"+Is(Wt,gs,gs,Wt)),X1=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,eb=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,tb=/^#([0-9a-fA-F]{6})$/,nb=/^#([0-9a-fA-F]{8})$/;function rb(t){let e;return typeof t=="number"?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=tb.exec(t))?parseInt(e[1]+"ff",16)>>>0:ps.hasOwnProperty(t)?ps[t]:(e=K1.exec(t))?(xr(e[1])<<24|xr(e[2])<<16|xr(e[3])<<8|255)>>>0:(e=Q1.exec(t))?(xr(e[1])<<24|xr(e[2])<<16|xr(e[3])<<8|Fu(e[4]))>>>0:(e=X1.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=nb.exec(t))?parseInt(e[1],16)>>>0:(e=eb.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=J1.exec(t))?(Nu(Bu(e[1]),Eo(e[2]),Eo(e[3]))|255)>>>0:(e=Y1.exec(t))?(Nu(Bu(e[1]),Eo(e[2]),Eo(e[3]))|Fu(e[4]))>>>0:null}function ra(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 Nu(t,e,n){const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,o=ra(i,r,t+1/3),s=ra(i,r,t),a=ra(i,r,t-1/3);return Math.round(o*255)<<24|Math.round(s*255)<<16|Math.round(a*255)<<8}function xr(t){const e=parseInt(t,10);return e<0?0:e>255?255:e}function Bu(t){return(parseFloat(t)%360+360)%360/360}function Fu(t){const e=parseFloat(t);return e<0?0:e>1?255:Math.round(e*255)}function Eo(t){const e=parseFloat(t);return e<0?0:e>100?1:e/100}function Uu(t){let e=rb(t);if(e===null)return t;e=e||0;let n=(e&4278190080)>>>24,r=(e&16711680)>>>16,i=(e&65280)>>>8,o=(e&255)/255;return`rgba(${n}, ${r}, ${i}, ${o})`}const _o=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ib=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ob=new RegExp(`(${Object.keys(ps).join("|")})`,"g"),sb=t=>{const e=t.output.map(i=>i.replace(ib,Uu)).map(i=>i.replace(ob,Uu)),n=e[0].match(_o).map(()=>[]);e.forEach(i=>{i.match(_o).forEach((o,s)=>n[s].push(+o))});const r=e[0].match(_o).map((i,o)=>hs(Ke({},t,{output:n[o]})));return i=>{let o=0;return e[0].replace(_o,()=>r[o++](i)).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(s,a,l,u,f)=>`rgba(${Math.round(a)}, ${Math.round(l)}, ${Math.round(u)}, ${f})`)}};let Di={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 ab=(t,e)=>t+e.charAt(0).toUpperCase()+e.substring(1),lb=["Webkit","Ms","Moz","O"];Di=Object.keys(Di).reduce((t,e)=>(lb.forEach(n=>t[ab(n,e)]=t[e]),t),Di);function ub(t,e,n){return e==null||typeof e=="boolean"||e===""?"":!n&&typeof e=="number"&&e!==0&&!(Di.hasOwnProperty(t)&&Di[t])?e+"px":(""+e).trim()}const Vu={};A1(t=>new q1(t));R1(sb);T1(ps);k1((t,e)=>{if(t.nodeType&&t.setAttribute!==void 0){const i=e.style,o=e.children,s=e.scrollTop,a=e.scrollLeft,l=Tr(e,["style","children","scrollTop","scrollLeft"]),u=t.nodeName==="filter"||t.parentNode&&t.parentNode.nodeName==="filter";s!==void 0&&(t.scrollTop=s),a!==void 0&&(t.scrollLeft=a),o!==void 0&&(t.textContent=o);for(let f in i)if(i.hasOwnProperty(f)){var n=f.indexOf("--")===0,r=ub(f,i[f],n);f==="float"&&(f="cssFloat"),n?t.style.setProperty(f,r):t.style[f]=r}for(let f in l){const d=u?f:Vu[f]||(Vu[f]=f.replace(/([A-Z])/g,h=>"-"+h.toLowerCase()));typeof t.getAttribute(d)<"u"&&t.setAttribute(d,l[f])}return}else return!1},t=>t);const cb=["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"],fb=_1(N1,!1),db=fb(cb);function zu(t,e){return t.map(function(n,r){return n+e[r]})}function ph(t,e){return t.map(function(n,r){return n-e[r]})}function Ka(t){return Math.hypot.apply(Math,t)}function hb(t,e,n){var r=Ka(e),i=r===0?0:1/r,o=n===0?0:1/n,s=o*r,a=e.map(function(f){return o*f}),l=e.map(function(f){return i*f}),u=Ka(t);return{velocities:a,velocity:s,distance:u,direction:l}}function Qa(t){return Math.sign?Math.sign(t):+(t>0)-+(t<0)||+t}function pb(t,e,n){return Math.max(e,Math.min(t,n))}function gb(t,e){return Math.pow(t,e*5)}function Hu(t,e,n){return e===0||Math.abs(e)===1/0?gb(t,n):t*e*n/(e+n*t)}function Ai(t,e,n,r){return r===void 0&&(r=.15),r===0?pb(t,e,n):t<e?-Hu(e-t,n-e,r)+e:t>n?+Hu(t-n,n-e,r)+n:t}function $u(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 vb(t,e,n){return e&&$u(t.prototype,e),n&&$u(t,n),t}function yt(){return yt=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},yt.apply(this,arguments)}function gh(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function mb(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Mo(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function yb(t,e){if(t){if(typeof t=="string")return Wu(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 Wu(t,e)}}function Wu(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 js(t,e){var n;if(typeof Symbol>"u"||t[Symbol.iterator]==null){if(Array.isArray(t)||(n=yb(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 vh(){}function mh(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.length===0?vh:e.length===1?e[0]:function(){for(var r,i=js(e),o;!(o=i()).done;){var s=o.value;r=s.apply(this,arguments)||r}return r}}function Rn(t,e){if(t===void 0){if(e===void 0)throw new Error("Must define fallback value if undefined is expected");t=e}return Array.isArray(t)?t:[t,t]}function Oo(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 Fl(t,e){t===void 0&&(t={});for(var n={},r=0,i=Object.entries(e);r<i.length;r++){var o=i[r],s=o[0],a=o[1];switch(typeof a){case"function":n[s]=a.call(n,t[s],s,t);break;case"object":n[s]=Fl(t[s],a);break;case"boolean":a&&(n[s]=t[s]);break}}return n}var bb=180,Cb=.15,wb=.5,Sb=60,Lb={threshold:function(e){return e===void 0&&(e=0),Rn(e)},rubberband:function(e){switch(e===void 0&&(e=0),e){case!0:return Rn(Cb);case!1:return Rn(0);default:return Rn(e)}},enabled:function(e){return e===void 0&&(e=!0),e},triggerAllEvents:function(e){return e===void 0&&(e=!1),e},initial:function(e){return e===void 0&&(e=0),typeof e=="function"?e:Rn(e)}},yh=yt({},Lb,{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 yh.bounds(e(d))};var n=e,r=n.left,i=r===void 0?-1/0:r,o=n.right,s=o===void 0?1/0:o,a=n.top,l=a===void 0?-1/0:a,u=n.bottom,f=u===void 0?1/0:u;return[[i,s],[l,f]]}}),xb=typeof window<"u"&&window.document&&window.document.createElement,Eb={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=xb?window:void 0),t}),eventOptions:function(e){var n=e===void 0?{}:e,r=n.passive,i=r===void 0?!0:r,o=n.capture,s=o===void 0?!1:o;return{passive:i,capture:s}}},_b=yt({},yh,{threshold:function(e,n,r){var i=r.filterTaps,o=i===void 0?!1:i,s=r.lockDirection,a=s===void 0?!1:s,l=r.axis,u=l===void 0?void 0:l,f=Rn(e,o?3:a||u?1:0);return this.filterTaps=o||f[0]+f[1]>0,f},swipeVelocity:function(e){return e===void 0&&(e=wb),Rn(e)},swipeDistance:function(e){return e===void 0&&(e=Sb),Rn(e)},delay:function(e){switch(e===void 0&&(e=0),e){case!0:return bb;case!1:return 0;default:return e}}});function Mb(t){return t===void 0&&(t={}),Fl(t,Eb)}function Ob(t){return t===void 0&&(t={}),Fl(t,_b)}function Pb(t){var e=t.domTarget,n=t.eventOptions,r=t.window,i=t.enabled,o=mb(t,["domTarget","eventOptions","window","enabled"]),s=Mb({domTarget:e,eventOptions:n,window:r,enabled:i});return s.drag=Ob(o),s}function gi(t){return yt({_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:vh,canceled:!1,memo:void 0,args:void 0},t)}function bh(){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=gi({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=gi({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),r=gi({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),i=gi({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),o=gi({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:o}}var Yn=new Map,kb=function(){function t(n,r){var i=this;r===void 0&&(r=[]),this.controller=n,this.args=r,this.debounced=!0,this.setTimeout=function(o,s){var a;s===void 0&&(s=140),clearTimeout(i.controller.timeouts[i.stateKey]);for(var l=arguments.length,u=new Array(l>2?l-2:0),f=2;f<l;f++)u[f-2]=arguments[f];i.controller.timeouts[i.stateKey]=(a=window).setTimeout.apply(a,[o,s].concat(u))},this.clearTimeout=function(){clearTimeout(i.controller.timeouts[i.stateKey])},this.fireGestureHandler=function(o){if(o===void 0&&(o=!1),i.state._blocked)return i.debounced||(i.state._active=!1,i.clean()),null;if(!o&&!i.state.intentional&&!i.config.triggerAllEvents)return null;if(i.state.intentional){var s=i.state.active,a=i.state._active;i.state.active=a,i.state.first=a&&!s,i.state.last=s&&!a,i.controller.state.shared[i.ingKey]=a}var l=yt({},i.controller.state.shared,i.state,i.mapStateValues(i.state)),u=i.handler(l);return i.state.memo=u!==void 0?u:i.state.memo,i.state._active||i.clean(),l}}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,o=i.initial,s=i.bounds,a=i.rubberband,l=i.threshold,u=this.state,f=u._bounds,d=u._initial,h=u._active,v=u._intentional,y=u.lastOffset,g=u.movement,w=this.getInternalMovement(r,this.state),C=v[0]===!1?Gu(w[0],l[0]):v[0],L=v[1]===!1?Gu(w[1],l[1]):v[1],m=this.checkIntentionality([C,L],w);if(m._blocked)return yt({},m,{_movement:w,delta:[0,0]});var _=m._intentional,E=w,p,b;if(_[0]!==!1&&v[0]===!1&&(b=Oo(o,this.state),p=Oo(s,this.state),d[0]=b[0],f[0]=p[0]),_[1]!==!1&&v[1]===!1){var x,M;b=(x=b)!=null?x:Oo(o,this.state),p=(M=p)!=null?M:Oo(s,this.state),d[1]=b[1],f[1]=p[1]}var O=[_[0]!==!1?w[0]-_[0]:d[0],_[1]!==!1?w[1]-_[1]:d[1]],T=zu(O,y),P=h?a:[0,0];return O=Zu(f,zu(O,d),P),yt({},m,{intentional:_[0]!==!1||_[1]!==!1,_initial:d,_movement:E,movement:O,values:r,offset:Zu(f,T,P),delta:ph(O,g)})},e.clean=function(){this.clearTimeout()},vb(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 Gu(t,e){return Math.abs(t)>=e?Qa(t)*e:!1}function Zu(t,e,n){var r=e[0],i=e[1],o=n[0],s=n[1],a=t[0],l=a[0],u=a[1],f=t[1],d=f[0],h=f[1];return[Ai(r,l,u,o),Ai(i,d,h,s)]}function ia(t,e,n){var r=t.state,i=t.args,o=e.timeStamp,s=e.type,a=r.values,l=n?0:o-r.startTime;return{_lastEventType:s,event:e,timeStamp:o,elapsedTime:l,args:i,previous:a}}function Tb(t,e,n){var r=t.state.offset,i=n.timeStamp;return yt({},bh()[t.stateKey],{_active:!0,values:e,initial:e,offset:r,lastOffset:r,startTime:i})}function Rb(t,e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return t.call.apply(t,[this,yt({},e,{event:n})].concat(i))}}var Db=function(e){var n=this;this.classes=e,this.bind=function(){for(var r={},i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];for(var a=js(n.classes),l;!(l=a()).done;){var u=l.value;new u(n,o).addBindings(r)}for(var f=0,d=Object.entries(n.nativeRefs);f<d.length;f++){var h=d[f],v=h[0],y=h[1];Ja(r,v,Rb(y,yt({},n.state.shared,{args:o})))}return n.config.domTarget?Nb(n,r):Bb(n,r)},this.effect=function(){return n.config.domTarget&&n.bind(),n.clean},this.clean=function(){var r=wh(n.config),i=n.config.eventOptions;r&&lo(r,Ch(n.domListeners),i),Object.values(n.timeouts).forEach(clearTimeout),Ab(n)},this.state=bh(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function Ab(t){var e=t.config,n=e.window,r=e.eventOptions,i=t.windowListeners;if(n){for(var o in i){var s=i[o];lo(n,s,r)}t.windowListeners={}}}function Ib(t,e){var n=t.config,r=t.windowListeners;n.window&&(lo(n.window,r[e],n.eventOptions),delete r[e])}function jb(t,e,n){var r=t.config,i=t.windowListeners;n===void 0&&(n=[]),r.window&&(lo(r.window,i[e],r.eventOptions),Sh(r.window,i[e]=n,r.eventOptions))}function Nb(t,e){var n=t.config,r=t.domListeners,i=wh(n);if(!i)throw new Error("domTarget must be defined");var o=n.eventOptions;lo(i,Ch(r),o);for(var s=0,a=Object.entries(e);s<a.length;s++){var l=a[s],u=l[0],f=l[1],d=u.slice(2).toLowerCase();r.push([d,mh.apply(void 0,f)])}Sh(i,r,o)}function Bb(t,e){for(var n=t.config,r={},i=n.eventOptions.capture?"Capture":"",o=0,s=Object.entries(e);o<s.length;o++){var a=s[o],l=a[0],u=a[1],f=Array.isArray(u)?u:[u],d=l+i;r[d]=mh.apply(void 0,f)}return r}function Ch(t){return t===void 0&&(t=[]),t.splice(0,t.length)}function wh(t){var e=t.domTarget;return e&&"current"in e?e.current:e}function Ja(t,e,n){t[e]||(t[e]=[]),t[e].push(n)}function Sh(t,e,n){e===void 0&&(e=[]),n===void 0&&(n={});for(var r=js(e),i;!(i=r()).done;){var o=i.value,s=o[0],a=o[1];t.addEventListener(s,a,n)}}function lo(t,e,n){e===void 0&&(e=[]),n===void 0&&(n={});for(var r=js(e),i;!(i=r()).done;){var o=i.value,s=o[0],a=o[1];t.removeEventListener(s,a,n)}}function Fb(t,e,n){n===void 0&&(n={});var r=Vb(t),i=c.useMemo(function(){return new Db(r)},[]);return i.config=e,i.handlers=t,i.nativeRefs=n,c.useEffect(i.effect,[]),i.config.domTarget?Ub:i.bind}function Ub(){}function Vb(t){var e=new Set;return t.drag&&e.add(Yn.get("drag")),t.wheel&&e.add(Yn.get("wheel")),t.scroll&&e.add(Yn.get("scroll")),t.move&&e.add(Yn.get("move")),t.pinch&&e.add(Yn.get("pinch")),t.hover&&e.add(Yn.get("hover")),e}var zb=function(t){gh(e,t);function e(){return t.apply(this,arguments)||this}var n=e.prototype;return n.getInternalMovement=function(i,o){return ph(i,o.initial)},n.checkIntentionality=function(i,o){if(i[0]===!1&&i[1]===!1)return{_intentional:i,axis:this.state.axis};var s=o.map(Math.abs),a=s[0],l=s[1],u=this.state.axis||(a>l?"x":a<l?"y":void 0);return!this.config.axis&&!this.config.lockDirection?{_intentional:i,_blocked:!1,axis:u}:u?this.config.axis&&u!==this.config.axis?{_intentional:i,_blocked:!0,axis:u}:(i[u==="x"?1:0]=!1,{_intentional:i,_blocked:!1,axis:u}):{_intentional:[!1,!1],_blocked:!1,axis:u}},n.getKinematics=function(i,o){var s=this.getMovement(i);if(!s._blocked){var a=o.timeStamp-this.state.timeStamp;Object.assign(s,hb(s.movement,s.delta,a))}return s},n.mapStateValues=function(i){return{xy:i.values,vxvy:i.velocities}},e}(kb);function Lh(t){if("touches"in t){var e=t.targetTouches,n=t.changedTouches;return e.length>0?e:n}return null}function qu(t){var e="buttons"in t?t.buttons:0,n=Lh(t),r=n&&n.length||0,i=r>0||e>0,o=t.shiftKey,s=t.altKey,a=t.metaKey,l=t.ctrlKey;return{touches:r,down:i,buttons:e,shiftKey:o,altKey:s,metaKey:a,ctrlKey:l}}function Ku(t){var e=Lh(t),n=e?e[0]:t,r=n.clientX,i=n.clientY;return[r,i]}var Hb=3,$b=220,Wb=function(t){gh(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||(jb(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(Mo(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 o=qu(i);if(!o.down){r.onDragEnd(i);return}r.updateSharedState(o);var s=Ku(i),a=r.getKinematics(s,i),l=ia(Mo(r),i),u=r.state._isTap,f=Ka(a._movement);u&&f>=Hb&&(u=!1),r.updateGestureState(yt({},l,a,{_isTap:u})),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 o=r.state._isTap,s=r.state.velocities,a=s[0],l=s[1],u=r.state.movement,f=u[0],d=u[1],h=r.state._intentional,v=h[0],y=h[1],g=r.config.swipeVelocity,w=g[0],C=g[1],L=r.config.swipeDistance,m=L[0],_=L[1],E=yt({},ia(Mo(r),i),r.getMovement(r.state.values)),p=[0,0];E.elapsedTime<$b&&(v!==!1&&Math.abs(a)>w&&Math.abs(f)>m&&(p[0]=Qa(a)),y!==!1&&Math.abs(l)>C&&Math.abs(d)>_&&(p[1]=Qa(l))),r.updateGestureState(yt({},E,{tap:o,swipe:p})),r.fireGestureHandler(o===!0)}},r.clean=function(){t.prototype.clean.call(Mo(r)),r.state._delayedEvent=!1,Ib(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 o=Ku(i);this.updateSharedState(qu(i)),this.updateGestureState(yt({},Tb(this,o,i),ia(this,i,!0),{_pointerId:i.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(o)),this.fireGestureHandler()},n.addBindings=function(i){if(Ja(i,"onPointerDown",this.onDragStart),this.config.filterTaps){var o=this.controller.config.eventOptions.capture?"onClick":"onClickCapture";Ja(i,o,this.onClick)}},e}(zb);function Gb(t,e){var n,r=[],i,o=!1;function s(){for(var a=arguments.length,l=new Array(a),u=0;u<a;u++)l[u]=arguments[u];return o&&n===this&&e(l,r)||(i=t.apply(this,l),o=!0,n=this,r=l),i}return s}function Xo(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(!Xo(t[r],e[r]))return!1;return!0}var o;if(typeof Map=="function"&&t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(o=t.entries();!(r=o.next()).done;)if(!e.has(r.value[0]))return!1;for(o=t.entries();!(r=o.next()).done;)if(!Xo(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(o=t.entries();!(r=o.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)&&!Xo(t[i[r]],e[i[r]]))return!1;return!0}return t!==t&&e!==e}function Zb(t,e){try{return Xo(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 qb(t,e){e===void 0&&(e={}),Yn.set("drag",Wb);var n=c.useRef();return n.current||(n.current=Gb(Pb,Zb)),Fb({drag:t},n.current(e))}/*!
|
|
40
|
+
***************************************************************************** */var F=function(){return F=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},F.apply(this,arguments)};function Dl(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 ye(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 xe(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}function $e(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}var Fe;(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"})(Fe||(Fe={}));var Qr;(function(t){t.Parent="#_parent",t.Internal="#_internal"})(Qr||(Qr={}));var Fa=Fe.Start,Al=Fe.Stop,ao=Fe.Raise,Ds=Fe.Send,$d=Fe.Cancel,wy=Fe.NullEvent,Il=Fe.Assign;Fe.After;Fe.DoneState;var Wd=Fe.Log,Sy=Fe.Init,Ua=Fe.Invoke;Fe.ErrorExecution;var Ou=Fe.ErrorPlatform,Ly=Fe.ErrorCustom,Gd=Fe.Update,Ey=Fe.Choose,xy=Fe.Pure,Zd=".",Pu={},Va="xstate.guard",_y="",bo;function jl(t,e,n){n===void 0&&(n=Zd);var r=Pi(t,n),i=Pi(e,n);return Re(i)?Re(r)?i===r:!1:Re(r)?r in i:Object.keys(r).every(function(o){return o in i?jl(r[o],i[o]):!1})}function qd(t){try{return Re(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 za(t,e){try{return ii(t)?t:t.toString().split(e)}catch{throw new Error("'".concat(t,"' is not a valid state path."))}}function My(t){return typeof t=="object"&&"value"in t&&"context"in t&&"event"in t&&"_event"in t}function Pi(t,e){if(My(t))return t.value;if(ii(t))return ls(t);if(typeof t!="string")return t;var n=za(t,e);return ls(n)}function ls(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 Si(t,e){for(var n={},r=Object.keys(t),i=0;i<r.length;i++){var o=r[i];n[o]=e(t[o],o,t,i)}return n}function ku(t,e,n){var r,i,o={};try{for(var s=ye(Object.keys(t)),a=s.next();!a.done;a=s.next()){var l=a.value,u=t[l];n(u)&&(o[l]=e(u,l,t))}}catch(f){r={error:f}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o}var Oy=function(t){return function(e){var n,r,i=e;try{for(var o=ye(t),s=o.next();!s.done;s=o.next()){var a=s.value;i=i[a]}}catch(l){n={error:l}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}};function Py(t,e){return function(n){var r,i,o=n;try{for(var s=ye(t),a=s.next();!a.done;a=s.next()){var l=a.value;o=o[e][l]}}catch(u){r={error:u}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o}}function Ko(t){if(!t)return[[]];if(Re(t))return[[t]];var e=Ze(Object.keys(t).map(function(n){var r=t[n];return typeof r!="string"&&(!r||!Object.keys(r).length)?[[n]]:Ko(t[n]).map(function(i){return[n].concat(i)})}));return e}function Ze(t){var e;return(e=[]).concat.apply(e,$e([],xe(t),!1))}function Kd(t){return ii(t)?t:[t]}function Vt(t){return t===void 0?[]:Kd(t)}function us(t,e,n){var r,i;if(Oe(t))return t(e,n.data);var o={};try{for(var s=ye(Object.keys(t)),a=s.next();!a.done;a=s.next()){var l=a.value,u=t[l];Oe(u)?o[l]=u(e,n.data):o[l]=u}}catch(f){r={error:f}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o}function ky(t){return/^(done|error)\./.test(t)}function Tu(t){return!!(t instanceof Promise||t!==null&&(Oe(t)||typeof t=="object")&&Oe(t.then))}function Ty(t){return t!==null&&typeof t=="object"&&"transition"in t&&typeof t.transition=="function"}function Ry(t,e){var n,r,i=xe([[],[]],2),o=i[0],s=i[1];try{for(var a=ye(t),l=a.next();!l.done;l=a.next()){var u=l.value;e(u)?o.push(u):s.push(u)}}catch(f){n={error:f}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[o,s]}function Qd(t,e){return Si(t.states,function(n,r){if(n){var i=(Re(e)?void 0:e[r])||(n?n.current:void 0);if(i)return{current:i,states:Qd(n,i)}}})}function Dy(t,e){return{current:e,states:Qd(t,e)}}function Ru(t,e,n,r){var i=t&&n.reduce(function(o,s){var a,l,u=s.assignment,f={state:r,action:s,_event:e},d={};if(Oe(u))d=u(o,e.data,f);else try{for(var h=ye(Object.keys(u)),v=h.next();!v.done;v=h.next()){var y=v.value,g=u[y];d[y]=Oe(g)?g(o,e.data,f):g}}catch(w){a={error:w}}finally{try{v&&!v.done&&(l=h.return)&&l.call(h)}finally{if(a)throw a.error}}return Object.assign({},o,d)},t);return i}var Ay=function(){};function ii(t){return Array.isArray(t)}function Oe(t){return typeof t=="function"}function Re(t){return typeof t=="string"}function Jd(t,e){if(t)return Re(t)?{type:Va,name:t,predicate:e?e[t]:void 0}:Oe(t)?{type:Va,name:t.name,predicate:t}:t}function Iy(t){try{return"subscribe"in t&&Oe(t.subscribe)}catch{return!1}}var kn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();bo={},bo[kn]=function(){return this},bo[Symbol.observable]=function(){return this};function Jr(t){return!!t&&"__xstatenode"in t}function jy(t){return!!t&&typeof t.send=="function"}function As(t,e){return Re(t)||typeof t=="number"?F({type:t},e):t}function at(t,e){if(!Re(t)&&"$$type"in t&&t.$$type==="scxml")return t;var n=As(t);return F({name:n.type,data:n,$$type:"scxml",type:"external"},e)}function Cr(t,e){var n=Kd(e).map(function(r){return typeof r>"u"||typeof r=="string"||Jr(r)?{target:r,event:t}:F(F({},r),{event:t})});return n}function Ny(t){if(!(t===void 0||t===_y))return Vt(t)}function Yd(t,e,n,r,i){var o=t.options.guards,s={state:i,cond:e,_event:r};if(e.type===Va)return((o==null?void 0:o[e.name])||e.predicate)(n,r.data,s);var a=o==null?void 0:o[e.type];if(!a)throw new Error("Guard '".concat(e.type,"' is not implemented on machine '").concat(t.id,"'."));return a(n,r.data,s)}function Xd(t){return typeof t=="string"?{type:t}:t}function Qo(t,e,n){var r=function(){},i=typeof t=="object",o=i?t:null;return{next:((i?t.next:t)||r).bind(o),error:((i?t.error:e)||r).bind(o),complete:((i?t.complete:n)||r).bind(o)}}function Co(t,e){return"".concat(t,":invocation[").concat(e,"]")}function Ha(t){return(t.type===ao||t.type===Ds&&t.to===Qr.Internal)&&typeof t.delay!="number"}var kr=at({type:Sy});function $a(t,e){return e&&e[t]||void 0}function zi(t,e){var n;if(Re(t)||typeof t=="number"){var r=$a(t,e);Oe(r)?n={type:t,exec:r}:r?n=r:n={type:t,exec:void 0}}else if(Oe(t))n={type:t.name||t.toString(),exec:t};else{var r=$a(t.type,e);if(Oe(r))n=F(F({},t),{exec:r});else if(r){var i=r.type||t.type;n=F(F(F({},r),t),{type:i})}else n=t}return n}var Tn=function(t,e){if(!t)return[];var n=ii(t)?t:[t];return n.map(function(r){return zi(r,e)})};function Nl(t){var e=zi(t);return F(F({id:Re(t)?t:e.id},e),{type:e.type})}function By(t,e){return{type:ao,event:typeof t=="function"?t:As(t),delay:e?e.delay:void 0,id:e==null?void 0:e.id}}function Fy(t,e,n,r){var i={_event:n},o=at(Oe(t.event)?t.event(e,n.data,i):t.event),s;if(Re(t.delay)){var a=r&&r[t.delay];s=Oe(a)?a(e,n.data,i):a}else s=Oe(t.delay)?t.delay(e,n.data,i):t.delay;return F(F({},t),{type:ao,_event:o,delay:s})}function Uy(t,e){return{to:e?e.to:void 0,type:Ds,event:Oe(t)?t:As(t),delay:e?e.delay:void 0,id:e&&e.id!==void 0?e.id:Oe(t)?t.name:qd(t)}}function Vy(t,e,n,r){var i={_event:n},o=at(Oe(t.event)?t.event(e,n.data,i):t.event),s;if(Re(t.delay)){var a=r&&r[t.delay];s=Oe(a)?a(e,n.data,i):a}else s=Oe(t.delay)?t.delay(e,n.data,i):t.delay;var l=Oe(t.to)?t.to(e,n.data,i):t.to;return F(F({},t),{to:l,_event:o,event:o.data,delay:s})}var zy=function(t,e,n){return F(F({},t),{value:Re(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})},Hy=function(t){return{type:$d,sendId:t}};function $y(t){var e=Nl(t);return{type:Fe.Start,activity:e,exec:void 0}}function Wy(t){var e=Oe(t)?t:Nl(t);return{type:Fe.Stop,activity:e,exec:void 0}}function Gy(t,e,n){var r=Oe(t.activity)?t.activity(e,n.data):t.activity,i=typeof r=="string"?{id:r}:r,o={type:Fe.Stop,activity:i};return o}var Zy=function(t){return{type:Il,assignment:t}};function qy(t,e){var n=e?"#".concat(e):"";return"".concat(Fe.After,"(").concat(t,")").concat(n)}function wo(t,e){var n="".concat(Fe.DoneState,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function Jo(t,e){var n="".concat(Fe.DoneInvoke,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function Li(t,e){var n="".concat(Fe.ErrorPlatform,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}var Ky=function(t){var e,n,r=[];try{for(var i=ye(t),o=i.next();!o.done;o=i.next())for(var s=o.value,a=0;a<s.actions.length;){if(s.actions[a].type===Il){r.push(s.actions[a]),s.actions.splice(a,1);continue}a++}}catch(l){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r};function cs(t,e,n,r,i,o,s){s===void 0&&(s=!1);var a=s?[]:Ky(i),l=a.length?Ru(n,r,a,e):n,u=s?[n]:void 0,f=[];function d(y,g){var w;switch(g.type){case ao:{var C=Fy(g,l,r,t.options.delays);return o&&typeof C.delay=="number"&&o(C,l,r),C}case Ds:var L=Vy(g,l,r,t.options.delays);return o&&L.to!==Qr.Internal&&(y==="entry"?f.push(L):o(L,l,r)),L;case Wd:{var m=zy(g,l,r);return o==null||o(m,l,r),m}case Ey:{var _=g,x=(w=_.conds.find(function(V){var N=Jd(V.cond,t.options.guards);return!N||Yd(t,N,l,r,o?void 0:e)}))===null||w===void 0?void 0:w.actions;if(!x)return[];var p=xe(cs(t,e,l,r,[{type:y,actions:Tn(Vt(x),t.options.actions)}],o,s),2),b=p[0],E=p[1];return l=E,u==null||u.push(l),b}case xy:{var x=g.get(l,r.data);if(!x)return[];var P=xe(cs(t,e,l,r,[{type:y,actions:Tn(Vt(x),t.options.actions)}],o,s),2),O=P[0],T=P[1];return l=T,u==null||u.push(l),O}case Al:{var m=Gy(g,l,r);return o==null||o(m,n,r),m}case Il:{l=Ru(l,r,[g],o?void 0:e),u==null||u.push(l);break}default:var M=zi(g,t.options.actions),R=M.exec;if(o)o(M,l,r);else if(R&&u){var A=u.length-1,B=F(F({},M),{exec:function(V){for(var N=[],z=1;z<arguments.length;z++)N[z-1]=arguments[z];R.apply(void 0,$e([u[A]],xe(N),!1))}});M=B}return M}}function h(y){var g,w,C=[];try{for(var L=ye(y.actions),m=L.next();!m.done;m=L.next()){var _=m.value,x=d(y.type,_);x&&(C=C.concat(x))}}catch(p){g={error:p}}finally{try{m&&!m.done&&(w=L.return)&&w.call(L)}finally{if(g)throw g.error}}return f.forEach(function(p){o(p,l,r)}),f.length=0,C}var v=Ze(i.map(h));return[v,l]}var Mr=function(t,e){var n=e(t);return n};function eh(t){var e;return e={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:t}}},e[kn]=function(){return this},e}function Qy(t,e,n,r){var i,o=Xd(t.src),s=(i=e==null?void 0:e.options.services)===null||i===void 0?void 0:i[o.type],a=t.data?us(t.data,n,r):void 0,l=s?th(s,t.id,a):eh(t.id);return l.meta=t,l}function th(t,e,n){var r=eh(e);if(r.deferred=!0,Jr(t)){var i=r.state=Mr(void 0,function(){return(n?t.withContext(n):t).initialState});r.getSnapshot=function(){return i}}return r}function Jy(t){try{return typeof t.send=="function"}catch{return!1}}function Yy(t){return Jy(t)&&"id"in t}function Xy(t){var e;return F((e={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},e[kn]=function(){return this},e),t)}var fs=function(t){return t.type==="atomic"||t.type==="final"};function nh(t){return Object.keys(t.states).map(function(e){return t.states[e]})}function Hi(t){return nh(t).filter(function(e){return e.type!=="history"})}function rh(t){var e=[t];return fs(t)?e:e.concat(Ze(Hi(t).map(rh)))}function Ei(t,e){var n,r,i,o,s,a,l,u,f=new Set(t),d=Wa(f),h=new Set(e);try{for(var v=ye(h),y=v.next();!y.done;y=v.next())for(var g=y.value,w=g.parent;w&&!h.has(w);)h.add(w),w=w.parent}catch(P){n={error:P}}finally{try{y&&!y.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}var C=Wa(h);try{for(var L=ye(h),m=L.next();!m.done;m=L.next()){var g=m.value;if(g.type==="compound"&&(!C.get(g)||!C.get(g).length))d.get(g)?d.get(g).forEach(function(O){return h.add(O)}):g.initialStateNodes.forEach(function(O){return h.add(O)});else if(g.type==="parallel")try{for(var _=(s=void 0,ye(Hi(g))),x=_.next();!x.done;x=_.next()){var p=x.value;h.has(p)||(h.add(p),d.get(p)?d.get(p).forEach(function(O){return h.add(O)}):p.initialStateNodes.forEach(function(O){return h.add(O)}))}}catch(O){s={error:O}}finally{try{x&&!x.done&&(a=_.return)&&a.call(_)}finally{if(s)throw s.error}}}}catch(P){i={error:P}}finally{try{m&&!m.done&&(o=L.return)&&o.call(L)}finally{if(i)throw i.error}}try{for(var b=ye(h),E=b.next();!E.done;E=b.next())for(var g=E.value,w=g.parent;w&&!h.has(w);)h.add(w),w=w.parent}catch(P){l={error:P}}finally{try{E&&!E.done&&(u=b.return)&&u.call(b)}finally{if(l)throw l.error}}return h}function ih(t,e){var n=e.get(t);if(!n)return{};if(t.type==="compound"){var r=n[0];if(r){if(fs(r))return r.key}else return{}}var i={};return n.forEach(function(o){i[o.key]=ih(o,e)}),i}function Wa(t){var e,n,r=new Map;try{for(var i=ye(t),o=i.next();!o.done;o=i.next()){var s=o.value;r.has(s)||r.set(s,[]),s.parent&&(r.has(s.parent)||r.set(s.parent,[]),r.get(s.parent).push(s))}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function e1(t,e){var n=Ei([t],e);return ih(t,Wa(n))}function xi(t,e){return Array.isArray(t)?t.some(function(n){return n===e}):t instanceof Set?t.has(e):!1}function t1(t){return $e([],xe(new Set(Ze($e([],xe(t.map(function(e){return e.ownEvents})),!1)))),!1)}function Yo(t,e){return e.type==="compound"?Hi(e).some(function(n){return n.type==="final"&&xi(t,n)}):e.type==="parallel"?Hi(e).every(function(n){return Yo(t,n)}):!1}function n1(t){return t===void 0&&(t=[]),t.reduce(function(e,n){return n.meta!==void 0&&(e[n.id]=n.meta),e},{})}function Du(t){return new Set(Ze(t.map(function(e){return e.tags})))}function oh(t,e){if(t===e)return!0;if(t===void 0||e===void 0)return!1;if(Re(t)||Re(e))return t===e;var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(i){return oh(t[i],e[i])})}function r1(t){return typeof t!="object"||t===null?!1:"value"in t&&"_event"in t}function i1(t,e){var n=t.exec,r=F(F({},t),{exec:n!==void 0?function(){return n(e.context,e.event,{action:t,state:e,_event:e._event})}:void 0});return r}var At=function(){function t(e){var n=this,r;this.actions=[],this.activities=Pu,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||Pu,this.meta=n1(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 t1(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=kr;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=kr;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="."),Re(e))return[e];var i=Object.keys(e);return i.concat.apply(i,$e([],xe(i.map(function(o){return r.toStrings(e[o],n).map(function(s){return o+n+s})})),!1))},t.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var n=e.tags;e.machine;var r=Dl(e,["configuration","transitions","tags","machine"]);return F(F({},r),{tags:Array.from(n)})},t.prototype.matches=function(e){return jl(e,this.value)},t.prototype.hasTag=function(e){return this.tags.has(e)},t.prototype.can=function(e){var n;Ay(!!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}(),o1={deferEvents:!1},Au=function(){function t(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=F(F({},o1),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}(),ea=new Map,s1=0,hi={bookId:function(){return"x:".concat(s1++)},register:function(t,e){return ea.set(t,e),t},get:function(t){return ea.get(t)},free:function(t){ea.delete(t)}};function Bl(){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 a1(){var t=Bl();if(t&&"__xstate__"in t)return t.__xstate__}function l1(t){if(Bl()){var e=a1();e&&e.register(t)}}function u1(t,e){e===void 0&&(e={});var n=t.initialState,r=new Set,i=[],o=!1,s=function(){if(!o){for(o=!0;i.length>0;){var u=i.shift();n=t.transition(n,u,l),r.forEach(function(f){return f.next(n)})}o=!1}},a=Xy({id:e.id,send:function(u){i.push(u),s()},getSnapshot:function(){return n},subscribe:function(u,f,d){var h=Qo(u,f,d);return r.add(h),h.next(n),{unsubscribe:function(){r.delete(h)}}}}),l={parent:e.parent,self:a,id:e.id||"anonymous",observers:r};return n=t.start?t.start(l):n,a}var c1={sync:!1,autoForward:!1},it;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(it||(it={}));var f1=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=it.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(f,d){if(ii(f))return r.batch(f),r.state;var h=at(As(f,d));if(r.status===it.Stopped)return r.state;if(r.status!==it.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(f,d,h){var v=r.parent&&(d===Qr.Parent||r.parent.id===d),y=v?r.parent:Re(d)?d===Qr.Internal?r:r.children.get(d)||hi.get(d):jy(d)?d:void 0;if(!y){if(!v)throw new Error("Unable to send event to child '".concat(d,"' from service '").concat(r.id,"'."));return}if("machine"in y){if(r.status!==it.Stopped||r.parent!==y||r.state.done){var g=F(F({},f),{name:f.name===Ly?"".concat(Li(r.id)):f.name,origin:r.sessionId});!h&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([y,g]):y.send(g)}}else!h&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([y,f.data]):y.send(f.data)},this._exec=function(f,d,h,v){v===void 0&&(v=r.machine.options.actions);var y=f.exec||$a(f.type,v),g=Oe(y)?y:y?y.exec:f.exec;if(g)try{return g(d,h.data,r.machine.config.predictableActionArguments?{action:f,_event:h}:{action:f,state:r.state,_event:h})}catch(A){throw r.parent&&r.parent.send({type:"xstate.error",data:A}),A}switch(f.type){case ao:{var w=f;r.defer(w);break}case Ds:var C=f;if(typeof C.delay=="number"){r.defer(C);return}else C.to?r.sendTo(C._event,C.to,h===kr):r.send(C._event);break;case $d:r.cancel(f.sendId);break;case Fa:{if(r.status!==it.Running)return;var L=f.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[L.id||L.type])break;if(L.type===Fe.Invoke){var m=Xd(L.src),_=r.machine.options.services?r.machine.options.services[m.type]:void 0,x=L.id,p=L.data,b="autoForward"in L?L.autoForward:!!L.forward;if(!_)return;var E=p?us(p,d,h):void 0;if(typeof _=="string")return;var P=Oe(_)?_(d,h.data,{data:E,src:m,meta:L.meta}):_;if(!P)return;var O=void 0;Jr(P)&&(P=E?P.withContext(E):P,O={autoForward:b}),r.spawn(P,x,O)}else r.spawnActivity(L);break}case Al:{r.stopChild(f.activity.id);break}case Wd:var T=f,M=T.label,R=T.value;M?r.logger(M,R):r.logger(R);break}};var i=F(F({},t.defaultOptions),n),o=i.clock,s=i.logger,a=i.parent,l=i.id,u=l!==void 0?l:e.id;this.id=u,this.logger=s,this.clock=o,this.parent=a,this.options=i,this.scheduler=new Au({deferEvents:this.options.deferEvents}),this.sessionId=hi.bookId()}return Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:Mr(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 o=ye(e.actions),s=o.next();!s.done;s=o.next()){var a=s.value;this.exec(a,e,n)}}catch(l){r={error:l}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},t.prototype.update=function(e,n){var r,i,o,s,a,l,u,f,d=this;if(e._sessionid=this.sessionId,this._state=e,(!this.machine.config.predictableActionArguments||n===kr)&&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(P){d.state.children[P.id]=P}),this.devTools&&this.devTools.send(n.data,e),e.event)try{for(var v=ye(this.eventListeners),y=v.next();!y.done;y=v.next()){var g=y.value;g(e.event)}}catch(P){r={error:P}}finally{try{y&&!y.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}try{for(var w=ye(this.listeners),C=w.next();!C.done;C=w.next()){var g=C.value;g(e,e.event)}}catch(P){o={error:P}}finally{try{C&&!C.done&&(s=w.return)&&s.call(w)}finally{if(o)throw o.error}}try{for(var L=ye(this.contextListeners),m=L.next();!m.done;m=L.next()){var _=m.value;_(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(P){a={error:P}}finally{try{m&&!m.done&&(l=L.return)&&l.call(L)}finally{if(a)throw a.error}}if(this.state.done){var x=e.configuration.find(function(P){return P.type==="final"&&P.parent===d.machine}),p=x&&x.doneData?us(x.doneData,e.context,n):void 0;this._doneEvent=Jo(this.id,p);try{for(var b=ye(this.doneListeners),E=b.next();!E.done;E=b.next()){var g=E.value;g(this._doneEvent)}}catch(P){u={error:P}}finally{try{E&&!E.done&&(f=b.return)&&f.call(b)}finally{if(u)throw u.error}}this._stop(),this._stopChildren(),hi.free(this.sessionId)}},t.prototype.onTransition=function(e){return this.listeners.add(e),this.status===it.Running&&e(this.state,this.state.event),this},t.prototype.subscribe=function(e,n,r){var i=this,o=Qo(e,n,r);this.listeners.add(o.next),this.status!==it.NotStarted&&o.next(this.state);var s=function(){i.doneListeners.delete(s),i.stopListeners.delete(s),o.complete()};return this.status===it.Stopped?o.complete():(this.onDone(s),this.onStop(s)),{unsubscribe:function(){i.listeners.delete(o.next),i.doneListeners.delete(s),i.stopListeners.delete(s)}}},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===it.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===it.Running)return this;this.machine._init(),hi.register(this.sessionId,this),this.initialized=!0,this.status=it.Running;var r=e===void 0?this.initialState:Mr(this,function(){return r1(e)?n.machine.resolveState(e):n.machine.resolveState(At.from(e,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(r,kr)}),this},t.prototype._stopChildren=function(){this.children.forEach(function(e){Oe(e.stop)&&e.stop()}),this.children.clear()},t.prototype._stop=function(){var e,n,r,i,o,s,a,l,u,f;try{for(var d=ye(this.listeners),h=d.next();!h.done;h=d.next()){var v=h.value;this.listeners.delete(v)}}catch(b){e={error:b}}finally{try{h&&!h.done&&(n=d.return)&&n.call(d)}finally{if(e)throw e.error}}try{for(var y=ye(this.stopListeners),g=y.next();!g.done;g=y.next()){var v=g.value;v(),this.stopListeners.delete(v)}}catch(b){r={error:b}}finally{try{g&&!g.done&&(i=y.return)&&i.call(y)}finally{if(r)throw r.error}}try{for(var w=ye(this.contextListeners),C=w.next();!C.done;C=w.next()){var v=C.value;this.contextListeners.delete(v)}}catch(b){o={error:b}}finally{try{C&&!C.done&&(s=w.return)&&s.call(w)}finally{if(o)throw o.error}}try{for(var L=ye(this.doneListeners),m=L.next();!m.done;m=L.next()){var v=m.value;this.doneListeners.delete(v)}}catch(b){a={error:b}}finally{try{m&&!m.done&&(l=L.return)&&l.call(L)}finally{if(a)throw a.error}}if(!this.initialized)return this;this.initialized=!1,this.status=it.Stopped,this._initialState=void 0;try{for(var _=ye(Object.keys(this.delayedEventsMap)),x=_.next();!x.done;x=_.next()){var p=x.value;this.clock.clearTimeout(this.delayedEventsMap[p])}}catch(b){u={error:b}}finally{try{x&&!x.done&&(f=_.return)&&f.call(_)}finally{if(u)throw u.error}}this.scheduler.clear(),this.scheduler=new Au({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=at({type:"xstate.stop"}),o=Mr(e,function(){var s=Ze($e([],xe(e.state.configuration),!1).sort(function(d,h){return h.order-d.order}).map(function(d){return Tn(d.onExit,e.machine.options.actions)})),a=xe(cs(e.machine,e.state,e.state.context,i,[{type:"exit",actions:s}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),l=a[0],u=a[1],f=new At({value:e.state.value,context:u,_event:i,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:l.filter(function(d){return!Ha(d)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return f.changed=!0,f});e.update(o,i),e._stopChildren(),hi.free(e.sessionId)}}),this},t.prototype.batch=function(e){var n=this;if(!(this.status===it.NotStarted&&this.options.deferEvents)){if(this.status!==it.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,o,s=n.state,a=!1,l=[],u=function(v){var y=at(v);n.forward(y),s=Mr(n,function(){return n.machine.transition(s,y,void 0,r||void 0)}),l.push.apply(l,$e([],xe(n.machine.config.predictableActionArguments?s.actions:s.actions.map(function(g){return i1(g,s)})),!1)),a=a||!!s.changed};try{for(var f=ye(e),d=f.next();!d.done;d=f.next()){var h=d.value;u(h)}}catch(v){i={error:v}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}s.changed=a,s.actions=l,n.update(s,at(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=at(e);if(i.name.indexOf(Ou)===0&&!this.state.nextEvents.some(function(s){return s.indexOf(Ou)===0}))throw i.data.data;var o=Mr(this,function(){return r.machine.transition(r.state,i,void 0,n||void 0)});return o},t.prototype.nextState=function(e){return this._nextState(e,!1)},t.prototype.forward=function(e){var n,r;try{for(var i=ye(this.forwardTo),o=i.next();!o.done;o=i.next()){var s=o.value,a=this.children.get(s);if(!a)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(s,"'."));a.send(e)}}catch(l){n={error:l}}finally{try{o&&!o.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),Oe(n.stop)&&n.stop())},t.prototype.spawn=function(e,n,r){if(this.status!==it.Running)return th(e,n);if(Tu(e))return this.spawnPromise(Promise.resolve(e),n);if(Oe(e))return this.spawnCallback(e,n);if(Yy(e))return this.spawnActor(e,n);if(Iy(e))return this.spawnObservable(e,n);if(Jr(e))return this.spawnMachine(e,F(F({},r),{id:n}));if(Ty(e))return this.spawnBehavior(e,n);throw new Error('Unable to spawn entity "'.concat(n,'" of type "').concat(typeof e,'".'))},t.prototype.spawnMachine=function(e,n){var r=this;n===void 0&&(n={});var i=new t(e,F(F({},this.options),{parent:this,id:n.id||e.id})),o=F(F({},c1),n);o.sync&&i.onTransition(function(a){r.send(Gd,{state:a,id:i.id})});var s=i;return this.children.set(i.id,s),o.autoForward&&this.forwardTo.add(i.id),i.onDone(function(a){r.removeChild(i.id),r.send(at(a,{origin:i.id}))}).start(),s},t.prototype.spawnBehavior=function(e,n){var r=u1(e,{id:n,parent:this});return this.children.set(n,r),r},t.prototype.spawnPromise=function(e,n){var r,i=this,o=!1,s;e.then(function(l){o||(s=l,i.removeChild(n),i.send(at(Jo(n,l),{origin:n})))},function(l){if(!o){i.removeChild(n);var u=Li(n,l);try{i.send(at(u,{origin:n}))}catch{i.devTools&&i.devTools.send(u,i.state),i.machine.strict&&i.stop()}}});var a=(r={id:n,send:function(){},subscribe:function(l,u,f){var d=Qo(l,u,f),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(){o=!0},toJSON:function(){return{id:n}},getSnapshot:function(){return s}},r[kn]=function(){return this},r);return this.children.set(n,a),a},t.prototype.spawnCallback=function(e,n){var r,i=this,o=!1,s=new Set,a=new Set,l,u=function(h){l=h,a.forEach(function(v){return v(h)}),!o&&i.send(at(h,{origin:n}))},f;try{f=e(u,function(h){s.add(h)})}catch(h){this.send(Li(n,h))}if(Tu(f))return this.spawnPromise(f,n);var d=(r={id:n,send:function(h){return s.forEach(function(v){return v(h)})},subscribe:function(h){var v=Qo(h);return a.add(v.next),{unsubscribe:function(){a.delete(v.next)}}},stop:function(){o=!0,Oe(f)&&f()},toJSON:function(){return{id:n}},getSnapshot:function(){return l}},r[kn]=function(){return this},r);return this.children.set(n,d),d},t.prototype.spawnObservable=function(e,n){var r,i=this,o,s=e.subscribe(function(l){o=l,i.send(at(l,{origin:n}))},function(l){i.removeChild(n),i.send(at(Li(n,l),{origin:n}))},function(){i.removeChild(n),i.send(at(Jo(n),{origin:n}))}),a=(r={id:n,send:function(){},subscribe:function(l,u,f){return e.subscribe(l,u,f)},stop:function(){return s.unsubscribe()},getSnapshot:function(){return o},toJSON:function(){return{id:n}}},r[kn]=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[kn]=function(){return this},r))},t.prototype.attachDev=function(){var e=Bl();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var n=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(F(F({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:F({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}l1(this)}},t.prototype.toJSON=function(){return{id:this.id}},t.prototype[kn]=function(){return this},t.prototype.getSnapshot=function(){return this.status===it.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=sh,t}();function sh(t,e){var n=new f1(t,e);return n}function d1(t){if(typeof t=="string"){var e={type:t};return e.toString=function(){return t},e}return t}function So(t){return F(F({type:Ua},t),{toJSON:function(){t.onDone,t.onError;var e=Dl(t,["onDone","onError"]);return F(F({},e),{type:Ua,src:d1(t.src)})}})}var Lo="",Ga="#",ta="*",wr={},Sr=function(t){return t[0]===Ga},h1=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},p1=function(){function t(e,n,r,i){r===void 0&&(r="context"in e?e.context:void 0);var o=this,s;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(h1(),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:Zd),this.id=this.config.id||$e([this.machine.key],xe(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:(s=this.config.schema)!==null&&s!==void 0?s:{},this.description=this.config.description,this.initial=this.config.initial,this.states=this.config.states?Si(this.config.states,function(u,f){var d,h=new t(u,{},void 0,{parent:o,key:f});return Object.assign(o.idMap,F((d={},d[h.id]=h,d),h.idMap)),h}):wr;var a=0;function l(u){var f,d;u.order=a++;try{for(var h=ye(nh(u)),v=h.next();!v.done;v=h.next()){var y=v.value;l(y)}}catch(g){f={error:g}}finally{try{v&&!v.done&&(d=h.return)&&d.call(h)}finally{if(f)throw f.error}}}l(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(u){var f=u.event;return f===Lo}):Lo in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=Vt(this.config.entry||this.config.onEntry).map(function(u){return zi(u)}),this.onExit=Vt(this.config.exit||this.config.onExit).map(function(u){return zi(u)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=Vt(this.config.invoke).map(function(u,f){var d,h;if(Jr(u)){var v=Co(o.id,f);return o.machine.options.services=F((d={},d[v]=u,d),o.machine.options.services),So({src:v,id:v})}else if(Re(u.src)){var v=u.id||Co(o.id,f);return So(F(F({},u),{id:v,src:u.src}))}else if(Jr(u.src)||Oe(u.src)){var v=u.id||Co(o.id,f);return o.machine.options.services=F((h={},h[v]=u.src,h),o.machine.options.services),So(F(F({id:v},u),{src:v}))}else{var y=u.src;return So(F(F({id:Co(o.id,f)},u),{src:y}))}}),this.activities=Vt(this.config.activities).concat(this.invoke).map(function(u){return Nl(u)}),this.transition=this.transition.bind(this),this.tags=Vt(this.config.tags)}return t.prototype._init=function(){this.__cache.transitions||rh(this).forEach(function(e){return e.on})},t.prototype.withConfig=function(e,n){var r=this.options,i=r.actions,o=r.activities,s=r.guards,a=r.services,l=r.delays;return new t(this.config,{actions:F(F({},i),e.actions),activities:F(F({},o),e.activities),guards:F(F({},s),e.guards),services:F(F({},a),e.services),delays:F(F({},l),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 Oe(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:Si(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===Lo,r=this.transitions.filter(function(i){var o=i.eventType===e;return n?o:o||i.eventType===ta});return this.__cache.candidates[e]=r,r},t.prototype.getDelayedTransitions=function(){var e=this,n=this.config.after;if(!n)return[];var r=function(o,s){var a=Oe(o)?"".concat(e.id,":delay[").concat(s,"]"):o,l=qy(a,e.id);return e.onEntry.push(Uy(l,{delay:o})),e.onExit.push(Hy(l)),l},i=ii(n)?n.map(function(o,s){var a=r(o.delay,s);return F(F({},o),{event:a})}):Ze(Object.keys(n).map(function(o,s){var a=n[o],l=Re(a)?{target:a}:a,u=isNaN(+o)?o:+o,f=r(u,s);return Vt(l).map(function(d){return F(F({},d),{event:f,delay:u})})}));return i.map(function(o){var s=o.delay;return F(F({},e.formatTransition(o)),{delay:s})})},t.prototype.getStateNodes=function(e){var n,r=this;if(!e)return[];var i=e instanceof At?e.value:Pi(e,this.delimiter);if(Re(i)){var o=this.getStateNode(i).initial;return o!==void 0?this.getStateNodes((n={},n[i]=o,n)):[this,this.states[i]]}var s=Object.keys(i),a=[this];return a.push.apply(a,$e([],xe(Ze(s.map(function(l){return r.getStateNode(l).getStateNodes(i[l])}))),!1)),a},t.prototype.handles=function(e){var n=qd(e);return this.events.includes(n)},t.prototype.resolveState=function(e){var n=e instanceof At?e:At.create(e),r=Array.from(Ei([],this.getStateNodes(n.value)));return new At(F(F({},n),{value:this.resolve(n.value),configuration:r,done:Yo(r,this),tags:Du(r),machine:this.machine}))},t.prototype.transitionLeafNode=function(e,n,r){var i=this.getStateNode(e),o=i.next(n,r);return!o||!o.transitions.length?this.next(n,r):o},t.prototype.transitionCompoundNode=function(e,n,r){var i=Object.keys(e),o=this.getStateNode(i[0]),s=o._transition(e[i[0]],n,r);return!s||!s.transitions.length?this.next(n,r):s},t.prototype.transitionParallelNode=function(e,n,r){var i,o,s={};try{for(var a=ye(Object.keys(e)),l=a.next();!l.done;l=a.next()){var u=l.value,f=e[u];if(f){var d=this.getStateNode(u),h=d._transition(f,n,r);h&&(s[u]=h)}}}catch(C){i={error:C}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}var v=Object.keys(s).map(function(C){return s[C]}),y=Ze(v.map(function(C){return C.transitions})),g=v.some(function(C){return C.transitions.length>0});if(!g)return this.next(n,r);var w=Ze(Object.keys(s).map(function(C){return s[C].configuration}));return{transitions:y,exitSet:Ze(v.map(function(C){return C.exitSet})),configuration:w,source:n,actions:Ze(Object.keys(s).map(function(C){return s[C].actions}))}},t.prototype._transition=function(e,n,r){return Re(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,at(n))},t.prototype.next=function(e,n){var r,i,o=this,s=n.name,a=[],l=[],u;try{for(var f=ye(this.getCandidates(s)),d=f.next();!d.done;d=f.next()){var h=d.value,v=h.cond,y=h.in,g=e.context,w=y?Re(y)&&Sr(y)?e.matches(Pi(this.getStateNodeById(y).path,this.delimiter)):jl(Pi(y,this.delimiter),Oy(this.path.slice(0,-2))(e.value)):!0,C=!1;try{C=!v||Yd(this.machine,v,g,n,e)}catch(_){throw new Error("Unable to evaluate guard '".concat(v.name||v.type,"' in transition for event '").concat(s,"' in state node '").concat(this.id,`':
|
|
42
|
+
`).concat(_.message))}if(C&&w){h.target!==void 0&&(l=h.target),a.push.apply(a,$e([],xe(h.actions),!1)),u=h;break}}}catch(_){r={error:_}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}if(u){if(!l.length)return{transitions:[u],exitSet:[],configuration:e.value?[this]:[],source:e,actions:a};var L=Ze(l.map(function(_){return o.getRelativeStateNodes(_,e.historyValue)})),m=!!u.internal;return{transitions:[u],exitSet:m?[]:Ze(l.map(function(_){return o.getPotentiallyReenteringNodes(_)})),configuration:L,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,o,s,a){var l,u,f,d,h=this,v=s?Ei([],this.getStateNodes(s.value)):[],y=new Set;try{for(var g=ye(Array.from(e).sort(function(T,M){return T.order-M.order})),w=g.next();!w.done;w=g.next()){var C=w.value;(!xi(v,C)||xi(r.exitSet,C)||C.parent&&y.has(C.parent))&&y.add(C)}}catch(T){l={error:T}}finally{try{w&&!w.done&&(u=g.return)&&u.call(g)}finally{if(l)throw l.error}}try{for(var L=ye(v),m=L.next();!m.done;m=L.next()){var C=m.value;(!xi(e,C)||xi(r.exitSet,C.parent))&&r.exitSet.push(C)}}catch(T){f={error:T}}finally{try{m&&!m.done&&(d=L.return)&&d.call(L)}finally{if(f)throw f.error}}r.exitSet.sort(function(T,M){return M.order-T.order});var _=Array.from(y).sort(function(T,M){return T.order-M.order}),x=new Set(r.exitSet),p=Ze(_.map(function(T){var M=[];if(T.type!=="final")return M;var R=T.parent;if(!R.parent)return M;M.push(wo(T.id,T.doneData),wo(R.id,T.doneData?us(T.doneData,i,o):void 0));var A=R.parent;return A.type==="parallel"&&Hi(A).every(function(B){return Yo(r.configuration,B)})&&M.push(wo(A.id)),M})),b=_.map(function(T){var M=T.onEntry,R=T.activities.map(function(A){return $y(A)});return{type:"entry",actions:Tn(a?$e($e([],xe(M),!1),xe(R),!1):$e($e([],xe(R),!1),xe(M),!1),h.machine.options.actions)}}).concat({type:"state_done",actions:p.map(function(T){return By(T)})}),E=Array.from(x).map(function(T){return{type:"exit",actions:Tn($e($e([],xe(T.onExit),!1),xe(T.activities.map(function(M){return Wy(M)})),!1),h.machine.options.actions)}}),P=E.concat({type:"transition",actions:Tn(r.actions,this.machine.options.actions)}).concat(b);if(n){var O=Tn(Ze($e([],xe(e),!1).sort(function(T,M){return M.order-T.order}).map(function(T){return T.onExit})),this.machine.options.actions).filter(function(T){return!Ha(T)});return P.concat({type:"stop",actions:O})}return P},t.prototype.transition=function(e,n,r,i){e===void 0&&(e=this.initialState);var o=at(n),s;if(e instanceof At)s=r===void 0?e:this.resolveState(At.from(e,r));else{var a=Re(e)?this.resolve(ls(this.getResolvedPath(e))):this.resolve(e),l=r??this.machine.context;s=this.resolveState(At.from(a,l))}if(this.strict&&!this.events.includes(o.name)&&!ky(o.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(o.name,"'"));var u=this._transition(s.value,s,o)||{transitions:[],configuration:[],exitSet:[],source:s,actions:[]},f=Ei([],this.getStateNodes(s.value)),d=u.configuration.length?Ei(f,u.configuration):f;return u.configuration=$e([],xe(d),!1),this.resolveTransition(u,s,s.context,i,o)},t.prototype.resolveRaisedTransition=function(e,n,r,i){var o,s=e.actions;return e=this.transition(e,n,void 0,i),e._event=r,e.event=r.data,(o=e.actions).unshift.apply(o,$e([],xe(s),!1)),e},t.prototype.resolveTransition=function(e,n,r,i,o){var s,a,l,u,f=this;o===void 0&&(o=kr);var d=e.configuration,h=!n||e.transitions.length>0,v=h?e.configuration:n?n.configuration:[],y=Yo(v,this),g=h?e1(this.machine,d):void 0,w=n?n.historyValue?n.historyValue:e.source?this.machine.historyValue(n.value):void 0:void 0,C=this.getActions(new Set(v),y,e,r,o,n,i),L=n?F({},n.activities):{};try{for(var m=ye(C),_=m.next();!_.done;_=m.next()){var x=_.value;try{for(var p=(l=void 0,ye(x.actions)),b=p.next();!b.done;b=p.next()){var E=b.value;E.type===Fa?L[E.activity.id||E.activity.type]=E:E.type===Al&&(L[E.activity.id||E.activity.type]=!1)}}catch(te){l={error:te}}finally{try{b&&!b.done&&(u=p.return)&&u.call(p)}finally{if(l)throw l.error}}}}catch(te){s={error:te}}finally{try{_&&!_.done&&(a=m.return)&&a.call(m)}finally{if(s)throw s.error}}var P=xe(cs(this,n,r,o,C,i,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),O=P[0],T=P[1],M=xe(Ry(O,Ha),2),R=M[0],A=M[1],B=O.filter(function(te){var ee;return te.type===Fa&&((ee=te.activity)===null||ee===void 0?void 0:ee.type)===Ua}),V=B.reduce(function(te,ee){return te[ee.activity.id]=Qy(ee.activity,f.machine,T,o),te},n?F({},n.children):{}),N=new At({value:g||n.value,context:T,_event:o,_sessionid:n?n._sessionid:null,historyValue:g?w?Dy(w,g):void 0:n?n.historyValue:void 0,history:!g||e.source?n:void 0,actions:g?A:[],activities:g?L:n?n.activities:{},events:[],configuration:v,transitions:e.transitions,children:V,done:y,tags:Du(v),machine:this}),z=r!==T;N.changed=o.name===Gd||z;var Y=N.history;Y&&delete Y.history;var G=!y&&(this._transient||d.some(function(te){return te._transient}));if(!h&&(!G||o.name===Lo))return N;var H=N;if(!y)for(G&&(H=this.resolveRaisedTransition(H,{type:wy},o,i));R.length;){var Q=R.shift();H=this.resolveRaisedTransition(H,Q._event,o,i)}var oe=H.changed||(Y?!!H.actions.length||z||typeof Y.value!=typeof H.value||!oh(H.value,Y.value):void 0);return H.changed=oe,H.history=Y,H},t.prototype.getStateNode=function(e){if(Sr(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=Sr(e)?e.slice(Ga.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"&&Sr(e))try{return this.getStateNodeById(e.slice(1))}catch{}for(var n=za(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||wr;switch(this.type){case"parallel":return Si(this.initialStateValue,function(o,s){return o?r.getStateNode(s).resolve(e[s]||o):wr});case"compound":if(Re(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?Si(e,function(o,s){return o?r.getStateNode(s).resolve(o):wr}):this.initialStateValue||{};default:return e||wr}},t.prototype.getResolvedPath=function(e){if(Sr(e)){var n=this.machine.idMap[e.slice(Ga.length)];if(!n)throw new Error("Unable to find state node '".concat(e,"'"));return n.path}return za(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=ku(this.states,function(r){return r.initialStateValue||wr},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=fs(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;Re(n.target)?e=Sr(n.target)?ls(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(fs(this))return[this];if(this.type==="compound"&&!this.initial)return[this];var n=Ko(this.initialStateValue);return Ze(n.map(function(r){return e.getFromRelativePath(r)}))},enumerable:!1,configurable:!0}),t.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var n=xe(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 o=this.getStateNode(r);if(o.type==="history")return o.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:ku(this.states,function(n,r){if(!e)return n.historyValue();var i=Re(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?Ze(Ko(i).map(function(s){return r.getFromRelativePath(s)})):r.initialStateNodes}var o=Py(r.path,"states")(e).current;return Re(o)?[r.getStateNode(o)]:Ze(Ko(o).map(function(s){return n.history==="deep"?r.getFromRelativePath(s):[r.states[s[0]]]}))},Object.defineProperty(t.prototype,"stateIds",{get:function(){var e=this,n=Ze(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 o=this.states,s=new Set(this.ownEvents);if(o)try{for(var a=ye(Object.keys(o)),l=a.next();!l.done;l=a.next()){var u=l.value,f=o[u];if(f.states)try{for(var d=(r=void 0,ye(f.events)),h=d.next();!h.done;h=d.next()){var v=h.value;s.add("".concat(v))}}catch(y){r={error:y}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}}}catch(y){e={error:y}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(s)},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(!Re(r))return r;var i=r[0]===n.delimiter;if(i&&!n.parent)return n.getStateNodeByPath(r.slice(1));var o=i?n.key+r:r;if(n.parent)try{var s=n.parent.getStateNodeByPath(o);return s}catch(a){throw new Error("Invalid transition definition for state node '".concat(n.id,`':
|
|
43
|
+
`).concat(a.message))}else return n.getStateNodeByPath(o)})},t.prototype.formatTransition=function(e){var n=this,r=Ny(e.target),i="internal"in e?e.internal:r?r.some(function(l){return Re(l)&&l[0]===n.delimiter}):!0,o=this.machine.options.guards,s=this.resolveTarget(r),a=F(F({},e),{actions:Tn(Vt(e.actions)),cond:Jd(e.cond,o),target:s,source:this,internal:i,eventType:e.event,toJSON:function(){return F(F({},a),{target:a.target?a.target.map(function(l){return"#".concat(l.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 o=this.config.on,s=ta,a=o[s],l=a===void 0?[]:a,u=Dl(o,[typeof s=="symbol"?s:s+""]);i=Ze(Object.keys(u).map(function(L){var m=Cr(L,u[L]);return m}).concat(Cr(ta,l)))}var f=this.config.always?Cr("",this.config.always):[],d=this.config.onDone?Cr(String(wo(this.id)),this.config.onDone):[],h=Ze(this.invoke.map(function(L){var m=[];return L.onDone&&m.push.apply(m,$e([],xe(Cr(String(Jo(L.id)),L.onDone)),!1)),L.onError&&m.push.apply(m,$e([],xe(Cr(String(Li(L.id)),L.onError)),!1)),m})),v=this.after,y=Ze($e($e($e($e([],xe(d),!1),xe(h),!1),xe(i),!1),xe(f),!1).map(function(L){return Vt(L).map(function(m){return r.formatTransition(m)})}));try{for(var g=ye(v),w=g.next();!w.done;w=g.next()){var C=w.value;y.push(C)}}catch(L){e={error:L}}finally{try{w&&!w.done&&(n=g.return)&&n.call(g)}finally{if(e)throw e.error}}return y},t}();function g1(t,e,n){return n===void 0&&(n=t.context),new p1(t,e,n)}var v1=Zy,Za;(function(t){t[t.Effect=1]="Effect",t[t.LayoutEffect=2]="LayoutEffect"})(Za||(Za={}));var ki=c.useLayoutEffect;function Iu(t){var e=U.useRef();return e.current||(e.current={v:t()}),e.current.v}var m1=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},y1=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 b1(t,e){var n,r,i=m1([[],[]],2),o=i[0],s=i[1];try{for(var a=y1(t),l=a.next();!l.done;l=a.next()){var u=l.value;e(u)?o.push(u):s.push(u)}}catch(f){n={error:f}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[o,s]}var pi=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},ju=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))};function Nu(t,e){var n=t.exec,r=n(e.context,e._event.data,{action:t,state:e,_event:e._event});r()}function C1(t){var e=c.useRef([]),n=c.useRef([]);ki(function(){var r=t.subscribe(function(i){var o,s;if(i.actions.length){var a=i.actions.filter(function(d){return typeof d.exec=="function"&&"__effect"in d.exec}),l=pi(b1(a,function(d){return d.exec.__effect===Za.Effect}),2),u=l[0],f=l[1];(o=e.current).push.apply(o,ju([],pi(u.map(function(d){return[d,i]})),!1)),(s=n.current).push.apply(s,ju([],pi(f.map(function(d){return[d,i]})),!1))}});return function(){r.unsubscribe()}},[]),ki(function(){for(;n.current.length;){var r=pi(n.current.shift(),2),i=r[0],o=r[1];Nu(i,o)}}),c.useEffect(function(){for(;e.current.length;){var r=pi(e.current.shift(),2),i=r[0],o=r[1];Nu(i,o)}})}var Ti=function(){return Ti=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},Ti.apply(this,arguments)},w1=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 S1(t,e,n){if(typeof t=="object")return t;var r=function(){};return{next:t,error:e||r,complete:n||r}}function L1(t,e,n){e===void 0&&(e={});var r=Iu(function(){return typeof t=="function"?t():t}),i=e.context,o=e.guards,s=e.actions,a=e.activities,l=e.services,u=e.delays,f=e.state,d=w1(e,["context","guards","actions","activities","services","delays","state"]),h=Iu(function(){var v={context:i,guards:o,actions:s,activities:a,services:l,delays:u},y=r.withConfig(v,function(){return Ti(Ti({},r.context),i)});return sh(y,Ti({deferEvents:!0},d))});return ki(function(){var v;return n&&(v=h.subscribe(S1(n))),function(){v==null||v.unsubscribe()}},[n]),ki(function(){return h.start(f?At.create(f):void 0),function(){h.stop()}},[]),ki(function(){Object.assign(h.machine.options.actions,s),Object.assign(h.machine.options.guards,o),Object.assign(h.machine.options.activities,a),Object.assign(h.machine.options.services,l),Object.assign(h.machine.options.delays,u)},[s,o,a,l,u]),C1(h),h}var E1=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function x1(t,e){e===void 0&&(e={});var n=c.useCallback(function(a){var l=a.changed===void 0&&Object.keys(a.children).length;(a.changed||l)&&s(a)},[]),r=L1(t,e,n),i=E1(c.useState(function(){var a=r.machine.initialState;return e.state?At.create(e.state):a}),2),o=i[0],s=i[1];return[o,r.send,r]}function Ke(){return Ke=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},Ke.apply(this,arguments)}function Tr(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}const de={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(de.str(t)||de.num(t))return t===e;if(de.obj(t)&&de.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 de.und(n)?t===e:!0}};function _1(t,e){return e===void 0&&(e=!0),n=>(de.arr(n)?n:Object.keys(n)).reduce((r,i)=>{const o=e?i[0].toLowerCase()+i.substring(1):i;return r[o]=t(o),r},t)}function M1(){const t=c.useState(!1),e=t[1];return c.useCallback(()=>e(r=>!r),[])}function Kn(t,e){return de.und(t)||de.nul(t)?e:t}function Eo(t){return de.und(t)?[]:de.arr(t)?t:[t]}function Or(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 de.fun(t)?t(...n):t}function O1(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,Tr(t,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}function na(t){const e=O1(t);if(de.und(e))return Ke({to:e},t);const n=Object.keys(t).reduce((r,i)=>de.und(e[i])?Ke({},r,{[i]:t[i]}):r,{});return Ke({to:e},n)}function P1(t,e){return e&&(de.fun(e)?e(t):de.obj(e)&&(e.current=t)),t}class $t{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 qa extends $t{constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach(e=>e instanceof $t&&e.addChild(this)),this.detach=()=>this.payload.forEach(e=>e instanceof $t&&e.removeChild(this))}}class ah extends $t{constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach(e=>e instanceof $t&&e.addChild(this)),this.detach=()=>Object.values(this.payload).forEach(e=>e instanceof $t&&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 $t)||(n[r]=i instanceof $t?i[e?"getAnimatedValue":"getValue"]():i)}return n}getAnimatedValue(){return this.getValue(!0)}}let Fl;function k1(t,e){Fl={fn:t,transform:e}}let lh;function T1(t){lh=t}let uh=t=>typeof window<"u"?window.requestAnimationFrame(t):-1,ds;function R1(t){ds=t}let ch=()=>Date.now(),D1=t=>t.current,fh;function A1(t){fh=t}class I1 extends ah{constructor(e,n){super(),this.update=void 0,this.payload=e.style?Ke({},e,{style:fh(e.style)}):e,this.update=n,this.attach()}}const j1=t=>de.fun(t)&&!(t.prototype instanceof c.Component),N1=t=>c.forwardRef((n,r)=>{const i=M1(),o=c.useRef(!0),s=c.useRef(null),a=c.useRef(null),l=c.useCallback(h=>{const v=s.current,y=()=>{let g=!1;a.current&&(g=Fl.fn(a.current,s.current.getAnimatedValue())),(!a.current||g===!1)&&i()};s.current=new I1(h,y),v&&v.detach()},[]);c.useEffect(()=>()=>{o.current=!1,s.current&&s.current.detach()},[]),c.useImperativeHandle(r,()=>D1(a)),l(n);const u=s.current.getValue();u.scrollTop,u.scrollLeft;const f=Tr(u,["scrollTop","scrollLeft"]),d=j1(t)?void 0:h=>a.current=P1(h,r);return c.createElement(t,Ke({},f,{ref:d}))});let Ri=!1;const fr=new Set,dh=()=>{if(!Ri)return!1;let t=ch();for(let e of fr){let n=!1;for(let r=0;r<e.configs.length;r++){let i=e.configs[r],o,s;for(let a=0;a<i.animatedValues.length;a++){let l=i.animatedValues[a];if(l.done)continue;let u=i.fromValues[a],f=i.toValues[a],d=l.lastPosition,h=f instanceof $t,v=Array.isArray(i.initialVelocity)?i.initialVelocity[a]:i.initialVelocity;if(h&&(f=f.getValue()),i.immediate){l.setValue(f),l.done=!0;continue}if(typeof u=="string"||typeof f=="string"){l.setValue(f),l.done=!0;continue}if(i.duration!==void 0)d=u+i.easing((t-l.startTime)/i.duration)*(f-u),o=t>=l.startTime+i.duration;else if(i.decay)d=u+v/(1-.998)*(1-Math.exp(-(1-.998)*(t-l.startTime))),o=Math.abs(l.lastPosition-d)<.1,o&&(f=d);else{s=l.lastTime!==void 0?l.lastTime:t,v=l.lastVelocity!==void 0?l.lastVelocity:i.initialVelocity,t>s+64&&(s=t);let y=Math.floor(t-s);for(let L=0;L<y;++L){let m=-i.tension*(d-f),_=-i.friction*v,x=(m+_)/i.mass;v=v+x*1/1e3,d=d+v*1/1e3}let g=i.clamp&&i.tension!==0?u<f?d>f:d<f:!1,w=Math.abs(v)<=i.precision,C=i.tension!==0?Math.abs(f-d)<=i.precision:!0;o=g||w&&C,l.lastVelocity=v,l.lastTime=t}h&&!i.toValues[a].done&&(o=!1),o?(l.value!==f&&(d=f),l.done=!0):n=!0,l.setValue(d),l.lastPosition=d}e.props.onFrame&&(e.values[i.name]=i.interpolation.getValue())}e.props.onFrame&&e.props.onFrame(e.values),n||(fr.delete(e),e.stop(!0))}return fr.size?uh(dh):Ri=!1,Ri},B1=t=>{fr.has(t)||fr.add(t),Ri||(Ri=!0,uh(dh))},F1=t=>{fr.has(t)&&fr.delete(t)};function hs(t,e,n){if(typeof t=="function")return t;if(Array.isArray(t))return hs({range:t,output:e,extrapolate:n});if(ds&&typeof t.output[0]=="string")return ds(t);const r=t,i=r.output,o=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(u=>u);return u=>{const f=V1(u,o);return U1(u,o[f],o[f+1],i[f],i[f+1],l,s,a,r.map)}}function U1(t,e,n,r,i,o,s,a,l){let u=l?l(t):t;if(u<e){if(s==="identity")return u;s==="clamp"&&(u=e)}if(u>n){if(a==="identity")return u;a==="clamp"&&(u=n)}return r===i?r:e===n?t<=e?r:i:(e===-1/0?u=-u:n===1/0?u=u-e:u=(u-e)/(n-e),u=o(u),r===-1/0?u=-u:i===1/0?u=u+r:u=u*(i-r)+r,u)}function V1(t,e){for(var n=1;n<e.length-1&&!(e[n]>=t);++n);return n-1}class Yr extends qa{constructor(e,n,r,i){super(),this.calc=void 0,this.payload=e instanceof qa&&!(e instanceof Yr)?e.getPayload():Array.isArray(e)?e:[e],this.calc=hs(n,r,i)}getValue(){return this.calc(...this.payload.map(e=>e.getValue()))}updateConfig(e,n,r){this.calc=hs(e,n,r)}interpolate(e,n,r){return new Yr(this,e,n,r)}}const Lr=(t,e,n)=>t&&new Yr(t,e,n),z1={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 hh(t,e){"update"in t?e.add(t):t.getChildren().forEach(n=>hh(n,e))}class Ka extends $t{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&&hh(this,this.animatedStyles),this.animatedStyles.forEach(e=>e.update())}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,n,r){return new Yr(this,e,n,r)}}class H1 extends qa{constructor(e){super(),this.payload=e.map(n=>new Ka(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 Yr(this,e,n)}}let $1=0,W1=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=$1++}update(e){if(!e)return this;const n=na(e),r=n.delay,i=r===void 0?0:r,o=n.to,s=Tr(n,["delay","to"]);if(de.arr(o)||de.fun(o))this.queue.push(Ke({},s,{delay:i,to:o}));else if(o){let a={};Object.entries(o).forEach(l=>{let u=l[0],f=l[1];const d=Ke({to:{[u]:f},delay:Or(i,u)},s),h=a[d.delay]&&a[d.delay].to;a[d.delay]=Ke({},a[d.delay],d,{to:Ke({},h,d.to)})}),this.queue=Object.values(a)}return this.queue=this.queue.sort((a,l)=>a.delay-l.delay),this.diff(s),this}start(e){if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach(i=>{let o=i.from,s=o===void 0?{}:o,a=i.to,l=a===void 0?{}:a;de.obj(s)&&(this.merged=Ke({},s,this.merged)),de.obj(l)&&(this.merged=Ke({},this.merged,l))});const n=this.local=++this.guid,r=this.localQueue=this.queue;this.queue=[],r.forEach((i,o)=>{let s=i.delay,a=Tr(i,["delay"]);const l=f=>{o===r.length-1&&n===this.guid&&f&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),e&&e()};let u=de.arr(a.to)||de.fun(a.to);s?setTimeout(()=>{n===this.guid&&(u?this.runAsync(a,l):this.diff(a).start(l))},s):u?this.runAsync(a,l):this.diff(a).start(l)})}else de.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),B1(this);return this}stop(e){return this.listeners.forEach(n=>n(e)),this.listeners=[],this}pause(e){return this.stop(!0),e&&F1(this),this}runAsync(e,n){var r=this;e.delay;let i=Tr(e,["delay"]);const o=this.local;let s=Promise.resolve(void 0);if(de.arr(i.to))for(let a=0;a<i.to.length;a++){const l=a,u=Ke({},i,na(i.to[l]));de.arr(u.config)&&(u.config=u.config[l]),s=s.then(()=>{if(o===this.guid)return new Promise(f=>this.diff(u).start(f))})}else if(de.fun(i.to)){let a=0,l;s=s.then(()=>i.to(u=>{const f=Ke({},i,na(u));if(de.arr(f.config)&&(f.config=f.config[a]),a++,o===this.guid)return l=new Promise(d=>this.diff(f).start(d))},function(u){return u===void 0&&(u=!0),r.stop(u)}).then(()=>l))}s.then(n)}diff(e){this.props=Ke({},this.props,e);let n=this.props,r=n.from,i=r===void 0?{}:r,o=n.to,s=o===void 0?{}:o,a=n.config,l=a===void 0?{}:a,u=n.reverse,f=n.attach,d=n.reset,h=n.immediate;if(u){var v=[s,i];i=v[0],s=v[1]}this.merged=Ke({},i,this.merged,s),this.hasChanged=!1;let y=f&&f(this);if(this.animations=Object.entries(this.merged).reduce((g,w)=>{let C=w[0],L=w[1],m=g[C]||{};const _=de.num(L),x=de.str(L)&&!L.startsWith("#")&&!/\d/.test(L)&&!lh[L],p=de.arr(L),b=!_&&!p&&!x;let E=de.und(i[C])?L:i[C],P=_||p||x?L:1,O=Or(l,C);y&&(P=y.animations[C].parent);let T=m.parent,M=m.interpolation,R=Eo(y?P.getPayload():P),A,B=L;b&&(B=ds({range:[0,1],output:[L,L]})(1));let V=M&&M.getValue();const z=!de.und(T)&&m.animatedValues.some(Q=>!Q.done),Y=!de.equ(B,V),G=!de.equ(B,m.previous),H=!de.equ(O,m.config);if(d||G&&Y||H){if(_||x)T=M=m.parent||new Ka(E);else if(p)T=M=m.parent||new H1(E);else if(b){let Q=m.interpolation&&m.interpolation.calc(m.parent.value);Q=Q!==void 0&&!d?Q:E,m.parent?(T=m.parent,T.setValue(0,!1)):T=new Ka(0);const oe={output:[Q,L]};m.interpolation?(M=m.interpolation,m.interpolation.updateConfig(oe)):M=T.interpolate(oe)}return R=Eo(y?P.getPayload():P),A=Eo(T.getPayload()),d&&!b&&T.setValue(E,!1),this.hasChanged=!0,A.forEach(Q=>{Q.startPosition=Q.value,Q.lastPosition=Q.value,Q.lastVelocity=z?Q.lastVelocity:void 0,Q.lastTime=z?Q.lastTime:void 0,Q.startTime=ch(),Q.done=!1,Q.animatedStyles.clear()}),Or(h,C)&&T.setValue(b?P:L,!1),Ke({},g,{[C]:Ke({},m,{name:C,parent:T,interpolation:M,animatedValues:A,toValues:R,previous:B,config:O,fromValues:Eo(T.getValue()),immediate:Or(h,C),initialVelocity:Kn(O.velocity,0),clamp:Kn(O.clamp,!1),precision:Kn(O.precision,.01),tension:Kn(O.tension,170),friction:Kn(O.friction,26),mass:Kn(O.mass,1),duration:O.duration,easing:Kn(O.easing,Q=>Q),decay:O.decay})})}else return Y?g:(b&&(T.setValue(1,!1),M.updateConfig({output:[B,B]})),T.done=!0,this.hasChanged=!0,Ke({},g,{[C]:Ke({},g[C],{previous:B})}))},this.animations),this.hasChanged){this.configs=Object.values(this.animations),this.values={},this.interpolations={};for(let g in this.animations)this.interpolations[g]=this.animations[g].interpolation,this.values[g]=this.animations[g].interpolation.getValue()}return this}destroy(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0}};const G1=(t,e)=>{const n=c.useRef(!1),r=c.useRef(),i=de.fun(e),o=c.useMemo(()=>{r.current&&(r.current.map(d=>d.destroy()),r.current=void 0);let f;return[new Array(t).fill().map((d,h)=>{const v=new W1,y=i?Or(e,h,v):e[h];return h===0&&(f=y.ref),v.update(y),f||v.start(),v}),f]},[t]),s=o[0],a=o[1];r.current=s,c.useImperativeHandle(a,()=>({start:()=>Promise.all(r.current.map(f=>new Promise(d=>f.start(d)))),stop:f=>r.current.forEach(d=>d.stop(f)),get controllers(){return r.current}}));const l=c.useMemo(()=>f=>r.current.map((d,h)=>{d.update(i?Or(f,h,d):f[h]),a||d.start()}),[t]);c.useEffect(()=>{n.current?i||l(e):a||r.current.forEach(f=>f.start())}),c.useEffect(()=>(n.current=!0,()=>r.current.forEach(f=>f.destroy())),[]);const u=r.current.map(f=>f.getValues());return i?[u,l,f=>r.current.forEach(d=>d.pause(f))]:u},Z1=t=>{const e=de.fun(t),n=G1(1,e?t:[t]),r=n[0],i=n[1],o=n[2];return e?[r[0],i,o]:r};class q1 extends ah{constructor(e){e===void 0&&(e={}),super(),e.transform&&!(e.transform instanceof $t)&&(e=Fl.transform(e)),this.payload=e}}const ps={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},Wt="[-+]?\\d*\\.?\\d+",gs=Wt+"%";function Is(){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 K1=new RegExp("rgb"+Is(Wt,Wt,Wt)),Q1=new RegExp("rgba"+Is(Wt,Wt,Wt,Wt)),J1=new RegExp("hsl"+Is(Wt,gs,gs)),Y1=new RegExp("hsla"+Is(Wt,gs,gs,Wt)),X1=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,eb=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,tb=/^#([0-9a-fA-F]{6})$/,nb=/^#([0-9a-fA-F]{8})$/;function rb(t){let e;return typeof t=="number"?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=tb.exec(t))?parseInt(e[1]+"ff",16)>>>0:ps.hasOwnProperty(t)?ps[t]:(e=K1.exec(t))?(Er(e[1])<<24|Er(e[2])<<16|Er(e[3])<<8|255)>>>0:(e=Q1.exec(t))?(Er(e[1])<<24|Er(e[2])<<16|Er(e[3])<<8|Uu(e[4]))>>>0:(e=X1.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=nb.exec(t))?parseInt(e[1],16)>>>0:(e=eb.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=J1.exec(t))?(Bu(Fu(e[1]),xo(e[2]),xo(e[3]))|255)>>>0:(e=Y1.exec(t))?(Bu(Fu(e[1]),xo(e[2]),xo(e[3]))|Uu(e[4]))>>>0:null}function ra(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 Bu(t,e,n){const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,o=ra(i,r,t+1/3),s=ra(i,r,t),a=ra(i,r,t-1/3);return Math.round(o*255)<<24|Math.round(s*255)<<16|Math.round(a*255)<<8}function Er(t){const e=parseInt(t,10);return e<0?0:e>255?255:e}function Fu(t){return(parseFloat(t)%360+360)%360/360}function Uu(t){const e=parseFloat(t);return e<0?0:e>1?255:Math.round(e*255)}function xo(t){const e=parseFloat(t);return e<0?0:e>100?1:e/100}function Vu(t){let e=rb(t);if(e===null)return t;e=e||0;let n=(e&4278190080)>>>24,r=(e&16711680)>>>16,i=(e&65280)>>>8,o=(e&255)/255;return`rgba(${n}, ${r}, ${i}, ${o})`}const _o=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ib=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ob=new RegExp(`(${Object.keys(ps).join("|")})`,"g"),sb=t=>{const e=t.output.map(i=>i.replace(ib,Vu)).map(i=>i.replace(ob,Vu)),n=e[0].match(_o).map(()=>[]);e.forEach(i=>{i.match(_o).forEach((o,s)=>n[s].push(+o))});const r=e[0].match(_o).map((i,o)=>hs(Ke({},t,{output:n[o]})));return i=>{let o=0;return e[0].replace(_o,()=>r[o++](i)).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(s,a,l,u,f)=>`rgba(${Math.round(a)}, ${Math.round(l)}, ${Math.round(u)}, ${f})`)}};let Di={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 ab=(t,e)=>t+e.charAt(0).toUpperCase()+e.substring(1),lb=["Webkit","Ms","Moz","O"];Di=Object.keys(Di).reduce((t,e)=>(lb.forEach(n=>t[ab(n,e)]=t[e]),t),Di);function ub(t,e,n){return e==null||typeof e=="boolean"||e===""?"":!n&&typeof e=="number"&&e!==0&&!(Di.hasOwnProperty(t)&&Di[t])?e+"px":(""+e).trim()}const zu={};A1(t=>new q1(t));R1(sb);T1(ps);k1((t,e)=>{if(t.nodeType&&t.setAttribute!==void 0){const i=e.style,o=e.children,s=e.scrollTop,a=e.scrollLeft,l=Tr(e,["style","children","scrollTop","scrollLeft"]),u=t.nodeName==="filter"||t.parentNode&&t.parentNode.nodeName==="filter";s!==void 0&&(t.scrollTop=s),a!==void 0&&(t.scrollLeft=a),o!==void 0&&(t.textContent=o);for(let f in i)if(i.hasOwnProperty(f)){var n=f.indexOf("--")===0,r=ub(f,i[f],n);f==="float"&&(f="cssFloat"),n?t.style.setProperty(f,r):t.style[f]=r}for(let f in l){const d=u?f:zu[f]||(zu[f]=f.replace(/([A-Z])/g,h=>"-"+h.toLowerCase()));typeof t.getAttribute(d)<"u"&&t.setAttribute(d,l[f])}return}else return!1},t=>t);const cb=["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"],fb=_1(N1,!1),db=fb(cb);function Hu(t,e){return t.map(function(n,r){return n+e[r]})}function ph(t,e){return t.map(function(n,r){return n-e[r]})}function Qa(t){return Math.hypot.apply(Math,t)}function hb(t,e,n){var r=Qa(e),i=r===0?0:1/r,o=n===0?0:1/n,s=o*r,a=e.map(function(f){return o*f}),l=e.map(function(f){return i*f}),u=Qa(t);return{velocities:a,velocity:s,distance:u,direction:l}}function Ja(t){return Math.sign?Math.sign(t):+(t>0)-+(t<0)||+t}function pb(t,e,n){return Math.max(e,Math.min(t,n))}function gb(t,e){return Math.pow(t,e*5)}function $u(t,e,n){return e===0||Math.abs(e)===1/0?gb(t,n):t*e*n/(e+n*t)}function Ai(t,e,n,r){return r===void 0&&(r=.15),r===0?pb(t,e,n):t<e?-$u(e-t,n-e,r)+e:t>n?+$u(t-n,n-e,r)+n:t}function Wu(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 vb(t,e,n){return e&&Wu(t.prototype,e),n&&Wu(t,n),t}function yt(){return yt=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},yt.apply(this,arguments)}function gh(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function mb(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Mo(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function yb(t,e){if(t){if(typeof t=="string")return Gu(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 Gu(t,e)}}function Gu(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 js(t,e){var n;if(typeof Symbol>"u"||t[Symbol.iterator]==null){if(Array.isArray(t)||(n=yb(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 vh(){}function mh(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.length===0?vh:e.length===1?e[0]:function(){for(var r,i=js(e),o;!(o=i()).done;){var s=o.value;r=s.apply(this,arguments)||r}return r}}function Rn(t,e){if(t===void 0){if(e===void 0)throw new Error("Must define fallback value if undefined is expected");t=e}return Array.isArray(t)?t:[t,t]}function Oo(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 Ul(t,e){t===void 0&&(t={});for(var n={},r=0,i=Object.entries(e);r<i.length;r++){var o=i[r],s=o[0],a=o[1];switch(typeof a){case"function":n[s]=a.call(n,t[s],s,t);break;case"object":n[s]=Ul(t[s],a);break;case"boolean":a&&(n[s]=t[s]);break}}return n}var bb=180,Cb=.15,wb=.5,Sb=60,Lb={threshold:function(e){return e===void 0&&(e=0),Rn(e)},rubberband:function(e){switch(e===void 0&&(e=0),e){case!0:return Rn(Cb);case!1:return Rn(0);default:return Rn(e)}},enabled:function(e){return e===void 0&&(e=!0),e},triggerAllEvents:function(e){return e===void 0&&(e=!1),e},initial:function(e){return e===void 0&&(e=0),typeof e=="function"?e:Rn(e)}},yh=yt({},Lb,{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 yh.bounds(e(d))};var n=e,r=n.left,i=r===void 0?-1/0:r,o=n.right,s=o===void 0?1/0:o,a=n.top,l=a===void 0?-1/0:a,u=n.bottom,f=u===void 0?1/0:u;return[[i,s],[l,f]]}}),Eb=typeof window<"u"&&window.document&&window.document.createElement,xb={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=Eb?window:void 0),t}),eventOptions:function(e){var n=e===void 0?{}:e,r=n.passive,i=r===void 0?!0:r,o=n.capture,s=o===void 0?!1:o;return{passive:i,capture:s}}},_b=yt({},yh,{threshold:function(e,n,r){var i=r.filterTaps,o=i===void 0?!1:i,s=r.lockDirection,a=s===void 0?!1:s,l=r.axis,u=l===void 0?void 0:l,f=Rn(e,o?3:a||u?1:0);return this.filterTaps=o||f[0]+f[1]>0,f},swipeVelocity:function(e){return e===void 0&&(e=wb),Rn(e)},swipeDistance:function(e){return e===void 0&&(e=Sb),Rn(e)},delay:function(e){switch(e===void 0&&(e=0),e){case!0:return bb;case!1:return 0;default:return e}}});function Mb(t){return t===void 0&&(t={}),Ul(t,xb)}function Ob(t){return t===void 0&&(t={}),Ul(t,_b)}function Pb(t){var e=t.domTarget,n=t.eventOptions,r=t.window,i=t.enabled,o=mb(t,["domTarget","eventOptions","window","enabled"]),s=Mb({domTarget:e,eventOptions:n,window:r,enabled:i});return s.drag=Ob(o),s}function gi(t){return yt({_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:vh,canceled:!1,memo:void 0,args:void 0},t)}function bh(){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=gi({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=gi({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),r=gi({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),i=gi({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),o=gi({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:o}}var Yn=new Map,kb=function(){function t(n,r){var i=this;r===void 0&&(r=[]),this.controller=n,this.args=r,this.debounced=!0,this.setTimeout=function(o,s){var a;s===void 0&&(s=140),clearTimeout(i.controller.timeouts[i.stateKey]);for(var l=arguments.length,u=new Array(l>2?l-2:0),f=2;f<l;f++)u[f-2]=arguments[f];i.controller.timeouts[i.stateKey]=(a=window).setTimeout.apply(a,[o,s].concat(u))},this.clearTimeout=function(){clearTimeout(i.controller.timeouts[i.stateKey])},this.fireGestureHandler=function(o){if(o===void 0&&(o=!1),i.state._blocked)return i.debounced||(i.state._active=!1,i.clean()),null;if(!o&&!i.state.intentional&&!i.config.triggerAllEvents)return null;if(i.state.intentional){var s=i.state.active,a=i.state._active;i.state.active=a,i.state.first=a&&!s,i.state.last=s&&!a,i.controller.state.shared[i.ingKey]=a}var l=yt({},i.controller.state.shared,i.state,i.mapStateValues(i.state)),u=i.handler(l);return i.state.memo=u!==void 0?u:i.state.memo,i.state._active||i.clean(),l}}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,o=i.initial,s=i.bounds,a=i.rubberband,l=i.threshold,u=this.state,f=u._bounds,d=u._initial,h=u._active,v=u._intentional,y=u.lastOffset,g=u.movement,w=this.getInternalMovement(r,this.state),C=v[0]===!1?Zu(w[0],l[0]):v[0],L=v[1]===!1?Zu(w[1],l[1]):v[1],m=this.checkIntentionality([C,L],w);if(m._blocked)return yt({},m,{_movement:w,delta:[0,0]});var _=m._intentional,x=w,p,b;if(_[0]!==!1&&v[0]===!1&&(b=Oo(o,this.state),p=Oo(s,this.state),d[0]=b[0],f[0]=p[0]),_[1]!==!1&&v[1]===!1){var E,P;b=(E=b)!=null?E:Oo(o,this.state),p=(P=p)!=null?P:Oo(s,this.state),d[1]=b[1],f[1]=p[1]}var O=[_[0]!==!1?w[0]-_[0]:d[0],_[1]!==!1?w[1]-_[1]:d[1]],T=Hu(O,y),M=h?a:[0,0];return O=qu(f,Hu(O,d),M),yt({},m,{intentional:_[0]!==!1||_[1]!==!1,_initial:d,_movement:x,movement:O,values:r,offset:qu(f,T,M),delta:ph(O,g)})},e.clean=function(){this.clearTimeout()},vb(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 Zu(t,e){return Math.abs(t)>=e?Ja(t)*e:!1}function qu(t,e,n){var r=e[0],i=e[1],o=n[0],s=n[1],a=t[0],l=a[0],u=a[1],f=t[1],d=f[0],h=f[1];return[Ai(r,l,u,o),Ai(i,d,h,s)]}function ia(t,e,n){var r=t.state,i=t.args,o=e.timeStamp,s=e.type,a=r.values,l=n?0:o-r.startTime;return{_lastEventType:s,event:e,timeStamp:o,elapsedTime:l,args:i,previous:a}}function Tb(t,e,n){var r=t.state.offset,i=n.timeStamp;return yt({},bh()[t.stateKey],{_active:!0,values:e,initial:e,offset:r,lastOffset:r,startTime:i})}function Rb(t,e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return t.call.apply(t,[this,yt({},e,{event:n})].concat(i))}}var Db=function(e){var n=this;this.classes=e,this.bind=function(){for(var r={},i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];for(var a=js(n.classes),l;!(l=a()).done;){var u=l.value;new u(n,o).addBindings(r)}for(var f=0,d=Object.entries(n.nativeRefs);f<d.length;f++){var h=d[f],v=h[0],y=h[1];Ya(r,v,Rb(y,yt({},n.state.shared,{args:o})))}return n.config.domTarget?Nb(n,r):Bb(n,r)},this.effect=function(){return n.config.domTarget&&n.bind(),n.clean},this.clean=function(){var r=wh(n.config),i=n.config.eventOptions;r&&lo(r,Ch(n.domListeners),i),Object.values(n.timeouts).forEach(clearTimeout),Ab(n)},this.state=bh(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function Ab(t){var e=t.config,n=e.window,r=e.eventOptions,i=t.windowListeners;if(n){for(var o in i){var s=i[o];lo(n,s,r)}t.windowListeners={}}}function Ib(t,e){var n=t.config,r=t.windowListeners;n.window&&(lo(n.window,r[e],n.eventOptions),delete r[e])}function jb(t,e,n){var r=t.config,i=t.windowListeners;n===void 0&&(n=[]),r.window&&(lo(r.window,i[e],r.eventOptions),Sh(r.window,i[e]=n,r.eventOptions))}function Nb(t,e){var n=t.config,r=t.domListeners,i=wh(n);if(!i)throw new Error("domTarget must be defined");var o=n.eventOptions;lo(i,Ch(r),o);for(var s=0,a=Object.entries(e);s<a.length;s++){var l=a[s],u=l[0],f=l[1],d=u.slice(2).toLowerCase();r.push([d,mh.apply(void 0,f)])}Sh(i,r,o)}function Bb(t,e){for(var n=t.config,r={},i=n.eventOptions.capture?"Capture":"",o=0,s=Object.entries(e);o<s.length;o++){var a=s[o],l=a[0],u=a[1],f=Array.isArray(u)?u:[u],d=l+i;r[d]=mh.apply(void 0,f)}return r}function Ch(t){return t===void 0&&(t=[]),t.splice(0,t.length)}function wh(t){var e=t.domTarget;return e&&"current"in e?e.current:e}function Ya(t,e,n){t[e]||(t[e]=[]),t[e].push(n)}function Sh(t,e,n){e===void 0&&(e=[]),n===void 0&&(n={});for(var r=js(e),i;!(i=r()).done;){var o=i.value,s=o[0],a=o[1];t.addEventListener(s,a,n)}}function lo(t,e,n){e===void 0&&(e=[]),n===void 0&&(n={});for(var r=js(e),i;!(i=r()).done;){var o=i.value,s=o[0],a=o[1];t.removeEventListener(s,a,n)}}function Fb(t,e,n){n===void 0&&(n={});var r=Vb(t),i=c.useMemo(function(){return new Db(r)},[]);return i.config=e,i.handlers=t,i.nativeRefs=n,c.useEffect(i.effect,[]),i.config.domTarget?Ub:i.bind}function Ub(){}function Vb(t){var e=new Set;return t.drag&&e.add(Yn.get("drag")),t.wheel&&e.add(Yn.get("wheel")),t.scroll&&e.add(Yn.get("scroll")),t.move&&e.add(Yn.get("move")),t.pinch&&e.add(Yn.get("pinch")),t.hover&&e.add(Yn.get("hover")),e}var zb=function(t){gh(e,t);function e(){return t.apply(this,arguments)||this}var n=e.prototype;return n.getInternalMovement=function(i,o){return ph(i,o.initial)},n.checkIntentionality=function(i,o){if(i[0]===!1&&i[1]===!1)return{_intentional:i,axis:this.state.axis};var s=o.map(Math.abs),a=s[0],l=s[1],u=this.state.axis||(a>l?"x":a<l?"y":void 0);return!this.config.axis&&!this.config.lockDirection?{_intentional:i,_blocked:!1,axis:u}:u?this.config.axis&&u!==this.config.axis?{_intentional:i,_blocked:!0,axis:u}:(i[u==="x"?1:0]=!1,{_intentional:i,_blocked:!1,axis:u}):{_intentional:[!1,!1],_blocked:!1,axis:u}},n.getKinematics=function(i,o){var s=this.getMovement(i);if(!s._blocked){var a=o.timeStamp-this.state.timeStamp;Object.assign(s,hb(s.movement,s.delta,a))}return s},n.mapStateValues=function(i){return{xy:i.values,vxvy:i.velocities}},e}(kb);function Lh(t){if("touches"in t){var e=t.targetTouches,n=t.changedTouches;return e.length>0?e:n}return null}function Ku(t){var e="buttons"in t?t.buttons:0,n=Lh(t),r=n&&n.length||0,i=r>0||e>0,o=t.shiftKey,s=t.altKey,a=t.metaKey,l=t.ctrlKey;return{touches:r,down:i,buttons:e,shiftKey:o,altKey:s,metaKey:a,ctrlKey:l}}function Qu(t){var e=Lh(t),n=e?e[0]:t,r=n.clientX,i=n.clientY;return[r,i]}var Hb=3,$b=220,Wb=function(t){gh(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||(jb(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(Mo(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 o=Ku(i);if(!o.down){r.onDragEnd(i);return}r.updateSharedState(o);var s=Qu(i),a=r.getKinematics(s,i),l=ia(Mo(r),i),u=r.state._isTap,f=Qa(a._movement);u&&f>=Hb&&(u=!1),r.updateGestureState(yt({},l,a,{_isTap:u})),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 o=r.state._isTap,s=r.state.velocities,a=s[0],l=s[1],u=r.state.movement,f=u[0],d=u[1],h=r.state._intentional,v=h[0],y=h[1],g=r.config.swipeVelocity,w=g[0],C=g[1],L=r.config.swipeDistance,m=L[0],_=L[1],x=yt({},ia(Mo(r),i),r.getMovement(r.state.values)),p=[0,0];x.elapsedTime<$b&&(v!==!1&&Math.abs(a)>w&&Math.abs(f)>m&&(p[0]=Ja(a)),y!==!1&&Math.abs(l)>C&&Math.abs(d)>_&&(p[1]=Ja(l))),r.updateGestureState(yt({},x,{tap:o,swipe:p})),r.fireGestureHandler(o===!0)}},r.clean=function(){t.prototype.clean.call(Mo(r)),r.state._delayedEvent=!1,Ib(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 o=Qu(i);this.updateSharedState(Ku(i)),this.updateGestureState(yt({},Tb(this,o,i),ia(this,i,!0),{_pointerId:i.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(o)),this.fireGestureHandler()},n.addBindings=function(i){if(Ya(i,"onPointerDown",this.onDragStart),this.config.filterTaps){var o=this.controller.config.eventOptions.capture?"onClick":"onClickCapture";Ya(i,o,this.onClick)}},e}(zb);function Gb(t,e){var n,r=[],i,o=!1;function s(){for(var a=arguments.length,l=new Array(a),u=0;u<a;u++)l[u]=arguments[u];return o&&n===this&&e(l,r)||(i=t.apply(this,l),o=!0,n=this,r=l),i}return s}function Xo(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(!Xo(t[r],e[r]))return!1;return!0}var o;if(typeof Map=="function"&&t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(o=t.entries();!(r=o.next()).done;)if(!e.has(r.value[0]))return!1;for(o=t.entries();!(r=o.next()).done;)if(!Xo(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(o=t.entries();!(r=o.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)&&!Xo(t[i[r]],e[i[r]]))return!1;return!0}return t!==t&&e!==e}function Zb(t,e){try{return Xo(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 qb(t,e){e===void 0&&(e={}),Yn.set("drag",Wb);var n=c.useRef();return n.current||(n.current=Gb(Pb,Zb)),Fb({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
|
|
47
|
+
*/var Eh=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],vs=Eh.join(","),xh=typeof Element>"u",pr=xh?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Xa=!xh&&Element.prototype.getRootNode?function(t){return t.getRootNode()}:function(t){return t.ownerDocument},_h=function(e,n,r){var i=Array.prototype.slice.apply(e.querySelectorAll(vs));return n&&pr.call(e,vs)&&i.unshift(e),i=i.filter(r),i},Mh=function t(e,n,r){for(var i=[],o=Array.from(e);o.length;){var s=o.shift();if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,u=t(l,!0,r);r.flatten?i.push.apply(i,u):i.push({scope:s,candidates:u})}else{var f=pr.call(s,vs);f&&r.filter(s)&&(n||!e.includes(s))&&i.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),h=!r.shadowRootFilter||r.shadowRootFilter(s);if(d&&h){var v=t(d===!0?s.children:d.children,!0,r);r.flatten?i.push.apply(i,v):i.push({scope:s,candidates:v})}else o.unshift.apply(o,s.children)}}return i},Oh=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},Kb=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},Ph=function(e){return e.tagName==="INPUT"},Qb=function(e){return Ph(e)&&e.type==="hidden"},Jb=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},Yb=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},Xb=function(e){if(!e.name)return!0;var n=e.form||Xa(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(s){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",s.message),!1}var o=Yb(i,e.form);return!o||o===e},e2=function(e){return Ph(e)&&e.type==="radio"},t2=function(e){return e2(e)&&!Xb(e)},Ju=function(e){var n=e.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},n2=function(e,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var o=pr.call(e,"details>summary:first-of-type"),s=o?e.parentElement:e;if(pr.call(s,"details:not([open]) *"))return!0;var a=Xa(e).host,l=(a==null?void 0:a.ownerDocument.contains(a))||e.ownerDocument.contains(e);if(!r||r==="full"){if(typeof i=="function"){for(var u=e;e;){var f=e.parentElement,d=Xa(e);if(f&&!f.shadowRoot&&i(f)===!0)return Ju(e);e.assignedSlot?e=e.assignedSlot:!f&&d!==e.ownerDocument?e=d.host:e=f}e=u}if(l)return!e.getClientRects().length}else if(r==="non-zero-area")return Ju(e);return!1},r2=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 pr.call(n,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}n=n.parentElement}return!1},ms=function(e,n){return!(n.disabled||Qb(n)||n2(n,e)||Jb(n)||r2(n))},el=function(e,n){return!(t2(n)||Oh(n)<0||!ms(e,n))},i2=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},o2=function t(e){var n=[],r=[];return e.forEach(function(i,o){var s=!!i.scope,a=s?i.scope:i,l=Oh(a,s),u=s?t(i.candidates):a;l===0?s?n.push.apply(n,u):n.push(a):r.push({documentOrder:o,tabIndex:l,item:i,isScope:s,content:u})}),r.sort(Kb).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},s2=function(e,n){n=n||{};var r;return n.getShadowRoot?r=Mh([e],n.includeContainer,{filter:el.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:i2}):r=_h(e,n.includeContainer,el.bind(null,n)),o2(r)},a2=function(e,n){n=n||{};var r;return n.getShadowRoot?r=Mh([e],n.includeContainer,{filter:ms.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=_h(e,n.includeContainer,ms.bind(null,n)),r},Po=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return pr.call(e,vs)===!1?!1:el(n,e)},l2=Eh.concat("iframe").join(","),oa=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return pr.call(e,l2)===!1?!1:ms(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 Ju(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 Yu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ju(Object(n),!0).forEach(function(r){u2(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ju(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function u2(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Xu=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()}}}(),c2=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},f2=function(e){return e.key==="Escape"||e.key==="Esc"||e.keyCode===27},d2=function(e){return e.key==="Tab"||e.keyCode===9},ec=function(e){return setTimeout(e,0)},tc=function(e,n){var r=-1;return e.every(function(i,o){return n(i)?(r=o,!1):!0}),r},vi=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},ko=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},h2=function(e,n){var r=(n==null?void 0:n.document)||document,i=Yu({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},n),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},s,a=function(p,b,x){return p&&p[b]!==void 0?p[b]:i[x||b]},l=function(p){return o.containerGroups.findIndex(function(b){var x=b.container,M=b.tabbableNodes;return x.contains(p)||M.find(function(O){return O===p})})},u=function(p){var b=i[p];if(typeof b=="function"){for(var x=arguments.length,M=new Array(x>1?x-1:0),O=1;O<x;O++)M[O-1]=arguments[O];b=b.apply(void 0,M)}if(b===!0&&(b=void 0),!b){if(b===void 0||b===!1)return b;throw new Error("`".concat(p,"` was specified but was not a node, or did not return a node"))}var T=b;if(typeof b=="string"&&(T=r.querySelector(b),!T))throw new Error("`".concat(p,"` as selector refers to no known node"));return T},f=function(){var p=u("initialFocus");if(p===!1)return!1;if(p===void 0)if(l(r.activeElement)>=0)p=r.activeElement;else{var b=o.tabbableGroups[0],x=b&&b.firstTabbableNode;p=x||u("fallbackFocus")}if(!p)throw new Error("Your focus-trap needs to have at least one focusable element");return p},d=function(){if(o.containerGroups=o.containers.map(function(p){var b=s2(p,i.tabbableOptions),x=a2(p,i.tabbableOptions);return{container:p,tabbableNodes:b,focusableNodes:x,firstTabbableNode:b.length>0?b[0]:null,lastTabbableNode:b.length>0?b[b.length-1]:null,nextTabbableNode:function(O){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,P=x.findIndex(function(R){return R===O});if(!(P<0))return T?x.slice(P+1).find(function(R){return Po(R,i.tabbableOptions)}):x.slice(0,P).reverse().find(function(R){return Po(R,i.tabbableOptions)})}}}),o.tabbableGroups=o.containerGroups.filter(function(p){return p.tabbableNodes.length>0}),o.tabbableGroups.length<=0&&!u("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 E(p){if(p!==!1&&p!==r.activeElement){if(!p||!p.focus){E(f());return}p.focus({preventScroll:!!i.preventScroll}),o.mostRecentlyFocusedNode=p,c2(p)&&p.select()}},v=function(p){var b=u("setReturnFocus",p);return b||(b===!1?!1:p)},y=function(p){var b=ko(p);if(!(l(b)>=0)){if(vi(i.clickOutsideDeactivates,p)){s.deactivate({returnFocus:i.returnFocusOnDeactivate&&!oa(b,i.tabbableOptions)});return}vi(i.allowOutsideClick,p)||p.preventDefault()}},g=function(p){var b=ko(p),x=l(b)>=0;x||b instanceof Document?x&&(o.mostRecentlyFocusedNode=b):(p.stopImmediatePropagation(),h(o.mostRecentlyFocusedNode||f()))},w=function(p){var b=ko(p);d();var x=null;if(o.tabbableGroups.length>0){var M=l(b),O=M>=0?o.containerGroups[M]:void 0;if(M<0)p.shiftKey?x=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:x=o.tabbableGroups[0].firstTabbableNode;else if(p.shiftKey){var T=tc(o.tabbableGroups,function(N){var z=N.firstTabbableNode;return b===z});if(T<0&&(O.container===b||oa(b,i.tabbableOptions)&&!Po(b,i.tabbableOptions)&&!O.nextTabbableNode(b,!1))&&(T=M),T>=0){var P=T===0?o.tabbableGroups.length-1:T-1,R=o.tabbableGroups[P];x=R.lastTabbableNode}}else{var I=tc(o.tabbableGroups,function(N){var z=N.lastTabbableNode;return b===z});if(I<0&&(O.container===b||oa(b,i.tabbableOptions)&&!Po(b,i.tabbableOptions)&&!O.nextTabbableNode(b))&&(I=M),I>=0){var B=I===o.tabbableGroups.length-1?0:I+1,V=o.tabbableGroups[B];x=V.firstTabbableNode}}}else x=u("fallbackFocus");x&&(p.preventDefault(),h(x))},C=function(p){if(f2(p)&&vi(i.escapeDeactivates,p)!==!1){p.preventDefault(),s.deactivate();return}if(d2(p)){w(p);return}},L=function(p){var b=ko(p);l(b)>=0||vi(i.clickOutsideDeactivates,p)||vi(i.allowOutsideClick,p)||(p.preventDefault(),p.stopImmediatePropagation())},m=function(){if(o.active)return Xu.activateTrap(s),o.delayInitialFocusTimer=i.delayInitialFocus?ec(function(){h(f())}):h(f()),r.addEventListener("focusin",g,!0),r.addEventListener("mousedown",y,{capture:!0,passive:!1}),r.addEventListener("touchstart",y,{capture:!0,passive:!1}),r.addEventListener("click",L,{capture:!0,passive:!1}),r.addEventListener("keydown",C,{capture:!0,passive:!1}),s},_=function(){if(o.active)return r.removeEventListener("focusin",g,!0),r.removeEventListener("mousedown",y,!0),r.removeEventListener("touchstart",y,!0),r.removeEventListener("click",L,!0),r.removeEventListener("keydown",C,!0),s};return s={get active(){return o.active},get paused(){return o.paused},activate:function(p){if(o.active)return this;var b=a(p,"onActivate"),x=a(p,"onPostActivate"),M=a(p,"checkCanFocusTrap");M||d(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,b&&b();var O=function(){M&&d(),m(),x&&x()};return M?(M(o.containers.concat()).then(O,O),this):(O(),this)},deactivate:function(p){if(!o.active)return this;var b=Yu({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},p);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,_(),o.active=!1,o.paused=!1,Xu.deactivateTrap(s);var x=a(b,"onDeactivate"),M=a(b,"onPostDeactivate"),O=a(b,"checkCanReturnFocus"),T=a(b,"returnFocus","returnFocusOnDeactivate");x&&x();var P=function(){ec(function(){T&&h(v(o.nodeFocusedBeforeActivation)),M&&M()})};return T&&O?(O(v(o.nodeFocusedBeforeActivation)).then(P,P),this):(P(),this)},pause:function(){return o.paused||!o.active?this:(o.paused=!0,_(),this)},unpause:function(){return!o.paused||!o.active?this:(o.paused=!1,d(),m(),this)},updateContainerElements:function(p){var b=[].concat(p).filter(Boolean);return o.containers=b.map(function(x){return typeof x=="string"?r.querySelector(x):x}),o.active&&d(),this}},s.updateContainerElements(e),s};function p2(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 Ul=!1;if(typeof window<"u"){var nc={get passive(){Ul=!0}};window.addEventListener("testPassive",null,nc),window.removeEventListener("testPassive",null,nc)}var kh=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),Un=[],ys=!1,Th=-1,Ii=void 0,ji=void 0,Rh=function(e){return Un.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(e))})},bs=function(e){var n=e||window.event;return Rh(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},g2=function(e){if(ji===void 0){var n=!!e&&e.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;n&&r>0&&(ji=document.body.style.paddingRight,document.body.style.paddingRight=r+"px")}Ii===void 0&&(Ii=document.body.style.overflow,document.body.style.overflow="hidden")},v2=function(){ji!==void 0&&(document.body.style.paddingRight=ji,ji=void 0),Ii!==void 0&&(document.body.style.overflow=Ii,Ii=void 0)},m2=function(e){return e?e.scrollHeight-e.scrollTop<=e.clientHeight:!1},y2=function(e,n){var r=e.targetTouches[0].clientY-Th;return Rh(e.target)?!1:n&&n.scrollTop===0&&r>0||m2(n)&&r<0?bs(e):(e.stopPropagation(),!0)},b2=function(e,n){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!Un.some(function(i){return i.targetElement===e})){var r={targetElement:e,options:n||{}};Un=[].concat(p2(Un),[r]),kh?(e.ontouchstart=function(i){i.targetTouches.length===1&&(Th=i.targetTouches[0].clientY)},e.ontouchmove=function(i){i.targetTouches.length===1&&y2(i,e)},ys||(document.addEventListener("touchmove",bs,Ul?{passive:!1}:void 0),ys=!0)):g2(n)}},C2=function(e){if(!e){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}Un=Un.filter(function(n){return n.targetElement!==e}),kh?(e.ontouchstart=null,e.ontouchmove=null,ys&&Un.length===0&&(document.removeEventListener("touchmove",bs,Ul?{passive:!1}:void 0),ys=!1)):Un.length||v2()},dr=[],w2=function(){return dr.some(function(t){return t.activeTargets.length>0})},S2=function(){return dr.some(function(t){return t.skippedTargets.length>0})},rc="ResizeObserver loop completed with undelivered notifications.",L2=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:rc}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=rc),window.dispatchEvent(t)},$i;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})($i||($i={}));var hr=function(t){return Object.freeze(t)},x2=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,hr(this)}return t}(),Dh=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,hr(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,r=e.y,i=e.top,o=e.right,s=e.bottom,a=e.left,l=e.width,u=e.height;return{x:n,y:r,top:i,right:o,bottom:s,left:a,width:l,height:u}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),Vl=function(t){return t instanceof SVGElement&&"getBBox"in t},Ah=function(t){if(Vl(t)){var e=t.getBBox(),n=e.width,r=e.height;return!n&&!r}var i=t,o=i.offsetWidth,s=i.offsetHeight;return!(o||s||t.getClientRects().length)},ic=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)},E2=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},Ni=typeof window<"u"?window:{},To=new WeakMap,oc=/auto|scroll/,_2=/^tb|vertical/,M2=/msie|trident/i.test(Ni.navigator&&Ni.navigator.userAgent),Qt=function(t){return parseFloat(t||"0")},Rr=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new x2((n?e:t)||0,(n?t:e)||0)},sc=hr({devicePixelContentBoxSize:Rr(),borderBoxSize:Rr(),contentBoxSize:Rr(),contentRect:new Dh(0,0,0,0)}),Ih=function(t,e){if(e===void 0&&(e=!1),To.has(t)&&!e)return To.get(t);if(Ah(t))return To.set(t,sc),sc;var n=getComputedStyle(t),r=Vl(t)&&t.ownerSVGElement&&t.getBBox(),i=!M2&&n.boxSizing==="border-box",o=_2.test(n.writingMode||""),s=!r&&oc.test(n.overflowY||""),a=!r&&oc.test(n.overflowX||""),l=r?0:Qt(n.paddingTop),u=r?0:Qt(n.paddingRight),f=r?0:Qt(n.paddingBottom),d=r?0:Qt(n.paddingLeft),h=r?0:Qt(n.borderTopWidth),v=r?0:Qt(n.borderRightWidth),y=r?0:Qt(n.borderBottomWidth),g=r?0:Qt(n.borderLeftWidth),w=d+u,C=l+f,L=g+v,m=h+y,_=a?t.offsetHeight-m-t.clientHeight:0,E=s?t.offsetWidth-L-t.clientWidth:0,p=i?w+L:0,b=i?C+m:0,x=r?r.width:Qt(n.width)-p-E,M=r?r.height:Qt(n.height)-b-_,O=x+w+E+L,T=M+C+_+m,P=hr({devicePixelContentBoxSize:Rr(Math.round(x*devicePixelRatio),Math.round(M*devicePixelRatio),o),borderBoxSize:Rr(O,T,o),contentBoxSize:Rr(x,M,o),contentRect:new Dh(d,l,x,M)});return To.set(t,P),P},jh=function(t,e,n){var r=Ih(t,n),i=r.borderBoxSize,o=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(e){case $i.DEVICE_PIXEL_CONTENT_BOX:return s;case $i.BORDER_BOX:return i;default:return o}},O2=function(){function t(e){var n=Ih(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=hr([n.borderBoxSize]),this.contentBoxSize=hr([n.contentBoxSize]),this.devicePixelContentBoxSize=hr([n.devicePixelContentBoxSize])}return t}(),Nh=function(t){if(Ah(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},P2=function(){var t=1/0,e=[];dr.forEach(function(s){if(s.activeTargets.length!==0){var a=[];s.activeTargets.forEach(function(u){var f=new O2(u.target),d=Nh(u.target);a.push(f),u.lastReportedSize=jh(u.target,u.observedBox),d<t&&(t=d)}),e.push(function(){s.callback.call(s.observer,a,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var n=0,r=e;n<r.length;n++){var i=r[n];i()}return t},ac=function(t){dr.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(Nh(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},k2=function(){var t=0;for(ac(t);w2();)t=P2(),ac(t);return S2()&&L2(),t>0},sa,Bh=[],T2=function(){return Bh.splice(0).forEach(function(t){return t()})},R2=function(t){if(!sa){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return T2()}).observe(n,r),sa=function(){n.textContent="".concat(e?e--:e++)}}Bh.push(t),sa()},D2=function(t){R2(function(){requestAnimationFrame(t)})},es=0,A2=function(){return!!es},I2=250,j2={attributes:!0,characterData:!0,childList:!0,subtree:!0},lc=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],uc=function(t){return t===void 0&&(t=0),Date.now()+t},aa=!1,N2=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=I2),!aa){aa=!0;var r=uc(e);D2(function(){var i=!1;try{i=k2()}finally{if(aa=!1,e=r-uc(),!A2())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,j2)};document.body?n():Ni.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),lc.forEach(function(n){return Ni.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),lc.forEach(function(n){return Ni.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),el=new N2,cc=function(t){!es&&t>0&&el.start(),es+=t,!es&&el.stop()},B2=function(t){return!Vl(t)&&!E2(t)&&getComputedStyle(t).display==="inline"},F2=function(){function t(e,n){this.target=e,this.observedBox=n||$i.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=jh(this.target,this.observedBox,!0);return B2(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),U2=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),Ro=new WeakMap,fc=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},Do=function(){function t(){}return t.connect=function(e,n){var r=new U2(e,n);Ro.set(e,r)},t.observe=function(e,n,r){var i=Ro.get(e),o=i.observationTargets.length===0;fc(i.observationTargets,n)<0&&(o&&dr.push(i),i.observationTargets.push(new F2(n,r&&r.box)),cc(1),el.schedule())},t.unobserve=function(e,n){var r=Ro.get(e),i=fc(r.observationTargets,n),o=r.observationTargets.length===1;i>=0&&(o&&dr.splice(dr.indexOf(r),1),r.observationTargets.splice(i,1),cc(-1))},t.disconnect=function(e){var n=this,r=Ro.get(e);r.observationTargets.slice().forEach(function(i){return n.unobserve(e,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t}(),V2=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.");Do.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(!ic(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Do.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(!ic(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Do.unobserve(this,e)},t.prototype.disconnect=function(){Do.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();function ht(){return ht=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},ht.apply(this,arguments)}function ts(t,e){if(t==null)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)e.indexOf(n=o[r])>=0||(i[n]=t[n]);return i}var Bi=typeof window<"u"?c.useLayoutEffect:c.useEffect;function mi(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 Ao(t){var e=Math.round(t);if(Number.isNaN(t))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return e}var z2={box:"border-box"};function la(t,e){var n=e.label,r=e.enabled,i=e.resizeSourceRef,o=c.useState(0),s=o[0],a=o[1];c.useDebugValue(n+": "+s);var l=c.useCallback(function(u){a(u[0].borderBoxSize[0].blockSize),i.current="element"},[i]);return Bi(function(){if(t.current&&r){var u=new V2(l);return u.observe(t.current,z2),function(){u.disconnect()}}},[t,l,r]),r?s:0}function ft(t){return t===void 0&&(t=1e3),new Promise(function(e){return setTimeout(e,t)})}var dc={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},hc={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},H2=g1({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:ht({},dc,hc)}}},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:ht({},dc,hc)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:ht({},{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:[v1({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(ft()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenStart:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseStart:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeStart:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},onSnapEnd:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenEnd:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseEnd:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeEnd:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},renderVisuallyHidden:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}},activate:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}},deactivate:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}},openSmoothly:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}},openImmediately:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}},snapSmoothly:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}},resizeSmoothly:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}},closeSmoothly:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}}},guards:{initiallyClosed:function(t){return t.initialState==="CLOSED"},initiallyOpen:function(t){return t.initialState==="OPEN"}}}),$2=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],W2=["velocity"],G2=["onRest","config"],Fh=z1.default,Z2=Fh.tension,Io=Fh.friction,q2=c.forwardRef(function(t,e){var n=t.children,r=t.sibling,i=t.className,o=t.footer,s=t.header,a=t.open,l=t.initialState,u=t.lastSnapRef,f=t.initialFocusRef,d=t.onDismiss,h=t.maxHeight,v=t.defaultSnap,y=v===void 0?Q2:v,g=t.snapPoints,w=g===void 0?J2:g,C=t.blocking,L=C===void 0||C,m=t.scrollLocking,_=m===void 0||m,E=t.style,p=t.onSpringStart,b=t.onSpringCancel,x=t.onSpringEnd,M=t.reserveScrollBarGap,O=M===void 0?L:M,T=t.expandOnContentDrag,P=T!==void 0&&T,R=ts(t,$2),I=function(){var j=c.useState(!1),X=j[0],W=j[1],fe=c.useState({}),Ne=fe[0],Le=fe[1],Be=c.useCallback(function(Te){return Le(function(He){var ae;return ht({},He,((ae={})[Te]=!1,ae))}),function(){Le(function(He){var ae;return ht({},He,((ae={})[Te]=!0,ae))})}},[]);return c.useEffect(function(){var Te=Object.values(Ne);Te.length!==0&&Te.every(Boolean)&&W(!0)},[Ne]),{ready:X,registerReady:Be}}(),B=I.ready,V=I.registerReady,N=c.useRef(!1),z=c.useRef(p),Y=c.useRef(b),G=c.useRef(x);c.useEffect(function(){z.current=p,Y.current=b,G.current=x},[b,p,x]);var H,Q,oe=Z1(function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}}),te=oe[0],ee=oe[1],D=c.useRef(null),pe=c.useRef(null),Pe=c.useRef(null),Z=c.useRef(null),De=c.useRef(null),Ae=c.useRef(null),ue=c.useRef(0),_e=c.useRef(),Ve=c.useRef(!1),Ce=(H=c.useMemo(function(){return typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null},[]),Q=c.useRef(H==null?void 0:H.matches),c.useDebugValue(Q.current?"reduce":"no-preference"),c.useEffect(function(){var j=function(X){Q.current=X.matches};return H==null||H.addListener(j),function(){return H==null?void 0:H.removeListener(j)}},[H]),Q),Me=function(j){var X=j.targetRef,W=j.enabled,fe=j.reserveScrollBarGap,Ne=c.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return c.useDebugValue(W?"Enabled":"Disabled"),c.useEffect(function(){if(!W)return Ne.current.deactivate(),void(Ne.current={activate:function(){},deactivate:function(){}});var Le=X.current,Be=!1;Ne.current={activate:function(){Be||(Be=!0,b2(Le,{allowTouchMove:function(Te){return Te.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:fe}))},deactivate:function(){Be&&(Be=!1,C2(Le))}}},[W,X,fe]),Ne}({targetRef:pe,enabled:B&&_,reserveScrollBarGap:O}),Ie=function(j){var X=j.targetRef,W=j.enabled,fe=c.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return c.useDebugValue(W?"Enabled":"Disabled"),c.useEffect(function(){if(!W)return fe.current.deactivate(),void(fe.current={activate:function(){},deactivate:function(){}});var Ne=X.current,Le=!1,Be=[],Te=[];fe.current={activate:function(){if(!Le){Le=!0;var He=Ne.parentNode;document.querySelectorAll("body > *").forEach(function(ae){if(ae!==He){var ge=ae.getAttribute("aria-hidden");ge!==null&&ge!=="false"||(Be.push(ge),Te.push(ae),ae.setAttribute("aria-hidden","true"))}})}},deactivate:function(){Le&&(Le=!1,Te.forEach(function(He,ae){var ge=Be[ae];ge===null?He.removeAttribute("aria-hidden"):He.setAttribute("aria-hidden",ge)}),Be=[],Te=[])}}},[X,W]),fe}({targetRef:D,enabled:B&&L}),ke=function(j){var X=j.targetRef,W=j.fallbackRef,fe=j.initialFocusRef,Ne=j.enabled,Le=c.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return c.useDebugValue(Ne?"Enabled":"Disabled"),c.useEffect(function(){if(!Ne)return Le.current.deactivate(),void(Le.current={activate:function(){},deactivate:function(){}});var Be=W.current,Te=h2(X.current,{onActivate:void 0,initialFocus:fe?function(){return(fe==null?void 0:fe.current)||Be}:void 0,fallbackFocus:Be,escapeDeactivates:!1,clickOutsideDeactivates:!1}),He=!1;Le.current={activate:function(){try{return He?Promise.resolve():(He=!0,Promise.resolve(Te.activate()).then(function(){return Promise.resolve(new Promise(function(ae){return setTimeout(function(){return ae(void 0)},0)})).then(function(){})}))}catch(ae){return Promise.reject(ae)}},deactivate:function(){He&&(He=!1,Te.deactivate())}}},[Ne,W,fe,X]),Le}({targetRef:D,fallbackRef:Ae,initialFocusRef:f||void 0,enabled:B&&L&&f!==!1}),je=function(j){var X=j.getSnapPoints,W=j.heightRef,fe=j.lastSnapRef,Ne=j.ready,Le=function(et){var Ct=et.contentRef,wt=et.controlledMaxHeight,nt=et.footerEnabled,Kt=et.footerRef,Ut=et.headerEnabled,St=et.headerRef,Cn=et.registerReady,fn=et.resizeSourceRef,oi=c.useMemo(function(){return Cn("contentHeight")},[Cn]),si=function(wn,Wn,Gn){var Zn=c.useMemo(function(){return Wn("maxHeight")},[Wn]),qn=c.useState(function(){return Ao(wn)||typeof window<"u"?window.innerHeight:0}),ui=qn[0],ci=qn[1],Sn=ui>0,ne=c.useRef(0);return c.useDebugValue(wn?"controlled":"auto"),c.useEffect(function(){Sn&&Zn()},[Sn,Zn]),Bi(function(){if(wn)return ci(Ao(wn)),void(Gn.current="maxheightprop");var Kl=function(){ne.current||(ne.current=requestAnimationFrame(function(){ci(window.innerHeight),Gn.current="window",ne.current=0}))};return window.addEventListener("resize",Kl),ci(window.innerHeight),Gn.current="window",Zn(),function(){window.removeEventListener("resize",Kl),cancelAnimationFrame(ne.current)}},[wn,Zn,Gn]),ui}(wt,Cn,fn),mr=la(St,{label:"headerHeight",enabled:Ut,resizeSourceRef:fn}),ai=la(Ct,{label:"contentHeight",enabled:!0,resizeSourceRef:fn}),yr=la(Kt,{label:"footerHeight",enabled:nt,resizeSourceRef:fn}),$n=Math.min(si-mr-yr,ai)+mr+yr;c.useDebugValue("minHeight: "+$n);var li=ai>0;return c.useEffect(function(){li&&oi()},[li,oi]),{maxHeight:si,minHeight:$n,headerHeight:mr,footerHeight:yr}}({contentRef:j.contentRef,controlledMaxHeight:j.controlledMaxHeight,footerEnabled:j.footerEnabled,footerRef:j.footerRef,headerEnabled:j.headerEnabled,headerRef:j.headerRef,registerReady:j.registerReady,resizeSourceRef:j.resizeSourceRef}),Be=Le.maxHeight,Te=Le.minHeight,He=Le.headerHeight,ae=Le.footerHeight,ge=function(et,Ct){var wt=[].concat(et).map(Ao).reduce(function(St,Cn){return St.add(mi(Cn,0,Ct)),St},new Set),nt=Array.from(wt),Kt=Math.min.apply(Math,nt);if(Number.isNaN(Kt))throw new TypeError("minSnap is NaN");var Ut=Math.max.apply(Math,nt);if(Number.isNaN(Ut))throw new TypeError("maxSnap is NaN");return{snapPoints:nt,minSnap:Kt,maxSnap:Ut}}(Ne?X({height:W.current,footerHeight:ae,headerHeight:He,minHeight:Te,maxHeight:Be}):[0],Be),pt=ge.snapPoints,cn=ge.minSnap,ct=ge.maxSnap;return c.useDebugValue("minSnap: "+cn+", maxSnap:"+ct),{minSnap:cn,maxSnap:ct,findSnap:function(et){var Ct=Ao(typeof et=="function"?et({footerHeight:ae,headerHeight:He,height:W.current,minHeight:Te,maxHeight:Be,snapPoints:pt,lastSnap:fe.current}):et);return pt.reduce(function(wt,nt){return Math.abs(nt-Ct)<Math.abs(wt-Ct)?nt:wt},cn)},maxHeight:Be}}({contentRef:Pe,controlledMaxHeight:h,footerEnabled:!!o,footerRef:De,getSnapPoints:w,headerEnabled:s!==!1,headerRef:Z,heightRef:ue,lastSnapRef:u,ready:B,registerReady:V,resizeSourceRef:_e}),ie=je.minSnap,We=je.maxSnap,re=je.maxHeight,tt=je.findSnap,q=c.useRef(re),Ge=c.useRef(ie),ze=c.useRef(We),bt=c.useRef(tt),ut=c.useRef(0);Bi(function(){q.current=re,ze.current=We,Ge.current=ie,bt.current=tt,ut.current=tt(y)},[tt,y,re,We,ie]);var se=c.useCallback(function(j){var X=j.onRest,W=j.config,fe=(W=W===void 0?{}:W).velocity,Ne=fe===void 0?1:fe,Le=ts(W,W2),Be=ts(j,G2);return new Promise(function(Te){return ee(ht({},Be,{config:ht({velocity:Ne},Le,{mass:1,tension:Z2,friction:Math.max(Io,Io+(Io-Io*Ne))}),onRest:function(){var He=[].slice.call(arguments);Te.apply(void 0,He),X==null||X.apply(void 0,He)}}))})},[ee]),Hn=E1(H2,{devTools:!1,actions:{onOpenCancel:c.useCallback(function(){return Y.current==null?void 0:Y.current({type:"OPEN"})},[]),onSnapCancel:c.useCallback(function(j){return Y.current==null?void 0:Y.current({type:"SNAP",source:j.snapSource})},[]),onCloseCancel:c.useCallback(function(){return Y.current==null?void 0:Y.current({type:"CLOSE"})},[]),onResizeCancel:c.useCallback(function(){return Y.current==null?void 0:Y.current({type:"RESIZE",source:_e.current})},[]),onOpenEnd:c.useCallback(function(){return G.current==null?void 0:G.current({type:"OPEN"})},[]),onSnapEnd:c.useCallback(function(j,X){return G.current==null?void 0:G.current({type:"SNAP",source:j.snapSource})},[]),onResizeEnd:c.useCallback(function(){return G.current==null?void 0:G.current({type:"RESIZE",source:_e.current})},[])},context:{initialState:l},services:{onSnapStart:c.useCallback(function(j,X){try{return Promise.resolve(z.current==null?void 0:z.current({type:"SNAP",source:X.payload.source||"custom"}))}catch(W){return Promise.reject(W)}},[]),onOpenStart:c.useCallback(function(){try{return Promise.resolve(z.current==null?void 0:z.current({type:"OPEN"}))}catch(j){return Promise.reject(j)}},[]),onCloseStart:c.useCallback(function(){try{return Promise.resolve(z.current==null?void 0:z.current({type:"CLOSE"}))}catch(j){return Promise.reject(j)}},[]),onResizeStart:c.useCallback(function(){try{return Promise.resolve(z.current==null?void 0:z.current({type:"RESIZE",source:_e.current}))}catch(j){return Promise.reject(j)}},[]),onSnapEnd:c.useCallback(function(j,X){try{return Promise.resolve(G.current==null?void 0:G.current({type:"SNAP",source:j.snapSource}))}catch(W){return Promise.reject(W)}},[]),onOpenEnd:c.useCallback(function(){try{return Promise.resolve(G.current==null?void 0:G.current({type:"OPEN"}))}catch(j){return Promise.reject(j)}},[]),onCloseEnd:c.useCallback(function(){try{return Promise.resolve(G.current==null?void 0:G.current({type:"CLOSE"}))}catch(j){return Promise.reject(j)}},[]),onResizeEnd:c.useCallback(function(){try{return Promise.resolve(G.current==null?void 0:G.current({type:"RESIZE",source:_e.current}))}catch(j){return Promise.reject(j)}},[]),renderVisuallyHidden:c.useCallback(function(j,X){try{return Promise.resolve(se({y:ut.current,ready:0,maxHeight:q.current,maxSnap:ze.current,minSnap:ut.current,immediate:!0})).then(function(){})}catch(W){return Promise.reject(W)}},[se]),activate:c.useCallback(function(j,X){try{return N.current=!0,Promise.resolve(Promise.all([Me.current.activate(),ke.current.activate(),Ie.current.activate()])).then(function(){})}catch(W){return Promise.reject(W)}},[Ie,ke,Me]),deactivate:c.useCallback(function(){try{return Me.current.deactivate(),ke.current.deactivate(),Ie.current.deactivate(),N.current=!1,Promise.resolve()}catch(j){return Promise.reject(j)}},[Ie,ke,Me]),openImmediately:c.useCallback(function(){try{return ue.current=ut.current,Promise.resolve(se({y:ut.current,ready:1,maxHeight:q.current,maxSnap:ze.current,minSnap:ut.current,immediate:!0})).then(function(){})}catch(j){return Promise.reject(j)}},[se]),openSmoothly:c.useCallback(function(){try{return Promise.resolve(se({y:0,ready:1,maxHeight:q.current,maxSnap:ze.current,minSnap:ut.current,immediate:!0})).then(function(){return ue.current=ut.current,Promise.resolve(se({y:ut.current,ready:1,maxHeight:q.current,maxSnap:ze.current,minSnap:ut.current,immediate:Ce.current})).then(function(){})})}catch(j){return Promise.reject(j)}},[se,Ce]),snapSmoothly:c.useCallback(function(j,X){try{var W=bt.current(j.y);return ue.current=W,u.current=W,Promise.resolve(se({y:W,ready:1,maxHeight:q.current,maxSnap:ze.current,minSnap:Ge.current,immediate:Ce.current,config:{velocity:j.velocity}})).then(function(){})}catch(fe){return Promise.reject(fe)}},[se,u,Ce]),resizeSmoothly:c.useCallback(function(){try{var j=bt.current(ue.current);return ue.current=j,u.current=j,Promise.resolve(se({y:j,ready:1,maxHeight:q.current,maxSnap:ze.current,minSnap:Ge.current,immediate:_e.current!=="element"||Ce.current})).then(function(){})}catch(X){return Promise.reject(X)}},[se,u,Ce]),closeSmoothly:c.useCallback(function(j,X){try{return se({minSnap:ue.current,immediate:!0}),ue.current=0,Promise.resolve(se({y:0,maxHeight:q.current,maxSnap:ze.current,immediate:Ce.current})).then(function(){return Promise.resolve(se({ready:0,immediate:!0})).then(function(){})})}catch(W){return Promise.reject(W)}},[se,Ce])}}),co=Hn[0],Ft=Hn[1];c.useEffect(function(){B&&Ft(a?"OPEN":"CLOSE")},[a,Ft,B]),Bi(function(){(re||We||ie)&&Ft("RESIZE")},[re,We,ie,Ft]),c.useEffect(function(){return function(){Me.current.deactivate(),ke.current.deactivate(),Ie.current.deactivate()}},[Ie,ke,Me]),c.useImperativeHandle(e,function(){return{snapTo:function(j,X){var W=X===void 0?{}:X,fe=W.velocity,Ne=fe===void 0?1:fe,Le=W.source,Be=Le===void 0?"custom":Le;Ft("SNAP",{payload:{y:bt.current(j),velocity:Ne,source:Be}})},get height(){return ue.current}}},[Ft]),c.useEffect(function(){var j=pe.current,X=function(fe){Ve.current&&fe.preventDefault()},W=function(fe){j.scrollTop<0&&(requestAnimationFrame(function(){j.style.overflow="hidden",j.scrollTop=0,j.style.removeProperty("overflow")}),fe.preventDefault())};return P&&(j.addEventListener("scroll",X),j.addEventListener("touchmove",X),j.addEventListener("touchstart",W)),function(){j.removeEventListener("scroll",X),j.removeEventListener("touchmove",X),j.removeEventListener("touchstart",W)}},[P,pe]);var un=qb(function(j){var X=j.args,W=(X=X===void 0?[]:X)[0],fe=(W=W===void 0?{}:W).closeOnTap,Ne=fe!==void 0&&fe,Le=W.isContentDragging,Be=Le!==void 0&&Le,Te=j.cancel,He=j.direction[1],ae=j.down,ge=j.first,pt=j.last,cn=j.memo,ct=cn===void 0?te.y.getValue():cn,et=j.tap,Ct=j.velocity,wt=-1*j.movement[1];if(!N.current)return Te(),ct;if(d&&Ne&&et)return Te(),setTimeout(function(){return d()},0),ct;if(et)return ct;var nt=ct+wt,Kt=wt*Ct,Ut=Math.max(Ge.current,Math.min(ze.current,nt+2*Kt));if(!ae&&d&&He>0&&nt+Kt<Ge.current/2)return Te(),d(),ct;var St=ae?d||Ge.current!==ze.current?Ai(nt,d?0:Ge.current,ze.current,.55):nt<Ge.current?Ai(nt,Ge.current,2*ze.current,.55):Ai(nt,Ge.current/2,ze.current,.55):Ut;return P&&Be?(St>=ze.current&&(St=ze.current),ct===ze.current&&pe.current.scrollTop>0&&(St=ze.current),Ve.current=St<ze.current):Ve.current=!1,ge&&Ft("DRAG"),pt?(Ft("SNAP",{payload:{y:St,velocity:Ct>.05?Ct:1,source:"dragging"}}),ct):(ee({y:St,ready:1,maxHeight:q.current,maxSnap:ze.current,minSnap:Ge.current,immediate:!0,config:{velocity:Ct}}),ct)},{filterTaps:!0});if(Number.isNaN(ze.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(Ge.current))throw new TypeError("minSnapRef is NaN!!");var fo=function(j){var X,W=j.spring,fe=Lr([W.y,W.maxHeight],function(ae,ge){return Math.round(mi(ge-ae,0,16))+"px"}),Ne=Lr([W.y,W.minSnap,W.maxSnap],function(ae,ge,pt){return mi(ae,ge,pt)+"px"}),Le=Lr([W.y,W.minSnap,W.maxSnap],function(ae,ge,pt){return ae<ge?ge-ae+"px":ae>pt?pt-ae+"px":"0px"}),Be=Lr([W.y,W.maxSnap],function(ae,ge){return ae>=ge?Math.ceil(ae-ge):0}),Te=Lr([W.y,W.minSnap],function(ae,ge){if(!ge)return 0;var pt=Math.max(ge/2-45,0);return mi((ae-pt)*(1/(Math.min(ge/2+45,ge)-pt)+0),0,1)}),He=Lr([W.y,W.minSnap],function(ae,ge){return ge?mi(ae/ge,0,1):0});return(X={})["--rsbs-content-opacity"]=Te,X["--rsbs-backdrop-opacity"]=He,X["--rsbs-antigap-scale-y"]=Be,X["--rsbs-overlay-translate-y"]=Le,X["--rsbs-overlay-rounded"]=fe,X["--rsbs-overlay-h"]=Ne,X}({spring:te});return c.createElement(db.div,ht({},R,{"data-rsbs-root":!0,"data-rsbs-state":K2.find(co.matches),"data-rsbs-is-blocking":L,"data-rsbs-is-dismissable":!!d,"data-rsbs-has-header":!!s,"data-rsbs-has-footer":!!o,className:i,ref:D,style:ht({},fo,E,{opacity:te.ready})}),r,L&&c.createElement("div",ht({key:"backdrop","data-rsbs-backdrop":!0},un({closeOnTap:!0}))),c.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:Ae,onKeyDown:function(j){j.key==="Escape"&&(j.stopPropagation(),d&&d())}},s!==!1&&c.createElement("div",ht({key:"header","data-rsbs-header":!0,ref:Z},un()),s),c.createElement("div",ht({key:"scroll","data-rsbs-scroll":!0,ref:pe},P?un({isContentDragging:!0}):{}),c.createElement("div",{"data-rsbs-content":!0,ref:Pe},n)),o&&c.createElement("div",ht({key:"footer",ref:De,"data-rsbs-footer":!0},un()),o)))}),K2=["closed","opening","open","closing","dragging","snapping","resizing"];function Q2(t){var e=t.lastSnap;return e??Math.min.apply(Math,t.snapPoints)}function J2(t){return t.minHeight}var Y2=["onSpringStart","onSpringEnd","skipInitialTransition"],Uh=c.forwardRef(function(t,e){var n=t.onSpringStart,r=t.onSpringEnd,i=t.skipInitialTransition,o=ts(t,Y2),s=c.useState(!1),a=s[0],l=s[1],u=c.useRef(),f=c.useRef(null),d=c.useRef(i&&o.open?"OPEN":"CLOSED");Bi(function(){if(o.open)return cancelAnimationFrame(u.current),l(!0),function(){d.current="CLOSED"}},[o.open]);var h=c.useCallback(function(y){return Promise.resolve(n==null?void 0:n(y)).then(function(){y.type==="OPEN"&&cancelAnimationFrame(u.current)})},[n]),v=c.useCallback(function(y){return Promise.resolve(r==null?void 0:r(y)).then(function(){y.type==="CLOSE"&&(u.current=requestAnimationFrame(function(){return l(!1)}))})},[r]);return a?c.createElement(Cy,{"data-rsbs-portal":!0},c.createElement(q2,ht({},o,{lastSnapRef:f,ref:e,initialState:d.current,onSpringStart:h,onSpringEnd:v}))):null});const Vh=28,X2="MapGoogle-module__root__Vi-sMl",e3="MapGoogle-module__mapContainer__OCCTIX",t3="MapGoogle-module__balloon__4UVhuT",n3="MapGoogle-module__details__4osNXn",r3="MapGoogle-module__cluster__5qmRds",i3="MapGoogle-module__overlay__g-nEoT",o3="MapGoogle-module__mapControl__mzyTwr",s3="MapGoogle-module__geolocationControl__1exHgA",a3="MapGoogle-module__bottomSheet__avcBmY",l3="MapGoogle-module__locationViewContent__xwLeDh",u3="MapGoogle-module__locationViewHeader__maBLv0",c3="MapGoogle-module__deliveryDetailsViewContent__wH-RCe",f3="MapGoogle-module__deliveryDetailsViewHeader__4AKoBe",d3="MapGoogle-module__sheetSubmit__rPQG26",ot={root:X2,mapContainer:e3,balloon:t3,details:n3,cluster:r3,overlay:i3,mapControl:o3,geolocationControl:s3,bottomSheet:a3,locationViewContent:l3,locationViewHeader:u3,deliveryDetailsViewContent:c3,deliveryDetailsViewHeader:f3,sheetSubmit:d3},zh=({children:t,hideFooter:e,minSnapHeight:n,onSubmitClick:r,open:i,submitDisabled:o,submitLoading:s,...a})=>{const[l,u]=c.useState(!1);return c.useEffect(()=>{let f;return i?f=setTimeout(()=>{u(i)},400):u(i),()=>{clearTimeout(f)}},[i]),S.jsx(Uh,{expandOnContentDrag:!0,open:l,initialFocusRef:!1,defaultSnap:({snapPoints:f})=>Math.min(...f),blocking:!1,snapPoints:({footerHeight:f,headerHeight:d,maxHeight:h,minHeight:v})=>[n==null?v:d+f+n,h-Vh],footer:e?null:S.jsx(Bt,{disabled:o,loading:s,variant:"primary",className:ot.sheetSubmit,onClick:r,children:S.jsx(tr,{keyName:"choose",ns:"common"})}),sibling:S.jsx("div",{role:"presentation","data-rsbs-backdrop":"true",onClick:f=>{var d;f.stopPropagation(),f.preventDefault(),(d=a.onDismiss)==null||d.call(a)}}),children:S.jsx("div",{className:ot.bottomSheet,children:t})})},h3={header:ot.locationViewHeader,content:ot.locationViewContent},p3=({handleCloseClick:t,handleSubmitClick:e})=>{const n=vr("screenSm"),r=on(l=>l.location),i=!!r,o=Tl({isSelectedPoint:i}),{isIdle:s}=be(),a=s&&i&&o;return n&&r?S.jsx(zh,{minSnapHeight:300,open:!!a,onDismiss:t,onSubmitClick:()=>e(r),children:S.jsx(Hd,{hideActions:!0,classes:h3,location:r,onClose:t})}):null},g3="Overlay-module__root__3qTsUC",v3={root:g3},Hh=({children:t,className:e})=>S.jsx("div",{className:Se(v3.root,e),children:t}),m3=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32",fill:"none",...t},U.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"})),y3='<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>',b3=`<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" viewBox="0 0 48 66" fill="none">
|
|
50
|
+
*/function Yu(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 Xu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Yu(Object(n),!0).forEach(function(r){u2(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function u2(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ec=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()}}}(),c2=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},f2=function(e){return e.key==="Escape"||e.key==="Esc"||e.keyCode===27},d2=function(e){return e.key==="Tab"||e.keyCode===9},tc=function(e){return setTimeout(e,0)},nc=function(e,n){var r=-1;return e.every(function(i,o){return n(i)?(r=o,!1):!0}),r},vi=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},ko=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},h2=function(e,n){var r=(n==null?void 0:n.document)||document,i=Xu({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},n),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},s,a=function(p,b,E){return p&&p[b]!==void 0?p[b]:i[E||b]},l=function(p){return o.containerGroups.findIndex(function(b){var E=b.container,P=b.tabbableNodes;return E.contains(p)||P.find(function(O){return O===p})})},u=function(p){var b=i[p];if(typeof b=="function"){for(var E=arguments.length,P=new Array(E>1?E-1:0),O=1;O<E;O++)P[O-1]=arguments[O];b=b.apply(void 0,P)}if(b===!0&&(b=void 0),!b){if(b===void 0||b===!1)return b;throw new Error("`".concat(p,"` was specified but was not a node, or did not return a node"))}var T=b;if(typeof b=="string"&&(T=r.querySelector(b),!T))throw new Error("`".concat(p,"` as selector refers to no known node"));return T},f=function(){var p=u("initialFocus");if(p===!1)return!1;if(p===void 0)if(l(r.activeElement)>=0)p=r.activeElement;else{var b=o.tabbableGroups[0],E=b&&b.firstTabbableNode;p=E||u("fallbackFocus")}if(!p)throw new Error("Your focus-trap needs to have at least one focusable element");return p},d=function(){if(o.containerGroups=o.containers.map(function(p){var b=s2(p,i.tabbableOptions),E=a2(p,i.tabbableOptions);return{container:p,tabbableNodes:b,focusableNodes:E,firstTabbableNode:b.length>0?b[0]:null,lastTabbableNode:b.length>0?b[b.length-1]:null,nextTabbableNode:function(O){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,M=E.findIndex(function(R){return R===O});if(!(M<0))return T?E.slice(M+1).find(function(R){return Po(R,i.tabbableOptions)}):E.slice(0,M).reverse().find(function(R){return Po(R,i.tabbableOptions)})}}}),o.tabbableGroups=o.containerGroups.filter(function(p){return p.tabbableNodes.length>0}),o.tabbableGroups.length<=0&&!u("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(p){if(p!==!1&&p!==r.activeElement){if(!p||!p.focus){x(f());return}p.focus({preventScroll:!!i.preventScroll}),o.mostRecentlyFocusedNode=p,c2(p)&&p.select()}},v=function(p){var b=u("setReturnFocus",p);return b||(b===!1?!1:p)},y=function(p){var b=ko(p);if(!(l(b)>=0)){if(vi(i.clickOutsideDeactivates,p)){s.deactivate({returnFocus:i.returnFocusOnDeactivate&&!oa(b,i.tabbableOptions)});return}vi(i.allowOutsideClick,p)||p.preventDefault()}},g=function(p){var b=ko(p),E=l(b)>=0;E||b instanceof Document?E&&(o.mostRecentlyFocusedNode=b):(p.stopImmediatePropagation(),h(o.mostRecentlyFocusedNode||f()))},w=function(p){var b=ko(p);d();var E=null;if(o.tabbableGroups.length>0){var P=l(b),O=P>=0?o.containerGroups[P]:void 0;if(P<0)p.shiftKey?E=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:E=o.tabbableGroups[0].firstTabbableNode;else if(p.shiftKey){var T=nc(o.tabbableGroups,function(N){var z=N.firstTabbableNode;return b===z});if(T<0&&(O.container===b||oa(b,i.tabbableOptions)&&!Po(b,i.tabbableOptions)&&!O.nextTabbableNode(b,!1))&&(T=P),T>=0){var M=T===0?o.tabbableGroups.length-1:T-1,R=o.tabbableGroups[M];E=R.lastTabbableNode}}else{var A=nc(o.tabbableGroups,function(N){var z=N.lastTabbableNode;return b===z});if(A<0&&(O.container===b||oa(b,i.tabbableOptions)&&!Po(b,i.tabbableOptions)&&!O.nextTabbableNode(b))&&(A=P),A>=0){var B=A===o.tabbableGroups.length-1?0:A+1,V=o.tabbableGroups[B];E=V.firstTabbableNode}}}else E=u("fallbackFocus");E&&(p.preventDefault(),h(E))},C=function(p){if(f2(p)&&vi(i.escapeDeactivates,p)!==!1){p.preventDefault(),s.deactivate();return}if(d2(p)){w(p);return}},L=function(p){var b=ko(p);l(b)>=0||vi(i.clickOutsideDeactivates,p)||vi(i.allowOutsideClick,p)||(p.preventDefault(),p.stopImmediatePropagation())},m=function(){if(o.active)return ec.activateTrap(s),o.delayInitialFocusTimer=i.delayInitialFocus?tc(function(){h(f())}):h(f()),r.addEventListener("focusin",g,!0),r.addEventListener("mousedown",y,{capture:!0,passive:!1}),r.addEventListener("touchstart",y,{capture:!0,passive:!1}),r.addEventListener("click",L,{capture:!0,passive:!1}),r.addEventListener("keydown",C,{capture:!0,passive:!1}),s},_=function(){if(o.active)return r.removeEventListener("focusin",g,!0),r.removeEventListener("mousedown",y,!0),r.removeEventListener("touchstart",y,!0),r.removeEventListener("click",L,!0),r.removeEventListener("keydown",C,!0),s};return s={get active(){return o.active},get paused(){return o.paused},activate:function(p){if(o.active)return this;var b=a(p,"onActivate"),E=a(p,"onPostActivate"),P=a(p,"checkCanFocusTrap");P||d(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,b&&b();var O=function(){P&&d(),m(),E&&E()};return P?(P(o.containers.concat()).then(O,O),this):(O(),this)},deactivate:function(p){if(!o.active)return this;var b=Xu({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},p);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,_(),o.active=!1,o.paused=!1,ec.deactivateTrap(s);var E=a(b,"onDeactivate"),P=a(b,"onPostDeactivate"),O=a(b,"checkCanReturnFocus"),T=a(b,"returnFocus","returnFocusOnDeactivate");E&&E();var M=function(){tc(function(){T&&h(v(o.nodeFocusedBeforeActivation)),P&&P()})};return T&&O?(O(v(o.nodeFocusedBeforeActivation)).then(M,M),this):(M(),this)},pause:function(){return o.paused||!o.active?this:(o.paused=!0,_(),this)},unpause:function(){return!o.paused||!o.active?this:(o.paused=!1,d(),m(),this)},updateContainerElements:function(p){var b=[].concat(p).filter(Boolean);return o.containers=b.map(function(E){return typeof E=="string"?r.querySelector(E):E}),o.active&&d(),this}},s.updateContainerElements(e),s};function p2(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 Vl=!1;if(typeof window<"u"){var rc={get passive(){Vl=!0}};window.addEventListener("testPassive",null,rc),window.removeEventListener("testPassive",null,rc)}var kh=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),Un=[],ys=!1,Th=-1,Ii=void 0,ji=void 0,Rh=function(e){return Un.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(e))})},bs=function(e){var n=e||window.event;return Rh(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},g2=function(e){if(ji===void 0){var n=!!e&&e.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;n&&r>0&&(ji=document.body.style.paddingRight,document.body.style.paddingRight=r+"px")}Ii===void 0&&(Ii=document.body.style.overflow,document.body.style.overflow="hidden")},v2=function(){ji!==void 0&&(document.body.style.paddingRight=ji,ji=void 0),Ii!==void 0&&(document.body.style.overflow=Ii,Ii=void 0)},m2=function(e){return e?e.scrollHeight-e.scrollTop<=e.clientHeight:!1},y2=function(e,n){var r=e.targetTouches[0].clientY-Th;return Rh(e.target)?!1:n&&n.scrollTop===0&&r>0||m2(n)&&r<0?bs(e):(e.stopPropagation(),!0)},b2=function(e,n){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!Un.some(function(i){return i.targetElement===e})){var r={targetElement:e,options:n||{}};Un=[].concat(p2(Un),[r]),kh?(e.ontouchstart=function(i){i.targetTouches.length===1&&(Th=i.targetTouches[0].clientY)},e.ontouchmove=function(i){i.targetTouches.length===1&&y2(i,e)},ys||(document.addEventListener("touchmove",bs,Vl?{passive:!1}:void 0),ys=!0)):g2(n)}},C2=function(e){if(!e){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}Un=Un.filter(function(n){return n.targetElement!==e}),kh?(e.ontouchstart=null,e.ontouchmove=null,ys&&Un.length===0&&(document.removeEventListener("touchmove",bs,Vl?{passive:!1}:void 0),ys=!1)):Un.length||v2()},dr=[],w2=function(){return dr.some(function(t){return t.activeTargets.length>0})},S2=function(){return dr.some(function(t){return t.skippedTargets.length>0})},ic="ResizeObserver loop completed with undelivered notifications.",L2=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:ic}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=ic),window.dispatchEvent(t)},$i;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})($i||($i={}));var hr=function(t){return Object.freeze(t)},E2=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,hr(this)}return t}(),Dh=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,hr(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,r=e.y,i=e.top,o=e.right,s=e.bottom,a=e.left,l=e.width,u=e.height;return{x:n,y:r,top:i,right:o,bottom:s,left:a,width:l,height:u}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),zl=function(t){return t instanceof SVGElement&&"getBBox"in t},Ah=function(t){if(zl(t)){var e=t.getBBox(),n=e.width,r=e.height;return!n&&!r}var i=t,o=i.offsetWidth,s=i.offsetHeight;return!(o||s||t.getClientRects().length)},oc=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)},x2=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},Ni=typeof window<"u"?window:{},To=new WeakMap,sc=/auto|scroll/,_2=/^tb|vertical/,M2=/msie|trident/i.test(Ni.navigator&&Ni.navigator.userAgent),Qt=function(t){return parseFloat(t||"0")},Rr=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new E2((n?e:t)||0,(n?t:e)||0)},ac=hr({devicePixelContentBoxSize:Rr(),borderBoxSize:Rr(),contentBoxSize:Rr(),contentRect:new Dh(0,0,0,0)}),Ih=function(t,e){if(e===void 0&&(e=!1),To.has(t)&&!e)return To.get(t);if(Ah(t))return To.set(t,ac),ac;var n=getComputedStyle(t),r=zl(t)&&t.ownerSVGElement&&t.getBBox(),i=!M2&&n.boxSizing==="border-box",o=_2.test(n.writingMode||""),s=!r&&sc.test(n.overflowY||""),a=!r&&sc.test(n.overflowX||""),l=r?0:Qt(n.paddingTop),u=r?0:Qt(n.paddingRight),f=r?0:Qt(n.paddingBottom),d=r?0:Qt(n.paddingLeft),h=r?0:Qt(n.borderTopWidth),v=r?0:Qt(n.borderRightWidth),y=r?0:Qt(n.borderBottomWidth),g=r?0:Qt(n.borderLeftWidth),w=d+u,C=l+f,L=g+v,m=h+y,_=a?t.offsetHeight-m-t.clientHeight:0,x=s?t.offsetWidth-L-t.clientWidth:0,p=i?w+L:0,b=i?C+m:0,E=r?r.width:Qt(n.width)-p-x,P=r?r.height:Qt(n.height)-b-_,O=E+w+x+L,T=P+C+_+m,M=hr({devicePixelContentBoxSize:Rr(Math.round(E*devicePixelRatio),Math.round(P*devicePixelRatio),o),borderBoxSize:Rr(O,T,o),contentBoxSize:Rr(E,P,o),contentRect:new Dh(d,l,E,P)});return To.set(t,M),M},jh=function(t,e,n){var r=Ih(t,n),i=r.borderBoxSize,o=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(e){case $i.DEVICE_PIXEL_CONTENT_BOX:return s;case $i.BORDER_BOX:return i;default:return o}},O2=function(){function t(e){var n=Ih(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=hr([n.borderBoxSize]),this.contentBoxSize=hr([n.contentBoxSize]),this.devicePixelContentBoxSize=hr([n.devicePixelContentBoxSize])}return t}(),Nh=function(t){if(Ah(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},P2=function(){var t=1/0,e=[];dr.forEach(function(s){if(s.activeTargets.length!==0){var a=[];s.activeTargets.forEach(function(u){var f=new O2(u.target),d=Nh(u.target);a.push(f),u.lastReportedSize=jh(u.target,u.observedBox),d<t&&(t=d)}),e.push(function(){s.callback.call(s.observer,a,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var n=0,r=e;n<r.length;n++){var i=r[n];i()}return t},lc=function(t){dr.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(Nh(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},k2=function(){var t=0;for(lc(t);w2();)t=P2(),lc(t);return S2()&&L2(),t>0},sa,Bh=[],T2=function(){return Bh.splice(0).forEach(function(t){return t()})},R2=function(t){if(!sa){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return T2()}).observe(n,r),sa=function(){n.textContent="".concat(e?e--:e++)}}Bh.push(t),sa()},D2=function(t){R2(function(){requestAnimationFrame(t)})},es=0,A2=function(){return!!es},I2=250,j2={attributes:!0,characterData:!0,childList:!0,subtree:!0},uc=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],cc=function(t){return t===void 0&&(t=0),Date.now()+t},aa=!1,N2=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=I2),!aa){aa=!0;var r=cc(e);D2(function(){var i=!1;try{i=k2()}finally{if(aa=!1,e=r-cc(),!A2())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,j2)};document.body?n():Ni.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),uc.forEach(function(n){return Ni.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),uc.forEach(function(n){return Ni.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),tl=new N2,fc=function(t){!es&&t>0&&tl.start(),es+=t,!es&&tl.stop()},B2=function(t){return!zl(t)&&!x2(t)&&getComputedStyle(t).display==="inline"},F2=function(){function t(e,n){this.target=e,this.observedBox=n||$i.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=jh(this.target,this.observedBox,!0);return B2(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),U2=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),Ro=new WeakMap,dc=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},Do=function(){function t(){}return t.connect=function(e,n){var r=new U2(e,n);Ro.set(e,r)},t.observe=function(e,n,r){var i=Ro.get(e),o=i.observationTargets.length===0;dc(i.observationTargets,n)<0&&(o&&dr.push(i),i.observationTargets.push(new F2(n,r&&r.box)),fc(1),tl.schedule())},t.unobserve=function(e,n){var r=Ro.get(e),i=dc(r.observationTargets,n),o=r.observationTargets.length===1;i>=0&&(o&&dr.splice(dr.indexOf(r),1),r.observationTargets.splice(i,1),fc(-1))},t.disconnect=function(e){var n=this,r=Ro.get(e);r.observationTargets.slice().forEach(function(i){return n.unobserve(e,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t}(),V2=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.");Do.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(!oc(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Do.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(!oc(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Do.unobserve(this,e)},t.prototype.disconnect=function(){Do.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();function ht(){return ht=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},ht.apply(this,arguments)}function ts(t,e){if(t==null)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)e.indexOf(n=o[r])>=0||(i[n]=t[n]);return i}var Bi=typeof window<"u"?c.useLayoutEffect:c.useEffect;function mi(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 Ao(t){var e=Math.round(t);if(Number.isNaN(t))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return e}var z2={box:"border-box"};function la(t,e){var n=e.label,r=e.enabled,i=e.resizeSourceRef,o=c.useState(0),s=o[0],a=o[1];c.useDebugValue(n+": "+s);var l=c.useCallback(function(u){a(u[0].borderBoxSize[0].blockSize),i.current="element"},[i]);return Bi(function(){if(t.current&&r){var u=new V2(l);return u.observe(t.current,z2),function(){u.disconnect()}}},[t,l,r]),r?s:0}function ft(t){return t===void 0&&(t=1e3),new Promise(function(e){return setTimeout(e,t)})}var hc={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},pc={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},H2=g1({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:ht({},hc,pc)}}},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:ht({},hc,pc)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:ht({},{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:[v1({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(ft()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenStart:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseStart:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeStart:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},onSnapEnd:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenEnd:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseEnd:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeEnd:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},renderVisuallyHidden:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}},activate:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}},deactivate:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}},openSmoothly:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}},openImmediately:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}},snapSmoothly:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}},resizeSmoothly:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}},closeSmoothly:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}}},guards:{initiallyClosed:function(t){return t.initialState==="CLOSED"},initiallyOpen:function(t){return t.initialState==="OPEN"}}}),$2=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],W2=["velocity"],G2=["onRest","config"],Fh=z1.default,Z2=Fh.tension,Io=Fh.friction,q2=c.forwardRef(function(t,e){var n=t.children,r=t.sibling,i=t.className,o=t.footer,s=t.header,a=t.open,l=t.initialState,u=t.lastSnapRef,f=t.initialFocusRef,d=t.onDismiss,h=t.maxHeight,v=t.defaultSnap,y=v===void 0?Q2:v,g=t.snapPoints,w=g===void 0?J2:g,C=t.blocking,L=C===void 0||C,m=t.scrollLocking,_=m===void 0||m,x=t.style,p=t.onSpringStart,b=t.onSpringCancel,E=t.onSpringEnd,P=t.reserveScrollBarGap,O=P===void 0?L:P,T=t.expandOnContentDrag,M=T!==void 0&&T,R=ts(t,$2),A=function(){var j=c.useState(!1),X=j[0],W=j[1],fe=c.useState({}),Ne=fe[0],Le=fe[1],Be=c.useCallback(function(Te){return Le(function(He){var ae;return ht({},He,((ae={})[Te]=!1,ae))}),function(){Le(function(He){var ae;return ht({},He,((ae={})[Te]=!0,ae))})}},[]);return c.useEffect(function(){var Te=Object.values(Ne);Te.length!==0&&Te.every(Boolean)&&W(!0)},[Ne]),{ready:X,registerReady:Be}}(),B=A.ready,V=A.registerReady,N=c.useRef(!1),z=c.useRef(p),Y=c.useRef(b),G=c.useRef(E);c.useEffect(function(){z.current=p,Y.current=b,G.current=E},[b,p,E]);var H,Q,oe=Z1(function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}}),te=oe[0],ee=oe[1],D=c.useRef(null),pe=c.useRef(null),Pe=c.useRef(null),Z=c.useRef(null),De=c.useRef(null),Ae=c.useRef(null),ue=c.useRef(0),_e=c.useRef(),Ve=c.useRef(!1),Ce=(H=c.useMemo(function(){return typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null},[]),Q=c.useRef(H==null?void 0:H.matches),c.useDebugValue(Q.current?"reduce":"no-preference"),c.useEffect(function(){var j=function(X){Q.current=X.matches};return H==null||H.addListener(j),function(){return H==null?void 0:H.removeListener(j)}},[H]),Q),Me=function(j){var X=j.targetRef,W=j.enabled,fe=j.reserveScrollBarGap,Ne=c.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return c.useDebugValue(W?"Enabled":"Disabled"),c.useEffect(function(){if(!W)return Ne.current.deactivate(),void(Ne.current={activate:function(){},deactivate:function(){}});var Le=X.current,Be=!1;Ne.current={activate:function(){Be||(Be=!0,b2(Le,{allowTouchMove:function(Te){return Te.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:fe}))},deactivate:function(){Be&&(Be=!1,C2(Le))}}},[W,X,fe]),Ne}({targetRef:pe,enabled:B&&_,reserveScrollBarGap:O}),Ie=function(j){var X=j.targetRef,W=j.enabled,fe=c.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return c.useDebugValue(W?"Enabled":"Disabled"),c.useEffect(function(){if(!W)return fe.current.deactivate(),void(fe.current={activate:function(){},deactivate:function(){}});var Ne=X.current,Le=!1,Be=[],Te=[];fe.current={activate:function(){if(!Le){Le=!0;var He=Ne.parentNode;document.querySelectorAll("body > *").forEach(function(ae){if(ae!==He){var ge=ae.getAttribute("aria-hidden");ge!==null&&ge!=="false"||(Be.push(ge),Te.push(ae),ae.setAttribute("aria-hidden","true"))}})}},deactivate:function(){Le&&(Le=!1,Te.forEach(function(He,ae){var ge=Be[ae];ge===null?He.removeAttribute("aria-hidden"):He.setAttribute("aria-hidden",ge)}),Be=[],Te=[])}}},[X,W]),fe}({targetRef:D,enabled:B&&L}),ke=function(j){var X=j.targetRef,W=j.fallbackRef,fe=j.initialFocusRef,Ne=j.enabled,Le=c.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return c.useDebugValue(Ne?"Enabled":"Disabled"),c.useEffect(function(){if(!Ne)return Le.current.deactivate(),void(Le.current={activate:function(){},deactivate:function(){}});var Be=W.current,Te=h2(X.current,{onActivate:void 0,initialFocus:fe?function(){return(fe==null?void 0:fe.current)||Be}:void 0,fallbackFocus:Be,escapeDeactivates:!1,clickOutsideDeactivates:!1}),He=!1;Le.current={activate:function(){try{return He?Promise.resolve():(He=!0,Promise.resolve(Te.activate()).then(function(){return Promise.resolve(new Promise(function(ae){return setTimeout(function(){return ae(void 0)},0)})).then(function(){})}))}catch(ae){return Promise.reject(ae)}},deactivate:function(){He&&(He=!1,Te.deactivate())}}},[Ne,W,fe,X]),Le}({targetRef:D,fallbackRef:Ae,initialFocusRef:f||void 0,enabled:B&&L&&f!==!1}),je=function(j){var X=j.getSnapPoints,W=j.heightRef,fe=j.lastSnapRef,Ne=j.ready,Le=function(et){var Ct=et.contentRef,wt=et.controlledMaxHeight,nt=et.footerEnabled,Kt=et.footerRef,Ut=et.headerEnabled,St=et.headerRef,Cn=et.registerReady,fn=et.resizeSourceRef,oi=c.useMemo(function(){return Cn("contentHeight")},[Cn]),si=function(wn,Wn,Gn){var Zn=c.useMemo(function(){return Wn("maxHeight")},[Wn]),qn=c.useState(function(){return Ao(wn)||typeof window<"u"?window.innerHeight:0}),ui=qn[0],ci=qn[1],Sn=ui>0,ne=c.useRef(0);return c.useDebugValue(wn?"controlled":"auto"),c.useEffect(function(){Sn&&Zn()},[Sn,Zn]),Bi(function(){if(wn)return ci(Ao(wn)),void(Gn.current="maxheightprop");var Ql=function(){ne.current||(ne.current=requestAnimationFrame(function(){ci(window.innerHeight),Gn.current="window",ne.current=0}))};return window.addEventListener("resize",Ql),ci(window.innerHeight),Gn.current="window",Zn(),function(){window.removeEventListener("resize",Ql),cancelAnimationFrame(ne.current)}},[wn,Zn,Gn]),ui}(wt,Cn,fn),mr=la(St,{label:"headerHeight",enabled:Ut,resizeSourceRef:fn}),ai=la(Ct,{label:"contentHeight",enabled:!0,resizeSourceRef:fn}),yr=la(Kt,{label:"footerHeight",enabled:nt,resizeSourceRef:fn}),$n=Math.min(si-mr-yr,ai)+mr+yr;c.useDebugValue("minHeight: "+$n);var li=ai>0;return c.useEffect(function(){li&&oi()},[li,oi]),{maxHeight:si,minHeight:$n,headerHeight:mr,footerHeight:yr}}({contentRef:j.contentRef,controlledMaxHeight:j.controlledMaxHeight,footerEnabled:j.footerEnabled,footerRef:j.footerRef,headerEnabled:j.headerEnabled,headerRef:j.headerRef,registerReady:j.registerReady,resizeSourceRef:j.resizeSourceRef}),Be=Le.maxHeight,Te=Le.minHeight,He=Le.headerHeight,ae=Le.footerHeight,ge=function(et,Ct){var wt=[].concat(et).map(Ao).reduce(function(St,Cn){return St.add(mi(Cn,0,Ct)),St},new Set),nt=Array.from(wt),Kt=Math.min.apply(Math,nt);if(Number.isNaN(Kt))throw new TypeError("minSnap is NaN");var Ut=Math.max.apply(Math,nt);if(Number.isNaN(Ut))throw new TypeError("maxSnap is NaN");return{snapPoints:nt,minSnap:Kt,maxSnap:Ut}}(Ne?X({height:W.current,footerHeight:ae,headerHeight:He,minHeight:Te,maxHeight:Be}):[0],Be),pt=ge.snapPoints,cn=ge.minSnap,ct=ge.maxSnap;return c.useDebugValue("minSnap: "+cn+", maxSnap:"+ct),{minSnap:cn,maxSnap:ct,findSnap:function(et){var Ct=Ao(typeof et=="function"?et({footerHeight:ae,headerHeight:He,height:W.current,minHeight:Te,maxHeight:Be,snapPoints:pt,lastSnap:fe.current}):et);return pt.reduce(function(wt,nt){return Math.abs(nt-Ct)<Math.abs(wt-Ct)?nt:wt},cn)},maxHeight:Be}}({contentRef:Pe,controlledMaxHeight:h,footerEnabled:!!o,footerRef:De,getSnapPoints:w,headerEnabled:s!==!1,headerRef:Z,heightRef:ue,lastSnapRef:u,ready:B,registerReady:V,resizeSourceRef:_e}),ie=je.minSnap,We=je.maxSnap,re=je.maxHeight,tt=je.findSnap,q=c.useRef(re),Ge=c.useRef(ie),ze=c.useRef(We),bt=c.useRef(tt),ut=c.useRef(0);Bi(function(){q.current=re,ze.current=We,Ge.current=ie,bt.current=tt,ut.current=tt(y)},[tt,y,re,We,ie]);var se=c.useCallback(function(j){var X=j.onRest,W=j.config,fe=(W=W===void 0?{}:W).velocity,Ne=fe===void 0?1:fe,Le=ts(W,W2),Be=ts(j,G2);return new Promise(function(Te){return ee(ht({},Be,{config:ht({velocity:Ne},Le,{mass:1,tension:Z2,friction:Math.max(Io,Io+(Io-Io*Ne))}),onRest:function(){var He=[].slice.call(arguments);Te.apply(void 0,He),X==null||X.apply(void 0,He)}}))})},[ee]),Hn=x1(H2,{devTools:!1,actions:{onOpenCancel:c.useCallback(function(){return Y.current==null?void 0:Y.current({type:"OPEN"})},[]),onSnapCancel:c.useCallback(function(j){return Y.current==null?void 0:Y.current({type:"SNAP",source:j.snapSource})},[]),onCloseCancel:c.useCallback(function(){return Y.current==null?void 0:Y.current({type:"CLOSE"})},[]),onResizeCancel:c.useCallback(function(){return Y.current==null?void 0:Y.current({type:"RESIZE",source:_e.current})},[]),onOpenEnd:c.useCallback(function(){return G.current==null?void 0:G.current({type:"OPEN"})},[]),onSnapEnd:c.useCallback(function(j,X){return G.current==null?void 0:G.current({type:"SNAP",source:j.snapSource})},[]),onResizeEnd:c.useCallback(function(){return G.current==null?void 0:G.current({type:"RESIZE",source:_e.current})},[])},context:{initialState:l},services:{onSnapStart:c.useCallback(function(j,X){try{return Promise.resolve(z.current==null?void 0:z.current({type:"SNAP",source:X.payload.source||"custom"}))}catch(W){return Promise.reject(W)}},[]),onOpenStart:c.useCallback(function(){try{return Promise.resolve(z.current==null?void 0:z.current({type:"OPEN"}))}catch(j){return Promise.reject(j)}},[]),onCloseStart:c.useCallback(function(){try{return Promise.resolve(z.current==null?void 0:z.current({type:"CLOSE"}))}catch(j){return Promise.reject(j)}},[]),onResizeStart:c.useCallback(function(){try{return Promise.resolve(z.current==null?void 0:z.current({type:"RESIZE",source:_e.current}))}catch(j){return Promise.reject(j)}},[]),onSnapEnd:c.useCallback(function(j,X){try{return Promise.resolve(G.current==null?void 0:G.current({type:"SNAP",source:j.snapSource}))}catch(W){return Promise.reject(W)}},[]),onOpenEnd:c.useCallback(function(){try{return Promise.resolve(G.current==null?void 0:G.current({type:"OPEN"}))}catch(j){return Promise.reject(j)}},[]),onCloseEnd:c.useCallback(function(){try{return Promise.resolve(G.current==null?void 0:G.current({type:"CLOSE"}))}catch(j){return Promise.reject(j)}},[]),onResizeEnd:c.useCallback(function(){try{return Promise.resolve(G.current==null?void 0:G.current({type:"RESIZE",source:_e.current}))}catch(j){return Promise.reject(j)}},[]),renderVisuallyHidden:c.useCallback(function(j,X){try{return Promise.resolve(se({y:ut.current,ready:0,maxHeight:q.current,maxSnap:ze.current,minSnap:ut.current,immediate:!0})).then(function(){})}catch(W){return Promise.reject(W)}},[se]),activate:c.useCallback(function(j,X){try{return N.current=!0,Promise.resolve(Promise.all([Me.current.activate(),ke.current.activate(),Ie.current.activate()])).then(function(){})}catch(W){return Promise.reject(W)}},[Ie,ke,Me]),deactivate:c.useCallback(function(){try{return Me.current.deactivate(),ke.current.deactivate(),Ie.current.deactivate(),N.current=!1,Promise.resolve()}catch(j){return Promise.reject(j)}},[Ie,ke,Me]),openImmediately:c.useCallback(function(){try{return ue.current=ut.current,Promise.resolve(se({y:ut.current,ready:1,maxHeight:q.current,maxSnap:ze.current,minSnap:ut.current,immediate:!0})).then(function(){})}catch(j){return Promise.reject(j)}},[se]),openSmoothly:c.useCallback(function(){try{return Promise.resolve(se({y:0,ready:1,maxHeight:q.current,maxSnap:ze.current,minSnap:ut.current,immediate:!0})).then(function(){return ue.current=ut.current,Promise.resolve(se({y:ut.current,ready:1,maxHeight:q.current,maxSnap:ze.current,minSnap:ut.current,immediate:Ce.current})).then(function(){})})}catch(j){return Promise.reject(j)}},[se,Ce]),snapSmoothly:c.useCallback(function(j,X){try{var W=bt.current(j.y);return ue.current=W,u.current=W,Promise.resolve(se({y:W,ready:1,maxHeight:q.current,maxSnap:ze.current,minSnap:Ge.current,immediate:Ce.current,config:{velocity:j.velocity}})).then(function(){})}catch(fe){return Promise.reject(fe)}},[se,u,Ce]),resizeSmoothly:c.useCallback(function(){try{var j=bt.current(ue.current);return ue.current=j,u.current=j,Promise.resolve(se({y:j,ready:1,maxHeight:q.current,maxSnap:ze.current,minSnap:Ge.current,immediate:_e.current!=="element"||Ce.current})).then(function(){})}catch(X){return Promise.reject(X)}},[se,u,Ce]),closeSmoothly:c.useCallback(function(j,X){try{return se({minSnap:ue.current,immediate:!0}),ue.current=0,Promise.resolve(se({y:0,maxHeight:q.current,maxSnap:ze.current,immediate:Ce.current})).then(function(){return Promise.resolve(se({ready:0,immediate:!0})).then(function(){})})}catch(W){return Promise.reject(W)}},[se,Ce])}}),co=Hn[0],Ft=Hn[1];c.useEffect(function(){B&&Ft(a?"OPEN":"CLOSE")},[a,Ft,B]),Bi(function(){(re||We||ie)&&Ft("RESIZE")},[re,We,ie,Ft]),c.useEffect(function(){return function(){Me.current.deactivate(),ke.current.deactivate(),Ie.current.deactivate()}},[Ie,ke,Me]),c.useImperativeHandle(e,function(){return{snapTo:function(j,X){var W=X===void 0?{}:X,fe=W.velocity,Ne=fe===void 0?1:fe,Le=W.source,Be=Le===void 0?"custom":Le;Ft("SNAP",{payload:{y:bt.current(j),velocity:Ne,source:Be}})},get height(){return ue.current}}},[Ft]),c.useEffect(function(){var j=pe.current,X=function(fe){Ve.current&&fe.preventDefault()},W=function(fe){j.scrollTop<0&&(requestAnimationFrame(function(){j.style.overflow="hidden",j.scrollTop=0,j.style.removeProperty("overflow")}),fe.preventDefault())};return M&&(j.addEventListener("scroll",X),j.addEventListener("touchmove",X),j.addEventListener("touchstart",W)),function(){j.removeEventListener("scroll",X),j.removeEventListener("touchmove",X),j.removeEventListener("touchstart",W)}},[M,pe]);var un=qb(function(j){var X=j.args,W=(X=X===void 0?[]:X)[0],fe=(W=W===void 0?{}:W).closeOnTap,Ne=fe!==void 0&&fe,Le=W.isContentDragging,Be=Le!==void 0&&Le,Te=j.cancel,He=j.direction[1],ae=j.down,ge=j.first,pt=j.last,cn=j.memo,ct=cn===void 0?te.y.getValue():cn,et=j.tap,Ct=j.velocity,wt=-1*j.movement[1];if(!N.current)return Te(),ct;if(d&&Ne&&et)return Te(),setTimeout(function(){return d()},0),ct;if(et)return ct;var nt=ct+wt,Kt=wt*Ct,Ut=Math.max(Ge.current,Math.min(ze.current,nt+2*Kt));if(!ae&&d&&He>0&&nt+Kt<Ge.current/2)return Te(),d(),ct;var St=ae?d||Ge.current!==ze.current?Ai(nt,d?0:Ge.current,ze.current,.55):nt<Ge.current?Ai(nt,Ge.current,2*ze.current,.55):Ai(nt,Ge.current/2,ze.current,.55):Ut;return M&&Be?(St>=ze.current&&(St=ze.current),ct===ze.current&&pe.current.scrollTop>0&&(St=ze.current),Ve.current=St<ze.current):Ve.current=!1,ge&&Ft("DRAG"),pt?(Ft("SNAP",{payload:{y:St,velocity:Ct>.05?Ct:1,source:"dragging"}}),ct):(ee({y:St,ready:1,maxHeight:q.current,maxSnap:ze.current,minSnap:Ge.current,immediate:!0,config:{velocity:Ct}}),ct)},{filterTaps:!0});if(Number.isNaN(ze.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(Ge.current))throw new TypeError("minSnapRef is NaN!!");var fo=function(j){var X,W=j.spring,fe=Lr([W.y,W.maxHeight],function(ae,ge){return Math.round(mi(ge-ae,0,16))+"px"}),Ne=Lr([W.y,W.minSnap,W.maxSnap],function(ae,ge,pt){return mi(ae,ge,pt)+"px"}),Le=Lr([W.y,W.minSnap,W.maxSnap],function(ae,ge,pt){return ae<ge?ge-ae+"px":ae>pt?pt-ae+"px":"0px"}),Be=Lr([W.y,W.maxSnap],function(ae,ge){return ae>=ge?Math.ceil(ae-ge):0}),Te=Lr([W.y,W.minSnap],function(ae,ge){if(!ge)return 0;var pt=Math.max(ge/2-45,0);return mi((ae-pt)*(1/(Math.min(ge/2+45,ge)-pt)+0),0,1)}),He=Lr([W.y,W.minSnap],function(ae,ge){return ge?mi(ae/ge,0,1):0});return(X={})["--rsbs-content-opacity"]=Te,X["--rsbs-backdrop-opacity"]=He,X["--rsbs-antigap-scale-y"]=Be,X["--rsbs-overlay-translate-y"]=Le,X["--rsbs-overlay-rounded"]=fe,X["--rsbs-overlay-h"]=Ne,X}({spring:te});return c.createElement(db.div,ht({},R,{"data-rsbs-root":!0,"data-rsbs-state":K2.find(co.matches),"data-rsbs-is-blocking":L,"data-rsbs-is-dismissable":!!d,"data-rsbs-has-header":!!s,"data-rsbs-has-footer":!!o,className:i,ref:D,style:ht({},fo,x,{opacity:te.ready})}),r,L&&c.createElement("div",ht({key:"backdrop","data-rsbs-backdrop":!0},un({closeOnTap:!0}))),c.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:Ae,onKeyDown:function(j){j.key==="Escape"&&(j.stopPropagation(),d&&d())}},s!==!1&&c.createElement("div",ht({key:"header","data-rsbs-header":!0,ref:Z},un()),s),c.createElement("div",ht({key:"scroll","data-rsbs-scroll":!0,ref:pe},M?un({isContentDragging:!0}):{}),c.createElement("div",{"data-rsbs-content":!0,ref:Pe},n)),o&&c.createElement("div",ht({key:"footer",ref:De,"data-rsbs-footer":!0},un()),o)))}),K2=["closed","opening","open","closing","dragging","snapping","resizing"];function Q2(t){var e=t.lastSnap;return e??Math.min.apply(Math,t.snapPoints)}function J2(t){return t.minHeight}var Y2=["onSpringStart","onSpringEnd","skipInitialTransition"],Uh=c.forwardRef(function(t,e){var n=t.onSpringStart,r=t.onSpringEnd,i=t.skipInitialTransition,o=ts(t,Y2),s=c.useState(!1),a=s[0],l=s[1],u=c.useRef(),f=c.useRef(null),d=c.useRef(i&&o.open?"OPEN":"CLOSED");Bi(function(){if(o.open)return cancelAnimationFrame(u.current),l(!0),function(){d.current="CLOSED"}},[o.open]);var h=c.useCallback(function(y){return Promise.resolve(n==null?void 0:n(y)).then(function(){y.type==="OPEN"&&cancelAnimationFrame(u.current)})},[n]),v=c.useCallback(function(y){return Promise.resolve(r==null?void 0:r(y)).then(function(){y.type==="CLOSE"&&(u.current=requestAnimationFrame(function(){return l(!1)}))})},[r]);return a?c.createElement(Cy,{"data-rsbs-portal":!0},c.createElement(q2,ht({},o,{lastSnapRef:f,ref:e,initialState:d.current,onSpringStart:h,onSpringEnd:v}))):null});const Vh=28,X2="MapGoogle-module__root__Vi-sMl",e3="MapGoogle-module__mapContainer__OCCTIX",t3="MapGoogle-module__balloon__4UVhuT",n3="MapGoogle-module__details__4osNXn",r3="MapGoogle-module__cluster__5qmRds",i3="MapGoogle-module__overlay__g-nEoT",o3="MapGoogle-module__mapControl__mzyTwr",s3="MapGoogle-module__geolocationControl__1exHgA",a3="MapGoogle-module__bottomSheet__avcBmY",l3="MapGoogle-module__locationViewContent__xwLeDh",u3="MapGoogle-module__locationViewHeader__maBLv0",c3="MapGoogle-module__deliveryDetailsViewContent__wH-RCe",f3="MapGoogle-module__deliveryDetailsViewHeader__4AKoBe",d3="MapGoogle-module__sheetSubmit__rPQG26",ot={root:X2,mapContainer:e3,balloon:t3,details:n3,cluster:r3,overlay:i3,mapControl:o3,geolocationControl:s3,bottomSheet:a3,locationViewContent:l3,locationViewHeader:u3,deliveryDetailsViewContent:c3,deliveryDetailsViewHeader:f3,sheetSubmit:d3},zh=({children:t,hideFooter:e,minSnapHeight:n,onSubmitClick:r,open:i,submitDisabled:o,submitLoading:s,...a})=>{const[l,u]=c.useState(!1);return c.useEffect(()=>{let f;return i?f=setTimeout(()=>{u(i)},400):u(i),()=>{clearTimeout(f)}},[i]),S.jsx(Uh,{expandOnContentDrag:!0,open:l,initialFocusRef:!1,defaultSnap:({snapPoints:f})=>Math.min(...f),blocking:!1,snapPoints:({footerHeight:f,headerHeight:d,maxHeight:h,minHeight:v})=>[n==null?v:d+f+n,h-Vh],footer:e?null:S.jsx(Bt,{disabled:o,loading:s,variant:"primary",className:ot.sheetSubmit,onClick:r,children:S.jsx(tr,{keyName:"choose",ns:"common"})}),sibling:S.jsx("div",{role:"presentation","data-rsbs-backdrop":"true",onClick:f=>{var d;f.stopPropagation(),f.preventDefault(),(d=a.onDismiss)==null||d.call(a)}}),children:S.jsx("div",{className:ot.bottomSheet,children:t})})},h3={header:ot.locationViewHeader,content:ot.locationViewContent},p3=({handleCloseClick:t,handleSubmitClick:e})=>{const n=vr("screenSm"),r=on(l=>l.location),i=!!r,o=Rl({isSelectedPoint:i}),{isIdle:s}=be(),a=s&&i&&o;return n&&r?S.jsx(zh,{minSnapHeight:300,open:!!a,onDismiss:t,onSubmitClick:()=>e(r),children:S.jsx(Hd,{hideActions:!0,classes:h3,location:r,onClose:t})}):null},g3="Overlay-module__root__3qTsUC",v3={root:g3},Hh=({children:t,className:e})=>S.jsx("div",{className:Se(v3.root,e),children:t}),m3=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32",fill:"none",...t},U.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"})),y3='<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>',b3=`<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" />
|
|
@@ -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>`,
|
|
156
|
+
</svg>`,E3=`<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>`,
|
|
179
|
+
</svg>`,x3=`<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" />
|
|
@@ -221,7 +221,7 @@ 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>`,kt={PinPvz:L3,PinHome:y3,PinOmnic:w3,PinWeChip:x3,PinOmnicSelected:S3,PinWeChipSelected:E3,PinLlamaSelected:C3,PinLlama:b3,PointOmnic:M3,PointLlama:_3,PointWeChip:O3},$h=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...t},U.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"})),P3="PointItem-module__point__-1jMFG",k3="PointItem-module__pointButton__-wAVuy",T3="PointItem-module__pointData__CrnHK9",R3="PointItem-module__title__I5whAh",D3="PointItem-module__address__tRkAx3",A3="PointItem-module__arrow__AMAx4z",Er={point:P3,pointButton:k3,pointData:T3,title:R3,address:D3,arrow:A3},I3=({handleDetailsClick:t,handlePointClick:e,point:n})=>{const{iconType:r,palette:i,skipPointInfo:o}=Xe(),s=vr("screenSm"),a=(i==null?void 0:i.primary)||"#fc0",l=function(){switch(r){case"omni-llama":return kt.PointLlama;case"we-chip":return kt.PointWeChip;default:return Pr(kt.PointOmnic,a)}}();function u(){e(n),!o&&!s&&t(n)}return S.jsx("li",{className:Er.point,children:S.jsxs("button",{className:Er.pointButton,type:"button",tabIndex:0,onClick:u,children:[S.jsx("div",{dangerouslySetInnerHTML:{__html:l}}),S.jsxs("div",{className:Er.pointData,children:[S.jsx("h3",{className:Er.title,children:n.name}),S.jsx("p",{className:Er.address,children:n.location.full_address})]}),S.jsx("span",{className:Er.arrow,children:S.jsx($h,{})})]})},n.uid)},j3="SamePoints-module__container__oYvAF2",N3="SamePoints-module__header__nnMDp4",B3="SamePoints-module__closeButton__gd1RzT",F3="SamePoints-module__sameList__GhS89e",jo={container:j3,header:N3,closeButton:B3,sameList:F3},U3=t=>{const{closeSamePoints:e,samePoints:n}=sn(),{hideSearchInput:r}=Xe(),i=!!n.length;return S.jsxs("div",{className:jo.container,"data-visible":i,"data-hide-search-input":r,children:[S.jsx("div",{className:jo.header,children:S.jsx("button",{className:jo.closeButton,type:"button","aria-label":"Close points",tabIndex:0,onClick:e,children:S.jsx(m3,{})})}),S.jsx("ul",{className:jo.sameList,children:n.map(o=>S.jsx(I3,{point:o,...t},o.uid))})]})};var uo=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(){}},gr=typeof window>"u"||"Deno"in globalThis;function It(){}function V3(t,e){return typeof t=="function"?t(e):t}function tl(t){return typeof t=="number"&&t>=0&&t!==1/0}function Wh(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Dr(t,e){return typeof t=="function"?t(e):t}function Ht(t,e){return typeof t=="function"?t(e):t}function pc(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=t;if(s){if(r){if(e.queryHash!==zl(s,e.options))return!1}else if(!Gi(e.queryKey,s))return!1}if(n!=="all"){const l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||i&&i!==e.state.fetchStatus||o&&!o(e))}function gc(t,e){const{exact:n,status:r,predicate:i,mutationKey:o}=t;if(o){if(!e.options.mutationKey)return!1;if(n){if(Wi(e.options.mutationKey)!==Wi(o))return!1}else if(!Gi(e.options.mutationKey,o))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function zl(t,e){return((e==null?void 0:e.queryKeyHashFn)||Wi)(t)}function Wi(t){return JSON.stringify(t,(e,n)=>rl(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Gi(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(n=>!Gi(t[n],e[n])):!1}function Gh(t,e){if(t===e)return t;const n=vc(t)&&vc(e);if(n||rl(t)&&rl(e)){const r=n?t:Object.keys(t),i=r.length,o=n?e:Object.keys(e),s=o.length,a=n?[]:{};let l=0;for(let u=0;u<s;u++){const f=n?u:o[u];(!n&&r.includes(f)||n)&&t[f]===void 0&&e[f]===void 0?(a[f]=void 0,l++):(a[f]=Gh(t[f],e[f]),a[f]===t[f]&&t[f]!==void 0&&l++)}return i===s&&l===i?t:a}return e}function nl(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 vc(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function rl(t){if(!mc(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!mc(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function mc(t){return Object.prototype.toString.call(t)==="[object Object]"}function z3(t){return new Promise(e=>{setTimeout(e,t)})}function il(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?Gh(t,e):e}function H3(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function $3(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var Hl=Symbol();function Zh(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===Hl?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var rr,Dn,Ir,xf,W3=(xf=class extends uo{constructor(){super();J(this,rr,void 0);J(this,Dn,void 0);J(this,Ir,void 0);$(this,Ir,e=>{if(!gr&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){k(this,Dn)||this.setEventListener(k(this,Ir))}onUnsubscribe(){var e;this.hasListeners()||((e=k(this,Dn))==null||e.call(this),$(this,Dn,void 0))}setEventListener(e){var n;$(this,Ir,e),(n=k(this,Dn))==null||n.call(this),$(this,Dn,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){k(this,rr)!==e&&($(this,rr,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof k(this,rr)=="boolean"?k(this,rr):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},rr=new WeakMap,Dn=new WeakMap,Ir=new WeakMap,xf),$l=new W3,jr,An,Nr,Ef,G3=(Ef=class extends uo{constructor(){super();J(this,jr,!0);J(this,An,void 0);J(this,Nr,void 0);$(this,Nr,e=>{if(!gr&&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(){k(this,An)||this.setEventListener(k(this,Nr))}onUnsubscribe(){var e;this.hasListeners()||((e=k(this,An))==null||e.call(this),$(this,An,void 0))}setEventListener(e){var n;$(this,Nr,e),(n=k(this,An))==null||n.call(this),$(this,An,e(this.setOnline.bind(this)))}setOnline(e){k(this,jr)!==e&&($(this,jr,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return k(this,jr)}},jr=new WeakMap,An=new WeakMap,Nr=new WeakMap,Ef),Cs=new G3;function ol(){let t,e;const n=new Promise((i,o)=>{t=i,e=o});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 Z3(t){return Math.min(1e3*2**t,3e4)}function qh(t){return(t??"online")==="online"?Cs.isOnline():!0}var Kh=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function ua(t){return t instanceof Kh}function Qh(t){let e=!1,n=0,r=!1,i;const o=ol(),s=g=>{var w;r||(h(new Kh(g)),(w=t.abort)==null||w.call(t))},a=()=>{e=!0},l=()=>{e=!1},u=()=>$l.isFocused()&&(t.networkMode==="always"||Cs.isOnline())&&t.canRun(),f=()=>qh(t.networkMode)&&t.canRun(),d=g=>{var w;r||(r=!0,(w=t.onSuccess)==null||w.call(t,g),i==null||i(),o.resolve(g))},h=g=>{var w;r||(r=!0,(w=t.onError)==null||w.call(t,g),i==null||i(),o.reject(g))},v=()=>new Promise(g=>{var w;i=C=>{(r||u())&&g(C)},(w=t.onPause)==null||w.call(t)}).then(()=>{var g;i=void 0,r||(g=t.onContinue)==null||g.call(t)}),y=()=>{if(r)return;let g;const w=n===0?t.initialPromise:void 0;try{g=w??t.fn()}catch(C){g=Promise.reject(C)}Promise.resolve(g).then(d).catch(C=>{var p;if(r)return;const L=t.retry??(gr?0:3),m=t.retryDelay??Z3,_=typeof m=="function"?m(n,C):m,E=L===!0||typeof L=="number"&&n<L||typeof L=="function"&&L(n,C);if(e||!E){h(C);return}n++,(p=t.onFail)==null||p.call(t,n,C),z3(_).then(()=>u()?void 0:v()).then(()=>{e?h(C):y()})})};return{promise:o,cancel:s,continue:()=>(i==null||i(),o),cancelRetry:a,continueRetry:l,canStart:f,start:()=>(f()?y():v().then(y),o)}}function q3(){let t=[],e=0,n=a=>{a()},r=a=>{a()},i=a=>setTimeout(a,0);const o=a=>{e?t.push(a):i(()=>{n(a)})},s=()=>{const a=t;t=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||s()}return l},batchCalls:a=>(...l)=>{o(()=>{a(...l)})},schedule:o,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var lt=q3(),ir,_f,Jh=(_f=class{constructor(){J(this,ir,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),tl(this.gcTime)&&$(this,ir,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(gr?1/0:5*60*1e3))}clearGcTimeout(){k(this,ir)&&(clearTimeout(k(this,ir)),$(this,ir,void 0))}},ir=new WeakMap,_f),Br,Fr,Dt,dt,Zi,or,zt,pn,Mf,K3=(Mf=class extends Jh{constructor(e){super();J(this,zt);J(this,Br,void 0);J(this,Fr,void 0);J(this,Dt,void 0);J(this,dt,void 0);J(this,Zi,void 0);J(this,or,void 0);$(this,or,!1),$(this,Zi,e.defaultOptions),this.setOptions(e.options),this.observers=[],$(this,Dt,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,$(this,Br,Q3(this.options)),this.state=e.state??k(this,Br),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=k(this,dt))==null?void 0:e.promise}setOptions(e){this.options={...k(this,Zi),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&k(this,Dt).remove(this)}setData(e,n){const r=il(this.state.data,e,this.options);return ve(this,zt,pn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){ve(this,zt,pn).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,i;const n=(r=k(this,dt))==null?void 0:r.promise;return(i=k(this,dt))==null||i.cancel(e),n?n.then(It).catch(It):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(k(this,Br))}isActive(){return this.observers.some(e=>Ht(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Hl||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||!Wh(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=k(this,dt))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=k(this,dt))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),k(this,Dt).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(k(this,dt)&&(k(this,or)?k(this,dt).cancel({revert:!0}):k(this,dt).cancelRetry()),this.scheduleGc()),k(this,Dt).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ve(this,zt,pn).call(this,{type:"invalidate"})}fetch(e,n){var l,u,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(k(this,dt))return k(this,dt).continueRetry(),k(this,dt).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:()=>($(this,or,!0),r.signal)})},o=()=>{const d=Zh(this.options,n),h={queryKey:this.queryKey,meta:this.meta};return i(h),$(this,or,!1),this.options.persister?this.options.persister(d,h,this):d(h)},s={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:o};i(s),(l=this.options.behavior)==null||l.onFetch(s,this),$(this,Fr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=s.fetchOptions)==null?void 0:u.meta))&&ve(this,zt,pn).call(this,{type:"fetch",meta:(f=s.fetchOptions)==null?void 0:f.meta});const a=d=>{var h,v,y,g;ua(d)&&d.silent||ve(this,zt,pn).call(this,{type:"error",error:d}),ua(d)||((v=(h=k(this,Dt).config).onError)==null||v.call(h,d,this),(g=(y=k(this,Dt).config).onSettled)==null||g.call(y,this.state.data,d,this)),this.scheduleGc()};return $(this,dt,Qh({initialPromise:n==null?void 0:n.initialPromise,fn:s.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var h,v,y,g;if(d===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(w){a(w);return}(v=(h=k(this,Dt).config).onSuccess)==null||v.call(h,d,this),(g=(y=k(this,Dt).config).onSettled)==null||g.call(y,d,this.state.error,this),this.scheduleGc()},onError:a,onFail:(d,h)=>{ve(this,zt,pn).call(this,{type:"failed",failureCount:d,error:h})},onPause:()=>{ve(this,zt,pn).call(this,{type:"pause"})},onContinue:()=>{ve(this,zt,pn).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0})),k(this,dt).start()}},Br=new WeakMap,Fr=new WeakMap,Dt=new WeakMap,dt=new WeakMap,Zi=new WeakMap,or=new WeakMap,zt=new WeakSet,pn=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 ua(i)&&i.revert&&k(this,Fr)?{...k(this,Fr),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),lt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),k(this,Dt).notify({query:this,type:"updated",action:e})})},Mf);function Yh(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:qh(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Q3(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 Yt,Of,J3=(Of=class extends uo{constructor(e={}){super();J(this,Yt,void 0);this.config=e,$(this,Yt,new Map)}build(e,n,r){const i=n.queryKey,o=n.queryHash??zl(i,n);let s=this.get(o);return s||(s=new K3({cache:this,queryKey:i,queryHash:o,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(s)),s}add(e){k(this,Yt).has(e.queryHash)||(k(this,Yt).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=k(this,Yt).get(e.queryHash);n&&(e.destroy(),n===e&&k(this,Yt).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){lt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return k(this,Yt).get(e)}getAll(){return[...k(this,Yt).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>pc(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>pc(e,r)):n}notify(e){lt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){lt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){lt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Yt=new WeakMap,Of),Xt,gt,sr,en,_n,Pf,Y3=(Pf=class extends Jh{constructor(e){super();J(this,en);J(this,Xt,void 0);J(this,gt,void 0);J(this,sr,void 0);this.mutationId=e.mutationId,$(this,gt,e.mutationCache),$(this,Xt,[]),this.state=e.state||X3(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){k(this,Xt).includes(e)||(k(this,Xt).push(e),this.clearGcTimeout(),k(this,gt).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){$(this,Xt,k(this,Xt).filter(n=>n!==e)),this.scheduleGc(),k(this,gt).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){k(this,Xt).length||(this.state.status==="pending"?this.scheduleGc():k(this,gt).remove(this))}continue(){var e;return((e=k(this,sr))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,o,s,a,l,u,f,d,h,v,y,g,w,C,L,m,_,E,p,b;$(this,sr,Qh({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(x,M)=>{ve(this,en,_n).call(this,{type:"failed",failureCount:x,error:M})},onPause:()=>{ve(this,en,_n).call(this,{type:"pause"})},onContinue:()=>{ve(this,en,_n).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>k(this,gt).canRun(this)}));const n=this.state.status==="pending",r=!k(this,sr).canStart();try{if(!n){ve(this,en,_n).call(this,{type:"pending",variables:e,isPaused:r}),await((o=(i=k(this,gt).config).onMutate)==null?void 0:o.call(i,e,this));const M=await((a=(s=this.options).onMutate)==null?void 0:a.call(s,e));M!==this.state.context&&ve(this,en,_n).call(this,{type:"pending",context:M,variables:e,isPaused:r})}const x=await k(this,sr).start();return await((u=(l=k(this,gt).config).onSuccess)==null?void 0:u.call(l,x,e,this.state.context,this)),await((d=(f=this.options).onSuccess)==null?void 0:d.call(f,x,e,this.state.context)),await((v=(h=k(this,gt).config).onSettled)==null?void 0:v.call(h,x,null,this.state.variables,this.state.context,this)),await((g=(y=this.options).onSettled)==null?void 0:g.call(y,x,null,e,this.state.context)),ve(this,en,_n).call(this,{type:"success",data:x}),x}catch(x){try{throw await((C=(w=k(this,gt).config).onError)==null?void 0:C.call(w,x,e,this.state.context,this)),await((m=(L=this.options).onError)==null?void 0:m.call(L,x,e,this.state.context)),await((E=(_=k(this,gt).config).onSettled)==null?void 0:E.call(_,void 0,x,this.state.variables,this.state.context,this)),await((b=(p=this.options).onSettled)==null?void 0:b.call(p,void 0,x,e,this.state.context)),x}finally{ve(this,en,_n).call(this,{type:"error",error:x})}}finally{k(this,gt).runNext(this)}}},Xt=new WeakMap,gt=new WeakMap,sr=new WeakMap,en=new WeakSet,_n=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),lt.batch(()=>{k(this,Xt).forEach(r=>{r.onMutationUpdate(e)}),k(this,gt).notify({mutation:this,type:"updated",action:e})})},Pf);function X3(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Pt,qi,kf,e4=(kf=class extends uo{constructor(e={}){super();J(this,Pt,void 0);J(this,qi,void 0);this.config=e,$(this,Pt,new Map),$(this,qi,Date.now())}build(e,n,r){const i=new Y3({mutationCache:this,mutationId:++ho(this,qi)._,options:e.defaultMutationOptions(n),state:r});return this.add(i),i}add(e){const n=No(e),r=k(this,Pt).get(n)??[];r.push(e),k(this,Pt).set(n,r),this.notify({type:"added",mutation:e})}remove(e){var r;const n=No(e);if(k(this,Pt).has(n)){const i=(r=k(this,Pt).get(n))==null?void 0:r.filter(o=>o!==e);i&&(i.length===0?k(this,Pt).delete(n):k(this,Pt).set(n,i))}this.notify({type:"removed",mutation:e})}canRun(e){var r;const n=(r=k(this,Pt).get(No(e)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===e}runNext(e){var r;const n=(r=k(this,Pt).get(No(e)))==null?void 0:r.find(i=>i!==e&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){lt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...k(this,Pt).values()].flat()}find(e){const n={exact:!0,...e};return this.getAll().find(r=>gc(n,r))}findAll(e={}){return this.getAll().filter(n=>gc(e,n))}notify(e){lt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return lt.batch(()=>Promise.all(e.map(n=>n.continue().catch(It))))}},Pt=new WeakMap,qi=new WeakMap,kf);function No(t){var e;return((e=t.options.scope)==null?void 0:e.id)??String(t.mutationId)}function yc(t){return{onFetch:(e,n)=>{var f,d,h,v,y;const r=e.options,i=(h=(d=(f=e.fetchOptions)==null?void 0:f.meta)==null?void 0:d.fetchMore)==null?void 0:h.direction,o=((v=e.state.data)==null?void 0:v.pages)||[],s=((y=e.state.data)==null?void 0:y.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let g=!1;const w=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(e.signal.aborted?g=!0:e.signal.addEventListener("abort",()=>{g=!0}),e.signal)})},C=Zh(e.options,e.fetchOptions),L=async(m,_,E)=>{if(g)return Promise.reject();if(_==null&&m.pages.length)return Promise.resolve(m);const p={queryKey:e.queryKey,pageParam:_,direction:E?"backward":"forward",meta:e.options.meta};w(p);const b=await C(p),{maxPages:x}=e.options,M=E?$3:H3;return{pages:M(m.pages,b,x),pageParams:M(m.pageParams,_,x)}};if(i&&o.length){const m=i==="backward",_=m?t4:bc,E={pages:o,pageParams:s},p=_(r,E);a=await L(E,p,m)}else{const m=t??o.length;do{const _=l===0?s[0]??r.initialPageParam:bc(r,a);if(l>0&&_==null)break;a=await L(a,_),l++}while(l<m)}return a};e.options.persister?e.fetchFn=()=>{var g,w;return(w=(g=e.options).persister)==null?void 0:w.call(g,u,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=u}}}function bc(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 t4(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 qe,In,jn,Ur,Vr,Nn,zr,Hr,Tf,n4=(Tf=class{constructor(t={}){J(this,qe,void 0);J(this,In,void 0);J(this,jn,void 0);J(this,Ur,void 0);J(this,Vr,void 0);J(this,Nn,void 0);J(this,zr,void 0);J(this,Hr,void 0);$(this,qe,t.queryCache||new J3),$(this,In,t.mutationCache||new e4),$(this,jn,t.defaultOptions||{}),$(this,Ur,new Map),$(this,Vr,new Map),$(this,Nn,0)}mount(){ho(this,Nn)._++,k(this,Nn)===1&&($(this,zr,$l.subscribe(async t=>{t&&(await this.resumePausedMutations(),k(this,qe).onFocus())})),$(this,Hr,Cs.subscribe(async t=>{t&&(await this.resumePausedMutations(),k(this,qe).onOnline())})))}unmount(){var t,e;ho(this,Nn)._--,k(this,Nn)===0&&((t=k(this,zr))==null||t.call(this),$(this,zr,void 0),(e=k(this,Hr))==null||e.call(this),$(this,Hr,void 0))}isFetching(t){return k(this,qe).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return k(this,In).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=k(this,qe).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=k(this,qe).build(this,n);return t.revalidateIfStale&&r.isStaleByTime(Dr(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(e)}}getQueriesData(t){return k(this,qe).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=k(this,qe).get(r.queryHash),o=i==null?void 0:i.state.data,s=V3(e,o);if(s!==void 0)return k(this,qe).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(t,e,n){return lt.batch(()=>k(this,qe).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=k(this,qe).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=k(this,qe);lt.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=k(this,qe),r={type:"active",...t};return lt.batch(()=>(n.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries(r,e)))}cancelQueries(t={},e={}){const n={revert:!0,...e},r=lt.batch(()=>k(this,qe).findAll(t).map(i=>i.cancel(n)));return Promise.all(r).then(It).catch(It)}invalidateQueries(t={},e={}){return lt.batch(()=>{if(k(this,qe).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=lt.batch(()=>k(this,qe).findAll(t).filter(i=>!i.isDisabled()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(It)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(It)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=k(this,qe).build(this,e);return n.isStaleByTime(Dr(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(It).catch(It)}fetchInfiniteQuery(t){return t.behavior=yc(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(It).catch(It)}ensureInfiniteQueryData(t){return t.behavior=yc(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Cs.isOnline()?k(this,In).resumePausedMutations():Promise.resolve()}getQueryCache(){return k(this,qe)}getMutationCache(){return k(this,In)}getDefaultOptions(){return k(this,jn)}setDefaultOptions(t){$(this,jn,t)}setQueryDefaults(t,e){k(this,Ur).set(Wi(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...k(this,Ur).values()];let n={};return e.forEach(r=>{Gi(t,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(t,e){k(this,Vr).set(Wi(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...k(this,Vr).values()];let n={};return e.forEach(r=>{Gi(t,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...k(this,jn).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=zl(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===Hl&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...k(this,jn).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){k(this,qe).clear(),k(this,In).clear()}},qe=new WeakMap,In=new WeakMap,jn=new WeakMap,Ur=new WeakMap,Vr=new WeakMap,Nn=new WeakMap,zr=new WeakMap,Hr=new WeakMap,Tf),Et,me,Ki,vt,ar,$r,Bn,tn,Qi,Wr,Gr,lr,ur,Fn,Zr,cr,_i,Ji,sl,Yi,al,Xi,ll,eo,ul,to,cl,no,fl,ro,dl,xs,Xh,Rf,r4=(Rf=class extends uo{constructor(e,n){super();J(this,cr);J(this,Ji);J(this,Yi);J(this,Xi);J(this,eo);J(this,to);J(this,no);J(this,ro);J(this,xs);J(this,Et,void 0);J(this,me,void 0);J(this,Ki,void 0);J(this,vt,void 0);J(this,ar,void 0);J(this,$r,void 0);J(this,Bn,void 0);J(this,tn,void 0);J(this,Qi,void 0);J(this,Wr,void 0);J(this,Gr,void 0);J(this,lr,void 0);J(this,ur,void 0);J(this,Fn,void 0);J(this,Zr,new Set);this.options=n,$(this,Et,e),$(this,tn,null),$(this,Bn,ol()),this.options.experimental_prefetchInRender||k(this,Bn).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&&(k(this,me).addObserver(this),Cc(k(this,me),this.options)?ve(this,cr,_i).call(this):this.updateResult(),ve(this,eo,ul).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return hl(k(this,me),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return hl(k(this,me),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ve(this,to,cl).call(this),ve(this,no,fl).call(this),k(this,me).removeObserver(this)}setOptions(e,n){const r=this.options,i=k(this,me);if(this.options=k(this,Et).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ht(this.options.enabled,k(this,me))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ve(this,ro,dl).call(this),k(this,me).setOptions(this.options),r._defaulted&&!nl(this.options,r)&&k(this,Et).getQueryCache().notify({type:"observerOptionsUpdated",query:k(this,me),observer:this});const o=this.hasListeners();o&&wc(k(this,me),i,this.options,r)&&ve(this,cr,_i).call(this),this.updateResult(n),o&&(k(this,me)!==i||Ht(this.options.enabled,k(this,me))!==Ht(r.enabled,k(this,me))||Dr(this.options.staleTime,k(this,me))!==Dr(r.staleTime,k(this,me)))&&ve(this,Ji,sl).call(this);const s=ve(this,Yi,al).call(this);o&&(k(this,me)!==i||Ht(this.options.enabled,k(this,me))!==Ht(r.enabled,k(this,me))||s!==k(this,Fn))&&ve(this,Xi,ll).call(this,s)}getOptimisticResult(e){const n=k(this,Et).getQueryCache().build(k(this,Et),e),r=this.createResult(n,e);return o4(this,r)&&($(this,vt,r),$(this,$r,this.options),$(this,ar,k(this,me).state)),r}getCurrentResult(){return k(this,vt)}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){k(this,Zr).add(e)}getCurrentQuery(){return k(this,me)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=k(this,Et).defaultQueryOptions(e),r=k(this,Et).getQueryCache().build(k(this,Et),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(e){return ve(this,cr,_i).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),k(this,vt)))}createResult(e,n){var x;const r=k(this,me),i=this.options,o=k(this,vt),s=k(this,ar),a=k(this,$r),u=e!==r?e.state:k(this,Ki),{state:f}=e;let d={...f},h=!1,v;if(n._optimisticResults){const M=this.hasListeners(),O=!M&&Cc(e,n),T=M&&wc(e,r,n,i);(O||T)&&(d={...d,...Yh(f.data,e.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:y,errorUpdatedAt:g,status:w}=d;if(n.select&&d.data!==void 0)if(o&&d.data===(s==null?void 0:s.data)&&n.select===k(this,Qi))v=k(this,Wr);else try{$(this,Qi,n.select),v=n.select(d.data),v=il(o==null?void 0:o.data,v,n),$(this,Wr,v),$(this,tn,null)}catch(M){$(this,tn,M)}else v=d.data;if(n.placeholderData!==void 0&&v===void 0&&w==="pending"){let M;if(o!=null&&o.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))M=o.data;else if(M=typeof n.placeholderData=="function"?n.placeholderData((x=k(this,Gr))==null?void 0:x.state.data,k(this,Gr)):n.placeholderData,n.select&&M!==void 0)try{M=n.select(M),$(this,tn,null)}catch(O){$(this,tn,O)}M!==void 0&&(w="success",v=il(o==null?void 0:o.data,M,n),h=!0)}k(this,tn)&&(y=k(this,tn),v=k(this,Wr),g=Date.now(),w="error");const C=d.fetchStatus==="fetching",L=w==="pending",m=w==="error",_=L&&C,E=v!==void 0,b={status:w,fetchStatus:d.fetchStatus,isPending:L,isSuccess:w==="success",isError:m,isInitialLoading:_,isLoading:_,data:v,dataUpdatedAt:d.dataUpdatedAt,error:y,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:C,isRefetching:C&&!L,isLoadingError:m&&!E,isPaused:d.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:m&&E,isStale:Wl(e,n),refetch:this.refetch,promise:k(this,Bn)};if(this.options.experimental_prefetchInRender){const M=P=>{b.status==="error"?P.reject(b.error):b.data!==void 0&&P.resolve(b.data)},O=()=>{const P=$(this,Bn,b.promise=ol());M(P)},T=k(this,Bn);switch(T.status){case"pending":e.queryHash===r.queryHash&&M(T);break;case"fulfilled":(b.status==="error"||b.data!==T.value)&&O();break;case"rejected":(b.status!=="error"||b.error!==T.reason)&&O();break}}return b}updateResult(e){const n=k(this,vt),r=this.createResult(k(this,me),this.options);if($(this,ar,k(this,me).state),$(this,$r,this.options),k(this,ar).data!==void 0&&$(this,Gr,k(this,me)),nl(r,n))return;$(this,vt,r);const i={},o=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!k(this,Zr).size)return!0;const l=new Set(a??k(this,Zr));return this.options.throwOnError&&l.add("error"),Object.keys(k(this,vt)).some(u=>{const f=u;return k(this,vt)[f]!==n[f]&&l.has(f)})};(e==null?void 0:e.listeners)!==!1&&o()&&(i.listeners=!0),ve(this,xs,Xh).call(this,{...i,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ve(this,eo,ul).call(this)}},Et=new WeakMap,me=new WeakMap,Ki=new WeakMap,vt=new WeakMap,ar=new WeakMap,$r=new WeakMap,Bn=new WeakMap,tn=new WeakMap,Qi=new WeakMap,Wr=new WeakMap,Gr=new WeakMap,lr=new WeakMap,ur=new WeakMap,Fn=new WeakMap,Zr=new WeakMap,cr=new WeakSet,_i=function(e){ve(this,ro,dl).call(this);let n=k(this,me).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(It)),n},Ji=new WeakSet,sl=function(){ve(this,to,cl).call(this);const e=Dr(this.options.staleTime,k(this,me));if(gr||k(this,vt).isStale||!tl(e))return;const r=Wh(k(this,vt).dataUpdatedAt,e)+1;$(this,lr,setTimeout(()=>{k(this,vt).isStale||this.updateResult()},r))},Yi=new WeakSet,al=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(k(this,me)):this.options.refetchInterval)??!1},Xi=new WeakSet,ll=function(e){ve(this,no,fl).call(this),$(this,Fn,e),!(gr||Ht(this.options.enabled,k(this,me))===!1||!tl(k(this,Fn))||k(this,Fn)===0)&&$(this,ur,setInterval(()=>{(this.options.refetchIntervalInBackground||$l.isFocused())&&ve(this,cr,_i).call(this)},k(this,Fn)))},eo=new WeakSet,ul=function(){ve(this,Ji,sl).call(this),ve(this,Xi,ll).call(this,ve(this,Yi,al).call(this))},to=new WeakSet,cl=function(){k(this,lr)&&(clearTimeout(k(this,lr)),$(this,lr,void 0))},no=new WeakSet,fl=function(){k(this,ur)&&(clearInterval(k(this,ur)),$(this,ur,void 0))},ro=new WeakSet,dl=function(){const e=k(this,Et).getQueryCache().build(k(this,Et),this.options);if(e===k(this,me))return;const n=k(this,me);$(this,me,e),$(this,Ki,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},xs=new WeakSet,Xh=function(e){lt.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(k(this,vt))}),k(this,Et).getQueryCache().notify({query:k(this,me),type:"observerResultsUpdated"})})},Rf);function i4(t,e){return Ht(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function Cc(t,e){return i4(t,e)||t.state.data!==void 0&&hl(t,e,e.refetchOnMount)}function hl(t,e,n){if(Ht(e.enabled,t)!==!1){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&Wl(t,e)}return!1}function wc(t,e,n,r){return(t!==e||Ht(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&Wl(t,n)}function Wl(t,e){return Ht(e.enabled,t)!==!1&&t.isStaleByTime(Dr(e.staleTime,t))}function o4(t,e){return!nl(t.getCurrentResult(),e)}var ep=U.createContext(void 0),s4=t=>{const e=U.useContext(ep);if(t)return t;if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},a4=({client:t,children:e})=>(U.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),S.jsx(ep.Provider,{value:t,children:e})),tp=U.createContext(!1),l4=()=>U.useContext(tp);tp.Provider;function u4(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var c4=U.createContext(u4()),f4=()=>U.useContext(c4);function d4(t,e){return typeof t=="function"?t(...e):!!t}function h4(){}var p4=(t,e)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(e.isReset()||(t.retryOnMount=!1))},g4=t=>{U.useEffect(()=>{t.clearReset()},[t])},v4=({result:t,errorResetBoundary:e,throwOnError:n,query:r})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&d4(n,[t.error,r]),m4=t=>{t.suspense&&(t.staleTime===void 0&&(t.staleTime=1e3),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3)))},y4=(t,e)=>t.isLoading&&t.isFetching&&!e,b4=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,Sc=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function C4(t,e,n){var f,d,h,v,y;const r=s4(n),i=l4(),o=f4(),s=r.defaultQueryOptions(t);(d=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||d.call(f,s),s._optimisticResults=i?"isRestoring":"optimistic",m4(s),p4(s,o),g4(o);const a=!r.getQueryCache().get(s.queryHash),[l]=U.useState(()=>new e(r,s)),u=l.getOptimisticResult(s);if(U.useSyncExternalStore(U.useCallback(g=>{const w=i?()=>{}:l.subscribe(lt.batchCalls(g));return l.updateResult(),w},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),U.useEffect(()=>{l.setOptions(s,{listeners:!1})},[s,l]),b4(s,u))throw Sc(s,l,o);if(v4({result:u,errorResetBoundary:o,throwOnError:s.throwOnError,query:r.getQueryCache().get(s.queryHash)}))throw u.error;if((v=(h=r.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||v.call(h,s,u),s.experimental_prefetchInRender&&!gr&&y4(u,i)){const g=a?Sc(s,l,o):(y=r.getQueryCache().get(s.queryHash))==null?void 0:y.promise;g==null||g.catch(h4).finally(()=>{l.updateResult()})}return s.notifyOnChangeProps?u:l.trackResult(u)}function np(t,e){return C4(t,r4,e)}async function w4(t){return(await Qe.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 S4(){const[t,e]=c.useState(""),{setLMSData:n,setLoading:r}=Ts(),{data:i,isLoading:o}=np({queryKey:["lms-data",t],queryFn:()=>w4(t),enabled:!!t,refetchOnWindowFocus:!1,retry:2});return c.useEffect(()=>{const s=i==null?void 0:i.results[0];s&&n(s)},[i,n]),c.useEffect(()=>{r(o)},[o,r]),{getLMSData:e}}/*! *****************************************************************************
|
|
224
|
+
</svg>`,kt={PinPvz:L3,PinHome:y3,PinOmnic:w3,PinWeChip:E3,PinOmnicSelected:S3,PinWeChipSelected:x3,PinLlamaSelected:C3,PinLlama:b3,PointOmnic:M3,PointLlama:_3,PointWeChip:O3},$h=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...t},U.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"})),P3="PointItem-module__point__-1jMFG",k3="PointItem-module__pointButton__-wAVuy",T3="PointItem-module__pointData__CrnHK9",R3="PointItem-module__title__I5whAh",D3="PointItem-module__address__tRkAx3",A3="PointItem-module__arrow__AMAx4z",xr={point:P3,pointButton:k3,pointData:T3,title:R3,address:D3,arrow:A3},I3=({handleDetailsClick:t,handlePointClick:e,point:n})=>{const{iconType:r,palette:i,skipPointInfo:o}=Xe(),s=vr("screenSm"),a=(i==null?void 0:i.primary)||"#fc0",l=function(){switch(r){case"omni-llama":return kt.PointLlama;case"we-chip":return kt.PointWeChip;default:return Pr(kt.PointOmnic,a)}}();function u(){e(n),!o&&!s&&t(n)}return S.jsx("li",{className:xr.point,children:S.jsxs("button",{className:xr.pointButton,type:"button",tabIndex:0,onClick:u,children:[S.jsx("div",{dangerouslySetInnerHTML:{__html:l}}),S.jsxs("div",{className:xr.pointData,children:[S.jsx("h3",{className:xr.title,children:n.name}),S.jsx("p",{className:xr.address,children:n.location.full_address})]}),S.jsx("span",{className:xr.arrow,children:S.jsx($h,{})})]})},n.uid)},j3="SamePoints-module__container__oYvAF2",N3="SamePoints-module__header__nnMDp4",B3="SamePoints-module__closeButton__gd1RzT",F3="SamePoints-module__sameList__GhS89e",jo={container:j3,header:N3,closeButton:B3,sameList:F3},U3=t=>{const{closeSamePoints:e,samePoints:n}=sn(),{hideSearchInput:r}=Xe(),i=!!n.length;return S.jsxs("div",{className:jo.container,"data-visible":i,"data-hide-search-input":r,children:[S.jsx("div",{className:jo.header,children:S.jsx("button",{className:jo.closeButton,type:"button","aria-label":"Close points",tabIndex:0,onClick:e,children:S.jsx(m3,{})})}),S.jsx("ul",{className:jo.sameList,children:n.map(o=>S.jsx(I3,{point:o,...t},o.uid))})]})};var uo=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(){}},gr=typeof window>"u"||"Deno"in globalThis;function It(){}function V3(t,e){return typeof t=="function"?t(e):t}function nl(t){return typeof t=="number"&&t>=0&&t!==1/0}function Wh(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Dr(t,e){return typeof t=="function"?t(e):t}function Ht(t,e){return typeof t=="function"?t(e):t}function gc(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=t;if(s){if(r){if(e.queryHash!==Hl(s,e.options))return!1}else if(!Gi(e.queryKey,s))return!1}if(n!=="all"){const l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||i&&i!==e.state.fetchStatus||o&&!o(e))}function vc(t,e){const{exact:n,status:r,predicate:i,mutationKey:o}=t;if(o){if(!e.options.mutationKey)return!1;if(n){if(Wi(e.options.mutationKey)!==Wi(o))return!1}else if(!Gi(e.options.mutationKey,o))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function Hl(t,e){return((e==null?void 0:e.queryKeyHashFn)||Wi)(t)}function Wi(t){return JSON.stringify(t,(e,n)=>il(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Gi(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(n=>!Gi(t[n],e[n])):!1}function Gh(t,e){if(t===e)return t;const n=mc(t)&&mc(e);if(n||il(t)&&il(e)){const r=n?t:Object.keys(t),i=r.length,o=n?e:Object.keys(e),s=o.length,a=n?[]:{};let l=0;for(let u=0;u<s;u++){const f=n?u:o[u];(!n&&r.includes(f)||n)&&t[f]===void 0&&e[f]===void 0?(a[f]=void 0,l++):(a[f]=Gh(t[f],e[f]),a[f]===t[f]&&t[f]!==void 0&&l++)}return i===s&&l===i?t:a}return e}function rl(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 mc(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function il(t){if(!yc(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!yc(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function yc(t){return Object.prototype.toString.call(t)==="[object Object]"}function z3(t){return new Promise(e=>{setTimeout(e,t)})}function ol(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?Gh(t,e):e}function H3(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function $3(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var $l=Symbol();function Zh(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===$l?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var rr,Dn,Ir,Ef,W3=(Ef=class extends uo{constructor(){super();J(this,rr,void 0);J(this,Dn,void 0);J(this,Ir,void 0);$(this,Ir,e=>{if(!gr&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){k(this,Dn)||this.setEventListener(k(this,Ir))}onUnsubscribe(){var e;this.hasListeners()||((e=k(this,Dn))==null||e.call(this),$(this,Dn,void 0))}setEventListener(e){var n;$(this,Ir,e),(n=k(this,Dn))==null||n.call(this),$(this,Dn,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){k(this,rr)!==e&&($(this,rr,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof k(this,rr)=="boolean"?k(this,rr):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},rr=new WeakMap,Dn=new WeakMap,Ir=new WeakMap,Ef),Wl=new W3,jr,An,Nr,xf,G3=(xf=class extends uo{constructor(){super();J(this,jr,!0);J(this,An,void 0);J(this,Nr,void 0);$(this,Nr,e=>{if(!gr&&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(){k(this,An)||this.setEventListener(k(this,Nr))}onUnsubscribe(){var e;this.hasListeners()||((e=k(this,An))==null||e.call(this),$(this,An,void 0))}setEventListener(e){var n;$(this,Nr,e),(n=k(this,An))==null||n.call(this),$(this,An,e(this.setOnline.bind(this)))}setOnline(e){k(this,jr)!==e&&($(this,jr,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return k(this,jr)}},jr=new WeakMap,An=new WeakMap,Nr=new WeakMap,xf),Cs=new G3;function sl(){let t,e;const n=new Promise((i,o)=>{t=i,e=o});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 Z3(t){return Math.min(1e3*2**t,3e4)}function qh(t){return(t??"online")==="online"?Cs.isOnline():!0}var Kh=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function ua(t){return t instanceof Kh}function Qh(t){let e=!1,n=0,r=!1,i;const o=sl(),s=g=>{var w;r||(h(new Kh(g)),(w=t.abort)==null||w.call(t))},a=()=>{e=!0},l=()=>{e=!1},u=()=>Wl.isFocused()&&(t.networkMode==="always"||Cs.isOnline())&&t.canRun(),f=()=>qh(t.networkMode)&&t.canRun(),d=g=>{var w;r||(r=!0,(w=t.onSuccess)==null||w.call(t,g),i==null||i(),o.resolve(g))},h=g=>{var w;r||(r=!0,(w=t.onError)==null||w.call(t,g),i==null||i(),o.reject(g))},v=()=>new Promise(g=>{var w;i=C=>{(r||u())&&g(C)},(w=t.onPause)==null||w.call(t)}).then(()=>{var g;i=void 0,r||(g=t.onContinue)==null||g.call(t)}),y=()=>{if(r)return;let g;const w=n===0?t.initialPromise:void 0;try{g=w??t.fn()}catch(C){g=Promise.reject(C)}Promise.resolve(g).then(d).catch(C=>{var p;if(r)return;const L=t.retry??(gr?0:3),m=t.retryDelay??Z3,_=typeof m=="function"?m(n,C):m,x=L===!0||typeof L=="number"&&n<L||typeof L=="function"&&L(n,C);if(e||!x){h(C);return}n++,(p=t.onFail)==null||p.call(t,n,C),z3(_).then(()=>u()?void 0:v()).then(()=>{e?h(C):y()})})};return{promise:o,cancel:s,continue:()=>(i==null||i(),o),cancelRetry:a,continueRetry:l,canStart:f,start:()=>(f()?y():v().then(y),o)}}function q3(){let t=[],e=0,n=a=>{a()},r=a=>{a()},i=a=>setTimeout(a,0);const o=a=>{e?t.push(a):i(()=>{n(a)})},s=()=>{const a=t;t=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||s()}return l},batchCalls:a=>(...l)=>{o(()=>{a(...l)})},schedule:o,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var lt=q3(),ir,_f,Jh=(_f=class{constructor(){J(this,ir,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),nl(this.gcTime)&&$(this,ir,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(gr?1/0:5*60*1e3))}clearGcTimeout(){k(this,ir)&&(clearTimeout(k(this,ir)),$(this,ir,void 0))}},ir=new WeakMap,_f),Br,Fr,Dt,dt,Zi,or,zt,pn,Mf,K3=(Mf=class extends Jh{constructor(e){super();J(this,zt);J(this,Br,void 0);J(this,Fr,void 0);J(this,Dt,void 0);J(this,dt,void 0);J(this,Zi,void 0);J(this,or,void 0);$(this,or,!1),$(this,Zi,e.defaultOptions),this.setOptions(e.options),this.observers=[],$(this,Dt,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,$(this,Br,Q3(this.options)),this.state=e.state??k(this,Br),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=k(this,dt))==null?void 0:e.promise}setOptions(e){this.options={...k(this,Zi),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&k(this,Dt).remove(this)}setData(e,n){const r=ol(this.state.data,e,this.options);return ve(this,zt,pn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){ve(this,zt,pn).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,i;const n=(r=k(this,dt))==null?void 0:r.promise;return(i=k(this,dt))==null||i.cancel(e),n?n.then(It).catch(It):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(k(this,Br))}isActive(){return this.observers.some(e=>Ht(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===$l||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||!Wh(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=k(this,dt))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=k(this,dt))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),k(this,Dt).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(k(this,dt)&&(k(this,or)?k(this,dt).cancel({revert:!0}):k(this,dt).cancelRetry()),this.scheduleGc()),k(this,Dt).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ve(this,zt,pn).call(this,{type:"invalidate"})}fetch(e,n){var l,u,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(k(this,dt))return k(this,dt).continueRetry(),k(this,dt).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:()=>($(this,or,!0),r.signal)})},o=()=>{const d=Zh(this.options,n),h={queryKey:this.queryKey,meta:this.meta};return i(h),$(this,or,!1),this.options.persister?this.options.persister(d,h,this):d(h)},s={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:o};i(s),(l=this.options.behavior)==null||l.onFetch(s,this),$(this,Fr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=s.fetchOptions)==null?void 0:u.meta))&&ve(this,zt,pn).call(this,{type:"fetch",meta:(f=s.fetchOptions)==null?void 0:f.meta});const a=d=>{var h,v,y,g;ua(d)&&d.silent||ve(this,zt,pn).call(this,{type:"error",error:d}),ua(d)||((v=(h=k(this,Dt).config).onError)==null||v.call(h,d,this),(g=(y=k(this,Dt).config).onSettled)==null||g.call(y,this.state.data,d,this)),this.scheduleGc()};return $(this,dt,Qh({initialPromise:n==null?void 0:n.initialPromise,fn:s.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var h,v,y,g;if(d===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(w){a(w);return}(v=(h=k(this,Dt).config).onSuccess)==null||v.call(h,d,this),(g=(y=k(this,Dt).config).onSettled)==null||g.call(y,d,this.state.error,this),this.scheduleGc()},onError:a,onFail:(d,h)=>{ve(this,zt,pn).call(this,{type:"failed",failureCount:d,error:h})},onPause:()=>{ve(this,zt,pn).call(this,{type:"pause"})},onContinue:()=>{ve(this,zt,pn).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0})),k(this,dt).start()}},Br=new WeakMap,Fr=new WeakMap,Dt=new WeakMap,dt=new WeakMap,Zi=new WeakMap,or=new WeakMap,zt=new WeakSet,pn=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 ua(i)&&i.revert&&k(this,Fr)?{...k(this,Fr),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),lt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),k(this,Dt).notify({query:this,type:"updated",action:e})})},Mf);function Yh(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:qh(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Q3(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 Yt,Of,J3=(Of=class extends uo{constructor(e={}){super();J(this,Yt,void 0);this.config=e,$(this,Yt,new Map)}build(e,n,r){const i=n.queryKey,o=n.queryHash??Hl(i,n);let s=this.get(o);return s||(s=new K3({cache:this,queryKey:i,queryHash:o,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(s)),s}add(e){k(this,Yt).has(e.queryHash)||(k(this,Yt).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=k(this,Yt).get(e.queryHash);n&&(e.destroy(),n===e&&k(this,Yt).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){lt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return k(this,Yt).get(e)}getAll(){return[...k(this,Yt).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>gc(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>gc(e,r)):n}notify(e){lt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){lt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){lt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Yt=new WeakMap,Of),Xt,gt,sr,en,_n,Pf,Y3=(Pf=class extends Jh{constructor(e){super();J(this,en);J(this,Xt,void 0);J(this,gt,void 0);J(this,sr,void 0);this.mutationId=e.mutationId,$(this,gt,e.mutationCache),$(this,Xt,[]),this.state=e.state||X3(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){k(this,Xt).includes(e)||(k(this,Xt).push(e),this.clearGcTimeout(),k(this,gt).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){$(this,Xt,k(this,Xt).filter(n=>n!==e)),this.scheduleGc(),k(this,gt).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){k(this,Xt).length||(this.state.status==="pending"?this.scheduleGc():k(this,gt).remove(this))}continue(){var e;return((e=k(this,sr))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,o,s,a,l,u,f,d,h,v,y,g,w,C,L,m,_,x,p,b;$(this,sr,Qh({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(E,P)=>{ve(this,en,_n).call(this,{type:"failed",failureCount:E,error:P})},onPause:()=>{ve(this,en,_n).call(this,{type:"pause"})},onContinue:()=>{ve(this,en,_n).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>k(this,gt).canRun(this)}));const n=this.state.status==="pending",r=!k(this,sr).canStart();try{if(!n){ve(this,en,_n).call(this,{type:"pending",variables:e,isPaused:r}),await((o=(i=k(this,gt).config).onMutate)==null?void 0:o.call(i,e,this));const P=await((a=(s=this.options).onMutate)==null?void 0:a.call(s,e));P!==this.state.context&&ve(this,en,_n).call(this,{type:"pending",context:P,variables:e,isPaused:r})}const E=await k(this,sr).start();return await((u=(l=k(this,gt).config).onSuccess)==null?void 0:u.call(l,E,e,this.state.context,this)),await((d=(f=this.options).onSuccess)==null?void 0:d.call(f,E,e,this.state.context)),await((v=(h=k(this,gt).config).onSettled)==null?void 0:v.call(h,E,null,this.state.variables,this.state.context,this)),await((g=(y=this.options).onSettled)==null?void 0:g.call(y,E,null,e,this.state.context)),ve(this,en,_n).call(this,{type:"success",data:E}),E}catch(E){try{throw await((C=(w=k(this,gt).config).onError)==null?void 0:C.call(w,E,e,this.state.context,this)),await((m=(L=this.options).onError)==null?void 0:m.call(L,E,e,this.state.context)),await((x=(_=k(this,gt).config).onSettled)==null?void 0:x.call(_,void 0,E,this.state.variables,this.state.context,this)),await((b=(p=this.options).onSettled)==null?void 0:b.call(p,void 0,E,e,this.state.context)),E}finally{ve(this,en,_n).call(this,{type:"error",error:E})}}finally{k(this,gt).runNext(this)}}},Xt=new WeakMap,gt=new WeakMap,sr=new WeakMap,en=new WeakSet,_n=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),lt.batch(()=>{k(this,Xt).forEach(r=>{r.onMutationUpdate(e)}),k(this,gt).notify({mutation:this,type:"updated",action:e})})},Pf);function X3(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Pt,qi,kf,e4=(kf=class extends uo{constructor(e={}){super();J(this,Pt,void 0);J(this,qi,void 0);this.config=e,$(this,Pt,new Map),$(this,qi,Date.now())}build(e,n,r){const i=new Y3({mutationCache:this,mutationId:++ho(this,qi)._,options:e.defaultMutationOptions(n),state:r});return this.add(i),i}add(e){const n=No(e),r=k(this,Pt).get(n)??[];r.push(e),k(this,Pt).set(n,r),this.notify({type:"added",mutation:e})}remove(e){var r;const n=No(e);if(k(this,Pt).has(n)){const i=(r=k(this,Pt).get(n))==null?void 0:r.filter(o=>o!==e);i&&(i.length===0?k(this,Pt).delete(n):k(this,Pt).set(n,i))}this.notify({type:"removed",mutation:e})}canRun(e){var r;const n=(r=k(this,Pt).get(No(e)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===e}runNext(e){var r;const n=(r=k(this,Pt).get(No(e)))==null?void 0:r.find(i=>i!==e&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){lt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...k(this,Pt).values()].flat()}find(e){const n={exact:!0,...e};return this.getAll().find(r=>vc(n,r))}findAll(e={}){return this.getAll().filter(n=>vc(e,n))}notify(e){lt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return lt.batch(()=>Promise.all(e.map(n=>n.continue().catch(It))))}},Pt=new WeakMap,qi=new WeakMap,kf);function No(t){var e;return((e=t.options.scope)==null?void 0:e.id)??String(t.mutationId)}function bc(t){return{onFetch:(e,n)=>{var f,d,h,v,y;const r=e.options,i=(h=(d=(f=e.fetchOptions)==null?void 0:f.meta)==null?void 0:d.fetchMore)==null?void 0:h.direction,o=((v=e.state.data)==null?void 0:v.pages)||[],s=((y=e.state.data)==null?void 0:y.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let g=!1;const w=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(e.signal.aborted?g=!0:e.signal.addEventListener("abort",()=>{g=!0}),e.signal)})},C=Zh(e.options,e.fetchOptions),L=async(m,_,x)=>{if(g)return Promise.reject();if(_==null&&m.pages.length)return Promise.resolve(m);const p={queryKey:e.queryKey,pageParam:_,direction:x?"backward":"forward",meta:e.options.meta};w(p);const b=await C(p),{maxPages:E}=e.options,P=x?$3:H3;return{pages:P(m.pages,b,E),pageParams:P(m.pageParams,_,E)}};if(i&&o.length){const m=i==="backward",_=m?t4:Cc,x={pages:o,pageParams:s},p=_(r,x);a=await L(x,p,m)}else{const m=t??o.length;do{const _=l===0?s[0]??r.initialPageParam:Cc(r,a);if(l>0&&_==null)break;a=await L(a,_),l++}while(l<m)}return a};e.options.persister?e.fetchFn=()=>{var g,w;return(w=(g=e.options).persister)==null?void 0:w.call(g,u,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=u}}}function Cc(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 t4(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 qe,In,jn,Ur,Vr,Nn,zr,Hr,Tf,n4=(Tf=class{constructor(t={}){J(this,qe,void 0);J(this,In,void 0);J(this,jn,void 0);J(this,Ur,void 0);J(this,Vr,void 0);J(this,Nn,void 0);J(this,zr,void 0);J(this,Hr,void 0);$(this,qe,t.queryCache||new J3),$(this,In,t.mutationCache||new e4),$(this,jn,t.defaultOptions||{}),$(this,Ur,new Map),$(this,Vr,new Map),$(this,Nn,0)}mount(){ho(this,Nn)._++,k(this,Nn)===1&&($(this,zr,Wl.subscribe(async t=>{t&&(await this.resumePausedMutations(),k(this,qe).onFocus())})),$(this,Hr,Cs.subscribe(async t=>{t&&(await this.resumePausedMutations(),k(this,qe).onOnline())})))}unmount(){var t,e;ho(this,Nn)._--,k(this,Nn)===0&&((t=k(this,zr))==null||t.call(this),$(this,zr,void 0),(e=k(this,Hr))==null||e.call(this),$(this,Hr,void 0))}isFetching(t){return k(this,qe).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return k(this,In).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=k(this,qe).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=k(this,qe).build(this,n);return t.revalidateIfStale&&r.isStaleByTime(Dr(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(e)}}getQueriesData(t){return k(this,qe).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=k(this,qe).get(r.queryHash),o=i==null?void 0:i.state.data,s=V3(e,o);if(s!==void 0)return k(this,qe).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(t,e,n){return lt.batch(()=>k(this,qe).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=k(this,qe).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=k(this,qe);lt.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=k(this,qe),r={type:"active",...t};return lt.batch(()=>(n.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries(r,e)))}cancelQueries(t={},e={}){const n={revert:!0,...e},r=lt.batch(()=>k(this,qe).findAll(t).map(i=>i.cancel(n)));return Promise.all(r).then(It).catch(It)}invalidateQueries(t={},e={}){return lt.batch(()=>{if(k(this,qe).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=lt.batch(()=>k(this,qe).findAll(t).filter(i=>!i.isDisabled()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(It)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(It)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=k(this,qe).build(this,e);return n.isStaleByTime(Dr(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(It).catch(It)}fetchInfiniteQuery(t){return t.behavior=bc(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(It).catch(It)}ensureInfiniteQueryData(t){return t.behavior=bc(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Cs.isOnline()?k(this,In).resumePausedMutations():Promise.resolve()}getQueryCache(){return k(this,qe)}getMutationCache(){return k(this,In)}getDefaultOptions(){return k(this,jn)}setDefaultOptions(t){$(this,jn,t)}setQueryDefaults(t,e){k(this,Ur).set(Wi(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...k(this,Ur).values()];let n={};return e.forEach(r=>{Gi(t,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(t,e){k(this,Vr).set(Wi(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...k(this,Vr).values()];let n={};return e.forEach(r=>{Gi(t,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...k(this,jn).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Hl(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===$l&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...k(this,jn).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){k(this,qe).clear(),k(this,In).clear()}},qe=new WeakMap,In=new WeakMap,jn=new WeakMap,Ur=new WeakMap,Vr=new WeakMap,Nn=new WeakMap,zr=new WeakMap,Hr=new WeakMap,Tf),xt,me,Ki,vt,ar,$r,Bn,tn,Qi,Wr,Gr,lr,ur,Fn,Zr,cr,_i,Ji,al,Yi,ll,Xi,ul,eo,cl,to,fl,no,dl,ro,hl,Es,Xh,Rf,r4=(Rf=class extends uo{constructor(e,n){super();J(this,cr);J(this,Ji);J(this,Yi);J(this,Xi);J(this,eo);J(this,to);J(this,no);J(this,ro);J(this,Es);J(this,xt,void 0);J(this,me,void 0);J(this,Ki,void 0);J(this,vt,void 0);J(this,ar,void 0);J(this,$r,void 0);J(this,Bn,void 0);J(this,tn,void 0);J(this,Qi,void 0);J(this,Wr,void 0);J(this,Gr,void 0);J(this,lr,void 0);J(this,ur,void 0);J(this,Fn,void 0);J(this,Zr,new Set);this.options=n,$(this,xt,e),$(this,tn,null),$(this,Bn,sl()),this.options.experimental_prefetchInRender||k(this,Bn).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&&(k(this,me).addObserver(this),wc(k(this,me),this.options)?ve(this,cr,_i).call(this):this.updateResult(),ve(this,eo,cl).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return pl(k(this,me),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return pl(k(this,me),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ve(this,to,fl).call(this),ve(this,no,dl).call(this),k(this,me).removeObserver(this)}setOptions(e,n){const r=this.options,i=k(this,me);if(this.options=k(this,xt).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ht(this.options.enabled,k(this,me))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ve(this,ro,hl).call(this),k(this,me).setOptions(this.options),r._defaulted&&!rl(this.options,r)&&k(this,xt).getQueryCache().notify({type:"observerOptionsUpdated",query:k(this,me),observer:this});const o=this.hasListeners();o&&Sc(k(this,me),i,this.options,r)&&ve(this,cr,_i).call(this),this.updateResult(n),o&&(k(this,me)!==i||Ht(this.options.enabled,k(this,me))!==Ht(r.enabled,k(this,me))||Dr(this.options.staleTime,k(this,me))!==Dr(r.staleTime,k(this,me)))&&ve(this,Ji,al).call(this);const s=ve(this,Yi,ll).call(this);o&&(k(this,me)!==i||Ht(this.options.enabled,k(this,me))!==Ht(r.enabled,k(this,me))||s!==k(this,Fn))&&ve(this,Xi,ul).call(this,s)}getOptimisticResult(e){const n=k(this,xt).getQueryCache().build(k(this,xt),e),r=this.createResult(n,e);return o4(this,r)&&($(this,vt,r),$(this,$r,this.options),$(this,ar,k(this,me).state)),r}getCurrentResult(){return k(this,vt)}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){k(this,Zr).add(e)}getCurrentQuery(){return k(this,me)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=k(this,xt).defaultQueryOptions(e),r=k(this,xt).getQueryCache().build(k(this,xt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(e){return ve(this,cr,_i).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),k(this,vt)))}createResult(e,n){var E;const r=k(this,me),i=this.options,o=k(this,vt),s=k(this,ar),a=k(this,$r),u=e!==r?e.state:k(this,Ki),{state:f}=e;let d={...f},h=!1,v;if(n._optimisticResults){const P=this.hasListeners(),O=!P&&wc(e,n),T=P&&Sc(e,r,n,i);(O||T)&&(d={...d,...Yh(f.data,e.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:y,errorUpdatedAt:g,status:w}=d;if(n.select&&d.data!==void 0)if(o&&d.data===(s==null?void 0:s.data)&&n.select===k(this,Qi))v=k(this,Wr);else try{$(this,Qi,n.select),v=n.select(d.data),v=ol(o==null?void 0:o.data,v,n),$(this,Wr,v),$(this,tn,null)}catch(P){$(this,tn,P)}else v=d.data;if(n.placeholderData!==void 0&&v===void 0&&w==="pending"){let P;if(o!=null&&o.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))P=o.data;else if(P=typeof n.placeholderData=="function"?n.placeholderData((E=k(this,Gr))==null?void 0:E.state.data,k(this,Gr)):n.placeholderData,n.select&&P!==void 0)try{P=n.select(P),$(this,tn,null)}catch(O){$(this,tn,O)}P!==void 0&&(w="success",v=ol(o==null?void 0:o.data,P,n),h=!0)}k(this,tn)&&(y=k(this,tn),v=k(this,Wr),g=Date.now(),w="error");const C=d.fetchStatus==="fetching",L=w==="pending",m=w==="error",_=L&&C,x=v!==void 0,b={status:w,fetchStatus:d.fetchStatus,isPending:L,isSuccess:w==="success",isError:m,isInitialLoading:_,isLoading:_,data:v,dataUpdatedAt:d.dataUpdatedAt,error:y,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:C,isRefetching:C&&!L,isLoadingError:m&&!x,isPaused:d.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:m&&x,isStale:Gl(e,n),refetch:this.refetch,promise:k(this,Bn)};if(this.options.experimental_prefetchInRender){const P=M=>{b.status==="error"?M.reject(b.error):b.data!==void 0&&M.resolve(b.data)},O=()=>{const M=$(this,Bn,b.promise=sl());P(M)},T=k(this,Bn);switch(T.status){case"pending":e.queryHash===r.queryHash&&P(T);break;case"fulfilled":(b.status==="error"||b.data!==T.value)&&O();break;case"rejected":(b.status!=="error"||b.error!==T.reason)&&O();break}}return b}updateResult(e){const n=k(this,vt),r=this.createResult(k(this,me),this.options);if($(this,ar,k(this,me).state),$(this,$r,this.options),k(this,ar).data!==void 0&&$(this,Gr,k(this,me)),rl(r,n))return;$(this,vt,r);const i={},o=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!k(this,Zr).size)return!0;const l=new Set(a??k(this,Zr));return this.options.throwOnError&&l.add("error"),Object.keys(k(this,vt)).some(u=>{const f=u;return k(this,vt)[f]!==n[f]&&l.has(f)})};(e==null?void 0:e.listeners)!==!1&&o()&&(i.listeners=!0),ve(this,Es,Xh).call(this,{...i,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ve(this,eo,cl).call(this)}},xt=new WeakMap,me=new WeakMap,Ki=new WeakMap,vt=new WeakMap,ar=new WeakMap,$r=new WeakMap,Bn=new WeakMap,tn=new WeakMap,Qi=new WeakMap,Wr=new WeakMap,Gr=new WeakMap,lr=new WeakMap,ur=new WeakMap,Fn=new WeakMap,Zr=new WeakMap,cr=new WeakSet,_i=function(e){ve(this,ro,hl).call(this);let n=k(this,me).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(It)),n},Ji=new WeakSet,al=function(){ve(this,to,fl).call(this);const e=Dr(this.options.staleTime,k(this,me));if(gr||k(this,vt).isStale||!nl(e))return;const r=Wh(k(this,vt).dataUpdatedAt,e)+1;$(this,lr,setTimeout(()=>{k(this,vt).isStale||this.updateResult()},r))},Yi=new WeakSet,ll=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(k(this,me)):this.options.refetchInterval)??!1},Xi=new WeakSet,ul=function(e){ve(this,no,dl).call(this),$(this,Fn,e),!(gr||Ht(this.options.enabled,k(this,me))===!1||!nl(k(this,Fn))||k(this,Fn)===0)&&$(this,ur,setInterval(()=>{(this.options.refetchIntervalInBackground||Wl.isFocused())&&ve(this,cr,_i).call(this)},k(this,Fn)))},eo=new WeakSet,cl=function(){ve(this,Ji,al).call(this),ve(this,Xi,ul).call(this,ve(this,Yi,ll).call(this))},to=new WeakSet,fl=function(){k(this,lr)&&(clearTimeout(k(this,lr)),$(this,lr,void 0))},no=new WeakSet,dl=function(){k(this,ur)&&(clearInterval(k(this,ur)),$(this,ur,void 0))},ro=new WeakSet,hl=function(){const e=k(this,xt).getQueryCache().build(k(this,xt),this.options);if(e===k(this,me))return;const n=k(this,me);$(this,me,e),$(this,Ki,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},Es=new WeakSet,Xh=function(e){lt.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(k(this,vt))}),k(this,xt).getQueryCache().notify({query:k(this,me),type:"observerResultsUpdated"})})},Rf);function i4(t,e){return Ht(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function wc(t,e){return i4(t,e)||t.state.data!==void 0&&pl(t,e,e.refetchOnMount)}function pl(t,e,n){if(Ht(e.enabled,t)!==!1){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&Gl(t,e)}return!1}function Sc(t,e,n,r){return(t!==e||Ht(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&Gl(t,n)}function Gl(t,e){return Ht(e.enabled,t)!==!1&&t.isStaleByTime(Dr(e.staleTime,t))}function o4(t,e){return!rl(t.getCurrentResult(),e)}var ep=U.createContext(void 0),s4=t=>{const e=U.useContext(ep);if(t)return t;if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},a4=({client:t,children:e})=>(U.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),S.jsx(ep.Provider,{value:t,children:e})),tp=U.createContext(!1),l4=()=>U.useContext(tp);tp.Provider;function u4(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var c4=U.createContext(u4()),f4=()=>U.useContext(c4);function d4(t,e){return typeof t=="function"?t(...e):!!t}function h4(){}var p4=(t,e)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(e.isReset()||(t.retryOnMount=!1))},g4=t=>{U.useEffect(()=>{t.clearReset()},[t])},v4=({result:t,errorResetBoundary:e,throwOnError:n,query:r})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&d4(n,[t.error,r]),m4=t=>{t.suspense&&(t.staleTime===void 0&&(t.staleTime=1e3),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3)))},y4=(t,e)=>t.isLoading&&t.isFetching&&!e,b4=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,Lc=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function C4(t,e,n){var f,d,h,v,y;const r=s4(n),i=l4(),o=f4(),s=r.defaultQueryOptions(t);(d=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||d.call(f,s),s._optimisticResults=i?"isRestoring":"optimistic",m4(s),p4(s,o),g4(o);const a=!r.getQueryCache().get(s.queryHash),[l]=U.useState(()=>new e(r,s)),u=l.getOptimisticResult(s);if(U.useSyncExternalStore(U.useCallback(g=>{const w=i?()=>{}:l.subscribe(lt.batchCalls(g));return l.updateResult(),w},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),U.useEffect(()=>{l.setOptions(s,{listeners:!1})},[s,l]),b4(s,u))throw Lc(s,l,o);if(v4({result:u,errorResetBoundary:o,throwOnError:s.throwOnError,query:r.getQueryCache().get(s.queryHash)}))throw u.error;if((v=(h=r.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||v.call(h,s,u),s.experimental_prefetchInRender&&!gr&&y4(u,i)){const g=a?Lc(s,l,o):(y=r.getQueryCache().get(s.queryHash))==null?void 0:y.promise;g==null||g.catch(h4).finally(()=>{l.updateResult()})}return s.notifyOnChangeProps?u:l.trackResult(u)}function np(t,e){return C4(t,r4,e)}async function w4(t){return(await Qe.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 S4(){const[t,e]=c.useState(""),{setLMSData:n,setLoading:r}=Ts(),{data:i,isLoading:o}=np({queryKey:["lms-data",t],queryFn:()=>w4(t),enabled:!!t,refetchOnWindowFocus:!1,retry:2});return c.useEffect(()=>{const s=i==null?void 0:i.results[0];s&&n(s)},[i,n]),c.useEffect(()=>{r(o)},[o,r]),{getLMSData:e}}/*! *****************************************************************************
|
|
225
225
|
Copyright (c) Microsoft Corporation.
|
|
226
226
|
|
|
227
227
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -234,15 +234,15 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
234
234
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
235
235
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
236
236
|
PERFORMANCE OF THIS SOFTWARE.
|
|
237
|
-
***************************************************************************** */var
|
|
237
|
+
***************************************************************************** */var gl=function(t,e){return gl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},gl(t,e)};function Ue(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");gl(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var K=function(){return K=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},K.apply(this,arguments)};function Zl(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 L4(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(f){try{u(r.next(f))}catch(d){s(d)}}function l(f){try{u(r.throw(f))}catch(d){s(d)}}function u(f){f.done?o(f.value):i(f.value).then(a,l)}u((r=r.apply(t,e||[])).next())})}function E4(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(f){return l([u,f])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=e.call(t,n)}catch(f){u=[6,f],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function rp(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var x4=function(t,e,n,r,i,o,s,a){if(!t){var l;if(e===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,s,a],f=0;l=new Error(e.replace(/%s/g,function(){return u[f++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},_4=x4,Ye=rp(_4),le=c.createContext(null);function M4(){Ye(!!c.useContext,"useGoogleMap is React hook and requires React version 16.8+");var t=c.useContext(le);return Ye(!!t,"useGoogleMap needs a GoogleMap available up in the tree"),t}function O4(t,e,n){return Object.keys(t).reduce(function(i,o){return e(i,t[o],o)},n)}function P4(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}function k4(t,e,n,r){var i={},o=function(s,a){var l=n[a];l!==e[a]&&(i[a]=l,s(r,l))};return P4(t,o),i}function T4(t,e,n){var r=O4(n,function(o,s,a){return typeof t[a]=="function"&&o.push(google.maps.event.addListener(e,s,t[a])),o},[]);return r}function R4(t){google.maps.event.removeListener(t)}function he(t){t===void 0&&(t=[]),t.forEach(R4)}function ce(t){var e=t.updaterMap,n=t.eventMap,r=t.prevProps,i=t.nextProps,o=t.instance,s=T4(i,o,n);return k4(e,r,i,o),s}var Ec={onDblClick:"dblclick",onDragEnd:"dragend",onDragStart:"dragstart",onMapTypeIdChanged:"maptypeid_changed",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseDown:"mousedown",onMouseUp:"mouseup",onRightClick:"rightclick",onTilesLoaded:"tilesloaded",onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onDrag:"drag",onHeadingChanged:"heading_changed",onIdle:"idle",onProjectionChanged:"projection_changed",onResize:"resize",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed"},xc={extraMapTypes:function(t,e){e.forEach(function(r,i){t.mapTypes.set(String(i),r)})},center:function(t,e){t.setCenter(e)},clickableIcons:function(t,e){t.setClickableIcons(e)},heading:function(t,e){t.setHeading(e)},mapTypeId:function(t,e){t.setMapTypeId(e)},options:function(t,e){t.setOptions(e)},streetView:function(t,e){t.setStreetView(e)},tilt:function(t,e){t.setTilt(e)},zoom:function(t,e){t.setZoom(e)}};function D4(t){var e=t.children,n=t.options,r=t.id,i=t.mapContainerStyle,o=t.mapContainerClassName,s=t.center,a=t.onClick,l=t.onDblClick,u=t.onDrag,f=t.onDragEnd,d=t.onDragStart,h=t.onMouseMove,v=t.onMouseOut,y=t.onMouseOver,g=t.onMouseDown,w=t.onMouseUp,C=t.onRightClick,L=t.onCenterChanged,m=t.onLoad,_=t.onUnmount,x=c.useState(null),p=x[0],b=x[1],E=c.useRef(null),P=c.useState(null),O=P[0],T=P[1],M=c.useState(null),R=M[0],A=M[1],B=c.useState(null),V=B[0],N=B[1],z=c.useState(null),Y=z[0],G=z[1],H=c.useState(null),Q=H[0],oe=H[1],te=c.useState(null),ee=te[0],D=te[1],pe=c.useState(null),Pe=pe[0],Z=pe[1],De=c.useState(null),Ae=De[0],ue=De[1],_e=c.useState(null),Ve=_e[0],Ce=_e[1],Me=c.useState(null),Ie=Me[0],ke=Me[1],je=c.useState(null),ie=je[0],We=je[1],re=c.useState(null),tt=re[0],q=re[1];return c.useEffect(function(){n&&p!==null&&p.setOptions(n)},[p,n]),c.useEffect(function(){p!==null&&typeof s<"u"&&p.setCenter(s)},[p,s]),c.useEffect(function(){p&&l&&(R!==null&&google.maps.event.removeListener(R),A(google.maps.event.addListener(p,"dblclick",l)))},[l]),c.useEffect(function(){p&&f&&(V!==null&&google.maps.event.removeListener(V),N(google.maps.event.addListener(p,"dragend",f)))},[f]),c.useEffect(function(){p&&d&&(Y!==null&&google.maps.event.removeListener(Y),G(google.maps.event.addListener(p,"dragstart",d)))},[d]),c.useEffect(function(){p&&g&&(Q!==null&&google.maps.event.removeListener(Q),oe(google.maps.event.addListener(p,"mousedown",g)))},[g]),c.useEffect(function(){p&&h&&(ee!==null&&google.maps.event.removeListener(ee),D(google.maps.event.addListener(p,"mousemove",h)))},[h]),c.useEffect(function(){p&&v&&(Pe!==null&&google.maps.event.removeListener(Pe),Z(google.maps.event.addListener(p,"mouseout",v)))},[v]),c.useEffect(function(){p&&y&&(Ae!==null&&google.maps.event.removeListener(Ae),ue(google.maps.event.addListener(p,"mouseover",y)))},[y]),c.useEffect(function(){p&&w&&(Ve!==null&&google.maps.event.removeListener(Ve),Ce(google.maps.event.addListener(p,"mouseup",w)))},[w]),c.useEffect(function(){p&&C&&(Ie!==null&&google.maps.event.removeListener(Ie),ke(google.maps.event.addListener(p,"rightclick",C)))},[C]),c.useEffect(function(){p&&a&&(ie!==null&&google.maps.event.removeListener(ie),We(google.maps.event.addListener(p,"click",a)))},[a]),c.useEffect(function(){p&&u&&(tt!==null&&google.maps.event.removeListener(tt),q(google.maps.event.addListener(p,"drag",u)))},[u]),c.useEffect(function(){p&&L&&(O!==null&&google.maps.event.removeListener(O),T(google.maps.event.addListener(p,"center_changed",L)))},[a]),c.useEffect(function(){var Ge=E.current===null?null:new google.maps.Map(E.current,n);return b(Ge),Ge!==null&&m&&m(Ge),function(){Ge!==null&&_&&_(Ge)}},[]),S.jsx("div",{id:r,ref:E,style:i,className:o,children:S.jsx(le.Provider,{value:p,children:p!==null?e:null})})}c.memo(D4);var A4=function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={map:null},n.registeredEvents=[],n.mapRef=null,n.getInstance=function(){return n.mapRef===null?null:new google.maps.Map(n.mapRef,n.props.options)},n.panTo=function(r){var i=n.getInstance();i&&i.panTo(r)},n.setMapCallback=function(){n.state.map!==null&&n.props.onLoad&&n.props.onLoad(n.state.map)},n.getRef=function(r){n.mapRef=r},n}return e.prototype.componentDidMount=function(){var n=this.getInstance();this.registeredEvents=ce({updaterMap:xc,eventMap:Ec,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{map:n}},this.setMapCallback)},e.prototype.componentDidUpdate=function(n){this.state.map!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:xc,eventMap:Ec,prevProps:n,nextProps:this.props,instance:this.state.map}))},e.prototype.componentWillUnmount=function(){this.state.map!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),he(this.registeredEvents))},e.prototype.render=function(){return S.jsx("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName,children:S.jsx(le.Provider,{value:this.state.map,children:this.state.map!==null?this.props.children:null})})},e}(c.PureComponent),nr=typeof document<"u";function ip(t){var e=t.url,n=t.id,r=t.nonce;return nr?new Promise(function(o,s){var a=document.getElementById(n),l=window;if(a){var u=a.getAttribute("data-state");if(a.src===e&&u!=="error"){if(u==="ready")return o(n);var f=l.initMap,d=a.onerror;l.initMap=function(){f&&f(),o(n)},a.onerror=function(v){d&&d(v),s(v)};return}else a.remove()}var h=document.createElement("script");h.type="text/javascript",h.src=e,h.id=n,h.async=!0,h.nonce=r||"",h.onerror=function(y){h.setAttribute("data-state","error"),s(y)},l.initMap=function(){h.setAttribute("data-state","ready"),o(n)},document.head.appendChild(h)}).catch(function(i){throw console.error("injectScript error: ",i),i}):Promise.reject(new Error("document is undefined"))}function _c(t){var e=t.href;return e&&(e.indexOf("https://fonts.googleapis.com/css?family=Roboto")===0||e.indexOf("https://fonts.googleapis.com/css?family=Google+Sans+Text")===0)?!0:t.tagName.toLowerCase()==="style"&&t.styleSheet&&t.styleSheet.cssText&&t.styleSheet.cssText.replace(`\r
|
|
238
238
|
`,"").indexOf(".gm-style")===0?(t.styleSheet.cssText="",!0):t.tagName.toLowerCase()==="style"&&t.innerHTML&&t.innerHTML.replace(`\r
|
|
239
|
-
`,"").indexOf(".gm-style")===0?(t.innerHTML="",!0):t.tagName.toLowerCase()==="style"&&!t.styleSheet&&!t.innerHTML}function op(){var t=document.getElementsByTagName("head")[0];if(t){var e=t.insertBefore.bind(t);t.insertBefore=function(i,o){return
|
|
239
|
+
`,"").indexOf(".gm-style")===0?(t.innerHTML="",!0):t.tagName.toLowerCase()==="style"&&!t.styleSheet&&!t.innerHTML}function op(){var t=document.getElementsByTagName("head")[0];if(t){var e=t.insertBefore.bind(t);t.insertBefore=function(i,o){return _c(i)||Reflect.apply(e,t,[i,o]),i};var n=t.appendChild.bind(t);t.appendChild=function(i){return _c(i)||Reflect.apply(n,t,[i]),i}}}function sp(t){var e=t.googleMapsApiKey,n=t.googleMapsClientId,r=t.version,i=r===void 0?"weekly":r,o=t.language,s=t.region,a=t.libraries,l=t.channel,u=t.mapIds,f=t.authReferrerPolicy,d=[];return Ye(e&&n||!(e&&n),"You need to specify either googleMapsApiKey or googleMapsClientId for @react-google-maps/api load script to work. You cannot use both at the same time."),e?d.push("key=".concat(e)):n&&d.push("client=".concat(n)),i&&d.push("v=".concat(i)),o&&d.push("language=".concat(o)),s&&d.push("region=".concat(s)),a&&a.length&&d.push("libraries=".concat(a.sort().join(","))),l&&d.push("channel=".concat(l)),u&&u.length&&d.push("map_ids=".concat(u.join(","))),f&&d.push("auth_referrer_policy=".concat(f)),d.push("callback=initMap"),"https://maps.googleapis.com/maps/api/js?".concat(d.join("&"))}var yi=!1;function ap(){return S.jsx("div",{children:"Loading..."})}var vl={id:"script-loader",version:"weekly"};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.check=c.createRef(),n.state={loaded:!1},n.cleanupCallback=function(){delete window.google.maps,n.injectScript()},n.isCleaningUp=function(){return L4(n,void 0,void 0,function(){function r(i){if(!yi)i();else if(nr)var o=window.setInterval(function(){yi||(window.clearInterval(o),i())},1)}return E4(this,function(i){return[2,new Promise(r)]})})},n.cleanup=function(){yi=!0;var r=document.getElementById(n.props.id);r&&r.parentNode&&r.parentNode.removeChild(r),Array.prototype.slice.call(document.getElementsByTagName("script")).filter(function(o){return typeof o.src=="string"&&o.src.includes("maps.googleapis")}).forEach(function(o){o.parentNode&&o.parentNode.removeChild(o)}),Array.prototype.slice.call(document.getElementsByTagName("link")).filter(function(o){return o.href==="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"}).forEach(function(o){o.parentNode&&o.parentNode.removeChild(o)}),Array.prototype.slice.call(document.getElementsByTagName("style")).filter(function(o){return o.innerText!==void 0&&o.innerText.length>0&&o.innerText.includes(".gm-")}).forEach(function(o){o.parentNode&&o.parentNode.removeChild(o)})},n.injectScript=function(){n.props.preventGoogleFontsLoading&&op(),Ye(!!n.props.id,'LoadScript requires "id" prop to be a string: %s',n.props.id);var r={id:n.props.id,nonce:n.props.nonce,url:sp(n.props)};ip(r).then(function(){n.props.onLoad&&n.props.onLoad(),n.setState(function(){return{loaded:!0}})}).catch(function(i){n.props.onError&&n.props.onError(i),console.error(`
|
|
240
240
|
There has been an Error with loading Google Maps API script, please check that you provided correct google API key (`.concat(n.props.googleMapsApiKey||"-",") or Client ID (").concat(n.props.googleMapsClientId||"-",`) to <LoadScript />
|
|
241
241
|
Otherwise it is a Network issue.
|
|
242
|
-
`))})},n}return e.prototype.componentDidMount=function(){if(nr){if(window.google&&window.google.maps&&!yi){console.error("google api is already presented");return}this.isCleaningUp().then(this.injectScript).catch(function(r){console.error("Error at injecting script after cleaning up: ",r)})}},e.prototype.componentDidUpdate=function(n){this.props.libraries!==n.libraries&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),nr&&n.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))},e.prototype.componentWillUnmount=function(){var n=this;if(nr){this.cleanup();var r=function(){n.check.current||(delete window.google,yi=!1)};window.setTimeout(r,1),this.props.onUnmount&&this.props.onUnmount()}},e.prototype.render=function(){return S.jsxs(S.Fragment,{children:[S.jsx("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||S.jsx(ap,{})]})},e.defaultProps=
|
|
242
|
+
`))})},n}return e.prototype.componentDidMount=function(){if(nr){if(window.google&&window.google.maps&&!yi){console.error("google api is already presented");return}this.isCleaningUp().then(this.injectScript).catch(function(r){console.error("Error at injecting script after cleaning up: ",r)})}},e.prototype.componentDidUpdate=function(n){this.props.libraries!==n.libraries&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),nr&&n.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))},e.prototype.componentWillUnmount=function(){var n=this;if(nr){this.cleanup();var r=function(){n.check.current||(delete window.google,yi=!1)};window.setTimeout(r,1),this.props.onUnmount&&this.props.onUnmount()}},e.prototype.render=function(){return S.jsxs(S.Fragment,{children:[S.jsx("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||S.jsx(ap,{})]})},e.defaultProps=vl,e})(c.PureComponent);var Mc;function lp(t){var e=t.id,n=e===void 0?vl.id:e,r=t.version,i=r===void 0?vl.version:r,o=t.nonce,s=t.googleMapsApiKey,a=t.googleMapsClientId,l=t.language,u=t.region,f=t.libraries,d=t.preventGoogleFontsLoading,h=t.channel,v=t.mapIds,y=t.authReferrerPolicy,g=c.useRef(!1),w=c.useState(!1),C=w[0],L=w[1],m=c.useState(void 0),_=m[0],x=m[1];c.useEffect(function(){return g.current=!0,function(){g.current=!1}},[]),c.useEffect(function(){nr&&d&&op()},[d]),c.useEffect(function(){C&&Ye(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")},[C]);var p=sp({version:i,googleMapsApiKey:s,googleMapsClientId:a,language:l,region:u,libraries:f,channel:h,mapIds:v,authReferrerPolicy:y});c.useEffect(function(){if(!nr)return;function P(){g.current&&(L(!0),Mc=p)}if(window.google&&window.google.maps&&Mc===p){P();return}ip({id:n,url:p,nonce:o}).then(P).catch(function(T){g.current&&x(T),console.warn(`
|
|
243
243
|
There has been an Error with loading Google Maps API script, please check that you provided correct google API key (`.concat(s||"-",") or Client ID (").concat(a||"-",`)
|
|
244
244
|
Otherwise it is a Network issue.
|
|
245
|
-
`)),console.error(T)})},[n,p,o]);var b=c.useRef();return c.useEffect(function(){b.current&&f!==b.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),b.current=f},[f]),{isLoaded:C,loadError:_,url:p}}var I4=S.jsx(ap,{});function j4(t){var e=t.loadingElement,n=t.onLoad,r=t.onError,i=t.onUnmount,o=t.children,s=Gl(t,["loadingElement","onLoad","onError","onUnmount","children"]),a=lp(s),l=a.isLoaded,u=a.loadError;return c.useEffect(function(){l&&typeof n=="function"&&n()},[l,n]),c.useEffect(function(){u&&typeof r=="function"&&r(u)},[u,r]),c.useEffect(function(){return function(){i&&i()}},[i]),l?o:e||I4}c.memo(j4);var Mc;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(Mc||(Mc={}));var Oc={},Pc={options:function(t,e){t.setOptions(e)}};function N4(t){var e=t.options,n=t.onLoad,r=t.onUnmount,i=c.useContext(le),o=c.useState(null),s=o[0],a=o[1];return c.useEffect(function(){s!==null&&s.setMap(i)},[i]),c.useEffect(function(){e&&s!==null&&s.setOptions(e)},[s,e]),c.useEffect(function(){var l=new google.maps.TrafficLayer(K(K({},e||{}),{map:i}));return a(l),n&&n(l),function(){s!==null&&(r&&r(s),s.setMap(null))}},[]),null}c.memo(N4);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={trafficLayer:null},n.setTrafficLayerCallback=function(){n.state.trafficLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.trafficLayer)},n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=new google.maps.TrafficLayer(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Pc,eventMap:Oc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{trafficLayer:n}},this.setTrafficLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.trafficLayer!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Pc,eventMap:Oc,prevProps:n,nextProps:this.props,instance:this.state.trafficLayer}))},e.prototype.componentWillUnmount=function(){this.state.trafficLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),he(this.registeredEvents),this.state.trafficLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);function B4(t){var e=t.onLoad,n=t.onUnmount,r=c.useContext(le),i=c.useState(null),o=i[0],s=i[1];return c.useEffect(function(){o!==null&&o.setMap(r)},[r]),c.useEffect(function(){var a=new google.maps.BicyclingLayer;return s(a),a.setMap(r),e&&e(a),function(){a!==null&&(n&&n(a),a.setMap(null))}},[]),null}c.memo(B4);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={bicyclingLayer:null},n.setBicyclingLayerCallback=function(){n.state.bicyclingLayer!==null&&(n.state.bicyclingLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.bicyclingLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.BicyclingLayer;this.setState(function(){return{bicyclingLayer:n}},this.setBicyclingLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.bicyclingLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);function F4(t){var e=t.onLoad,n=t.onUnmount,r=c.useContext(le),i=c.useState(null),o=i[0],s=i[1];return c.useEffect(function(){o!==null&&o.setMap(r)},[r]),c.useEffect(function(){var a=new google.maps.TransitLayer;return s(a),a.setMap(r),e&&e(a),function(){o!==null&&(n&&n(o),o.setMap(null))}},[]),null}c.memo(F4);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={transitLayer:null},n.setTransitLayerCallback=function(){n.state.transitLayer!==null&&(n.state.transitLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.transitLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.TransitLayer;this.setState(function(){return{transitLayer:n}},this.setTransitLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.transitLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var kc={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},Tc={drawingMode:function(t,e){t.setDrawingMode(e)},options:function(t,e){t.setOptions(e)}};function U4(t){var e=t.options,n=t.drawingMode,r=t.onCircleComplete,i=t.onMarkerComplete,o=t.onOverlayComplete,s=t.onPolygonComplete,a=t.onPolylineComplete,l=t.onRectangleComplete,u=t.onLoad,f=t.onUnmount,d=c.useContext(le),h=c.useState(null),v=h[0],y=h[1],g=c.useState(null),w=g[0],C=g[1],L=c.useState(null),m=L[0],_=L[1],E=c.useState(null),p=E[0],b=E[1],x=c.useState(null),M=x[0],O=x[1],T=c.useState(null),P=T[0],R=T[1],I=c.useState(null),B=I[0],V=I[1];return c.useEffect(function(){v!==null&&v.setMap(d)},[d]),c.useEffect(function(){e&&v!==null&&v.setOptions(e)},[v,e]),c.useEffect(function(){v!==null&&v.setDrawingMode(n??null)},[v,n]),c.useEffect(function(){v&&r&&(w!==null&&google.maps.event.removeListener(w),C(google.maps.event.addListener(v,"circlecomplete",r)))},[v,r]),c.useEffect(function(){v&&i&&(m!==null&&google.maps.event.removeListener(m),_(google.maps.event.addListener(v,"markercomplete",i)))},[v,i]),c.useEffect(function(){v&&o&&(p!==null&&google.maps.event.removeListener(p),b(google.maps.event.addListener(v,"overlaycomplete",o)))},[v,o]),c.useEffect(function(){v&&s&&(M!==null&&google.maps.event.removeListener(M),O(google.maps.event.addListener(v,"polygoncomplete",s)))},[v,s]),c.useEffect(function(){v&&a&&(P!==null&&google.maps.event.removeListener(P),R(google.maps.event.addListener(v,"polylinecomplete",a)))},[v,a]),c.useEffect(function(){v&&l&&(B!==null&&google.maps.event.removeListener(B),V(google.maps.event.addListener(v,"rectanglecomplete",l)))},[v,l]),c.useEffect(function(){Ye(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var N=new google.maps.drawing.DrawingManager(K(K({},e||{}),{map:d}));return n&&N.setDrawingMode(n),r&&C(google.maps.event.addListener(N,"circlecomplete",r)),i&&_(google.maps.event.addListener(N,"markercomplete",i)),o&&b(google.maps.event.addListener(N,"overlaycomplete",o)),s&&O(google.maps.event.addListener(N,"polygoncomplete",s)),a&&R(google.maps.event.addListener(N,"polylinecomplete",a)),l&&V(google.maps.event.addListener(N,"rectanglecomplete",l)),y(N),u&&u(N),function(){v!==null&&(w&&google.maps.event.removeListener(w),m&&google.maps.event.removeListener(m),p&&google.maps.event.removeListener(p),M&&google.maps.event.removeListener(M),P&&google.maps.event.removeListener(P),B&&google.maps.event.removeListener(B),f&&f(v),v.setMap(null))}},[]),null}c.memo(U4);(function(t){Ue(e,t);function e(n){var r=t.call(this,n)||this;return r.registeredEvents=[],r.state={drawingManager:null},r.setDrawingManagerCallback=function(){r.state.drawingManager!==null&&r.props.onLoad&&r.props.onLoad(r.state.drawingManager)},Ye(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing),r}return e.prototype.componentDidMount=function(){var n=new google.maps.drawing.DrawingManager(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Tc,eventMap:kc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{drawingManager:n}},this.setDrawingManagerCallback)},e.prototype.componentDidUpdate=function(n){this.state.drawingManager!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Tc,eventMap:kc,prevProps:n,nextProps:this.props,instance:this.state.drawingManager}))},e.prototype.componentWillUnmount=function(){this.state.drawingManager!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),he(this.registeredEvents),this.state.drawingManager.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var Rc={onAnimationChanged:"animation_changed",onClick:"click",onClickableChanged:"clickable_changed",onCursorChanged:"cursor_changed",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDraggableChanged:"draggable_changed",onDragStart:"dragstart",onFlatChanged:"flat_changed",onIconChanged:"icon_changed",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPositionChanged:"position_changed",onRightClick:"rightclick",onShapeChanged:"shape_changed",onTitleChanged:"title_changed",onVisibleChanged:"visible_changed",onZindexChanged:"zindex_changed"},Dc={animation:function(t,e){t.setAnimation(e)},clickable:function(t,e){t.setClickable(e)},cursor:function(t,e){t.setCursor(e)},draggable:function(t,e){t.setDraggable(e)},icon:function(t,e){t.setIcon(e)},label:function(t,e){t.setLabel(e)},map:function(t,e){t.setMap(e)},opacity:function(t,e){t.setOpacity(e)},options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},shape:function(t,e){t.setShape(e)},title:function(t,e){t.setTitle(e)},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},ws={};function V4(t){var e=t.position,n=t.options,r=t.clusterer,i=t.noClustererRedraw,o=t.children,s=t.draggable,a=t.visible,l=t.animation,u=t.clickable,f=t.cursor,d=t.icon,h=t.label,v=t.opacity,y=t.shape,g=t.title,w=t.zIndex,C=t.onClick,L=t.onDblClick,m=t.onDrag,_=t.onDragEnd,E=t.onDragStart,p=t.onMouseOut,b=t.onMouseOver,x=t.onMouseUp,M=t.onMouseDown,O=t.onRightClick,T=t.onClickableChanged,P=t.onCursorChanged,R=t.onAnimationChanged,I=t.onDraggableChanged,B=t.onFlatChanged,V=t.onIconChanged,N=t.onPositionChanged,z=t.onShapeChanged,Y=t.onTitleChanged,G=t.onVisibleChanged,H=t.onZindexChanged,Q=t.onLoad,oe=t.onUnmount,te=c.useContext(le),ee=c.useState(null),D=ee[0],pe=ee[1],Pe=c.useState(null),Z=Pe[0],De=Pe[1],Ae=c.useState(null),ue=Ae[0],_e=Ae[1],Ve=c.useState(null),Ce=Ve[0],Me=Ve[1],Ie=c.useState(null),ke=Ie[0],je=Ie[1],ie=c.useState(null),We=ie[0],re=ie[1],tt=c.useState(null),q=tt[0],Ge=tt[1],ze=c.useState(null),bt=ze[0],ut=ze[1],se=c.useState(null),Hn=se[0],co=se[1],Ft=c.useState(null),un=Ft[0],fo=Ft[1],j=c.useState(null),X=j[0],W=j[1],fe=c.useState(null),Ne=fe[0],Le=fe[1],Be=c.useState(null),Te=Be[0],He=Be[1],ae=c.useState(null),ge=ae[0],pt=ae[1],cn=c.useState(null),ct=cn[0],et=cn[1],Ct=c.useState(null),wt=Ct[0],nt=Ct[1],Kt=c.useState(null),Ut=Kt[0],St=Kt[1],Cn=c.useState(null),fn=Cn[0],oi=Cn[1],si=c.useState(null),mr=si[0],ai=si[1],yr=c.useState(null),$n=yr[0],li=yr[1],wn=c.useState(null),Wn=wn[0],Gn=wn[1],Zn=c.useState(null),qn=Zn[0],ui=Zn[1];c.useEffect(function(){D!==null&&D.setMap(te)},[te]),c.useEffect(function(){typeof n<"u"&&D!==null&&D.setOptions(n)},[D,n]),c.useEffect(function(){typeof s<"u"&&D!==null&&D.setDraggable(s)},[D,s]),c.useEffect(function(){e&&D!==null&&D.setPosition(e)},[D,e]),c.useEffect(function(){typeof a<"u"&&D!==null&&D.setVisible(a)},[D,a]),c.useEffect(function(){D==null||D.setAnimation(l)},[D,l]),c.useEffect(function(){D&&u!==void 0&&D.setClickable(u)},[D,u]),c.useEffect(function(){D&&f!==void 0&&D.setCursor(f)},[D,f]),c.useEffect(function(){D&&d!==void 0&&D.setIcon(d)},[D,d]),c.useEffect(function(){D&&h!==void 0&&D.setLabel(h)},[D,h]),c.useEffect(function(){D&&v!==void 0&&D.setOpacity(v)},[D,v]),c.useEffect(function(){D&&y!==void 0&&D.setShape(y)},[D,y]),c.useEffect(function(){D&&g!==void 0&&D.setTitle(g)},[D,g]),c.useEffect(function(){D&&w!==void 0&&D.setZIndex(w)},[D,w]),c.useEffect(function(){D&&L&&(Z!==null&&google.maps.event.removeListener(Z),De(google.maps.event.addListener(D,"dblclick",L)))},[L]),c.useEffect(function(){D&&_&&(ue!==null&&google.maps.event.removeListener(ue),_e(google.maps.event.addListener(D,"dragend",_)))},[_]),c.useEffect(function(){D&&E&&(Ce!==null&&google.maps.event.removeListener(Ce),Me(google.maps.event.addListener(D,"dragstart",E)))},[E]),c.useEffect(function(){D&&M&&(ke!==null&&google.maps.event.removeListener(ke),je(google.maps.event.addListener(D,"mousedown",M)))},[M]),c.useEffect(function(){D&&p&&(We!==null&&google.maps.event.removeListener(We),re(google.maps.event.addListener(D,"mouseout",p)))},[p]),c.useEffect(function(){D&&b&&(q!==null&&google.maps.event.removeListener(q),Ge(google.maps.event.addListener(D,"mouseover",b)))},[b]),c.useEffect(function(){D&&x&&(bt!==null&&google.maps.event.removeListener(bt),ut(google.maps.event.addListener(D,"mouseup",x)))},[x]),c.useEffect(function(){D&&O&&(Hn!==null&&google.maps.event.removeListener(Hn),co(google.maps.event.addListener(D,"rightclick",O)))},[O]),c.useEffect(function(){D&&C&&(un!==null&&google.maps.event.removeListener(un),fo(google.maps.event.addListener(D,"click",C)))},[C]),c.useEffect(function(){D&&m&&(X!==null&&google.maps.event.removeListener(X),W(google.maps.event.addListener(D,"drag",m)))},[m]),c.useEffect(function(){D&&T&&(Ne!==null&&google.maps.event.removeListener(Ne),Le(google.maps.event.addListener(D,"clickable_changed",T)))},[T]),c.useEffect(function(){D&&P&&(Te!==null&&google.maps.event.removeListener(Te),He(google.maps.event.addListener(D,"cursor_changed",P)))},[P]),c.useEffect(function(){D&&R&&(ge!==null&&google.maps.event.removeListener(ge),pt(google.maps.event.addListener(D,"animation_changed",R)))},[R]),c.useEffect(function(){D&&I&&(ct!==null&&google.maps.event.removeListener(ct),et(google.maps.event.addListener(D,"draggable_changed",I)))},[I]),c.useEffect(function(){D&&B&&(wt!==null&&google.maps.event.removeListener(wt),nt(google.maps.event.addListener(D,"flat_changed",B)))},[B]),c.useEffect(function(){D&&V&&(Ut!==null&&google.maps.event.removeListener(Ut),St(google.maps.event.addListener(D,"icon_changed",V)))},[V]),c.useEffect(function(){D&&N&&(fn!==null&&google.maps.event.removeListener(fn),oi(google.maps.event.addListener(D,"position_changed",N)))},[N]),c.useEffect(function(){D&&z&&(mr!==null&&google.maps.event.removeListener(mr),ai(google.maps.event.addListener(D,"shape_changed",z)))},[z]),c.useEffect(function(){D&&Y&&($n!==null&&google.maps.event.removeListener($n),li(google.maps.event.addListener(D,"title_changed",Y)))},[Y]),c.useEffect(function(){D&&G&&(Wn!==null&&google.maps.event.removeListener(Wn),Gn(google.maps.event.addListener(D,"visible_changed",G)))},[G]),c.useEffect(function(){D&&H&&(qn!==null&&google.maps.event.removeListener(qn),ui(google.maps.event.addListener(D,"zindex_changed",H)))},[H]),c.useEffect(function(){var Sn=K(K(K({},n||ws),r?ws:{map:te}),{position:e}),ne=new google.maps.Marker(Sn);return r?r.addMarker(ne,!!i):ne.setMap(te),e&&ne.setPosition(e),typeof a<"u"&&ne.setVisible(a),typeof s<"u"&&ne.setDraggable(s),typeof u<"u"&&ne.setClickable(u),typeof f=="string"&&ne.setCursor(f),d&&ne.setIcon(d),typeof h<"u"&&ne.setLabel(h),typeof v<"u"&&ne.setOpacity(v),y&&ne.setShape(y),typeof g=="string"&&ne.setTitle(g),typeof w=="number"&&ne.setZIndex(w),L&&De(google.maps.event.addListener(ne,"dblclick",L)),_&&_e(google.maps.event.addListener(ne,"dragend",_)),E&&Me(google.maps.event.addListener(ne,"dragstart",E)),M&&je(google.maps.event.addListener(ne,"mousedown",M)),p&&re(google.maps.event.addListener(ne,"mouseout",p)),b&&Ge(google.maps.event.addListener(ne,"mouseover",b)),x&&ut(google.maps.event.addListener(ne,"mouseup",x)),O&&co(google.maps.event.addListener(ne,"rightclick",O)),C&&fo(google.maps.event.addListener(ne,"click",C)),m&&W(google.maps.event.addListener(ne,"drag",m)),T&&Le(google.maps.event.addListener(ne,"clickable_changed",T)),P&&He(google.maps.event.addListener(ne,"cursor_changed",P)),R&&pt(google.maps.event.addListener(ne,"animation_changed",R)),I&&et(google.maps.event.addListener(ne,"draggable_changed",I)),B&&nt(google.maps.event.addListener(ne,"flat_changed",B)),V&&St(google.maps.event.addListener(ne,"icon_changed",V)),N&&oi(google.maps.event.addListener(ne,"position_changed",N)),z&&ai(google.maps.event.addListener(ne,"shape_changed",z)),Y&&li(google.maps.event.addListener(ne,"title_changed",Y)),G&&Gn(google.maps.event.addListener(ne,"visible_changed",G)),H&&ui(google.maps.event.addListener(ne,"zindex_changed",H)),pe(ne),Q&&Q(ne),function(){Z!==null&&google.maps.event.removeListener(Z),ue!==null&&google.maps.event.removeListener(ue),Ce!==null&&google.maps.event.removeListener(Ce),ke!==null&&google.maps.event.removeListener(ke),We!==null&&google.maps.event.removeListener(We),q!==null&&google.maps.event.removeListener(q),bt!==null&&google.maps.event.removeListener(bt),Hn!==null&&google.maps.event.removeListener(Hn),un!==null&&google.maps.event.removeListener(un),Ne!==null&&google.maps.event.removeListener(Ne),Te!==null&&google.maps.event.removeListener(Te),ge!==null&&google.maps.event.removeListener(ge),ct!==null&&google.maps.event.removeListener(ct),wt!==null&&google.maps.event.removeListener(wt),Ut!==null&&google.maps.event.removeListener(Ut),fn!==null&&google.maps.event.removeListener(fn),$n!==null&&google.maps.event.removeListener($n),Wn!==null&&google.maps.event.removeListener(Wn),qn!==null&&google.maps.event.removeListener(qn),oe&&oe(ne),r?r.removeMarker(ne,!!i):ne&&ne.setMap(null)}},[]);var ci=c.useMemo(function(){return o?c.Children.map(o,function(Sn){if(!c.isValidElement(Sn))return Sn;var ne=Sn;return c.cloneElement(ne,{anchor:D})}):null},[o,D]);return S.jsx(S.Fragment,{children:ci})||null}c.memo(V4);var up=function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=K(K(K({},this.props.options||ws),this.props.clusterer?ws:{map:this.context}),{position:this.props.position});this.marker=new google.maps.Marker(n),this.props.clusterer?this.props.clusterer.addMarker(this.marker,!!this.props.noClustererRedraw):this.marker.setMap(this.context),this.registeredEvents=ce({updaterMap:Dc,eventMap:Rc,prevProps:{},nextProps:this.props,instance:this.marker}),this.props.onLoad&&this.props.onLoad(this.marker)},e.prototype.componentDidUpdate=function(n){this.marker&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Dc,eventMap:Rc,prevProps:n,nextProps:this.props,instance:this.marker}))},e.prototype.componentWillUnmount=function(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),he(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))},e.prototype.render=function(){var n=this,r=null;return this.props.children&&(r=c.Children.map(this.props.children,function(i){if(!c.isValidElement(i))return i;var o=i;return c.cloneElement(o,{anchor:n.marker})})),r||null},e.contextType=le,e}(c.PureComponent),z4=function(){function t(e,n){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=n,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.cMouseDownInCluster=null,this.cDraggingMapByCluster=null,this.timeOut=null,this.setMap(e.getMap()),this.onBoundsChanged=this.onBoundsChanged.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onClick=this.onClick.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onAdd=this.onAdd.bind(this),this.onRemove=this.onRemove.bind(this),this.draw=this.draw.bind(this),this.hide=this.hide.bind(this),this.show=this.show.bind(this),this.useStyle=this.useStyle.bind(this),this.setCenter=this.setCenter.bind(this),this.getPosFromLatLng=this.getPosFromLatLng.bind(this)}return t.prototype.onBoundsChanged=function(){this.cDraggingMapByCluster=this.cMouseDownInCluster},t.prototype.onMouseDown=function(){this.cMouseDownInCluster=!0,this.cDraggingMapByCluster=!1},t.prototype.onClick=function(e){if(this.cMouseDownInCluster=!1,!this.cDraggingMapByCluster){var n=this.cluster.getClusterer();if(google.maps.event.trigger(n,"click",this.cluster),google.maps.event.trigger(n,"clusterclick",this.cluster),n.getZoomOnClick()){var r=n.getMaxZoom(),i=this.cluster.getBounds(),o=n.getMap();o!==null&&"fitBounds"in o&&o.fitBounds(i),this.timeOut=window.setTimeout(function(){var s=n.getMap();if(s!==null){"fitBounds"in s&&s.fitBounds(i);var a=s.getZoom()||0;r!==null&&a>r&&s.setZoom(r+1)}},100)}e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}},t.prototype.onMouseOver=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseover",this.cluster)},t.prototype.onMouseOut=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseout",this.cluster)},t.prototype.onAdd=function(){var e;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),(e=this.getPanes())===null||e===void 0||e.overlayMouseTarget.appendChild(this.div);var n=this.getMap();n!==null&&(this.boundsChangedListener=google.maps.event.addListener(n,"bounds_changed",this.onBoundsChanged),this.div.addEventListener("mousedown",this.onMouseDown),this.div.addEventListener("click",this.onClick),this.div.addEventListener("mouseover",this.onMouseOver),this.div.addEventListener("mouseout",this.onMouseOut))},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),this.boundsChangedListener!==null&&google.maps.event.removeListener(this.boundsChangedListener),this.div.removeEventListener("mousedown",this.onMouseDown),this.div.removeEventListener("click",this.onClick),this.div.removeEventListener("mouseover",this.onMouseOver),this.div.removeEventListener("mouseout",this.onMouseOut),this.div.parentNode.removeChild(this.div),this.timeOut!==null&&(window.clearTimeout(this.timeOut),this.timeOut=null),this.div=null)},t.prototype.draw=function(){if(this.visible&&this.div!==null&&this.center){var e=this.getPosFromLatLng(this.center);this.div.style.top=e!==null?"".concat(e.y,"px"):"0",this.div.style.left=e!==null?"".concat(e.x,"px"):"0"}},t.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},t.prototype.show=function(){var e,n,r,i,o,s;if(this.div&&this.center){var a=this.sums===null||typeof this.sums.title>"u"||this.sums.title===""?this.cluster.getClusterer().getTitle():this.sums.title,l=this.backgroundPosition.split(" "),u=parseInt(((e=l[0])===null||e===void 0?void 0:e.replace(/^\s+|\s+$/g,""))||"0",10),f=parseInt(((n=l[1])===null||n===void 0?void 0:n.replace(/^\s+|\s+$/g,""))||"0",10),d=this.getPosFromLatLng(this.center);this.div.className=this.className,this.div.setAttribute("style","cursor: pointer; position: absolute; top: ".concat(d!==null?"".concat(d.y,"px"):"0","; left: ").concat(d!==null?"".concat(d.x,"px"):"0","; width: ").concat(this.width,"px; height: ").concat(this.height,"px; "));var h=document.createElement("img");h.alt=a,h.src=this.url,h.width=this.width,h.height=this.height,h.setAttribute("style","position: absolute; top: ".concat(f,"px; left: ").concat(u,"px")),this.cluster.getClusterer().enableRetinaIcons||(h.style.clip="rect(-".concat(f,"px, -").concat(u+this.width,"px, -").concat(f+this.height,", -").concat(u,")"));var v=document.createElement("div");v.setAttribute("style","position: absolute; top: ".concat(this.anchorText[0],"px; left: ").concat(this.anchorText[1],"px; color: ").concat(this.textColor,"; font-size: ").concat(this.textSize,"px; font-family: ").concat(this.fontFamily,"; font-weight: ").concat(this.fontWeight,"; fontStyle: ").concat(this.fontStyle,"; text-decoration: ").concat(this.textDecoration,"; text-align: center; width: ").concat(this.width,"px; line-height: ").concat(this.height,"px")),!((r=this.sums)===null||r===void 0)&&r.text&&(v.innerText="".concat((i=this.sums)===null||i===void 0?void 0:i.text)),!((o=this.sums)===null||o===void 0)&&o.html&&(v.innerHTML="".concat((s=this.sums)===null||s===void 0?void 0:s.html)),this.div.innerHTML="",this.div.appendChild(h),this.div.appendChild(v),this.div.title=a,this.div.style.display=""}this.visible=!0},t.prototype.useStyle=function(e){this.sums=e;var n=this.cluster.getClusterer().getStyles(),r=n[Math.min(n.length-1,Math.max(0,e.index-1))];r&&(this.url=r.url,this.height=r.height,this.width=r.width,r.className&&(this.className="".concat(this.clusterClassName," ").concat(r.className)),this.anchorText=r.anchorText||[0,0],this.anchorIcon=r.anchorIcon||[this.height/2,this.width/2],this.textColor=r.textColor||"black",this.textSize=r.textSize||11,this.textDecoration=r.textDecoration||"none",this.fontWeight=r.fontWeight||"bold",this.fontStyle=r.fontStyle||"normal",this.fontFamily=r.fontFamily||"Arial,sans-serif",this.backgroundPosition=r.backgroundPosition||"0 0")},t.prototype.setCenter=function(e){this.center=e},t.prototype.getPosFromLatLng=function(e){var n=this.getProjection().fromLatLngToDivPixel(e);return n!==null&&(n.x-=this.anchorIcon[1],n.y-=this.anchorIcon[0]),n},t}(),H4=function(){function t(e){this.markerClusterer=e,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new z4(this,this.markerClusterer.getStyles()),this.getSize=this.getSize.bind(this),this.getMarkers=this.getMarkers.bind(this),this.getCenter=this.getCenter.bind(this),this.getMap=this.getMap.bind(this),this.getClusterer=this.getClusterer.bind(this),this.getBounds=this.getBounds.bind(this),this.remove=this.remove.bind(this),this.addMarker=this.addMarker.bind(this),this.isMarkerInClusterBounds=this.isMarkerInClusterBounds.bind(this),this.calculateBounds=this.calculateBounds.bind(this),this.updateIcon=this.updateIcon.bind(this),this.isMarkerAlreadyAdded=this.isMarkerAlreadyAdded.bind(this)}return t.prototype.getSize=function(){return this.markers.length},t.prototype.getMarkers=function(){return this.markers},t.prototype.getCenter=function(){return this.center},t.prototype.getMap=function(){return this.map},t.prototype.getClusterer=function(){return this.markerClusterer},t.prototype.getBounds=function(){for(var e=new google.maps.LatLngBounds(this.center,this.center),n=this.getMarkers(),r=0,i=n;r<i.length;r++){var o=i[r],s=o.getPosition();s&&e.extend(s)}return e},t.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},t.prototype.addMarker=function(e){var n;if(this.isMarkerAlreadyAdded(e))return!1;if(this.center){if(this.averageCenter){var r=e.getPosition();if(r){var i=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(i-1)+r.lat())/i,(this.center.lng()*(i-1)+r.lng())/i),this.calculateBounds()}}}else{var r=e.getPosition();r&&(this.center=r,this.calculateBounds())}e.isAdded=!0,this.markers.push(e);var o=this.markers.length,s=this.markerClusterer.getMaxZoom(),a=(n=this.map)===null||n===void 0?void 0:n.getZoom();if(s!==null&&typeof a<"u"&&a>s)e.getMap()!==this.map&&e.setMap(this.map);else if(o<this.minClusterSize)e.getMap()!==this.map&&e.setMap(this.map);else if(o===this.minClusterSize)for(var l=0,u=this.markers;l<u.length;l++){var f=u[l];f.setMap(null)}else e.setMap(null);return!0},t.prototype.isMarkerInClusterBounds=function(e){if(this.bounds!==null){var n=e.getPosition();if(n)return this.bounds.contains(n)}return!1},t.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},t.prototype.updateIcon=function(){var e,n=this.markers.length,r=this.markerClusterer.getMaxZoom(),i=(e=this.map)===null||e===void 0?void 0:e.getZoom();if(r!==null&&typeof i<"u"&&i>r){this.clusterIcon.hide();return}if(n<this.minClusterSize){this.clusterIcon.hide();return}this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show()},t.prototype.isMarkerAlreadyAdded=function(e){if(this.markers.includes)return this.markers.includes(e);for(var n=0;n<this.markers.length;n++)if(e===this.markers[n])return!0;return!1},t}();function $4(t,e){var n=t.length,r=n.toString().length,i=Math.min(r,e);return{text:n.toString(),index:i,title:""}}var W4=2e3,G4=500,Z4="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",q4="png",K4=[53,56,66,78,90],Q4="cluster",cp=function(){function t(e,n,r){n===void 0&&(n=[]),r===void 0&&(r={}),this.getMinimumClusterSize=this.getMinimumClusterSize.bind(this),this.setMinimumClusterSize=this.setMinimumClusterSize.bind(this),this.getEnableRetinaIcons=this.getEnableRetinaIcons.bind(this),this.setEnableRetinaIcons=this.setEnableRetinaIcons.bind(this),this.addToClosestCluster=this.addToClosestCluster.bind(this),this.getImageExtension=this.getImageExtension.bind(this),this.setImageExtension=this.setImageExtension.bind(this),this.getExtendedBounds=this.getExtendedBounds.bind(this),this.getAverageCenter=this.getAverageCenter.bind(this),this.setAverageCenter=this.setAverageCenter.bind(this),this.getTotalClusters=this.getTotalClusters.bind(this),this.fitMapToMarkers=this.fitMapToMarkers.bind(this),this.getIgnoreHidden=this.getIgnoreHidden.bind(this),this.setIgnoreHidden=this.setIgnoreHidden.bind(this),this.getClusterClass=this.getClusterClass.bind(this),this.setClusterClass=this.setClusterClass.bind(this),this.getTotalMarkers=this.getTotalMarkers.bind(this),this.getZoomOnClick=this.getZoomOnClick.bind(this),this.setZoomOnClick=this.setZoomOnClick.bind(this),this.getBatchSizeIE=this.getBatchSizeIE.bind(this),this.setBatchSizeIE=this.setBatchSizeIE.bind(this),this.createClusters=this.createClusters.bind(this),this.onZoomChanged=this.onZoomChanged.bind(this),this.getImageSizes=this.getImageSizes.bind(this),this.setImageSizes=this.setImageSizes.bind(this),this.getCalculator=this.getCalculator.bind(this),this.setCalculator=this.setCalculator.bind(this),this.removeMarkers=this.removeMarkers.bind(this),this.resetViewport=this.resetViewport.bind(this),this.getImagePath=this.getImagePath.bind(this),this.setImagePath=this.setImagePath.bind(this),this.pushMarkerTo=this.pushMarkerTo.bind(this),this.removeMarker=this.removeMarker.bind(this),this.clearMarkers=this.clearMarkers.bind(this),this.setupStyles=this.setupStyles.bind(this),this.getGridSize=this.getGridSize.bind(this),this.setGridSize=this.setGridSize.bind(this),this.getClusters=this.getClusters.bind(this),this.getMaxZoom=this.getMaxZoom.bind(this),this.setMaxZoom=this.setMaxZoom.bind(this),this.getMarkers=this.getMarkers.bind(this),this.addMarkers=this.addMarkers.bind(this),this.getStyles=this.getStyles.bind(this),this.setStyles=this.setStyles.bind(this),this.addMarker=this.addMarker.bind(this),this.onRemove=this.onRemove.bind(this),this.getTitle=this.getTitle.bind(this),this.setTitle=this.setTitle.bind(this),this.repaint=this.repaint.bind(this),this.onIdle=this.onIdle.bind(this),this.redraw=this.redraw.bind(this),this.onAdd=this.onAdd.bind(this),this.draw=this.draw.bind(this),this.extend=this.extend.bind(this),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=r.gridSize||60,this.minClusterSize=r.minimumClusterSize||2,this.maxZoom=r.maxZoom||null,this.styles=r.styles||[],this.title=r.title||"",this.zoomOnClick=!0,r.zoomOnClick!==void 0&&(this.zoomOnClick=r.zoomOnClick),this.averageCenter=!1,r.averageCenter!==void 0&&(this.averageCenter=r.averageCenter),this.ignoreHidden=!1,r.ignoreHidden!==void 0&&(this.ignoreHidden=r.ignoreHidden),this.enableRetinaIcons=!1,r.enableRetinaIcons!==void 0&&(this.enableRetinaIcons=r.enableRetinaIcons),this.imagePath=r.imagePath||Z4,this.imageExtension=r.imageExtension||q4,this.imageSizes=r.imageSizes||K4,this.calculator=r.calculator||$4,this.batchSize=r.batchSize||W4,this.batchSizeIE=r.batchSizeIE||G4,this.clusterClass=r.clusterClass||Q4,navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(n,!0),this.setMap(e)}return t.prototype.onZoomChanged=function(){var e,n;this.resetViewport(!1),(((e=this.getMap())===null||e===void 0?void 0:e.getZoom())===(this.get("minZoom")||0)||((n=this.getMap())===null||n===void 0?void 0:n.getZoom())===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")},t.prototype.onIdle=function(){this.redraw()},t.prototype.onAdd=function(){var e=this.getMap();this.activeMap=e,this.ready=!0,this.repaint(),e!==null&&(this.listeners=[google.maps.event.addListener(e,"zoom_changed",this.onZoomChanged),google.maps.event.addListener(e,"idle",this.onIdle)])},t.prototype.onRemove=function(){for(var e=0,n=this.markers;e<n.length;e++){var r=n[e];r.getMap()!==this.activeMap&&r.setMap(this.activeMap)}for(var i=0,o=this.clusters;i<o.length;i++){var s=o[i];s.remove()}this.clusters=[];for(var a=0,l=this.listeners;a<l.length;a++){var u=l[a];google.maps.event.removeListener(u)}this.listeners=[],this.activeMap=null,this.ready=!1},t.prototype.draw=function(){},t.prototype.getMap=function(){return null},t.prototype.getPanes=function(){return null},t.prototype.getProjection=function(){return{fromContainerPixelToLatLng:function(){return null},fromDivPixelToLatLng:function(){return null},fromLatLngToContainerPixel:function(){return null},fromLatLngToDivPixel:function(){return null},getVisibleRegion:function(){return null},getWorldWidth:function(){return 0}}},t.prototype.setMap=function(){},t.prototype.addListener=function(){return{remove:function(){}}},t.prototype.bindTo=function(){},t.prototype.get=function(){},t.prototype.notify=function(){},t.prototype.set=function(){},t.prototype.setValues=function(){},t.prototype.unbind=function(){},t.prototype.unbindAll=function(){},t.prototype.setupStyles=function(){if(!(this.styles.length>0))for(var e=0;e<this.imageSizes.length;e++)this.styles.push({url:"".concat(this.imagePath+(e+1),".").concat(this.imageExtension),height:this.imageSizes[e]||0,width:this.imageSizes[e]||0})},t.prototype.fitMapToMarkers=function(){for(var e=this.getMarkers(),n=new google.maps.LatLngBounds,r=0,i=e;r<i.length;r++){var o=i[r],s=o.getPosition();s&&n.extend(s)}var a=this.getMap();a!==null&&"fitBounds"in a&&a.fitBounds(n)},t.prototype.getGridSize=function(){return this.gridSize},t.prototype.setGridSize=function(e){this.gridSize=e},t.prototype.getMinimumClusterSize=function(){return this.minClusterSize},t.prototype.setMinimumClusterSize=function(e){this.minClusterSize=e},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.setMaxZoom=function(e){this.maxZoom=e},t.prototype.getStyles=function(){return this.styles},t.prototype.setStyles=function(e){this.styles=e},t.prototype.getTitle=function(){return this.title},t.prototype.setTitle=function(e){this.title=e},t.prototype.getZoomOnClick=function(){return this.zoomOnClick},t.prototype.setZoomOnClick=function(e){this.zoomOnClick=e},t.prototype.getAverageCenter=function(){return this.averageCenter},t.prototype.setAverageCenter=function(e){this.averageCenter=e},t.prototype.getIgnoreHidden=function(){return this.ignoreHidden},t.prototype.setIgnoreHidden=function(e){this.ignoreHidden=e},t.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},t.prototype.setEnableRetinaIcons=function(e){this.enableRetinaIcons=e},t.prototype.getImageExtension=function(){return this.imageExtension},t.prototype.setImageExtension=function(e){this.imageExtension=e},t.prototype.getImagePath=function(){return this.imagePath},t.prototype.setImagePath=function(e){this.imagePath=e},t.prototype.getImageSizes=function(){return this.imageSizes},t.prototype.setImageSizes=function(e){this.imageSizes=e},t.prototype.getCalculator=function(){return this.calculator},t.prototype.setCalculator=function(e){this.calculator=e},t.prototype.getBatchSizeIE=function(){return this.batchSizeIE},t.prototype.setBatchSizeIE=function(e){this.batchSizeIE=e},t.prototype.getClusterClass=function(){return this.clusterClass},t.prototype.setClusterClass=function(e){this.clusterClass=e},t.prototype.getMarkers=function(){return this.markers},t.prototype.getTotalMarkers=function(){return this.markers.length},t.prototype.getClusters=function(){return this.clusters},t.prototype.getTotalClusters=function(){return this.clusters.length},t.prototype.addMarker=function(e,n){this.pushMarkerTo(e),n||this.redraw()},t.prototype.addMarkers=function(e,n){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=e[r];i&&this.pushMarkerTo(i)}n||this.redraw()},t.prototype.pushMarkerTo=function(e){var n=this;e.getDraggable()&&google.maps.event.addListener(e,"dragend",function(){n.ready&&(e.isAdded=!1,n.repaint())}),e.isAdded=!1,this.markers.push(e)},t.prototype.removeMarker_=function(e){var n=-1;if(this.markers.indexOf)n=this.markers.indexOf(e);else for(var r=0;r<this.markers.length;r++)if(e===this.markers[r]){n=r;break}return n===-1?!1:(e.setMap(null),this.markers.splice(n,1),!0)},t.prototype.removeMarker=function(e,n){var r=this.removeMarker_(e);return!n&&r&&this.repaint(),r},t.prototype.removeMarkers=function(e,n){for(var r=!1,i=0,o=e;i<o.length;i++){var s=o[i];r=r||this.removeMarker_(s)}return!n&&r&&this.repaint(),r},t.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},t.prototype.repaint=function(){var e=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout(function(){for(var r=0,i=e;r<i.length;r++){var o=i[r];o.remove()}},0)},t.prototype.getExtendedBounds=function(e){var n=this.getProjection(),r=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getNorthEast().lat(),e.getNorthEast().lng()));r!==null&&(r.x+=this.gridSize,r.y-=this.gridSize);var i=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getSouthWest().lat(),e.getSouthWest().lng()));if(i!==null&&(i.x-=this.gridSize,i.y+=this.gridSize),r!==null){var o=n.fromDivPixelToLatLng(r);o!==null&&e.extend(o)}if(i!==null){var s=n.fromDivPixelToLatLng(i);s!==null&&e.extend(s)}return e},t.prototype.redraw=function(){this.createClusters(0)},t.prototype.resetViewport=function(e){for(var n=0,r=this.clusters;n<r.length;n++){var i=r[n];i.remove()}this.clusters=[];for(var o=0,s=this.markers;o<s.length;o++){var a=s[o];a.isAdded=!1,e&&a.setMap(null)}},t.prototype.distanceBetweenPoints=function(e,n){var r=6371,i=(n.lat()-e.lat())*Math.PI/180,o=(n.lng()-e.lng())*Math.PI/180,s=Math.sin(i/2)*Math.sin(i/2)+Math.cos(e.lat()*Math.PI/180)*Math.cos(n.lat()*Math.PI/180)*Math.sin(o/2)*Math.sin(o/2);return r*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))},t.prototype.isMarkerInBounds=function(e,n){var r=e.getPosition();return r?n.contains(r):!1},t.prototype.addToClosestCluster=function(e){for(var n,r=4e4,i=null,o=0,s=this.clusters;o<s.length;o++){var a=s[o];n=a;var l=n.getCenter(),u=e.getPosition();if(l&&u){var f=this.distanceBetweenPoints(l,u);f<r&&(r=f,i=n)}}i&&i.isMarkerInClusterBounds(e)?i.addMarker(e):(n=new H4(this),n.addMarker(e),this.clusters.push(n))},t.prototype.createClusters=function(e){var n=this;if(this.ready){e===0&&(google.maps.event.trigger(this,"clusteringbegin",this),this.timerRefStatic!==null&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var r=this.getMap(),i=r!==null&&("getBounds"in r)?r.getBounds():null,o=(r==null?void 0:r.getZoom())||0,s=o>3?new google.maps.LatLngBounds(i==null?void 0:i.getSouthWest(),i==null?void 0:i.getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),a=this.getExtendedBounds(s),l=Math.min(e+this.batchSize,this.markers.length),u=e;u<l;u++){var f=this.markers[u];f&&!f.isAdded&&this.isMarkerInBounds(f,a)&&(!this.ignoreHidden||this.ignoreHidden&&f.getVisible())&&this.addToClosestCluster(f)}if(l<this.markers.length)this.timerRefStatic=window.setTimeout(function(){n.createClusters(l)},0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(var d=0,h=this.clusters;d<h.length;d++){var v=h[d];v.updateIcon()}}}},t.prototype.extend=function(e,n){return(function(i){for(var o in i.prototype){var s=o;this.prototype[s]=i.prototype[s]}return this}).apply(e,[n])},t}(),Rt={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},xe={averageCenter:function(t,e){t.setAverageCenter(e)},batchSizeIE:function(t,e){t.setBatchSizeIE(e)},calculator:function(t,e){t.setCalculator(e)},clusterClass:function(t,e){t.setClusterClass(e)},enableRetinaIcons:function(t,e){t.setEnableRetinaIcons(e)},gridSize:function(t,e){t.setGridSize(e)},ignoreHidden:function(t,e){t.setIgnoreHidden(e)},imageExtension:function(t,e){t.setImageExtension(e)},imagePath:function(t,e){t.setImagePath(e)},imageSizes:function(t,e){t.setImageSizes(e)},maxZoom:function(t,e){t.setMaxZoom(e)},minimumClusterSize:function(t,e){t.setMinimumClusterSize(e)},styles:function(t,e){t.setStyles(e)},title:function(t,e){t.setTitle(e)},zoomOnClick:function(t,e){t.setZoomOnClick(e)}},J4={};function Y4(t){var e=t.children,n=t.options,r=t.averageCenter,i=t.batchSizeIE,o=t.calculator,s=t.clusterClass,a=t.enableRetinaIcons,l=t.gridSize,u=t.ignoreHidden,f=t.imageExtension,d=t.imagePath,h=t.imageSizes,v=t.maxZoom,y=t.minimumClusterSize,g=t.styles,w=t.title,C=t.zoomOnClick,L=t.onClick,m=t.onClusteringBegin,_=t.onClusteringEnd,E=t.onMouseOver,p=t.onMouseOut,b=t.onLoad,x=t.onUnmount,M=c.useState(null),O=M[0],T=M[1],P=c.useContext(le),R=c.useState(null),I=R[0],B=R[1],V=c.useState(null),N=V[0],z=V[1],Y=c.useState(null),G=Y[0],H=Y[1],Q=c.useState(null),oe=Q[0],te=Q[1],ee=c.useState(null),D=ee[0],pe=ee[1];return c.useEffect(function(){O&&p&&(oe!==null&&google.maps.event.removeListener(oe),te(google.maps.event.addListener(O,Rt.onMouseOut,p)))},[p]),c.useEffect(function(){O&&E&&(D!==null&&google.maps.event.removeListener(D),pe(google.maps.event.addListener(O,Rt.onMouseOver,E)))},[E]),c.useEffect(function(){O&&L&&(I!==null&&google.maps.event.removeListener(I),B(google.maps.event.addListener(O,Rt.onClick,L)))},[L]),c.useEffect(function(){O&&m&&(N!==null&&google.maps.event.removeListener(N),z(google.maps.event.addListener(O,Rt.onClusteringBegin,m)))},[m]),c.useEffect(function(){O&&_&&(G!==null&&google.maps.event.removeListener(G),z(google.maps.event.addListener(O,Rt.onClusteringEnd,_)))},[_]),c.useEffect(function(){typeof r<"u"&&O!==null&&xe.averageCenter(O,r)},[O,r]),c.useEffect(function(){typeof i<"u"&&O!==null&&xe.batchSizeIE(O,i)},[O,i]),c.useEffect(function(){typeof o<"u"&&O!==null&&xe.calculator(O,o)},[O,o]),c.useEffect(function(){typeof s<"u"&&O!==null&&xe.clusterClass(O,s)},[O,s]),c.useEffect(function(){typeof a<"u"&&O!==null&&xe.enableRetinaIcons(O,a)},[O,a]),c.useEffect(function(){typeof l<"u"&&O!==null&&xe.gridSize(O,l)},[O,l]),c.useEffect(function(){typeof u<"u"&&O!==null&&xe.ignoreHidden(O,u)},[O,u]),c.useEffect(function(){typeof f<"u"&&O!==null&&xe.imageExtension(O,f)},[O,f]),c.useEffect(function(){typeof d<"u"&&O!==null&&xe.imagePath(O,d)},[O,d]),c.useEffect(function(){typeof h<"u"&&O!==null&&xe.imageSizes(O,h)},[O,h]),c.useEffect(function(){typeof v<"u"&&O!==null&&xe.maxZoom(O,v)},[O,v]),c.useEffect(function(){typeof y<"u"&&O!==null&&xe.minimumClusterSize(O,y)},[O,y]),c.useEffect(function(){typeof g<"u"&&O!==null&&xe.styles(O,g)},[O,g]),c.useEffect(function(){typeof w<"u"&&O!==null&&xe.title(O,w)},[O,w]),c.useEffect(function(){typeof C<"u"&&O!==null&&xe.zoomOnClick(O,C)},[O,C]),c.useEffect(function(){if(P){var Pe=K({},n||J4),Z=new cp(P,[],Pe);return r&&xe.averageCenter(Z,r),i&&xe.batchSizeIE(Z,i),o&&xe.calculator(Z,o),s&&xe.clusterClass(Z,s),a&&xe.enableRetinaIcons(Z,a),l&&xe.gridSize(Z,l),u&&xe.ignoreHidden(Z,u),f&&xe.imageExtension(Z,f),d&&xe.imagePath(Z,d),h&&xe.imageSizes(Z,h),v&&xe.maxZoom(Z,v),y&&xe.minimumClusterSize(Z,y),g&&xe.styles(Z,g),w&&xe.title(Z,w),C&&xe.zoomOnClick(Z,C),p&&te(google.maps.event.addListener(Z,Rt.onMouseOut,p)),E&&pe(google.maps.event.addListener(Z,Rt.onMouseOver,E)),L&&B(google.maps.event.addListener(Z,Rt.onClick,L)),m&&z(google.maps.event.addListener(Z,Rt.onClusteringBegin,m)),_&&H(google.maps.event.addListener(Z,Rt.onClusteringEnd,_)),T(Z),b&&b(Z),function(){oe!==null&&google.maps.event.removeListener(oe),D!==null&&google.maps.event.removeListener(D),I!==null&&google.maps.event.removeListener(I),N!==null&&google.maps.event.removeListener(N),G!==null&&google.maps.event.removeListener(G),x&&x(Z)}}},[]),O!==null&&e(O)||null}c.memo(Y4);var X4=function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={markerClusterer:null},n.setClustererCallback=function(){n.state.markerClusterer!==null&&n.props.onLoad&&n.props.onLoad(n.state.markerClusterer)},n}return e.prototype.componentDidMount=function(){if(this.context){var n=new cp(this.context,[],this.props.options);this.registeredEvents=ce({updaterMap:xe,eventMap:Rt,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{markerClusterer:n}},this.setClustererCallback)}},e.prototype.componentDidUpdate=function(n){this.state.markerClusterer&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:xe,eventMap:Rt,prevProps:n,nextProps:this.props,instance:this.state.markerClusterer}))},e.prototype.componentWillUnmount=function(){this.state.markerClusterer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),he(this.registeredEvents),this.state.markerClusterer.setMap(null))},e.prototype.render=function(){return this.state.markerClusterer!==null?this.props.children(this.state.markerClusterer):null},e.contextType=le,e}(c.PureComponent);function Ac(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}var fp=function(){function t(e){e===void 0&&(e={}),this.getCloseClickHandler=this.getCloseClickHandler.bind(this),this.closeClickHandler=this.closeClickHandler.bind(this),this.createInfoBoxDiv=this.createInfoBoxDiv.bind(this),this.addClickHandler=this.addClickHandler.bind(this),this.getCloseBoxImg=this.getCloseBoxImg.bind(this),this.getBoxWidths=this.getBoxWidths.bind(this),this.setBoxStyle=this.setBoxStyle.bind(this),this.setPosition=this.setPosition.bind(this),this.getPosition=this.getPosition.bind(this),this.setOptions=this.setOptions.bind(this),this.setContent=this.setContent.bind(this),this.setVisible=this.setVisible.bind(this),this.getContent=this.getContent.bind(this),this.getVisible=this.getVisible.bind(this),this.setZIndex=this.setZIndex.bind(this),this.getZIndex=this.getZIndex.bind(this),this.onRemove=this.onRemove.bind(this),this.panBox=this.panBox.bind(this),this.extend=this.extend.bind(this),this.close=this.close.bind(this),this.draw=this.draw.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.open=this.open.bind(this),this.extend(t,google.maps.OverlayView),this.content=e.content||"",this.disableAutoPan=e.disableAutoPan||!1,this.maxWidth=e.maxWidth||0,this.pixelOffset=e.pixelOffset||new google.maps.Size(0,0),this.position=e.position||new google.maps.LatLng(0,0),this.zIndex=e.zIndex||null,this.boxClass=e.boxClass||"infoBox",this.boxStyle=e.boxStyle||{},this.closeBoxMargin=e.closeBoxMargin||"2px",this.closeBoxURL=e.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",e.closeBoxURL===""&&(this.closeBoxURL=""),this.infoBoxClearance=e.infoBoxClearance||new google.maps.Size(1,1),typeof e.visible>"u"&&(typeof e.isHidden>"u"?e.visible=!0:e.visible=!e.isHidden),this.isHidden=!e.visible,this.alignBottom=e.alignBottom||!1,this.pane=e.pane||"floatPane",this.enableEventPropagation=e.enableEventPropagation||!1,this.div=null,this.closeListener=null,this.moveListener=null,this.mapListener=null,this.contextListener=null,this.eventListeners=null,this.fixedWidthSet=null}return t.prototype.createInfoBoxDiv=function(){var e=this,n=function(u){u.returnValue=!1,u.preventDefault&&u.preventDefault(),e.enableEventPropagation||Ac(u)};if(!this.div){this.div=document.createElement("div"),this.setBoxStyle(),typeof this.content=="string"?this.div.innerHTML=this.getCloseBoxImg()+this.content:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(this.content));var r=this.getPanes();if(r!==null&&r[this.pane].appendChild(this.div),this.addClickHandler(),this.div.style.width)this.fixedWidthSet=!0;else if(this.maxWidth!==0&&this.div.offsetWidth>this.maxWidth)this.div.style.width=this.maxWidth+"px",this.fixedWidthSet=!0;else{var i=this.getBoxWidths();this.div.style.width=this.div.offsetWidth-i.left-i.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var o=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],s=0,a=o;s<a.length;s++){var l=a[s];this.eventListeners.push(google.maps.event.addListener(this.div,l,Ac))}this.eventListeners.push(google.maps.event.addListener(this.div,"mouseover",function(){e.div&&(e.div.style.cursor="default")}))}this.contextListener=google.maps.event.addListener(this.div,"contextmenu",n),google.maps.event.trigger(this,"domready")}},t.prototype.getCloseBoxImg=function(){var e="";return this.closeBoxURL!==""&&(e='<img alt=""',e+=' aria-hidden="true"',e+=" src='"+this.closeBoxURL+"'",e+=" align=right",e+=" style='",e+=" position: relative;",e+=" cursor: pointer;",e+=" margin: "+this.closeBoxMargin+";",e+="'>"),e},t.prototype.addClickHandler=function(){this.closeListener=this.div&&this.div.firstChild&&this.closeBoxURL!==""?google.maps.event.addListener(this.div.firstChild,"click",this.getCloseClickHandler()):null},t.prototype.closeClickHandler=function(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation(),google.maps.event.trigger(this,"closeclick"),this.close()},t.prototype.getCloseClickHandler=function(){return this.closeClickHandler},t.prototype.panBox=function(e){if(this.div&&!e){var n=this.getMap();if(n instanceof google.maps.Map){var r=0,i=0,o=n.getBounds();o&&!o.contains(this.position)&&n.setCenter(this.position);var s=n.getDiv(),a=s.offsetWidth,l=s.offsetHeight,u=this.pixelOffset.width,f=this.pixelOffset.height,d=this.div.offsetWidth,h=this.div.offsetHeight,v=this.infoBoxClearance.width,y=this.infoBoxClearance.height,g=this.getProjection(),w=g.fromLatLngToContainerPixel(this.position);w!==null&&(w.x<-u+v?r=w.x+u-v:w.x+d+u+v>a&&(r=w.x+d+u+v-a),this.alignBottom?w.y<-f+y+h?i=w.y+f-y-h:w.y+f+y>l&&(i=w.y+f+y-l):w.y<-f+y?i=w.y+f-y:w.y+h+f+y>l&&(i=w.y+h+f+y-l)),r===0&&i===0||n.panBy(r,i)}}},t.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var e=this.boxStyle;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(this.div.style[n]=e[n]);if(this.div.style.webkitTransform="translateZ(0)",typeof this.div.style.opacity<"u"&&this.div.style.opacity!==""){var r=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+r*100+')"',this.div.style.filter="alpha(opacity="+r*100+")"}this.div.style.position="absolute",this.div.style.visibility="hidden",this.zIndex!==null&&(this.div.style.zIndex=this.zIndex+""),this.div.style.overflow||(this.div.style.overflow="auto")}},t.prototype.getBoxWidths=function(){var e={top:0,bottom:0,left:0,right:0};if(!this.div)return e;if(document.defaultView){var n=this.div.ownerDocument,r=n&&n.defaultView?n.defaultView.getComputedStyle(this.div,""):null;r&&(e.top=parseInt(r.borderTopWidth||"",10)||0,e.bottom=parseInt(r.borderBottomWidth||"",10)||0,e.left=parseInt(r.borderLeftWidth||"",10)||0,e.right=parseInt(r.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var i=this.div.currentStyle;i&&(e.top=parseInt(i.borderTopWidth||"",10)||0,e.bottom=parseInt(i.borderBottomWidth||"",10)||0,e.left=parseInt(i.borderLeftWidth||"",10)||0,e.right=parseInt(i.borderRightWidth||"",10)||0)}return e},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},t.prototype.draw=function(){if(this.createInfoBoxDiv(),this.div){var e=this.getProjection(),n=e.fromLatLngToDivPixel(this.position);n!==null&&(this.div.style.left=n.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(n.y+this.pixelOffset.height)+"px":this.div.style.top=n.y+this.pixelOffset.height+"px"),this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},t.prototype.setOptions=function(e){e===void 0&&(e={}),typeof e.boxClass<"u"&&(this.boxClass=e.boxClass,this.setBoxStyle()),typeof e.boxStyle<"u"&&(this.boxStyle=e.boxStyle,this.setBoxStyle()),typeof e.content<"u"&&this.setContent(e.content),typeof e.disableAutoPan<"u"&&(this.disableAutoPan=e.disableAutoPan),typeof e.maxWidth<"u"&&(this.maxWidth=e.maxWidth),typeof e.pixelOffset<"u"&&(this.pixelOffset=e.pixelOffset),typeof e.alignBottom<"u"&&(this.alignBottom=e.alignBottom),typeof e.position<"u"&&this.setPosition(e.position),typeof e.zIndex<"u"&&this.setZIndex(e.zIndex),typeof e.closeBoxMargin<"u"&&(this.closeBoxMargin=e.closeBoxMargin),typeof e.closeBoxURL<"u"&&(this.closeBoxURL=e.closeBoxURL),typeof e.infoBoxClearance<"u"&&(this.infoBoxClearance=e.infoBoxClearance),typeof e.isHidden<"u"&&(this.isHidden=e.isHidden),typeof e.visible<"u"&&(this.isHidden=!e.visible),typeof e.enableEventPropagation<"u"&&(this.enableEventPropagation=e.enableEventPropagation),this.div&&this.draw()},t.prototype.setContent=function(e){this.content=e,this.div&&(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.fixedWidthSet||(this.div.style.width=""),typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e)),this.fixedWidthSet||(this.div.style.width=this.div.offsetWidth+"px",typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},t.prototype.setPosition=function(e){this.position=e,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},t.prototype.setVisible=function(e){this.isHidden=!e,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},t.prototype.setZIndex=function(e){this.zIndex=e,this.div&&(this.div.style.zIndex=e+""),google.maps.event.trigger(this,"zindex_changed")},t.prototype.getContent=function(){return this.content},t.prototype.getPosition=function(){return this.position},t.prototype.getZIndex=function(){return this.zIndex},t.prototype.getVisible=function(){var e=this.getMap();return typeof e>"u"||e===null?!1:!this.isHidden},t.prototype.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},t.prototype.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},t.prototype.open=function(e,n){var r=this;n&&(this.position=n.getPosition(),this.moveListener=google.maps.event.addListener(n,"position_changed",function(){var i=n.getPosition();r.setPosition(i)}),this.mapListener=google.maps.event.addListener(n,"map_changed",function(){r.setMap(n.map)})),this.setMap(e),this.div&&this.panBox()},t.prototype.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var e=0,n=this.eventListeners;e<n.length;e++){var r=n[e];google.maps.event.removeListener(r)}this.eventListeners=null}this.moveListener&&(google.maps.event.removeListener(this.moveListener),this.moveListener=null),this.mapListener&&(google.maps.event.removeListener(this.mapListener),this.mapListener=null),this.contextListener&&(google.maps.event.removeListener(this.contextListener),this.contextListener=null),this.setMap(null)},t.prototype.extend=function(e,n){return(function(i){for(var o in i.prototype)Object.prototype.hasOwnProperty.call(this,o)||(this.prototype[o]=i.prototype[o]);return this}).apply(e,[n])},t}(),Ic={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},jc={options:function(t,e){t.setOptions(e)},position:function(t,e){e instanceof google.maps.LatLng?t.setPosition(e):t.setPosition(new google.maps.LatLng(e.lat,e.lng))},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},eC={};function tC(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,o=t.zIndex,s=t.onCloseClick,a=t.onDomReady,l=t.onContentChanged,u=t.onPositionChanged,f=t.onZindexChanged,d=t.onLoad,h=t.onUnmount,v=c.useContext(le),y=c.useState(null),g=y[0],w=y[1],C=c.useState(null),L=C[0],m=C[1],_=c.useState(null),E=_[0],p=_[1],b=c.useState(null),x=b[0],M=b[1],O=c.useState(null),T=O[0],P=O[1],R=c.useState(null),I=R[0],B=R[1],V=c.useRef(null);return c.useEffect(function(){v&&g!==null&&(g.close(),n?g.open(v,n):g.getPosition()&&g.open(v))},[v,g,n]),c.useEffect(function(){r&&g!==null&&g.setOptions(r)},[g,r]),c.useEffect(function(){if(i&&g!==null){var N=i instanceof google.maps.LatLng?i:new google.maps.LatLng(i.lat,i.lng);g.setPosition(N)}},[i]),c.useEffect(function(){typeof o=="number"&&g!==null&&g.setZIndex(o)},[o]),c.useEffect(function(){g&&s&&(L!==null&&google.maps.event.removeListener(L),m(google.maps.event.addListener(g,"closeclick",s)))},[s]),c.useEffect(function(){g&&a&&(E!==null&&google.maps.event.removeListener(E),p(google.maps.event.addListener(g,"domready",a)))},[a]),c.useEffect(function(){g&&l&&(x!==null&&google.maps.event.removeListener(x),M(google.maps.event.addListener(g,"content_changed",l)))},[l]),c.useEffect(function(){g&&u&&(T!==null&&google.maps.event.removeListener(T),P(google.maps.event.addListener(g,"position_changed",u)))},[u]),c.useEffect(function(){g&&f&&(I!==null&&google.maps.event.removeListener(I),B(google.maps.event.addListener(g,"zindex_changed",f)))},[f]),c.useEffect(function(){if(v){var N=r||eC,z=N.position,Y=Gl(N,["position"]),G=void 0;z&&!(z instanceof google.maps.LatLng)&&(G=new google.maps.LatLng(z.lat,z.lng));var H=new fp(K(K({},Y),G?{position:G}:{}));V.current=document.createElement("div"),w(H),s&&m(google.maps.event.addListener(H,"closeclick",s)),a&&p(google.maps.event.addListener(H,"domready",a)),l&&M(google.maps.event.addListener(H,"content_changed",l)),u&&P(google.maps.event.addListener(H,"position_changed",u)),f&&B(google.maps.event.addListener(H,"zindex_changed",f)),H.setContent(V.current),n?H.open(v,n):H.getPosition()?H.open(v):Ye(!1,"You must provide either an anchor or a position prop for <InfoBox>."),d&&d(H)}return function(){g!==null&&(L&&google.maps.event.removeListener(L),x&&google.maps.event.removeListener(x),E&&google.maps.event.removeListener(E),T&&google.maps.event.removeListener(T),I&&google.maps.event.removeListener(I),h&&h(g),g.close())}},[]),V.current?ti.createPortal(c.Children.only(e),V.current):null}c.memo(tC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoBox:null},n.open=function(r,i){i?n.context!==null&&r.open(n.context,i):r.getPosition()?n.context!==null&&r.open(n.context):Ye(!1,"You must provide either an anchor or a position prop for <InfoBox>.")},n.setInfoBoxCallback=function(){n.state.infoBox!==null&&n.containerElement!==null&&(n.state.infoBox.setContent(n.containerElement),n.open(n.state.infoBox,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoBox))},n}return e.prototype.componentDidMount=function(){var n=this.props.options||{},r=n.position,i=Gl(n,["position"]),o;r&&!(r instanceof google.maps.LatLng)&&(o=new google.maps.LatLng(r.lat,r.lng));var s=new fp(K(K({},i),o?{position:o}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=ce({updaterMap:jc,eventMap:Ic,prevProps:{},nextProps:this.props,instance:s}),this.setState({infoBox:s},this.setInfoBoxCallback)},e.prototype.componentDidUpdate=function(n){var r=this.state.infoBox;r!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:jc,eventMap:Ic,prevProps:n,nextProps:this.props,instance:r}))},e.prototype.componentWillUnmount=function(){var n=this.props.onUnmount,r=this.state.infoBox;r!==null&&(n&&n(r),he(this.registeredEvents),r.close())},e.prototype.render=function(){return this.containerElement?ti.createPortal(c.Children.only(this.props.children),this.containerElement):null},e.contextType=le,e})(c.PureComponent);var nC=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,o;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(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n},Nc=rp(nC);const Bc=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],ca=1,bi=8;class Zl{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!==ca)throw new Error(`Got v${i} data when expected v${ca}.`);const o=Bc[r&15];if(!o)throw new Error("Unrecognized array type.");const[s]=new Uint16Array(e,2,1),[a]=new Uint32Array(e,4,1);return new Zl(a,s,o,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 o=Bc.indexOf(this.ArrayType),s=e*2*this.ArrayType.BYTES_PER_ELEMENT,a=e*this.IndexArrayType.BYTES_PER_ELEMENT,l=(8-a%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${r}.`);i&&i instanceof ArrayBuffer?(this.data=i,this.ids=new this.IndexArrayType(this.data,bi,e),this.coords=new this.ArrayType(this.data,bi+a+l,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(bi+s+a+l),this.ids=new this.IndexArrayType(this.data,bi,e),this.coords=new this.ArrayType(this.data,bi+a+l,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(ca<<4)+o]),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 vl(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:o,coords:s,nodeSize:a}=this,l=[0,o.length-1,0],u=[];for(;l.length;){const f=l.pop()||0,d=l.pop()||0,h=l.pop()||0;if(d-h<=a){for(let w=h;w<=d;w++){const C=s[2*w],L=s[2*w+1];C>=e&&C<=r&&L>=n&&L<=i&&u.push(o[w])}continue}const v=h+d>>1,y=s[2*v],g=s[2*v+1];y>=e&&y<=r&&g>=n&&g<=i&&u.push(o[v]),(f===0?e<=y:n<=g)&&(l.push(h),l.push(v-1),l.push(1-f)),(f===0?r>=y:i>=g)&&(l.push(v+1),l.push(d),l.push(1-f))}return u}within(e,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:o,nodeSize:s}=this,a=[0,i.length-1,0],l=[],u=r*r;for(;a.length;){const f=a.pop()||0,d=a.pop()||0,h=a.pop()||0;if(d-h<=s){for(let w=h;w<=d;w++)Fc(o[2*w],o[2*w+1],e,n)<=u&&l.push(i[w]);continue}const v=h+d>>1,y=o[2*v],g=o[2*v+1];Fc(y,g,e,n)<=u&&l.push(i[v]),(f===0?e-r<=y:n-r<=g)&&(a.push(h),a.push(v-1),a.push(1-f)),(f===0?e+r>=y:n+r>=g)&&(a.push(v+1),a.push(d),a.push(1-f))}return l}}function vl(t,e,n,r,i,o){if(i-r<=n)return;const s=r+i>>1;dp(t,e,s,r,i,o),vl(t,e,n,r,s-1,1-o),vl(t,e,n,s+1,i,1-o)}function dp(t,e,n,r,i,o){for(;i>r;){if(i-r>600){const u=i-r+1,f=n-r+1,d=Math.log(u),h=.5*Math.exp(2*d/3),v=.5*Math.sqrt(d*h*(u-h)/u)*(f-u/2<0?-1:1),y=Math.max(r,Math.floor(n-f*h/u+v)),g=Math.min(i,Math.floor(n+(u-f)*h/u+v));dp(t,e,n,y,g,o)}const s=e[2*n+o];let a=r,l=i;for(Ci(t,e,r,n),e[2*i+o]>s&&Ci(t,e,r,i);a<l;){for(Ci(t,e,a,l),a++,l--;e[2*a+o]<s;)a++;for(;e[2*l+o]>s;)l--}e[2*r+o]===s?Ci(t,e,r,l):(l++,Ci(t,e,l,i)),l<=n&&(r=l+1),n<=l&&(i=l-1)}}function Ci(t,e,n,r){fa(t,n,r),fa(e,2*n,2*r),fa(e,2*n+1,2*r+1)}function fa(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Fc(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}const rC={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},Uc=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),Qn=2,Pn=3,da=4,Mn=5,hp=6;class iC{constructor(e){this.options=Object.assign(Object.create(rC),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 o=`prepare ${e.length} points`;n&&console.time(o),this.points=e;const s=[];for(let l=0;l<e.length;l++){const u=e[l];if(!u.geometry)continue;const[f,d]=u.geometry.coordinates,h=Uc(Bo(f)),v=Uc(Fo(d));s.push(h,v,1/0,l,-1,1),this.options.reduce&&s.push(0)}let a=this.trees[i+1]=this._createTree(s);n&&console.timeEnd(o);for(let l=i;l>=r;l--){const u=+Date.now();a=this.trees[l]=this._createTree(this._cluster(a,l)),n&&console.log("z%d: %d clusters in %dms",l,a.numItems,+Date.now()-u)}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 o=e[2]===180?180:((e[2]+180)%360+360)%360-180;const s=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,o=180;else if(r>o){const d=this.getClusters([r,i,180,s],n),h=this.getClusters([-180,i,o,s],n);return d.concat(h)}const a=this.trees[this._limitZoom(n)],l=a.range(Bo(r),Fo(s),Bo(o),Fo(i)),u=a.data,f=[];for(const d of l){const h=this.stride*d;f.push(u[h+Mn]>1?Vc(u,h,this.clusterProps):this.points[u[h+Pn]])}return f}getChildren(e){const n=this._getOriginId(e),r=this._getOriginZoom(e),i="No cluster with the specified id.",o=this.trees[r];if(!o)throw new Error(i);const s=o.data;if(n*this.stride>=s.length)throw new Error(i);const a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),l=s[n*this.stride],u=s[n*this.stride+1],f=o.within(l,u,a),d=[];for(const h of f){const v=h*this.stride;s[v+da]===e&&d.push(s[v+Mn]>1?Vc(s,v,this.clusterProps):this.points[s[v+Pn]])}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)],o=Math.pow(2,e),{extent:s,radius:a}=this.options,l=a/s,u=(r-l)/o,f=(r+1+l)/o,d={features:[]};return this._addTileFeatures(i.range((n-l)/o,u,(n+1+l)/o,f),i.data,n,r,o,d),n===0&&this._addTileFeatures(i.range(1-l/o,u,1,f),i.data,o,r,o,d),n===o-1&&this._addTileFeatures(i.range(0,u,l/o,f),i.data,-1,r,o,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,o){const s=this.getChildren(n);for(const a of s){const l=a.properties;if(l&&l.cluster?o+l.point_count<=i?o+=l.point_count:o=this._appendLeaves(e,l.cluster_id,r,i,o):o<i?o++:e.push(a),e.length===r)break}return o}_createTree(e){const n=new Zl(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,o,s){for(const a of e){const l=a*this.stride,u=n[l+Mn]>1;let f,d,h;if(u)f=pp(n,l,this.clusterProps),d=n[l],h=n[l+1];else{const g=this.points[n[l+Pn]];f=g.properties;const[w,C]=g.geometry.coordinates;d=Bo(w),h=Fo(C)}const v={type:1,geometry:[[Math.round(this.options.extent*(d*o-r)),Math.round(this.options.extent*(h*o-i))]],tags:f};let y;u||this.options.generateId?y=n[l+Pn]:y=this.points[n[l+Pn]].id,y!==void 0&&(v.id=y),s.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:o,minPoints:s}=this.options,a=r/(i*Math.pow(2,n)),l=e.data,u=[],f=this.stride;for(let d=0;d<l.length;d+=f){if(l[d+Qn]<=n)continue;l[d+Qn]=n;const h=l[d],v=l[d+1],y=e.within(l[d],l[d+1],a),g=l[d+Mn];let w=g;for(const C of y){const L=C*f;l[L+Qn]>n&&(w+=l[L+Mn])}if(w>g&&w>=s){let C=h*g,L=v*g,m,_=-1;const E=((d/f|0)<<5)+(n+1)+this.points.length;for(const p of y){const b=p*f;if(l[b+Qn]<=n)continue;l[b+Qn]=n;const x=l[b+Mn];C+=l[b]*x,L+=l[b+1]*x,l[b+da]=E,o&&(m||(m=this._map(l,d,!0),_=this.clusterProps.length,this.clusterProps.push(m)),o(m,this._map(l,b)))}l[d+da]=E,u.push(C/w,L/w,1/0,E,-1,w),o&&u.push(_)}else{for(let C=0;C<f;C++)u.push(l[d+C]);if(w>1)for(const C of y){const L=C*f;if(!(l[L+Qn]<=n)){l[L+Qn]=n;for(let m=0;m<f;m++)u.push(l[L+m])}}}}return u}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,n,r){if(e[n+Mn]>1){const s=this.clusterProps[e[n+hp]];return r?Object.assign({},s):s}const i=this.points[e[n+Pn]].properties,o=this.options.map(i);return r&&o===i?Object.assign({},o):o}}function Vc(t,e,n){return{type:"Feature",id:t[e+Pn],properties:pp(t,e,n),geometry:{type:"Point",coordinates:[oC(t[e]),sC(t[e+1])]}}}function pp(t,e,n){const r=t[e+Mn],i=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,o=t[e+hp],s=o===-1?{}:Object.assign({},n[o]);return Object.assign(s,{cluster:!0,cluster_id:t[e+Pn],point_count:r,point_count_abbreviated:i})}function Bo(t){return t/360+.5}function Fo(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 oC(t){return(t-.5)*360}function sC(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
|
|
245
|
+
`)),console.error(T)})},[n,p,o]);var b=c.useRef();return c.useEffect(function(){b.current&&f!==b.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),b.current=f},[f]),{isLoaded:C,loadError:_,url:p}}var I4=S.jsx(ap,{});function j4(t){var e=t.loadingElement,n=t.onLoad,r=t.onError,i=t.onUnmount,o=t.children,s=Zl(t,["loadingElement","onLoad","onError","onUnmount","children"]),a=lp(s),l=a.isLoaded,u=a.loadError;return c.useEffect(function(){l&&typeof n=="function"&&n()},[l,n]),c.useEffect(function(){u&&typeof r=="function"&&r(u)},[u,r]),c.useEffect(function(){return function(){i&&i()}},[i]),l?o:e||I4}c.memo(j4);var Oc;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(Oc||(Oc={}));var Pc={},kc={options:function(t,e){t.setOptions(e)}};function N4(t){var e=t.options,n=t.onLoad,r=t.onUnmount,i=c.useContext(le),o=c.useState(null),s=o[0],a=o[1];return c.useEffect(function(){s!==null&&s.setMap(i)},[i]),c.useEffect(function(){e&&s!==null&&s.setOptions(e)},[s,e]),c.useEffect(function(){var l=new google.maps.TrafficLayer(K(K({},e||{}),{map:i}));return a(l),n&&n(l),function(){s!==null&&(r&&r(s),s.setMap(null))}},[]),null}c.memo(N4);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={trafficLayer:null},n.setTrafficLayerCallback=function(){n.state.trafficLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.trafficLayer)},n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=new google.maps.TrafficLayer(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:kc,eventMap:Pc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{trafficLayer:n}},this.setTrafficLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.trafficLayer!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:kc,eventMap:Pc,prevProps:n,nextProps:this.props,instance:this.state.trafficLayer}))},e.prototype.componentWillUnmount=function(){this.state.trafficLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),he(this.registeredEvents),this.state.trafficLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);function B4(t){var e=t.onLoad,n=t.onUnmount,r=c.useContext(le),i=c.useState(null),o=i[0],s=i[1];return c.useEffect(function(){o!==null&&o.setMap(r)},[r]),c.useEffect(function(){var a=new google.maps.BicyclingLayer;return s(a),a.setMap(r),e&&e(a),function(){a!==null&&(n&&n(a),a.setMap(null))}},[]),null}c.memo(B4);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={bicyclingLayer:null},n.setBicyclingLayerCallback=function(){n.state.bicyclingLayer!==null&&(n.state.bicyclingLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.bicyclingLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.BicyclingLayer;this.setState(function(){return{bicyclingLayer:n}},this.setBicyclingLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.bicyclingLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);function F4(t){var e=t.onLoad,n=t.onUnmount,r=c.useContext(le),i=c.useState(null),o=i[0],s=i[1];return c.useEffect(function(){o!==null&&o.setMap(r)},[r]),c.useEffect(function(){var a=new google.maps.TransitLayer;return s(a),a.setMap(r),e&&e(a),function(){o!==null&&(n&&n(o),o.setMap(null))}},[]),null}c.memo(F4);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={transitLayer:null},n.setTransitLayerCallback=function(){n.state.transitLayer!==null&&(n.state.transitLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.transitLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.TransitLayer;this.setState(function(){return{transitLayer:n}},this.setTransitLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.transitLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var Tc={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},Rc={drawingMode:function(t,e){t.setDrawingMode(e)},options:function(t,e){t.setOptions(e)}};function U4(t){var e=t.options,n=t.drawingMode,r=t.onCircleComplete,i=t.onMarkerComplete,o=t.onOverlayComplete,s=t.onPolygonComplete,a=t.onPolylineComplete,l=t.onRectangleComplete,u=t.onLoad,f=t.onUnmount,d=c.useContext(le),h=c.useState(null),v=h[0],y=h[1],g=c.useState(null),w=g[0],C=g[1],L=c.useState(null),m=L[0],_=L[1],x=c.useState(null),p=x[0],b=x[1],E=c.useState(null),P=E[0],O=E[1],T=c.useState(null),M=T[0],R=T[1],A=c.useState(null),B=A[0],V=A[1];return c.useEffect(function(){v!==null&&v.setMap(d)},[d]),c.useEffect(function(){e&&v!==null&&v.setOptions(e)},[v,e]),c.useEffect(function(){v!==null&&v.setDrawingMode(n??null)},[v,n]),c.useEffect(function(){v&&r&&(w!==null&&google.maps.event.removeListener(w),C(google.maps.event.addListener(v,"circlecomplete",r)))},[v,r]),c.useEffect(function(){v&&i&&(m!==null&&google.maps.event.removeListener(m),_(google.maps.event.addListener(v,"markercomplete",i)))},[v,i]),c.useEffect(function(){v&&o&&(p!==null&&google.maps.event.removeListener(p),b(google.maps.event.addListener(v,"overlaycomplete",o)))},[v,o]),c.useEffect(function(){v&&s&&(P!==null&&google.maps.event.removeListener(P),O(google.maps.event.addListener(v,"polygoncomplete",s)))},[v,s]),c.useEffect(function(){v&&a&&(M!==null&&google.maps.event.removeListener(M),R(google.maps.event.addListener(v,"polylinecomplete",a)))},[v,a]),c.useEffect(function(){v&&l&&(B!==null&&google.maps.event.removeListener(B),V(google.maps.event.addListener(v,"rectanglecomplete",l)))},[v,l]),c.useEffect(function(){Ye(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var N=new google.maps.drawing.DrawingManager(K(K({},e||{}),{map:d}));return n&&N.setDrawingMode(n),r&&C(google.maps.event.addListener(N,"circlecomplete",r)),i&&_(google.maps.event.addListener(N,"markercomplete",i)),o&&b(google.maps.event.addListener(N,"overlaycomplete",o)),s&&O(google.maps.event.addListener(N,"polygoncomplete",s)),a&&R(google.maps.event.addListener(N,"polylinecomplete",a)),l&&V(google.maps.event.addListener(N,"rectanglecomplete",l)),y(N),u&&u(N),function(){v!==null&&(w&&google.maps.event.removeListener(w),m&&google.maps.event.removeListener(m),p&&google.maps.event.removeListener(p),P&&google.maps.event.removeListener(P),M&&google.maps.event.removeListener(M),B&&google.maps.event.removeListener(B),f&&f(v),v.setMap(null))}},[]),null}c.memo(U4);(function(t){Ue(e,t);function e(n){var r=t.call(this,n)||this;return r.registeredEvents=[],r.state={drawingManager:null},r.setDrawingManagerCallback=function(){r.state.drawingManager!==null&&r.props.onLoad&&r.props.onLoad(r.state.drawingManager)},Ye(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing),r}return e.prototype.componentDidMount=function(){var n=new google.maps.drawing.DrawingManager(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Rc,eventMap:Tc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{drawingManager:n}},this.setDrawingManagerCallback)},e.prototype.componentDidUpdate=function(n){this.state.drawingManager!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Rc,eventMap:Tc,prevProps:n,nextProps:this.props,instance:this.state.drawingManager}))},e.prototype.componentWillUnmount=function(){this.state.drawingManager!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),he(this.registeredEvents),this.state.drawingManager.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var Dc={onAnimationChanged:"animation_changed",onClick:"click",onClickableChanged:"clickable_changed",onCursorChanged:"cursor_changed",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDraggableChanged:"draggable_changed",onDragStart:"dragstart",onFlatChanged:"flat_changed",onIconChanged:"icon_changed",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPositionChanged:"position_changed",onRightClick:"rightclick",onShapeChanged:"shape_changed",onTitleChanged:"title_changed",onVisibleChanged:"visible_changed",onZindexChanged:"zindex_changed"},Ac={animation:function(t,e){t.setAnimation(e)},clickable:function(t,e){t.setClickable(e)},cursor:function(t,e){t.setCursor(e)},draggable:function(t,e){t.setDraggable(e)},icon:function(t,e){t.setIcon(e)},label:function(t,e){t.setLabel(e)},map:function(t,e){t.setMap(e)},opacity:function(t,e){t.setOpacity(e)},options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},shape:function(t,e){t.setShape(e)},title:function(t,e){t.setTitle(e)},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},ws={};function V4(t){var e=t.position,n=t.options,r=t.clusterer,i=t.noClustererRedraw,o=t.children,s=t.draggable,a=t.visible,l=t.animation,u=t.clickable,f=t.cursor,d=t.icon,h=t.label,v=t.opacity,y=t.shape,g=t.title,w=t.zIndex,C=t.onClick,L=t.onDblClick,m=t.onDrag,_=t.onDragEnd,x=t.onDragStart,p=t.onMouseOut,b=t.onMouseOver,E=t.onMouseUp,P=t.onMouseDown,O=t.onRightClick,T=t.onClickableChanged,M=t.onCursorChanged,R=t.onAnimationChanged,A=t.onDraggableChanged,B=t.onFlatChanged,V=t.onIconChanged,N=t.onPositionChanged,z=t.onShapeChanged,Y=t.onTitleChanged,G=t.onVisibleChanged,H=t.onZindexChanged,Q=t.onLoad,oe=t.onUnmount,te=c.useContext(le),ee=c.useState(null),D=ee[0],pe=ee[1],Pe=c.useState(null),Z=Pe[0],De=Pe[1],Ae=c.useState(null),ue=Ae[0],_e=Ae[1],Ve=c.useState(null),Ce=Ve[0],Me=Ve[1],Ie=c.useState(null),ke=Ie[0],je=Ie[1],ie=c.useState(null),We=ie[0],re=ie[1],tt=c.useState(null),q=tt[0],Ge=tt[1],ze=c.useState(null),bt=ze[0],ut=ze[1],se=c.useState(null),Hn=se[0],co=se[1],Ft=c.useState(null),un=Ft[0],fo=Ft[1],j=c.useState(null),X=j[0],W=j[1],fe=c.useState(null),Ne=fe[0],Le=fe[1],Be=c.useState(null),Te=Be[0],He=Be[1],ae=c.useState(null),ge=ae[0],pt=ae[1],cn=c.useState(null),ct=cn[0],et=cn[1],Ct=c.useState(null),wt=Ct[0],nt=Ct[1],Kt=c.useState(null),Ut=Kt[0],St=Kt[1],Cn=c.useState(null),fn=Cn[0],oi=Cn[1],si=c.useState(null),mr=si[0],ai=si[1],yr=c.useState(null),$n=yr[0],li=yr[1],wn=c.useState(null),Wn=wn[0],Gn=wn[1],Zn=c.useState(null),qn=Zn[0],ui=Zn[1];c.useEffect(function(){D!==null&&D.setMap(te)},[te]),c.useEffect(function(){typeof n<"u"&&D!==null&&D.setOptions(n)},[D,n]),c.useEffect(function(){typeof s<"u"&&D!==null&&D.setDraggable(s)},[D,s]),c.useEffect(function(){e&&D!==null&&D.setPosition(e)},[D,e]),c.useEffect(function(){typeof a<"u"&&D!==null&&D.setVisible(a)},[D,a]),c.useEffect(function(){D==null||D.setAnimation(l)},[D,l]),c.useEffect(function(){D&&u!==void 0&&D.setClickable(u)},[D,u]),c.useEffect(function(){D&&f!==void 0&&D.setCursor(f)},[D,f]),c.useEffect(function(){D&&d!==void 0&&D.setIcon(d)},[D,d]),c.useEffect(function(){D&&h!==void 0&&D.setLabel(h)},[D,h]),c.useEffect(function(){D&&v!==void 0&&D.setOpacity(v)},[D,v]),c.useEffect(function(){D&&y!==void 0&&D.setShape(y)},[D,y]),c.useEffect(function(){D&&g!==void 0&&D.setTitle(g)},[D,g]),c.useEffect(function(){D&&w!==void 0&&D.setZIndex(w)},[D,w]),c.useEffect(function(){D&&L&&(Z!==null&&google.maps.event.removeListener(Z),De(google.maps.event.addListener(D,"dblclick",L)))},[L]),c.useEffect(function(){D&&_&&(ue!==null&&google.maps.event.removeListener(ue),_e(google.maps.event.addListener(D,"dragend",_)))},[_]),c.useEffect(function(){D&&x&&(Ce!==null&&google.maps.event.removeListener(Ce),Me(google.maps.event.addListener(D,"dragstart",x)))},[x]),c.useEffect(function(){D&&P&&(ke!==null&&google.maps.event.removeListener(ke),je(google.maps.event.addListener(D,"mousedown",P)))},[P]),c.useEffect(function(){D&&p&&(We!==null&&google.maps.event.removeListener(We),re(google.maps.event.addListener(D,"mouseout",p)))},[p]),c.useEffect(function(){D&&b&&(q!==null&&google.maps.event.removeListener(q),Ge(google.maps.event.addListener(D,"mouseover",b)))},[b]),c.useEffect(function(){D&&E&&(bt!==null&&google.maps.event.removeListener(bt),ut(google.maps.event.addListener(D,"mouseup",E)))},[E]),c.useEffect(function(){D&&O&&(Hn!==null&&google.maps.event.removeListener(Hn),co(google.maps.event.addListener(D,"rightclick",O)))},[O]),c.useEffect(function(){D&&C&&(un!==null&&google.maps.event.removeListener(un),fo(google.maps.event.addListener(D,"click",C)))},[C]),c.useEffect(function(){D&&m&&(X!==null&&google.maps.event.removeListener(X),W(google.maps.event.addListener(D,"drag",m)))},[m]),c.useEffect(function(){D&&T&&(Ne!==null&&google.maps.event.removeListener(Ne),Le(google.maps.event.addListener(D,"clickable_changed",T)))},[T]),c.useEffect(function(){D&&M&&(Te!==null&&google.maps.event.removeListener(Te),He(google.maps.event.addListener(D,"cursor_changed",M)))},[M]),c.useEffect(function(){D&&R&&(ge!==null&&google.maps.event.removeListener(ge),pt(google.maps.event.addListener(D,"animation_changed",R)))},[R]),c.useEffect(function(){D&&A&&(ct!==null&&google.maps.event.removeListener(ct),et(google.maps.event.addListener(D,"draggable_changed",A)))},[A]),c.useEffect(function(){D&&B&&(wt!==null&&google.maps.event.removeListener(wt),nt(google.maps.event.addListener(D,"flat_changed",B)))},[B]),c.useEffect(function(){D&&V&&(Ut!==null&&google.maps.event.removeListener(Ut),St(google.maps.event.addListener(D,"icon_changed",V)))},[V]),c.useEffect(function(){D&&N&&(fn!==null&&google.maps.event.removeListener(fn),oi(google.maps.event.addListener(D,"position_changed",N)))},[N]),c.useEffect(function(){D&&z&&(mr!==null&&google.maps.event.removeListener(mr),ai(google.maps.event.addListener(D,"shape_changed",z)))},[z]),c.useEffect(function(){D&&Y&&($n!==null&&google.maps.event.removeListener($n),li(google.maps.event.addListener(D,"title_changed",Y)))},[Y]),c.useEffect(function(){D&&G&&(Wn!==null&&google.maps.event.removeListener(Wn),Gn(google.maps.event.addListener(D,"visible_changed",G)))},[G]),c.useEffect(function(){D&&H&&(qn!==null&&google.maps.event.removeListener(qn),ui(google.maps.event.addListener(D,"zindex_changed",H)))},[H]),c.useEffect(function(){var Sn=K(K(K({},n||ws),r?ws:{map:te}),{position:e}),ne=new google.maps.Marker(Sn);return r?r.addMarker(ne,!!i):ne.setMap(te),e&&ne.setPosition(e),typeof a<"u"&&ne.setVisible(a),typeof s<"u"&&ne.setDraggable(s),typeof u<"u"&&ne.setClickable(u),typeof f=="string"&&ne.setCursor(f),d&&ne.setIcon(d),typeof h<"u"&&ne.setLabel(h),typeof v<"u"&&ne.setOpacity(v),y&&ne.setShape(y),typeof g=="string"&&ne.setTitle(g),typeof w=="number"&&ne.setZIndex(w),L&&De(google.maps.event.addListener(ne,"dblclick",L)),_&&_e(google.maps.event.addListener(ne,"dragend",_)),x&&Me(google.maps.event.addListener(ne,"dragstart",x)),P&&je(google.maps.event.addListener(ne,"mousedown",P)),p&&re(google.maps.event.addListener(ne,"mouseout",p)),b&&Ge(google.maps.event.addListener(ne,"mouseover",b)),E&&ut(google.maps.event.addListener(ne,"mouseup",E)),O&&co(google.maps.event.addListener(ne,"rightclick",O)),C&&fo(google.maps.event.addListener(ne,"click",C)),m&&W(google.maps.event.addListener(ne,"drag",m)),T&&Le(google.maps.event.addListener(ne,"clickable_changed",T)),M&&He(google.maps.event.addListener(ne,"cursor_changed",M)),R&&pt(google.maps.event.addListener(ne,"animation_changed",R)),A&&et(google.maps.event.addListener(ne,"draggable_changed",A)),B&&nt(google.maps.event.addListener(ne,"flat_changed",B)),V&&St(google.maps.event.addListener(ne,"icon_changed",V)),N&&oi(google.maps.event.addListener(ne,"position_changed",N)),z&&ai(google.maps.event.addListener(ne,"shape_changed",z)),Y&&li(google.maps.event.addListener(ne,"title_changed",Y)),G&&Gn(google.maps.event.addListener(ne,"visible_changed",G)),H&&ui(google.maps.event.addListener(ne,"zindex_changed",H)),pe(ne),Q&&Q(ne),function(){Z!==null&&google.maps.event.removeListener(Z),ue!==null&&google.maps.event.removeListener(ue),Ce!==null&&google.maps.event.removeListener(Ce),ke!==null&&google.maps.event.removeListener(ke),We!==null&&google.maps.event.removeListener(We),q!==null&&google.maps.event.removeListener(q),bt!==null&&google.maps.event.removeListener(bt),Hn!==null&&google.maps.event.removeListener(Hn),un!==null&&google.maps.event.removeListener(un),Ne!==null&&google.maps.event.removeListener(Ne),Te!==null&&google.maps.event.removeListener(Te),ge!==null&&google.maps.event.removeListener(ge),ct!==null&&google.maps.event.removeListener(ct),wt!==null&&google.maps.event.removeListener(wt),Ut!==null&&google.maps.event.removeListener(Ut),fn!==null&&google.maps.event.removeListener(fn),$n!==null&&google.maps.event.removeListener($n),Wn!==null&&google.maps.event.removeListener(Wn),qn!==null&&google.maps.event.removeListener(qn),oe&&oe(ne),r?r.removeMarker(ne,!!i):ne&&ne.setMap(null)}},[]);var ci=c.useMemo(function(){return o?c.Children.map(o,function(Sn){if(!c.isValidElement(Sn))return Sn;var ne=Sn;return c.cloneElement(ne,{anchor:D})}):null},[o,D]);return S.jsx(S.Fragment,{children:ci})||null}c.memo(V4);var up=function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=K(K(K({},this.props.options||ws),this.props.clusterer?ws:{map:this.context}),{position:this.props.position});this.marker=new google.maps.Marker(n),this.props.clusterer?this.props.clusterer.addMarker(this.marker,!!this.props.noClustererRedraw):this.marker.setMap(this.context),this.registeredEvents=ce({updaterMap:Ac,eventMap:Dc,prevProps:{},nextProps:this.props,instance:this.marker}),this.props.onLoad&&this.props.onLoad(this.marker)},e.prototype.componentDidUpdate=function(n){this.marker&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Ac,eventMap:Dc,prevProps:n,nextProps:this.props,instance:this.marker}))},e.prototype.componentWillUnmount=function(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),he(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))},e.prototype.render=function(){var n=this,r=null;return this.props.children&&(r=c.Children.map(this.props.children,function(i){if(!c.isValidElement(i))return i;var o=i;return c.cloneElement(o,{anchor:n.marker})})),r||null},e.contextType=le,e}(c.PureComponent),z4=function(){function t(e,n){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=n,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.cMouseDownInCluster=null,this.cDraggingMapByCluster=null,this.timeOut=null,this.setMap(e.getMap()),this.onBoundsChanged=this.onBoundsChanged.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onClick=this.onClick.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onAdd=this.onAdd.bind(this),this.onRemove=this.onRemove.bind(this),this.draw=this.draw.bind(this),this.hide=this.hide.bind(this),this.show=this.show.bind(this),this.useStyle=this.useStyle.bind(this),this.setCenter=this.setCenter.bind(this),this.getPosFromLatLng=this.getPosFromLatLng.bind(this)}return t.prototype.onBoundsChanged=function(){this.cDraggingMapByCluster=this.cMouseDownInCluster},t.prototype.onMouseDown=function(){this.cMouseDownInCluster=!0,this.cDraggingMapByCluster=!1},t.prototype.onClick=function(e){if(this.cMouseDownInCluster=!1,!this.cDraggingMapByCluster){var n=this.cluster.getClusterer();if(google.maps.event.trigger(n,"click",this.cluster),google.maps.event.trigger(n,"clusterclick",this.cluster),n.getZoomOnClick()){var r=n.getMaxZoom(),i=this.cluster.getBounds(),o=n.getMap();o!==null&&"fitBounds"in o&&o.fitBounds(i),this.timeOut=window.setTimeout(function(){var s=n.getMap();if(s!==null){"fitBounds"in s&&s.fitBounds(i);var a=s.getZoom()||0;r!==null&&a>r&&s.setZoom(r+1)}},100)}e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}},t.prototype.onMouseOver=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseover",this.cluster)},t.prototype.onMouseOut=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseout",this.cluster)},t.prototype.onAdd=function(){var e;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),(e=this.getPanes())===null||e===void 0||e.overlayMouseTarget.appendChild(this.div);var n=this.getMap();n!==null&&(this.boundsChangedListener=google.maps.event.addListener(n,"bounds_changed",this.onBoundsChanged),this.div.addEventListener("mousedown",this.onMouseDown),this.div.addEventListener("click",this.onClick),this.div.addEventListener("mouseover",this.onMouseOver),this.div.addEventListener("mouseout",this.onMouseOut))},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),this.boundsChangedListener!==null&&google.maps.event.removeListener(this.boundsChangedListener),this.div.removeEventListener("mousedown",this.onMouseDown),this.div.removeEventListener("click",this.onClick),this.div.removeEventListener("mouseover",this.onMouseOver),this.div.removeEventListener("mouseout",this.onMouseOut),this.div.parentNode.removeChild(this.div),this.timeOut!==null&&(window.clearTimeout(this.timeOut),this.timeOut=null),this.div=null)},t.prototype.draw=function(){if(this.visible&&this.div!==null&&this.center){var e=this.getPosFromLatLng(this.center);this.div.style.top=e!==null?"".concat(e.y,"px"):"0",this.div.style.left=e!==null?"".concat(e.x,"px"):"0"}},t.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},t.prototype.show=function(){var e,n,r,i,o,s;if(this.div&&this.center){var a=this.sums===null||typeof this.sums.title>"u"||this.sums.title===""?this.cluster.getClusterer().getTitle():this.sums.title,l=this.backgroundPosition.split(" "),u=parseInt(((e=l[0])===null||e===void 0?void 0:e.replace(/^\s+|\s+$/g,""))||"0",10),f=parseInt(((n=l[1])===null||n===void 0?void 0:n.replace(/^\s+|\s+$/g,""))||"0",10),d=this.getPosFromLatLng(this.center);this.div.className=this.className,this.div.setAttribute("style","cursor: pointer; position: absolute; top: ".concat(d!==null?"".concat(d.y,"px"):"0","; left: ").concat(d!==null?"".concat(d.x,"px"):"0","; width: ").concat(this.width,"px; height: ").concat(this.height,"px; "));var h=document.createElement("img");h.alt=a,h.src=this.url,h.width=this.width,h.height=this.height,h.setAttribute("style","position: absolute; top: ".concat(f,"px; left: ").concat(u,"px")),this.cluster.getClusterer().enableRetinaIcons||(h.style.clip="rect(-".concat(f,"px, -").concat(u+this.width,"px, -").concat(f+this.height,", -").concat(u,")"));var v=document.createElement("div");v.setAttribute("style","position: absolute; top: ".concat(this.anchorText[0],"px; left: ").concat(this.anchorText[1],"px; color: ").concat(this.textColor,"; font-size: ").concat(this.textSize,"px; font-family: ").concat(this.fontFamily,"; font-weight: ").concat(this.fontWeight,"; fontStyle: ").concat(this.fontStyle,"; text-decoration: ").concat(this.textDecoration,"; text-align: center; width: ").concat(this.width,"px; line-height: ").concat(this.height,"px")),!((r=this.sums)===null||r===void 0)&&r.text&&(v.innerText="".concat((i=this.sums)===null||i===void 0?void 0:i.text)),!((o=this.sums)===null||o===void 0)&&o.html&&(v.innerHTML="".concat((s=this.sums)===null||s===void 0?void 0:s.html)),this.div.innerHTML="",this.div.appendChild(h),this.div.appendChild(v),this.div.title=a,this.div.style.display=""}this.visible=!0},t.prototype.useStyle=function(e){this.sums=e;var n=this.cluster.getClusterer().getStyles(),r=n[Math.min(n.length-1,Math.max(0,e.index-1))];r&&(this.url=r.url,this.height=r.height,this.width=r.width,r.className&&(this.className="".concat(this.clusterClassName," ").concat(r.className)),this.anchorText=r.anchorText||[0,0],this.anchorIcon=r.anchorIcon||[this.height/2,this.width/2],this.textColor=r.textColor||"black",this.textSize=r.textSize||11,this.textDecoration=r.textDecoration||"none",this.fontWeight=r.fontWeight||"bold",this.fontStyle=r.fontStyle||"normal",this.fontFamily=r.fontFamily||"Arial,sans-serif",this.backgroundPosition=r.backgroundPosition||"0 0")},t.prototype.setCenter=function(e){this.center=e},t.prototype.getPosFromLatLng=function(e){var n=this.getProjection().fromLatLngToDivPixel(e);return n!==null&&(n.x-=this.anchorIcon[1],n.y-=this.anchorIcon[0]),n},t}(),H4=function(){function t(e){this.markerClusterer=e,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new z4(this,this.markerClusterer.getStyles()),this.getSize=this.getSize.bind(this),this.getMarkers=this.getMarkers.bind(this),this.getCenter=this.getCenter.bind(this),this.getMap=this.getMap.bind(this),this.getClusterer=this.getClusterer.bind(this),this.getBounds=this.getBounds.bind(this),this.remove=this.remove.bind(this),this.addMarker=this.addMarker.bind(this),this.isMarkerInClusterBounds=this.isMarkerInClusterBounds.bind(this),this.calculateBounds=this.calculateBounds.bind(this),this.updateIcon=this.updateIcon.bind(this),this.isMarkerAlreadyAdded=this.isMarkerAlreadyAdded.bind(this)}return t.prototype.getSize=function(){return this.markers.length},t.prototype.getMarkers=function(){return this.markers},t.prototype.getCenter=function(){return this.center},t.prototype.getMap=function(){return this.map},t.prototype.getClusterer=function(){return this.markerClusterer},t.prototype.getBounds=function(){for(var e=new google.maps.LatLngBounds(this.center,this.center),n=this.getMarkers(),r=0,i=n;r<i.length;r++){var o=i[r],s=o.getPosition();s&&e.extend(s)}return e},t.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},t.prototype.addMarker=function(e){var n;if(this.isMarkerAlreadyAdded(e))return!1;if(this.center){if(this.averageCenter){var r=e.getPosition();if(r){var i=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(i-1)+r.lat())/i,(this.center.lng()*(i-1)+r.lng())/i),this.calculateBounds()}}}else{var r=e.getPosition();r&&(this.center=r,this.calculateBounds())}e.isAdded=!0,this.markers.push(e);var o=this.markers.length,s=this.markerClusterer.getMaxZoom(),a=(n=this.map)===null||n===void 0?void 0:n.getZoom();if(s!==null&&typeof a<"u"&&a>s)e.getMap()!==this.map&&e.setMap(this.map);else if(o<this.minClusterSize)e.getMap()!==this.map&&e.setMap(this.map);else if(o===this.minClusterSize)for(var l=0,u=this.markers;l<u.length;l++){var f=u[l];f.setMap(null)}else e.setMap(null);return!0},t.prototype.isMarkerInClusterBounds=function(e){if(this.bounds!==null){var n=e.getPosition();if(n)return this.bounds.contains(n)}return!1},t.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},t.prototype.updateIcon=function(){var e,n=this.markers.length,r=this.markerClusterer.getMaxZoom(),i=(e=this.map)===null||e===void 0?void 0:e.getZoom();if(r!==null&&typeof i<"u"&&i>r){this.clusterIcon.hide();return}if(n<this.minClusterSize){this.clusterIcon.hide();return}this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show()},t.prototype.isMarkerAlreadyAdded=function(e){if(this.markers.includes)return this.markers.includes(e);for(var n=0;n<this.markers.length;n++)if(e===this.markers[n])return!0;return!1},t}();function $4(t,e){var n=t.length,r=n.toString().length,i=Math.min(r,e);return{text:n.toString(),index:i,title:""}}var W4=2e3,G4=500,Z4="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",q4="png",K4=[53,56,66,78,90],Q4="cluster",cp=function(){function t(e,n,r){n===void 0&&(n=[]),r===void 0&&(r={}),this.getMinimumClusterSize=this.getMinimumClusterSize.bind(this),this.setMinimumClusterSize=this.setMinimumClusterSize.bind(this),this.getEnableRetinaIcons=this.getEnableRetinaIcons.bind(this),this.setEnableRetinaIcons=this.setEnableRetinaIcons.bind(this),this.addToClosestCluster=this.addToClosestCluster.bind(this),this.getImageExtension=this.getImageExtension.bind(this),this.setImageExtension=this.setImageExtension.bind(this),this.getExtendedBounds=this.getExtendedBounds.bind(this),this.getAverageCenter=this.getAverageCenter.bind(this),this.setAverageCenter=this.setAverageCenter.bind(this),this.getTotalClusters=this.getTotalClusters.bind(this),this.fitMapToMarkers=this.fitMapToMarkers.bind(this),this.getIgnoreHidden=this.getIgnoreHidden.bind(this),this.setIgnoreHidden=this.setIgnoreHidden.bind(this),this.getClusterClass=this.getClusterClass.bind(this),this.setClusterClass=this.setClusterClass.bind(this),this.getTotalMarkers=this.getTotalMarkers.bind(this),this.getZoomOnClick=this.getZoomOnClick.bind(this),this.setZoomOnClick=this.setZoomOnClick.bind(this),this.getBatchSizeIE=this.getBatchSizeIE.bind(this),this.setBatchSizeIE=this.setBatchSizeIE.bind(this),this.createClusters=this.createClusters.bind(this),this.onZoomChanged=this.onZoomChanged.bind(this),this.getImageSizes=this.getImageSizes.bind(this),this.setImageSizes=this.setImageSizes.bind(this),this.getCalculator=this.getCalculator.bind(this),this.setCalculator=this.setCalculator.bind(this),this.removeMarkers=this.removeMarkers.bind(this),this.resetViewport=this.resetViewport.bind(this),this.getImagePath=this.getImagePath.bind(this),this.setImagePath=this.setImagePath.bind(this),this.pushMarkerTo=this.pushMarkerTo.bind(this),this.removeMarker=this.removeMarker.bind(this),this.clearMarkers=this.clearMarkers.bind(this),this.setupStyles=this.setupStyles.bind(this),this.getGridSize=this.getGridSize.bind(this),this.setGridSize=this.setGridSize.bind(this),this.getClusters=this.getClusters.bind(this),this.getMaxZoom=this.getMaxZoom.bind(this),this.setMaxZoom=this.setMaxZoom.bind(this),this.getMarkers=this.getMarkers.bind(this),this.addMarkers=this.addMarkers.bind(this),this.getStyles=this.getStyles.bind(this),this.setStyles=this.setStyles.bind(this),this.addMarker=this.addMarker.bind(this),this.onRemove=this.onRemove.bind(this),this.getTitle=this.getTitle.bind(this),this.setTitle=this.setTitle.bind(this),this.repaint=this.repaint.bind(this),this.onIdle=this.onIdle.bind(this),this.redraw=this.redraw.bind(this),this.onAdd=this.onAdd.bind(this),this.draw=this.draw.bind(this),this.extend=this.extend.bind(this),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=r.gridSize||60,this.minClusterSize=r.minimumClusterSize||2,this.maxZoom=r.maxZoom||null,this.styles=r.styles||[],this.title=r.title||"",this.zoomOnClick=!0,r.zoomOnClick!==void 0&&(this.zoomOnClick=r.zoomOnClick),this.averageCenter=!1,r.averageCenter!==void 0&&(this.averageCenter=r.averageCenter),this.ignoreHidden=!1,r.ignoreHidden!==void 0&&(this.ignoreHidden=r.ignoreHidden),this.enableRetinaIcons=!1,r.enableRetinaIcons!==void 0&&(this.enableRetinaIcons=r.enableRetinaIcons),this.imagePath=r.imagePath||Z4,this.imageExtension=r.imageExtension||q4,this.imageSizes=r.imageSizes||K4,this.calculator=r.calculator||$4,this.batchSize=r.batchSize||W4,this.batchSizeIE=r.batchSizeIE||G4,this.clusterClass=r.clusterClass||Q4,navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(n,!0),this.setMap(e)}return t.prototype.onZoomChanged=function(){var e,n;this.resetViewport(!1),(((e=this.getMap())===null||e===void 0?void 0:e.getZoom())===(this.get("minZoom")||0)||((n=this.getMap())===null||n===void 0?void 0:n.getZoom())===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")},t.prototype.onIdle=function(){this.redraw()},t.prototype.onAdd=function(){var e=this.getMap();this.activeMap=e,this.ready=!0,this.repaint(),e!==null&&(this.listeners=[google.maps.event.addListener(e,"zoom_changed",this.onZoomChanged),google.maps.event.addListener(e,"idle",this.onIdle)])},t.prototype.onRemove=function(){for(var e=0,n=this.markers;e<n.length;e++){var r=n[e];r.getMap()!==this.activeMap&&r.setMap(this.activeMap)}for(var i=0,o=this.clusters;i<o.length;i++){var s=o[i];s.remove()}this.clusters=[];for(var a=0,l=this.listeners;a<l.length;a++){var u=l[a];google.maps.event.removeListener(u)}this.listeners=[],this.activeMap=null,this.ready=!1},t.prototype.draw=function(){},t.prototype.getMap=function(){return null},t.prototype.getPanes=function(){return null},t.prototype.getProjection=function(){return{fromContainerPixelToLatLng:function(){return null},fromDivPixelToLatLng:function(){return null},fromLatLngToContainerPixel:function(){return null},fromLatLngToDivPixel:function(){return null},getVisibleRegion:function(){return null},getWorldWidth:function(){return 0}}},t.prototype.setMap=function(){},t.prototype.addListener=function(){return{remove:function(){}}},t.prototype.bindTo=function(){},t.prototype.get=function(){},t.prototype.notify=function(){},t.prototype.set=function(){},t.prototype.setValues=function(){},t.prototype.unbind=function(){},t.prototype.unbindAll=function(){},t.prototype.setupStyles=function(){if(!(this.styles.length>0))for(var e=0;e<this.imageSizes.length;e++)this.styles.push({url:"".concat(this.imagePath+(e+1),".").concat(this.imageExtension),height:this.imageSizes[e]||0,width:this.imageSizes[e]||0})},t.prototype.fitMapToMarkers=function(){for(var e=this.getMarkers(),n=new google.maps.LatLngBounds,r=0,i=e;r<i.length;r++){var o=i[r],s=o.getPosition();s&&n.extend(s)}var a=this.getMap();a!==null&&"fitBounds"in a&&a.fitBounds(n)},t.prototype.getGridSize=function(){return this.gridSize},t.prototype.setGridSize=function(e){this.gridSize=e},t.prototype.getMinimumClusterSize=function(){return this.minClusterSize},t.prototype.setMinimumClusterSize=function(e){this.minClusterSize=e},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.setMaxZoom=function(e){this.maxZoom=e},t.prototype.getStyles=function(){return this.styles},t.prototype.setStyles=function(e){this.styles=e},t.prototype.getTitle=function(){return this.title},t.prototype.setTitle=function(e){this.title=e},t.prototype.getZoomOnClick=function(){return this.zoomOnClick},t.prototype.setZoomOnClick=function(e){this.zoomOnClick=e},t.prototype.getAverageCenter=function(){return this.averageCenter},t.prototype.setAverageCenter=function(e){this.averageCenter=e},t.prototype.getIgnoreHidden=function(){return this.ignoreHidden},t.prototype.setIgnoreHidden=function(e){this.ignoreHidden=e},t.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},t.prototype.setEnableRetinaIcons=function(e){this.enableRetinaIcons=e},t.prototype.getImageExtension=function(){return this.imageExtension},t.prototype.setImageExtension=function(e){this.imageExtension=e},t.prototype.getImagePath=function(){return this.imagePath},t.prototype.setImagePath=function(e){this.imagePath=e},t.prototype.getImageSizes=function(){return this.imageSizes},t.prototype.setImageSizes=function(e){this.imageSizes=e},t.prototype.getCalculator=function(){return this.calculator},t.prototype.setCalculator=function(e){this.calculator=e},t.prototype.getBatchSizeIE=function(){return this.batchSizeIE},t.prototype.setBatchSizeIE=function(e){this.batchSizeIE=e},t.prototype.getClusterClass=function(){return this.clusterClass},t.prototype.setClusterClass=function(e){this.clusterClass=e},t.prototype.getMarkers=function(){return this.markers},t.prototype.getTotalMarkers=function(){return this.markers.length},t.prototype.getClusters=function(){return this.clusters},t.prototype.getTotalClusters=function(){return this.clusters.length},t.prototype.addMarker=function(e,n){this.pushMarkerTo(e),n||this.redraw()},t.prototype.addMarkers=function(e,n){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=e[r];i&&this.pushMarkerTo(i)}n||this.redraw()},t.prototype.pushMarkerTo=function(e){var n=this;e.getDraggable()&&google.maps.event.addListener(e,"dragend",function(){n.ready&&(e.isAdded=!1,n.repaint())}),e.isAdded=!1,this.markers.push(e)},t.prototype.removeMarker_=function(e){var n=-1;if(this.markers.indexOf)n=this.markers.indexOf(e);else for(var r=0;r<this.markers.length;r++)if(e===this.markers[r]){n=r;break}return n===-1?!1:(e.setMap(null),this.markers.splice(n,1),!0)},t.prototype.removeMarker=function(e,n){var r=this.removeMarker_(e);return!n&&r&&this.repaint(),r},t.prototype.removeMarkers=function(e,n){for(var r=!1,i=0,o=e;i<o.length;i++){var s=o[i];r=r||this.removeMarker_(s)}return!n&&r&&this.repaint(),r},t.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},t.prototype.repaint=function(){var e=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout(function(){for(var r=0,i=e;r<i.length;r++){var o=i[r];o.remove()}},0)},t.prototype.getExtendedBounds=function(e){var n=this.getProjection(),r=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getNorthEast().lat(),e.getNorthEast().lng()));r!==null&&(r.x+=this.gridSize,r.y-=this.gridSize);var i=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getSouthWest().lat(),e.getSouthWest().lng()));if(i!==null&&(i.x-=this.gridSize,i.y+=this.gridSize),r!==null){var o=n.fromDivPixelToLatLng(r);o!==null&&e.extend(o)}if(i!==null){var s=n.fromDivPixelToLatLng(i);s!==null&&e.extend(s)}return e},t.prototype.redraw=function(){this.createClusters(0)},t.prototype.resetViewport=function(e){for(var n=0,r=this.clusters;n<r.length;n++){var i=r[n];i.remove()}this.clusters=[];for(var o=0,s=this.markers;o<s.length;o++){var a=s[o];a.isAdded=!1,e&&a.setMap(null)}},t.prototype.distanceBetweenPoints=function(e,n){var r=6371,i=(n.lat()-e.lat())*Math.PI/180,o=(n.lng()-e.lng())*Math.PI/180,s=Math.sin(i/2)*Math.sin(i/2)+Math.cos(e.lat()*Math.PI/180)*Math.cos(n.lat()*Math.PI/180)*Math.sin(o/2)*Math.sin(o/2);return r*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))},t.prototype.isMarkerInBounds=function(e,n){var r=e.getPosition();return r?n.contains(r):!1},t.prototype.addToClosestCluster=function(e){for(var n,r=4e4,i=null,o=0,s=this.clusters;o<s.length;o++){var a=s[o];n=a;var l=n.getCenter(),u=e.getPosition();if(l&&u){var f=this.distanceBetweenPoints(l,u);f<r&&(r=f,i=n)}}i&&i.isMarkerInClusterBounds(e)?i.addMarker(e):(n=new H4(this),n.addMarker(e),this.clusters.push(n))},t.prototype.createClusters=function(e){var n=this;if(this.ready){e===0&&(google.maps.event.trigger(this,"clusteringbegin",this),this.timerRefStatic!==null&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var r=this.getMap(),i=r!==null&&("getBounds"in r)?r.getBounds():null,o=(r==null?void 0:r.getZoom())||0,s=o>3?new google.maps.LatLngBounds(i==null?void 0:i.getSouthWest(),i==null?void 0:i.getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),a=this.getExtendedBounds(s),l=Math.min(e+this.batchSize,this.markers.length),u=e;u<l;u++){var f=this.markers[u];f&&!f.isAdded&&this.isMarkerInBounds(f,a)&&(!this.ignoreHidden||this.ignoreHidden&&f.getVisible())&&this.addToClosestCluster(f)}if(l<this.markers.length)this.timerRefStatic=window.setTimeout(function(){n.createClusters(l)},0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(var d=0,h=this.clusters;d<h.length;d++){var v=h[d];v.updateIcon()}}}},t.prototype.extend=function(e,n){return(function(i){for(var o in i.prototype){var s=o;this.prototype[s]=i.prototype[s]}return this}).apply(e,[n])},t}(),Rt={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},Ee={averageCenter:function(t,e){t.setAverageCenter(e)},batchSizeIE:function(t,e){t.setBatchSizeIE(e)},calculator:function(t,e){t.setCalculator(e)},clusterClass:function(t,e){t.setClusterClass(e)},enableRetinaIcons:function(t,e){t.setEnableRetinaIcons(e)},gridSize:function(t,e){t.setGridSize(e)},ignoreHidden:function(t,e){t.setIgnoreHidden(e)},imageExtension:function(t,e){t.setImageExtension(e)},imagePath:function(t,e){t.setImagePath(e)},imageSizes:function(t,e){t.setImageSizes(e)},maxZoom:function(t,e){t.setMaxZoom(e)},minimumClusterSize:function(t,e){t.setMinimumClusterSize(e)},styles:function(t,e){t.setStyles(e)},title:function(t,e){t.setTitle(e)},zoomOnClick:function(t,e){t.setZoomOnClick(e)}},J4={};function Y4(t){var e=t.children,n=t.options,r=t.averageCenter,i=t.batchSizeIE,o=t.calculator,s=t.clusterClass,a=t.enableRetinaIcons,l=t.gridSize,u=t.ignoreHidden,f=t.imageExtension,d=t.imagePath,h=t.imageSizes,v=t.maxZoom,y=t.minimumClusterSize,g=t.styles,w=t.title,C=t.zoomOnClick,L=t.onClick,m=t.onClusteringBegin,_=t.onClusteringEnd,x=t.onMouseOver,p=t.onMouseOut,b=t.onLoad,E=t.onUnmount,P=c.useState(null),O=P[0],T=P[1],M=c.useContext(le),R=c.useState(null),A=R[0],B=R[1],V=c.useState(null),N=V[0],z=V[1],Y=c.useState(null),G=Y[0],H=Y[1],Q=c.useState(null),oe=Q[0],te=Q[1],ee=c.useState(null),D=ee[0],pe=ee[1];return c.useEffect(function(){O&&p&&(oe!==null&&google.maps.event.removeListener(oe),te(google.maps.event.addListener(O,Rt.onMouseOut,p)))},[p]),c.useEffect(function(){O&&x&&(D!==null&&google.maps.event.removeListener(D),pe(google.maps.event.addListener(O,Rt.onMouseOver,x)))},[x]),c.useEffect(function(){O&&L&&(A!==null&&google.maps.event.removeListener(A),B(google.maps.event.addListener(O,Rt.onClick,L)))},[L]),c.useEffect(function(){O&&m&&(N!==null&&google.maps.event.removeListener(N),z(google.maps.event.addListener(O,Rt.onClusteringBegin,m)))},[m]),c.useEffect(function(){O&&_&&(G!==null&&google.maps.event.removeListener(G),z(google.maps.event.addListener(O,Rt.onClusteringEnd,_)))},[_]),c.useEffect(function(){typeof r<"u"&&O!==null&&Ee.averageCenter(O,r)},[O,r]),c.useEffect(function(){typeof i<"u"&&O!==null&&Ee.batchSizeIE(O,i)},[O,i]),c.useEffect(function(){typeof o<"u"&&O!==null&&Ee.calculator(O,o)},[O,o]),c.useEffect(function(){typeof s<"u"&&O!==null&&Ee.clusterClass(O,s)},[O,s]),c.useEffect(function(){typeof a<"u"&&O!==null&&Ee.enableRetinaIcons(O,a)},[O,a]),c.useEffect(function(){typeof l<"u"&&O!==null&&Ee.gridSize(O,l)},[O,l]),c.useEffect(function(){typeof u<"u"&&O!==null&&Ee.ignoreHidden(O,u)},[O,u]),c.useEffect(function(){typeof f<"u"&&O!==null&&Ee.imageExtension(O,f)},[O,f]),c.useEffect(function(){typeof d<"u"&&O!==null&&Ee.imagePath(O,d)},[O,d]),c.useEffect(function(){typeof h<"u"&&O!==null&&Ee.imageSizes(O,h)},[O,h]),c.useEffect(function(){typeof v<"u"&&O!==null&&Ee.maxZoom(O,v)},[O,v]),c.useEffect(function(){typeof y<"u"&&O!==null&&Ee.minimumClusterSize(O,y)},[O,y]),c.useEffect(function(){typeof g<"u"&&O!==null&&Ee.styles(O,g)},[O,g]),c.useEffect(function(){typeof w<"u"&&O!==null&&Ee.title(O,w)},[O,w]),c.useEffect(function(){typeof C<"u"&&O!==null&&Ee.zoomOnClick(O,C)},[O,C]),c.useEffect(function(){if(M){var Pe=K({},n||J4),Z=new cp(M,[],Pe);return r&&Ee.averageCenter(Z,r),i&&Ee.batchSizeIE(Z,i),o&&Ee.calculator(Z,o),s&&Ee.clusterClass(Z,s),a&&Ee.enableRetinaIcons(Z,a),l&&Ee.gridSize(Z,l),u&&Ee.ignoreHidden(Z,u),f&&Ee.imageExtension(Z,f),d&&Ee.imagePath(Z,d),h&&Ee.imageSizes(Z,h),v&&Ee.maxZoom(Z,v),y&&Ee.minimumClusterSize(Z,y),g&&Ee.styles(Z,g),w&&Ee.title(Z,w),C&&Ee.zoomOnClick(Z,C),p&&te(google.maps.event.addListener(Z,Rt.onMouseOut,p)),x&&pe(google.maps.event.addListener(Z,Rt.onMouseOver,x)),L&&B(google.maps.event.addListener(Z,Rt.onClick,L)),m&&z(google.maps.event.addListener(Z,Rt.onClusteringBegin,m)),_&&H(google.maps.event.addListener(Z,Rt.onClusteringEnd,_)),T(Z),b&&b(Z),function(){oe!==null&&google.maps.event.removeListener(oe),D!==null&&google.maps.event.removeListener(D),A!==null&&google.maps.event.removeListener(A),N!==null&&google.maps.event.removeListener(N),G!==null&&google.maps.event.removeListener(G),E&&E(Z)}}},[]),O!==null&&e(O)||null}c.memo(Y4);var X4=function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={markerClusterer:null},n.setClustererCallback=function(){n.state.markerClusterer!==null&&n.props.onLoad&&n.props.onLoad(n.state.markerClusterer)},n}return e.prototype.componentDidMount=function(){if(this.context){var n=new cp(this.context,[],this.props.options);this.registeredEvents=ce({updaterMap:Ee,eventMap:Rt,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{markerClusterer:n}},this.setClustererCallback)}},e.prototype.componentDidUpdate=function(n){this.state.markerClusterer&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Ee,eventMap:Rt,prevProps:n,nextProps:this.props,instance:this.state.markerClusterer}))},e.prototype.componentWillUnmount=function(){this.state.markerClusterer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),he(this.registeredEvents),this.state.markerClusterer.setMap(null))},e.prototype.render=function(){return this.state.markerClusterer!==null?this.props.children(this.state.markerClusterer):null},e.contextType=le,e}(c.PureComponent);function Ic(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}var fp=function(){function t(e){e===void 0&&(e={}),this.getCloseClickHandler=this.getCloseClickHandler.bind(this),this.closeClickHandler=this.closeClickHandler.bind(this),this.createInfoBoxDiv=this.createInfoBoxDiv.bind(this),this.addClickHandler=this.addClickHandler.bind(this),this.getCloseBoxImg=this.getCloseBoxImg.bind(this),this.getBoxWidths=this.getBoxWidths.bind(this),this.setBoxStyle=this.setBoxStyle.bind(this),this.setPosition=this.setPosition.bind(this),this.getPosition=this.getPosition.bind(this),this.setOptions=this.setOptions.bind(this),this.setContent=this.setContent.bind(this),this.setVisible=this.setVisible.bind(this),this.getContent=this.getContent.bind(this),this.getVisible=this.getVisible.bind(this),this.setZIndex=this.setZIndex.bind(this),this.getZIndex=this.getZIndex.bind(this),this.onRemove=this.onRemove.bind(this),this.panBox=this.panBox.bind(this),this.extend=this.extend.bind(this),this.close=this.close.bind(this),this.draw=this.draw.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.open=this.open.bind(this),this.extend(t,google.maps.OverlayView),this.content=e.content||"",this.disableAutoPan=e.disableAutoPan||!1,this.maxWidth=e.maxWidth||0,this.pixelOffset=e.pixelOffset||new google.maps.Size(0,0),this.position=e.position||new google.maps.LatLng(0,0),this.zIndex=e.zIndex||null,this.boxClass=e.boxClass||"infoBox",this.boxStyle=e.boxStyle||{},this.closeBoxMargin=e.closeBoxMargin||"2px",this.closeBoxURL=e.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",e.closeBoxURL===""&&(this.closeBoxURL=""),this.infoBoxClearance=e.infoBoxClearance||new google.maps.Size(1,1),typeof e.visible>"u"&&(typeof e.isHidden>"u"?e.visible=!0:e.visible=!e.isHidden),this.isHidden=!e.visible,this.alignBottom=e.alignBottom||!1,this.pane=e.pane||"floatPane",this.enableEventPropagation=e.enableEventPropagation||!1,this.div=null,this.closeListener=null,this.moveListener=null,this.mapListener=null,this.contextListener=null,this.eventListeners=null,this.fixedWidthSet=null}return t.prototype.createInfoBoxDiv=function(){var e=this,n=function(u){u.returnValue=!1,u.preventDefault&&u.preventDefault(),e.enableEventPropagation||Ic(u)};if(!this.div){this.div=document.createElement("div"),this.setBoxStyle(),typeof this.content=="string"?this.div.innerHTML=this.getCloseBoxImg()+this.content:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(this.content));var r=this.getPanes();if(r!==null&&r[this.pane].appendChild(this.div),this.addClickHandler(),this.div.style.width)this.fixedWidthSet=!0;else if(this.maxWidth!==0&&this.div.offsetWidth>this.maxWidth)this.div.style.width=this.maxWidth+"px",this.fixedWidthSet=!0;else{var i=this.getBoxWidths();this.div.style.width=this.div.offsetWidth-i.left-i.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var o=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],s=0,a=o;s<a.length;s++){var l=a[s];this.eventListeners.push(google.maps.event.addListener(this.div,l,Ic))}this.eventListeners.push(google.maps.event.addListener(this.div,"mouseover",function(){e.div&&(e.div.style.cursor="default")}))}this.contextListener=google.maps.event.addListener(this.div,"contextmenu",n),google.maps.event.trigger(this,"domready")}},t.prototype.getCloseBoxImg=function(){var e="";return this.closeBoxURL!==""&&(e='<img alt=""',e+=' aria-hidden="true"',e+=" src='"+this.closeBoxURL+"'",e+=" align=right",e+=" style='",e+=" position: relative;",e+=" cursor: pointer;",e+=" margin: "+this.closeBoxMargin+";",e+="'>"),e},t.prototype.addClickHandler=function(){this.closeListener=this.div&&this.div.firstChild&&this.closeBoxURL!==""?google.maps.event.addListener(this.div.firstChild,"click",this.getCloseClickHandler()):null},t.prototype.closeClickHandler=function(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation(),google.maps.event.trigger(this,"closeclick"),this.close()},t.prototype.getCloseClickHandler=function(){return this.closeClickHandler},t.prototype.panBox=function(e){if(this.div&&!e){var n=this.getMap();if(n instanceof google.maps.Map){var r=0,i=0,o=n.getBounds();o&&!o.contains(this.position)&&n.setCenter(this.position);var s=n.getDiv(),a=s.offsetWidth,l=s.offsetHeight,u=this.pixelOffset.width,f=this.pixelOffset.height,d=this.div.offsetWidth,h=this.div.offsetHeight,v=this.infoBoxClearance.width,y=this.infoBoxClearance.height,g=this.getProjection(),w=g.fromLatLngToContainerPixel(this.position);w!==null&&(w.x<-u+v?r=w.x+u-v:w.x+d+u+v>a&&(r=w.x+d+u+v-a),this.alignBottom?w.y<-f+y+h?i=w.y+f-y-h:w.y+f+y>l&&(i=w.y+f+y-l):w.y<-f+y?i=w.y+f-y:w.y+h+f+y>l&&(i=w.y+h+f+y-l)),r===0&&i===0||n.panBy(r,i)}}},t.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var e=this.boxStyle;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(this.div.style[n]=e[n]);if(this.div.style.webkitTransform="translateZ(0)",typeof this.div.style.opacity<"u"&&this.div.style.opacity!==""){var r=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+r*100+')"',this.div.style.filter="alpha(opacity="+r*100+")"}this.div.style.position="absolute",this.div.style.visibility="hidden",this.zIndex!==null&&(this.div.style.zIndex=this.zIndex+""),this.div.style.overflow||(this.div.style.overflow="auto")}},t.prototype.getBoxWidths=function(){var e={top:0,bottom:0,left:0,right:0};if(!this.div)return e;if(document.defaultView){var n=this.div.ownerDocument,r=n&&n.defaultView?n.defaultView.getComputedStyle(this.div,""):null;r&&(e.top=parseInt(r.borderTopWidth||"",10)||0,e.bottom=parseInt(r.borderBottomWidth||"",10)||0,e.left=parseInt(r.borderLeftWidth||"",10)||0,e.right=parseInt(r.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var i=this.div.currentStyle;i&&(e.top=parseInt(i.borderTopWidth||"",10)||0,e.bottom=parseInt(i.borderBottomWidth||"",10)||0,e.left=parseInt(i.borderLeftWidth||"",10)||0,e.right=parseInt(i.borderRightWidth||"",10)||0)}return e},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},t.prototype.draw=function(){if(this.createInfoBoxDiv(),this.div){var e=this.getProjection(),n=e.fromLatLngToDivPixel(this.position);n!==null&&(this.div.style.left=n.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(n.y+this.pixelOffset.height)+"px":this.div.style.top=n.y+this.pixelOffset.height+"px"),this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},t.prototype.setOptions=function(e){e===void 0&&(e={}),typeof e.boxClass<"u"&&(this.boxClass=e.boxClass,this.setBoxStyle()),typeof e.boxStyle<"u"&&(this.boxStyle=e.boxStyle,this.setBoxStyle()),typeof e.content<"u"&&this.setContent(e.content),typeof e.disableAutoPan<"u"&&(this.disableAutoPan=e.disableAutoPan),typeof e.maxWidth<"u"&&(this.maxWidth=e.maxWidth),typeof e.pixelOffset<"u"&&(this.pixelOffset=e.pixelOffset),typeof e.alignBottom<"u"&&(this.alignBottom=e.alignBottom),typeof e.position<"u"&&this.setPosition(e.position),typeof e.zIndex<"u"&&this.setZIndex(e.zIndex),typeof e.closeBoxMargin<"u"&&(this.closeBoxMargin=e.closeBoxMargin),typeof e.closeBoxURL<"u"&&(this.closeBoxURL=e.closeBoxURL),typeof e.infoBoxClearance<"u"&&(this.infoBoxClearance=e.infoBoxClearance),typeof e.isHidden<"u"&&(this.isHidden=e.isHidden),typeof e.visible<"u"&&(this.isHidden=!e.visible),typeof e.enableEventPropagation<"u"&&(this.enableEventPropagation=e.enableEventPropagation),this.div&&this.draw()},t.prototype.setContent=function(e){this.content=e,this.div&&(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.fixedWidthSet||(this.div.style.width=""),typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e)),this.fixedWidthSet||(this.div.style.width=this.div.offsetWidth+"px",typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},t.prototype.setPosition=function(e){this.position=e,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},t.prototype.setVisible=function(e){this.isHidden=!e,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},t.prototype.setZIndex=function(e){this.zIndex=e,this.div&&(this.div.style.zIndex=e+""),google.maps.event.trigger(this,"zindex_changed")},t.prototype.getContent=function(){return this.content},t.prototype.getPosition=function(){return this.position},t.prototype.getZIndex=function(){return this.zIndex},t.prototype.getVisible=function(){var e=this.getMap();return typeof e>"u"||e===null?!1:!this.isHidden},t.prototype.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},t.prototype.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},t.prototype.open=function(e,n){var r=this;n&&(this.position=n.getPosition(),this.moveListener=google.maps.event.addListener(n,"position_changed",function(){var i=n.getPosition();r.setPosition(i)}),this.mapListener=google.maps.event.addListener(n,"map_changed",function(){r.setMap(n.map)})),this.setMap(e),this.div&&this.panBox()},t.prototype.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var e=0,n=this.eventListeners;e<n.length;e++){var r=n[e];google.maps.event.removeListener(r)}this.eventListeners=null}this.moveListener&&(google.maps.event.removeListener(this.moveListener),this.moveListener=null),this.mapListener&&(google.maps.event.removeListener(this.mapListener),this.mapListener=null),this.contextListener&&(google.maps.event.removeListener(this.contextListener),this.contextListener=null),this.setMap(null)},t.prototype.extend=function(e,n){return(function(i){for(var o in i.prototype)Object.prototype.hasOwnProperty.call(this,o)||(this.prototype[o]=i.prototype[o]);return this}).apply(e,[n])},t}(),jc={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Nc={options:function(t,e){t.setOptions(e)},position:function(t,e){e instanceof google.maps.LatLng?t.setPosition(e):t.setPosition(new google.maps.LatLng(e.lat,e.lng))},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},eC={};function tC(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,o=t.zIndex,s=t.onCloseClick,a=t.onDomReady,l=t.onContentChanged,u=t.onPositionChanged,f=t.onZindexChanged,d=t.onLoad,h=t.onUnmount,v=c.useContext(le),y=c.useState(null),g=y[0],w=y[1],C=c.useState(null),L=C[0],m=C[1],_=c.useState(null),x=_[0],p=_[1],b=c.useState(null),E=b[0],P=b[1],O=c.useState(null),T=O[0],M=O[1],R=c.useState(null),A=R[0],B=R[1],V=c.useRef(null);return c.useEffect(function(){v&&g!==null&&(g.close(),n?g.open(v,n):g.getPosition()&&g.open(v))},[v,g,n]),c.useEffect(function(){r&&g!==null&&g.setOptions(r)},[g,r]),c.useEffect(function(){if(i&&g!==null){var N=i instanceof google.maps.LatLng?i:new google.maps.LatLng(i.lat,i.lng);g.setPosition(N)}},[i]),c.useEffect(function(){typeof o=="number"&&g!==null&&g.setZIndex(o)},[o]),c.useEffect(function(){g&&s&&(L!==null&&google.maps.event.removeListener(L),m(google.maps.event.addListener(g,"closeclick",s)))},[s]),c.useEffect(function(){g&&a&&(x!==null&&google.maps.event.removeListener(x),p(google.maps.event.addListener(g,"domready",a)))},[a]),c.useEffect(function(){g&&l&&(E!==null&&google.maps.event.removeListener(E),P(google.maps.event.addListener(g,"content_changed",l)))},[l]),c.useEffect(function(){g&&u&&(T!==null&&google.maps.event.removeListener(T),M(google.maps.event.addListener(g,"position_changed",u)))},[u]),c.useEffect(function(){g&&f&&(A!==null&&google.maps.event.removeListener(A),B(google.maps.event.addListener(g,"zindex_changed",f)))},[f]),c.useEffect(function(){if(v){var N=r||eC,z=N.position,Y=Zl(N,["position"]),G=void 0;z&&!(z instanceof google.maps.LatLng)&&(G=new google.maps.LatLng(z.lat,z.lng));var H=new fp(K(K({},Y),G?{position:G}:{}));V.current=document.createElement("div"),w(H),s&&m(google.maps.event.addListener(H,"closeclick",s)),a&&p(google.maps.event.addListener(H,"domready",a)),l&&P(google.maps.event.addListener(H,"content_changed",l)),u&&M(google.maps.event.addListener(H,"position_changed",u)),f&&B(google.maps.event.addListener(H,"zindex_changed",f)),H.setContent(V.current),n?H.open(v,n):H.getPosition()?H.open(v):Ye(!1,"You must provide either an anchor or a position prop for <InfoBox>."),d&&d(H)}return function(){g!==null&&(L&&google.maps.event.removeListener(L),E&&google.maps.event.removeListener(E),x&&google.maps.event.removeListener(x),T&&google.maps.event.removeListener(T),A&&google.maps.event.removeListener(A),h&&h(g),g.close())}},[]),V.current?ti.createPortal(c.Children.only(e),V.current):null}c.memo(tC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoBox:null},n.open=function(r,i){i?n.context!==null&&r.open(n.context,i):r.getPosition()?n.context!==null&&r.open(n.context):Ye(!1,"You must provide either an anchor or a position prop for <InfoBox>.")},n.setInfoBoxCallback=function(){n.state.infoBox!==null&&n.containerElement!==null&&(n.state.infoBox.setContent(n.containerElement),n.open(n.state.infoBox,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoBox))},n}return e.prototype.componentDidMount=function(){var n=this.props.options||{},r=n.position,i=Zl(n,["position"]),o;r&&!(r instanceof google.maps.LatLng)&&(o=new google.maps.LatLng(r.lat,r.lng));var s=new fp(K(K({},i),o?{position:o}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=ce({updaterMap:Nc,eventMap:jc,prevProps:{},nextProps:this.props,instance:s}),this.setState({infoBox:s},this.setInfoBoxCallback)},e.prototype.componentDidUpdate=function(n){var r=this.state.infoBox;r!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Nc,eventMap:jc,prevProps:n,nextProps:this.props,instance:r}))},e.prototype.componentWillUnmount=function(){var n=this.props.onUnmount,r=this.state.infoBox;r!==null&&(n&&n(r),he(this.registeredEvents),r.close())},e.prototype.render=function(){return this.containerElement?ti.createPortal(c.Children.only(this.props.children),this.containerElement):null},e.contextType=le,e})(c.PureComponent);var nC=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,o;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(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n},Bc=rp(nC);const Fc=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],ca=1,bi=8;class ql{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!==ca)throw new Error(`Got v${i} data when expected v${ca}.`);const o=Fc[r&15];if(!o)throw new Error("Unrecognized array type.");const[s]=new Uint16Array(e,2,1),[a]=new Uint32Array(e,4,1);return new ql(a,s,o,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 o=Fc.indexOf(this.ArrayType),s=e*2*this.ArrayType.BYTES_PER_ELEMENT,a=e*this.IndexArrayType.BYTES_PER_ELEMENT,l=(8-a%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${r}.`);i&&i instanceof ArrayBuffer?(this.data=i,this.ids=new this.IndexArrayType(this.data,bi,e),this.coords=new this.ArrayType(this.data,bi+a+l,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(bi+s+a+l),this.ids=new this.IndexArrayType(this.data,bi,e),this.coords=new this.ArrayType(this.data,bi+a+l,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(ca<<4)+o]),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 ml(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:o,coords:s,nodeSize:a}=this,l=[0,o.length-1,0],u=[];for(;l.length;){const f=l.pop()||0,d=l.pop()||0,h=l.pop()||0;if(d-h<=a){for(let w=h;w<=d;w++){const C=s[2*w],L=s[2*w+1];C>=e&&C<=r&&L>=n&&L<=i&&u.push(o[w])}continue}const v=h+d>>1,y=s[2*v],g=s[2*v+1];y>=e&&y<=r&&g>=n&&g<=i&&u.push(o[v]),(f===0?e<=y:n<=g)&&(l.push(h),l.push(v-1),l.push(1-f)),(f===0?r>=y:i>=g)&&(l.push(v+1),l.push(d),l.push(1-f))}return u}within(e,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:o,nodeSize:s}=this,a=[0,i.length-1,0],l=[],u=r*r;for(;a.length;){const f=a.pop()||0,d=a.pop()||0,h=a.pop()||0;if(d-h<=s){for(let w=h;w<=d;w++)Uc(o[2*w],o[2*w+1],e,n)<=u&&l.push(i[w]);continue}const v=h+d>>1,y=o[2*v],g=o[2*v+1];Uc(y,g,e,n)<=u&&l.push(i[v]),(f===0?e-r<=y:n-r<=g)&&(a.push(h),a.push(v-1),a.push(1-f)),(f===0?e+r>=y:n+r>=g)&&(a.push(v+1),a.push(d),a.push(1-f))}return l}}function ml(t,e,n,r,i,o){if(i-r<=n)return;const s=r+i>>1;dp(t,e,s,r,i,o),ml(t,e,n,r,s-1,1-o),ml(t,e,n,s+1,i,1-o)}function dp(t,e,n,r,i,o){for(;i>r;){if(i-r>600){const u=i-r+1,f=n-r+1,d=Math.log(u),h=.5*Math.exp(2*d/3),v=.5*Math.sqrt(d*h*(u-h)/u)*(f-u/2<0?-1:1),y=Math.max(r,Math.floor(n-f*h/u+v)),g=Math.min(i,Math.floor(n+(u-f)*h/u+v));dp(t,e,n,y,g,o)}const s=e[2*n+o];let a=r,l=i;for(Ci(t,e,r,n),e[2*i+o]>s&&Ci(t,e,r,i);a<l;){for(Ci(t,e,a,l),a++,l--;e[2*a+o]<s;)a++;for(;e[2*l+o]>s;)l--}e[2*r+o]===s?Ci(t,e,r,l):(l++,Ci(t,e,l,i)),l<=n&&(r=l+1),n<=l&&(i=l-1)}}function Ci(t,e,n,r){fa(t,n,r),fa(e,2*n,2*r),fa(e,2*n+1,2*r+1)}function fa(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Uc(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}const rC={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},Vc=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),Qn=2,Pn=3,da=4,Mn=5,hp=6;class iC{constructor(e){this.options=Object.assign(Object.create(rC),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 o=`prepare ${e.length} points`;n&&console.time(o),this.points=e;const s=[];for(let l=0;l<e.length;l++){const u=e[l];if(!u.geometry)continue;const[f,d]=u.geometry.coordinates,h=Vc(Bo(f)),v=Vc(Fo(d));s.push(h,v,1/0,l,-1,1),this.options.reduce&&s.push(0)}let a=this.trees[i+1]=this._createTree(s);n&&console.timeEnd(o);for(let l=i;l>=r;l--){const u=+Date.now();a=this.trees[l]=this._createTree(this._cluster(a,l)),n&&console.log("z%d: %d clusters in %dms",l,a.numItems,+Date.now()-u)}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 o=e[2]===180?180:((e[2]+180)%360+360)%360-180;const s=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,o=180;else if(r>o){const d=this.getClusters([r,i,180,s],n),h=this.getClusters([-180,i,o,s],n);return d.concat(h)}const a=this.trees[this._limitZoom(n)],l=a.range(Bo(r),Fo(s),Bo(o),Fo(i)),u=a.data,f=[];for(const d of l){const h=this.stride*d;f.push(u[h+Mn]>1?zc(u,h,this.clusterProps):this.points[u[h+Pn]])}return f}getChildren(e){const n=this._getOriginId(e),r=this._getOriginZoom(e),i="No cluster with the specified id.",o=this.trees[r];if(!o)throw new Error(i);const s=o.data;if(n*this.stride>=s.length)throw new Error(i);const a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),l=s[n*this.stride],u=s[n*this.stride+1],f=o.within(l,u,a),d=[];for(const h of f){const v=h*this.stride;s[v+da]===e&&d.push(s[v+Mn]>1?zc(s,v,this.clusterProps):this.points[s[v+Pn]])}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)],o=Math.pow(2,e),{extent:s,radius:a}=this.options,l=a/s,u=(r-l)/o,f=(r+1+l)/o,d={features:[]};return this._addTileFeatures(i.range((n-l)/o,u,(n+1+l)/o,f),i.data,n,r,o,d),n===0&&this._addTileFeatures(i.range(1-l/o,u,1,f),i.data,o,r,o,d),n===o-1&&this._addTileFeatures(i.range(0,u,l/o,f),i.data,-1,r,o,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,o){const s=this.getChildren(n);for(const a of s){const l=a.properties;if(l&&l.cluster?o+l.point_count<=i?o+=l.point_count:o=this._appendLeaves(e,l.cluster_id,r,i,o):o<i?o++:e.push(a),e.length===r)break}return o}_createTree(e){const n=new ql(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,o,s){for(const a of e){const l=a*this.stride,u=n[l+Mn]>1;let f,d,h;if(u)f=pp(n,l,this.clusterProps),d=n[l],h=n[l+1];else{const g=this.points[n[l+Pn]];f=g.properties;const[w,C]=g.geometry.coordinates;d=Bo(w),h=Fo(C)}const v={type:1,geometry:[[Math.round(this.options.extent*(d*o-r)),Math.round(this.options.extent*(h*o-i))]],tags:f};let y;u||this.options.generateId?y=n[l+Pn]:y=this.points[n[l+Pn]].id,y!==void 0&&(v.id=y),s.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:o,minPoints:s}=this.options,a=r/(i*Math.pow(2,n)),l=e.data,u=[],f=this.stride;for(let d=0;d<l.length;d+=f){if(l[d+Qn]<=n)continue;l[d+Qn]=n;const h=l[d],v=l[d+1],y=e.within(l[d],l[d+1],a),g=l[d+Mn];let w=g;for(const C of y){const L=C*f;l[L+Qn]>n&&(w+=l[L+Mn])}if(w>g&&w>=s){let C=h*g,L=v*g,m,_=-1;const x=((d/f|0)<<5)+(n+1)+this.points.length;for(const p of y){const b=p*f;if(l[b+Qn]<=n)continue;l[b+Qn]=n;const E=l[b+Mn];C+=l[b]*E,L+=l[b+1]*E,l[b+da]=x,o&&(m||(m=this._map(l,d,!0),_=this.clusterProps.length,this.clusterProps.push(m)),o(m,this._map(l,b)))}l[d+da]=x,u.push(C/w,L/w,1/0,x,-1,w),o&&u.push(_)}else{for(let C=0;C<f;C++)u.push(l[d+C]);if(w>1)for(const C of y){const L=C*f;if(!(l[L+Qn]<=n)){l[L+Qn]=n;for(let m=0;m<f;m++)u.push(l[L+m])}}}}return u}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,n,r){if(e[n+Mn]>1){const s=this.clusterProps[e[n+hp]];return r?Object.assign({},s):s}const i=this.points[e[n+Pn]].properties,o=this.options.map(i);return r&&o===i?Object.assign({},o):o}}function zc(t,e,n){return{type:"Feature",id:t[e+Pn],properties:pp(t,e,n),geometry:{type:"Point",coordinates:[oC(t[e]),sC(t[e+1])]}}}function pp(t,e,n){const r=t[e+Mn],i=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,o=t[e+hp],s=o===-1?{}:Object.assign({},n[o]);return Object.assign(s,{cluster:!0,cluster_id:t[e+Pn],point_count:r,point_count_abbreviated:i})}function Bo(t){return t/360+.5}function Fo(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 oC(t){return(t-.5)*360}function sC(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
|
|
246
246
|
Copyright (c) Microsoft Corporation.
|
|
247
247
|
|
|
248
248
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -255,9 +255,9 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
255
255
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
256
256
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
257
257
|
PERFORMANCE OF THIS SOFTWARE.
|
|
258
|
-
***************************************************************************** */function aC(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 Tt{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(e.position.lat&&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
|
|
258
|
+
***************************************************************************** */function aC(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 Tt{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(e.position.lat&&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 yl{constructor({markers:e,position:n}){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(Tt.getPosition(n));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>Tt.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(Tt.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}class lC{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return uC(e)}}const uC=t=>t.map(n=>new yl({position:Tt.getPosition(n),markers:[n]}));class cC extends lC{constructor(e){var{maxZoom:n,radius:r=60}=e,i=aC(e,["maxZoom","radius"]);super({maxZoom:n}),this.state={zoom:-1},this.superCluster=new iC(Object.assign({maxZoom:this.maxZoom,radius:r},i))}calculate(e){let n=!1;const r={zoom:e.map.getZoom()};if(!Bc(e.markers,this.markers)){n=!0,this.markers=[...e.markers];const i=this.markers.map(o=>{const s=Tt.getPosition(o);return{type:"Feature",geometry:{type:"Point",coordinates:[s.lng(),s.lat()]},properties:{marker:o}}});this.superCluster.load(i)}return n||(this.state.zoom<=this.maxZoom||r.zoom<=this.maxZoom)&&(n=!Bc(this.state,r)),this.state=r,n&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:n}}cluster({map:e}){return this.superCluster.getClusters([-180,-90,180,90],Math.round(e.getZoom())).map(n=>this.transformCluster(n))}transformCluster({geometry:{coordinates:[e,n]},properties:r}){if(r.cluster)return new yl({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(o=>o.properties.marker),position:{lat:n,lng:e}});const i=r.marker;return new yl({markers:[i],position:Tt.getPosition(i)})}}class fC{constructor(e,n){this.markers={sum:e.length};const r=n.map(o=>o.count),i=r.reduce((o,s)=>o+s,0);this.clusters={count:n.length,markers:{mean:i/n.length,sum:i,min:Math.min(...r),max:Math.max(...r)}}}}class dC{render({count:e,position:n},r,i){const s=`<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">
|
|
259
259
|
<circle cx="120" cy="120" opacity=".6" r="70" />
|
|
260
260
|
<circle cx="120" cy="120" opacity=".3" r="90" />
|
|
261
261
|
<circle cx="120" cy="120" opacity=".2" r="110" />
|
|
262
262
|
<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>
|
|
263
|
-
</svg>`,a=`Cluster of ${e} markers`,l=Number(google.maps.Marker.MAX_ZINDEX)+e;if(Tt.isAdvancedMarkerAvailable(i)){const d=new DOMParser().parseFromString(s,"image/svg+xml").documentElement;d.setAttribute("transform","translate(0 25)");const h={map:i,position:n,zIndex:l,title:a,content:d};return new google.maps.marker.AdvancedMarkerElement(h)}const u={position:n,zIndex:l,title:a,icon:{url:`data:image/svg+xml;base64,${btoa(s)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(u)}}function hC(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class ql{constructor(){hC(ql,google.maps.OverlayView)}}var Fi;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(Fi||(Fi={}));const pC=(t,e,n)=>{n.fitBounds(e.bounds)};class gC extends ql{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new cC(r),renderer:o=new dC,onClusterClick:s=pC}){super(),this.markers=[...n],this.clusters=[],this.algorithm=i,this.renderer=o,this.onClusterClick=s,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:(Tt.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,Fi.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 s of n)s.markers.length==1&&i.add(s.markers[0]);const o=[];for(const s of this.clusters)s.marker!=null&&(s.markers.length==1?i.has(s.marker)||Tt.setMap(s.marker,null):o.push(s.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>o.forEach(s=>Tt.setMap(s,null)))}google.maps.event.trigger(this,Fi.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>Tt.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new fC(this.markers,this.clusters),n=this.getMap();this.clusters.forEach(r=>{r.markers.length===1?r.marker=r.markers[0]:(r.marker=this.renderer.render(r,e,n),r.markers.forEach(i=>Tt.setMap(i,null)),this.onClusterClick&&r.marker.addListener("click",i=>{google.maps.event.trigger(this,Fi.CLUSTER_CLICK,r),this.onClusterClick(i,r,n)})),Tt.setMap(r.marker,n)})}}function vC(t){var e=M4(),n=c.useState(null),r=n[0],i=n[1];return c.useEffect(function(){if(e&&r===null){var o=new gC(K(K({},t),{map:e}));i(o)}},[e]),r}function mC(t){var e=t.children,n=t.options,r=vC(n);return r!==null?e(r):null}c.memo(mC);var zc={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Hc={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function yC(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,o=t.zIndex,s=t.onCloseClick,a=t.onDomReady,l=t.onContentChanged,u=t.onPositionChanged,f=t.onZindexChanged,d=t.onLoad,h=t.onUnmount,v=c.useContext(le),y=c.useState(null),g=y[0],w=y[1],C=c.useState(null),L=C[0],m=C[1],_=c.useState(null),E=_[0],p=_[1],b=c.useState(null),x=b[0],M=b[1],O=c.useState(null),T=O[0],P=O[1],R=c.useState(null),I=R[0],B=R[1],V=c.useRef(null);return c.useEffect(function(){g!==null&&(g.close(),n?g.open(v,n):g.getPosition()&&g.open(v))},[v,g,n]),c.useEffect(function(){r&&g!==null&&g.setOptions(r)},[g,r]),c.useEffect(function(){i&&g!==null&&g.setPosition(i)},[i]),c.useEffect(function(){typeof o=="number"&&g!==null&&g.setZIndex(o)},[o]),c.useEffect(function(){g&&s&&(L!==null&&google.maps.event.removeListener(L),m(google.maps.event.addListener(g,"closeclick",s)))},[s]),c.useEffect(function(){g&&a&&(E!==null&&google.maps.event.removeListener(E),p(google.maps.event.addListener(g,"domready",a)))},[a]),c.useEffect(function(){g&&l&&(x!==null&&google.maps.event.removeListener(x),M(google.maps.event.addListener(g,"content_changed",l)))},[l]),c.useEffect(function(){g&&u&&(T!==null&&google.maps.event.removeListener(T),P(google.maps.event.addListener(g,"position_changed",u)))},[u]),c.useEffect(function(){g&&f&&(I!==null&&google.maps.event.removeListener(I),B(google.maps.event.addListener(g,"zindex_changed",f)))},[f]),c.useEffect(function(){var N=new google.maps.InfoWindow(K({},r||{}));return w(N),V.current=document.createElement("div"),s&&m(google.maps.event.addListener(N,"closeclick",s)),a&&p(google.maps.event.addListener(N,"domready",a)),l&&M(google.maps.event.addListener(N,"content_changed",l)),u&&P(google.maps.event.addListener(N,"position_changed",u)),f&&B(google.maps.event.addListener(N,"zindex_changed",f)),N.setContent(V.current),i&&N.setPosition(i),o&&N.setZIndex(o),n?N.open(v,n):N.getPosition()?N.open(v):Ye(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),d&&d(N),function(){L&&google.maps.event.removeListener(L),x&&google.maps.event.removeListener(x),E&&google.maps.event.removeListener(E),T&&google.maps.event.removeListener(T),I&&google.maps.event.removeListener(I),h&&h(N),N.close()}},[]),V.current?ti.createPortal(c.Children.only(e),V.current):null}c.memo(yC);var gp=function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoWindow:null},n.open=function(r,i){i?r.open(n.context,i):r.getPosition()?r.open(n.context):Ye(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")},n.setInfoWindowCallback=function(){n.state.infoWindow!==null&&n.containerElement!==null&&(n.state.infoWindow.setContent(n.containerElement),n.open(n.state.infoWindow,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoWindow))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.InfoWindow(K({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=ce({updaterMap:Hc,eventMap:zc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{infoWindow:n}},this.setInfoWindowCallback)},e.prototype.componentDidUpdate=function(n){this.state.infoWindow!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Hc,eventMap:zc,prevProps:n,nextProps:this.props,instance:this.state.infoWindow}))},e.prototype.componentWillUnmount=function(){this.state.infoWindow!==null&&(he(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},e.prototype.render=function(){return this.containerElement?ti.createPortal(c.Children.only(this.props.children),this.containerElement):null},e.contextType=le,e}(c.PureComponent),$c={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Wc={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},visible:function(t,e){t.setVisible(e)}},bC={};function CC(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.onDblClick,a=t.onDragEnd,l=t.onDragStart,u=t.onMouseDown,f=t.onMouseMove,d=t.onMouseOut,h=t.onMouseOver,v=t.onMouseUp,y=t.onRightClick,g=t.onClick,w=t.onDrag,C=t.onLoad,L=t.onUnmount,m=c.useContext(le),_=c.useState(null),E=_[0],p=_[1],b=c.useState(null),x=b[0],M=b[1],O=c.useState(null),T=O[0],P=O[1],R=c.useState(null),I=R[0],B=R[1],V=c.useState(null),N=V[0],z=V[1],Y=c.useState(null),G=Y[0],H=Y[1],Q=c.useState(null),oe=Q[0],te=Q[1],ee=c.useState(null),D=ee[0],pe=ee[1],Pe=c.useState(null),Z=Pe[0],De=Pe[1],Ae=c.useState(null),ue=Ae[0],_e=Ae[1],Ve=c.useState(null),Ce=Ve[0],Me=Ve[1],Ie=c.useState(null),ke=Ie[0],je=Ie[1];return c.useEffect(function(){E!==null&&E.setMap(m)},[m]),c.useEffect(function(){typeof e<"u"&&E!==null&&E.setOptions(e)},[E,e]),c.useEffect(function(){typeof n<"u"&&E!==null&&E.setDraggable(n)},[E,n]),c.useEffect(function(){typeof r<"u"&&E!==null&&E.setEditable(r)},[E,r]),c.useEffect(function(){typeof i<"u"&&E!==null&&E.setVisible(i)},[E,i]),c.useEffect(function(){typeof o<"u"&&E!==null&&E.setPath(o)},[E,o]),c.useEffect(function(){E&&s&&(x!==null&&google.maps.event.removeListener(x),M(google.maps.event.addListener(E,"dblclick",s)))},[s]),c.useEffect(function(){E&&a&&(T!==null&&google.maps.event.removeListener(T),P(google.maps.event.addListener(E,"dragend",a)))},[a]),c.useEffect(function(){E&&l&&(I!==null&&google.maps.event.removeListener(I),B(google.maps.event.addListener(E,"dragstart",l)))},[l]),c.useEffect(function(){E&&u&&(N!==null&&google.maps.event.removeListener(N),z(google.maps.event.addListener(E,"mousedown",u)))},[u]),c.useEffect(function(){E&&f&&(G!==null&&google.maps.event.removeListener(G),H(google.maps.event.addListener(E,"mousemove",f)))},[f]),c.useEffect(function(){E&&d&&(oe!==null&&google.maps.event.removeListener(oe),te(google.maps.event.addListener(E,"mouseout",d)))},[d]),c.useEffect(function(){E&&h&&(D!==null&&google.maps.event.removeListener(D),pe(google.maps.event.addListener(E,"mouseover",h)))},[h]),c.useEffect(function(){E&&v&&(Z!==null&&google.maps.event.removeListener(Z),De(google.maps.event.addListener(E,"mouseup",v)))},[v]),c.useEffect(function(){E&&y&&(ue!==null&&google.maps.event.removeListener(ue),_e(google.maps.event.addListener(E,"rightclick",y)))},[y]),c.useEffect(function(){E&&g&&(Ce!==null&&google.maps.event.removeListener(Ce),Me(google.maps.event.addListener(E,"click",g)))},[g]),c.useEffect(function(){E&&w&&(ke!==null&&google.maps.event.removeListener(ke),je(google.maps.event.addListener(E,"drag",w)))},[w]),c.useEffect(function(){var ie=new google.maps.Polyline(K(K({},e||bC),{map:m}));return o&&ie.setPath(o),typeof i<"u"&&ie.setVisible(i),typeof r<"u"&&ie.setEditable(r),typeof n<"u"&&ie.setDraggable(n),s&&M(google.maps.event.addListener(ie,"dblclick",s)),a&&P(google.maps.event.addListener(ie,"dragend",a)),l&&B(google.maps.event.addListener(ie,"dragstart",l)),u&&z(google.maps.event.addListener(ie,"mousedown",u)),f&&H(google.maps.event.addListener(ie,"mousemove",f)),d&&te(google.maps.event.addListener(ie,"mouseout",d)),h&&pe(google.maps.event.addListener(ie,"mouseover",h)),v&&De(google.maps.event.addListener(ie,"mouseup",v)),y&&_e(google.maps.event.addListener(ie,"rightclick",y)),g&&Me(google.maps.event.addListener(ie,"click",g)),w&&je(google.maps.event.addListener(ie,"drag",w)),p(ie),C&&C(ie),function(){x!==null&&google.maps.event.removeListener(x),T!==null&&google.maps.event.removeListener(T),I!==null&&google.maps.event.removeListener(I),N!==null&&google.maps.event.removeListener(N),G!==null&&google.maps.event.removeListener(G),oe!==null&&google.maps.event.removeListener(oe),D!==null&&google.maps.event.removeListener(D),Z!==null&&google.maps.event.removeListener(Z),ue!==null&&google.maps.event.removeListener(ue),Ce!==null&&google.maps.event.removeListener(Ce),L&&L(ie),ie.setMap(null)}},[]),null}c.memo(CC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polyline:null},n.setPolylineCallback=function(){n.state.polyline!==null&&n.props.onLoad&&n.props.onLoad(n.state.polyline)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polyline(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Wc,eventMap:$c,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polyline:n}},this.setPolylineCallback)},e.prototype.componentDidUpdate=function(n){this.state.polyline!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Wc,eventMap:$c,prevProps:n,nextProps:this.props,instance:this.state.polyline}))},e.prototype.componentWillUnmount=function(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),he(this.registeredEvents),this.state.polyline.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var Gc={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Zc={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},paths:function(t,e){t.setPaths(e)},visible:function(t,e){t.setVisible(e)}};function wC(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.paths,a=t.onDblClick,l=t.onDragEnd,u=t.onDragStart,f=t.onMouseDown,d=t.onMouseMove,h=t.onMouseOut,v=t.onMouseOver,y=t.onMouseUp,g=t.onRightClick,w=t.onClick,C=t.onDrag,L=t.onLoad,m=t.onUnmount,_=t.onEdit,E=c.useContext(le),p=c.useState(null),b=p[0],x=p[1],M=c.useState(null),O=M[0],T=M[1],P=c.useState(null),R=P[0],I=P[1],B=c.useState(null),V=B[0],N=B[1],z=c.useState(null),Y=z[0],G=z[1],H=c.useState(null),Q=H[0],oe=H[1],te=c.useState(null),ee=te[0],D=te[1],pe=c.useState(null),Pe=pe[0],Z=pe[1],De=c.useState(null),Ae=De[0],ue=De[1],_e=c.useState(null),Ve=_e[0],Ce=_e[1],Me=c.useState(null),Ie=Me[0],ke=Me[1],je=c.useState(null),ie=je[0],We=je[1];return c.useEffect(function(){b!==null&&b.setMap(E)},[E]),c.useEffect(function(){typeof e<"u"&&b!==null&&b.setOptions(e)},[b,e]),c.useEffect(function(){typeof n<"u"&&b!==null&&b.setDraggable(n)},[b,n]),c.useEffect(function(){typeof r<"u"&&b!==null&&b.setEditable(r)},[b,r]),c.useEffect(function(){typeof i<"u"&&b!==null&&b.setVisible(i)},[b,i]),c.useEffect(function(){typeof o<"u"&&b!==null&&b.setPath(o)},[b,o]),c.useEffect(function(){typeof s<"u"&&b!==null&&b.setPaths(s)},[b,s]),c.useEffect(function(){b&&a&&(O!==null&&google.maps.event.removeListener(O),T(google.maps.event.addListener(b,"dblclick",a)))},[a]),c.useEffect(function(){b&&(google.maps.event.addListener(b.getPath(),"insert_at",function(){_==null||_(b)}),google.maps.event.addListener(b.getPath(),"set_at",function(){_==null||_(b)}))},[b,_]),c.useEffect(function(){b&&l&&(R!==null&&google.maps.event.removeListener(R),I(google.maps.event.addListener(b,"dragend",l)))},[l]),c.useEffect(function(){b&&u&&(V!==null&&google.maps.event.removeListener(V),N(google.maps.event.addListener(b,"dragstart",u)))},[u]),c.useEffect(function(){b&&f&&(Y!==null&&google.maps.event.removeListener(Y),G(google.maps.event.addListener(b,"mousedown",f)))},[f]),c.useEffect(function(){b&&d&&(Q!==null&&google.maps.event.removeListener(Q),oe(google.maps.event.addListener(b,"mousemove",d)))},[d]),c.useEffect(function(){b&&h&&(ee!==null&&google.maps.event.removeListener(ee),D(google.maps.event.addListener(b,"mouseout",h)))},[h]),c.useEffect(function(){b&&v&&(Pe!==null&&google.maps.event.removeListener(Pe),Z(google.maps.event.addListener(b,"mouseover",v)))},[v]),c.useEffect(function(){b&&y&&(Ae!==null&&google.maps.event.removeListener(Ae),ue(google.maps.event.addListener(b,"mouseup",y)))},[y]),c.useEffect(function(){b&&g&&(Ve!==null&&google.maps.event.removeListener(Ve),Ce(google.maps.event.addListener(b,"rightclick",g)))},[g]),c.useEffect(function(){b&&w&&(Ie!==null&&google.maps.event.removeListener(Ie),ke(google.maps.event.addListener(b,"click",w)))},[w]),c.useEffect(function(){b&&C&&(ie!==null&&google.maps.event.removeListener(ie),We(google.maps.event.addListener(b,"drag",C)))},[C]),c.useEffect(function(){var re=new google.maps.Polygon(K(K({},e||{}),{map:E}));return o&&re.setPath(o),s&&re.setPaths(s),typeof i<"u"&&re.setVisible(i),typeof r<"u"&&re.setEditable(r),typeof n<"u"&&re.setDraggable(n),a&&T(google.maps.event.addListener(re,"dblclick",a)),l&&I(google.maps.event.addListener(re,"dragend",l)),u&&N(google.maps.event.addListener(re,"dragstart",u)),f&&G(google.maps.event.addListener(re,"mousedown",f)),d&&oe(google.maps.event.addListener(re,"mousemove",d)),h&&D(google.maps.event.addListener(re,"mouseout",h)),v&&Z(google.maps.event.addListener(re,"mouseover",v)),y&&ue(google.maps.event.addListener(re,"mouseup",y)),g&&Ce(google.maps.event.addListener(re,"rightclick",g)),w&&ke(google.maps.event.addListener(re,"click",w)),C&&We(google.maps.event.addListener(re,"drag",C)),x(re),L&&L(re),function(){O!==null&&google.maps.event.removeListener(O),R!==null&&google.maps.event.removeListener(R),V!==null&&google.maps.event.removeListener(V),Y!==null&&google.maps.event.removeListener(Y),Q!==null&&google.maps.event.removeListener(Q),ee!==null&&google.maps.event.removeListener(ee),Pe!==null&&google.maps.event.removeListener(Pe),Ae!==null&&google.maps.event.removeListener(Ae),Ve!==null&&google.maps.event.removeListener(Ve),Ie!==null&&google.maps.event.removeListener(Ie),m&&m(re),re.setMap(null)}},[]),null}c.memo(wC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polygon:null},n.setPolygonCallback=function(){n.state.polygon!==null&&n.props.onLoad&&n.props.onLoad(n.state.polygon)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polygon(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Zc,eventMap:Gc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polygon:n}},this.setPolygonCallback)},e.prototype.componentDidUpdate=function(n){this.state.polygon!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Zc,eventMap:Gc,prevProps:n,nextProps:this.props,instance:this.state.polygon}))},e.prototype.componentWillUnmount=function(){this.state.polygon!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),he(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var qc={onBoundsChanged:"bounds_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Kc={bounds:function(t,e){t.setBounds(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},visible:function(t,e){t.setVisible(e)}};function SC(t){var e=t.options,n=t.bounds,r=t.draggable,i=t.editable,o=t.visible,s=t.onDblClick,a=t.onDragEnd,l=t.onDragStart,u=t.onMouseDown,f=t.onMouseMove,d=t.onMouseOut,h=t.onMouseOver,v=t.onMouseUp,y=t.onRightClick,g=t.onClick,w=t.onDrag,C=t.onBoundsChanged,L=t.onLoad,m=t.onUnmount,_=c.useContext(le),E=c.useState(null),p=E[0],b=E[1],x=c.useState(null),M=x[0],O=x[1],T=c.useState(null),P=T[0],R=T[1],I=c.useState(null),B=I[0],V=I[1],N=c.useState(null),z=N[0],Y=N[1],G=c.useState(null),H=G[0],Q=G[1],oe=c.useState(null),te=oe[0],ee=oe[1],D=c.useState(null),pe=D[0],Pe=D[1],Z=c.useState(null),De=Z[0],Ae=Z[1],ue=c.useState(null),_e=ue[0],Ve=ue[1],Ce=c.useState(null),Me=Ce[0],Ie=Ce[1],ke=c.useState(null),je=ke[0],ie=ke[1],We=c.useState(null),re=We[0],tt=We[1];return c.useEffect(function(){p!==null&&p.setMap(_)},[_]),c.useEffect(function(){typeof e<"u"&&p!==null&&p.setOptions(e)},[p,e]),c.useEffect(function(){typeof r<"u"&&p!==null&&p.setDraggable(r)},[p,r]),c.useEffect(function(){typeof i<"u"&&p!==null&&p.setEditable(i)},[p,i]),c.useEffect(function(){typeof o<"u"&&p!==null&&p.setVisible(o)},[p,o]),c.useEffect(function(){typeof n<"u"&&p!==null&&p.setBounds(n)},[p,n]),c.useEffect(function(){p&&s&&(M!==null&&google.maps.event.removeListener(M),O(google.maps.event.addListener(p,"dblclick",s)))},[s]),c.useEffect(function(){p&&a&&(P!==null&&google.maps.event.removeListener(P),R(google.maps.event.addListener(p,"dragend",a)))},[a]),c.useEffect(function(){p&&l&&(B!==null&&google.maps.event.removeListener(B),V(google.maps.event.addListener(p,"dragstart",l)))},[l]),c.useEffect(function(){p&&u&&(z!==null&&google.maps.event.removeListener(z),Y(google.maps.event.addListener(p,"mousedown",u)))},[u]),c.useEffect(function(){p&&f&&(H!==null&&google.maps.event.removeListener(H),Q(google.maps.event.addListener(p,"mousemove",f)))},[f]),c.useEffect(function(){p&&d&&(te!==null&&google.maps.event.removeListener(te),ee(google.maps.event.addListener(p,"mouseout",d)))},[d]),c.useEffect(function(){p&&h&&(pe!==null&&google.maps.event.removeListener(pe),Pe(google.maps.event.addListener(p,"mouseover",h)))},[h]),c.useEffect(function(){p&&v&&(De!==null&&google.maps.event.removeListener(De),Ae(google.maps.event.addListener(p,"mouseup",v)))},[v]),c.useEffect(function(){p&&y&&(_e!==null&&google.maps.event.removeListener(_e),Ve(google.maps.event.addListener(p,"rightclick",y)))},[y]),c.useEffect(function(){p&&g&&(Me!==null&&google.maps.event.removeListener(Me),Ie(google.maps.event.addListener(p,"click",g)))},[g]),c.useEffect(function(){p&&w&&(je!==null&&google.maps.event.removeListener(je),ie(google.maps.event.addListener(p,"drag",w)))},[w]),c.useEffect(function(){p&&C&&(re!==null&&google.maps.event.removeListener(re),tt(google.maps.event.addListener(p,"bounds_changed",C)))},[C]),c.useEffect(function(){var q=new google.maps.Rectangle(K(K({},e||{}),{map:_}));return typeof o<"u"&&q.setVisible(o),typeof i<"u"&&q.setEditable(i),typeof r<"u"&&q.setDraggable(r),typeof n<"u"&&q.setBounds(n),s&&O(google.maps.event.addListener(q,"dblclick",s)),a&&R(google.maps.event.addListener(q,"dragend",a)),l&&V(google.maps.event.addListener(q,"dragstart",l)),u&&Y(google.maps.event.addListener(q,"mousedown",u)),f&&Q(google.maps.event.addListener(q,"mousemove",f)),d&&ee(google.maps.event.addListener(q,"mouseout",d)),h&&Pe(google.maps.event.addListener(q,"mouseover",h)),v&&Ae(google.maps.event.addListener(q,"mouseup",v)),y&&Ve(google.maps.event.addListener(q,"rightclick",y)),g&&Ie(google.maps.event.addListener(q,"click",g)),w&&ie(google.maps.event.addListener(q,"drag",w)),C&&tt(google.maps.event.addListener(q,"bounds_changed",C)),b(q),L&&L(q),function(){M!==null&&google.maps.event.removeListener(M),P!==null&&google.maps.event.removeListener(P),B!==null&&google.maps.event.removeListener(B),z!==null&&google.maps.event.removeListener(z),H!==null&&google.maps.event.removeListener(H),te!==null&&google.maps.event.removeListener(te),pe!==null&&google.maps.event.removeListener(pe),De!==null&&google.maps.event.removeListener(De),_e!==null&&google.maps.event.removeListener(_e),Me!==null&&google.maps.event.removeListener(Me),je!==null&&google.maps.event.removeListener(je),re!==null&&google.maps.event.removeListener(re),m&&m(q),q.setMap(null)}},[]),null}c.memo(SC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={rectangle:null},n.setRectangleCallback=function(){n.state.rectangle!==null&&n.props.onLoad&&n.props.onLoad(n.state.rectangle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Rectangle(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Kc,eventMap:qc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{rectangle:n}},this.setRectangleCallback)},e.prototype.componentDidUpdate=function(n){this.state.rectangle!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Kc,eventMap:qc,prevProps:n,nextProps:this.props,instance:this.state.rectangle}))},e.prototype.componentWillUnmount=function(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),he(this.registeredEvents),this.state.rectangle.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var Qc={onCenterChanged:"center_changed",onRadiusChanged:"radius_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Jc={center:function(t,e){t.setCenter(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},radius:function(t,e){t.setRadius(e)},visible:function(t,e){t.setVisible(e)}},LC={};function xC(t){var e=t.options,n=t.center,r=t.radius,i=t.draggable,o=t.editable,s=t.visible,a=t.onDblClick,l=t.onDragEnd,u=t.onDragStart,f=t.onMouseDown,d=t.onMouseMove,h=t.onMouseOut,v=t.onMouseOver,y=t.onMouseUp,g=t.onRightClick,w=t.onClick,C=t.onDrag,L=t.onCenterChanged,m=t.onRadiusChanged,_=t.onLoad,E=t.onUnmount,p=c.useContext(le),b=c.useState(null),x=b[0],M=b[1],O=c.useState(null),T=O[0],P=O[1],R=c.useState(null),I=R[0],B=R[1],V=c.useState(null),N=V[0],z=V[1],Y=c.useState(null),G=Y[0],H=Y[1],Q=c.useState(null),oe=Q[0],te=Q[1],ee=c.useState(null),D=ee[0],pe=ee[1],Pe=c.useState(null),Z=Pe[0],De=Pe[1],Ae=c.useState(null),ue=Ae[0],_e=Ae[1],Ve=c.useState(null),Ce=Ve[0],Me=Ve[1],Ie=c.useState(null),ke=Ie[0],je=Ie[1],ie=c.useState(null),We=ie[0],re=ie[1],tt=c.useState(null),q=tt[0],Ge=tt[1],ze=c.useState(null),bt=ze[0],ut=ze[1];return c.useEffect(function(){x!==null&&x.setMap(p)},[p]),c.useEffect(function(){typeof e<"u"&&x!==null&&x.setOptions(e)},[x,e]),c.useEffect(function(){typeof i<"u"&&x!==null&&x.setDraggable(i)},[x,i]),c.useEffect(function(){typeof o<"u"&&x!==null&&x.setEditable(o)},[x,o]),c.useEffect(function(){typeof s<"u"&&x!==null&&x.setVisible(s)},[x,s]),c.useEffect(function(){typeof r=="number"&&x!==null&&x.setRadius(r)},[x,r]),c.useEffect(function(){typeof n<"u"&&x!==null&&x.setCenter(n)},[x,n]),c.useEffect(function(){x&&a&&(T!==null&&google.maps.event.removeListener(T),P(google.maps.event.addListener(x,"dblclick",a)))},[a]),c.useEffect(function(){x&&l&&(I!==null&&google.maps.event.removeListener(I),B(google.maps.event.addListener(x,"dragend",l)))},[l]),c.useEffect(function(){x&&u&&(N!==null&&google.maps.event.removeListener(N),z(google.maps.event.addListener(x,"dragstart",u)))},[u]),c.useEffect(function(){x&&f&&(G!==null&&google.maps.event.removeListener(G),H(google.maps.event.addListener(x,"mousedown",f)))},[f]),c.useEffect(function(){x&&d&&(oe!==null&&google.maps.event.removeListener(oe),te(google.maps.event.addListener(x,"mousemove",d)))},[d]),c.useEffect(function(){x&&h&&(D!==null&&google.maps.event.removeListener(D),pe(google.maps.event.addListener(x,"mouseout",h)))},[h]),c.useEffect(function(){x&&v&&(Z!==null&&google.maps.event.removeListener(Z),De(google.maps.event.addListener(x,"mouseover",v)))},[v]),c.useEffect(function(){x&&y&&(ue!==null&&google.maps.event.removeListener(ue),_e(google.maps.event.addListener(x,"mouseup",y)))},[y]),c.useEffect(function(){x&&g&&(Ce!==null&&google.maps.event.removeListener(Ce),Me(google.maps.event.addListener(x,"rightclick",g)))},[g]),c.useEffect(function(){x&&w&&(ke!==null&&google.maps.event.removeListener(ke),je(google.maps.event.addListener(x,"click",w)))},[w]),c.useEffect(function(){x&&C&&(We!==null&&google.maps.event.removeListener(We),re(google.maps.event.addListener(x,"drag",C)))},[C]),c.useEffect(function(){x&&L&&(q!==null&&google.maps.event.removeListener(q),Ge(google.maps.event.addListener(x,"center_changed",L)))},[w]),c.useEffect(function(){x&&m&&(bt!==null&&google.maps.event.removeListener(bt),ut(google.maps.event.addListener(x,"radius_changed",m)))},[m]),c.useEffect(function(){var se=new google.maps.Circle(K(K({},e||LC),{map:p}));return typeof r=="number"&&se.setRadius(r),typeof n<"u"&&se.setCenter(n),typeof r=="number"&&se.setRadius(r),typeof s<"u"&&se.setVisible(s),typeof o<"u"&&se.setEditable(o),typeof i<"u"&&se.setDraggable(i),a&&P(google.maps.event.addListener(se,"dblclick",a)),l&&B(google.maps.event.addListener(se,"dragend",l)),u&&z(google.maps.event.addListener(se,"dragstart",u)),f&&H(google.maps.event.addListener(se,"mousedown",f)),d&&te(google.maps.event.addListener(se,"mousemove",d)),h&&pe(google.maps.event.addListener(se,"mouseout",h)),v&&De(google.maps.event.addListener(se,"mouseover",v)),y&&_e(google.maps.event.addListener(se,"mouseup",y)),g&&Me(google.maps.event.addListener(se,"rightclick",g)),w&&je(google.maps.event.addListener(se,"click",w)),C&&re(google.maps.event.addListener(se,"drag",C)),L&&Ge(google.maps.event.addListener(se,"center_changed",L)),m&&ut(google.maps.event.addListener(se,"radius_changed",m)),M(se),_&&_(se),function(){T!==null&&google.maps.event.removeListener(T),I!==null&&google.maps.event.removeListener(I),N!==null&&google.maps.event.removeListener(N),G!==null&&google.maps.event.removeListener(G),oe!==null&&google.maps.event.removeListener(oe),D!==null&&google.maps.event.removeListener(D),Z!==null&&google.maps.event.removeListener(Z),ue!==null&&google.maps.event.removeListener(ue),Ce!==null&&google.maps.event.removeListener(Ce),ke!==null&&google.maps.event.removeListener(ke),q!==null&&google.maps.event.removeListener(q),bt!==null&&google.maps.event.removeListener(bt),E&&E(se),se.setMap(null)}},[]),null}c.memo(xC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={circle:null},n.setCircleCallback=function(){n.state.circle!==null&&n.props.onLoad&&n.props.onLoad(n.state.circle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Circle(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Jc,eventMap:Qc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{circle:n}},this.setCircleCallback)},e.prototype.componentDidUpdate=function(n){this.state.circle!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Jc,eventMap:Qc,prevProps:n,nextProps:this.props,instance:this.state.circle}))},e.prototype.componentWillUnmount=function(){var n;this.state.circle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),he(this.registeredEvents),(n=this.state.circle)===null||n===void 0||n.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var Yc={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},Xc={add:function(t,e){t.add(e)},addgeojson:function(t,e,n){t.addGeoJson(e,n)},contains:function(t,e){t.contains(e)},foreach:function(t,e){t.forEach(e)},loadgeojson:function(t,e,n,r){t.loadGeoJson(e,n,r)},overridestyle:function(t,e,n){t.overrideStyle(e,n)},remove:function(t,e){t.remove(e)},revertstyle:function(t,e){t.revertStyle(e)},controlposition:function(t,e){t.setControlPosition(e)},controls:function(t,e){t.setControls(e)},drawingmode:function(t,e){t.setDrawingMode(e)},map:function(t,e){t.setMap(e)},style:function(t,e){t.setStyle(e)},togeojson:function(t,e){t.toGeoJson(e)}};function EC(t){var e=t.options,n=t.onClick,r=t.onDblClick,i=t.onMouseDown,o=t.onMouseMove,s=t.onMouseOut,a=t.onMouseOver,l=t.onMouseUp,u=t.onRightClick,f=t.onAddFeature,d=t.onRemoveFeature,h=t.onRemoveProperty,v=t.onSetGeometry,y=t.onSetProperty,g=t.onLoad,w=t.onUnmount,C=c.useContext(le),L=c.useState(null),m=L[0],_=L[1],E=c.useState(null),p=E[0],b=E[1],x=c.useState(null),M=x[0],O=x[1],T=c.useState(null),P=T[0],R=T[1],I=c.useState(null),B=I[0],V=I[1],N=c.useState(null),z=N[0],Y=N[1],G=c.useState(null),H=G[0],Q=G[1],oe=c.useState(null),te=oe[0],ee=oe[1],D=c.useState(null),pe=D[0],Pe=D[1],Z=c.useState(null),De=Z[0],Ae=Z[1],ue=c.useState(null),_e=ue[0],Ve=ue[1],Ce=c.useState(null),Me=Ce[0],Ie=Ce[1],ke=c.useState(null),je=ke[0],ie=ke[1],We=c.useState(null),re=We[0],tt=We[1];return c.useEffect(function(){m!==null&&m.setMap(C)},[C]),c.useEffect(function(){m&&r&&(p!==null&&google.maps.event.removeListener(p),b(google.maps.event.addListener(m,"dblclick",r)))},[r]),c.useEffect(function(){m&&i&&(M!==null&&google.maps.event.removeListener(M),O(google.maps.event.addListener(m,"mousedown",i)))},[i]),c.useEffect(function(){m&&o&&(P!==null&&google.maps.event.removeListener(P),R(google.maps.event.addListener(m,"mousemove",o)))},[o]),c.useEffect(function(){m&&s&&(B!==null&&google.maps.event.removeListener(B),V(google.maps.event.addListener(m,"mouseout",s)))},[s]),c.useEffect(function(){m&&a&&(z!==null&&google.maps.event.removeListener(z),Y(google.maps.event.addListener(m,"mouseover",a)))},[a]),c.useEffect(function(){m&&l&&(H!==null&&google.maps.event.removeListener(H),Q(google.maps.event.addListener(m,"mouseup",l)))},[l]),c.useEffect(function(){m&&u&&(te!==null&&google.maps.event.removeListener(te),ee(google.maps.event.addListener(m,"rightclick",u)))},[u]),c.useEffect(function(){m&&n&&(pe!==null&&google.maps.event.removeListener(pe),Pe(google.maps.event.addListener(m,"click",n)))},[n]),c.useEffect(function(){m&&f&&(De!==null&&google.maps.event.removeListener(De),Ae(google.maps.event.addListener(m,"addfeature",f)))},[f]),c.useEffect(function(){m&&d&&(_e!==null&&google.maps.event.removeListener(_e),Ve(google.maps.event.addListener(m,"removefeature",d)))},[d]),c.useEffect(function(){m&&h&&(Me!==null&&google.maps.event.removeListener(Me),Ie(google.maps.event.addListener(m,"removeproperty",h)))},[h]),c.useEffect(function(){m&&v&&(je!==null&&google.maps.event.removeListener(je),ie(google.maps.event.addListener(m,"setgeometry",v)))},[v]),c.useEffect(function(){m&&y&&(re!==null&&google.maps.event.removeListener(re),tt(google.maps.event.addListener(m,"setproperty",y)))},[y]),c.useEffect(function(){if(C!==null){var q=new google.maps.Data(K(K({},e||{}),{map:C}));r&&b(google.maps.event.addListener(q,"dblclick",r)),i&&O(google.maps.event.addListener(q,"mousedown",i)),o&&R(google.maps.event.addListener(q,"mousemove",o)),s&&V(google.maps.event.addListener(q,"mouseout",s)),a&&Y(google.maps.event.addListener(q,"mouseover",a)),l&&Q(google.maps.event.addListener(q,"mouseup",l)),u&&ee(google.maps.event.addListener(q,"rightclick",u)),n&&Pe(google.maps.event.addListener(q,"click",n)),f&&Ae(google.maps.event.addListener(q,"addfeature",f)),d&&Ve(google.maps.event.addListener(q,"removefeature",d)),h&&Ie(google.maps.event.addListener(q,"removeproperty",h)),v&&ie(google.maps.event.addListener(q,"setgeometry",v)),y&&tt(google.maps.event.addListener(q,"setproperty",y)),_(q),g&&g(q)}return function(){m&&(p!==null&&google.maps.event.removeListener(p),M!==null&&google.maps.event.removeListener(M),P!==null&&google.maps.event.removeListener(P),B!==null&&google.maps.event.removeListener(B),z!==null&&google.maps.event.removeListener(z),H!==null&&google.maps.event.removeListener(H),te!==null&&google.maps.event.removeListener(te),pe!==null&&google.maps.event.removeListener(pe),De!==null&&google.maps.event.removeListener(De),_e!==null&&google.maps.event.removeListener(_e),Me!==null&&google.maps.event.removeListener(Me),je!==null&&google.maps.event.removeListener(je),re!==null&&google.maps.event.removeListener(re),w&&w(m),m.setMap(null))}},[]),null}c.memo(EC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={data:null},n.setDataCallback=function(){n.state.data!==null&&n.props.onLoad&&n.props.onLoad(n.state.data)},n}return e.prototype.componentDidMount=function(){if(this.context!==null){var n=new google.maps.Data(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Xc,eventMap:Yc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{data:n}},this.setDataCallback)}},e.prototype.componentDidUpdate=function(n){this.state.data!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Xc,eventMap:Yc,prevProps:n,nextProps:this.props,instance:this.state.data}))},e.prototype.componentWillUnmount=function(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),he(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var ef={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},tf={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={kmlLayer:null},n.setKmlLayerCallback=function(){n.state.kmlLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.kmlLayer)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.KmlLayer(K(K({},this.props.options),{map:this.context}));this.registeredEvents=ce({updaterMap:tf,eventMap:ef,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{kmlLayer:n}},this.setKmlLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.kmlLayer!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:tf,eventMap:ef,prevProps:n,nextProps:this.props,instance:this.state.kmlLayer}))},e.prototype.componentWillUnmount=function(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),he(this.registeredEvents),this.state.kmlLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);function vp(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function _C(t,e){return new e(t.lat,t.lng)}function MC(t,e){return new e(new google.maps.LatLng(t.ne.lat,t.ne.lng),new google.maps.LatLng(t.sw.lat,t.sw.lng))}function OC(t,e,n){return t instanceof e?t:n(t,e)}function PC(t,e,n){return t instanceof e?t:n(t,e)}function kC(t,e,n){var r=t&&t.fromLatLngToDivPixel(n.getNorthEast()),i=t&&t.fromLatLngToDivPixel(n.getSouthWest());return r&&i?{left:"".concat(i.x+e.x,"px"),top:"".concat(r.y+e.y,"px"),width:"".concat(r.x-i.x-e.x,"px"),height:"".concat(i.y-r.y-e.y,"px")}:{left:"-9999px",top:"-9999px"}}function TC(t,e,n){var r=t&&t.fromLatLngToDivPixel(n);if(r){var i=r.x,o=r.y;return{left:"".concat(i+e.x,"px"),top:"".concat(o+e.y,"px")}}return{left:"-9999px",top:"-9999px"}}function mp(t,e,n,r){return n!==void 0?kC(t,e,PC(n,google.maps.LatLngBounds,MC)):TC(t,e,OC(r,google.maps.LatLng,_C))}function RC(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function DC(t,e,n,r,i){var o=function(s){Ue(a,s);function a(l,u,f,d){var h=s.call(this)||this;return h.container=l,h.pane=u,h.position=f,h.bounds=d,h}return a.prototype.onAdd=function(){var l,u=(l=this.getPanes())===null||l===void 0?void 0:l[this.pane];u==null||u.appendChild(this.container)},a.prototype.draw=function(){for(var l=this.getProjection(),u=K({},this.container?vp(this.container,i):{x:0,y:0}),f=mp(l,u,this.bounds,this.position),d=0,h=Object.entries(f);d<h.length;d++){var v=h[d],y=v[0],g=v[1];this.container.style[y]=g}},a.prototype.onRemove=function(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)},a}(google.maps.OverlayView);return new o(t,e,n,r)}function nf(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function rf(t){if(!t)return"";var e=t instanceof google.maps.LatLngBounds?t:new google.maps.LatLngBounds(new google.maps.LatLng(t.south,t.east),new google.maps.LatLng(t.north,t.west));return e+""}function AC(t){var e=t.position,n=t.bounds,r=t.mapPaneName,i=t.zIndex,o=t.onLoad,s=t.onUnmount,a=t.getPixelPositionOffset,l=t.children,u=c.useContext(le),f=c.useMemo(function(){var h=document.createElement("div");return h.style.position="absolute",h},[]),d=c.useMemo(function(){return DC(f,r,e,n,a)},[f,r,e,n]);return c.useEffect(function(){return o==null||o(d),d==null||d.setMap(u),function(){s==null||s(d),d==null||d.setMap(null)}},[u,d]),c.useEffect(function(){f.style.zIndex="".concat(i)},[i,f]),Af.createPortal(l,f)}c.memo(AC);(function(t){Ue(e,t);function e(n){var r=t.call(this,n)||this;r.state={paneEl:null,containerStyle:{position:"absolute"}},r.updatePane=function(){var o=r.props.mapPaneName,s=r.overlayView.getPanes();Ye(!!o,"OverlayView requires props.mapPaneName but got %s",o),s?r.setState({paneEl:s[o]}):r.setState({paneEl:null})},r.onAdd=function(){var o,s;r.updatePane(),(s=(o=r.props).onLoad)===null||s===void 0||s.call(o,r.overlayView)},r.onPositionElement=function(){var o=r.overlayView.getProjection(),s=K({x:0,y:0},r.containerRef.current?vp(r.containerRef.current,r.props.getPixelPositionOffset):{}),a=mp(o,s,r.props.bounds,r.props.position),l=r.state.containerStyle,u=l.left,f=l.top,d=l.width,h=l.height;RC(a,{left:u,top:f,width:d,height:h})||r.setState({containerStyle:{top:a.top||0,left:a.left||0,width:a.width||0,height:a.height||0,position:"absolute"}})},r.draw=function(){r.onPositionElement()},r.onRemove=function(){var o,s;r.setState(function(){return{paneEl:null}}),(s=(o=r.props).onUnmount)===null||s===void 0||s.call(o,r.overlayView)},r.containerRef=c.createRef();var i=new google.maps.OverlayView;return i.onAdd=r.onAdd,i.draw=r.draw,i.onRemove=r.onRemove,r.overlayView=i,r}return e.prototype.componentDidMount=function(){this.overlayView.setMap(this.context)},e.prototype.componentDidUpdate=function(n){var r=nf(n.position),i=nf(this.props.position),o=rf(n.bounds),s=rf(this.props.bounds);(r!==i||o!==s)&&this.overlayView.draw(),n.mapPaneName!==this.props.mapPaneName&&this.updatePane()},e.prototype.componentWillUnmount=function(){this.overlayView.setMap(null)},e.prototype.render=function(){var n=this.state.paneEl;return n?Af.createPortal(S.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:c.Children.only(this.props.children)}),n):null},e.FLOAT_PANE="floatPane",e.MAP_PANE="mapPane",e.MARKER_LAYER="markerLayer",e.OVERLAY_LAYER="overlayLayer",e.OVERLAY_MOUSE_TARGET="overlayMouseTarget",e.contextType=le,e})(c.PureComponent);function IC(){}var of={onDblClick:"dblclick",onClick:"click"},sf={opacity:function(t,e){t.setOpacity(e)}};function jC(t){var e=t.url,n=t.bounds,r=t.options,i=t.visible,o=c.useContext(le),s=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east)),a=c.useMemo(function(){var l=new google.maps.GroundOverlay(e,s,K({},r));return l},[]);return c.useEffect(function(){a!==null&&a.setMap(o)},[o]),c.useEffect(function(){typeof e<"u"&&a!==null&&(a.set("url",e),a.setMap(o))},[a,e]),c.useEffect(function(){typeof i<"u"&&a!==null&&a.setOpacity(i?1:0)},[a,i]),c.useEffect(function(){var l=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east));typeof n<"u"&&a!==null&&(a.set("bounds",l),a.setMap(o))},[a,n]),null}c.memo(jC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={groundOverlay:null},n.setGroundOverlayCallback=function(){n.state.groundOverlay!==null&&n.props.onLoad&&n.props.onLoad(n.state.groundOverlay)},n}return e.prototype.componentDidMount=function(){Ye(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");var n=new google.maps.GroundOverlay(this.props.url,this.props.bounds,K(K({},this.props.options),{map:this.context}));this.registeredEvents=ce({updaterMap:sf,eventMap:of,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{groundOverlay:n}},this.setGroundOverlayCallback)},e.prototype.componentDidUpdate=function(n){this.state.groundOverlay!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:sf,eventMap:of,prevProps:n,nextProps:this.props,instance:this.state.groundOverlay}))},e.prototype.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},e.prototype.render=function(){return null},e.defaultProps={onLoad:IC},e.contextType=le,e})(c.PureComponent);var af={},lf={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function NC(t){var e=t.data,n=t.onLoad,r=t.onUnmount,i=t.options,o=c.useContext(le),s=c.useState(null),a=s[0],l=s[1];return c.useEffect(function(){google.maps.visualization||Ye(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),c.useEffect(function(){Ye(!!e,"data property is required in HeatmapLayer %s",e)},[e]),c.useEffect(function(){a!==null&&a.setMap(o)},[o]),c.useEffect(function(){i&&a!==null&&a.setOptions(i)},[a,i]),c.useEffect(function(){var u=new google.maps.visualization.HeatmapLayer(K(K({},i||{}),{data:e,map:o}));return l(u),n&&n(u),function(){a!==null&&(r&&r(a),a.setMap(null))}},[]),null}c.memo(NC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={heatmapLayer:null},n.setHeatmapLayerCallback=function(){n.state.heatmapLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.heatmapLayer)},n}return e.prototype.componentDidMount=function(){Ye(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),Ye(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(K(K({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=ce({updaterMap:lf,eventMap:af,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},e.prototype.componentDidUpdate=function(n){he(this.registeredEvents),this.registeredEvents=ce({updaterMap:lf,eventMap:af,prevProps:n,nextProps:this.props,instance:this.state.heatmapLayer})},e.prototype.componentWillUnmount=function(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),he(this.registeredEvents),this.state.heatmapLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var uf={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},cf={register:function(t,e,n){t.registerPanoProvider(e,n)},links:function(t,e){t.setLinks(e)},motionTracking:function(t,e){t.setMotionTracking(e)},options:function(t,e){t.setOptions(e)},pano:function(t,e){t.setPano(e)},position:function(t,e){t.setPosition(e)},pov:function(t,e){t.setPov(e)},visible:function(t,e){t.setVisible(e)},zoom:function(t,e){t.setZoom(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={streetViewPanorama:null},n.setStreetViewPanoramaCallback=function(){n.state.streetViewPanorama!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewPanorama)},n}return e.prototype.componentDidMount=function(){var n,r,i=(r=(n=this.context)===null||n===void 0?void 0:n.getStreetView())!==null&&r!==void 0?r:null;this.registeredEvents=ce({updaterMap:cf,eventMap:uf,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{streetViewPanorama:i}},this.setStreetViewPanoramaCallback)},e.prototype.componentDidUpdate=function(n){this.state.streetViewPanorama!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:cf,eventMap:uf,prevProps:n,nextProps:this.props,instance:this.state.streetViewPanorama}))},e.prototype.componentWillUnmount=function(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),he(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={streetViewService:null},n.setStreetViewServiceCallback=function(){n.state.streetViewService!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewService)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:n}},this.setStreetViewServiceCallback)},e.prototype.componentWillUnmount=function(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={directionsService:null},n.setDirectionsServiceCallback=function(){n.state.directionsService!==null&&n.props.onLoad&&n.props.onLoad(n.state.directionsService)},n}return e.prototype.componentDidMount=function(){Ye(!!this.props.options,"DirectionsService expected options object as parameter, but got %s",this.props.options);var n=new google.maps.DirectionsService;this.setState(function(){return{directionsService:n}},this.setDirectionsServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.directionsService!==null&&this.state.directionsService.route(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.directionsService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},e.prototype.render=function(){return null},e})(c.PureComponent);var ff={onDirectionsChanged:"directions_changed"},df={directions:function(t,e){t.setDirections(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},panel:function(t,e){t.setPanel(e)},routeIndex:function(t,e){t.setRouteIndex(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={directionsRenderer:null},n.setDirectionsRendererCallback=function(){n.state.directionsRenderer!==null&&(n.state.directionsRenderer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.directionsRenderer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=ce({updaterMap:df,eventMap:ff,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{directionsRenderer:n}},this.setDirectionsRendererCallback)},e.prototype.componentDidUpdate=function(n){this.state.directionsRenderer!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:df,eventMap:ff,prevProps:n,nextProps:this.props,instance:this.state.directionsRenderer}))},e.prototype.componentWillUnmount=function(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),he(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},e.prototype.render=function(){return S.jsx(S.Fragment,{})},e.contextType=le,e})(c.PureComponent);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={distanceMatrixService:null},n.setDistanceMatrixServiceCallback=function(){n.state.distanceMatrixService!==null&&n.props.onLoad&&n.props.onLoad(n.state.distanceMatrixService)},n}return e.prototype.componentDidMount=function(){Ye(!!this.props.options,"DistanceMatrixService expected options object as parameter, but go %s",this.props.options);var n=new google.maps.DistanceMatrixService;this.setState(function(){return{distanceMatrixService:n}},this.setDistanceMatrixServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.distanceMatrixService!==null&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.distanceMatrixService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},e.prototype.render=function(){return null},e})(c.PureComponent);var hf={onPlacesChanged:"places_changed"},pf={bounds:function(t,e){t.setBounds(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=c.createRef(),n.state={searchBox:null},n.setSearchBoxCallback=function(){n.state.searchBox!==null&&n.props.onLoad&&n.props.onLoad(n.state.searchBox)},n}return e.prototype.componentDidMount=function(){if(Ye(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places),this.containerElement!==null&&this.containerElement.current!==null){var n=this.containerElement.current.querySelector("input");if(n!==null){var r=new google.maps.places.SearchBox(n,this.props.options);this.registeredEvents=ce({updaterMap:pf,eventMap:hf,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{searchBox:r}},this.setSearchBoxCallback)}}},e.prototype.componentDidUpdate=function(n){this.state.searchBox!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:pf,eventMap:hf,prevProps:n,nextProps:this.props,instance:this.state.searchBox}))},e.prototype.componentWillUnmount=function(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),he(this.registeredEvents))},e.prototype.render=function(){return S.jsx("div",{ref:this.containerElement,children:c.Children.only(this.props.children)})},e.contextType=le,e})(c.PureComponent);var gf={onPlaceChanged:"place_changed"},vf={bounds:function(t,e){t.setBounds(e)},restrictions:function(t,e){t.setComponentRestrictions(e)},fields:function(t,e){t.setFields(e)},options:function(t,e){t.setOptions(e)},types:function(t,e){t.setTypes(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=c.createRef(),n.state={autocomplete:null},n.setAutocompleteCallback=function(){n.state.autocomplete!==null&&n.props.onLoad&&n.props.onLoad(n.state.autocomplete)},n}return e.prototype.componentDidMount=function(){var n;Ye(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var r=(n=this.containerElement.current)===null||n===void 0?void 0:n.querySelector("input");if(r){var i=new google.maps.places.Autocomplete(r,this.props.options);this.registeredEvents=ce({updaterMap:vf,eventMap:gf,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{autocomplete:i}},this.setAutocompleteCallback)}},e.prototype.componentDidUpdate=function(n){he(this.registeredEvents),this.registeredEvents=ce({updaterMap:vf,eventMap:gf,prevProps:n,nextProps:this.props,instance:this.state.autocomplete})},e.prototype.componentWillUnmount=function(){this.state.autocomplete!==null&&he(this.registeredEvents)},e.prototype.render=function(){return S.jsx("div",{ref:this.containerElement,className:this.props.className,children:c.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=le,e})(c.PureComponent);const BC="LocationBalloon-module__root__GtUl6q",FC="LocationBalloon-module__submit__lNcF4k",UC="LocationBalloon-module__details__--VOKk",VC="LocationBalloon-module__icon__X7DOVA",zC="LocationBalloon-module__header__5VQJDW",HC="LocationBalloon-module__titleContainer__BAO73U",$C="LocationBalloon-module__title__bX9pf8",WC="LocationBalloon-module__description__htav7b",GC="LocationBalloon-module__actions__c8dlOR",ZC="LocationBalloon-module__close__7Ujvya",Jt={root:BC,submit:FC,details:UC,icon:VC,header:zC,titleContainer:HC,title:$C,description:WC,actions:GC,close:ZC},qC={default:Od,llama:Pd},KC=({SSR:t,className:e,hideDetails:n,location:r,location_name:i,name:o,onCloseClick:s,onDetails:a,onSubmit:l})=>{var g;const{logo:u="default"}=Xe(),{isLoading:f,lmsData:d}=Ts(),h=(g=d==null?void 0:d.location)==null?void 0:g.what3words,v=!!(h!=null&&h.id),y=qC[u];return S.jsxs("div",{className:Se(Jt.root,e),children:[S.jsxs("div",{className:Jt.header,children:[S.jsxs("div",{className:Jt.titleContainer,children:[f?S.jsx(_t,{circle:!0,width:40,height:40}):S.jsx("div",{className:Jt.icon,children:S.jsx(y,{})}),f?S.jsx(_t,{width:200}):S.jsx("span",{className:Jt.title,children:o||"{{ properties.point.name }}"})]}),S.jsx("div",{className:Jt.close,children:S.jsx(ri,{position:"relative",onClick:s})})]}),S.jsxs("div",{className:Jt.description,children:[f?S.jsx(_t,{width:300}):(r==null?void 0:r.full_address)||"{{ properties.point.location.full_address }}",f?S.jsx(_t,{width:300}):i||"{{ properties.point.location_name }}"]}),f?S.jsx(_t,{width:150}):v&&S.jsx(zd,{what3words:h}),S.jsxs("div",{className:Jt.actions,children:[S.jsx(Bt,{id:Jp,variant:"primary",className:Jt.submit,disabled:f,onClick:l,children:t?"{ choose }":S.jsx(tr,{keyName:"choose",ns:"common"})}),!n&&S.jsxs(Bt,{id:Bf,as:"link",variant:"primary",className:Jt.details,disabled:f,onClick:a,children:[t?"{ details }":S.jsx(tr,{keyName:"details",ns:"common"}),S.jsx($h,{})]})]})]})},QC=[{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#444444"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#f2f2f2"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{saturation:-100},{lightness:45}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#ffcc00"}]},{featureType:"road.arterial",elementType:"geometry.fill",stylers:[{hue:"#ff0000"}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"road.local",elementType:"geometry.fill",stylers:[{color:"#ffffff"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:"#c2c4c4"},{visibility:"on"}]}];function JC(t="#ffcc00"){return[{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#444444"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#f2f2f2"}]},{featureType:"landscape",elementType:"geometry.fill",stylers:[{visibility:"on"},{hue:"#ff0000"}]},{featureType:"landscape.man_made",elementType:"geometry",stylers:[{lightness:"100"}]},{featureType:"landscape.man_made",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"landscape.natural",elementType:"geometry.fill",stylers:[{lightness:"100"}]},{featureType:"landscape.natural",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"landscape.natural.landcover",elementType:"geometry.fill",stylers:[{visibility:"on"}]},{featureType:"landscape.natural.terrain",elementType:"geometry",stylers:[{lightness:"100"}]},{featureType:"landscape.natural.terrain",elementType:"geometry.fill",stylers:[{visibility:"off"},{lightness:"23"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{saturation:-100},{lightness:45}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:t}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:t},{visibility:"on"}]},{featureType:"water",elementType:"geometry.fill",stylers:[{visibility:"on"},{color:"#cccccc"}]},{featureType:"water",elementType:"labels",stylers:[{visibility:"off"}]}]}const YC={clickableIcons:!1,disableDefaultUI:!0,minZoom:4,maxZoom:20,restriction:{strictBounds:!0,latLngBounds:{north:85,south:-85,west:-179,east:179}}},yp={optimized:!0},XC=({clusterer:t,handleCloseClick:e,handleDetailsClick:n,handlePointClick:r,handleSubmitClick:i,point:o})=>{const[s,a]=c.useState(null),{hideDetails:l,iconType:u,palette:f}=Xe(),{closeSamePoints:d}=sn(),h=on(x=>x.location),v=(f==null?void 0:f.primary)||"#fc0",y=u==="omni-llama"?kt.PinLlama:kt.PinOmnic,g=s==null?void 0:s.getVisible(),w=!!o&&(h==null?void 0:h.uid)===o.uid,C=vr("screenSm"),{isIdle:L}=be(),m=Tl({isSelectedPoint:w}),_=L&&w&&m&&g,E=c.useMemo(()=>{let x;if(o.type===30)switch(u){case"omni-llama":{w?x=kt.PinLlamaSelected:x=kt.PinLlama;break}case"we-chip":{w?x=kt.PinWeChipSelected:x=kt.PinWeChip;break}default:{w?x=kt.PinOmnicSelected:x=Pr(y,v);break}}else w?x=Pr(kt.PinPvz,"--owl-color-black"):x=Pr(kt.PinPvz,"--owl-color-grey-80");return yn(x,"Icon url is not defined"),{url:Pl(x)}},[o.type,w,u,y,v]),p=c.useMemo(()=>({lat:o.location.latitude,lng:o.location.longitude}),[o.location.latitude,o.location.longitude]),b=()=>{d(),r(o)};return S.jsx(up,{noClustererRedraw:!0,icon:E,position:p,clusterer:t,options:yp,onLoad:a,onClick:b,children:_&&!C&&S.jsx(gp,{children:S.jsx(KC,{...o,hideDetails:l,className:ot.balloon,onCloseClick:e,onSubmit:()=>i(o),onDetails:()=>n(o)})})},o.uid)},e5=({handleCloseClick:t,points:e,...n})=>{const{setSamePoints:r}=sn(),{onSamePointsClusterClick:i}=Xe();return S.jsx(X4,{zoomOnClick:!1,clusterClass:ot.cluster,onClick:o=>{t();const a=o.getMarkers().map(d=>{var h,v;return{lat:(h=d.getPosition())==null?void 0:h.lat(),lng:(v=d.getPosition())==null?void 0:v.lng()}}),{lat:l,lng:u}=a[0];if(a.every(d=>d.lat===l&&d.lng===u)){const d=e.filter(({location:{latitude:h,longitude:v}})=>h===l&&v===u);r(d),i==null||i(d)}else{const d=o.getMap();if(d instanceof google.maps.Map){const h=new window.google.maps.LatLngBounds;o.getMarkers().forEach(v=>{h.extend(v.getPosition())}),d.fitBounds(h)}}},onClusteringEnd:()=>{setTimeout(()=>{const o=document.getElementsByClassName(ot.cluster);for(const s of o)s.addEventListener("touchstart",_a,{passive:!0})},100)},onUnmount:()=>{const o=document.getElementsByClassName(ot.cluster);for(const s of o)s.removeEventListener("touchstart",_a)},children:o=>S.jsx(S.Fragment,{children:e.map((s,a)=>S.jsx(XC,{clusterer:o,point:s,handleCloseClick:t,...n},s.uid+a))})})},t5=c.memo(e5),n5=t=>{const{locale:e}=Xe(),n=sn(cm),r=qt(Md),i=JSON.stringify([n.length,e,r==null?void 0:r.place_id]);return S.jsx(t5,{points:n,...t},i)},r5=c.memo(n5),bp=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:42,height:42,fill:"none",viewBox:"0 0 42 42",...t},U.createElement("rect",{width:42,height:42,fill:"#fff",rx:21}),U.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"}),U.createElement("rect",{width:41,height:41,x:.5,y:.5,stroke:"#1D3665",strokeOpacity:.1,rx:20.5})),i5="DeliveryBalloon-module__root__Nu90iy",o5="DeliveryBalloon-module__details__eqUTaI",s5="DeliveryBalloon-module__header__JVdyxN",a5="DeliveryBalloon-module__title__-zKKCt",l5="DeliveryBalloon-module__description__no5-ki",u5="DeliveryBalloon-module__actions__C-N0H-",c5="DeliveryBalloon-module__errorVariant__e6uhZl",f5="DeliveryBalloon-module__logo__62gC5h",xn={root:i5,details:o5,header:s5,title:a5,description:l5,actions:u5,errorVariant:c5,logo:f5},d5=({SSR:t,address:e,className:n,hasCloseButton:r,hideDetails:i,onClose:o,onDetails:s,variant:a})=>{const l=a==="error",u=a==="default",f=t?"{ courier_balloon.title }":S.jsx(tr,{keyName:"title",ns:"courier_balloon"}),d=t?"{ courier_balloon.error_title }":S.jsx(tr,{keyName:"error_title",ns:"courier_balloon"}),h=t?"{ courier_balloon.error_description }":S.jsx(tr,{keyName:"error_description",ns:"courier_balloon"});return S.jsxs("div",{className:Se(xn.root,n,xn[`${a}Variant`]),children:[S.jsxs("div",{className:xn.header,children:[S.jsx(bp,{className:xn.logo}),S.jsx("span",{className:xn.title,children:l?d:f}),r&&S.jsx(ri,{onClick:o})]}),S.jsx("div",{className:xn.description,children:l?h:e||"{{ properties.address }}"}),u&&!i&&S.jsx("div",{className:xn.actions,children:S.jsx(Bt,{id:Bf,as:"button",variant:"primary",className:xn.details,onClick:s,children:t?"{ details }":S.jsx(tr,{keyName:"details",ns:"common"})})})]})},h5="Chip-module__root__zsoSyP",p5="Chip-module__active__BlTSFB",mf={root:h5,active:p5},yf=({active:t,children:e,className:n,...r})=>S.jsx("div",{...r,className:Se(mf.root,n,{[mf.active]:t}),children:e}),g5="TextArea-module__root__8YFknR",v5={root:g5},bf=c.forwardRef(({className:t,inputRef:e,onBlur:n,onChange:r,onFocus:i,...o},s)=>{const a=c.useRef(null);c.useImperativeHandle(s,()=>({focus:()=>{var u,f;(u=a.current)==null||u.focus(),i&&i({target:{value:(f=a.current)==null?void 0:f.value}})},blur:()=>{var u,f;(u=a.current)==null||u.blur(),n&&n({target:{value:(f=a.current)==null?void 0:f.value}})},setValue:u=>{r&&r({target:{value:u}}),a.current&&(a.current.value=u)}}),[n,r,i]);const l=wp(e,a);return S.jsx("textarea",{...o,ref:l,className:Se(v5.root,t),onBlur:n,onFocus:i,onChange:r})}),m5=({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},y5="DeliveryDetailsView-module__title__azeoUr",b5="DeliveryDetailsView-module__logo__4zZtpM",C5="DeliveryDetailsView-module__header__oDE9He",w5="DeliveryDetailsView-module__content__6P27SY",S5="DeliveryDetailsView-module__section__2M3Qip",L5="DeliveryDetailsView-module__chips__KmYgha",x5="DeliveryDetailsView-module__actions__43XZ-V",E5="DeliveryDetailsView-module__submit__58LKBw",_5="DeliveryDetailsView-module__actionsHidden__SW-67b",M5="DeliveryDetailsView-module__commentSection__GlX1A2",O5="DeliveryDetailsView-module__comment__2pGG6h",Lt={title:y5,logo:b5,header:C5,content:w5,section:S5,chips:L5,actions:x5,submit:E5,actionsHidden:_5,commentSection:M5,comment:O5},P5=c.forwardRef(({classes:t,hideActions:e,location:n,onChange:r,onClose:i,onSubmit:o},s)=>{var p;const{hideDeliveryTime:a,inputs:l,locale:u}=Xe(),{t:f}=ln(["details_modal","courier_balloon","common"]),d=c.useMemo(()=>m5({set:r,hideDeliveryTime:a}),[a,r]),[h,v]=c.useState(!1),[y,g]=c.useReducer(d,{comment:"",delivery_time:"",apartment_number:"",...n}),w=c.useCallback(async()=>{v(!0);try{yn(n.address,"Address is required");const b=await Fp({address:n.address,algorithm:10,service:10,language:u||Ff});if(!vd(b))return;const x=b==null?void 0:b.data.data,M={...y,address:x};return o==null||o(M),M}finally{v(!1)}},[u,n.address,o,y]);c.useImperativeHandle(s,()=>({submit:w}),[w]);const C=b=>()=>{g({payload:b,type:"SET_DELIVERY_TIME"})},L=b=>{g({payload:b.target.value,type:"SET_APARTMENT_NUMBER"})},m=b=>{g({payload:b.target.value,type:"SET_COMMENT"})},_=Ss(l==null?void 0:l.apartment),E=Ss(l==null?void 0:l.comment);return S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:Se(Lt.header,t==null?void 0:t.header),children:[S.jsx(ri,{onClick:i}),S.jsxs("div",{className:Lt.title,children:[S.jsx(bp,{className:Lt.logo}),S.jsx("span",{children:f("title",{ns:"courier_balloon"})})]})]}),S.jsxs("div",{className:Se(Lt.content,t==null?void 0:t.content),children:[S.jsxs("section",{className:Lt.section,children:[S.jsxs("span",{children:[f("address"),":"]}),S.jsx("p",{children:n.address})]}),!a&&S.jsxs("section",{className:Lt.section,children:[S.jsxs("span",{children:[f("delivery_time"),":"]}),S.jsxs("div",{className:Lt.chips,children:[S.jsx(yf,{active:y.delivery_time==="8:00-13:00",onClick:C("8:00-13:00"),children:"8:00 - 13:00"}),S.jsx(yf,{active:y.delivery_time==="14:00-22:00",onClick:C("14:00-22:00"),children:"14:00 - 22:00"})]})]}),S.jsxs("section",{className:Lt.section,children:[S.jsxs("span",{children:[f("apartment_number"),":"]}),S.jsx(bf,{..._,rows:1,onChange:L})]}),S.jsxs("section",{className:Se(Lt.section,Lt.commentSection),children:[S.jsxs("span",{children:[f("comment"),":"]}),S.jsx(bf,{...E,className:Lt.comment,onChange:m})]})]}),S.jsx("div",{className:Se(Lt.actions,{[Lt.actionsHidden]:e}),children:S.jsx(Bt,{loading:h,disabled:!((p=y.meta)!=null&&p.valid)||h,variant:"primary",className:Lt.submit,onClick:w,children:f("choose",{ns:"common"})})})]})}),Cp=c.memo(P5),k5={header:ot.deliveryDetailsViewHeader,content:ot.deliveryDetailsViewContent},T5=({hideDeliveryTime:t,hideDetails:e,onPointClick:n,point:r,setDeliveryPoint:i,setOpenDetails:o})=>{const s=Tl({isSelectedPoint:!0}),a=c.useRef(null),[l,u]=c.useState(!1),[f,d]=c.useState({...r,comment:"",delivery_time:"",apartment_number:""});c.useEffect(()=>{d({...r,comment:"",delivery_time:"",apartment_number:""})},[r]);const[h,v]=c.useState(null),y=vr("screenSm"),g=c.useMemo(()=>({lat:f.coords[0],lng:f.coords[1]}),[f.coords]),w=()=>{o==null||o(!0)},C=()=>{i==null||i(null)},L=c.useMemo(()=>({url:Pl(Pr(kt.PinHome,"--owl-color-success")),scaledSize:new google.maps.Size(...Yp)}),[]),m=async()=>{var b;try{u(!0);const x=await((b=a.current)==null?void 0:b.submit());if(!x)return;n==null||n(x),o==null||o(!1),i==null||i(null)}finally{u(!1)}},_=S.jsx(d5,{...f,hideDetails:e,hasCloseButton:y,variant:f.address?"default":"error",className:ot.balloon,onDetails:w,onClose:C}),E=s&&!!(h!=null&&h.getVisible()),p=t?!!f.apartment_number:!!f.apartment_number&&!!f.delivery_time;return S.jsxs(up,{noClustererRedraw:!0,icon:L,position:g,options:yp,onLoad:v,children:[y&&S.jsxs(zh,{minSnapHeight:f.address?200:void 0,submitDisabled:!p||l,submitLoading:l,hideFooter:!f.address,open:E,onDismiss:C,onSubmitClick:m,children:[f.address&&S.jsx(Cp,{ref:a,hideActions:!0,classes:k5,location:r,onChange:d,onClose:C}),!f.address&&_]}),!y&&E&&S.jsx(gp,{onCloseClick:C,children:_})]})},R5=({children:t,className:e,...n})=>{const{disableDelivery:r,map:i,mapTheme:o,palette:s}=Xe(),a=s==null?void 0:s.primary;function l(){switch(o){case"omnic":return QC;case"omnic-light":return JC(a);default:return}}const u=l(),f=c.useMemo(()=>{var h,v;return{lat:((h=i==null?void 0:i.center)==null?void 0:h[0])??ya[0],lng:((v=i==null?void 0:i.center)==null?void 0:v[1])??ya[1]}},[i==null?void 0:i.center]),d=c.useCallback(async h=>{const{latLng:v}=h;if(!v||r)return;be.getState().setDetailsOpen(!1),on.getState().setSelectedLocation(null);const y=[v.lat(),v.lng()];console.debug("[OmnicLocationsWidget::mapClick]",y);try{await qt.getState().setPlaceAndPoint(y)}catch{Ot.getState().setDeliverPoint({address:null,coords:y})}},[r]);return S.jsx(A4,{zoom:i==null?void 0:i.initialZoom,center:f,mapContainerClassName:Se(ot.root,e),options:{styles:u,...YC},onClick:d,...n,children:t})},D5=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},U.createElement("rect",{width:2,height:20,x:9,fill:"#fff",rx:1}),U.createElement("rect",{width:2,height:20,x:20,y:9,fill:"#fff",rx:1,transform:"rotate(90 20 9)"}),U.createElement("circle",{cx:10,cy:10,r:8,fill:"#fff"}),U.createElement("circle",{cx:10,cy:10,r:6,fill:"currentcolor"}),U.createElement("circle",{cx:10,cy:10,r:4,fill:"#fff"})),A5=t=>{const e=document.createElement("div"),n=document.createElement("div");e.classList.add(ot.mapControl),n.classList.add(ot.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)})},I5=t=>{const e=document.createElement("div");e.classList.add(ot.mapControl),e.classList.add(ot.geolocationControl),e.innerHTML=zp.renderToString(S.jsx(D5,{})),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{Ol(async n=>{const{latitude:r,longitude:i}=n.coords,o=[r,i];await qt.getState().setPlaceAndPoint(o)})})},j5=({className:t})=>{const e=Vn(),n=be(Gf),r=be(Dg),i=sn(yd),o=Ot(Cl),{lmsData:s}=Ts(),{disableGeolocation:a,hideDeliveryTime:l,hideDetails:u,hideMapControls:f,onPointClick:d,skipPointInfo:h}=Xe(),v=c.useCallback(M=>{console.debug("[OmnicLocationsWidget::loadMap]",M),be.getState().setMap(M),f||(A5(M),a||I5(M))},[a,f]),y=c.useCallback(M=>{const O=s==null?void 0:s.location.what3words,T=O!=null&&O.id?O:void 0;d==null||d(M,T)},[d,s]),g=c.useCallback(()=>{console.debug("[OmnicLocationsWidget::unmountMap]"),be.getState().setMap(null)},[]),w=c.useCallback(()=>{if(be.getState().setIdle(!0),!n)return;const M=n==null?void 0:n.getBounds();M&&(console.debug("[OmnicLocationsWidget::changeBounds]",M),sn.getState().loadNext([[M.getSouthWest().lat(),M.getNorthEast().lat()],[M.getSouthWest().lng(),M.getNorthEast().lng()]],e))},[e,n]),C=c.useCallback(async M=>{if(Ot.getState().setDeliverPoint(null),on.getState().setSelectedLocation(M),!M)return;const O=[M.location.latitude,M.location.longitude];console.debug("[OmnicLocationsWidget::selectPoint]",O),await qt.getState().setPlace(O)},[]),L=c.useCallback(()=>{console.debug("[OmnicLocationsWidget::tilesLoaded]")},[]),m=be.getState().setDetailsOpen,{getLMSData:_}=S4(),E=M=>{if(_(M.code),h){y(M);return}m(!1),C(M)},p=()=>{m(!1),C(null)},b=M=>{m(!0),C(M)},x=M=>{y(M),m(!1),C(null)};return S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:Se(ot.mapContainer,t),children:[S.jsxs(R5,{onIdle:w,onLoad:v,onUnmount:g,onTilesLoaded:L,onBoundsChanged:()=>{be.getState().setIdle(!1)},children:[o&&S.jsx(T5,{hideDeliveryTime:l,hideDetails:u,point:o,setOpenDetails:be.getState().setDetailsOpen,setDeliveryPoint:Ot.getState().setDeliverPoint,onPointClick:y}),S.jsx(r5,{handleCloseClick:p,handleDetailsClick:b,handlePointClick:E,handleSubmitClick:x})]}),(i||r)&&S.jsx(Hh,{className:ot.overlay,children:S.jsx(as,{})})]}),S.jsx(U3,{handleDetailsClick:b,handlePointClick:E}),S.jsx(p3,{handleCloseClick:p,handleSubmitClick:x})]})},N5=c.memo(j5),B5=t=>({google:N5})[t];function wp(...t){return c.useCallback(e=>{for(const n of t)typeof n=="function"?n(e):n&&typeof n=="object"&&(n.current=e)},t)}const Ss=t=>{const e=c.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}},F5=()=>{throw new Error("useMediaQuery is a client-only hook")};function U5(t){const e=c.useCallback(r=>{const i=window.matchMedia(t);return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[t]),n=()=>window.matchMedia(t).matches;return c.useSyncExternalStore(e,n,F5)}const V5="768px",z5="1024px",H5="1280px",$5="1536px",W5={screenSm:V5,screenMd:z5,screenLg:H5,screenXl:$5};function vr(t){return U5(`(max-width: calc(${W5[t]} - 1px))`)}const G5=(t,e,n)=>{const{disableGeolocation:r}=n??{},i=be(Gf);c.useEffect(()=>{i&&(console.debug("[OmnicWidgetLocations::setMapLoaded]",i),be.getState().setLoaded())},[i]);const o=t[0],s=t[1];c.useEffect(()=>{if(!i)return;const a=[o,s],l=async()=>{console.debug("[OmnicWidgetLocations::setFallbackCenter]",a),qt.getState().setPlace(a,[],"country")};if(r){l();return}Ol(async u=>{const{latitude:f,longitude:d}=u.coords,h=[f,d];console.debug("[OmnicWidgetLocations::setGeoPosition]",h),await qt.getState().setPlace(h,[],"country")},()=>l())},[o,s,i,e,r])},Sp=M0().use(p0()).use(o0()).init({language:"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"}),Z5=t=>{c.useEffect(()=>{t&&(Sp.changeLanguage(t),os.setLanguage(t))},[t])},q5=t=>{c.useEffect(()=>{if(t){const e=Object.keys(t);for(const n of e){const r=t[n];r&&so(`--owl-color-${n}`,r)}}},[t])},K5=t=>{c.useEffect(()=>{t&&t!==void 0&&so("--owl-button-radius",`${t}px`)},[t])},Q5=t=>{c.useEffect(()=>{t&&t!==void 0&&so("--owl-font",t)},[t])},J5={open:!1},Y5=t=>t.open,er=bn(t=>({...J5,toggle(e){t(n=>({open:e??!n.open}))}})),X5=t=>{const e=t==="selector";c.useEffect(()=>{e&&er.getState().toggle(!0)},[e])},ew=({locale:t})=>{const[e,n]=c.useState(!1);return c.useEffect(()=>{n(!1)},[t]),c.useEffect(()=>{e||n(!0)},[e]),console.debug("[OmnicWidgetLocations::remount]",{locale:t,mounted:e}),e},tw=t=>{c.useEffect(()=>{t==="sharp"&&so("--owl-radius","0")},[t])},nw=({children:t})=>{const{cornersVariant:e,font:n,locale:r,palette:i,radius:o,startScreen:s}=Xe();return Q5(n),Z5(r),q5(i),K5(o),X5(s),tw(e),S.jsx(S.Fragment,{children:t})},rw=({children:t})=>{const{disableGeolocation:e,map:n}=Xe();return yn(n==null?void 0:n.center,"Map center is required"),yn(n==null?void 0:n.initialZoom,"Map initial zoom is required"),G5(n.center,n.initialZoom,{disableGeolocation:e}),S.jsx(S.Fragment,{children:t})},iw=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:28,fill:"none",viewBox:"0 0 24 28",...t},U.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"})),ow=()=>{er.getState().toggle(!0),be.getState().setDetailsOpen(!1),Ot.getState().setDeliverPoint(null),on.getState().setSelectedLocation(null)},sw="CurrentLocation-module__root__AeQCGT",aw="CurrentLocation-module__icon__459m9q",lw="CurrentLocation-module__text__w-9v28",ha={root:sw,icon:aw,text:lw},Lp=({className:t})=>{const{t:e}=ln("current_location"),n=qt(Md),r=qt(km);return S.jsxs("div",{role:"presentation",className:Se(ha.root,t),onClick:ow,children:[S.jsx(iw,{className:ha.icon}),S.jsxs("span",{className:ha.text,children:[!n&&e("choose_from_map"),n&&`${(r==null?void 0:r.long_name)??n.formatted_address}`]})]})},uw=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:123,height:32,fill:"none",viewBox:"0 0 123 32",...t},U.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"})),cw=t=>U.createElement("svg",{width:119,height:44,viewBox:"0 0 119 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},U.createElement("path",{d:"M4.70489 0.199253H0V13.4418H10.7452V10.0105H4.70489V0.199253Z",fill:"black"}),U.createElement("path",{d:"M16.9359 0.199253H12.2287V13.4418H22.974V10.0105H16.9359V0.199253Z",fill:"black"}),U.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"}),U.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"}),U.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"}),U.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"}),U.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"}),U.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"}),U.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"}),U.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"}),U.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"}),U.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"}),U.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"})),fw="Header-module__root__Pe4MYp",dw="Header-module__nav__wtnkmT",hw="Header-module__navItem__-Fy63Z",pw="Header-module__logo__xO2bWO",Mi={root:fw,nav:dw,navItem:hw,logo:pw},gw={llama:cw,default:uw},vw=()=>{const{hideLogo:t,logo:e="default"}=Xe();if(t)return null;const n=gw[e];return S.jsx("div",{className:Mi.logo,children:S.jsx(n,{})})},mw=({className:t})=>{const{t:e}=ln("header"),{disableDelivery:n}=Xe(),r=be(Pg),i=Ot(Cl);c.useEffect(()=>{i?be.getState().setMode("location_delivery"):be.getState().setMode("self_pickup")},[i]);const o=()=>{Ot.getState().setDeliverPoint(null),be.getState().setMode("self_pickup")},s=()=>{Ot.getState().setDeliverPoint(null),be.getState().setMode("location_delivery")},a=r==="self_pickup",l=r==="location_delivery";return S.jsxs("div",{className:Se(Mi.root,t),children:[S.jsx(vw,{}),S.jsxs("nav",{className:Mi.nav,children:[!n&&S.jsx(Bt,{as:"link",className:Mi.navItem,variant:a?"primary":"secondary",onClick:o,children:e("self_pickup")}),!n&&S.jsx(Bt,{as:"link",className:Mi.navItem,variant:l?"primary":"secondary",onClick:s,children:e("courier_delivery")}),S.jsx(Lp,{})]})]})},yw=c.memo(mw),bw={open:!1},Xr=bn(t=>({...bw,toggle(e){be.getState().setDetailsOpen(!1),Ot.getState().setDeliverPoint(null),on.getState().setSelectedLocation(null),t(n=>({open:e??!n.open}))}})),Cw="Layout-module__root__qzPL-f",ww="Layout-module__headerHidden__JEN-d0",Sw="Layout-module__sidebarHidden__x017O3",Lw="Layout-module__sidebarOpen__IZnIjs",Uo={root:Cw,headerHidden:ww,sidebarHidden:Sw,sidebarOpen:Lw},xw=({children:t})=>{const{hideFilters:e,hideHeader:n}=Xe(),r=Xr(i=>i.open);return S.jsx("div",{className:Se(Uo.root,{[Uo.sidebarOpen]:r,[Uo.headerHidden]:n,[Uo.sidebarHidden]:e}),children:t})},Ns=()=>S.jsx(Hh,{children:S.jsx(as,{})}),Ew=({children:t})=>{const e=sn(fm);return sn(yd)&&!e?S.jsx(Ns,{}):S.jsx(S.Fragment,{children:t})};var xp={},Bs={},Ep={exports:{}},_w="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Mw=_w,Ow=Mw;function _p(){}function Mp(){}Mp.resetWarningCache=_p;var Pw=function(){function t(r,i,o,s,a,l){if(l!==Ow){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:Mp,resetWarningCache:_p};return n.PropTypes=n,n};Ep.exports=Pw();var kw=Ep.exports,Fs={},ei={};Object.defineProperty(ei,"__esModule",{value:!0});ei.loadGoogleMapScript=ei.isBrowser=void 0;var Op=typeof window<"u"&&window.document;ei.isBrowser=Op;var Tw=function(e,n){if(!Op||typeof google<"u"&&google.maps&&google.maps.api)return Promise.resolve();var r=document.querySelectorAll('script[src*="'.concat(e,'"]'));if(r&&r.length)return new Promise(function(s){if(typeof google<"u")return s();r[0].addEventListener("load",function(){return s()})});var i=new URL(n);i.searchParams.set("callback","__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__");var o=document.createElement("script");return o.src=i.toString(),new Promise(function(s){window.__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__=s,document.body.appendChild(o)})};ei.loadGoogleMapScript=Tw;var Us={};Object.defineProperty(Us,"__esModule",{value:!0});Us.GOOGLE_MAP_SCRIPT_BASE_URL=void 0;var Rw="https://maps.googleapis.com/maps/api/js";Us.GOOGLE_MAP_SCRIPT_BASE_URL=Rw;function ns(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ns=function(n){return typeof n}:ns=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ns(t)}Object.defineProperty(Fs,"__esModule",{value:!0});Fs.default=Bw;var xt=Aw(c),pa=ei,Dw=Us;function Pp(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(Pp=function(i){return i?n:e})(t)}function Aw(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||ns(t)!=="object"&&typeof t!="function")return{default:t};var n=Pp(e);if(n&&n.has(t))return n.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}function Cf(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 wf(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Cf(Object(n),!0).forEach(function(r){Iw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Cf(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Iw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function jw(t,e){if(t==null)return{};var n=Nw(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Nw(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Bw(t){var e=t.ref,n=t.onPlaceSelected,r=t.apiKey,i=t.libraries,o=i===void 0?"places":i,s=t.inputAutocompleteValue,a=s===void 0?"new-password":s,l=t.options;l=l===void 0?{}:l;var u=l.types,f=u===void 0?["(cities)"]:u,d=l.componentRestrictions,h=l.fields,v=h===void 0?["address_components","geometry.location","place_id","formatted_address"]:h,y=l.bounds,g=jw(l,["types","componentRestrictions","fields","bounds"]),w=t.googleMapsScriptBaseUrl,C=w===void 0?Dw.GOOGLE_MAP_SCRIPT_BASE_URL:w,L=t.language,m=(0,xt.useRef)(null),_=(0,xt.useRef)(null),E=(0,xt.useRef)(null),p=(0,xt.useRef)(null),b=L?"&language=".concat(L):"",x="".concat(C,"?libraries=").concat(o,"&key=").concat(r).concat(b),M=(0,xt.useCallback)(function(){return(0,pa.loadGoogleMapScript)(C,x)},[C,x]);return(0,xt.useEffect)(function(){var O=wf(wf({},g),{},{fields:v,types:f,bounds:y});if(d&&(O.componentRestrictions=d),!(E.current||!m.current||!pa.isBrowser)){e&&!e.current&&(e.current=m.current);var T=function(){var R;if(typeof google>"u")return console.error("Google has not been found. Make sure your provide apiKey prop.");if(!((R=google.maps)!==null&&R!==void 0&&R.places))return console.error("Google maps places API must be loaded.");if(!m.current instanceof HTMLInputElement)return console.error("Input ref must be HTMLInputElement.");E.current=new google.maps.places.Autocomplete(m.current,O),E.current&&(_.current=E.current.addListener("place_changed",function(){n&&E&&E.current&&n(E.current.getPlace(),m.current,E.current)}))};return r?M().then(function(){return T()}):T(),function(){return _.current?_.current.remove():void 0}}},[]),(0,xt.useEffect)(function(){var O;!(xt.default!==null&&xt.default!==void 0&&(O=xt.default.version)!==null&&O!==void 0&&O.startsWith("18"))&&pa.isBrowser&&window.MutationObserver&&m.current&&m.current instanceof HTMLInputElement&&(p.current=new MutationObserver(function(){p.current.disconnect(),m.current&&(m.current.autocomplete=a)}),p.current.observe(m.current,{attributes:!0,attributeFilter:["autocomplete"]}))},[a]),(0,xt.useEffect)(function(){E.current&&E.current.setFields(v)},[v]),(0,xt.useEffect)(function(){E.current&&E.current.setBounds(y)},[y]),(0,xt.useEffect)(function(){E.current&&E.current.setComponentRestrictions(d)},[d]),(0,xt.useEffect)(function(){E.current&&E.current.setOptions(g)},[g]),{ref:m,autocompleteRef:E}}function rs(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?rs=function(n){return typeof n}:rs=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},rs(t)}Object.defineProperty(Bs,"__esModule",{value:!0});Bs.default=void 0;var yl=Uw(c),Je=kp(kw),Fw=kp(Fs);function kp(t){return t&&t.__esModule?t:{default:t}}function Tp(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(Tp=function(i){return i?n:e})(t)}function Uw(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||rs(t)!=="object"&&typeof t!="function")return{default:t};var n=Tp(e);if(n&&n.has(t))return n.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}function Ls(){return Ls=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},Ls.apply(this,arguments)}function Vw(t,e){if(t==null)return{};var n=zw(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function zw(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Rp(t){var e=t.onPlaceSelected,n=t.apiKey,r=t.libraries,i=t.inputAutocompleteValue,o=t.options,s=t.googleMapsScriptBaseUrl,a=t.refProp,l=t.language,u=Vw(t,["onPlaceSelected","apiKey","libraries","inputAutocompleteValue","options","googleMapsScriptBaseUrl","refProp","language"]),f=(0,Fw.default)({ref:a,googleMapsScriptBaseUrl:s,onPlaceSelected:e,apiKey:n,libraries:r,inputAutocompleteValue:i,options:o,language:l}),d=f.ref;return yl.default.createElement("input",Ls({ref:d},u))}Rp.propTypes={apiKey:Je.default.string,libraries:Je.default.arrayOf(Je.default.string),ref:Je.default.oneOfType([Je.default.func,Je.default.shape({current:Je.default.any})]),googleMapsScriptBaseUrl:Je.default.string,onPlaceSelected:Je.default.func,inputAutocompleteValue:Je.default.string,options:Je.default.shape({componentRestrictions:Je.default.object,bounds:Je.default.object,location:Je.default.object,offset:Je.default.number,origin:Je.default.object,radius:Je.default.number,sessionToken:Je.default.object,types:Je.default.arrayOf(Je.default.string)}),language:Je.default.string};var Hw=(0,yl.forwardRef)(function(t,e){return yl.default.createElement(Rp,Ls({},t,{refProp:e}))});Bs.default=Hw;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(t,"usePlacesWidget",{enumerable:!0,get:function(){return n.default}});var e=r(Bs),n=r(Fs);function r(i){return i&&i.__esModule?i:{default:i}}})(xp);var Dp=xp;async function $w(){return(await Qe.request({method:"GET",baseURL:"https://api.geo-data.omnic.solutions/api/1.0/key",headers:{Authorization:"Token fa812020-3197-401a-9b39-345999046111"}})).data.data}function Ww(t){return np({queryKey:["wl-map-key-wl"],queryFn:()=>$w(),refetchOnWindowFocus:!1,retry:2,enabled:!t})}const Ap=c.createContext(null),Gw=({children:t})=>{const{gMapKey:e}=Xe(),{data:n,isFetching:r}=Ww(e),i=c.useMemo(()=>({mapKey:e||n||"AIzaSyDsI0AO8VsUrTPoyR9fF7T31FKx1a9TLO0"}),[n,e]);return S.jsx(Ap.Provider,{value:i,children:r?S.jsx(Ns,{}):t})},Ip=()=>{const t=c.useContext(Ap);if(!t)throw new Error("useMapKeyContext must be used within a MapKeyProvider");return t},Zw="Aside-module__root__EotK2f",qw="Aside-module__open__Zwmbs5",Kw="Aside-module__overlay__slLdHF",Qw="Aside-module__container__28P4wq",Vo={root:Zw,open:qw,overlay:Kw,container:Qw},Jw=({children:t,className:e,open:n})=>S.jsxs("div",{className:Se(Vo.root,e,{[Vo.open]:n}),children:[S.jsx("div",{className:Vo.overlay}),S.jsx("div",{className:Vo.container,children:t})]}),Yw="Input-module__locationSearchRoot__svh-f9",Xw="Input-module__endAdornment__m40K5R",e6="Input-module__input__505b7i",t6="Input-module__startAdornment__D-sJ0N",n6="Input-module__locationSearchInput__2YK1MG",r6="Input-module__label__gmqtsf",i6="Input-module__inputContainer__vubIa-",_r={locationSearchRoot:Yw,endAdornment:Xw,input:e6,startAdornment:t6,locationSearchInput:n6,label:r6,inputContainer:i6},jp=c.forwardRef(({className:t,endAdornment:e,inputRef:n,label:r,onBlur:i,onChange:o,startAdornment:s,...a},l)=>{const u=c.useId(),f=c.useRef(null);c.useImperativeHandle(l,()=>({focus:()=>{var h;(h=f.current)==null||h.focus()},blur:()=>{var h;(h=f.current)==null||h.blur()},setValue:h=>{if(o){o({target:{value:h}});return}if(i){i({target:{value:h}});return}f.current&&(f.current.value=h)}}),[i,o]);const d=wp(n,f);return S.jsxs("label",{htmlFor:a.id??u,className:Se(_r.locationSearchRoot,t),children:[r&&S.jsx("span",{className:_r.label,children:r}),S.jsxs("div",{className:_r.inputContainer,children:[s&&S.jsx("div",{className:_r.startAdornment,children:s}),S.jsx("input",{...a,ref:d,id:a.id??u,className:_r.locationSearchInput,onChange:o,onBlur:i}),e&&S.jsx("div",{className:_r.endAdornment,children:e})]})]})}),o6="LocationAside-module__submit__CSKcqi",s6="LocationAside-module__container__S1NejR",a6="LocationAside-module__selector__hl74ke",l6="LocationAside-module__label__0Zk8at",u6="LocationAside-module__header__N1wgyn",c6="LocationAside-module__close__VsE88z",zo={submit:o6,container:s6,selector:a6,label:l6,header:u6,close:c6},f6=c.forwardRef((t,e)=>{const{t:n}=ln(["location_aside","common"]),{mapKey:r}=Ip(),i=er(Y5),{country:o,hideCloseButtonOnLocationScreen:s,inputs:a,onCloseLocationSelector:l,onLocationSelect:u}=Xe(),f=c.useRef(null),[d,h]=c.useState("");c.useImperativeHandle(e,()=>({open:()=>er.getState().toggle(!0),close:()=>er.getState().toggle(!1)}),[]);const v=async m=>{er.getState().toggle(!1),await qt.getState().setPlace(m),u==null||u(m),m!=null&&m.formatted_address&&h(m==null?void 0:m.formatted_address)},y=()=>{er.getState().toggle(!1),l==null||l()},g=o?{componentRestrictions:{country:o}}:void 0,w=m=>{h(m.target.value)},{ref:C}=Dp.usePlacesWidget({libraries:["places"],options:g,onPlaceSelected:v,apiKey:r,inputAutocompleteValue:d}),L=Ss(a==null?void 0:a.city);return S.jsx(Jw,{open:i,children:S.jsx("div",{ref:f,className:zo.container,children:S.jsxs("div",{className:zo.selector,children:[S.jsxs("div",{className:zo.header,children:[S.jsx("div",{className:zo.label,children:n("choose_city")}),!s&&S.jsx(ri,{position:"relative",onClick:y})]}),S.jsx(jp,{...L,inputRef:C,value:d,placeholder:n("placeholder"),onChange:w})]})})})}),d6=c.memo(f6),h6=({children:t})=>{const{locale:e}=Xe(),{mapKey:n}=Ip(),{setMapKey:r}=qt();c.useEffect(()=>{r(n)},[n,r]);const{isLoaded:i}=lp({language:e,libraries:eg,googleMapsApiKey:n});return i?S.jsx(S.Fragment,{children:t}):S.jsx(Ns,{})},p6=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},U.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"})),g6=({className:t})=>{const{t:e}=ln("location_selector"),{country:n,inputs:r,onLocationSelect:i}=Xe(),[o,s]=c.useState(""),[a,l]=c.useState(!1),u=[],f=n?{componentRestrictions:{country:n},types:u}:{types:u},d=async L=>{await qt.getState().setPlaceAndPoint(L,{ignoreSelection:!0}),i==null||i(L),s("")},{ref:h}=Dp.usePlacesWidget({libraries:["places"],options:f,onPlaceSelected:d,inputAutocompleteValue:o}),v=L=>{a&&be.getState().setBlurred(!!L.target.value),s(L.target.value)},y=()=>{o&&be.getState().setBlurred(!0),be.getState().setDetailsOpen(!1),Ot.getState().setDeliverPoint(null),on.getState().setSelectedLocation(null),l(!0)},g=()=>{be.getState().setBlurred(!1),l(!1)},w=L=>{L.key==="Enter"&&L.preventDefault()},C=Ss(r==null?void 0:r.address);return S.jsx(jp,{...C,inputRef:h,value:o,className:t,endAdornment:S.jsx(p6,{}),placeholder:e("placeholder"),onChange:v,onFocus:y,onBlur:g,onKeyDown:w})},v6=({className:t})=>be(Rg)?S.jsx(g6,{className:t}):null,m6=c.memo(v6),y6="DeliveryDetailsModal-module__root__qwKnjX",b6={root:y6},C6=({className:t,location:e,onClose:n,onSubmit:r})=>S.jsx("div",{className:Se(b6.root,t),children:S.jsx(Cp,{location:e,onClose:n,onSubmit:r})}),w6="LocationDetailsModal-module__root__PyRnLM",S6={root:w6},L6=({className:t,location:e,onClose:n,onSubmit:r})=>{const i=()=>{r==null||r(e)};return S.jsx("div",{className:Se(S6.root,t),children:S.jsx(Hd,{location:e,onClose:n,onSubmit:i})})},x6="MapContainer-module__root__1Os6Q-",E6="MapContainer-module__mapWrapper__Cwe7qC",_6="MapContainer-module__wrapperBlurred__04NN2L",M6="MapContainer-module__locationSelector__Pr1zS-",O6="MapContainer-module__filterButton__CW3Qv7",P6="MapContainer-module__sidebarOpen__lGMVrJ",k6="MapContainer-module__filterIcon__T01XsJ",T6="MapContainer-module__details__gM8LWX",rn={root:x6,mapWrapper:E6,wrapperBlurred:_6,locationSelector:M6,filterButton:O6,sidebarOpen:P6,filterIcon:k6,details:T6},R6=()=>{const{onPointClick:t}=Xe(),e=be(wl),n=on(Ig),r=Ot(Cl),i=c.useCallback(()=>{be.getState().setDetailsOpen(!1)},[]),o=c.useCallback(s=>{t==null||t(s),be.getState().setDetailsOpen(!1),on.getState().setSelectedLocation(null),Ot.getState().setDeliverPoint(null)},[t]);return S.jsxs(S.Fragment,{children:[(r==null?void 0:r.address)&&e&&S.jsx(C6,{location:r,className:rn.details,onClose:i,onSubmit:o}),n&&e&&S.jsx(L6,{location:n,className:rn.details,onClose:i,onSubmit:o})]})},D6=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:60,height:40,fill:"none",viewBox:"0 0 60 40",...t},U.createElement("path",{d:"M0 0h52a8 8 0 0 1 8 8v24a8 8 0 0 1-8 8H0V0Z"}),U.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"})),A6=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:28,height:28,fill:"none",viewBox:"0 0 28 28",...t},U.createElement("rect",{width:28,height:28,fill:"#333",rx:4}),U.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"})),I6=()=>{const t=Xr(i=>i.open),e=Xr(i=>i.toggle),n=vr("screenSm"),r=()=>{e(!0)};return S.jsxs("div",{role:"presentation",className:Se(rn.filterButton,{[rn.sidebarOpen]:t}),onClick:n?void 0:r,children:[n&&S.jsx(Lp,{}),n?S.jsx(A6,{className:rn.filterIcon,onClick:r}):S.jsx(D6,{className:rn.filterIcon})]})},j6=({children:t,className:e})=>{const{hideFilters:n,hideSearchInput:r}=Xe(),i=be(Tg),o=be(wl);return S.jsxs("div",{className:Se(rn.root,e),children:[!r&&!o&&S.jsx(m6,{className:rn.locationSelector}),!n&&S.jsx(I6,{}),S.jsx("div",{className:Se(rn.mapWrapper,{[rn.wrapperBlurred]:i}),children:t}),S.jsx(R6,{})]})},N6=c.memo(j6),B6="Separator-module__root__eQtZey",F6={root:B6},ga=({className:t,...e})=>S.jsx("hr",{className:Se(F6.root,t),...e}),U6="Sidebar-module__root__4j1MA3",V6="Sidebar-module__closeButton__HLXy1c",z6="Sidebar-module__open__mqQXF6",H6="Sidebar-module__header__Afp6uz",$6="Sidebar-module__typeFilter__GN46u9",W6="Sidebar-module__separator__6I4QoJ",G6="Sidebar-module__withRightPadding__2u1Ina",Z6="Sidebar-module__sheetContent__SaoncI",q6="Sidebar-module__doneButton__4aeaSD",vn={root:U6,closeButton:V6,open:z6,header:H6,typeFilter:$6,separator:W6,withRightPadding:G6,sheetContent:Z6,doneButton:q6},K6=()=>{const{t}=ln("common"),e=vr("screenSm"),n=Xr(i=>i.toggle),r=()=>{n(!1)};return S.jsxs("div",{className:vn.header,children:[e&&S.jsx("div",{role:"presentation",className:vn.doneButton,onClick:r,children:t("done")}),!e&&S.jsx(ri,{className:vn.closeButton,onClick:r})]})},Q6="Radio-module__root__7ElY2W",J6="Radio-module__label__c-sYW3",Sf={root:Q6,label:J6},Y6=({className:t,label:e,labelProps:n={},...r})=>{const i=c.useId(),{className:o,...s}=n;return S.jsxs("label",{htmlFor:i,className:Se(Sf.label,o),...s,children:[S.jsx("input",{id:i,type:"radio",className:Se(Sf.root,t),...r}),e]})},Ar=t=>S.jsx(Y6,{...t,type:"checkbox"}),X6="RadioGroup-module__root__ewZw-x",eS="RadioGroup-module__body__k8BJAs",tS="RadioGroup-module__legend__tcfV7q",va={root:X6,body:eS,legend:tS},Np=({children:t,className:e,label:n,onChange:r,value:i,...o})=>S.jsxs("div",{className:Se(va.root,e),...o,children:[n&&S.jsx("span",{className:va.legend,children:n}),S.jsx("div",{className:va.body,children:c.Children.map(t,s=>c.isValidElement(s)?c.cloneElement(s,{checked:!!(i!=null&&i[s.props.value]),onChange:a=>r==null?void 0:r({...i,[a.target.value]:a.target.checked})}):null)})]}),nS=({className:t,onChange:e})=>{const{t:n}=ln("receive_filter"),r=Vn(Fg);return S.jsxs(Np,{value:r,label:n("title"),className:t,onChange:e,children:[S.jsx(Ar,{name:"receive",value:Gt.DressingRoom,label:n("dressing_room")}),S.jsx(Ar,{name:"receive",value:Gt.CheckOrder,label:n("check_order")}),S.jsx(Ar,{name:"receive",value:Gt.PayByCash,label:n("pay_by_cash")})]})},rS=c.memo(nS),iS=({className:t,onChange:e})=>{const{t:n}=ln("send_filter"),r=Vn(Bg);return S.jsxs(Np,{className:t,value:r,label:n("title"),onChange:e,children:[S.jsx(Ar,{name:"send",value:Zt.Return,label:n("sending_returns")}),S.jsx(Ar,{name:"send",value:Zt.Shipping,label:n("shipping")}),S.jsx(Ar,{name:"send",value:Zt.Payment,label:n("payment")})]})},oS=c.memo(iS),sS="TypeFilter-module__root__WH5EQV",aS="TypeFilter-module__button__f0mSfo",Ho={root:sS,button:aS},lS=({className:t,onChange:e,value:n})=>{const{t:r}=ln("type_filter"),i=o=>()=>e==null?void 0:e(o);return S.jsxs("div",{className:Se(Ho.root,t),children:[S.jsx(Bt,{className:Ho.button,variant:n===gn.All?"primary":"secondary",onClick:i(gn.All),children:r("all")}),S.jsx(Bt,{className:Ho.button,variant:n===gn.PostOffice?"primary":"secondary",onClick:i(gn.PostOffice),children:r("post_office")}),S.jsx(Bt,{className:Ho.button,variant:n===gn.PickPoint?"primary":"secondary",onClick:i(gn.PickPoint),children:r("pick_point")})]})},uS=({className:t,onChange:e})=>{const n=Vn(Ng);return S.jsx(lS,{value:n,className:t,onChange:e})},cS=c.memo(uS),fS=({className:t})=>{const e=vr("screenSm"),n=Xr(l=>l.open),r=c.useCallback(l=>Vn.getState().setFilter({type:l}),[]),i=c.useCallback(l=>Vn.getState().setFilter({send:l}),[]),o=c.useCallback(l=>Vn.getState().setFilter({receive:l}),[]),s=c.useCallback(()=>Xr.getState().toggle(!1),[]),a=S.jsxs(S.Fragment,{children:[S.jsx(K6,{}),S.jsxs("div",{className:vn.withRightPadding,children:[S.jsx(cS,{className:vn.typeFilter,onChange:r}),S.jsx(ga,{className:vn.separator}),S.jsx(rS,{onChange:o}),S.jsx(ga,{}),S.jsx(oS,{onChange:i}),S.jsx(ga,{})]})]});return e?S.jsx(Uh,{initialFocusRef:!1,open:n,snapPoints:({maxHeight:l})=>l-Vh,onDismiss:s,children:S.jsx("div",{className:vn.sheetContent,children:a})}):S.jsx("div",{className:Se(vn.root,t,{[vn.open]:n}),children:a})},dS="App-module__map__Kf-2JS",hS="App-module__sidebar__ORIzGk",pS="App-module__header__bgP9DA",ma={map:dS,sidebar:hS,header:pS},gS=new n4,Bp=({config:t,options:e})=>{const n=_m(t),{INN:r,hideFilters:i,hideHeader:o,locale:s,map:a}=n;yn(r,"INN is required"),Mm(r,e),yn(a==null?void 0:a.provider,"Map provider is required");const l=B5(a.provider);dm();const u=ew({locale:s});return S.jsx($p,{baseColor:"#f3f3f3",highlightColor:"#ecebeb",children:S.jsx(a4,{client:gS,children:S.jsx(Gw,{children:S.jsx(Uf.Provider,{value:n,children:S.jsx(rw,{children:S.jsx(nw,{children:S.jsx(P0,{tolgee:Sp,fallback:S.jsx(Ns,{}),children:u&&S.jsx(h6,{children:S.jsx(Ew,{children:S.jsxs(xw,{children:[!o&&S.jsx(yw,{className:ma.header}),!i&&S.jsx(fS,{className:ma.sidebar}),S.jsx(N6,{className:ma.map,children:S.jsx(l,{})}),S.jsx(d6,{})]})})})})})})})})})})},Fp=async t=>Vi.request({baseURL:"https://api.geo-data.omnic.solutions/api/1.0/",method:"POST",url:"normalize/address",data:t,headers:{Authorization:"Token 9877f9631b2e30570cc1c5aa8c740b0c912efe99a8b6c45c21cf4bd394adc7e9"}}),Up=c.createContext(null);let Lf=!1;const vS=({children:t})=>{const[e,n]=c.useState(),[r,i]=c.useState(),o=c.useRef(null),s=c.useRef(null),a=c.useCallback(u=>{if(Lf){console.warn("Widget already launched");return}Lf=!0,n(u)},[]),l=c.useMemo(()=>({widgetOutHolderRef:o,widgetLocationsRef:s,launchWidget:a,setDynamicConfig:i}),[a]);return S.jsxs(Up.Provider,{value:l,children:[S.jsx("div",{ref:o,style:{position:"fixed",left:"-9999px",top:"-9999px"},children:S.jsx("div",{ref:s,id:"@omnic/widget-locations",style:{height:"100%",width:"100%"},children:e&&S.jsx(Bp,{options:e.options,config:{...e.config,...r}})})}),t]})};function Vp(){const t=c.useContext(Up);if(!t)throw new Error("Please use hook useWidgetLocationsContext inside WidgetLocationsProvider");return t}const mS=t=>{const{setDynamicConfig:e,widgetLocationsRef:n,widgetOutHolderRef:r}=Vp(),i=c.useRef(null);return c.useEffect(()=>{t&&e(t)},[t,e]),c.useEffect(()=>{const o=r.current,s=n.current,a=i.current;return s&&a&&a.appendChild(s),()=>{s&&o&&o.appendChild(s)}},[n,r]),S.jsx("div",{ref:i,style:{width:"100%",height:"100%"}})};exports.EReceiveFilter=Gt;exports.ESendFilter=Zt;exports.ETypeFilter=gn;exports.MapPlaceholder=mS;exports.Widget=Bp;exports.WidgetLocationsProvider=vS;exports.createPointsIterator=Ea;exports.fetchPointsRequest=xa;exports.fromHoursMinutesToMinutes=Ug;exports.fromMinutesToHoursMinutes=Vg;exports.getAddressFormGeocode=Oa;exports.getBoundsFromPoint=zg;exports.getCurrentPosition=Ol;exports.getNormalizedAddress=Fp;exports.getPropertyValue=md;exports.isCoordinates=Ma;exports.isDeliveryPoint=lm;exports.isHttpSuccess=vd;exports.isPlaceId=gd;exports.replaceSvgCurrentColor=Pr;exports.setWidgetCSSProperty=so;exports.stopImmediatePropagation=_a;exports.svgStringToBase64URL=Pl;exports.useWidgetLocationsContext=Vp;
|
|
263
|
+
</svg>`,a=`Cluster of ${e} markers`,l=Number(google.maps.Marker.MAX_ZINDEX)+e;if(Tt.isAdvancedMarkerAvailable(i)){const d=new DOMParser().parseFromString(s,"image/svg+xml").documentElement;d.setAttribute("transform","translate(0 25)");const h={map:i,position:n,zIndex:l,title:a,content:d};return new google.maps.marker.AdvancedMarkerElement(h)}const u={position:n,zIndex:l,title:a,icon:{url:`data:image/svg+xml;base64,${btoa(s)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(u)}}function hC(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class Kl{constructor(){hC(Kl,google.maps.OverlayView)}}var Fi;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(Fi||(Fi={}));const pC=(t,e,n)=>{n.fitBounds(e.bounds)};class gC extends Kl{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new cC(r),renderer:o=new dC,onClusterClick:s=pC}){super(),this.markers=[...n],this.clusters=[],this.algorithm=i,this.renderer=o,this.onClusterClick=s,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:(Tt.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,Fi.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 s of n)s.markers.length==1&&i.add(s.markers[0]);const o=[];for(const s of this.clusters)s.marker!=null&&(s.markers.length==1?i.has(s.marker)||Tt.setMap(s.marker,null):o.push(s.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>o.forEach(s=>Tt.setMap(s,null)))}google.maps.event.trigger(this,Fi.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>Tt.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new fC(this.markers,this.clusters),n=this.getMap();this.clusters.forEach(r=>{r.markers.length===1?r.marker=r.markers[0]:(r.marker=this.renderer.render(r,e,n),r.markers.forEach(i=>Tt.setMap(i,null)),this.onClusterClick&&r.marker.addListener("click",i=>{google.maps.event.trigger(this,Fi.CLUSTER_CLICK,r),this.onClusterClick(i,r,n)})),Tt.setMap(r.marker,n)})}}function vC(t){var e=M4(),n=c.useState(null),r=n[0],i=n[1];return c.useEffect(function(){if(e&&r===null){var o=new gC(K(K({},t),{map:e}));i(o)}},[e]),r}function mC(t){var e=t.children,n=t.options,r=vC(n);return r!==null?e(r):null}c.memo(mC);var Hc={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},$c={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function yC(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,o=t.zIndex,s=t.onCloseClick,a=t.onDomReady,l=t.onContentChanged,u=t.onPositionChanged,f=t.onZindexChanged,d=t.onLoad,h=t.onUnmount,v=c.useContext(le),y=c.useState(null),g=y[0],w=y[1],C=c.useState(null),L=C[0],m=C[1],_=c.useState(null),x=_[0],p=_[1],b=c.useState(null),E=b[0],P=b[1],O=c.useState(null),T=O[0],M=O[1],R=c.useState(null),A=R[0],B=R[1],V=c.useRef(null);return c.useEffect(function(){g!==null&&(g.close(),n?g.open(v,n):g.getPosition()&&g.open(v))},[v,g,n]),c.useEffect(function(){r&&g!==null&&g.setOptions(r)},[g,r]),c.useEffect(function(){i&&g!==null&&g.setPosition(i)},[i]),c.useEffect(function(){typeof o=="number"&&g!==null&&g.setZIndex(o)},[o]),c.useEffect(function(){g&&s&&(L!==null&&google.maps.event.removeListener(L),m(google.maps.event.addListener(g,"closeclick",s)))},[s]),c.useEffect(function(){g&&a&&(x!==null&&google.maps.event.removeListener(x),p(google.maps.event.addListener(g,"domready",a)))},[a]),c.useEffect(function(){g&&l&&(E!==null&&google.maps.event.removeListener(E),P(google.maps.event.addListener(g,"content_changed",l)))},[l]),c.useEffect(function(){g&&u&&(T!==null&&google.maps.event.removeListener(T),M(google.maps.event.addListener(g,"position_changed",u)))},[u]),c.useEffect(function(){g&&f&&(A!==null&&google.maps.event.removeListener(A),B(google.maps.event.addListener(g,"zindex_changed",f)))},[f]),c.useEffect(function(){var N=new google.maps.InfoWindow(K({},r||{}));return w(N),V.current=document.createElement("div"),s&&m(google.maps.event.addListener(N,"closeclick",s)),a&&p(google.maps.event.addListener(N,"domready",a)),l&&P(google.maps.event.addListener(N,"content_changed",l)),u&&M(google.maps.event.addListener(N,"position_changed",u)),f&&B(google.maps.event.addListener(N,"zindex_changed",f)),N.setContent(V.current),i&&N.setPosition(i),o&&N.setZIndex(o),n?N.open(v,n):N.getPosition()?N.open(v):Ye(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),d&&d(N),function(){L&&google.maps.event.removeListener(L),E&&google.maps.event.removeListener(E),x&&google.maps.event.removeListener(x),T&&google.maps.event.removeListener(T),A&&google.maps.event.removeListener(A),h&&h(N),N.close()}},[]),V.current?ti.createPortal(c.Children.only(e),V.current):null}c.memo(yC);var gp=function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoWindow:null},n.open=function(r,i){i?r.open(n.context,i):r.getPosition()?r.open(n.context):Ye(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")},n.setInfoWindowCallback=function(){n.state.infoWindow!==null&&n.containerElement!==null&&(n.state.infoWindow.setContent(n.containerElement),n.open(n.state.infoWindow,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoWindow))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.InfoWindow(K({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=ce({updaterMap:$c,eventMap:Hc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{infoWindow:n}},this.setInfoWindowCallback)},e.prototype.componentDidUpdate=function(n){this.state.infoWindow!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:$c,eventMap:Hc,prevProps:n,nextProps:this.props,instance:this.state.infoWindow}))},e.prototype.componentWillUnmount=function(){this.state.infoWindow!==null&&(he(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},e.prototype.render=function(){return this.containerElement?ti.createPortal(c.Children.only(this.props.children),this.containerElement):null},e.contextType=le,e}(c.PureComponent),Wc={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Gc={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},visible:function(t,e){t.setVisible(e)}},bC={};function CC(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.onDblClick,a=t.onDragEnd,l=t.onDragStart,u=t.onMouseDown,f=t.onMouseMove,d=t.onMouseOut,h=t.onMouseOver,v=t.onMouseUp,y=t.onRightClick,g=t.onClick,w=t.onDrag,C=t.onLoad,L=t.onUnmount,m=c.useContext(le),_=c.useState(null),x=_[0],p=_[1],b=c.useState(null),E=b[0],P=b[1],O=c.useState(null),T=O[0],M=O[1],R=c.useState(null),A=R[0],B=R[1],V=c.useState(null),N=V[0],z=V[1],Y=c.useState(null),G=Y[0],H=Y[1],Q=c.useState(null),oe=Q[0],te=Q[1],ee=c.useState(null),D=ee[0],pe=ee[1],Pe=c.useState(null),Z=Pe[0],De=Pe[1],Ae=c.useState(null),ue=Ae[0],_e=Ae[1],Ve=c.useState(null),Ce=Ve[0],Me=Ve[1],Ie=c.useState(null),ke=Ie[0],je=Ie[1];return c.useEffect(function(){x!==null&&x.setMap(m)},[m]),c.useEffect(function(){typeof e<"u"&&x!==null&&x.setOptions(e)},[x,e]),c.useEffect(function(){typeof n<"u"&&x!==null&&x.setDraggable(n)},[x,n]),c.useEffect(function(){typeof r<"u"&&x!==null&&x.setEditable(r)},[x,r]),c.useEffect(function(){typeof i<"u"&&x!==null&&x.setVisible(i)},[x,i]),c.useEffect(function(){typeof o<"u"&&x!==null&&x.setPath(o)},[x,o]),c.useEffect(function(){x&&s&&(E!==null&&google.maps.event.removeListener(E),P(google.maps.event.addListener(x,"dblclick",s)))},[s]),c.useEffect(function(){x&&a&&(T!==null&&google.maps.event.removeListener(T),M(google.maps.event.addListener(x,"dragend",a)))},[a]),c.useEffect(function(){x&&l&&(A!==null&&google.maps.event.removeListener(A),B(google.maps.event.addListener(x,"dragstart",l)))},[l]),c.useEffect(function(){x&&u&&(N!==null&&google.maps.event.removeListener(N),z(google.maps.event.addListener(x,"mousedown",u)))},[u]),c.useEffect(function(){x&&f&&(G!==null&&google.maps.event.removeListener(G),H(google.maps.event.addListener(x,"mousemove",f)))},[f]),c.useEffect(function(){x&&d&&(oe!==null&&google.maps.event.removeListener(oe),te(google.maps.event.addListener(x,"mouseout",d)))},[d]),c.useEffect(function(){x&&h&&(D!==null&&google.maps.event.removeListener(D),pe(google.maps.event.addListener(x,"mouseover",h)))},[h]),c.useEffect(function(){x&&v&&(Z!==null&&google.maps.event.removeListener(Z),De(google.maps.event.addListener(x,"mouseup",v)))},[v]),c.useEffect(function(){x&&y&&(ue!==null&&google.maps.event.removeListener(ue),_e(google.maps.event.addListener(x,"rightclick",y)))},[y]),c.useEffect(function(){x&&g&&(Ce!==null&&google.maps.event.removeListener(Ce),Me(google.maps.event.addListener(x,"click",g)))},[g]),c.useEffect(function(){x&&w&&(ke!==null&&google.maps.event.removeListener(ke),je(google.maps.event.addListener(x,"drag",w)))},[w]),c.useEffect(function(){var ie=new google.maps.Polyline(K(K({},e||bC),{map:m}));return o&&ie.setPath(o),typeof i<"u"&&ie.setVisible(i),typeof r<"u"&&ie.setEditable(r),typeof n<"u"&&ie.setDraggable(n),s&&P(google.maps.event.addListener(ie,"dblclick",s)),a&&M(google.maps.event.addListener(ie,"dragend",a)),l&&B(google.maps.event.addListener(ie,"dragstart",l)),u&&z(google.maps.event.addListener(ie,"mousedown",u)),f&&H(google.maps.event.addListener(ie,"mousemove",f)),d&&te(google.maps.event.addListener(ie,"mouseout",d)),h&&pe(google.maps.event.addListener(ie,"mouseover",h)),v&&De(google.maps.event.addListener(ie,"mouseup",v)),y&&_e(google.maps.event.addListener(ie,"rightclick",y)),g&&Me(google.maps.event.addListener(ie,"click",g)),w&&je(google.maps.event.addListener(ie,"drag",w)),p(ie),C&&C(ie),function(){E!==null&&google.maps.event.removeListener(E),T!==null&&google.maps.event.removeListener(T),A!==null&&google.maps.event.removeListener(A),N!==null&&google.maps.event.removeListener(N),G!==null&&google.maps.event.removeListener(G),oe!==null&&google.maps.event.removeListener(oe),D!==null&&google.maps.event.removeListener(D),Z!==null&&google.maps.event.removeListener(Z),ue!==null&&google.maps.event.removeListener(ue),Ce!==null&&google.maps.event.removeListener(Ce),L&&L(ie),ie.setMap(null)}},[]),null}c.memo(CC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polyline:null},n.setPolylineCallback=function(){n.state.polyline!==null&&n.props.onLoad&&n.props.onLoad(n.state.polyline)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polyline(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Gc,eventMap:Wc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polyline:n}},this.setPolylineCallback)},e.prototype.componentDidUpdate=function(n){this.state.polyline!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Gc,eventMap:Wc,prevProps:n,nextProps:this.props,instance:this.state.polyline}))},e.prototype.componentWillUnmount=function(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),he(this.registeredEvents),this.state.polyline.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var Zc={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},qc={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},paths:function(t,e){t.setPaths(e)},visible:function(t,e){t.setVisible(e)}};function wC(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.paths,a=t.onDblClick,l=t.onDragEnd,u=t.onDragStart,f=t.onMouseDown,d=t.onMouseMove,h=t.onMouseOut,v=t.onMouseOver,y=t.onMouseUp,g=t.onRightClick,w=t.onClick,C=t.onDrag,L=t.onLoad,m=t.onUnmount,_=t.onEdit,x=c.useContext(le),p=c.useState(null),b=p[0],E=p[1],P=c.useState(null),O=P[0],T=P[1],M=c.useState(null),R=M[0],A=M[1],B=c.useState(null),V=B[0],N=B[1],z=c.useState(null),Y=z[0],G=z[1],H=c.useState(null),Q=H[0],oe=H[1],te=c.useState(null),ee=te[0],D=te[1],pe=c.useState(null),Pe=pe[0],Z=pe[1],De=c.useState(null),Ae=De[0],ue=De[1],_e=c.useState(null),Ve=_e[0],Ce=_e[1],Me=c.useState(null),Ie=Me[0],ke=Me[1],je=c.useState(null),ie=je[0],We=je[1];return c.useEffect(function(){b!==null&&b.setMap(x)},[x]),c.useEffect(function(){typeof e<"u"&&b!==null&&b.setOptions(e)},[b,e]),c.useEffect(function(){typeof n<"u"&&b!==null&&b.setDraggable(n)},[b,n]),c.useEffect(function(){typeof r<"u"&&b!==null&&b.setEditable(r)},[b,r]),c.useEffect(function(){typeof i<"u"&&b!==null&&b.setVisible(i)},[b,i]),c.useEffect(function(){typeof o<"u"&&b!==null&&b.setPath(o)},[b,o]),c.useEffect(function(){typeof s<"u"&&b!==null&&b.setPaths(s)},[b,s]),c.useEffect(function(){b&&a&&(O!==null&&google.maps.event.removeListener(O),T(google.maps.event.addListener(b,"dblclick",a)))},[a]),c.useEffect(function(){b&&(google.maps.event.addListener(b.getPath(),"insert_at",function(){_==null||_(b)}),google.maps.event.addListener(b.getPath(),"set_at",function(){_==null||_(b)}))},[b,_]),c.useEffect(function(){b&&l&&(R!==null&&google.maps.event.removeListener(R),A(google.maps.event.addListener(b,"dragend",l)))},[l]),c.useEffect(function(){b&&u&&(V!==null&&google.maps.event.removeListener(V),N(google.maps.event.addListener(b,"dragstart",u)))},[u]),c.useEffect(function(){b&&f&&(Y!==null&&google.maps.event.removeListener(Y),G(google.maps.event.addListener(b,"mousedown",f)))},[f]),c.useEffect(function(){b&&d&&(Q!==null&&google.maps.event.removeListener(Q),oe(google.maps.event.addListener(b,"mousemove",d)))},[d]),c.useEffect(function(){b&&h&&(ee!==null&&google.maps.event.removeListener(ee),D(google.maps.event.addListener(b,"mouseout",h)))},[h]),c.useEffect(function(){b&&v&&(Pe!==null&&google.maps.event.removeListener(Pe),Z(google.maps.event.addListener(b,"mouseover",v)))},[v]),c.useEffect(function(){b&&y&&(Ae!==null&&google.maps.event.removeListener(Ae),ue(google.maps.event.addListener(b,"mouseup",y)))},[y]),c.useEffect(function(){b&&g&&(Ve!==null&&google.maps.event.removeListener(Ve),Ce(google.maps.event.addListener(b,"rightclick",g)))},[g]),c.useEffect(function(){b&&w&&(Ie!==null&&google.maps.event.removeListener(Ie),ke(google.maps.event.addListener(b,"click",w)))},[w]),c.useEffect(function(){b&&C&&(ie!==null&&google.maps.event.removeListener(ie),We(google.maps.event.addListener(b,"drag",C)))},[C]),c.useEffect(function(){var re=new google.maps.Polygon(K(K({},e||{}),{map:x}));return o&&re.setPath(o),s&&re.setPaths(s),typeof i<"u"&&re.setVisible(i),typeof r<"u"&&re.setEditable(r),typeof n<"u"&&re.setDraggable(n),a&&T(google.maps.event.addListener(re,"dblclick",a)),l&&A(google.maps.event.addListener(re,"dragend",l)),u&&N(google.maps.event.addListener(re,"dragstart",u)),f&&G(google.maps.event.addListener(re,"mousedown",f)),d&&oe(google.maps.event.addListener(re,"mousemove",d)),h&&D(google.maps.event.addListener(re,"mouseout",h)),v&&Z(google.maps.event.addListener(re,"mouseover",v)),y&&ue(google.maps.event.addListener(re,"mouseup",y)),g&&Ce(google.maps.event.addListener(re,"rightclick",g)),w&&ke(google.maps.event.addListener(re,"click",w)),C&&We(google.maps.event.addListener(re,"drag",C)),E(re),L&&L(re),function(){O!==null&&google.maps.event.removeListener(O),R!==null&&google.maps.event.removeListener(R),V!==null&&google.maps.event.removeListener(V),Y!==null&&google.maps.event.removeListener(Y),Q!==null&&google.maps.event.removeListener(Q),ee!==null&&google.maps.event.removeListener(ee),Pe!==null&&google.maps.event.removeListener(Pe),Ae!==null&&google.maps.event.removeListener(Ae),Ve!==null&&google.maps.event.removeListener(Ve),Ie!==null&&google.maps.event.removeListener(Ie),m&&m(re),re.setMap(null)}},[]),null}c.memo(wC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polygon:null},n.setPolygonCallback=function(){n.state.polygon!==null&&n.props.onLoad&&n.props.onLoad(n.state.polygon)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polygon(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:qc,eventMap:Zc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polygon:n}},this.setPolygonCallback)},e.prototype.componentDidUpdate=function(n){this.state.polygon!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:qc,eventMap:Zc,prevProps:n,nextProps:this.props,instance:this.state.polygon}))},e.prototype.componentWillUnmount=function(){this.state.polygon!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),he(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var Kc={onBoundsChanged:"bounds_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Qc={bounds:function(t,e){t.setBounds(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},visible:function(t,e){t.setVisible(e)}};function SC(t){var e=t.options,n=t.bounds,r=t.draggable,i=t.editable,o=t.visible,s=t.onDblClick,a=t.onDragEnd,l=t.onDragStart,u=t.onMouseDown,f=t.onMouseMove,d=t.onMouseOut,h=t.onMouseOver,v=t.onMouseUp,y=t.onRightClick,g=t.onClick,w=t.onDrag,C=t.onBoundsChanged,L=t.onLoad,m=t.onUnmount,_=c.useContext(le),x=c.useState(null),p=x[0],b=x[1],E=c.useState(null),P=E[0],O=E[1],T=c.useState(null),M=T[0],R=T[1],A=c.useState(null),B=A[0],V=A[1],N=c.useState(null),z=N[0],Y=N[1],G=c.useState(null),H=G[0],Q=G[1],oe=c.useState(null),te=oe[0],ee=oe[1],D=c.useState(null),pe=D[0],Pe=D[1],Z=c.useState(null),De=Z[0],Ae=Z[1],ue=c.useState(null),_e=ue[0],Ve=ue[1],Ce=c.useState(null),Me=Ce[0],Ie=Ce[1],ke=c.useState(null),je=ke[0],ie=ke[1],We=c.useState(null),re=We[0],tt=We[1];return c.useEffect(function(){p!==null&&p.setMap(_)},[_]),c.useEffect(function(){typeof e<"u"&&p!==null&&p.setOptions(e)},[p,e]),c.useEffect(function(){typeof r<"u"&&p!==null&&p.setDraggable(r)},[p,r]),c.useEffect(function(){typeof i<"u"&&p!==null&&p.setEditable(i)},[p,i]),c.useEffect(function(){typeof o<"u"&&p!==null&&p.setVisible(o)},[p,o]),c.useEffect(function(){typeof n<"u"&&p!==null&&p.setBounds(n)},[p,n]),c.useEffect(function(){p&&s&&(P!==null&&google.maps.event.removeListener(P),O(google.maps.event.addListener(p,"dblclick",s)))},[s]),c.useEffect(function(){p&&a&&(M!==null&&google.maps.event.removeListener(M),R(google.maps.event.addListener(p,"dragend",a)))},[a]),c.useEffect(function(){p&&l&&(B!==null&&google.maps.event.removeListener(B),V(google.maps.event.addListener(p,"dragstart",l)))},[l]),c.useEffect(function(){p&&u&&(z!==null&&google.maps.event.removeListener(z),Y(google.maps.event.addListener(p,"mousedown",u)))},[u]),c.useEffect(function(){p&&f&&(H!==null&&google.maps.event.removeListener(H),Q(google.maps.event.addListener(p,"mousemove",f)))},[f]),c.useEffect(function(){p&&d&&(te!==null&&google.maps.event.removeListener(te),ee(google.maps.event.addListener(p,"mouseout",d)))},[d]),c.useEffect(function(){p&&h&&(pe!==null&&google.maps.event.removeListener(pe),Pe(google.maps.event.addListener(p,"mouseover",h)))},[h]),c.useEffect(function(){p&&v&&(De!==null&&google.maps.event.removeListener(De),Ae(google.maps.event.addListener(p,"mouseup",v)))},[v]),c.useEffect(function(){p&&y&&(_e!==null&&google.maps.event.removeListener(_e),Ve(google.maps.event.addListener(p,"rightclick",y)))},[y]),c.useEffect(function(){p&&g&&(Me!==null&&google.maps.event.removeListener(Me),Ie(google.maps.event.addListener(p,"click",g)))},[g]),c.useEffect(function(){p&&w&&(je!==null&&google.maps.event.removeListener(je),ie(google.maps.event.addListener(p,"drag",w)))},[w]),c.useEffect(function(){p&&C&&(re!==null&&google.maps.event.removeListener(re),tt(google.maps.event.addListener(p,"bounds_changed",C)))},[C]),c.useEffect(function(){var q=new google.maps.Rectangle(K(K({},e||{}),{map:_}));return typeof o<"u"&&q.setVisible(o),typeof i<"u"&&q.setEditable(i),typeof r<"u"&&q.setDraggable(r),typeof n<"u"&&q.setBounds(n),s&&O(google.maps.event.addListener(q,"dblclick",s)),a&&R(google.maps.event.addListener(q,"dragend",a)),l&&V(google.maps.event.addListener(q,"dragstart",l)),u&&Y(google.maps.event.addListener(q,"mousedown",u)),f&&Q(google.maps.event.addListener(q,"mousemove",f)),d&&ee(google.maps.event.addListener(q,"mouseout",d)),h&&Pe(google.maps.event.addListener(q,"mouseover",h)),v&&Ae(google.maps.event.addListener(q,"mouseup",v)),y&&Ve(google.maps.event.addListener(q,"rightclick",y)),g&&Ie(google.maps.event.addListener(q,"click",g)),w&&ie(google.maps.event.addListener(q,"drag",w)),C&&tt(google.maps.event.addListener(q,"bounds_changed",C)),b(q),L&&L(q),function(){P!==null&&google.maps.event.removeListener(P),M!==null&&google.maps.event.removeListener(M),B!==null&&google.maps.event.removeListener(B),z!==null&&google.maps.event.removeListener(z),H!==null&&google.maps.event.removeListener(H),te!==null&&google.maps.event.removeListener(te),pe!==null&&google.maps.event.removeListener(pe),De!==null&&google.maps.event.removeListener(De),_e!==null&&google.maps.event.removeListener(_e),Me!==null&&google.maps.event.removeListener(Me),je!==null&&google.maps.event.removeListener(je),re!==null&&google.maps.event.removeListener(re),m&&m(q),q.setMap(null)}},[]),null}c.memo(SC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={rectangle:null},n.setRectangleCallback=function(){n.state.rectangle!==null&&n.props.onLoad&&n.props.onLoad(n.state.rectangle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Rectangle(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Qc,eventMap:Kc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{rectangle:n}},this.setRectangleCallback)},e.prototype.componentDidUpdate=function(n){this.state.rectangle!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Qc,eventMap:Kc,prevProps:n,nextProps:this.props,instance:this.state.rectangle}))},e.prototype.componentWillUnmount=function(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),he(this.registeredEvents),this.state.rectangle.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var Jc={onCenterChanged:"center_changed",onRadiusChanged:"radius_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Yc={center:function(t,e){t.setCenter(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},radius:function(t,e){t.setRadius(e)},visible:function(t,e){t.setVisible(e)}},LC={};function EC(t){var e=t.options,n=t.center,r=t.radius,i=t.draggable,o=t.editable,s=t.visible,a=t.onDblClick,l=t.onDragEnd,u=t.onDragStart,f=t.onMouseDown,d=t.onMouseMove,h=t.onMouseOut,v=t.onMouseOver,y=t.onMouseUp,g=t.onRightClick,w=t.onClick,C=t.onDrag,L=t.onCenterChanged,m=t.onRadiusChanged,_=t.onLoad,x=t.onUnmount,p=c.useContext(le),b=c.useState(null),E=b[0],P=b[1],O=c.useState(null),T=O[0],M=O[1],R=c.useState(null),A=R[0],B=R[1],V=c.useState(null),N=V[0],z=V[1],Y=c.useState(null),G=Y[0],H=Y[1],Q=c.useState(null),oe=Q[0],te=Q[1],ee=c.useState(null),D=ee[0],pe=ee[1],Pe=c.useState(null),Z=Pe[0],De=Pe[1],Ae=c.useState(null),ue=Ae[0],_e=Ae[1],Ve=c.useState(null),Ce=Ve[0],Me=Ve[1],Ie=c.useState(null),ke=Ie[0],je=Ie[1],ie=c.useState(null),We=ie[0],re=ie[1],tt=c.useState(null),q=tt[0],Ge=tt[1],ze=c.useState(null),bt=ze[0],ut=ze[1];return c.useEffect(function(){E!==null&&E.setMap(p)},[p]),c.useEffect(function(){typeof e<"u"&&E!==null&&E.setOptions(e)},[E,e]),c.useEffect(function(){typeof i<"u"&&E!==null&&E.setDraggable(i)},[E,i]),c.useEffect(function(){typeof o<"u"&&E!==null&&E.setEditable(o)},[E,o]),c.useEffect(function(){typeof s<"u"&&E!==null&&E.setVisible(s)},[E,s]),c.useEffect(function(){typeof r=="number"&&E!==null&&E.setRadius(r)},[E,r]),c.useEffect(function(){typeof n<"u"&&E!==null&&E.setCenter(n)},[E,n]),c.useEffect(function(){E&&a&&(T!==null&&google.maps.event.removeListener(T),M(google.maps.event.addListener(E,"dblclick",a)))},[a]),c.useEffect(function(){E&&l&&(A!==null&&google.maps.event.removeListener(A),B(google.maps.event.addListener(E,"dragend",l)))},[l]),c.useEffect(function(){E&&u&&(N!==null&&google.maps.event.removeListener(N),z(google.maps.event.addListener(E,"dragstart",u)))},[u]),c.useEffect(function(){E&&f&&(G!==null&&google.maps.event.removeListener(G),H(google.maps.event.addListener(E,"mousedown",f)))},[f]),c.useEffect(function(){E&&d&&(oe!==null&&google.maps.event.removeListener(oe),te(google.maps.event.addListener(E,"mousemove",d)))},[d]),c.useEffect(function(){E&&h&&(D!==null&&google.maps.event.removeListener(D),pe(google.maps.event.addListener(E,"mouseout",h)))},[h]),c.useEffect(function(){E&&v&&(Z!==null&&google.maps.event.removeListener(Z),De(google.maps.event.addListener(E,"mouseover",v)))},[v]),c.useEffect(function(){E&&y&&(ue!==null&&google.maps.event.removeListener(ue),_e(google.maps.event.addListener(E,"mouseup",y)))},[y]),c.useEffect(function(){E&&g&&(Ce!==null&&google.maps.event.removeListener(Ce),Me(google.maps.event.addListener(E,"rightclick",g)))},[g]),c.useEffect(function(){E&&w&&(ke!==null&&google.maps.event.removeListener(ke),je(google.maps.event.addListener(E,"click",w)))},[w]),c.useEffect(function(){E&&C&&(We!==null&&google.maps.event.removeListener(We),re(google.maps.event.addListener(E,"drag",C)))},[C]),c.useEffect(function(){E&&L&&(q!==null&&google.maps.event.removeListener(q),Ge(google.maps.event.addListener(E,"center_changed",L)))},[w]),c.useEffect(function(){E&&m&&(bt!==null&&google.maps.event.removeListener(bt),ut(google.maps.event.addListener(E,"radius_changed",m)))},[m]),c.useEffect(function(){var se=new google.maps.Circle(K(K({},e||LC),{map:p}));return typeof r=="number"&&se.setRadius(r),typeof n<"u"&&se.setCenter(n),typeof r=="number"&&se.setRadius(r),typeof s<"u"&&se.setVisible(s),typeof o<"u"&&se.setEditable(o),typeof i<"u"&&se.setDraggable(i),a&&M(google.maps.event.addListener(se,"dblclick",a)),l&&B(google.maps.event.addListener(se,"dragend",l)),u&&z(google.maps.event.addListener(se,"dragstart",u)),f&&H(google.maps.event.addListener(se,"mousedown",f)),d&&te(google.maps.event.addListener(se,"mousemove",d)),h&&pe(google.maps.event.addListener(se,"mouseout",h)),v&&De(google.maps.event.addListener(se,"mouseover",v)),y&&_e(google.maps.event.addListener(se,"mouseup",y)),g&&Me(google.maps.event.addListener(se,"rightclick",g)),w&&je(google.maps.event.addListener(se,"click",w)),C&&re(google.maps.event.addListener(se,"drag",C)),L&&Ge(google.maps.event.addListener(se,"center_changed",L)),m&&ut(google.maps.event.addListener(se,"radius_changed",m)),P(se),_&&_(se),function(){T!==null&&google.maps.event.removeListener(T),A!==null&&google.maps.event.removeListener(A),N!==null&&google.maps.event.removeListener(N),G!==null&&google.maps.event.removeListener(G),oe!==null&&google.maps.event.removeListener(oe),D!==null&&google.maps.event.removeListener(D),Z!==null&&google.maps.event.removeListener(Z),ue!==null&&google.maps.event.removeListener(ue),Ce!==null&&google.maps.event.removeListener(Ce),ke!==null&&google.maps.event.removeListener(ke),q!==null&&google.maps.event.removeListener(q),bt!==null&&google.maps.event.removeListener(bt),x&&x(se),se.setMap(null)}},[]),null}c.memo(EC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={circle:null},n.setCircleCallback=function(){n.state.circle!==null&&n.props.onLoad&&n.props.onLoad(n.state.circle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Circle(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Yc,eventMap:Jc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{circle:n}},this.setCircleCallback)},e.prototype.componentDidUpdate=function(n){this.state.circle!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Yc,eventMap:Jc,prevProps:n,nextProps:this.props,instance:this.state.circle}))},e.prototype.componentWillUnmount=function(){var n;this.state.circle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),he(this.registeredEvents),(n=this.state.circle)===null||n===void 0||n.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var Xc={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},ef={add:function(t,e){t.add(e)},addgeojson:function(t,e,n){t.addGeoJson(e,n)},contains:function(t,e){t.contains(e)},foreach:function(t,e){t.forEach(e)},loadgeojson:function(t,e,n,r){t.loadGeoJson(e,n,r)},overridestyle:function(t,e,n){t.overrideStyle(e,n)},remove:function(t,e){t.remove(e)},revertstyle:function(t,e){t.revertStyle(e)},controlposition:function(t,e){t.setControlPosition(e)},controls:function(t,e){t.setControls(e)},drawingmode:function(t,e){t.setDrawingMode(e)},map:function(t,e){t.setMap(e)},style:function(t,e){t.setStyle(e)},togeojson:function(t,e){t.toGeoJson(e)}};function xC(t){var e=t.options,n=t.onClick,r=t.onDblClick,i=t.onMouseDown,o=t.onMouseMove,s=t.onMouseOut,a=t.onMouseOver,l=t.onMouseUp,u=t.onRightClick,f=t.onAddFeature,d=t.onRemoveFeature,h=t.onRemoveProperty,v=t.onSetGeometry,y=t.onSetProperty,g=t.onLoad,w=t.onUnmount,C=c.useContext(le),L=c.useState(null),m=L[0],_=L[1],x=c.useState(null),p=x[0],b=x[1],E=c.useState(null),P=E[0],O=E[1],T=c.useState(null),M=T[0],R=T[1],A=c.useState(null),B=A[0],V=A[1],N=c.useState(null),z=N[0],Y=N[1],G=c.useState(null),H=G[0],Q=G[1],oe=c.useState(null),te=oe[0],ee=oe[1],D=c.useState(null),pe=D[0],Pe=D[1],Z=c.useState(null),De=Z[0],Ae=Z[1],ue=c.useState(null),_e=ue[0],Ve=ue[1],Ce=c.useState(null),Me=Ce[0],Ie=Ce[1],ke=c.useState(null),je=ke[0],ie=ke[1],We=c.useState(null),re=We[0],tt=We[1];return c.useEffect(function(){m!==null&&m.setMap(C)},[C]),c.useEffect(function(){m&&r&&(p!==null&&google.maps.event.removeListener(p),b(google.maps.event.addListener(m,"dblclick",r)))},[r]),c.useEffect(function(){m&&i&&(P!==null&&google.maps.event.removeListener(P),O(google.maps.event.addListener(m,"mousedown",i)))},[i]),c.useEffect(function(){m&&o&&(M!==null&&google.maps.event.removeListener(M),R(google.maps.event.addListener(m,"mousemove",o)))},[o]),c.useEffect(function(){m&&s&&(B!==null&&google.maps.event.removeListener(B),V(google.maps.event.addListener(m,"mouseout",s)))},[s]),c.useEffect(function(){m&&a&&(z!==null&&google.maps.event.removeListener(z),Y(google.maps.event.addListener(m,"mouseover",a)))},[a]),c.useEffect(function(){m&&l&&(H!==null&&google.maps.event.removeListener(H),Q(google.maps.event.addListener(m,"mouseup",l)))},[l]),c.useEffect(function(){m&&u&&(te!==null&&google.maps.event.removeListener(te),ee(google.maps.event.addListener(m,"rightclick",u)))},[u]),c.useEffect(function(){m&&n&&(pe!==null&&google.maps.event.removeListener(pe),Pe(google.maps.event.addListener(m,"click",n)))},[n]),c.useEffect(function(){m&&f&&(De!==null&&google.maps.event.removeListener(De),Ae(google.maps.event.addListener(m,"addfeature",f)))},[f]),c.useEffect(function(){m&&d&&(_e!==null&&google.maps.event.removeListener(_e),Ve(google.maps.event.addListener(m,"removefeature",d)))},[d]),c.useEffect(function(){m&&h&&(Me!==null&&google.maps.event.removeListener(Me),Ie(google.maps.event.addListener(m,"removeproperty",h)))},[h]),c.useEffect(function(){m&&v&&(je!==null&&google.maps.event.removeListener(je),ie(google.maps.event.addListener(m,"setgeometry",v)))},[v]),c.useEffect(function(){m&&y&&(re!==null&&google.maps.event.removeListener(re),tt(google.maps.event.addListener(m,"setproperty",y)))},[y]),c.useEffect(function(){if(C!==null){var q=new google.maps.Data(K(K({},e||{}),{map:C}));r&&b(google.maps.event.addListener(q,"dblclick",r)),i&&O(google.maps.event.addListener(q,"mousedown",i)),o&&R(google.maps.event.addListener(q,"mousemove",o)),s&&V(google.maps.event.addListener(q,"mouseout",s)),a&&Y(google.maps.event.addListener(q,"mouseover",a)),l&&Q(google.maps.event.addListener(q,"mouseup",l)),u&&ee(google.maps.event.addListener(q,"rightclick",u)),n&&Pe(google.maps.event.addListener(q,"click",n)),f&&Ae(google.maps.event.addListener(q,"addfeature",f)),d&&Ve(google.maps.event.addListener(q,"removefeature",d)),h&&Ie(google.maps.event.addListener(q,"removeproperty",h)),v&&ie(google.maps.event.addListener(q,"setgeometry",v)),y&&tt(google.maps.event.addListener(q,"setproperty",y)),_(q),g&&g(q)}return function(){m&&(p!==null&&google.maps.event.removeListener(p),P!==null&&google.maps.event.removeListener(P),M!==null&&google.maps.event.removeListener(M),B!==null&&google.maps.event.removeListener(B),z!==null&&google.maps.event.removeListener(z),H!==null&&google.maps.event.removeListener(H),te!==null&&google.maps.event.removeListener(te),pe!==null&&google.maps.event.removeListener(pe),De!==null&&google.maps.event.removeListener(De),_e!==null&&google.maps.event.removeListener(_e),Me!==null&&google.maps.event.removeListener(Me),je!==null&&google.maps.event.removeListener(je),re!==null&&google.maps.event.removeListener(re),w&&w(m),m.setMap(null))}},[]),null}c.memo(xC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={data:null},n.setDataCallback=function(){n.state.data!==null&&n.props.onLoad&&n.props.onLoad(n.state.data)},n}return e.prototype.componentDidMount=function(){if(this.context!==null){var n=new google.maps.Data(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:ef,eventMap:Xc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{data:n}},this.setDataCallback)}},e.prototype.componentDidUpdate=function(n){this.state.data!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:ef,eventMap:Xc,prevProps:n,nextProps:this.props,instance:this.state.data}))},e.prototype.componentWillUnmount=function(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),he(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var tf={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},nf={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={kmlLayer:null},n.setKmlLayerCallback=function(){n.state.kmlLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.kmlLayer)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.KmlLayer(K(K({},this.props.options),{map:this.context}));this.registeredEvents=ce({updaterMap:nf,eventMap:tf,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{kmlLayer:n}},this.setKmlLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.kmlLayer!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:nf,eventMap:tf,prevProps:n,nextProps:this.props,instance:this.state.kmlLayer}))},e.prototype.componentWillUnmount=function(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),he(this.registeredEvents),this.state.kmlLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);function vp(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function _C(t,e){return new e(t.lat,t.lng)}function MC(t,e){return new e(new google.maps.LatLng(t.ne.lat,t.ne.lng),new google.maps.LatLng(t.sw.lat,t.sw.lng))}function OC(t,e,n){return t instanceof e?t:n(t,e)}function PC(t,e,n){return t instanceof e?t:n(t,e)}function kC(t,e,n){var r=t&&t.fromLatLngToDivPixel(n.getNorthEast()),i=t&&t.fromLatLngToDivPixel(n.getSouthWest());return r&&i?{left:"".concat(i.x+e.x,"px"),top:"".concat(r.y+e.y,"px"),width:"".concat(r.x-i.x-e.x,"px"),height:"".concat(i.y-r.y-e.y,"px")}:{left:"-9999px",top:"-9999px"}}function TC(t,e,n){var r=t&&t.fromLatLngToDivPixel(n);if(r){var i=r.x,o=r.y;return{left:"".concat(i+e.x,"px"),top:"".concat(o+e.y,"px")}}return{left:"-9999px",top:"-9999px"}}function mp(t,e,n,r){return n!==void 0?kC(t,e,PC(n,google.maps.LatLngBounds,MC)):TC(t,e,OC(r,google.maps.LatLng,_C))}function RC(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function DC(t,e,n,r,i){var o=function(s){Ue(a,s);function a(l,u,f,d){var h=s.call(this)||this;return h.container=l,h.pane=u,h.position=f,h.bounds=d,h}return a.prototype.onAdd=function(){var l,u=(l=this.getPanes())===null||l===void 0?void 0:l[this.pane];u==null||u.appendChild(this.container)},a.prototype.draw=function(){for(var l=this.getProjection(),u=K({},this.container?vp(this.container,i):{x:0,y:0}),f=mp(l,u,this.bounds,this.position),d=0,h=Object.entries(f);d<h.length;d++){var v=h[d],y=v[0],g=v[1];this.container.style[y]=g}},a.prototype.onRemove=function(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)},a}(google.maps.OverlayView);return new o(t,e,n,r)}function rf(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function of(t){if(!t)return"";var e=t instanceof google.maps.LatLngBounds?t:new google.maps.LatLngBounds(new google.maps.LatLng(t.south,t.east),new google.maps.LatLng(t.north,t.west));return e+""}function AC(t){var e=t.position,n=t.bounds,r=t.mapPaneName,i=t.zIndex,o=t.onLoad,s=t.onUnmount,a=t.getPixelPositionOffset,l=t.children,u=c.useContext(le),f=c.useMemo(function(){var h=document.createElement("div");return h.style.position="absolute",h},[]),d=c.useMemo(function(){return DC(f,r,e,n,a)},[f,r,e,n]);return c.useEffect(function(){return o==null||o(d),d==null||d.setMap(u),function(){s==null||s(d),d==null||d.setMap(null)}},[u,d]),c.useEffect(function(){f.style.zIndex="".concat(i)},[i,f]),Af.createPortal(l,f)}c.memo(AC);(function(t){Ue(e,t);function e(n){var r=t.call(this,n)||this;r.state={paneEl:null,containerStyle:{position:"absolute"}},r.updatePane=function(){var o=r.props.mapPaneName,s=r.overlayView.getPanes();Ye(!!o,"OverlayView requires props.mapPaneName but got %s",o),s?r.setState({paneEl:s[o]}):r.setState({paneEl:null})},r.onAdd=function(){var o,s;r.updatePane(),(s=(o=r.props).onLoad)===null||s===void 0||s.call(o,r.overlayView)},r.onPositionElement=function(){var o=r.overlayView.getProjection(),s=K({x:0,y:0},r.containerRef.current?vp(r.containerRef.current,r.props.getPixelPositionOffset):{}),a=mp(o,s,r.props.bounds,r.props.position),l=r.state.containerStyle,u=l.left,f=l.top,d=l.width,h=l.height;RC(a,{left:u,top:f,width:d,height:h})||r.setState({containerStyle:{top:a.top||0,left:a.left||0,width:a.width||0,height:a.height||0,position:"absolute"}})},r.draw=function(){r.onPositionElement()},r.onRemove=function(){var o,s;r.setState(function(){return{paneEl:null}}),(s=(o=r.props).onUnmount)===null||s===void 0||s.call(o,r.overlayView)},r.containerRef=c.createRef();var i=new google.maps.OverlayView;return i.onAdd=r.onAdd,i.draw=r.draw,i.onRemove=r.onRemove,r.overlayView=i,r}return e.prototype.componentDidMount=function(){this.overlayView.setMap(this.context)},e.prototype.componentDidUpdate=function(n){var r=rf(n.position),i=rf(this.props.position),o=of(n.bounds),s=of(this.props.bounds);(r!==i||o!==s)&&this.overlayView.draw(),n.mapPaneName!==this.props.mapPaneName&&this.updatePane()},e.prototype.componentWillUnmount=function(){this.overlayView.setMap(null)},e.prototype.render=function(){var n=this.state.paneEl;return n?Af.createPortal(S.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:c.Children.only(this.props.children)}),n):null},e.FLOAT_PANE="floatPane",e.MAP_PANE="mapPane",e.MARKER_LAYER="markerLayer",e.OVERLAY_LAYER="overlayLayer",e.OVERLAY_MOUSE_TARGET="overlayMouseTarget",e.contextType=le,e})(c.PureComponent);function IC(){}var sf={onDblClick:"dblclick",onClick:"click"},af={opacity:function(t,e){t.setOpacity(e)}};function jC(t){var e=t.url,n=t.bounds,r=t.options,i=t.visible,o=c.useContext(le),s=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east)),a=c.useMemo(function(){var l=new google.maps.GroundOverlay(e,s,K({},r));return l},[]);return c.useEffect(function(){a!==null&&a.setMap(o)},[o]),c.useEffect(function(){typeof e<"u"&&a!==null&&(a.set("url",e),a.setMap(o))},[a,e]),c.useEffect(function(){typeof i<"u"&&a!==null&&a.setOpacity(i?1:0)},[a,i]),c.useEffect(function(){var l=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east));typeof n<"u"&&a!==null&&(a.set("bounds",l),a.setMap(o))},[a,n]),null}c.memo(jC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={groundOverlay:null},n.setGroundOverlayCallback=function(){n.state.groundOverlay!==null&&n.props.onLoad&&n.props.onLoad(n.state.groundOverlay)},n}return e.prototype.componentDidMount=function(){Ye(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");var n=new google.maps.GroundOverlay(this.props.url,this.props.bounds,K(K({},this.props.options),{map:this.context}));this.registeredEvents=ce({updaterMap:af,eventMap:sf,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{groundOverlay:n}},this.setGroundOverlayCallback)},e.prototype.componentDidUpdate=function(n){this.state.groundOverlay!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:af,eventMap:sf,prevProps:n,nextProps:this.props,instance:this.state.groundOverlay}))},e.prototype.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},e.prototype.render=function(){return null},e.defaultProps={onLoad:IC},e.contextType=le,e})(c.PureComponent);var lf={},uf={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function NC(t){var e=t.data,n=t.onLoad,r=t.onUnmount,i=t.options,o=c.useContext(le),s=c.useState(null),a=s[0],l=s[1];return c.useEffect(function(){google.maps.visualization||Ye(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),c.useEffect(function(){Ye(!!e,"data property is required in HeatmapLayer %s",e)},[e]),c.useEffect(function(){a!==null&&a.setMap(o)},[o]),c.useEffect(function(){i&&a!==null&&a.setOptions(i)},[a,i]),c.useEffect(function(){var u=new google.maps.visualization.HeatmapLayer(K(K({},i||{}),{data:e,map:o}));return l(u),n&&n(u),function(){a!==null&&(r&&r(a),a.setMap(null))}},[]),null}c.memo(NC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={heatmapLayer:null},n.setHeatmapLayerCallback=function(){n.state.heatmapLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.heatmapLayer)},n}return e.prototype.componentDidMount=function(){Ye(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),Ye(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(K(K({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=ce({updaterMap:uf,eventMap:lf,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},e.prototype.componentDidUpdate=function(n){he(this.registeredEvents),this.registeredEvents=ce({updaterMap:uf,eventMap:lf,prevProps:n,nextProps:this.props,instance:this.state.heatmapLayer})},e.prototype.componentWillUnmount=function(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),he(this.registeredEvents),this.state.heatmapLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var cf={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},ff={register:function(t,e,n){t.registerPanoProvider(e,n)},links:function(t,e){t.setLinks(e)},motionTracking:function(t,e){t.setMotionTracking(e)},options:function(t,e){t.setOptions(e)},pano:function(t,e){t.setPano(e)},position:function(t,e){t.setPosition(e)},pov:function(t,e){t.setPov(e)},visible:function(t,e){t.setVisible(e)},zoom:function(t,e){t.setZoom(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={streetViewPanorama:null},n.setStreetViewPanoramaCallback=function(){n.state.streetViewPanorama!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewPanorama)},n}return e.prototype.componentDidMount=function(){var n,r,i=(r=(n=this.context)===null||n===void 0?void 0:n.getStreetView())!==null&&r!==void 0?r:null;this.registeredEvents=ce({updaterMap:ff,eventMap:cf,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{streetViewPanorama:i}},this.setStreetViewPanoramaCallback)},e.prototype.componentDidUpdate=function(n){this.state.streetViewPanorama!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:ff,eventMap:cf,prevProps:n,nextProps:this.props,instance:this.state.streetViewPanorama}))},e.prototype.componentWillUnmount=function(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),he(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={streetViewService:null},n.setStreetViewServiceCallback=function(){n.state.streetViewService!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewService)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:n}},this.setStreetViewServiceCallback)},e.prototype.componentWillUnmount=function(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={directionsService:null},n.setDirectionsServiceCallback=function(){n.state.directionsService!==null&&n.props.onLoad&&n.props.onLoad(n.state.directionsService)},n}return e.prototype.componentDidMount=function(){Ye(!!this.props.options,"DirectionsService expected options object as parameter, but got %s",this.props.options);var n=new google.maps.DirectionsService;this.setState(function(){return{directionsService:n}},this.setDirectionsServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.directionsService!==null&&this.state.directionsService.route(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.directionsService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},e.prototype.render=function(){return null},e})(c.PureComponent);var df={onDirectionsChanged:"directions_changed"},hf={directions:function(t,e){t.setDirections(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},panel:function(t,e){t.setPanel(e)},routeIndex:function(t,e){t.setRouteIndex(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={directionsRenderer:null},n.setDirectionsRendererCallback=function(){n.state.directionsRenderer!==null&&(n.state.directionsRenderer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.directionsRenderer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=ce({updaterMap:hf,eventMap:df,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{directionsRenderer:n}},this.setDirectionsRendererCallback)},e.prototype.componentDidUpdate=function(n){this.state.directionsRenderer!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:hf,eventMap:df,prevProps:n,nextProps:this.props,instance:this.state.directionsRenderer}))},e.prototype.componentWillUnmount=function(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),he(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},e.prototype.render=function(){return S.jsx(S.Fragment,{})},e.contextType=le,e})(c.PureComponent);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={distanceMatrixService:null},n.setDistanceMatrixServiceCallback=function(){n.state.distanceMatrixService!==null&&n.props.onLoad&&n.props.onLoad(n.state.distanceMatrixService)},n}return e.prototype.componentDidMount=function(){Ye(!!this.props.options,"DistanceMatrixService expected options object as parameter, but go %s",this.props.options);var n=new google.maps.DistanceMatrixService;this.setState(function(){return{distanceMatrixService:n}},this.setDistanceMatrixServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.distanceMatrixService!==null&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.distanceMatrixService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},e.prototype.render=function(){return null},e})(c.PureComponent);var pf={onPlacesChanged:"places_changed"},gf={bounds:function(t,e){t.setBounds(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=c.createRef(),n.state={searchBox:null},n.setSearchBoxCallback=function(){n.state.searchBox!==null&&n.props.onLoad&&n.props.onLoad(n.state.searchBox)},n}return e.prototype.componentDidMount=function(){if(Ye(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places),this.containerElement!==null&&this.containerElement.current!==null){var n=this.containerElement.current.querySelector("input");if(n!==null){var r=new google.maps.places.SearchBox(n,this.props.options);this.registeredEvents=ce({updaterMap:gf,eventMap:pf,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{searchBox:r}},this.setSearchBoxCallback)}}},e.prototype.componentDidUpdate=function(n){this.state.searchBox!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:gf,eventMap:pf,prevProps:n,nextProps:this.props,instance:this.state.searchBox}))},e.prototype.componentWillUnmount=function(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),he(this.registeredEvents))},e.prototype.render=function(){return S.jsx("div",{ref:this.containerElement,children:c.Children.only(this.props.children)})},e.contextType=le,e})(c.PureComponent);var vf={onPlaceChanged:"place_changed"},mf={bounds:function(t,e){t.setBounds(e)},restrictions:function(t,e){t.setComponentRestrictions(e)},fields:function(t,e){t.setFields(e)},options:function(t,e){t.setOptions(e)},types:function(t,e){t.setTypes(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=c.createRef(),n.state={autocomplete:null},n.setAutocompleteCallback=function(){n.state.autocomplete!==null&&n.props.onLoad&&n.props.onLoad(n.state.autocomplete)},n}return e.prototype.componentDidMount=function(){var n;Ye(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var r=(n=this.containerElement.current)===null||n===void 0?void 0:n.querySelector("input");if(r){var i=new google.maps.places.Autocomplete(r,this.props.options);this.registeredEvents=ce({updaterMap:mf,eventMap:vf,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{autocomplete:i}},this.setAutocompleteCallback)}},e.prototype.componentDidUpdate=function(n){he(this.registeredEvents),this.registeredEvents=ce({updaterMap:mf,eventMap:vf,prevProps:n,nextProps:this.props,instance:this.state.autocomplete})},e.prototype.componentWillUnmount=function(){this.state.autocomplete!==null&&he(this.registeredEvents)},e.prototype.render=function(){return S.jsx("div",{ref:this.containerElement,className:this.props.className,children:c.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=le,e})(c.PureComponent);const BC="LocationBalloon-module__root__GtUl6q",FC="LocationBalloon-module__submit__lNcF4k",UC="LocationBalloon-module__details__--VOKk",VC="LocationBalloon-module__icon__X7DOVA",zC="LocationBalloon-module__header__5VQJDW",HC="LocationBalloon-module__titleContainer__BAO73U",$C="LocationBalloon-module__title__bX9pf8",WC="LocationBalloon-module__description__htav7b",GC="LocationBalloon-module__actions__c8dlOR",ZC="LocationBalloon-module__close__7Ujvya",Jt={root:BC,submit:FC,details:UC,icon:VC,header:zC,titleContainer:HC,title:$C,description:WC,actions:GC,close:ZC},qC={default:Od,llama:Pd},KC=({SSR:t,className:e,hideDetails:n,location:r,location_name:i,name:o,onCloseClick:s,onDetails:a,onSubmit:l})=>{var g;const{logo:u="default"}=Xe(),{isLoading:f,lmsData:d}=Ts(),h=(g=d==null?void 0:d.location)==null?void 0:g.what3words,v=!!(h!=null&&h.id),y=qC[u];return S.jsxs("div",{className:Se(Jt.root,e),children:[S.jsxs("div",{className:Jt.header,children:[S.jsxs("div",{className:Jt.titleContainer,children:[f?S.jsx(_t,{circle:!0,width:40,height:40}):S.jsx("div",{className:Jt.icon,children:S.jsx(y,{})}),f?S.jsx(_t,{width:200}):S.jsx("span",{className:Jt.title,children:o||"{{ properties.point.name }}"})]}),S.jsx("div",{className:Jt.close,children:S.jsx(ri,{position:"relative",onClick:s})})]}),S.jsxs("div",{className:Jt.description,children:[f?S.jsx(_t,{width:300}):(r==null?void 0:r.full_address)||"{{ properties.point.location.full_address }}",f?S.jsx(_t,{width:300}):i||"{{ properties.point.location_name }}"]}),f?S.jsx(_t,{width:150}):v&&S.jsx(zd,{what3words:h}),S.jsxs("div",{className:Jt.actions,children:[S.jsx(Bt,{id:Jp,variant:"primary",className:Jt.submit,disabled:f,onClick:l,children:t?"{ choose }":S.jsx(tr,{keyName:"choose",ns:"common"})}),!n&&S.jsxs(Bt,{id:Bf,as:"link",variant:"primary",className:Jt.details,disabled:f,onClick:a,children:[t?"{ details }":S.jsx(tr,{keyName:"details",ns:"common"}),S.jsx($h,{})]})]})]})},QC=[{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#444444"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#f2f2f2"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{saturation:-100},{lightness:45}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#ffcc00"}]},{featureType:"road.arterial",elementType:"geometry.fill",stylers:[{hue:"#ff0000"}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"road.local",elementType:"geometry.fill",stylers:[{color:"#ffffff"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:"#c2c4c4"},{visibility:"on"}]}];function JC(t="#ffcc00"){return[{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#444444"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#f2f2f2"}]},{featureType:"landscape",elementType:"geometry.fill",stylers:[{visibility:"on"},{hue:"#ff0000"}]},{featureType:"landscape.man_made",elementType:"geometry",stylers:[{lightness:"100"}]},{featureType:"landscape.man_made",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"landscape.natural",elementType:"geometry.fill",stylers:[{lightness:"100"}]},{featureType:"landscape.natural",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"landscape.natural.landcover",elementType:"geometry.fill",stylers:[{visibility:"on"}]},{featureType:"landscape.natural.terrain",elementType:"geometry",stylers:[{lightness:"100"}]},{featureType:"landscape.natural.terrain",elementType:"geometry.fill",stylers:[{visibility:"off"},{lightness:"23"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{saturation:-100},{lightness:45}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:t}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:t},{visibility:"on"}]},{featureType:"water",elementType:"geometry.fill",stylers:[{visibility:"on"},{color:"#cccccc"}]},{featureType:"water",elementType:"labels",stylers:[{visibility:"off"}]}]}const YC={clickableIcons:!1,disableDefaultUI:!0,minZoom:4,maxZoom:20,restriction:{strictBounds:!0,latLngBounds:{north:85,south:-85,west:-179,east:179}}},yp={optimized:!0},XC=({clusterer:t,handleCloseClick:e,handleDetailsClick:n,handlePointClick:r,handleSubmitClick:i,point:o})=>{const[s,a]=c.useState(null),{hideDetails:l,iconType:u,palette:f}=Xe(),{closeSamePoints:d}=sn(),h=on(E=>E.location),v=(f==null?void 0:f.primary)||"#fc0",y=u==="omni-llama"?kt.PinLlama:kt.PinOmnic,g=s==null?void 0:s.getVisible(),w=!!o&&(h==null?void 0:h.uid)===o.uid,C=vr("screenSm"),{isIdle:L}=be(),m=Rl({isSelectedPoint:w}),_=L&&w&&m&&g,x=c.useMemo(()=>{let E;if(o.type===30)switch(u){case"omni-llama":{w?E=kt.PinLlamaSelected:E=kt.PinLlama;break}case"we-chip":{w?E=kt.PinWeChipSelected:E=kt.PinWeChip;break}default:{w?E=kt.PinOmnicSelected:E=Pr(y,v);break}}else w?E=Pr(kt.PinPvz,"--owl-color-black"):E=Pr(kt.PinPvz,"--owl-color-grey-80");return yn(E,"Icon url is not defined"),{url:kl(E)}},[o.type,w,u,y,v]),p=c.useMemo(()=>({lat:o.location.latitude,lng:o.location.longitude}),[o.location.latitude,o.location.longitude]),b=()=>{d(),r(o)};return S.jsx(up,{noClustererRedraw:!0,icon:x,position:p,clusterer:t,options:yp,onLoad:a,onClick:b,children:_&&!C&&S.jsx(gp,{children:S.jsx(KC,{...o,hideDetails:l,className:ot.balloon,onCloseClick:e,onSubmit:()=>i(o),onDetails:()=>n(o)})})},o.uid)},e5=({handleCloseClick:t,points:e,...n})=>{const{setSamePoints:r}=sn(),{onSamePointsClusterClick:i}=Xe();return S.jsx(X4,{zoomOnClick:!1,clusterClass:ot.cluster,onClick:o=>{t();const a=o.getMarkers().map(d=>{var h,v;return{lat:(h=d.getPosition())==null?void 0:h.lat(),lng:(v=d.getPosition())==null?void 0:v.lng()}}),{lat:l,lng:u}=a[0];if(a.every(d=>d.lat===l&&d.lng===u)){const d=e.filter(({location:{latitude:h,longitude:v}})=>h===l&&v===u);r(d),i==null||i(d)}else{const d=o.getMap();if(d instanceof google.maps.Map){const h=new window.google.maps.LatLngBounds;o.getMarkers().forEach(v=>{h.extend(v.getPosition())}),d.fitBounds(h)}}},onClusteringEnd:()=>{setTimeout(()=>{const o=document.getElementsByClassName(ot.cluster);for(const s of o)s.addEventListener("touchstart",Ma,{passive:!0})},100)},onUnmount:()=>{const o=document.getElementsByClassName(ot.cluster);for(const s of o)s.removeEventListener("touchstart",Ma)},children:o=>S.jsx(S.Fragment,{children:e.map((s,a)=>S.jsx(XC,{clusterer:o,point:s,handleCloseClick:t,...n},s.uid+a))})})},t5=c.memo(e5),n5=t=>{const{locale:e}=Xe(),n=sn(cm),r=qt(Md),i=JSON.stringify([n.length,e,r==null?void 0:r.place_id]);return S.jsx(t5,{points:n,...t},i)},r5=c.memo(n5),bp=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:42,height:42,fill:"none",viewBox:"0 0 42 42",...t},U.createElement("rect",{width:42,height:42,fill:"#fff",rx:21}),U.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"}),U.createElement("rect",{width:41,height:41,x:.5,y:.5,stroke:"#1D3665",strokeOpacity:.1,rx:20.5})),i5="DeliveryBalloon-module__root__Nu90iy",o5="DeliveryBalloon-module__details__eqUTaI",s5="DeliveryBalloon-module__header__JVdyxN",a5="DeliveryBalloon-module__title__-zKKCt",l5="DeliveryBalloon-module__description__no5-ki",u5="DeliveryBalloon-module__actions__C-N0H-",c5="DeliveryBalloon-module__errorVariant__e6uhZl",f5="DeliveryBalloon-module__logo__62gC5h",En={root:i5,details:o5,header:s5,title:a5,description:l5,actions:u5,errorVariant:c5,logo:f5},d5=({SSR:t,address:e,className:n,hasCloseButton:r,hideDetails:i,onClose:o,onDetails:s,variant:a})=>{const l=a==="error",u=a==="default",f=t?"{ courier_balloon.title }":S.jsx(tr,{keyName:"title",ns:"courier_balloon"}),d=t?"{ courier_balloon.error_title }":S.jsx(tr,{keyName:"error_title",ns:"courier_balloon"}),h=t?"{ courier_balloon.error_description }":S.jsx(tr,{keyName:"error_description",ns:"courier_balloon"});return S.jsxs("div",{className:Se(En.root,n,En[`${a}Variant`]),children:[S.jsxs("div",{className:En.header,children:[S.jsx(bp,{className:En.logo}),S.jsx("span",{className:En.title,children:l?d:f}),r&&S.jsx(ri,{onClick:o})]}),S.jsx("div",{className:En.description,children:l?h:e||"{{ properties.address }}"}),u&&!i&&S.jsx("div",{className:En.actions,children:S.jsx(Bt,{id:Bf,as:"button",variant:"primary",className:En.details,onClick:s,children:t?"{ details }":S.jsx(tr,{keyName:"details",ns:"common"})})})]})},h5="Chip-module__root__zsoSyP",p5="Chip-module__active__BlTSFB",yf={root:h5,active:p5},bf=({active:t,children:e,className:n,...r})=>S.jsx("div",{...r,className:Se(yf.root,n,{[yf.active]:t}),children:e}),g5="TextArea-module__root__8YFknR",v5={root:g5},Cf=c.forwardRef(({className:t,inputRef:e,onBlur:n,onChange:r,onFocus:i,...o},s)=>{const a=c.useRef(null);c.useImperativeHandle(s,()=>({focus:()=>{var u,f;(u=a.current)==null||u.focus(),i&&i({target:{value:(f=a.current)==null?void 0:f.value}})},blur:()=>{var u,f;(u=a.current)==null||u.blur(),n&&n({target:{value:(f=a.current)==null?void 0:f.value}})},setValue:u=>{r&&r({target:{value:u}}),a.current&&(a.current.value=u)}}),[n,r,i]);const l=wp(e,a);return S.jsx("textarea",{...o,ref:l,className:Se(v5.root,t),onBlur:n,onFocus:i,onChange:r})}),m5=({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},y5="DeliveryDetailsView-module__title__azeoUr",b5="DeliveryDetailsView-module__logo__4zZtpM",C5="DeliveryDetailsView-module__header__oDE9He",w5="DeliveryDetailsView-module__content__6P27SY",S5="DeliveryDetailsView-module__section__2M3Qip",L5="DeliveryDetailsView-module__chips__KmYgha",E5="DeliveryDetailsView-module__actions__43XZ-V",x5="DeliveryDetailsView-module__submit__58LKBw",_5="DeliveryDetailsView-module__actionsHidden__SW-67b",M5="DeliveryDetailsView-module__commentSection__GlX1A2",O5="DeliveryDetailsView-module__comment__2pGG6h",Lt={title:y5,logo:b5,header:C5,content:w5,section:S5,chips:L5,actions:E5,submit:x5,actionsHidden:_5,commentSection:M5,comment:O5},P5=c.forwardRef(({classes:t,hideActions:e,location:n,onChange:r,onClose:i,onSubmit:o},s)=>{var p;const{hideDeliveryTime:a,inputs:l,locale:u}=Xe(),{t:f}=ln(["details_modal","courier_balloon","common"]),d=c.useMemo(()=>m5({set:r,hideDeliveryTime:a}),[a,r]),[h,v]=c.useState(!1),[y,g]=c.useReducer(d,{comment:"",delivery_time:"",apartment_number:"",...n}),w=c.useCallback(async()=>{v(!0);try{yn(n.address,"Address is required");const b=await Fp({address:n.address,algorithm:10,service:10,language:u||Ff});if(!vd(b))return;const E=b==null?void 0:b.data.data,P={...y,address:E};return o==null||o(P),P}finally{v(!1)}},[u,n.address,o,y]);c.useImperativeHandle(s,()=>({submit:w}),[w]);const C=b=>()=>{g({payload:b,type:"SET_DELIVERY_TIME"})},L=b=>{g({payload:b.target.value,type:"SET_APARTMENT_NUMBER"})},m=b=>{g({payload:b.target.value,type:"SET_COMMENT"})},_=Ss(l==null?void 0:l.apartment),x=Ss(l==null?void 0:l.comment);return S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:Se(Lt.header,t==null?void 0:t.header),children:[S.jsx(ri,{onClick:i}),S.jsxs("div",{className:Lt.title,children:[S.jsx(bp,{className:Lt.logo}),S.jsx("span",{children:f("title",{ns:"courier_balloon"})})]})]}),S.jsxs("div",{className:Se(Lt.content,t==null?void 0:t.content),children:[S.jsxs("section",{className:Lt.section,children:[S.jsxs("span",{children:[f("address"),":"]}),S.jsx("p",{children:n.address})]}),!a&&S.jsxs("section",{className:Lt.section,children:[S.jsxs("span",{children:[f("delivery_time"),":"]}),S.jsxs("div",{className:Lt.chips,children:[S.jsx(bf,{active:y.delivery_time==="8:00-13:00",onClick:C("8:00-13:00"),children:"8:00 - 13:00"}),S.jsx(bf,{active:y.delivery_time==="14:00-22:00",onClick:C("14:00-22:00"),children:"14:00 - 22:00"})]})]}),S.jsxs("section",{className:Lt.section,children:[S.jsxs("span",{children:[f("apartment_number"),":"]}),S.jsx(Cf,{..._,rows:1,onChange:L})]}),S.jsxs("section",{className:Se(Lt.section,Lt.commentSection),children:[S.jsxs("span",{children:[f("comment"),":"]}),S.jsx(Cf,{...x,className:Lt.comment,onChange:m})]})]}),S.jsx("div",{className:Se(Lt.actions,{[Lt.actionsHidden]:e}),children:S.jsx(Bt,{loading:h,disabled:!((p=y.meta)!=null&&p.valid)||h,variant:"primary",className:Lt.submit,onClick:w,children:f("choose",{ns:"common"})})})]})}),Cp=c.memo(P5),k5={header:ot.deliveryDetailsViewHeader,content:ot.deliveryDetailsViewContent},T5=({hideDeliveryTime:t,hideDetails:e,onPointClick:n,point:r,setDeliveryPoint:i,setOpenDetails:o})=>{const s=Rl({isSelectedPoint:!0}),a=c.useRef(null),[l,u]=c.useState(!1),[f,d]=c.useState({...r,comment:"",delivery_time:"",apartment_number:""});c.useEffect(()=>{d({...r,comment:"",delivery_time:"",apartment_number:""})},[r]);const[h,v]=c.useState(null),y=vr("screenSm"),g=c.useMemo(()=>({lat:f.coords[0],lng:f.coords[1]}),[f.coords]),w=()=>{o==null||o(!0)},C=()=>{i==null||i(null)},L=c.useMemo(()=>({url:kl(Pr(kt.PinHome,"--owl-color-success")),scaledSize:new google.maps.Size(...Yp)}),[]),m=async()=>{var b;try{u(!0);const E=await((b=a.current)==null?void 0:b.submit());if(!E)return;n==null||n(E),o==null||o(!1),i==null||i(null)}finally{u(!1)}},_=S.jsx(d5,{...f,hideDetails:e,hasCloseButton:y,variant:f.address?"default":"error",className:ot.balloon,onDetails:w,onClose:C}),x=s&&!!(h!=null&&h.getVisible()),p=t?!!f.apartment_number:!!f.apartment_number&&!!f.delivery_time;return S.jsxs(up,{noClustererRedraw:!0,icon:L,position:g,options:yp,onLoad:v,children:[y&&S.jsxs(zh,{minSnapHeight:f.address?200:void 0,submitDisabled:!p||l,submitLoading:l,hideFooter:!f.address,open:x,onDismiss:C,onSubmitClick:m,children:[f.address&&S.jsx(Cp,{ref:a,hideActions:!0,classes:k5,location:r,onChange:d,onClose:C}),!f.address&&_]}),!y&&x&&S.jsx(gp,{onCloseClick:C,children:_})]})},R5=({children:t,className:e,...n})=>{const{disableDelivery:r,map:i,mapTheme:o,palette:s}=Xe(),a=s==null?void 0:s.primary;function l(){switch(o){case"omnic":return QC;case"omnic-light":return JC(a);default:return}}const u=l(),f=c.useMemo(()=>{var h,v;return{lat:((h=i==null?void 0:i.center)==null?void 0:h[0])??ba[0],lng:((v=i==null?void 0:i.center)==null?void 0:v[1])??ba[1]}},[i==null?void 0:i.center]),d=c.useCallback(async h=>{const{latLng:v}=h;if(!v||r)return;be.getState().setDetailsOpen(!1),on.getState().setSelectedLocation(null);const y=[v.lat(),v.lng()];console.debug("[OmnicLocationsWidget::mapClick]",y);try{await qt.getState().setPlaceAndPoint(y)}catch{Ot.getState().setDeliverPoint({address:null,coords:y})}},[r]);return S.jsx(A4,{zoom:i==null?void 0:i.initialZoom,center:f,mapContainerClassName:Se(ot.root,e),options:{styles:u,...YC},onClick:d,...n,children:t})},D5=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},U.createElement("rect",{width:2,height:20,x:9,fill:"#fff",rx:1}),U.createElement("rect",{width:2,height:20,x:20,y:9,fill:"#fff",rx:1,transform:"rotate(90 20 9)"}),U.createElement("circle",{cx:10,cy:10,r:8,fill:"#fff"}),U.createElement("circle",{cx:10,cy:10,r:6,fill:"currentcolor"}),U.createElement("circle",{cx:10,cy:10,r:4,fill:"#fff"})),A5=t=>{const e=document.createElement("div"),n=document.createElement("div");e.classList.add(ot.mapControl),n.classList.add(ot.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)})},I5=t=>{const e=document.createElement("div");e.classList.add(ot.mapControl),e.classList.add(ot.geolocationControl),e.innerHTML=zp.renderToString(S.jsx(D5,{})),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{Pl(async n=>{const{latitude:r,longitude:i}=n.coords,o=[r,i];await qt.getState().setPlaceAndPoint(o)})})},j5=({className:t})=>{const e=Vn(),n=be(Gf),r=be(Dg),i=sn(yd),o=Ot(wl),{lmsData:s}=Ts(),{cityName:a,countryAbbreviation:l,disableGeolocation:u,hideDeliveryTime:f,hideDetails:d,hideMapControls:h,onPointClick:v,regionName:y,skipPointInfo:g}=Xe(),w=c.useCallback(M=>{console.debug("[OmnicLocationsWidget::loadMap]",M),be.getState().setMap(M),h||(A5(M),u||I5(M))},[u,h]),C=c.useCallback(M=>{const R=s==null?void 0:s.location.what3words,A=R!=null&&R.id?R:void 0;v==null||v(M,A)},[v,s]),L=c.useCallback(()=>{console.debug("[OmnicLocationsWidget::unmountMap]"),be.getState().setMap(null)},[]),m=c.useCallback(()=>{if(be.getState().setIdle(!0),!n)return;const M=n==null?void 0:n.getBounds();M&&(console.debug("[OmnicLocationsWidget::changeBounds]",M),sn.getState().loadNext({bounds:[[M.getSouthWest().lat(),M.getNorthEast().lat()],[M.getSouthWest().lng(),M.getNorthEast().lng()]],filter:e,city_name:a,country_abbreviation:l,region_name:y}))},[a,l,e,n,y]),_=c.useCallback(async M=>{if(Ot.getState().setDeliverPoint(null),on.getState().setSelectedLocation(M),!M)return;const R=[M.location.latitude,M.location.longitude];console.debug("[OmnicLocationsWidget::selectPoint]",R),await qt.getState().setPlace(R)},[]),x=c.useCallback(()=>{console.debug("[OmnicLocationsWidget::tilesLoaded]")},[]),p=be.getState().setDetailsOpen,{getLMSData:b}=S4(),E=M=>{if(b(M.code),g){C(M);return}p(!1),_(M)},P=()=>{p(!1),_(null)},O=M=>{p(!0),_(M)},T=M=>{C(M),p(!1),_(null)};return S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:Se(ot.mapContainer,t),children:[S.jsxs(R5,{onIdle:m,onLoad:w,onUnmount:L,onTilesLoaded:x,onBoundsChanged:()=>{be.getState().setIdle(!1)},children:[o&&S.jsx(T5,{hideDeliveryTime:f,hideDetails:d,point:o,setOpenDetails:be.getState().setDetailsOpen,setDeliveryPoint:Ot.getState().setDeliverPoint,onPointClick:C}),S.jsx(r5,{handleCloseClick:P,handleDetailsClick:O,handlePointClick:E,handleSubmitClick:T})]}),(i||r)&&S.jsx(Hh,{className:ot.overlay,children:S.jsx(as,{})})]}),S.jsx(U3,{handleDetailsClick:O,handlePointClick:E}),S.jsx(p3,{handleCloseClick:P,handleSubmitClick:T})]})},N5=c.memo(j5),B5=t=>({google:N5})[t];function wp(...t){return c.useCallback(e=>{for(const n of t)typeof n=="function"?n(e):n&&typeof n=="object"&&(n.current=e)},t)}const Ss=t=>{const e=c.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}},F5=()=>{throw new Error("useMediaQuery is a client-only hook")};function U5(t){const e=c.useCallback(r=>{const i=window.matchMedia(t);return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[t]),n=()=>window.matchMedia(t).matches;return c.useSyncExternalStore(e,n,F5)}const V5="768px",z5="1024px",H5="1280px",$5="1536px",W5={screenSm:V5,screenMd:z5,screenLg:H5,screenXl:$5};function vr(t){return U5(`(max-width: calc(${W5[t]} - 1px))`)}const G5=(t,e,n)=>{const{disableGeolocation:r}=n??{},i=be(Gf);c.useEffect(()=>{i&&(console.debug("[OmnicWidgetLocations::setMapLoaded]",i),be.getState().setLoaded())},[i]);const o=t[0],s=t[1];c.useEffect(()=>{if(!i)return;const a=[o,s],l=async()=>{console.debug("[OmnicWidgetLocations::setFallbackCenter]",a),qt.getState().setPlace(a,[],"country")};if(r){l();return}Pl(async u=>{const{latitude:f,longitude:d}=u.coords,h=[f,d];console.debug("[OmnicWidgetLocations::setGeoPosition]",h),await qt.getState().setPlace(h,[],"country")},()=>l())},[o,s,i,e,r])},Sp=M0().use(p0()).use(o0()).init({language:"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"}),Z5=t=>{c.useEffect(()=>{t&&(Sp.changeLanguage(t),os.setLanguage(t))},[t])},q5=t=>{c.useEffect(()=>{if(t){const e=Object.keys(t);for(const n of e){const r=t[n];r&&so(`--owl-color-${n}`,r)}}},[t])},K5=t=>{c.useEffect(()=>{t&&t!==void 0&&so("--owl-button-radius",`${t}px`)},[t])},Q5=t=>{c.useEffect(()=>{t&&t!==void 0&&so("--owl-font",t)},[t])},J5={open:!1},Y5=t=>t.open,er=bn(t=>({...J5,toggle(e){t(n=>({open:e??!n.open}))}})),X5=t=>{const e=t==="selector";c.useEffect(()=>{e&&er.getState().toggle(!0)},[e])},ew=({locale:t})=>{const[e,n]=c.useState(!1);return c.useEffect(()=>{n(!1)},[t]),c.useEffect(()=>{e||n(!0)},[e]),console.debug("[OmnicWidgetLocations::remount]",{locale:t,mounted:e}),e},tw=t=>{c.useEffect(()=>{t==="sharp"&&so("--owl-radius","0")},[t])},nw=({children:t})=>{const{cornersVariant:e,font:n,locale:r,palette:i,radius:o,startScreen:s}=Xe();return Q5(n),Z5(r),q5(i),K5(o),X5(s),tw(e),S.jsx(S.Fragment,{children:t})},rw=({children:t})=>{const{disableGeolocation:e,map:n}=Xe();return yn(n==null?void 0:n.center,"Map center is required"),yn(n==null?void 0:n.initialZoom,"Map initial zoom is required"),G5(n.center,n.initialZoom,{disableGeolocation:e}),S.jsx(S.Fragment,{children:t})},iw=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:28,fill:"none",viewBox:"0 0 24 28",...t},U.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"})),ow=()=>{er.getState().toggle(!0),be.getState().setDetailsOpen(!1),Ot.getState().setDeliverPoint(null),on.getState().setSelectedLocation(null)},sw="CurrentLocation-module__root__AeQCGT",aw="CurrentLocation-module__icon__459m9q",lw="CurrentLocation-module__text__w-9v28",ha={root:sw,icon:aw,text:lw},Lp=({className:t})=>{const{t:e}=ln("current_location"),n=qt(Md),r=qt(km);return S.jsxs("div",{role:"presentation",className:Se(ha.root,t),onClick:ow,children:[S.jsx(iw,{className:ha.icon}),S.jsxs("span",{className:ha.text,children:[!n&&e("choose_from_map"),n&&`${(r==null?void 0:r.long_name)??n.formatted_address}`]})]})},uw=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:123,height:32,fill:"none",viewBox:"0 0 123 32",...t},U.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"})),cw=t=>U.createElement("svg",{width:119,height:44,viewBox:"0 0 119 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},U.createElement("path",{d:"M4.70489 0.199253H0V13.4418H10.7452V10.0105H4.70489V0.199253Z",fill:"black"}),U.createElement("path",{d:"M16.9359 0.199253H12.2287V13.4418H22.974V10.0105H16.9359V0.199253Z",fill:"black"}),U.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"}),U.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"}),U.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"}),U.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"}),U.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"}),U.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"}),U.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"}),U.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"}),U.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"}),U.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"}),U.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"})),fw="Header-module__root__Pe4MYp",dw="Header-module__nav__wtnkmT",hw="Header-module__navItem__-Fy63Z",pw="Header-module__logo__xO2bWO",Mi={root:fw,nav:dw,navItem:hw,logo:pw},gw={llama:cw,default:uw},vw=()=>{const{hideLogo:t,logo:e="default"}=Xe();if(t)return null;const n=gw[e];return S.jsx("div",{className:Mi.logo,children:S.jsx(n,{})})},mw=({className:t})=>{const{t:e}=ln("header"),{disableDelivery:n}=Xe(),r=be(Pg),i=Ot(wl);c.useEffect(()=>{i?be.getState().setMode("location_delivery"):be.getState().setMode("self_pickup")},[i]);const o=()=>{Ot.getState().setDeliverPoint(null),be.getState().setMode("self_pickup")},s=()=>{Ot.getState().setDeliverPoint(null),be.getState().setMode("location_delivery")},a=r==="self_pickup",l=r==="location_delivery";return S.jsxs("div",{className:Se(Mi.root,t),children:[S.jsx(vw,{}),S.jsxs("nav",{className:Mi.nav,children:[!n&&S.jsx(Bt,{as:"link",className:Mi.navItem,variant:a?"primary":"secondary",onClick:o,children:e("self_pickup")}),!n&&S.jsx(Bt,{as:"link",className:Mi.navItem,variant:l?"primary":"secondary",onClick:s,children:e("courier_delivery")}),S.jsx(Lp,{})]})]})},yw=c.memo(mw),bw={open:!1},Xr=bn(t=>({...bw,toggle(e){be.getState().setDetailsOpen(!1),Ot.getState().setDeliverPoint(null),on.getState().setSelectedLocation(null),t(n=>({open:e??!n.open}))}})),Cw="Layout-module__root__qzPL-f",ww="Layout-module__headerHidden__JEN-d0",Sw="Layout-module__sidebarHidden__x017O3",Lw="Layout-module__sidebarOpen__IZnIjs",Uo={root:Cw,headerHidden:ww,sidebarHidden:Sw,sidebarOpen:Lw},Ew=({children:t})=>{const{hideFilters:e,hideHeader:n}=Xe(),r=Xr(i=>i.open);return S.jsx("div",{className:Se(Uo.root,{[Uo.sidebarOpen]:r,[Uo.headerHidden]:n,[Uo.sidebarHidden]:e}),children:t})},Ns=()=>S.jsx(Hh,{children:S.jsx(as,{})}),xw=({children:t})=>{const e=sn(fm);return sn(yd)&&!e?S.jsx(Ns,{}):S.jsx(S.Fragment,{children:t})};var Ep={},Bs={},xp={exports:{}},_w="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Mw=_w,Ow=Mw;function _p(){}function Mp(){}Mp.resetWarningCache=_p;var Pw=function(){function t(r,i,o,s,a,l){if(l!==Ow){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:Mp,resetWarningCache:_p};return n.PropTypes=n,n};xp.exports=Pw();var kw=xp.exports,Fs={},ei={};Object.defineProperty(ei,"__esModule",{value:!0});ei.loadGoogleMapScript=ei.isBrowser=void 0;var Op=typeof window<"u"&&window.document;ei.isBrowser=Op;var Tw=function(e,n){if(!Op||typeof google<"u"&&google.maps&&google.maps.api)return Promise.resolve();var r=document.querySelectorAll('script[src*="'.concat(e,'"]'));if(r&&r.length)return new Promise(function(s){if(typeof google<"u")return s();r[0].addEventListener("load",function(){return s()})});var i=new URL(n);i.searchParams.set("callback","__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__");var o=document.createElement("script");return o.src=i.toString(),new Promise(function(s){window.__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__=s,document.body.appendChild(o)})};ei.loadGoogleMapScript=Tw;var Us={};Object.defineProperty(Us,"__esModule",{value:!0});Us.GOOGLE_MAP_SCRIPT_BASE_URL=void 0;var Rw="https://maps.googleapis.com/maps/api/js";Us.GOOGLE_MAP_SCRIPT_BASE_URL=Rw;function ns(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ns=function(n){return typeof n}:ns=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ns(t)}Object.defineProperty(Fs,"__esModule",{value:!0});Fs.default=Bw;var Et=Aw(c),pa=ei,Dw=Us;function Pp(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(Pp=function(i){return i?n:e})(t)}function Aw(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||ns(t)!=="object"&&typeof t!="function")return{default:t};var n=Pp(e);if(n&&n.has(t))return n.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}function wf(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 Sf(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?wf(Object(n),!0).forEach(function(r){Iw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wf(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Iw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function jw(t,e){if(t==null)return{};var n=Nw(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Nw(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Bw(t){var e=t.ref,n=t.onPlaceSelected,r=t.apiKey,i=t.libraries,o=i===void 0?"places":i,s=t.inputAutocompleteValue,a=s===void 0?"new-password":s,l=t.options;l=l===void 0?{}:l;var u=l.types,f=u===void 0?["(cities)"]:u,d=l.componentRestrictions,h=l.fields,v=h===void 0?["address_components","geometry.location","place_id","formatted_address"]:h,y=l.bounds,g=jw(l,["types","componentRestrictions","fields","bounds"]),w=t.googleMapsScriptBaseUrl,C=w===void 0?Dw.GOOGLE_MAP_SCRIPT_BASE_URL:w,L=t.language,m=(0,Et.useRef)(null),_=(0,Et.useRef)(null),x=(0,Et.useRef)(null),p=(0,Et.useRef)(null),b=L?"&language=".concat(L):"",E="".concat(C,"?libraries=").concat(o,"&key=").concat(r).concat(b),P=(0,Et.useCallback)(function(){return(0,pa.loadGoogleMapScript)(C,E)},[C,E]);return(0,Et.useEffect)(function(){var O=Sf(Sf({},g),{},{fields:v,types:f,bounds:y});if(d&&(O.componentRestrictions=d),!(x.current||!m.current||!pa.isBrowser)){e&&!e.current&&(e.current=m.current);var T=function(){var R;if(typeof google>"u")return console.error("Google has not been found. Make sure your provide apiKey prop.");if(!((R=google.maps)!==null&&R!==void 0&&R.places))return console.error("Google maps places API must be loaded.");if(!m.current instanceof HTMLInputElement)return console.error("Input ref must be HTMLInputElement.");x.current=new google.maps.places.Autocomplete(m.current,O),x.current&&(_.current=x.current.addListener("place_changed",function(){n&&x&&x.current&&n(x.current.getPlace(),m.current,x.current)}))};return r?P().then(function(){return T()}):T(),function(){return _.current?_.current.remove():void 0}}},[]),(0,Et.useEffect)(function(){var O;!(Et.default!==null&&Et.default!==void 0&&(O=Et.default.version)!==null&&O!==void 0&&O.startsWith("18"))&&pa.isBrowser&&window.MutationObserver&&m.current&&m.current instanceof HTMLInputElement&&(p.current=new MutationObserver(function(){p.current.disconnect(),m.current&&(m.current.autocomplete=a)}),p.current.observe(m.current,{attributes:!0,attributeFilter:["autocomplete"]}))},[a]),(0,Et.useEffect)(function(){x.current&&x.current.setFields(v)},[v]),(0,Et.useEffect)(function(){x.current&&x.current.setBounds(y)},[y]),(0,Et.useEffect)(function(){x.current&&x.current.setComponentRestrictions(d)},[d]),(0,Et.useEffect)(function(){x.current&&x.current.setOptions(g)},[g]),{ref:m,autocompleteRef:x}}function rs(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?rs=function(n){return typeof n}:rs=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},rs(t)}Object.defineProperty(Bs,"__esModule",{value:!0});Bs.default=void 0;var bl=Uw(c),Je=kp(kw),Fw=kp(Fs);function kp(t){return t&&t.__esModule?t:{default:t}}function Tp(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(Tp=function(i){return i?n:e})(t)}function Uw(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||rs(t)!=="object"&&typeof t!="function")return{default:t};var n=Tp(e);if(n&&n.has(t))return n.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}function Ls(){return Ls=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},Ls.apply(this,arguments)}function Vw(t,e){if(t==null)return{};var n=zw(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function zw(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Rp(t){var e=t.onPlaceSelected,n=t.apiKey,r=t.libraries,i=t.inputAutocompleteValue,o=t.options,s=t.googleMapsScriptBaseUrl,a=t.refProp,l=t.language,u=Vw(t,["onPlaceSelected","apiKey","libraries","inputAutocompleteValue","options","googleMapsScriptBaseUrl","refProp","language"]),f=(0,Fw.default)({ref:a,googleMapsScriptBaseUrl:s,onPlaceSelected:e,apiKey:n,libraries:r,inputAutocompleteValue:i,options:o,language:l}),d=f.ref;return bl.default.createElement("input",Ls({ref:d},u))}Rp.propTypes={apiKey:Je.default.string,libraries:Je.default.arrayOf(Je.default.string),ref:Je.default.oneOfType([Je.default.func,Je.default.shape({current:Je.default.any})]),googleMapsScriptBaseUrl:Je.default.string,onPlaceSelected:Je.default.func,inputAutocompleteValue:Je.default.string,options:Je.default.shape({componentRestrictions:Je.default.object,bounds:Je.default.object,location:Je.default.object,offset:Je.default.number,origin:Je.default.object,radius:Je.default.number,sessionToken:Je.default.object,types:Je.default.arrayOf(Je.default.string)}),language:Je.default.string};var Hw=(0,bl.forwardRef)(function(t,e){return bl.default.createElement(Rp,Ls({},t,{refProp:e}))});Bs.default=Hw;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(t,"usePlacesWidget",{enumerable:!0,get:function(){return n.default}});var e=r(Bs),n=r(Fs);function r(i){return i&&i.__esModule?i:{default:i}}})(Ep);var Dp=Ep;async function $w(){return(await Qe.request({method:"GET",baseURL:"https://api.geo-data.omnic.solutions/api/1.0/key",headers:{Authorization:"Token fa812020-3197-401a-9b39-345999046111"}})).data.data}function Ww(t){return np({queryKey:["wl-map-key-wl"],queryFn:()=>$w(),refetchOnWindowFocus:!1,retry:2,enabled:!t})}const Ap=c.createContext(null),Gw=({children:t})=>{const{gMapKey:e}=Xe(),{data:n,isFetching:r}=Ww(e),i=c.useMemo(()=>({mapKey:e||n||"AIzaSyDsI0AO8VsUrTPoyR9fF7T31FKx1a9TLO0"}),[n,e]);return S.jsx(Ap.Provider,{value:i,children:r?S.jsx(Ns,{}):t})},Ip=()=>{const t=c.useContext(Ap);if(!t)throw new Error("useMapKeyContext must be used within a MapKeyProvider");return t},Zw="Aside-module__root__EotK2f",qw="Aside-module__open__Zwmbs5",Kw="Aside-module__overlay__slLdHF",Qw="Aside-module__container__28P4wq",Vo={root:Zw,open:qw,overlay:Kw,container:Qw},Jw=({children:t,className:e,open:n})=>S.jsxs("div",{className:Se(Vo.root,e,{[Vo.open]:n}),children:[S.jsx("div",{className:Vo.overlay}),S.jsx("div",{className:Vo.container,children:t})]}),Yw="Input-module__locationSearchRoot__svh-f9",Xw="Input-module__endAdornment__m40K5R",e6="Input-module__input__505b7i",t6="Input-module__startAdornment__D-sJ0N",n6="Input-module__locationSearchInput__2YK1MG",r6="Input-module__label__gmqtsf",i6="Input-module__inputContainer__vubIa-",_r={locationSearchRoot:Yw,endAdornment:Xw,input:e6,startAdornment:t6,locationSearchInput:n6,label:r6,inputContainer:i6},jp=c.forwardRef(({className:t,endAdornment:e,inputRef:n,label:r,onBlur:i,onChange:o,startAdornment:s,...a},l)=>{const u=c.useId(),f=c.useRef(null);c.useImperativeHandle(l,()=>({focus:()=>{var h;(h=f.current)==null||h.focus()},blur:()=>{var h;(h=f.current)==null||h.blur()},setValue:h=>{if(o){o({target:{value:h}});return}if(i){i({target:{value:h}});return}f.current&&(f.current.value=h)}}),[i,o]);const d=wp(n,f);return S.jsxs("label",{htmlFor:a.id??u,className:Se(_r.locationSearchRoot,t),children:[r&&S.jsx("span",{className:_r.label,children:r}),S.jsxs("div",{className:_r.inputContainer,children:[s&&S.jsx("div",{className:_r.startAdornment,children:s}),S.jsx("input",{...a,ref:d,id:a.id??u,className:_r.locationSearchInput,onChange:o,onBlur:i}),e&&S.jsx("div",{className:_r.endAdornment,children:e})]})]})}),o6="LocationAside-module__submit__CSKcqi",s6="LocationAside-module__container__S1NejR",a6="LocationAside-module__selector__hl74ke",l6="LocationAside-module__label__0Zk8at",u6="LocationAside-module__header__N1wgyn",c6="LocationAside-module__close__VsE88z",zo={submit:o6,container:s6,selector:a6,label:l6,header:u6,close:c6},f6=c.forwardRef((t,e)=>{const{t:n}=ln(["location_aside","common"]),{mapKey:r}=Ip(),i=er(Y5),{country:o,hideCloseButtonOnLocationScreen:s,inputs:a,onCloseLocationSelector:l,onLocationSelect:u}=Xe(),f=c.useRef(null),[d,h]=c.useState("");c.useImperativeHandle(e,()=>({open:()=>er.getState().toggle(!0),close:()=>er.getState().toggle(!1)}),[]);const v=async m=>{er.getState().toggle(!1),await qt.getState().setPlace(m),u==null||u(m),m!=null&&m.formatted_address&&h(m==null?void 0:m.formatted_address)},y=()=>{er.getState().toggle(!1),l==null||l()},g=o?{componentRestrictions:{country:o}}:void 0,w=m=>{h(m.target.value)},{ref:C}=Dp.usePlacesWidget({libraries:["places"],options:g,onPlaceSelected:v,apiKey:r,inputAutocompleteValue:d}),L=Ss(a==null?void 0:a.city);return S.jsx(Jw,{open:i,children:S.jsx("div",{ref:f,className:zo.container,children:S.jsxs("div",{className:zo.selector,children:[S.jsxs("div",{className:zo.header,children:[S.jsx("div",{className:zo.label,children:n("choose_city")}),!s&&S.jsx(ri,{position:"relative",onClick:y})]}),S.jsx(jp,{...L,inputRef:C,value:d,placeholder:n("placeholder"),onChange:w})]})})})}),d6=c.memo(f6),h6=({children:t})=>{const{locale:e}=Xe(),{mapKey:n}=Ip(),{setMapKey:r}=qt();c.useEffect(()=>{r(n)},[n,r]);const{isLoaded:i}=lp({language:e,libraries:eg,googleMapsApiKey:n});return i?S.jsx(S.Fragment,{children:t}):S.jsx(Ns,{})},p6=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},U.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"})),g6=({className:t})=>{const{t:e}=ln("location_selector"),{country:n,inputs:r,onLocationSelect:i}=Xe(),[o,s]=c.useState(""),[a,l]=c.useState(!1),u=[],f=n?{componentRestrictions:{country:n},types:u}:{types:u},d=async L=>{await qt.getState().setPlaceAndPoint(L,{ignoreSelection:!0}),i==null||i(L),s("")},{ref:h}=Dp.usePlacesWidget({libraries:["places"],options:f,onPlaceSelected:d,inputAutocompleteValue:o}),v=L=>{a&&be.getState().setBlurred(!!L.target.value),s(L.target.value)},y=()=>{o&&be.getState().setBlurred(!0),be.getState().setDetailsOpen(!1),Ot.getState().setDeliverPoint(null),on.getState().setSelectedLocation(null),l(!0)},g=()=>{be.getState().setBlurred(!1),l(!1)},w=L=>{L.key==="Enter"&&L.preventDefault()},C=Ss(r==null?void 0:r.address);return S.jsx(jp,{...C,inputRef:h,value:o,className:t,endAdornment:S.jsx(p6,{}),placeholder:e("placeholder"),onChange:v,onFocus:y,onBlur:g,onKeyDown:w})},v6=({className:t})=>be(Rg)?S.jsx(g6,{className:t}):null,m6=c.memo(v6),y6="DeliveryDetailsModal-module__root__qwKnjX",b6={root:y6},C6=({className:t,location:e,onClose:n,onSubmit:r})=>S.jsx("div",{className:Se(b6.root,t),children:S.jsx(Cp,{location:e,onClose:n,onSubmit:r})}),w6="LocationDetailsModal-module__root__PyRnLM",S6={root:w6},L6=({className:t,location:e,onClose:n,onSubmit:r})=>{const i=()=>{r==null||r(e)};return S.jsx("div",{className:Se(S6.root,t),children:S.jsx(Hd,{location:e,onClose:n,onSubmit:i})})},E6="MapContainer-module__root__1Os6Q-",x6="MapContainer-module__mapWrapper__Cwe7qC",_6="MapContainer-module__wrapperBlurred__04NN2L",M6="MapContainer-module__locationSelector__Pr1zS-",O6="MapContainer-module__filterButton__CW3Qv7",P6="MapContainer-module__sidebarOpen__lGMVrJ",k6="MapContainer-module__filterIcon__T01XsJ",T6="MapContainer-module__details__gM8LWX",rn={root:E6,mapWrapper:x6,wrapperBlurred:_6,locationSelector:M6,filterButton:O6,sidebarOpen:P6,filterIcon:k6,details:T6},R6=()=>{const{onPointClick:t}=Xe(),e=be(Sl),n=on(Ig),r=Ot(wl),i=c.useCallback(()=>{be.getState().setDetailsOpen(!1)},[]),o=c.useCallback(s=>{t==null||t(s),be.getState().setDetailsOpen(!1),on.getState().setSelectedLocation(null),Ot.getState().setDeliverPoint(null)},[t]);return S.jsxs(S.Fragment,{children:[(r==null?void 0:r.address)&&e&&S.jsx(C6,{location:r,className:rn.details,onClose:i,onSubmit:o}),n&&e&&S.jsx(L6,{location:n,className:rn.details,onClose:i,onSubmit:o})]})},D6=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:60,height:40,fill:"none",viewBox:"0 0 60 40",...t},U.createElement("path",{d:"M0 0h52a8 8 0 0 1 8 8v24a8 8 0 0 1-8 8H0V0Z"}),U.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"})),A6=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:28,height:28,fill:"none",viewBox:"0 0 28 28",...t},U.createElement("rect",{width:28,height:28,fill:"#333",rx:4}),U.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"})),I6=()=>{const t=Xr(i=>i.open),e=Xr(i=>i.toggle),n=vr("screenSm"),r=()=>{e(!0)};return S.jsxs("div",{role:"presentation",className:Se(rn.filterButton,{[rn.sidebarOpen]:t}),onClick:n?void 0:r,children:[n&&S.jsx(Lp,{}),n?S.jsx(A6,{className:rn.filterIcon,onClick:r}):S.jsx(D6,{className:rn.filterIcon})]})},j6=({children:t,className:e})=>{const{hideFilters:n,hideSearchInput:r}=Xe(),i=be(Tg),o=be(Sl);return S.jsxs("div",{className:Se(rn.root,e),children:[!r&&!o&&S.jsx(m6,{className:rn.locationSelector}),!n&&S.jsx(I6,{}),S.jsx("div",{className:Se(rn.mapWrapper,{[rn.wrapperBlurred]:i}),children:t}),S.jsx(R6,{})]})},N6=c.memo(j6),B6="Separator-module__root__eQtZey",F6={root:B6},ga=({className:t,...e})=>S.jsx("hr",{className:Se(F6.root,t),...e}),U6="Sidebar-module__root__4j1MA3",V6="Sidebar-module__closeButton__HLXy1c",z6="Sidebar-module__open__mqQXF6",H6="Sidebar-module__header__Afp6uz",$6="Sidebar-module__typeFilter__GN46u9",W6="Sidebar-module__separator__6I4QoJ",G6="Sidebar-module__withRightPadding__2u1Ina",Z6="Sidebar-module__sheetContent__SaoncI",q6="Sidebar-module__doneButton__4aeaSD",vn={root:U6,closeButton:V6,open:z6,header:H6,typeFilter:$6,separator:W6,withRightPadding:G6,sheetContent:Z6,doneButton:q6},K6=()=>{const{t}=ln("common"),e=vr("screenSm"),n=Xr(i=>i.toggle),r=()=>{n(!1)};return S.jsxs("div",{className:vn.header,children:[e&&S.jsx("div",{role:"presentation",className:vn.doneButton,onClick:r,children:t("done")}),!e&&S.jsx(ri,{className:vn.closeButton,onClick:r})]})},Q6="Radio-module__root__7ElY2W",J6="Radio-module__label__c-sYW3",Lf={root:Q6,label:J6},Y6=({className:t,label:e,labelProps:n={},...r})=>{const i=c.useId(),{className:o,...s}=n;return S.jsxs("label",{htmlFor:i,className:Se(Lf.label,o),...s,children:[S.jsx("input",{id:i,type:"radio",className:Se(Lf.root,t),...r}),e]})},Ar=t=>S.jsx(Y6,{...t,type:"checkbox"}),X6="RadioGroup-module__root__ewZw-x",eS="RadioGroup-module__body__k8BJAs",tS="RadioGroup-module__legend__tcfV7q",va={root:X6,body:eS,legend:tS},Np=({children:t,className:e,label:n,onChange:r,value:i,...o})=>S.jsxs("div",{className:Se(va.root,e),...o,children:[n&&S.jsx("span",{className:va.legend,children:n}),S.jsx("div",{className:va.body,children:c.Children.map(t,s=>c.isValidElement(s)?c.cloneElement(s,{checked:!!(i!=null&&i[s.props.value]),onChange:a=>r==null?void 0:r({...i,[a.target.value]:a.target.checked})}):null)})]}),nS=({className:t,onChange:e})=>{const{t:n}=ln("receive_filter"),r=Vn(Fg);return S.jsxs(Np,{value:r,label:n("title"),className:t,onChange:e,children:[S.jsx(Ar,{name:"receive",value:Gt.DressingRoom,label:n("dressing_room")}),S.jsx(Ar,{name:"receive",value:Gt.CheckOrder,label:n("check_order")}),S.jsx(Ar,{name:"receive",value:Gt.PayByCash,label:n("pay_by_cash")})]})},rS=c.memo(nS),iS=({className:t,onChange:e})=>{const{t:n}=ln("send_filter"),r=Vn(Bg);return S.jsxs(Np,{className:t,value:r,label:n("title"),onChange:e,children:[S.jsx(Ar,{name:"send",value:Zt.Return,label:n("sending_returns")}),S.jsx(Ar,{name:"send",value:Zt.Shipping,label:n("shipping")}),S.jsx(Ar,{name:"send",value:Zt.Payment,label:n("payment")})]})},oS=c.memo(iS),sS="TypeFilter-module__root__WH5EQV",aS="TypeFilter-module__button__f0mSfo",Ho={root:sS,button:aS},lS=({className:t,onChange:e,value:n})=>{const{t:r}=ln("type_filter"),i=o=>()=>e==null?void 0:e(o);return S.jsxs("div",{className:Se(Ho.root,t),children:[S.jsx(Bt,{className:Ho.button,variant:n===gn.All?"primary":"secondary",onClick:i(gn.All),children:r("all")}),S.jsx(Bt,{className:Ho.button,variant:n===gn.PostOffice?"primary":"secondary",onClick:i(gn.PostOffice),children:r("post_office")}),S.jsx(Bt,{className:Ho.button,variant:n===gn.PickPoint?"primary":"secondary",onClick:i(gn.PickPoint),children:r("pick_point")})]})},uS=({className:t,onChange:e})=>{const n=Vn(Ng);return S.jsx(lS,{value:n,className:t,onChange:e})},cS=c.memo(uS),fS=({className:t})=>{const e=vr("screenSm"),n=Xr(l=>l.open),r=c.useCallback(l=>Vn.getState().setFilter({type:l}),[]),i=c.useCallback(l=>Vn.getState().setFilter({send:l}),[]),o=c.useCallback(l=>Vn.getState().setFilter({receive:l}),[]),s=c.useCallback(()=>Xr.getState().toggle(!1),[]),a=S.jsxs(S.Fragment,{children:[S.jsx(K6,{}),S.jsxs("div",{className:vn.withRightPadding,children:[S.jsx(cS,{className:vn.typeFilter,onChange:r}),S.jsx(ga,{className:vn.separator}),S.jsx(rS,{onChange:o}),S.jsx(ga,{}),S.jsx(oS,{onChange:i}),S.jsx(ga,{})]})]});return e?S.jsx(Uh,{initialFocusRef:!1,open:n,snapPoints:({maxHeight:l})=>l-Vh,onDismiss:s,children:S.jsx("div",{className:vn.sheetContent,children:a})}):S.jsx("div",{className:Se(vn.root,t,{[vn.open]:n}),children:a})},dS="App-module__map__Kf-2JS",hS="App-module__sidebar__ORIzGk",pS="App-module__header__bgP9DA",ma={map:dS,sidebar:hS,header:pS},gS=new n4,Bp=({config:t,options:e})=>{const n=_m(t),{INN:r,cityName:i,countryAbbreviation:o,hideFilters:s,hideHeader:a,locale:l,map:u,regionName:f}=n;yn(r,"INN is required"),Mm(r,e),yn(u==null?void 0:u.provider,"Map provider is required");const d=B5(u.provider);dm({cityName:i,countryAbbreviation:o,regionName:f});const h=ew({locale:l});return S.jsx($p,{baseColor:"#f3f3f3",highlightColor:"#ecebeb",children:S.jsx(a4,{client:gS,children:S.jsx(Gw,{children:S.jsx(Uf.Provider,{value:n,children:S.jsx(rw,{children:S.jsx(nw,{children:S.jsx(P0,{tolgee:Sp,fallback:S.jsx(Ns,{}),children:h&&S.jsx(h6,{children:S.jsx(xw,{children:S.jsxs(Ew,{children:[!a&&S.jsx(yw,{className:ma.header}),!s&&S.jsx(fS,{className:ma.sidebar}),S.jsx(N6,{className:ma.map,children:S.jsx(d,{})}),S.jsx(d6,{})]})})})})})})})})})})},Fp=async t=>Vi.request({baseURL:"https://api.geo-data.omnic.solutions/api/1.0/",method:"POST",url:"normalize/address",data:t,headers:{Authorization:"Token 9877f9631b2e30570cc1c5aa8c740b0c912efe99a8b6c45c21cf4bd394adc7e9"}}),Up=c.createContext(null);let ya=!1;const vS=({children:t})=>{const[e,n]=c.useState(),[r,i]=c.useState(),o=c.useRef(null),s=c.useRef(null),a=c.useCallback(u=>{if(ya){console.warn("Widget already launched");return}ya=!0,n(u)},[]);c.useEffect(()=>()=>{ya=!1},[]);const l=c.useMemo(()=>({widgetOutHolderRef:o,widgetLocationsRef:s,launchWidget:a,setDynamicConfig:i}),[a]);return S.jsxs(Up.Provider,{value:l,children:[S.jsx("div",{ref:o,style:{position:"fixed",left:"-9999px",top:"-9999px"},children:S.jsx("div",{ref:s,id:"@omnic/widget-locations",style:{height:"100%",width:"100%"},children:e&&S.jsx(Bp,{options:e.options,config:{...e.config,...r}})})}),t]})};function Vp(){const t=c.useContext(Up);if(!t)throw new Error("Please use hook useWidgetLocationsContext inside WidgetLocationsProvider");return t}const mS=t=>{const{setDynamicConfig:e,widgetLocationsRef:n,widgetOutHolderRef:r}=Vp(),i=c.useRef(null);return c.useEffect(()=>{t&&e(t)},[t,e]),c.useEffect(()=>{const o=r.current,s=n.current,a=i.current;return s&&a&&a.appendChild(s),()=>{s&&o&&o.appendChild(s)}},[n,r]),S.jsx("div",{ref:i,style:{width:"100%",height:"100%"}})};exports.EReceiveFilter=Gt;exports.ESendFilter=Zt;exports.ETypeFilter=gn;exports.MapPlaceholder=mS;exports.Widget=Bp;exports.WidgetLocationsProvider=vS;exports.createPointsIterator=_a;exports.fetchPointsRequest=xa;exports.fromHoursMinutesToMinutes=Ug;exports.fromMinutesToHoursMinutes=Vg;exports.getAddressFormGeocode=Pa;exports.getBoundsFromPoint=zg;exports.getCurrentPosition=Pl;exports.getNormalizedAddress=Fp;exports.getPropertyValue=md;exports.isCoordinates=Oa;exports.isDeliveryPoint=lm;exports.isHttpSuccess=vd;exports.isPlaceId=gd;exports.replaceSvgCurrentColor=Pr;exports.setWidgetCSSProperty=so;exports.stopImmediatePropagation=Ma;exports.svgStringToBase64URL=kl;exports.useWidgetLocationsContext=Vp;
|