@omnic/widget-locations 1.1.13 → 1.1.15
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 +1 -0
- package/dist/lib/components/LocationSelector/LocationSelector.utils.d.ts +1 -1
- package/dist/lib/style.css +1 -1
- package/dist/lib/types/config.d.ts +1 -0
- package/dist/lib/widget.cjs.js +22 -22
- package/dist/lib/widget.esm.js +4217 -4172
- package/package.json +32 -33
package/dist/lib/widget.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),u=require("react"),Qn=require("react-dom"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),u=require("react"),Qn=require("react-dom"),gd=require("react-dom/server");function xu(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 oe=xu(u),Cu=xu(Qn);var Jr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ns(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var vd=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 c=[n,r,i,o,s,a],f=0;l=new Error(e.replace(/%s/g,function(){return c[f++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},md=vd;const Wt=Ns(md);let Xr;const yd=new Uint8Array(16);function bd(){if(!Xr&&(Xr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Xr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xr(yd)}const Qe=[];for(let t=0;t<256;++t)Qe.push((t+256).toString(16).slice(1));function wd(t,e=0){return Qe[t[e+0]]+Qe[t[e+1]]+Qe[t[e+2]]+Qe[t[e+3]]+"-"+Qe[t[e+4]]+Qe[t[e+5]]+"-"+Qe[t[e+6]]+Qe[t[e+7]]+"-"+Qe[t[e+8]]+Qe[t[e+9]]+"-"+Qe[t[e+10]]+Qe[t[e+11]]+Qe[t[e+12]]+Qe[t[e+13]]+Qe[t[e+14]]+Qe[t[e+15]]}const Sd=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ua={randomUUID:Sd};function _u(t,e,n){if(ua.randomUUID&&!e&&!t)return ua.randomUUID();t=t||{};const r=t.random||(t.rng||bd)();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 wd(r)}const Ld=_u(),Mu=_u(),Ou=[48,66],Ed=[58,80],xd=6,qo=[49.3478969,14.0983344],ku="en",Cd=["places","geocoding"],bn={logo:"default",locale:ku,map:{provider:"google",center:qo,initialZoom:xd}},Pu=u.createContext(bn),tt=()=>u.useContext(Pu);var zt=(t=>(t[t.All=0]="All",t[t.PickPoint=20]="PickPoint",t[t.PostOffice=30]="PostOffice",t))(zt||{}),Ot=(t=>(t[t.PayByCash=0]="PayByCash",t[t.DressingRoom=1]="DressingRoom",t[t.CheckOrder=2]="CheckOrder",t))(Ot||{}),kt=(t=>(t[t.Return=0]="Return",t[t.Payment=1]="Payment",t[t.Shipping=2]="Shipping",t))(kt||{}),_d={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:"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA",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 ca=t=>{let e;const n=new Set,r=(f,d)=>{const p=typeof f=="function"?f(e):f;if(!Object.is(p,e)){const v=e;e=d??(typeof p!="object"||p===null)?p:Object.assign({},e,p),n.forEach(y=>y(e,v))}},i=()=>e,l={setState:r,getState:i,getInitialState:()=>c,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{(_d?"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()}},c=e=t(r,i,l);return l},Md=t=>t?ca(t):ca;var Ru={exports:{}},Tu={},Au={exports:{}},Du={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* use-sync-external-store-shim.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Gn=u;function
|
|
9
|
+
*/var Gn=u;function Od(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var kd=typeof Object.is=="function"?Object.is:Od,Pd=Gn.useState,Rd=Gn.useEffect,Td=Gn.useLayoutEffect,Ad=Gn.useDebugValue;function Dd(t,e){var n=e(),r=Pd({inst:{value:n,getSnapshot:e}}),i=r[0].inst,o=r[1];return Td(function(){i.value=n,i.getSnapshot=e,bo(i)&&o({inst:i})},[t,n,e]),Rd(function(){return bo(i)&&o({inst:i}),t(function(){bo(i)&&o({inst:i})})},[t]),Ad(n),n}function bo(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!kd(t,n)}catch{return!0}}function Id(t,e){return e()}var Nd=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Id:Dd;Du.useSyncExternalStore=Gn.useSyncExternalStore!==void 0?Gn.useSyncExternalStore:Nd;Au.exports=Du;var jd=Au.exports;/**
|
|
10
10
|
* @license React
|
|
11
11
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
12
12
|
*
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var no=u,jd=Nd;function Bd(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Ud=typeof Object.is=="function"?Object.is:Bd,Vd=jd.useSyncExternalStore,Fd=no.useRef,zd=no.useEffect,$d=no.useMemo,Hd=no.useDebugValue;Ru.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=Fd(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=$d(function(){function l(v){if(!c){if(c=!0,f=v,v=r(v),i!==void 0&&s.hasValue){var b=s.value;if(i(b,v))return d=b}return d=v}if(b=d,Ud(f,v))return b;var g=r(v);return i!==void 0&&i(b,g)?b:(f=v,d=g)}var c=!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=Vd(t,o[0],o[1]);return zd(function(){s.hasValue=!0,s.value=a},[a]),Hd(a),a};Pu.exports=Ru;var Wd=Pu.exports;const Gd=Ds(Wd);var Du={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_YMAP_KEY:"5298a725-4baa-457a-a2a7-c3abac81db20",VITE_GMAP_KEY:"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA",VITE_TOLGEE_API_URL:"https://tms.omnic.solutions",VITE_TOLGEE_API_KEY:"tgpak_gfpwentkga2g4zdngbzwozdinvztezlknu4xmnlpnbrgc",VITE_YMAPS_KEY:"5298a725-4baa-457a-a2a7-c3abac81db20",VITE_CJS_IGNORE_WARNING:"true",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:Zd}=u,{useSyncExternalStoreWithSelector:qd}=Gd;let fa=!1;const Kd=t=>t;function Jd(t,e=Kd,n){(Du?"production":void 0)!=="production"&&n&&!fa&&(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"),fa=!0);const r=qd(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return Zd(r),r}const da=t=>{(Du?"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"?_d(t):t,n=(r,i)=>Jd(e,r,i);return Object.assign(n,e),n},cn=t=>t?da(t):da,Yd={location:null},Is=t=>t.location,vt=cn()(t=>({...Yd,setDeliverPoint(e){t({location:e})}})),Xd={map:null,mode:"self_pickup",bounds:null,blurred:!1,loaded:!1,loading:!0,detailsOpen:!1},Iu=t=>t.map,Qd=t=>t.mode,eh=t=>t.bounds,th=t=>t.blurred,nh=t=>t.loaded,rh=t=>t.loading,Ns=t=>t.detailsOpen,xe=cn()(t=>({...Xd,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})}})),ih={location:null},oh=t=>t.location,Wt=cn()(t=>({...ih,setSelectedLocation(e){t({location:e})}})),sh={query:"",type:Ft.All,hours:["08:00","22:00"],send:{[kt.Return]:!1,[kt.Payment]:!1,[kt.Shipping]:!1},receive:{[Ot.PayByCash]:!1,[Ot.CheckOrder]:!1,[Ot.DressingRoom]:!1}},ah=t=>t.type,lh=t=>t.send,uh=t=>t.receive,ln=cn(t=>({...sh,setFilter(e){xe.getState().setDetailsOpen(!1),vt.getState().setDeliverPoint(null),Wt.getState().setSelectedLocation(null),t(e)}})),ch=t=>{const[e,n]=t.split(":");return Number(e)*60+Number(n)},fh=t=>{const e=Math.floor(t/60),n=t%60;return`${e<10?`0${e}`:e}:${n<10?`0${n}`:n}`},dh=(t,e)=>[[t[0]-e,t[0]+e],[t[1]-e,t[1]+e]];function Nu(t,e){return function(){return t.apply(e,arguments)}}const{toString:hh}=Object.prototype,{getPrototypeOf:js}=Object,ro=(t=>e=>{const n=hh.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),It=t=>(t=t.toLowerCase(),e=>ro(e)===t),io=t=>e=>typeof e===t,{isArray:er}=Array,Nr=io("undefined");function ph(t){return t!==null&&!Nr(t)&&t.constructor!==null&&!Nr(t.constructor)&&St(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const ju=It("ArrayBuffer");function gh(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&ju(t.buffer),e}const vh=io("string"),St=io("function"),Bu=io("number"),oo=t=>t!==null&&typeof t=="object",mh=t=>t===!0||t===!1,Ei=t=>{if(ro(t)!=="object")return!1;const e=js(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},yh=It("Date"),bh=It("File"),wh=It("Blob"),Sh=It("FileList"),Lh=t=>oo(t)&&St(t.pipe),Eh=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||St(t.append)&&((e=ro(t))==="formdata"||e==="object"&&St(t.toString)&&t.toString()==="[object FormData]"))},xh=It("URLSearchParams"),Ch=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Fr(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),er(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 Uu(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 Vu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Fu=t=>!Nr(t)&&t!==Vu;function Zo(){const{caseless:t}=Fu(this)&&this||{},e={},n=(r,i)=>{const o=t&&Uu(e,i)||i;Ei(e[o])&&Ei(r)?e[o]=Zo(e[o],r):Ei(r)?e[o]=Zo({},r):er(r)?e[o]=r.slice():e[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Fr(arguments[r],n);return e}const _h=(t,e,n,{allOwnKeys:r}={})=>(Fr(e,(i,o)=>{n&&St(i)?t[o]=Nu(i,n):t[o]=i},{allOwnKeys:r}),t),Mh=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Oh=(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)},kh=(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&&js(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Ph=(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},Rh=t=>{if(!t)return null;if(er(t))return t;let e=t.length;if(!Bu(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Th=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&js(Uint8Array)),Ah=(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])}},Dh=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Ih=It("HTMLFormElement"),Nh=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),ha=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),jh=It("RegExp"),zu=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Fr(n,(i,o)=>{let s;(s=e(i,o,t))!==!1&&(r[o]=s||i)}),Object.defineProperties(t,r)},Bh=t=>{zu(t,(e,n)=>{if(St(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(St(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+"'")})}})},Uh=(t,e)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return er(t)?r(t):r(String(t).split(e)),n},Vh=()=>{},Fh=(t,e)=>(t=+t,Number.isFinite(t)?t:e),yo="abcdefghijklmnopqrstuvwxyz",pa="0123456789",$u={DIGIT:pa,ALPHA:yo,ALPHA_DIGIT:yo+yo.toUpperCase()+pa},zh=(t=16,e=$u.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function $h(t){return!!(t&&St(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Hh=t=>{const e=new Array(10),n=(r,i)=>{if(oo(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const o=er(r)?[]:{};return Fr(r,(s,a)=>{const l=n(s,i+1);!Nr(l)&&(o[a]=l)}),e[i]=void 0,o}}return r};return n(t,0)},Wh=It("AsyncFunction"),Gh=t=>t&&(oo(t)||St(t))&&St(t.then)&&St(t.catch),T={isArray:er,isArrayBuffer:ju,isBuffer:ph,isFormData:Eh,isArrayBufferView:gh,isString:vh,isNumber:Bu,isBoolean:mh,isObject:oo,isPlainObject:Ei,isUndefined:Nr,isDate:yh,isFile:bh,isBlob:wh,isRegExp:jh,isFunction:St,isStream:Lh,isURLSearchParams:xh,isTypedArray:Th,isFileList:Sh,forEach:Fr,merge:Zo,extend:_h,trim:Ch,stripBOM:Mh,inherits:Oh,toFlatObject:kh,kindOf:ro,kindOfTest:It,endsWith:Ph,toArray:Rh,forEachEntry:Ah,matchAll:Dh,isHTMLForm:Ih,hasOwnProperty:ha,hasOwnProp:ha,reduceDescriptors:zu,freezeMethods:Bh,toObjectSet:Uh,toCamelCase:Nh,noop:Vh,toFiniteNumber:Fh,findKey:Uu,global:Vu,isContextDefined:Fu,ALPHABET:$u,generateString:zh,isSpecCompliantForm:$h,toJSONObject:Hh,isAsyncFn:Wh,isThenable:Gh};function ve(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)}T.inherits(ve,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:T.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Hu=ve.prototype,Wu={};["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=>{Wu[t]={value:t}});Object.defineProperties(ve,Wu);Object.defineProperty(Hu,"isAxiosError",{value:!0});ve.from=(t,e,n,r,i,o)=>{const s=Object.create(Hu);return T.toFlatObject(t,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),ve.call(s,t.message,e,n,r,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};const Zh=null;function qo(t){return T.isPlainObject(t)||T.isArray(t)}function Gu(t){return T.endsWith(t,"[]")?t.slice(0,-2):t}function ga(t,e,n){return t?t.concat(e).map(function(i,o){return i=Gu(i),!n&&o?"["+i+"]":i}).join(n?".":""):e}function qh(t){return T.isArray(t)&&!t.some(qo)}const Kh=T.toFlatObject(T,{},null,function(e){return/^is[A-Z]/.test(e)});function so(t,e,n){if(!T.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=T.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,S){return!T.isUndefined(S[g])});const r=n.metaTokens,i=n.visitor||f,o=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&T.isSpecCompliantForm(e);if(!T.isFunction(i))throw new TypeError("visitor must be a function");function c(b){if(b===null)return"";if(T.isDate(b))return b.toISOString();if(!l&&T.isBlob(b))throw new ve("Blob is not supported. Use a Buffer instead.");return T.isArrayBuffer(b)||T.isTypedArray(b)?l&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function f(b,g,S){let w=b;if(b&&!S&&typeof b=="object"){if(T.endsWith(g,"{}"))g=r?g:g.slice(0,-2),b=JSON.stringify(b);else if(T.isArray(b)&&qh(b)||(T.isFileList(b)||T.endsWith(g,"[]"))&&(w=T.toArray(b)))return g=Gu(g),w.forEach(function(y,_){!(T.isUndefined(y)||y===null)&&e.append(s===!0?ga([g],_,o):s===null?g:g+"[]",c(y))}),!1}return qo(b)?!0:(e.append(ga(S,g,o),c(b)),!1)}const d=[],h=Object.assign(Kh,{defaultVisitor:f,convertValue:c,isVisitable:qo});function v(b,g){if(!T.isUndefined(b)){if(d.indexOf(b)!==-1)throw Error("Circular reference detected in "+g.join("."));d.push(b),T.forEach(b,function(w,L){(!(T.isUndefined(w)||w===null)&&i.call(e,w,T.isString(L)?L.trim():L,g,h))===!0&&v(w,g?g.concat(L):[L])}),d.pop()}}if(!T.isObject(t))throw new TypeError("data must be an object");return v(t),e}function va(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function Bs(t,e){this._pairs=[],t&&so(t,this,e)}const Zu=Bs.prototype;Zu.append=function(e,n){this._pairs.push([e,n])};Zu.toString=function(e){const n=e?function(r){return e.call(this,r,va)}:va;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Jh(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function qu(t,e,n){if(!e)return t;const r=n&&n.encode||Jh,i=n&&n.serialize;let o;if(i?o=i(e,n):o=T.isURLSearchParams(e)?e.toString():new Bs(e,n).toString(r),o){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class Yh{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){T.forEach(this.handlers,function(r){r!==null&&e(r)})}}const ma=Yh,Ku={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Xh=typeof URLSearchParams<"u"?URLSearchParams:Bs,Qh=typeof FormData<"u"?FormData:null,ep=typeof Blob<"u"?Blob:null,tp={isBrowser:!0,classes:{URLSearchParams:Xh,FormData:Qh,Blob:ep},protocols:["http","https","file","blob","url","data"]},Ju=typeof window<"u"&&typeof document<"u",np=(t=>Ju&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),rp=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ip=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ju,hasStandardBrowserEnv:np,hasStandardBrowserWebWorkerEnv:rp},Symbol.toStringTag,{value:"Module"})),Tt={...ip,...tp};function op(t,e){return so(t,new Tt.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Tt.isNode&&T.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function sp(t){return T.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function ap(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 Yu(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&&T.isArray(i)?i.length:s,l?(T.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!T.isObject(i[s]))&&(i[s]=[]),e(n,r,i[s],o)&&T.isArray(i[s])&&(i[s]=ap(i[s])),!a)}if(T.isFormData(t)&&T.isFunction(t.entries)){const n={};return T.forEachEntry(t,(r,i)=>{e(sp(r),i,n,0)}),n}return null}function lp(t,e,n){if(T.isString(t))try{return(e||JSON.parse)(t),T.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const Us={transitional:Ku,adapter:["xhr","http"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=T.isObject(e);if(o&&T.isHTMLForm(e)&&(e=new FormData(e)),T.isFormData(e))return i?JSON.stringify(Yu(e)):e;if(T.isArrayBuffer(e)||T.isBuffer(e)||T.isStream(e)||T.isFile(e)||T.isBlob(e))return e;if(T.isArrayBufferView(e))return e.buffer;if(T.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 op(e,this.formSerializer).toString();if((a=T.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return so(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),lp(e)):e}],transformResponse:[function(e){const n=this.transitional||Us.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(e&&T.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"?ve.from(a,ve.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:Tt.classes.FormData,Blob:Tt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};T.forEach(["delete","get","head","post","put","patch"],t=>{Us.headers[t]={}});const Vs=Us,up=T.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"]),cp=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]&&up[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},ya=Symbol("internals");function lr(t){return t&&String(t).trim().toLowerCase()}function
|
|
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[ya]=this[ya]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=lr(s);r[a]||(pp(i,s),r[a]=!0)}return
|
|
17
|
+
*/var ro=u,Bd=jd;function Ud(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Vd=typeof Object.is=="function"?Object.is:Ud,Fd=Bd.useSyncExternalStore,zd=ro.useRef,$d=ro.useEffect,Hd=ro.useMemo,Wd=ro.useDebugValue;Tu.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=zd(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=Hd(function(){function l(v){if(!c){if(c=!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,Vd(f,v))return y;var g=r(v);return i!==void 0&&i(y,g)?y:(f=v,d=g)}var c=!1,f,d,p=n===void 0?null:n;return[function(){return l(e())},p===null?void 0:function(){return l(p())}]},[e,n,r,i]);var a=Fd(t,o[0],o[1]);return $d(function(){s.hasValue=!0,s.value=a},[a]),Wd(a),a};Ru.exports=Tu;var Gd=Ru.exports;const Zd=Ns(Gd);var Iu={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:"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA",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:qd}=u,{useSyncExternalStoreWithSelector:Kd}=Zd;let fa=!1;const Jd=t=>t;function Xd(t,e=Jd,n){(Iu?"production":void 0)!=="production"&&n&&!fa&&(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"),fa=!0);const r=Kd(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return qd(r),r}const da=t=>{(Iu?"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"?Md(t):t,n=(r,i)=>Xd(e,r,i);return Object.assign(n,e),n},cn=t=>t?da(t):da,Yd={location:null},js=t=>t.location,vt=cn()(t=>({...Yd,setDeliverPoint(e){t({location:e})}})),Qd={map:null,mode:"self_pickup",bounds:null,blurred:!1,loaded:!1,loading:!0,detailsOpen:!1},Nu=t=>t.map,eh=t=>t.mode,th=t=>t.bounds,nh=t=>t.blurred,rh=t=>t.loaded,ih=t=>t.loading,Bs=t=>t.detailsOpen,Le=cn()(t=>({...Qd,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})}})),oh={location:null},sh=t=>t.location,Gt=cn()(t=>({...oh,setSelectedLocation(e){t({location:e})}})),ah={query:"",type:zt.All,hours:["08:00","22:00"],send:{[kt.Return]:!1,[kt.Payment]:!1,[kt.Shipping]:!1},receive:{[Ot.PayByCash]:!1,[Ot.CheckOrder]:!1,[Ot.DressingRoom]:!1}},lh=t=>t.type,uh=t=>t.send,ch=t=>t.receive,ln=cn(t=>({...ah,setFilter(e){Le.getState().setDetailsOpen(!1),vt.getState().setDeliverPoint(null),Gt.getState().setSelectedLocation(null),t(e)}})),fh=t=>{const[e,n]=t.split(":");return Number(e)*60+Number(n)},dh=t=>{const e=Math.floor(t/60),n=t%60;return`${e<10?`0${e}`:e}:${n<10?`0${n}`:n}`},hh=(t,e)=>[[t[0]-e,t[0]+e],[t[1]-e,t[1]+e]];function ju(t,e){return function(){return t.apply(e,arguments)}}const{toString:ph}=Object.prototype,{getPrototypeOf:Us}=Object,io=(t=>e=>{const n=ph.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),It=t=>(t=t.toLowerCase(),e=>io(e)===t),oo=t=>e=>typeof e===t,{isArray:er}=Array,jr=oo("undefined");function gh(t){return t!==null&&!jr(t)&&t.constructor!==null&&!jr(t.constructor)&&St(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Bu=It("ArrayBuffer");function vh(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Bu(t.buffer),e}const mh=oo("string"),St=oo("function"),Uu=oo("number"),so=t=>t!==null&&typeof t=="object",yh=t=>t===!0||t===!1,xi=t=>{if(io(t)!=="object")return!1;const e=Us(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},bh=It("Date"),wh=It("File"),Sh=It("Blob"),Lh=It("FileList"),Eh=t=>so(t)&&St(t.pipe),xh=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||St(t.append)&&((e=io(t))==="formdata"||e==="object"&&St(t.toString)&&t.toString()==="[object FormData]"))},Ch=It("URLSearchParams"),_h=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function zr(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),er(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 Vu(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 Fu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,zu=t=>!jr(t)&&t!==Fu;function Ko(){const{caseless:t}=zu(this)&&this||{},e={},n=(r,i)=>{const o=t&&Vu(e,i)||i;xi(e[o])&&xi(r)?e[o]=Ko(e[o],r):xi(r)?e[o]=Ko({},r):er(r)?e[o]=r.slice():e[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&zr(arguments[r],n);return e}const Mh=(t,e,n,{allOwnKeys:r}={})=>(zr(e,(i,o)=>{n&&St(i)?t[o]=ju(i,n):t[o]=i},{allOwnKeys:r}),t),Oh=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),kh=(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)},Ph=(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&&Us(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Rh=(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},Th=t=>{if(!t)return null;if(er(t))return t;let e=t.length;if(!Uu(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Ah=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Us(Uint8Array)),Dh=(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])}},Ih=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Nh=It("HTMLFormElement"),jh=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),ha=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Bh=It("RegExp"),$u=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};zr(n,(i,o)=>{let s;(s=e(i,o,t))!==!1&&(r[o]=s||i)}),Object.defineProperties(t,r)},Uh=t=>{$u(t,(e,n)=>{if(St(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(St(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+"'")})}})},Vh=(t,e)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return er(t)?r(t):r(String(t).split(e)),n},Fh=()=>{},zh=(t,e)=>(t=+t,Number.isFinite(t)?t:e),wo="abcdefghijklmnopqrstuvwxyz",pa="0123456789",Hu={DIGIT:pa,ALPHA:wo,ALPHA_DIGIT:wo+wo.toUpperCase()+pa},$h=(t=16,e=Hu.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function Hh(t){return!!(t&&St(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Wh=t=>{const e=new Array(10),n=(r,i)=>{if(so(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const o=er(r)?[]:{};return zr(r,(s,a)=>{const l=n(s,i+1);!jr(l)&&(o[a]=l)}),e[i]=void 0,o}}return r};return n(t,0)},Gh=It("AsyncFunction"),Zh=t=>t&&(so(t)||St(t))&&St(t.then)&&St(t.catch),A={isArray:er,isArrayBuffer:Bu,isBuffer:gh,isFormData:xh,isArrayBufferView:vh,isString:mh,isNumber:Uu,isBoolean:yh,isObject:so,isPlainObject:xi,isUndefined:jr,isDate:bh,isFile:wh,isBlob:Sh,isRegExp:Bh,isFunction:St,isStream:Eh,isURLSearchParams:Ch,isTypedArray:Ah,isFileList:Lh,forEach:zr,merge:Ko,extend:Mh,trim:_h,stripBOM:Oh,inherits:kh,toFlatObject:Ph,kindOf:io,kindOfTest:It,endsWith:Rh,toArray:Th,forEachEntry:Dh,matchAll:Ih,isHTMLForm:Nh,hasOwnProperty:ha,hasOwnProp:ha,reduceDescriptors:$u,freezeMethods:Uh,toObjectSet:Vh,toCamelCase:jh,noop:Fh,toFiniteNumber:zh,findKey:Vu,global:Fu,isContextDefined:zu,ALPHABET:Hu,generateString:$h,isSpecCompliantForm:Hh,toJSONObject:Wh,isAsyncFn:Gh,isThenable:Zh};function ge(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(ge,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 Wu=ge.prototype,Gu={};["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=>{Gu[t]={value:t}});Object.defineProperties(ge,Gu);Object.defineProperty(Wu,"isAxiosError",{value:!0});ge.from=(t,e,n,r,i,o)=>{const s=Object.create(Wu);return A.toFlatObject(t,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),ge.call(s,t.message,e,n,r,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};const qh=null;function Jo(t){return A.isPlainObject(t)||A.isArray(t)}function Zu(t){return A.endsWith(t,"[]")?t.slice(0,-2):t}function ga(t,e,n){return t?t.concat(e).map(function(i,o){return i=Zu(i),!n&&o?"["+i+"]":i}).join(n?".":""):e}function Kh(t){return A.isArray(t)&&!t.some(Jo)}const Jh=A.toFlatObject(A,{},null,function(e){return/^is[A-Z]/.test(e)});function ao(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,S){return!A.isUndefined(S[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 c(y){if(y===null)return"";if(A.isDate(y))return y.toISOString();if(!l&&A.isBlob(y))throw new ge("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,S){let w=y;if(y&&!S&&typeof y=="object"){if(A.endsWith(g,"{}"))g=r?g:g.slice(0,-2),y=JSON.stringify(y);else if(A.isArray(y)&&Kh(y)||(A.isFileList(y)||A.endsWith(g,"[]"))&&(w=A.toArray(y)))return g=Zu(g),w.forEach(function(m,_){!(A.isUndefined(m)||m===null)&&e.append(s===!0?ga([g],_,o):s===null?g:g+"[]",c(m))}),!1}return Jo(y)?!0:(e.append(ga(S,g,o),c(y)),!1)}const d=[],p=Object.assign(Jh,{defaultVisitor:f,convertValue:c,isVisitable:Jo});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(w,L){(!(A.isUndefined(w)||w===null)&&i.call(e,w,A.isString(L)?L.trim():L,g,p))===!0&&v(w,g?g.concat(L):[L])}),d.pop()}}if(!A.isObject(t))throw new TypeError("data must be an object");return v(t),e}function va(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function Vs(t,e){this._pairs=[],t&&ao(t,this,e)}const qu=Vs.prototype;qu.append=function(e,n){this._pairs.push([e,n])};qu.toString=function(e){const n=e?function(r){return e.call(this,r,va)}:va;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Xh(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ku(t,e,n){if(!e)return t;const r=n&&n.encode||Xh,i=n&&n.serialize;let o;if(i?o=i(e,n):o=A.isURLSearchParams(e)?e.toString():new Vs(e,n).toString(r),o){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class ma{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 Ju={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Yh=typeof URLSearchParams<"u"?URLSearchParams:Vs,Qh=typeof FormData<"u"?FormData:null,ep=typeof Blob<"u"?Blob:null,tp={isBrowser:!0,classes:{URLSearchParams:Yh,FormData:Qh,Blob:ep},protocols:["http","https","file","blob","url","data"]},Xu=typeof window<"u"&&typeof document<"u",np=(t=>Xu&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),rp=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ip=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Xu,hasStandardBrowserEnv:np,hasStandardBrowserWebWorkerEnv:rp},Symbol.toStringTag,{value:"Module"})),Tt={...ip,...tp};function op(t,e){return ao(t,new Tt.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Tt.isNode&&A.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function sp(t){return A.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function ap(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 Yu(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]=ap(i[s])),!a)}if(A.isFormData(t)&&A.isFunction(t.entries)){const n={};return A.forEachEntry(t,(r,i)=>{e(sp(r),i,n,0)}),n}return null}function lp(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 Fs={transitional:Ju,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(Yu(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 op(e,this.formSerializer).toString();if((a=A.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return ao(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),lp(e)):e}],transformResponse:[function(e){const n=this.transitional||Fs.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"?ge.from(a,ge.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:Tt.classes.FormData,Blob:Tt.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=>{Fs.headers[t]={}});const zs=Fs,up=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"]),cp=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]&&up[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},ya=Symbol("internals");function lr(t){return t&&String(t).trim().toLowerCase()}function Ci(t){return t===!1||t==null?t:A.isArray(t)?t.map(Ci):String(t)}function fp(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 dp=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function So(t,e,n,r,i){if(A.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!A.isString(e)){if(A.isString(r))return e.indexOf(r)!==-1;if(A.isRegExp(r))return r.test(e)}}function hp(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function pp(t,e){const n=A.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 lo{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function o(a,l,c){const f=lr(l);if(!f)throw new Error("header name must be a non-empty string");const d=A.findKey(i,f);(!d||i[d]===void 0||c===!0||c===void 0&&i[d]!==!1)&&(i[d||l]=Ci(a))}const s=(a,l)=>A.forEach(a,(c,f)=>o(c,f,l));return A.isPlainObject(e)||e instanceof this.constructor?s(e,n):A.isString(e)&&(e=e.trim())&&!dp(e)?s(cp(e),n):e!=null&&o(n,e,r),this}get(e,n){if(e=lr(e),e){const r=A.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return fp(i);if(A.isFunction(n))return n.call(this,i,r);if(A.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=lr(e),e){const r=A.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||So(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function o(s){if(s=lr(s),s){const a=A.findKey(r,s);a&&(!n||So(r,r[a],a,n))&&(delete r[a],i=!0)}}return A.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||So(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const n=this,r={};return A.forEach(this,(i,o)=>{const s=A.findKey(r,o);if(s){n[s]=Ci(i),delete n[o];return}const a=e?hp(o):String(o).trim();a!==o&&delete n[o],n[a]=Ci(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return A.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&A.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[ya]=this[ya]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=lr(s);r[a]||(pp(i,s),r[a]=!0)}return A.isArray(e)?e.forEach(o):o(e),this}}lo.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);A.reduceDescriptors(lo.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});A.freezeMethods(lo);const Ht=lo;function Lo(t,e){const n=this||zs,r=e||n,i=Ht.from(r.headers);let o=r.data;return A.forEach(t,function(a){o=a.call(n,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function Qu(t){return!!(t&&t.__CANCEL__)}function $r(t,e,n){ge.call(this,t??"canceled",ge.ERR_CANCELED,e,n),this.name="CanceledError"}A.inherits($r,ge,{__CANCEL__:!0});function gp(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new ge("Request failed with status code "+n.status,[ge.ERR_BAD_REQUEST,ge.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const vp=Tt.hasStandardBrowserEnv?{write(t,e,n,r,i,o){const s=[t+"="+encodeURIComponent(e)];A.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),A.isString(r)&&s.push("path="+r),A.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 mp(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function yp(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function ec(t,e){return t&&!mp(e)?yp(t,e):e}const bp=Tt.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=A.isString(s)?i(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function wp(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Sp(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 c=Date.now(),f=r[o];s||(s=c),n[i]=l,r[i]=c;let d=o,p=0;for(;d!==i;)p+=n[d++],d=d%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),c-s<e)return;const v=f&&c-f;return v?Math.round(p*1e3/v):void 0}}function ba(t,e){let n=0;const r=Sp(50,250);return i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-n,l=r(a),c=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&&c?(s-o)/l:void 0,event:i};f[e?"download":"upload"]=!0,t(f)}}const Lp=typeof XMLHttpRequest<"u",Ep=Lp&&function(t){return new Promise(function(n,r){let i=t.data;const o=Ht.from(t.headers).normalize();let{responseType:s,withXSRFToken:a}=t,l;function c(){t.cancelToken&&t.cancelToken.unsubscribe(l),t.signal&&t.signal.removeEventListener("abort",l)}let f;if(A.isFormData(i)){if(Tt.hasStandardBrowserEnv||Tt.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((f=o.getContentType())!==!1){const[g,...S]=f?f.split(";").map(w=>w.trim()).filter(Boolean):[];o.setContentType([g||"multipart/form-data",...S].join("; "))}}let d=new XMLHttpRequest;if(t.auth){const g=t.auth.username||"",S=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(g+":"+S))}const p=ec(t.baseURL,t.url);d.open(t.method.toUpperCase(),Ku(p,t.params,t.paramsSerializer),!0),d.timeout=t.timeout;function v(){if(!d)return;const g=Ht.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),w={data:!s||s==="text"||s==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:g,config:t,request:d};gp(function(m){n(m),c()},function(m){r(m),c()},w),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 ge("Request aborted",ge.ECONNABORTED,t,d)),d=null)},d.onerror=function(){r(new ge("Network Error",ge.ERR_NETWORK,t,d)),d=null},d.ontimeout=function(){let S=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const w=t.transitional||Ju;t.timeoutErrorMessage&&(S=t.timeoutErrorMessage),r(new ge(S,w.clarifyTimeoutError?ge.ETIMEDOUT:ge.ECONNABORTED,t,d)),d=null},Tt.hasStandardBrowserEnv&&(a&&A.isFunction(a)&&(a=a(t)),a||a!==!1&&bp(p))){const g=t.xsrfHeaderName&&t.xsrfCookieName&&vp.read(t.xsrfCookieName);g&&o.set(t.xsrfHeaderName,g)}i===void 0&&o.setContentType(null),"setRequestHeader"in d&&A.forEach(o.toJSON(),function(S,w){d.setRequestHeader(w,S)}),A.isUndefined(t.withCredentials)||(d.withCredentials=!!t.withCredentials),s&&s!=="json"&&(d.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&d.addEventListener("progress",ba(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",ba(t.onUploadProgress)),(t.cancelToken||t.signal)&&(l=g=>{d&&(r(!g||g.type?new $r(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=wp(p);if(y&&Tt.protocols.indexOf(y)===-1){r(new ge("Unsupported protocol "+y+":",ge.ERR_BAD_REQUEST,t));return}d.send(i||null)})},Xo={http:qh,xhr:Ep};A.forEach(Xo,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const wa=t=>`- ${t}`,xp=t=>A.isFunction(t)||t===null||t===!1,tc={getAdapter:t=>{t=A.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,!xp(n)&&(r=Xo[(s=String(n)).toLowerCase()],r===void 0))throw new ge(`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
20
|
`+o.map(wa).join(`
|
|
21
|
-
`):" "+wa(o[0]):"as no adapter specified";throw new
|
|
22
|
-
`+o):r.stack=o}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Zn(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&
|
|
23
|
-
requestType: ${typeof p}, value: `+typeof m);return a(Object.assign(Object.assign(Object.assign({},s),E),{[p]:m}))}function y(p,m,E,k){var M={outputFormat:n.JSON};return m&&(M.key=m),E&&(M.language=E),k&&(M.region=k),L(e.ADDRESS,p,M)}function _(p,m,E,k){var M={outputFormat:n.JSON};return m&&(M.key=m),E&&(M.language=E),k&&(M.region=k),L(e.PLACE_ID,p,M)}function x(p,m,E,k,M,O){var P={outputFormat:n.JSON};return E&&(P.key=E),k&&(P.language=k),M&&(P.region=M),O&&(P.location_type=O),L(e.LATLNG,p+","+m,P)}t.setDefaults=l,t.setKey=c,t.setLanguage=f,t.setRegion=d,t.setComponents=h,t.setBounds=v,t.setResultType=b,t.setLocationType=g,t.setOutputFormat=S,t.enableAddressDescriptor=w,t.geocode=L,t.fromAddress=y,t.fromPlaceId=_,t.fromLatLng=x})(Bi);const ic=t=>typeof t=="string",ts=t=>Array.isArray(t)&&t.length===2;async function ns(t,e){var i;let n;if(ic(t))n=await Bi.fromPlaceId(t,"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA");else{const[o,s]=t;n=await Bi.fromLatLng(o,s,"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA",void 0,void 0,e==null?void 0:e.join("|"))}const r=(i=n.results)==null?void 0:i.map(o=>{var l,c;const s=(l=o.geometry)==null?void 0:l.viewport,a=(c=o.geometry)==null?void 0:c.location;return{...o,geometry:{...o.geometry,viewport:new google.maps.LatLngBounds(s.southwest,s.northeast),location:new google.maps.LatLng(a)}}});return{...n,results:r}}const $s=(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})},oc=t=>t.status===200,sc=t=>{const e=document.querySelector(rc);return e?getComputedStyle(e).getPropertyValue(t):null},Hs=t=>{const e=new Blob([t],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(e)},Vn=(t,e)=>t.replaceAll("currentColor",sc(e)||""),Dp=t=>"comment"in t&&"address"in t&&"apartment_number"in t&&"delivery_time"in t,Ip={points:[],error:!1,loaded:!1,loading:!1,reloading:!1},Np=t=>t.points,jp=t=>t.loaded,ac=t=>t.loading,On=cn()((t,e)=>({...Ip,async loadNext(n,r){const{reloading:i}=e();t({error:!1,reloading:!0}),xe.getState().setBounds(n);let o=0;try{await Qo(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=eh(xe.getState());t({error:!1,loading:!0});let o=0;try{await Qo(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})}}})),Bp=()=>{u.useEffect(()=>{On.getState().loadFirst(),console.debug("[OmnicWidgetLocations::pointsLoader]");const t=ln.subscribe(e=>{On.getState().loadFirst(e),console.debug("[OmnicWidgetLocations::filters]",e)});return()=>{t()}},[])},tn=".",Ws=Symbol("target"),lc=Symbol("unsubscribe");function rs(t){return t instanceof Date||t instanceof Set||t instanceof Map||t instanceof WeakSet||t instanceof WeakMap||ArrayBuffer.isView(t)}function Up(t){return(typeof t=="object"?t===null:typeof t!="function")||t instanceof RegExp}const at=Array.isArray;function Ui(t){return typeof t=="symbol"}const Vp={after(t,e){return at(t)?t.slice(e.length):e===""?t:t.slice(e.length+1)},concat(t,e){return at(t)?(t=[...t],e&&t.push(e),t):e&&e.toString!==void 0?(t!==""&&(t+=tn),Ui(e)?t+e.toString():t+e):t},initial(t){if(at(t))return t.slice(0,-1);if(t==="")return t;const e=t.lastIndexOf(tn);return e===-1?"":t.slice(0,e)},last(t){if(at(t))return t.at(-1)??"";if(t==="")return t;const e=t.lastIndexOf(tn);return e===-1?t:t.slice(e+1)},walk(t,e){if(at(t))for(const n of t)e(n);else if(t!==""){let n=0,r=t.indexOf(tn);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(tn,n)}},get(t,e){return this.walk(e,n=>{t&&(t=t[n])}),t},isSubPath(t,e){if(at(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]===tn:!1},isRootPath(t){return at(t)?t.length===0:t===""}},gt=Vp;function Fp(t){return typeof t=="object"&&typeof t.next=="function"}function zp(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[Ws].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 Ca(t,e,n){return t.isUnsubscribed||e.ignoreSymbols&&Ui(n)||e.ignoreUnderscores&&n.charAt(0)==="_"||"ignoreKeys"in e&&e.ignoreKeys.includes(n)}let $p=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,gt.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 is(t){return toString.call(t)==="[object Object]"}function Yr(){return!0}function Tn(t,e){return t.length!==e.length||t.some((n,r)=>e[r]!==n)}const uc=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Hp=new Set(["concat","includes","indexOf","join","keys","lastIndexOf"]),cc={push:Yr,pop:Yr,shift:Yr,unshift:Yr,copyWithin:Tn,reverse:Tn,sort:Tn,splice:Tn,flat:Tn,fill:Tn},Wp=new Set([...uc,...Hp,...Object.keys(cc)]);function Xr(t,e){if(t.size!==e.size)return!0;for(const n of t)if(!e.has(n))return!0;return!1}const fc=["keys","values","entries"],dc=new Set(["has","toString"]),hc={add:Xr,clear:Xr,delete:Xr,forEach:Xr},Gp=new Set([...dc,...Object.keys(hc),...fc]);function Qr(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 Zp=new Set([...dc,"get"]),pc={set:Qr,clear:Qr,delete:Qr,forEach:Qr},qp=new Set([...Zp,...Object.keys(pc),...fc]);class un{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 uc.has(e)}_shallowClone(e){let n=e;if(is(e))n={...e};else if(at(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?(at(i)?this._onIsChanged=cc[n]:i instanceof Set?this._onIsChanged=hc[n]:i instanceof Map&&(this._onIsChanged=pc[n]),i):r}update(e,n,r){const i=gt.after(e,this._path);if(n!=="length"){let o=this.clone;gt.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],gt.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 gt.isRootPath(this._path)||gt.isSubPath(e,this._path)}}class _a extends un{static isHandledMethod(e){return Wp.has(e)}}class Kp extends un{undo(e){e.setTime(this.clone.getTime())}isChanged(e,n){return!n(this.clone.valueOf(),e.valueOf())}}class Ma extends un{static isHandledMethod(e){return Gp.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 Oa extends un{static isHandledMethod(e){return qp.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 Jp extends un{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 Yp extends un{constructor(e,n,r,i){super(void 0,n,r,i),this._weakKey=r[0],this._weakHas=e.has(this._weakKey),this._weakValue=e.get(this._weakKey)}isChanged(e){return this._weakValue!==e.get(this._weakKey)}undo(e){const n=e.has(this._weakKey);this._weakHas&&!n?e.set(this._weakKey,this._weakValue):!this._weakHas&&n?e.delete(this._weakKey):this._weakValue!==e.get(this._weakKey)&&e.set(this._weakKey,this._weakValue)}}class Sn{constructor(e){this._stack=[],this._hasOnValidate=e}static isHandledType(e){return is(e)||at(e)||rs(e)}static isHandledMethod(e,n){return is(e)?un.isHandledMethod(n):at(e)?_a.isHandledMethod(n):e instanceof Set?Ma.isHandledMethod(n):e instanceof Map?Oa.isHandledMethod(n):rs(e)}get isCloning(){return this._stack.length>0}start(e,n,r){let i=un;at(e)?i=_a:e instanceof Date?i=Kp:e instanceof Set?i=Ma:e instanceof Map?i=Oa:e instanceof WeakSet?i=Jp:e instanceof WeakMap&&(i=Yp),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=Sn.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 Xp={equals:Object.is,isShallow:!1,pathAsArray:!1,ignoreSymbols:!1,ignoreUnderscores:!1,ignoreDetached:!1,details:!1},Gs=(t,e,n={})=>{n={...Xp,...n};const r=Symbol("ProxyTarget"),{equals:i,isShallow:o,ignoreDetached:s,details:a}=n,l=new $p(i),c=typeof n.onValidate=="function",f=new Sn(c),d=(y,_,x,p,m)=>!c||f.isCloning||n.onValidate(gt.concat(l.getPath(y),_),x,p,m)===!0,h=(y,_,x,p)=>{!Ca(l,n,_)&&!(s&&l.isDetached(y,t))&&v(l.getPath(y),_,x,p)},v=(y,_,x,p,m)=>{f.isCloning&&f.isPartOfClone(y)?f.update(y,_,p):e(gt.concat(y,_),x,p,m)},b=y=>y&&(y[r]??y),g=(y,_,x,p)=>{if(Up(y)||x==="constructor"||o&&!Sn.isHandledMethod(_,x)||Ca(l,n,x)||l.isGetInvariant(_,x)||s&&l.isDetached(_,t))return y;p===void 0&&(p=l.getPath(_));const m=gt.concat(p,x),E=l.getPath(y);return E&&S(m,E)?l.getProxy(y,E,w,r):l.getProxy(y,m,w,r)},S=(y,_)=>{if(Ui(y)||y.length<=_.length||at(_)&&_.length===0)return!1;const x=at(y)?y:y.split(tn),p=at(_)?_:_.split(tn);return x.length<=p.length?!1:!p.some((m,E)=>m!==x[E])},w={get(y,_,x){if(Ui(_)){if(_===r||_===Ws)return y;if(_===lc&&!l.isUnsubscribed&&l.getPath(y).length===0)return l.unsubscribe(),y}const p=rs(y)?Reflect.get(y,_):Reflect.get(y,_,x);return g(p,y,_)},set(y,_,x,p){x=b(x);const m=y[r]??y,E=m[_];if(i(E,x)&&_ in y)return!0;const k=d(y,_,x,E);return k&&l.setProperty(m,_,x,p,E)?(h(y,_,y[_],E),!0):!k},defineProperty(y,_,x){if(!l.isSameDescriptor(x,y,_)){const p=y[_];d(y,_,x.value,p)&&l.defineProperty(y,_,x,p)&&h(y,_,x.value,p)}return!0},deleteProperty(y,_){if(!Reflect.has(y,_))return!0;const x=Reflect.get(y,_),p=d(y,_,void 0,x);return p&&l.deleteProperty(y,_,x)?(h(y,_,void 0,x),!0):!p},apply(y,_,x){const p=_[r]??_;if(l.isUnsubscribed)return Reflect.apply(y,p,x);if((a===!1||a!==!0&&!a.includes(y.name))&&Sn.isHandledType(p)){let m=gt.initial(l.getPath(y));const E=Sn.isHandledMethod(p,y.name);f.start(p,m,x);let k=Reflect.apply(y,f.preferredThisArg(y,_,p),E?x.map(P=>b(P)):x);const M=f.isChanged(p,i),O=f.stop();if(Sn.isHandledType(k)&&E&&(_ instanceof Map&&y.name==="get"&&(m=gt.concat(m,x[0])),k=l.getProxy(k,m,w)),M){const P={name:y.name,args:x,result:k},A=f.isCloning?gt.initial(m):m,D=f.isCloning?gt.last(m):"";d(gt.get(t,A),D,p,O,P)?v(A,D,p,O,P):f.undo(p)}return(_ instanceof Map||_ instanceof Set)&&Fp(k)?zp(k,y,_,m,g):k}return Reflect.apply(y,_,x)}},L=l.getProxy(t,n.pathAsArray?[]:"",w);return e=e.bind(L),c&&(n.onValidate=n.onValidate.bind(L)),L};Gs.target=t=>(t==null?void 0:t[Ws])??t;Gs.unsubscribe=t=>(t==null?void 0:t[lc])??t;const Lo=Gs,Qp=t=>{const e=t??window.OMNIC_WIDGET_LOCATIONS_CONFIG,[n,r]=u.useState({...bn,...e,map:{...bn.map,...e==null?void 0:e.map},palette:{...bn.palette,...e==null?void 0:e.palette}}),i=t&&!window.OMNIC_WIDGET_LOCATIONS_CONFIG,o=!t&&window.OMNIC_WIDGET_LOCATIONS_CONFIG;return u.useEffect(()=>{if(!i)return;const s={...bn,...t,map:{...bn.map,...t.map},palette:{...bn.palette,...t.palette}};console.debug("[OmnicLocationsWidget::reactConfig]",s),r(s)},[t,i]),u.useEffect(()=>{if(o)return console.debug("[OmnicLocationsWidget::windowConfig]",n),window.OMNIC_WIDGET_LOCATIONS_CONFIG=Lo(window.OMNIC_WIDGET_LOCATIONS_CONFIG,function(){const s={...n,...Lo.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&&Lo.unsubscribe(window.OMNIC_WIDGET_LOCATIONS_CONFIG)}},[n,o]),n},eg=(t,e)=>{console.debug("[OmnicWidgetLocations::axios]",{INN:t,options:e}),jr.defaults.headers.get.Authorization=`INN ${t}`,e!=null&&e.baseURL&&(jr.defaults.baseURL=e.baseURL)};var gc={exports:{}};/*!
|
|
21
|
+
`):" "+wa(o[0]):"as no adapter specified";throw new ge("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:Xo};function Eo(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new $r(null,t)}function Sa(t){return Eo(t),t.headers=Ht.from(t.headers),t.data=Lo.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),tc.getAdapter(t.adapter||zs.adapter)(t).then(function(r){return Eo(t),r.data=Lo.call(t,t.transformResponse,r),r.headers=Ht.from(r.headers),r},function(r){return Qu(r)||(Eo(t),r&&r.response&&(r.response.data=Lo.call(t,t.transformResponse,r.response),r.response.headers=Ht.from(r.response.headers))),Promise.reject(r)})}const La=t=>t instanceof Ht?{...t}:t;function Zn(t,e){e=e||{};const n={};function r(c,f,d){return A.isPlainObject(c)&&A.isPlainObject(f)?A.merge.call({caseless:d},c,f):A.isPlainObject(f)?A.merge({},f):A.isArray(f)?f.slice():f}function i(c,f,d){if(A.isUndefined(f)){if(!A.isUndefined(c))return r(void 0,c,d)}else return r(c,f,d)}function o(c,f){if(!A.isUndefined(f))return r(void 0,f)}function s(c,f){if(A.isUndefined(f)){if(!A.isUndefined(c))return r(void 0,c)}else return r(void 0,f)}function a(c,f,d){if(d in e)return r(c,f);if(d in t)return r(void 0,c)}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:(c,f)=>i(La(c),La(f),!0)};return A.forEach(Object.keys(Object.assign({},t,e)),function(f){const d=l[f]||i,p=d(t[f],e[f],f);A.isUndefined(p)&&d!==a||(n[f]=p)}),n}const nc="1.6.8",$s={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{$s[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Ea={};$s.transitional=function(e,n,r){function i(o,s){return"[Axios v"+nc+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(e===!1)throw new ge(i(s," has been removed"+(n?" in "+n:"")),ge.ERR_DEPRECATED);return n&&!Ea[s]&&(Ea[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 Cp(t,e,n){if(typeof t!="object")throw new ge("options must be an object",ge.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 ge("option "+o+" must be "+l,ge.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ge("Unknown option "+o,ge.ERR_BAD_OPTION)}}const Yo={assertOptions:Cp,validators:$s},Jt=Yo.validators;class Bi{constructor(e){this.defaults=e,this.interceptors={request:new ma,response:new ma}}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=Zn(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Yo.assertOptions(r,{silentJSONParsing:Jt.transitional(Jt.boolean),forcedJSONParsing:Jt.transitional(Jt.boolean),clarifyTimeoutError:Jt.transitional(Jt.boolean)},!1),i!=null&&(A.isFunction(i)?n.paramsSerializer={serialize:i}:Yo.assertOptions(i,{encode:Jt.function,serialize:Jt.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&A.merge(o.common,o[n.method]);o&&A.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=Ht.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 c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let f,d=0,p;if(!l){const y=[Sa.bind(this),void 0];for(y.unshift.apply(y,a),y.push.apply(y,c),p=y.length,f=Promise.resolve(n);d<p;)f=f.then(y[d++],y[d++]);return f}p=a.length;let v=n;for(d=0;d<p;){const y=a[d++],g=a[d++];try{v=y(v)}catch(S){g.call(this,S);break}}try{f=Sa.call(this,v)}catch(y){return Promise.reject(y)}for(d=0,p=c.length;d<p;)f=f.then(c[d++],c[d++]);return f}getUri(e){e=Zn(this.defaults,e);const n=ec(e.baseURL,e.url);return Ku(n,e.params,e.paramsSerializer)}}A.forEach(["delete","get","head","options"],function(e){Bi.prototype[e]=function(n,r){return this.request(Zn(r||{},{method:e,url:n,data:(r||{}).data}))}});A.forEach(["post","put","patch"],function(e){function n(r){return function(o,s,a){return this.request(Zn(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}Bi.prototype[e]=n(),Bi.prototype[e+"Form"]=n(!0)});const _i=Bi;class Hs{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 $r(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 Hs(function(i){e=i}),cancel:e}}}const _p=Hs;function Mp(t){return function(n){return t.apply(null,n)}}function Op(t){return A.isObject(t)&&t.isAxiosError===!0}const Qo={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(Qo).forEach(([t,e])=>{Qo[e]=t});const kp=Qo;function rc(t){const e=new _i(t),n=ju(_i.prototype.request,e);return A.extend(n,_i.prototype,e,{allOwnKeys:!0}),A.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return rc(Zn(t,i))},n}const Ze=rc(zs);Ze.Axios=_i;Ze.CanceledError=$r;Ze.CancelToken=_p;Ze.isCancel=Qu;Ze.VERSION=nc;Ze.toFormData=ao;Ze.AxiosError=ge;Ze.Cancel=Ze.CanceledError;Ze.all=function(e){return Promise.all(e)};Ze.spread=Mp;Ze.isAxiosError=Op;Ze.mergeConfig=Zn;Ze.AxiosHeaders=Ht;Ze.formToJSON=t=>Yu(A.isHTMLForm(t)?new FormData(t):t);Ze.getAdapter=tc.getAdapter;Ze.HttpStatusCode=kp;Ze.default=Ze;const Br=Ze.create({baseURL:"https://ecomgate.omnic.solutions/api/1.0.0/type-1/public/"}),Pp=512,Rp={[Ot.CheckOrder]:["is_check_order","is_delivery"],[Ot.DressingRoom]:["is_dressing_room","is_delivery"],[Ot.PayByCash]:["pay_by_cash","pay_by_card","is_delivery"]},Tp={[kt.Return]:["is_pickup"],[kt.Shipping]:["is_pickup"],[kt.Payment]:["pay_by_cash","pay_by_card","is_pickup"]};async function*es({bounds:t,filter:e,q:n}={},{controller:r}={}){const i={status:30,page_size:Pp};if(n&&(i.q=n),e!=null&&e.type&&(i.type=e.type),e!=null&&e.receive)for(const[l,c]of Object.entries(e==null?void 0:e.receive)){if(!c)continue;const f=Rp[l];for(const d of f)i[d]=!0}if(e!=null&&e.send)for(const[l,c]of Object.entries(e==null?void 0:e.send)){if(!c)continue;const f=Tp[l];for(const d of f)i[d]=!0}t&&(i.start_latitude=t[0][0],i.end_latitude=t[0][1],i.start_longitude=t[1][0],i.end_longitude=t[1][1]);let o=await Br.get("/locations/points",{params:i,signal:r==null?void 0:r.signal}),s=o.data.data.num_pages,a=o.data.data.current_page;for(;a<s;){yield o,i.page=a+1;const l=await Br.get("/locations/points",{params:i,signal:r==null?void 0:r.signal});o.data.data.results=[...o.data.data.results,...l.data.data.results],o=l,a=l.data.data.current_page,s=l.data.data.num_pages}return yield o,o}const xa=[],ts=(t,e,n)=>{var i;const r=new AbortController;return t&&((i=xa.pop())==null||i.abort()),xa.push(r),async o=>{const s={controller:r};if(!n){const l=await es({filter:e},s).next();o(l.value.data);return}for await(const a of es({filter:e,bounds:n},s))o(a.data)}},ic=":root",uo=(t,e)=>{var n;(n=document.querySelector(ic))==null||n.style.setProperty(t,e)},ns=t=>{t.stopImmediatePropagation()};var Ui={};(function(t){var e,n,r=Jr&&Jr.__awaiter||function(h,b,x,k){return new(x=x||Promise)(function(M,P){function O(j){try{D(k.next(j))}catch(U){P(U)}}function R(j){try{D(k.throw(j))}catch(U){P(U)}}function D(j){var U;j.done?M(j.value):((U=j.value)instanceof x?U:new x(function(N){N(U)})).then(O,R)}D((k=k.apply(h,b||[])).next())})},i=Jr&&Jr.__rest||function(h,b){var x={};for(M in h)Object.prototype.hasOwnProperty.call(h,M)&&b.indexOf(M)<0&&(x[M]=h[M]);if(h!=null&&typeof Object.getOwnPropertySymbols=="function")for(var k=0,M=Object.getOwnPropertySymbols(h);k<M.length;k++)b.indexOf(M[k])<0&&Object.prototype.propertyIsEnumerable.call(h,M[k])&&(x[M[k]]=h[M[k]]);return x};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(h){h.ADDRESS="address",h.LATLNG="latlng",h.PLACE_ID="place_id"}(e=t.RequestType||(t.RequestType={})),function(h){h.XML="xml",h.JSON="json"}(n=t.OutputFormat||(t.OutputFormat={}));const o="https://maps.googleapis.com/maps/api/geocode";let s={outputFormat:n.JSON};function a(h){return r(this,void 0,void 0,function*(){var x=h.outputFormat,b=i(h,["outputFormat"]),b=new URLSearchParams(b).toString(),x=o+`/${x}?`+b;try{var k=yield(yield fetch(x)).json(),{status:M,error_message:P}=k;if(M==="OK")return k;throw new Error(`Geocoding failed: ${P}. Server returned status code ${M}.`)}catch(O){throw O instanceof Error?new Error("Geocoding request failed: "+O.message):new Error("Geocoding request failed with unknown error: "+O)}})}function l(h){s=Object.assign(Object.assign({},s),h)}function c(h){s.key=h}function f(h){s.language=h}function d(h){s.region=h}function p(h){s.components=h}function v(h){s.bounds=h}function y(h){s.result_type=h}function g(h){s.location_type=h}function S(h){s.outputFormat=h}function w(h){s.enable_address_descriptor=h}function L(h,b,x){if(typeof h!="string"||typeof b!="string")throw new Error(`Both requestType and value are required and must be of type string.
|
|
23
|
+
requestType: ${typeof h}, value: `+typeof b);return a(Object.assign(Object.assign(Object.assign({},s),x),{[h]:b}))}function m(h,b,x,k){var M={outputFormat:n.JSON};return b&&(M.key=b),x&&(M.language=x),k&&(M.region=k),L(e.ADDRESS,h,M)}function _(h,b,x,k){var M={outputFormat:n.JSON};return b&&(M.key=b),x&&(M.language=x),k&&(M.region=k),L(e.PLACE_ID,h,M)}function E(h,b,x,k,M,P){var O={outputFormat:n.JSON};return x&&(O.key=x),k&&(O.language=k),M&&(O.region=M),P&&(O.location_type=P),L(e.LATLNG,h+","+b,O)}t.setDefaults=l,t.setKey=c,t.setLanguage=f,t.setRegion=d,t.setComponents=p,t.setBounds=v,t.setResultType=y,t.setLocationType=g,t.setOutputFormat=S,t.enableAddressDescriptor=w,t.geocode=L,t.fromAddress=m,t.fromPlaceId=_,t.fromLatLng=E})(Ui);const oc=t=>typeof t=="string",rs=t=>Array.isArray(t)&&t.length===2;async function is(t,e){var i;let n;if(oc(t))n=await Ui.fromPlaceId(t,"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA");else{const[o,s]=t;n=await Ui.fromLatLng(o,s,"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA",void 0,void 0,e==null?void 0:e.join("|"))}const r=(i=n.results)==null?void 0:i.map(o=>{var l,c;const s=(l=o.geometry)==null?void 0:l.viewport,a=(c=o.geometry)==null?void 0:c.location;return{...o,geometry:{...o.geometry,viewport:new google.maps.LatLngBounds(s.southwest,s.northeast),location:new google.maps.LatLng(a)}}});return{...n,results:r}}const Ws=(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})},sc=t=>t.status===200,ac=t=>{const e=document.querySelector(ic);return e?getComputedStyle(e).getPropertyValue(t):null},Gs=t=>{const e=new Blob([t],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(e)},Vn=(t,e)=>t.replaceAll("currentColor",ac(e)||""),Ap=t=>"comment"in t&&"address"in t&&"apartment_number"in t&&"delivery_time"in t,Dp={points:[],error:!1,loaded:!1,loading:!1,reloading:!1},Ip=t=>t.points,Np=t=>t.loaded,lc=t=>t.loading,On=cn()((t,e)=>({...Dp,async loadNext(n,r){const{reloading:i}=e();t({error:!1,reloading:!0}),Le.getState().setBounds(n);let o=0;try{await ts(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=th(Le.getState());t({error:!1,loading:!0});let o=0;try{await ts(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})}}})),jp=()=>{u.useEffect(()=>{On.getState().loadFirst(),console.debug("[OmnicWidgetLocations::pointsLoader]");const t=ln.subscribe(e=>{On.getState().loadFirst(e),console.debug("[OmnicWidgetLocations::filters]",e)});return()=>{t()}},[])},tn=".",Zs=Symbol("target"),uc=Symbol("unsubscribe");function os(t){return t instanceof Date||t instanceof Set||t instanceof Map||t instanceof WeakSet||t instanceof WeakMap||ArrayBuffer.isView(t)}function Bp(t){return(typeof t=="object"?t===null:typeof t!="function")||t instanceof RegExp}const at=Array.isArray;function Vi(t){return typeof t=="symbol"}const gt={after(t,e){return at(t)?t.slice(e.length):e===""?t:t.slice(e.length+1)},concat(t,e){return at(t)?(t=[...t],e&&t.push(e),t):e&&e.toString!==void 0?(t!==""&&(t+=tn),Vi(e)?t+e.toString():t+e):t},initial(t){if(at(t))return t.slice(0,-1);if(t==="")return t;const e=t.lastIndexOf(tn);return e===-1?"":t.slice(0,e)},last(t){if(at(t))return t.at(-1)??"";if(t==="")return t;const e=t.lastIndexOf(tn);return e===-1?t:t.slice(e+1)},walk(t,e){if(at(t))for(const n of t)e(n);else if(t!==""){let n=0,r=t.indexOf(tn);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(tn,n)}},get(t,e){return this.walk(e,n=>{t&&(t=t[n])}),t},isSubPath(t,e){if(at(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]===tn:!1},isRootPath(t){return at(t)?t.length===0:t===""}};function Up(t){return typeof t=="object"&&typeof t.next=="function"}function Vp(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[Zs].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 Ca(t,e,n){return t.isUnsubscribed||e.ignoreSymbols&&Vi(n)||e.ignoreUnderscores&&n.charAt(0)==="_"||"ignoreKeys"in e&&e.ignoreKeys.includes(n)}let Fp=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,gt.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 ss(t){return toString.call(t)==="[object Object]"}function Yr(){return!0}function Tn(t,e){return t.length!==e.length||t.some((n,r)=>e[r]!==n)}const cc=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),zp=new Set(["concat","includes","indexOf","join","keys","lastIndexOf"]),fc={push:Yr,pop:Yr,shift:Yr,unshift:Yr,copyWithin:Tn,reverse:Tn,sort:Tn,splice:Tn,flat:Tn,fill:Tn},$p=new Set([...cc,...zp,...Object.keys(fc)]);function Qr(t,e){if(t.size!==e.size)return!0;for(const n of t)if(!e.has(n))return!0;return!1}const dc=["keys","values","entries"],hc=new Set(["has","toString"]),pc={add:Qr,clear:Qr,delete:Qr,forEach:Qr},Hp=new Set([...hc,...Object.keys(pc),...dc]);function ei(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 Wp=new Set([...hc,"get"]),gc={set:ei,clear:ei,delete:ei,forEach:ei},Gp=new Set([...Wp,...Object.keys(gc),...dc]);class un{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 cc.has(e)}_shallowClone(e){let n=e;if(ss(e))n={...e};else if(at(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?(at(i)?this._onIsChanged=fc[n]:i instanceof Set?this._onIsChanged=pc[n]:i instanceof Map&&(this._onIsChanged=gc[n]),i):r}update(e,n,r){const i=gt.after(e,this._path);if(n!=="length"){let o=this.clone;gt.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],gt.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 gt.isRootPath(this._path)||gt.isSubPath(e,this._path)}}class _a extends un{static isHandledMethod(e){return $p.has(e)}}class Zp extends un{undo(e){e.setTime(this.clone.getTime())}isChanged(e,n){return!n(this.clone.valueOf(),e.valueOf())}}class Ma extends un{static isHandledMethod(e){return Hp.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 Oa extends un{static isHandledMethod(e){return Gp.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 qp extends un{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 Kp extends un{constructor(e,n,r,i){super(void 0,n,r,i),this._weakKey=r[0],this._weakHas=e.has(this._weakKey),this._weakValue=e.get(this._weakKey)}isChanged(e){return this._weakValue!==e.get(this._weakKey)}undo(e){const n=e.has(this._weakKey);this._weakHas&&!n?e.set(this._weakKey,this._weakValue):!this._weakHas&&n?e.delete(this._weakKey):this._weakValue!==e.get(this._weakKey)&&e.set(this._weakKey,this._weakValue)}}class Sn{constructor(e){this._stack=[],this._hasOnValidate=e}static isHandledType(e){return ss(e)||at(e)||os(e)}static isHandledMethod(e,n){return ss(e)?un.isHandledMethod(n):at(e)?_a.isHandledMethod(n):e instanceof Set?Ma.isHandledMethod(n):e instanceof Map?Oa.isHandledMethod(n):os(e)}get isCloning(){return this._stack.length>0}start(e,n,r){let i=un;at(e)?i=_a:e instanceof Date?i=Zp:e instanceof Set?i=Ma:e instanceof Map?i=Oa:e instanceof WeakSet?i=qp:e instanceof WeakMap&&(i=Kp),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=Sn.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 Jp={equals:Object.is,isShallow:!1,pathAsArray:!1,ignoreSymbols:!1,ignoreUnderscores:!1,ignoreDetached:!1,details:!1},Cr=(t,e,n={})=>{n={...Jp,...n};const r=Symbol("ProxyTarget"),{equals:i,isShallow:o,ignoreDetached:s,details:a}=n,l=new Fp(i),c=typeof n.onValidate=="function",f=new Sn(c),d=(m,_,E,h,b)=>!c||f.isCloning||n.onValidate(gt.concat(l.getPath(m),_),E,h,b)===!0,p=(m,_,E,h)=>{!Ca(l,n,_)&&!(s&&l.isDetached(m,t))&&v(l.getPath(m),_,E,h)},v=(m,_,E,h,b)=>{f.isCloning&&f.isPartOfClone(m)?f.update(m,_,h):e(gt.concat(m,_),E,h,b)},y=m=>m&&(m[r]??m),g=(m,_,E,h)=>{if(Bp(m)||E==="constructor"||o&&!Sn.isHandledMethod(_,E)||Ca(l,n,E)||l.isGetInvariant(_,E)||s&&l.isDetached(_,t))return m;h===void 0&&(h=l.getPath(_));const b=gt.concat(h,E),x=l.getPath(m);return x&&S(b,x)?l.getProxy(m,x,w,r):l.getProxy(m,b,w,r)},S=(m,_)=>{if(Vi(m)||m.length<=_.length||at(_)&&_.length===0)return!1;const E=at(m)?m:m.split(tn),h=at(_)?_:_.split(tn);return E.length<=h.length?!1:!h.some((b,x)=>b!==E[x])},w={get(m,_,E){if(Vi(_)){if(_===r||_===Zs)return m;if(_===uc&&!l.isUnsubscribed&&l.getPath(m).length===0)return l.unsubscribe(),m}const h=os(m)?Reflect.get(m,_):Reflect.get(m,_,E);return g(h,m,_)},set(m,_,E,h){E=y(E);const b=m[r]??m,x=b[_];if(i(x,E)&&_ in m)return!0;const k=d(m,_,E,x);return k&&l.setProperty(b,_,E,h,x)?(p(m,_,m[_],x),!0):!k},defineProperty(m,_,E){if(!l.isSameDescriptor(E,m,_)){const h=m[_];d(m,_,E.value,h)&&l.defineProperty(m,_,E,h)&&p(m,_,E.value,h)}return!0},deleteProperty(m,_){if(!Reflect.has(m,_))return!0;const E=Reflect.get(m,_),h=d(m,_,void 0,E);return h&&l.deleteProperty(m,_,E)?(p(m,_,void 0,E),!0):!h},apply(m,_,E){const h=_[r]??_;if(l.isUnsubscribed)return Reflect.apply(m,h,E);if((a===!1||a!==!0&&!a.includes(m.name))&&Sn.isHandledType(h)){let b=gt.initial(l.getPath(m));const x=Sn.isHandledMethod(h,m.name);f.start(h,b,E);let k=Reflect.apply(m,f.preferredThisArg(m,_,h),x?E.map(O=>y(O)):E);const M=f.isChanged(h,i),P=f.stop();if(Sn.isHandledType(k)&&x&&(_ instanceof Map&&m.name==="get"&&(b=gt.concat(b,E[0])),k=l.getProxy(k,b,w)),M){const O={name:m.name,args:E,result:k},R=f.isCloning?gt.initial(b):b,D=f.isCloning?gt.last(b):"";d(gt.get(t,R),D,h,P,O)?v(R,D,h,P,O):f.undo(h)}return(_ instanceof Map||_ instanceof Set)&&Up(k)?Vp(k,m,_,b,g):k}return Reflect.apply(m,_,E)}},L=l.getProxy(t,n.pathAsArray?[]:"",w);return e=e.bind(L),c&&(n.onValidate=n.onValidate.bind(L)),L};Cr.target=t=>(t==null?void 0:t[Zs])??t;Cr.unsubscribe=t=>(t==null?void 0:t[uc])??t;const Xp=t=>{const e=t??window.OMNIC_WIDGET_LOCATIONS_CONFIG,[n,r]=u.useState({...bn,...e,map:{...bn.map,...e==null?void 0:e.map},palette:{...bn.palette,...e==null?void 0:e.palette}}),i=t&&!window.OMNIC_WIDGET_LOCATIONS_CONFIG,o=!t&&window.OMNIC_WIDGET_LOCATIONS_CONFIG;return u.useEffect(()=>{if(!i)return;const s={...bn,...t,map:{...bn.map,...t.map},palette:{...bn.palette,...t.palette}};console.debug("[OmnicLocationsWidget::reactConfig]",s),r(s)},[t,i]),u.useEffect(()=>{if(o)return console.debug("[OmnicLocationsWidget::windowConfig]",n),window.OMNIC_WIDGET_LOCATIONS_CONFIG=Cr(window.OMNIC_WIDGET_LOCATIONS_CONFIG,function(){const s={...n,...Cr.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&&Cr.unsubscribe(window.OMNIC_WIDGET_LOCATIONS_CONFIG)}},[n,o]),n},Yp=(t,e)=>{console.debug("[OmnicWidgetLocations::axios]",{INN:t,options:e}),Br.defaults.headers.get.Authorization=`INN ${t}`,e!=null&&e.baseURL&&(Br.defaults.baseURL=e.baseURL)};var vc={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})()})(
|
|
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})()})(vc);var Qp=vc.exports;const ve=Ns(Qp),eg={place:null},mc=t=>t.place,tg=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"))},Dt=cn((t,e)=>({...eg,async setPlace(n,r,i){var l,c,f,d,p,v;const{map:o}=Le.getState();let s;if(console.debug("[OmnicWidgetLocations::setDeliveryAdressPlace]",{value:n,types:r}),rs(n)){const y=await is(n,r);s=(l=y==null?void 0:y.results)==null?void 0:l[0],i&&(s=(c=y==null?void 0:y.results)==null?void 0:c.find(g=>{var S;return(S=g.types)==null?void 0:S.includes(i)}))}else s=n;Wt(s,"Place is not defined");let a;if(s!=null&&s.place_id){const{results:y}=await is(s.place_id);a=(d=(f=y==null?void 0:y[0])==null?void 0:f.geometry)==null?void 0:d.viewport}else(p=s==null?void 0:s.geometry)!=null&&p.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 l;const i=rs(n)?await e().setPlace(n,r):await e().setPlace(n),o=(l=i.geometry)==null?void 0:l.location;Wt(o,"Location is not defined");const s=[o.lat(),o.lng()],a={address:i.formatted_address,coords:s};return vt.getState().setDeliverPoint(a),i}})),ng="Overlay-module__root__3qTsUC",rg={root:ng},yc=({children:t,className:e})=>C.jsx("div",{className:ve(rg.root,e),children:t}),ig="Spinner-module__loader__U4GVhD",og={loader:ig},Fi=({className:t})=>C.jsx("div",{className:ve(og.loader,t),children:"Loading..."});/*! *****************************************************************************
|
|
28
28
|
Copyright (c) Microsoft Corporation.
|
|
29
29
|
|
|
30
30
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -37,15 +37,15 @@ 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
|
|
40
|
+
***************************************************************************** */var as=function(t,e){return as=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])},as(t,e)};function Ie(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");as(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var G=function(){return G=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},G.apply(this,arguments)};function qs(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 sg(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{c(r.next(f))}catch(d){s(d)}}function l(f){try{c(r.throw(f))}catch(d){s(d)}}function c(f){f.done?o(f.value):i(f.value).then(a,l)}c((r=r.apply(t,e||[])).next())})}function ag(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(c){return function(f){return l([c,f])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(f){c=[6,f],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function bc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var lg=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 c=[n,r,i,o,s,a],f=0;l=new Error(e.replace(/%s/g,function(){return c[f++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},ug=lg,We=bc(ug),ie=u.createContext(null);function cg(){We(!!u.useContext,"useGoogleMap is React hook and requires React version 16.8+");var t=u.useContext(ie);return We(!!t,"useGoogleMap needs a GoogleMap available up in the tree"),t}function fg(t,e,n){return Object.keys(t).reduce(function(i,o){return e(i,t[o],o)},n)}function dg(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}function hg(t,e,n,r){var i={},o=function(s,a){var l=n[a];l!==e[a]&&(i[a]=l,s(r,l))};return dg(t,o),i}function pg(t,e,n){var r=fg(n,function(o,s,a){return typeof t[a]=="function"&&o.push(google.maps.event.addListener(e,s,t[a])),o},[]);return r}function gg(t){google.maps.event.removeListener(t)}function ce(t){t===void 0&&(t=[]),t.forEach(gg)}function ae(t){var e=t.updaterMap,n=t.eventMap,r=t.prevProps,i=t.nextProps,o=t.instance,s=pg(i,o,n);return hg(e,r,i,o),s}var ka={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"},Pa={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 vg(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,c=t.onDrag,f=t.onDragEnd,d=t.onDragStart,p=t.onMouseMove,v=t.onMouseOut,y=t.onMouseOver,g=t.onMouseDown,S=t.onMouseUp,w=t.onRightClick,L=t.onCenterChanged,m=t.onLoad,_=t.onUnmount,E=u.useState(null),h=E[0],b=E[1],x=u.useRef(null),k=u.useState(null),M=k[0],P=k[1],O=u.useState(null),R=O[0],D=O[1],j=u.useState(null),U=j[0],N=j[1],V=u.useState(null),q=V[0],$=V[1],F=u.useState(null),Z=F[0],te=F[1],X=u.useState(null),J=X[0],T=X[1],fe=u.useState(null),xe=fe[0],H=fe[1],Oe=u.useState(null),ke=Oe[0],se=Oe[1],we=u.useState(null),Ne=we[0],pe=we[1],Se=u.useState(null),Pe=Se[0],Ce=Se[1],Re=u.useState(null),ee=Re[0],Ve=Re[1],Q=u.useState(null),qe=Q[0],W=Q[1];return u.useEffect(function(){n&&h!==null&&h.setOptions(n)},[h,n]),u.useEffect(function(){h!==null&&typeof s<"u"&&h.setCenter(s)},[h,s]),u.useEffect(function(){h&&l&&(R!==null&&google.maps.event.removeListener(R),D(google.maps.event.addListener(h,"dblclick",l)))},[l]),u.useEffect(function(){h&&f&&(U!==null&&google.maps.event.removeListener(U),N(google.maps.event.addListener(h,"dragend",f)))},[f]),u.useEffect(function(){h&&d&&(q!==null&&google.maps.event.removeListener(q),$(google.maps.event.addListener(h,"dragstart",d)))},[d]),u.useEffect(function(){h&&g&&(Z!==null&&google.maps.event.removeListener(Z),te(google.maps.event.addListener(h,"mousedown",g)))},[g]),u.useEffect(function(){h&&p&&(J!==null&&google.maps.event.removeListener(J),T(google.maps.event.addListener(h,"mousemove",p)))},[p]),u.useEffect(function(){h&&v&&(xe!==null&&google.maps.event.removeListener(xe),H(google.maps.event.addListener(h,"mouseout",v)))},[v]),u.useEffect(function(){h&&y&&(ke!==null&&google.maps.event.removeListener(ke),se(google.maps.event.addListener(h,"mouseover",y)))},[y]),u.useEffect(function(){h&&S&&(Ne!==null&&google.maps.event.removeListener(Ne),pe(google.maps.event.addListener(h,"mouseup",S)))},[S]),u.useEffect(function(){h&&w&&(Pe!==null&&google.maps.event.removeListener(Pe),Ce(google.maps.event.addListener(h,"rightclick",w)))},[w]),u.useEffect(function(){h&&a&&(ee!==null&&google.maps.event.removeListener(ee),Ve(google.maps.event.addListener(h,"click",a)))},[a]),u.useEffect(function(){h&&c&&(qe!==null&&google.maps.event.removeListener(qe),W(google.maps.event.addListener(h,"drag",c)))},[c]),u.useEffect(function(){h&&L&&(M!==null&&google.maps.event.removeListener(M),P(google.maps.event.addListener(h,"center_changed",L)))},[a]),u.useEffect(function(){var Fe=x.current===null?null:new google.maps.Map(x.current,n);return b(Fe),Fe!==null&&m&&m(Fe),function(){Fe!==null&&_&&_(Fe)}},[]),C.jsx("div",{id:r,ref:x,style:i,className:o,children:C.jsx(ie.Provider,{value:h,children:h!==null?e:null})})}u.memo(vg);var mg=function(t){Ie(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=ae({updaterMap:Pa,eventMap:ka,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{map:n}},this.setMapCallback)},e.prototype.componentDidUpdate=function(n){this.state.map!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:Pa,eventMap:ka,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),ce(this.registeredEvents))},e.prototype.render=function(){return C.jsx("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName,children:C.jsx(ie.Provider,{value:this.state.map,children:this.state.map!==null?this.props.children:null})})},e}(u.PureComponent),En=typeof document<"u";function wc(t){var e=t.url,n=t.id,r=t.nonce;return En?new Promise(function(o,s){var a=document.getElementById(n),l=window;if(a){var c=a.getAttribute("data-state");if(a.src===e&&c!=="error"){if(c==="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 p=document.createElement("script");p.type="text/javascript",p.src=e,p.id=n,p.async=!0,p.nonce=r||"",p.onerror=function(y){p.setAttribute("data-state","error"),s(y)},l.initMap=function(){p.setAttribute("data-state","ready"),o(n)},document.head.appendChild(p)}).catch(function(i){throw console.error("injectScript error: ",i),i}):Promise.reject(new Error("document is undefined"))}function Ra(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
|
|
41
41
|
`,"").indexOf(".gm-style")===0?(t.styleSheet.cssText="",!0):t.tagName.toLowerCase()==="style"&&t.innerHTML&&t.innerHTML.replace(`\r
|
|
42
|
-
`,"").indexOf(".gm-style")===0?(t.innerHTML="",!0):t.tagName.toLowerCase()==="style"&&!t.styleSheet&&!t.innerHTML}function
|
|
42
|
+
`,"").indexOf(".gm-style")===0?(t.innerHTML="",!0):t.tagName.toLowerCase()==="style"&&!t.styleSheet&&!t.innerHTML}function Sc(){var t=document.getElementsByTagName("head")[0];if(t){var e=t.insertBefore.bind(t);t.insertBefore=function(i,o){return Ra(i)||Reflect.apply(e,t,[i,o]),i};var n=t.appendChild.bind(t);t.appendChild=function(i){return Ra(i)||Reflect.apply(n,t,[i]),i}}}function Lc(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,c=t.mapIds,f=t.authReferrerPolicy,d=[];return We(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)),c&&c.length&&d.push("map_ids=".concat(c.join(","))),f&&d.push("auth_referrer_policy=".concat(f)),d.push("callback=initMap"),"https://maps.googleapis.com/maps/api/js?".concat(d.join("&"))}var ur=!1;function Ec(){return C.jsx("div",{children:"Loading..."})}var ls={id:"script-loader",version:"weekly"};(function(t){Ie(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.check=u.createRef(),n.state={loaded:!1},n.cleanupCallback=function(){delete window.google.maps,n.injectScript()},n.isCleaningUp=function(){return sg(n,void 0,void 0,function(){function r(i){if(!ur)i();else if(En)var o=window.setInterval(function(){ur||(window.clearInterval(o),i())},1)}return ag(this,function(i){return[2,new Promise(r)]})})},n.cleanup=function(){ur=!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&&Sc(),We(!!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:Lc(n.props)};wc(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(`
|
|
43
43
|
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 />
|
|
44
44
|
Otherwise it is a Network issue.
|
|
45
|
-
`))})},n}return e.prototype.componentDidMount=function(){if(En){if(window.google&&window.google.maps&&!ur){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"),En&&n.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))},e.prototype.componentWillUnmount=function(){var n=this;if(En){this.cleanup();var r=function(){n.check.current||(delete window.google,ur=!1)};window.setTimeout(r,1),this.props.onUnmount&&this.props.onUnmount()}},e.prototype.render=function(){return C.jsxs(C.Fragment,{children:[C.jsx("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||C.jsx(
|
|
45
|
+
`))})},n}return e.prototype.componentDidMount=function(){if(En){if(window.google&&window.google.maps&&!ur){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"),En&&n.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))},e.prototype.componentWillUnmount=function(){var n=this;if(En){this.cleanup();var r=function(){n.check.current||(delete window.google,ur=!1)};window.setTimeout(r,1),this.props.onUnmount&&this.props.onUnmount()}},e.prototype.render=function(){return C.jsxs(C.Fragment,{children:[C.jsx("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||C.jsx(Ec,{})]})},e.defaultProps=ls,e})(u.PureComponent);var Ta;function xc(t){var e=t.id,n=e===void 0?ls.id:e,r=t.version,i=r===void 0?ls.version:r,o=t.nonce,s=t.googleMapsApiKey,a=t.googleMapsClientId,l=t.language,c=t.region,f=t.libraries,d=t.preventGoogleFontsLoading,p=t.channel,v=t.mapIds,y=t.authReferrerPolicy,g=u.useRef(!1),S=u.useState(!1),w=S[0],L=S[1],m=u.useState(void 0),_=m[0],E=m[1];u.useEffect(function(){return g.current=!0,function(){g.current=!1}},[]),u.useEffect(function(){En&&d&&Sc()},[d]),u.useEffect(function(){w&&We(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")},[w]);var h=Lc({version:i,googleMapsApiKey:s,googleMapsClientId:a,language:l,region:c,libraries:f,channel:p,mapIds:v,authReferrerPolicy:y});u.useEffect(function(){if(!En)return;function k(){g.current&&(L(!0),Ta=h)}if(window.google&&window.google.maps&&Ta===h){k();return}wc({id:n,url:h,nonce:o}).then(k).catch(function(P){g.current&&E(P),console.warn(`
|
|
46
46
|
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||"-",`)
|
|
47
47
|
Otherwise it is a Network issue.
|
|
48
|
-
`)),console.error(O)})},[n,p,o]);var m=u.useRef();return u.useEffect(function(){m.current&&f!==m.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"),m.current=f},[f]),{isLoaded:w,loadError:_,url:p}}var wg=C.jsx(Lc,{});function Sg(t){var e=t.loadingElement,n=t.onLoad,r=t.onError,i=t.onUnmount,o=t.children,s=Zs(t,["loadingElement","onLoad","onError","onUnmount","children"]),a=Ec(s),l=a.isLoaded,c=a.loadError;return u.useEffect(function(){l&&typeof n=="function"&&n()},[l,n]),u.useEffect(function(){c&&typeof r=="function"&&r(c)},[c,r]),u.useEffect(function(){return function(){i&&i()}},[i]),l?o:e||wg}u.memo(Sg);var Aa;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(Aa||(Aa={}));var Da={},Ia={options:function(t,e){t.setOptions(e)}};function Lg(t){var e=t.options,n=t.onLoad,r=t.onUnmount,i=u.useContext(re),o=u.useState(null),s=o[0],a=o[1];return u.useEffect(function(){s!==null&&s.setMap(i)},[i]),u.useEffect(function(){e&&s!==null&&s.setOptions(e)},[s,e]),u.useEffect(function(){var l=new google.maps.TrafficLayer(Z(Z({},e||{}),{map:i}));return a(l),n&&n(l),function(){s!==null&&(r&&r(s),s.setMap(null))}},[]),null}u.memo(Lg);(function(t){Ie(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(Z(Z({},this.props.options||{}),{map:this.context}));this.registeredEvents=se({updaterMap:Ia,eventMap:Da,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{trafficLayer:n}},this.setTrafficLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.trafficLayer!==null&&(ue(this.registeredEvents),this.registeredEvents=se({updaterMap:Ia,eventMap:Da,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),ue(this.registeredEvents),this.state.trafficLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=re,e})(u.PureComponent);function Eg(t){var e=t.onLoad,n=t.onUnmount,r=u.useContext(re),i=u.useState(null),o=i[0],s=i[1];return u.useEffect(function(){o!==null&&o.setMap(r)},[r]),u.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}u.memo(Eg);(function(t){Ie(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=re,e})(u.PureComponent);function xg(t){var e=t.onLoad,n=t.onUnmount,r=u.useContext(re),i=u.useState(null),o=i[0],s=i[1];return u.useEffect(function(){o!==null&&o.setMap(r)},[r]),u.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}u.memo(xg);(function(t){Ie(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=re,e})(u.PureComponent);var Na={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},ja={drawingMode:function(t,e){t.setDrawingMode(e)},options:function(t,e){t.setOptions(e)}};function Cg(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,c=t.onLoad,f=t.onUnmount,d=u.useContext(re),h=u.useState(null),v=h[0],b=h[1],g=u.useState(null),S=g[0],w=g[1],L=u.useState(null),y=L[0],_=L[1],x=u.useState(null),p=x[0],m=x[1],E=u.useState(null),k=E[0],M=E[1],O=u.useState(null),P=O[0],A=O[1],D=u.useState(null),j=D[0],U=D[1];return u.useEffect(function(){v!==null&&v.setMap(d)},[d]),u.useEffect(function(){e&&v!==null&&v.setOptions(e)},[v,e]),u.useEffect(function(){v!==null&&v.setDrawingMode(n??null)},[v,n]),u.useEffect(function(){v&&r&&(S!==null&&google.maps.event.removeListener(S),w(google.maps.event.addListener(v,"circlecomplete",r)))},[v,r]),u.useEffect(function(){v&&i&&(y!==null&&google.maps.event.removeListener(y),_(google.maps.event.addListener(v,"markercomplete",i)))},[v,i]),u.useEffect(function(){v&&o&&(p!==null&&google.maps.event.removeListener(p),m(google.maps.event.addListener(v,"overlaycomplete",o)))},[v,o]),u.useEffect(function(){v&&s&&(k!==null&&google.maps.event.removeListener(k),M(google.maps.event.addListener(v,"polygoncomplete",s)))},[v,s]),u.useEffect(function(){v&&a&&(P!==null&&google.maps.event.removeListener(P),A(google.maps.event.addListener(v,"polylinecomplete",a)))},[v,a]),u.useEffect(function(){v&&l&&(j!==null&&google.maps.event.removeListener(j),U(google.maps.event.addListener(v,"rectanglecomplete",l)))},[v,l]),u.useEffect(function(){We(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var N=new google.maps.drawing.DrawingManager(Z(Z({},e||{}),{map:d}));return n&&N.setDrawingMode(n),r&&w(google.maps.event.addListener(N,"circlecomplete",r)),i&&_(google.maps.event.addListener(N,"markercomplete",i)),o&&m(google.maps.event.addListener(N,"overlaycomplete",o)),s&&M(google.maps.event.addListener(N,"polygoncomplete",s)),a&&A(google.maps.event.addListener(N,"polylinecomplete",a)),l&&U(google.maps.event.addListener(N,"rectanglecomplete",l)),b(N),c&&c(N),function(){v!==null&&(S&&google.maps.event.removeListener(S),y&&google.maps.event.removeListener(y),p&&google.maps.event.removeListener(p),k&&google.maps.event.removeListener(k),P&&google.maps.event.removeListener(P),j&&google.maps.event.removeListener(j),f&&f(v),v.setMap(null))}},[]),null}u.memo(Cg);(function(t){Ie(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)},We(!!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(Z(Z({},this.props.options||{}),{map:this.context}));this.registeredEvents=se({updaterMap:ja,eventMap:Na,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{drawingManager:n}},this.setDrawingManagerCallback)},e.prototype.componentDidUpdate=function(n){this.state.drawingManager!==null&&(ue(this.registeredEvents),this.registeredEvents=se({updaterMap:ja,eventMap:Na,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),ue(this.registeredEvents),this.state.drawingManager.setMap(null))},e.prototype.render=function(){return null},e.contextType=re,e})(u.PureComponent);var Ba={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"},Ua={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)}},Fi={};function _g(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,c=t.clickable,f=t.cursor,d=t.icon,h=t.label,v=t.opacity,b=t.shape,g=t.title,S=t.zIndex,w=t.onClick,L=t.onDblClick,y=t.onDrag,_=t.onDragEnd,x=t.onDragStart,p=t.onMouseOut,m=t.onMouseOver,E=t.onMouseUp,k=t.onMouseDown,M=t.onRightClick,O=t.onClickableChanged,P=t.onCursorChanged,A=t.onAnimationChanged,D=t.onDraggableChanged,j=t.onFlatChanged,U=t.onIconChanged,N=t.onPositionChanged,F=t.onShapeChanged,q=t.onTitleChanged,H=t.onVisibleChanged,V=t.onZindexChanged,$=t.onLoad,ie=t.onUnmount,W=u.useContext(re),te=u.useState(null),R=te[0],ce=te[1],fe=u.useState(null),K=fe[0],Se=fe[1],Ae=u.useState(null),de=Ae[0],Le=Ae[1],Ne=u.useState(null),ge=Ne[0],Ee=Ne[1],ke=u.useState(null),_e=ke[0],Pe=ke[1],Q=u.useState(null),Ve=Q[0],X=Q[1],qe=u.useState(null),G=qe[0],Fe=qe[1],je=u.useState(null),ut=je[0],tt=je[1],ee=u.useState(null),fn=ee[0],Zr=ee[1],Et=u.useState(null),jt=Et[0],qr=Et[1],I=u.useState(null),J=I[0],z=I[1],ae=u.useState(null),Re=ae[0],ye=ae[1],Te=u.useState(null),Me=Te[0],Be=Te[1],ne=u.useState(null),he=ne[0],st=ne[1],Bt=u.useState(null),nt=Bt[0],Ge=Bt[1],ct=u.useState(null),ft=ct[0],Ke=ct[1],Pt=u.useState(null),xt=Pt[0],dt=Pt[1],Gt=u.useState(null),Ut=Gt[0],nr=Gt[1],rr=u.useState(null),Pn=rr[0],ir=rr[1],Rn=u.useState(null),dn=Rn[0],or=Rn[1],Zt=u.useState(null),hn=Zt[0],pn=Zt[1],gn=u.useState(null),vn=gn[0],sr=gn[1];u.useEffect(function(){R!==null&&R.setMap(W)},[W]),u.useEffect(function(){typeof n<"u"&&R!==null&&R.setOptions(n)},[R,n]),u.useEffect(function(){typeof s<"u"&&R!==null&&R.setDraggable(s)},[R,s]),u.useEffect(function(){e&&R!==null&&R.setPosition(e)},[R,e]),u.useEffect(function(){typeof a<"u"&&R!==null&&R.setVisible(a)},[R,a]),u.useEffect(function(){R==null||R.setAnimation(l)},[R,l]),u.useEffect(function(){R&&c!==void 0&&R.setClickable(c)},[R,c]),u.useEffect(function(){R&&f!==void 0&&R.setCursor(f)},[R,f]),u.useEffect(function(){R&&d!==void 0&&R.setIcon(d)},[R,d]),u.useEffect(function(){R&&h!==void 0&&R.setLabel(h)},[R,h]),u.useEffect(function(){R&&v!==void 0&&R.setOpacity(v)},[R,v]),u.useEffect(function(){R&&b!==void 0&&R.setShape(b)},[R,b]),u.useEffect(function(){R&&g!==void 0&&R.setTitle(g)},[R,g]),u.useEffect(function(){R&&S!==void 0&&R.setZIndex(S)},[R,S]),u.useEffect(function(){R&&L&&(K!==null&&google.maps.event.removeListener(K),Se(google.maps.event.addListener(R,"dblclick",L)))},[L]),u.useEffect(function(){R&&_&&(de!==null&&google.maps.event.removeListener(de),Le(google.maps.event.addListener(R,"dragend",_)))},[_]),u.useEffect(function(){R&&x&&(ge!==null&&google.maps.event.removeListener(ge),Ee(google.maps.event.addListener(R,"dragstart",x)))},[x]),u.useEffect(function(){R&&k&&(_e!==null&&google.maps.event.removeListener(_e),Pe(google.maps.event.addListener(R,"mousedown",k)))},[k]),u.useEffect(function(){R&&p&&(Ve!==null&&google.maps.event.removeListener(Ve),X(google.maps.event.addListener(R,"mouseout",p)))},[p]),u.useEffect(function(){R&&m&&(G!==null&&google.maps.event.removeListener(G),Fe(google.maps.event.addListener(R,"mouseover",m)))},[m]),u.useEffect(function(){R&&E&&(ut!==null&&google.maps.event.removeListener(ut),tt(google.maps.event.addListener(R,"mouseup",E)))},[E]),u.useEffect(function(){R&&M&&(fn!==null&&google.maps.event.removeListener(fn),Zr(google.maps.event.addListener(R,"rightclick",M)))},[M]),u.useEffect(function(){R&&w&&(jt!==null&&google.maps.event.removeListener(jt),qr(google.maps.event.addListener(R,"click",w)))},[w]),u.useEffect(function(){R&&y&&(J!==null&&google.maps.event.removeListener(J),z(google.maps.event.addListener(R,"drag",y)))},[y]),u.useEffect(function(){R&&O&&(Re!==null&&google.maps.event.removeListener(Re),ye(google.maps.event.addListener(R,"clickable_changed",O)))},[O]),u.useEffect(function(){R&&P&&(Me!==null&&google.maps.event.removeListener(Me),Be(google.maps.event.addListener(R,"cursor_changed",P)))},[P]),u.useEffect(function(){R&&A&&(he!==null&&google.maps.event.removeListener(he),st(google.maps.event.addListener(R,"animation_changed",A)))},[A]),u.useEffect(function(){R&&D&&(nt!==null&&google.maps.event.removeListener(nt),Ge(google.maps.event.addListener(R,"draggable_changed",D)))},[D]),u.useEffect(function(){R&&j&&(ft!==null&&google.maps.event.removeListener(ft),Ke(google.maps.event.addListener(R,"flat_changed",j)))},[j]),u.useEffect(function(){R&&U&&(xt!==null&&google.maps.event.removeListener(xt),dt(google.maps.event.addListener(R,"icon_changed",U)))},[U]),u.useEffect(function(){R&&N&&(Ut!==null&&google.maps.event.removeListener(Ut),nr(google.maps.event.addListener(R,"position_changed",N)))},[N]),u.useEffect(function(){R&&F&&(Pn!==null&&google.maps.event.removeListener(Pn),ir(google.maps.event.addListener(R,"shape_changed",F)))},[F]),u.useEffect(function(){R&&q&&(dn!==null&&google.maps.event.removeListener(dn),or(google.maps.event.addListener(R,"title_changed",q)))},[q]),u.useEffect(function(){R&&H&&(hn!==null&&google.maps.event.removeListener(hn),pn(google.maps.event.addListener(R,"visible_changed",H)))},[H]),u.useEffect(function(){R&&V&&(vn!==null&&google.maps.event.removeListener(vn),sr(google.maps.event.addListener(R,"zindex_changed",V)))},[V]),u.useEffect(function(){var qt=Z(Z(Z({},n||Fi),r?Fi:{map:W}),{position:e}),Y=new google.maps.Marker(qt);return r?r.addMarker(Y,!!i):Y.setMap(W),e&&Y.setPosition(e),typeof a<"u"&&Y.setVisible(a),typeof s<"u"&&Y.setDraggable(s),typeof c<"u"&&Y.setClickable(c),typeof f=="string"&&Y.setCursor(f),d&&Y.setIcon(d),typeof h<"u"&&Y.setLabel(h),typeof v<"u"&&Y.setOpacity(v),b&&Y.setShape(b),typeof g=="string"&&Y.setTitle(g),typeof S=="number"&&Y.setZIndex(S),L&&Se(google.maps.event.addListener(Y,"dblclick",L)),_&&Le(google.maps.event.addListener(Y,"dragend",_)),x&&Ee(google.maps.event.addListener(Y,"dragstart",x)),k&&Pe(google.maps.event.addListener(Y,"mousedown",k)),p&&X(google.maps.event.addListener(Y,"mouseout",p)),m&&Fe(google.maps.event.addListener(Y,"mouseover",m)),E&&tt(google.maps.event.addListener(Y,"mouseup",E)),M&&Zr(google.maps.event.addListener(Y,"rightclick",M)),w&&qr(google.maps.event.addListener(Y,"click",w)),y&&z(google.maps.event.addListener(Y,"drag",y)),O&&ye(google.maps.event.addListener(Y,"clickable_changed",O)),P&&Be(google.maps.event.addListener(Y,"cursor_changed",P)),A&&st(google.maps.event.addListener(Y,"animation_changed",A)),D&&Ge(google.maps.event.addListener(Y,"draggable_changed",D)),j&&Ke(google.maps.event.addListener(Y,"flat_changed",j)),U&&dt(google.maps.event.addListener(Y,"icon_changed",U)),N&&nr(google.maps.event.addListener(Y,"position_changed",N)),F&&ir(google.maps.event.addListener(Y,"shape_changed",F)),q&&or(google.maps.event.addListener(Y,"title_changed",q)),H&&pn(google.maps.event.addListener(Y,"visible_changed",H)),V&&sr(google.maps.event.addListener(Y,"zindex_changed",V)),ce(Y),$&&$(Y),function(){K!==null&&google.maps.event.removeListener(K),de!==null&&google.maps.event.removeListener(de),ge!==null&&google.maps.event.removeListener(ge),_e!==null&&google.maps.event.removeListener(_e),Ve!==null&&google.maps.event.removeListener(Ve),G!==null&&google.maps.event.removeListener(G),ut!==null&&google.maps.event.removeListener(ut),fn!==null&&google.maps.event.removeListener(fn),jt!==null&&google.maps.event.removeListener(jt),Re!==null&&google.maps.event.removeListener(Re),Me!==null&&google.maps.event.removeListener(Me),he!==null&&google.maps.event.removeListener(he),nt!==null&&google.maps.event.removeListener(nt),ft!==null&&google.maps.event.removeListener(ft),xt!==null&&google.maps.event.removeListener(xt),Ut!==null&&google.maps.event.removeListener(Ut),dn!==null&&google.maps.event.removeListener(dn),hn!==null&&google.maps.event.removeListener(hn),vn!==null&&google.maps.event.removeListener(vn),ie&&ie(Y),r?r.removeMarker(Y,!!i):Y&&Y.setMap(null)}},[]);var ar=u.useMemo(function(){return o?u.Children.map(o,function(qt){if(!u.isValidElement(qt))return qt;var Y=qt;return u.cloneElement(Y,{anchor:R})}):null},[o,R]);return C.jsx(C.Fragment,{children:ar})||null}u.memo(_g);var xc=function(t){Ie(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=Z(Z(Z({},this.props.options||Fi),this.props.clusterer?Fi:{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=se({updaterMap:Ua,eventMap:Ba,prevProps:{},nextProps:this.props,instance:this.marker}),this.props.onLoad&&this.props.onLoad(this.marker)},e.prototype.componentDidUpdate=function(n){this.marker&&(ue(this.registeredEvents),this.registeredEvents=se({updaterMap:Ua,eventMap:Ba,prevProps:n,nextProps:this.props,instance:this.marker}))},e.prototype.componentWillUnmount=function(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),ue(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=u.Children.map(this.props.children,function(i){if(!u.isValidElement(i))return i;var o=i;return u.cloneElement(o,{anchor:n.marker})})),r||null},e.contextType=re,e}(u.PureComponent),Mg=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(" "),c=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(c,"px")),this.cluster.getClusterer().enableRetinaIcons||(h.style.clip="rect(-".concat(f,"px, -").concat(c+this.width,"px, -").concat(f+this.height,", -").concat(c,")"));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}(),Og=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 Mg(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,c=this.markers;l<c.length;l++){var f=c[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 kg(t,e){var n=t.length,r=n.toString().length,i=Math.min(r,e);return{text:n.toString(),index:i,title:""}}var Pg=2e3,Rg=500,Tg="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",Ag="png",Dg=[53,56,66,78,90],Ig="cluster",Cc=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||Tg,this.imageExtension=r.imageExtension||Ag,this.imageSizes=r.imageSizes||Dg,this.calculator=r.calculator||kg,this.batchSize=r.batchSize||Pg,this.batchSizeIE=r.batchSizeIE||Rg,this.clusterClass=r.clusterClass||Ig,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 c=l[a];google.maps.event.removeListener(c)}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(),c=e.getPosition();if(l&&c){var f=this.distanceBetweenPoints(l,c);f<r&&(r=f,i=n)}}i&&i.isMarkerInClusterBounds(e)?i.addMarker(e):(n=new Og(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),c=e;c<l;c++){var f=this.markers[c];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}(),yt={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},be={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)}},Ng={};function jg(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,c=t.ignoreHidden,f=t.imageExtension,d=t.imagePath,h=t.imageSizes,v=t.maxZoom,b=t.minimumClusterSize,g=t.styles,S=t.title,w=t.zoomOnClick,L=t.onClick,y=t.onClusteringBegin,_=t.onClusteringEnd,x=t.onMouseOver,p=t.onMouseOut,m=t.onLoad,E=t.onUnmount,k=u.useState(null),M=k[0],O=k[1],P=u.useContext(re),A=u.useState(null),D=A[0],j=A[1],U=u.useState(null),N=U[0],F=U[1],q=u.useState(null),H=q[0],V=q[1],$=u.useState(null),ie=$[0],W=$[1],te=u.useState(null),R=te[0],ce=te[1];return u.useEffect(function(){M&&p&&(ie!==null&&google.maps.event.removeListener(ie),W(google.maps.event.addListener(M,yt.onMouseOut,p)))},[p]),u.useEffect(function(){M&&x&&(R!==null&&google.maps.event.removeListener(R),ce(google.maps.event.addListener(M,yt.onMouseOver,x)))},[x]),u.useEffect(function(){M&&L&&(D!==null&&google.maps.event.removeListener(D),j(google.maps.event.addListener(M,yt.onClick,L)))},[L]),u.useEffect(function(){M&&y&&(N!==null&&google.maps.event.removeListener(N),F(google.maps.event.addListener(M,yt.onClusteringBegin,y)))},[y]),u.useEffect(function(){M&&_&&(H!==null&&google.maps.event.removeListener(H),F(google.maps.event.addListener(M,yt.onClusteringEnd,_)))},[_]),u.useEffect(function(){typeof r<"u"&&M!==null&&be.averageCenter(M,r)},[M,r]),u.useEffect(function(){typeof i<"u"&&M!==null&&be.batchSizeIE(M,i)},[M,i]),u.useEffect(function(){typeof o<"u"&&M!==null&&be.calculator(M,o)},[M,o]),u.useEffect(function(){typeof s<"u"&&M!==null&&be.clusterClass(M,s)},[M,s]),u.useEffect(function(){typeof a<"u"&&M!==null&&be.enableRetinaIcons(M,a)},[M,a]),u.useEffect(function(){typeof l<"u"&&M!==null&&be.gridSize(M,l)},[M,l]),u.useEffect(function(){typeof c<"u"&&M!==null&&be.ignoreHidden(M,c)},[M,c]),u.useEffect(function(){typeof f<"u"&&M!==null&&be.imageExtension(M,f)},[M,f]),u.useEffect(function(){typeof d<"u"&&M!==null&&be.imagePath(M,d)},[M,d]),u.useEffect(function(){typeof h<"u"&&M!==null&&be.imageSizes(M,h)},[M,h]),u.useEffect(function(){typeof v<"u"&&M!==null&&be.maxZoom(M,v)},[M,v]),u.useEffect(function(){typeof b<"u"&&M!==null&&be.minimumClusterSize(M,b)},[M,b]),u.useEffect(function(){typeof g<"u"&&M!==null&&be.styles(M,g)},[M,g]),u.useEffect(function(){typeof S<"u"&&M!==null&&be.title(M,S)},[M,S]),u.useEffect(function(){typeof w<"u"&&M!==null&&be.zoomOnClick(M,w)},[M,w]),u.useEffect(function(){if(P){var fe=Z({},n||Ng),K=new Cc(P,[],fe);return r&&be.averageCenter(K,r),i&&be.batchSizeIE(K,i),o&&be.calculator(K,o),s&&be.clusterClass(K,s),a&&be.enableRetinaIcons(K,a),l&&be.gridSize(K,l),c&&be.ignoreHidden(K,c),f&&be.imageExtension(K,f),d&&be.imagePath(K,d),h&&be.imageSizes(K,h),v&&be.maxZoom(K,v),b&&be.minimumClusterSize(K,b),g&&be.styles(K,g),S&&be.title(K,S),w&&be.zoomOnClick(K,w),p&&W(google.maps.event.addListener(K,yt.onMouseOut,p)),x&&ce(google.maps.event.addListener(K,yt.onMouseOver,x)),L&&j(google.maps.event.addListener(K,yt.onClick,L)),y&&F(google.maps.event.addListener(K,yt.onClusteringBegin,y)),_&&V(google.maps.event.addListener(K,yt.onClusteringEnd,_)),O(K),m&&m(K),function(){ie!==null&&google.maps.event.removeListener(ie),R!==null&&google.maps.event.removeListener(R),D!==null&&google.maps.event.removeListener(D),N!==null&&google.maps.event.removeListener(N),H!==null&&google.maps.event.removeListener(H),E&&E(K)}}},[]),M!==null&&e(M)||null}u.memo(jg);var Bg=function(t){Ie(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 Cc(this.context,[],this.props.options);this.registeredEvents=se({updaterMap:be,eventMap:yt,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{markerClusterer:n}},this.setClustererCallback)}},e.prototype.componentDidUpdate=function(n){this.state.markerClusterer&&(ue(this.registeredEvents),this.registeredEvents=se({updaterMap:be,eventMap:yt,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),ue(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=re,e}(u.PureComponent);function Va(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}var _c=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(c){c.returnValue=!1,c.preventDefault&&c.preventDefault(),e.enableEventPropagation||Va(c)};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,Va))}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,c=this.pixelOffset.width,f=this.pixelOffset.height,d=this.div.offsetWidth,h=this.div.offsetHeight,v=this.infoBoxClearance.width,b=this.infoBoxClearance.height,g=this.getProjection(),S=g.fromLatLngToContainerPixel(this.position);S!==null&&(S.x<-c+v?r=S.x+c-v:S.x+d+c+v>a&&(r=S.x+d+c+v-a),this.alignBottom?S.y<-f+b+h?i=S.y+f-b-h:S.y+f+b>l&&(i=S.y+f+b-l):S.y<-f+b?i=S.y+f-b:S.y+h+f+b>l&&(i=S.y+h+f+b-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}(),Fa={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},za={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)}},Ug={};function Vg(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,c=t.onPositionChanged,f=t.onZindexChanged,d=t.onLoad,h=t.onUnmount,v=u.useContext(re),b=u.useState(null),g=b[0],S=b[1],w=u.useState(null),L=w[0],y=w[1],_=u.useState(null),x=_[0],p=_[1],m=u.useState(null),E=m[0],k=m[1],M=u.useState(null),O=M[0],P=M[1],A=u.useState(null),D=A[0],j=A[1],U=u.useRef(null);return u.useEffect(function(){v&&g!==null&&(g.close(),n?g.open(v,n):g.getPosition()&&g.open(v))},[v,g,n]),u.useEffect(function(){r&&g!==null&&g.setOptions(r)},[g,r]),u.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]),u.useEffect(function(){typeof o=="number"&&g!==null&&g.setZIndex(o)},[o]),u.useEffect(function(){g&&s&&(L!==null&&google.maps.event.removeListener(L),y(google.maps.event.addListener(g,"closeclick",s)))},[s]),u.useEffect(function(){g&&a&&(x!==null&&google.maps.event.removeListener(x),p(google.maps.event.addListener(g,"domready",a)))},[a]),u.useEffect(function(){g&&l&&(E!==null&&google.maps.event.removeListener(E),k(google.maps.event.addListener(g,"content_changed",l)))},[l]),u.useEffect(function(){g&&c&&(O!==null&&google.maps.event.removeListener(O),P(google.maps.event.addListener(g,"position_changed",c)))},[c]),u.useEffect(function(){g&&f&&(D!==null&&google.maps.event.removeListener(D),j(google.maps.event.addListener(g,"zindex_changed",f)))},[f]),u.useEffect(function(){if(v){var N=r||Ug,F=N.position,q=Zs(N,["position"]),H=void 0;F&&!(F instanceof google.maps.LatLng)&&(H=new google.maps.LatLng(F.lat,F.lng));var V=new _c(Z(Z({},q),H?{position:H}:{}));U.current=document.createElement("div"),S(V),s&&y(google.maps.event.addListener(V,"closeclick",s)),a&&p(google.maps.event.addListener(V,"domready",a)),l&&k(google.maps.event.addListener(V,"content_changed",l)),c&&P(google.maps.event.addListener(V,"position_changed",c)),f&&j(google.maps.event.addListener(V,"zindex_changed",f)),V.setContent(U.current),n?V.open(v,n):V.getPosition()?V.open(v):We(!1,"You must provide either an anchor or a position prop for <InfoBox>."),d&&d(V)}return function(){g!==null&&(L&&google.maps.event.removeListener(L),E&&google.maps.event.removeListener(E),x&&google.maps.event.removeListener(x),O&&google.maps.event.removeListener(O),D&&google.maps.event.removeListener(D),h&&h(g),g.close())}},[]),U.current?Qn.createPortal(u.Children.only(e),U.current):null}u.memo(Vg);(function(t){Ie(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):We(!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=Zs(n,["position"]),o;r&&!(r instanceof google.maps.LatLng)&&(o=new google.maps.LatLng(r.lat,r.lng));var s=new _c(Z(Z({},i),o?{position:o}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=se({updaterMap:za,eventMap:Fa,prevProps:{},nextProps:this.props,instance:s}),this.setState({infoBox:s},this.setInfoBoxCallback)},e.prototype.componentDidUpdate=function(n){var r=this.state.infoBox;r!==null&&(ue(this.registeredEvents),this.registeredEvents=se({updaterMap:za,eventMap:Fa,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),ue(this.registeredEvents),r.close())},e.prototype.render=function(){return this.containerElement?Qn.createPortal(u.Children.only(this.props.children),this.containerElement):null},e.contextType=re,e})(u.PureComponent);var Fg=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},$a=yc(Fg);const Ha=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Eo=1,cr=8;class qs{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!==Eo)throw new Error(`Got v${i} data when expected v${Eo}.`);const o=Ha[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 qs(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=Ha.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,cr,e),this.coords=new this.ArrayType(this.data,cr+a+l,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(cr+s+a+l),this.ids=new this.IndexArrayType(this.data,cr,e),this.coords=new this.ArrayType(this.data,cr+a+l,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(Eo<<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 as(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],c=[];for(;l.length;){const f=l.pop()||0,d=l.pop()||0,h=l.pop()||0;if(d-h<=a){for(let S=h;S<=d;S++){const w=s[2*S],L=s[2*S+1];w>=e&&w<=r&&L>=n&&L<=i&&c.push(o[S])}continue}const v=h+d>>1,b=s[2*v],g=s[2*v+1];b>=e&&b<=r&&g>=n&&g<=i&&c.push(o[v]),(f===0?e<=b:n<=g)&&(l.push(h),l.push(v-1),l.push(1-f)),(f===0?r>=b:i>=g)&&(l.push(v+1),l.push(d),l.push(1-f))}return c}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=[],c=r*r;for(;a.length;){const f=a.pop()||0,d=a.pop()||0,h=a.pop()||0;if(d-h<=s){for(let S=h;S<=d;S++)Wa(o[2*S],o[2*S+1],e,n)<=c&&l.push(i[S]);continue}const v=h+d>>1,b=o[2*v],g=o[2*v+1];Wa(b,g,e,n)<=c&&l.push(i[v]),(f===0?e-r<=b:n-r<=g)&&(a.push(h),a.push(v-1),a.push(1-f)),(f===0?e+r>=b:n+r>=g)&&(a.push(v+1),a.push(d),a.push(1-f))}return l}}function as(t,e,n,r,i,o){if(i-r<=n)return;const s=r+i>>1;Mc(t,e,s,r,i,o),as(t,e,n,r,s-1,1-o),as(t,e,n,s+1,i,1-o)}function Mc(t,e,n,r,i,o){for(;i>r;){if(i-r>600){const c=i-r+1,f=n-r+1,d=Math.log(c),h=.5*Math.exp(2*d/3),v=.5*Math.sqrt(d*h*(c-h)/c)*(f-c/2<0?-1:1),b=Math.max(r,Math.floor(n-f*h/c+v)),g=Math.min(i,Math.floor(n+(c-f)*h/c+v));Mc(t,e,n,b,g,o)}const s=e[2*n+o];let a=r,l=i;for(fr(t,e,r,n),e[2*i+o]>s&&fr(t,e,r,i);a<l;){for(fr(t,e,a,l),a++,l--;e[2*a+o]<s;)a++;for(;e[2*l+o]>s;)l--}e[2*r+o]===s?fr(t,e,r,l):(l++,fr(t,e,l,i)),l<=n&&(r=l+1),n<=l&&(i=l-1)}}function fr(t,e,n,r){xo(t,n,r),xo(e,2*n,2*r),xo(e,2*n+1,2*r+1)}function xo(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Wa(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}const zg={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},Ga=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),mn=2,nn=3,Co=4,Qt=5,Oc=6;class $g{constructor(e){this.options=Object.assign(Object.create(zg),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 c=e[l];if(!c.geometry)continue;const[f,d]=c.geometry.coordinates,h=Ga(ei(f)),v=Ga(ti(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 c=+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()-c)}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(ei(r),ti(s),ei(o),ti(i)),c=a.data,f=[];for(const d of l){const h=this.stride*d;f.push(c[h+Qt]>1?Za(c,h,this.clusterProps):this.points[c[h+nn]])}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],c=s[n*this.stride+1],f=o.within(l,c,a),d=[];for(const h of f){const v=h*this.stride;s[v+Co]===e&&d.push(s[v+Qt]>1?Za(s,v,this.clusterProps):this.points[s[v+nn]])}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,c=(r-l)/o,f=(r+1+l)/o,d={features:[]};return this._addTileFeatures(i.range((n-l)/o,c,(n+1+l)/o,f),i.data,n,r,o,d),n===0&&this._addTileFeatures(i.range(1-l/o,c,1,f),i.data,o,r,o,d),n===o-1&&this._addTileFeatures(i.range(0,c,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 qs(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,c=n[l+Qt]>1;let f,d,h;if(c)f=kc(n,l,this.clusterProps),d=n[l],h=n[l+1];else{const g=this.points[n[l+nn]];f=g.properties;const[S,w]=g.geometry.coordinates;d=ei(S),h=ti(w)}const v={type:1,geometry:[[Math.round(this.options.extent*(d*o-r)),Math.round(this.options.extent*(h*o-i))]],tags:f};let b;c||this.options.generateId?b=n[l+nn]:b=this.points[n[l+nn]].id,b!==void 0&&(v.id=b),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,c=[],f=this.stride;for(let d=0;d<l.length;d+=f){if(l[d+mn]<=n)continue;l[d+mn]=n;const h=l[d],v=l[d+1],b=e.within(l[d],l[d+1],a),g=l[d+Qt];let S=g;for(const w of b){const L=w*f;l[L+mn]>n&&(S+=l[L+Qt])}if(S>g&&S>=s){let w=h*g,L=v*g,y,_=-1;const x=((d/f|0)<<5)+(n+1)+this.points.length;for(const p of b){const m=p*f;if(l[m+mn]<=n)continue;l[m+mn]=n;const E=l[m+Qt];w+=l[m]*E,L+=l[m+1]*E,l[m+Co]=x,o&&(y||(y=this._map(l,d,!0),_=this.clusterProps.length,this.clusterProps.push(y)),o(y,this._map(l,m)))}l[d+Co]=x,c.push(w/S,L/S,1/0,x,-1,S),o&&c.push(_)}else{for(let w=0;w<f;w++)c.push(l[d+w]);if(S>1)for(const w of b){const L=w*f;if(!(l[L+mn]<=n)){l[L+mn]=n;for(let y=0;y<f;y++)c.push(l[L+y])}}}}return c}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,n,r){if(e[n+Qt]>1){const s=this.clusterProps[e[n+Oc]];return r?Object.assign({},s):s}const i=this.points[e[n+nn]].properties,o=this.options.map(i);return r&&o===i?Object.assign({},o):o}}function Za(t,e,n){return{type:"Feature",id:t[e+nn],properties:kc(t,e,n),geometry:{type:"Point",coordinates:[Hg(t[e]),Wg(t[e+1])]}}}function kc(t,e,n){const r=t[e+Qt],i=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,o=t[e+Oc],s=o===-1?{}:Object.assign({},n[o]);return Object.assign(s,{cluster:!0,cluster_id:t[e+nn],point_count:r,point_count_abbreviated:i})}function ei(t){return t/360+.5}function ti(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 Hg(t){return(t-.5)*360}function Wg(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
|
|
48
|
+
`)),console.error(P)})},[n,h,o]);var b=u.useRef();return u.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:w,loadError:_,url:h}}var yg=C.jsx(Ec,{});function bg(t){var e=t.loadingElement,n=t.onLoad,r=t.onError,i=t.onUnmount,o=t.children,s=qs(t,["loadingElement","onLoad","onError","onUnmount","children"]),a=xc(s),l=a.isLoaded,c=a.loadError;return u.useEffect(function(){l&&typeof n=="function"&&n()},[l,n]),u.useEffect(function(){c&&typeof r=="function"&&r(c)},[c,r]),u.useEffect(function(){return function(){i&&i()}},[i]),l?o:e||yg}u.memo(bg);var Aa;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(Aa||(Aa={}));var Da={},Ia={options:function(t,e){t.setOptions(e)}};function wg(t){var e=t.options,n=t.onLoad,r=t.onUnmount,i=u.useContext(ie),o=u.useState(null),s=o[0],a=o[1];return u.useEffect(function(){s!==null&&s.setMap(i)},[i]),u.useEffect(function(){e&&s!==null&&s.setOptions(e)},[s,e]),u.useEffect(function(){var l=new google.maps.TrafficLayer(G(G({},e||{}),{map:i}));return a(l),n&&n(l),function(){s!==null&&(r&&r(s),s.setMap(null))}},[]),null}u.memo(wg);(function(t){Ie(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(G(G({},this.props.options||{}),{map:this.context}));this.registeredEvents=ae({updaterMap:Ia,eventMap:Da,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{trafficLayer:n}},this.setTrafficLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.trafficLayer!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:Ia,eventMap:Da,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),ce(this.registeredEvents),this.state.trafficLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ie,e})(u.PureComponent);function Sg(t){var e=t.onLoad,n=t.onUnmount,r=u.useContext(ie),i=u.useState(null),o=i[0],s=i[1];return u.useEffect(function(){o!==null&&o.setMap(r)},[r]),u.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}u.memo(Sg);(function(t){Ie(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=ie,e})(u.PureComponent);function Lg(t){var e=t.onLoad,n=t.onUnmount,r=u.useContext(ie),i=u.useState(null),o=i[0],s=i[1];return u.useEffect(function(){o!==null&&o.setMap(r)},[r]),u.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}u.memo(Lg);(function(t){Ie(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=ie,e})(u.PureComponent);var Na={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},ja={drawingMode:function(t,e){t.setDrawingMode(e)},options:function(t,e){t.setOptions(e)}};function Eg(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,c=t.onLoad,f=t.onUnmount,d=u.useContext(ie),p=u.useState(null),v=p[0],y=p[1],g=u.useState(null),S=g[0],w=g[1],L=u.useState(null),m=L[0],_=L[1],E=u.useState(null),h=E[0],b=E[1],x=u.useState(null),k=x[0],M=x[1],P=u.useState(null),O=P[0],R=P[1],D=u.useState(null),j=D[0],U=D[1];return u.useEffect(function(){v!==null&&v.setMap(d)},[d]),u.useEffect(function(){e&&v!==null&&v.setOptions(e)},[v,e]),u.useEffect(function(){v!==null&&v.setDrawingMode(n??null)},[v,n]),u.useEffect(function(){v&&r&&(S!==null&&google.maps.event.removeListener(S),w(google.maps.event.addListener(v,"circlecomplete",r)))},[v,r]),u.useEffect(function(){v&&i&&(m!==null&&google.maps.event.removeListener(m),_(google.maps.event.addListener(v,"markercomplete",i)))},[v,i]),u.useEffect(function(){v&&o&&(h!==null&&google.maps.event.removeListener(h),b(google.maps.event.addListener(v,"overlaycomplete",o)))},[v,o]),u.useEffect(function(){v&&s&&(k!==null&&google.maps.event.removeListener(k),M(google.maps.event.addListener(v,"polygoncomplete",s)))},[v,s]),u.useEffect(function(){v&&a&&(O!==null&&google.maps.event.removeListener(O),R(google.maps.event.addListener(v,"polylinecomplete",a)))},[v,a]),u.useEffect(function(){v&&l&&(j!==null&&google.maps.event.removeListener(j),U(google.maps.event.addListener(v,"rectanglecomplete",l)))},[v,l]),u.useEffect(function(){We(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var N=new google.maps.drawing.DrawingManager(G(G({},e||{}),{map:d}));return n&&N.setDrawingMode(n),r&&w(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&&M(google.maps.event.addListener(N,"polygoncomplete",s)),a&&R(google.maps.event.addListener(N,"polylinecomplete",a)),l&&U(google.maps.event.addListener(N,"rectanglecomplete",l)),y(N),c&&c(N),function(){v!==null&&(S&&google.maps.event.removeListener(S),m&&google.maps.event.removeListener(m),h&&google.maps.event.removeListener(h),k&&google.maps.event.removeListener(k),O&&google.maps.event.removeListener(O),j&&google.maps.event.removeListener(j),f&&f(v),v.setMap(null))}},[]),null}u.memo(Eg);(function(t){Ie(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)},We(!!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(G(G({},this.props.options||{}),{map:this.context}));this.registeredEvents=ae({updaterMap:ja,eventMap:Na,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{drawingManager:n}},this.setDrawingManagerCallback)},e.prototype.componentDidUpdate=function(n){this.state.drawingManager!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:ja,eventMap:Na,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),ce(this.registeredEvents),this.state.drawingManager.setMap(null))},e.prototype.render=function(){return null},e.contextType=ie,e})(u.PureComponent);var Ba={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"},Ua={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)}},zi={};function xg(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,c=t.clickable,f=t.cursor,d=t.icon,p=t.label,v=t.opacity,y=t.shape,g=t.title,S=t.zIndex,w=t.onClick,L=t.onDblClick,m=t.onDrag,_=t.onDragEnd,E=t.onDragStart,h=t.onMouseOut,b=t.onMouseOver,x=t.onMouseUp,k=t.onMouseDown,M=t.onRightClick,P=t.onClickableChanged,O=t.onCursorChanged,R=t.onAnimationChanged,D=t.onDraggableChanged,j=t.onFlatChanged,U=t.onIconChanged,N=t.onPositionChanged,V=t.onShapeChanged,q=t.onTitleChanged,$=t.onVisibleChanged,F=t.onZindexChanged,Z=t.onLoad,te=t.onUnmount,X=u.useContext(ie),J=u.useState(null),T=J[0],fe=J[1],xe=u.useState(null),H=xe[0],Oe=xe[1],ke=u.useState(null),se=ke[0],we=ke[1],Ne=u.useState(null),pe=Ne[0],Se=Ne[1],Pe=u.useState(null),Ce=Pe[0],Re=Pe[1],ee=u.useState(null),Ve=ee[0],Q=ee[1],qe=u.useState(null),W=qe[0],Fe=qe[1],je=u.useState(null),ut=je[0],nt=je[1],ne=u.useState(null),fn=ne[0],qr=ne[1],Et=u.useState(null),jt=Et[0],Kr=Et[1],I=u.useState(null),K=I[0],z=I[1],le=u.useState(null),Te=le[0],me=le[1],Ae=u.useState(null),_e=Ae[0],Be=Ae[1],re=u.useState(null),de=re[0],st=re[1],Bt=u.useState(null),rt=Bt[0],Ge=Bt[1],ct=u.useState(null),ft=ct[0],Ke=ct[1],Pt=u.useState(null),xt=Pt[0],dt=Pt[1],Zt=u.useState(null),Ut=Zt[0],nr=Zt[1],rr=u.useState(null),Pn=rr[0],ir=rr[1],Rn=u.useState(null),dn=Rn[0],or=Rn[1],qt=u.useState(null),hn=qt[0],pn=qt[1],gn=u.useState(null),vn=gn[0],sr=gn[1];u.useEffect(function(){T!==null&&T.setMap(X)},[X]),u.useEffect(function(){typeof n<"u"&&T!==null&&T.setOptions(n)},[T,n]),u.useEffect(function(){typeof s<"u"&&T!==null&&T.setDraggable(s)},[T,s]),u.useEffect(function(){e&&T!==null&&T.setPosition(e)},[T,e]),u.useEffect(function(){typeof a<"u"&&T!==null&&T.setVisible(a)},[T,a]),u.useEffect(function(){T==null||T.setAnimation(l)},[T,l]),u.useEffect(function(){T&&c!==void 0&&T.setClickable(c)},[T,c]),u.useEffect(function(){T&&f!==void 0&&T.setCursor(f)},[T,f]),u.useEffect(function(){T&&d!==void 0&&T.setIcon(d)},[T,d]),u.useEffect(function(){T&&p!==void 0&&T.setLabel(p)},[T,p]),u.useEffect(function(){T&&v!==void 0&&T.setOpacity(v)},[T,v]),u.useEffect(function(){T&&y!==void 0&&T.setShape(y)},[T,y]),u.useEffect(function(){T&&g!==void 0&&T.setTitle(g)},[T,g]),u.useEffect(function(){T&&S!==void 0&&T.setZIndex(S)},[T,S]),u.useEffect(function(){T&&L&&(H!==null&&google.maps.event.removeListener(H),Oe(google.maps.event.addListener(T,"dblclick",L)))},[L]),u.useEffect(function(){T&&_&&(se!==null&&google.maps.event.removeListener(se),we(google.maps.event.addListener(T,"dragend",_)))},[_]),u.useEffect(function(){T&&E&&(pe!==null&&google.maps.event.removeListener(pe),Se(google.maps.event.addListener(T,"dragstart",E)))},[E]),u.useEffect(function(){T&&k&&(Ce!==null&&google.maps.event.removeListener(Ce),Re(google.maps.event.addListener(T,"mousedown",k)))},[k]),u.useEffect(function(){T&&h&&(Ve!==null&&google.maps.event.removeListener(Ve),Q(google.maps.event.addListener(T,"mouseout",h)))},[h]),u.useEffect(function(){T&&b&&(W!==null&&google.maps.event.removeListener(W),Fe(google.maps.event.addListener(T,"mouseover",b)))},[b]),u.useEffect(function(){T&&x&&(ut!==null&&google.maps.event.removeListener(ut),nt(google.maps.event.addListener(T,"mouseup",x)))},[x]),u.useEffect(function(){T&&M&&(fn!==null&&google.maps.event.removeListener(fn),qr(google.maps.event.addListener(T,"rightclick",M)))},[M]),u.useEffect(function(){T&&w&&(jt!==null&&google.maps.event.removeListener(jt),Kr(google.maps.event.addListener(T,"click",w)))},[w]),u.useEffect(function(){T&&m&&(K!==null&&google.maps.event.removeListener(K),z(google.maps.event.addListener(T,"drag",m)))},[m]),u.useEffect(function(){T&&P&&(Te!==null&&google.maps.event.removeListener(Te),me(google.maps.event.addListener(T,"clickable_changed",P)))},[P]),u.useEffect(function(){T&&O&&(_e!==null&&google.maps.event.removeListener(_e),Be(google.maps.event.addListener(T,"cursor_changed",O)))},[O]),u.useEffect(function(){T&&R&&(de!==null&&google.maps.event.removeListener(de),st(google.maps.event.addListener(T,"animation_changed",R)))},[R]),u.useEffect(function(){T&&D&&(rt!==null&&google.maps.event.removeListener(rt),Ge(google.maps.event.addListener(T,"draggable_changed",D)))},[D]),u.useEffect(function(){T&&j&&(ft!==null&&google.maps.event.removeListener(ft),Ke(google.maps.event.addListener(T,"flat_changed",j)))},[j]),u.useEffect(function(){T&&U&&(xt!==null&&google.maps.event.removeListener(xt),dt(google.maps.event.addListener(T,"icon_changed",U)))},[U]),u.useEffect(function(){T&&N&&(Ut!==null&&google.maps.event.removeListener(Ut),nr(google.maps.event.addListener(T,"position_changed",N)))},[N]),u.useEffect(function(){T&&V&&(Pn!==null&&google.maps.event.removeListener(Pn),ir(google.maps.event.addListener(T,"shape_changed",V)))},[V]),u.useEffect(function(){T&&q&&(dn!==null&&google.maps.event.removeListener(dn),or(google.maps.event.addListener(T,"title_changed",q)))},[q]),u.useEffect(function(){T&&$&&(hn!==null&&google.maps.event.removeListener(hn),pn(google.maps.event.addListener(T,"visible_changed",$)))},[$]),u.useEffect(function(){T&&F&&(vn!==null&&google.maps.event.removeListener(vn),sr(google.maps.event.addListener(T,"zindex_changed",F)))},[F]),u.useEffect(function(){var Kt=G(G(G({},n||zi),r?zi:{map:X}),{position:e}),Y=new google.maps.Marker(Kt);return r?r.addMarker(Y,!!i):Y.setMap(X),e&&Y.setPosition(e),typeof a<"u"&&Y.setVisible(a),typeof s<"u"&&Y.setDraggable(s),typeof c<"u"&&Y.setClickable(c),typeof f=="string"&&Y.setCursor(f),d&&Y.setIcon(d),typeof p<"u"&&Y.setLabel(p),typeof v<"u"&&Y.setOpacity(v),y&&Y.setShape(y),typeof g=="string"&&Y.setTitle(g),typeof S=="number"&&Y.setZIndex(S),L&&Oe(google.maps.event.addListener(Y,"dblclick",L)),_&&we(google.maps.event.addListener(Y,"dragend",_)),E&&Se(google.maps.event.addListener(Y,"dragstart",E)),k&&Re(google.maps.event.addListener(Y,"mousedown",k)),h&&Q(google.maps.event.addListener(Y,"mouseout",h)),b&&Fe(google.maps.event.addListener(Y,"mouseover",b)),x&&nt(google.maps.event.addListener(Y,"mouseup",x)),M&&qr(google.maps.event.addListener(Y,"rightclick",M)),w&&Kr(google.maps.event.addListener(Y,"click",w)),m&&z(google.maps.event.addListener(Y,"drag",m)),P&&me(google.maps.event.addListener(Y,"clickable_changed",P)),O&&Be(google.maps.event.addListener(Y,"cursor_changed",O)),R&&st(google.maps.event.addListener(Y,"animation_changed",R)),D&&Ge(google.maps.event.addListener(Y,"draggable_changed",D)),j&&Ke(google.maps.event.addListener(Y,"flat_changed",j)),U&&dt(google.maps.event.addListener(Y,"icon_changed",U)),N&&nr(google.maps.event.addListener(Y,"position_changed",N)),V&&ir(google.maps.event.addListener(Y,"shape_changed",V)),q&&or(google.maps.event.addListener(Y,"title_changed",q)),$&&pn(google.maps.event.addListener(Y,"visible_changed",$)),F&&sr(google.maps.event.addListener(Y,"zindex_changed",F)),fe(Y),Z&&Z(Y),function(){H!==null&&google.maps.event.removeListener(H),se!==null&&google.maps.event.removeListener(se),pe!==null&&google.maps.event.removeListener(pe),Ce!==null&&google.maps.event.removeListener(Ce),Ve!==null&&google.maps.event.removeListener(Ve),W!==null&&google.maps.event.removeListener(W),ut!==null&&google.maps.event.removeListener(ut),fn!==null&&google.maps.event.removeListener(fn),jt!==null&&google.maps.event.removeListener(jt),Te!==null&&google.maps.event.removeListener(Te),_e!==null&&google.maps.event.removeListener(_e),de!==null&&google.maps.event.removeListener(de),rt!==null&&google.maps.event.removeListener(rt),ft!==null&&google.maps.event.removeListener(ft),xt!==null&&google.maps.event.removeListener(xt),Ut!==null&&google.maps.event.removeListener(Ut),dn!==null&&google.maps.event.removeListener(dn),hn!==null&&google.maps.event.removeListener(hn),vn!==null&&google.maps.event.removeListener(vn),te&&te(Y),r?r.removeMarker(Y,!!i):Y&&Y.setMap(null)}},[]);var ar=u.useMemo(function(){return o?u.Children.map(o,function(Kt){if(!u.isValidElement(Kt))return Kt;var Y=Kt;return u.cloneElement(Y,{anchor:T})}):null},[o,T]);return C.jsx(C.Fragment,{children:ar})||null}u.memo(xg);var Cc=function(t){Ie(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=G(G(G({},this.props.options||zi),this.props.clusterer?zi:{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=ae({updaterMap:Ua,eventMap:Ba,prevProps:{},nextProps:this.props,instance:this.marker}),this.props.onLoad&&this.props.onLoad(this.marker)},e.prototype.componentDidUpdate=function(n){this.marker&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:Ua,eventMap:Ba,prevProps:n,nextProps:this.props,instance:this.marker}))},e.prototype.componentWillUnmount=function(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),ce(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=u.Children.map(this.props.children,function(i){if(!u.isValidElement(i))return i;var o=i;return u.cloneElement(o,{anchor:n.marker})})),r||null},e.contextType=ie,e}(u.PureComponent),Cg=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(" "),c=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 p=document.createElement("img");p.alt=a,p.src=this.url,p.width=this.width,p.height=this.height,p.setAttribute("style","position: absolute; top: ".concat(f,"px; left: ").concat(c,"px")),this.cluster.getClusterer().enableRetinaIcons||(p.style.clip="rect(-".concat(f,"px, -").concat(c+this.width,"px, -").concat(f+this.height,", -").concat(c,")"));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(p),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}(),_g=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 Cg(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,c=this.markers;l<c.length;l++){var f=c[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 Mg(t,e){var n=t.length,r=n.toString().length,i=Math.min(r,e);return{text:n.toString(),index:i,title:""}}var Og=2e3,kg=500,Pg="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",Rg="png",Tg=[53,56,66,78,90],Ag="cluster",_c=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||Pg,this.imageExtension=r.imageExtension||Rg,this.imageSizes=r.imageSizes||Tg,this.calculator=r.calculator||Mg,this.batchSize=r.batchSize||Og,this.batchSizeIE=r.batchSizeIE||kg,this.clusterClass=r.clusterClass||Ag,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 c=l[a];google.maps.event.removeListener(c)}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(),c=e.getPosition();if(l&&c){var f=this.distanceBetweenPoints(l,c);f<r&&(r=f,i=n)}}i&&i.isMarkerInClusterBounds(e)?i.addMarker(e):(n=new _g(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),c=e;c<l;c++){var f=this.markers[c];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,p=this.clusters;d<p.length;d++){var v=p[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}(),yt={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},ye={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)}},Dg={};function Ig(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,c=t.ignoreHidden,f=t.imageExtension,d=t.imagePath,p=t.imageSizes,v=t.maxZoom,y=t.minimumClusterSize,g=t.styles,S=t.title,w=t.zoomOnClick,L=t.onClick,m=t.onClusteringBegin,_=t.onClusteringEnd,E=t.onMouseOver,h=t.onMouseOut,b=t.onLoad,x=t.onUnmount,k=u.useState(null),M=k[0],P=k[1],O=u.useContext(ie),R=u.useState(null),D=R[0],j=R[1],U=u.useState(null),N=U[0],V=U[1],q=u.useState(null),$=q[0],F=q[1],Z=u.useState(null),te=Z[0],X=Z[1],J=u.useState(null),T=J[0],fe=J[1];return u.useEffect(function(){M&&h&&(te!==null&&google.maps.event.removeListener(te),X(google.maps.event.addListener(M,yt.onMouseOut,h)))},[h]),u.useEffect(function(){M&&E&&(T!==null&&google.maps.event.removeListener(T),fe(google.maps.event.addListener(M,yt.onMouseOver,E)))},[E]),u.useEffect(function(){M&&L&&(D!==null&&google.maps.event.removeListener(D),j(google.maps.event.addListener(M,yt.onClick,L)))},[L]),u.useEffect(function(){M&&m&&(N!==null&&google.maps.event.removeListener(N),V(google.maps.event.addListener(M,yt.onClusteringBegin,m)))},[m]),u.useEffect(function(){M&&_&&($!==null&&google.maps.event.removeListener($),V(google.maps.event.addListener(M,yt.onClusteringEnd,_)))},[_]),u.useEffect(function(){typeof r<"u"&&M!==null&&ye.averageCenter(M,r)},[M,r]),u.useEffect(function(){typeof i<"u"&&M!==null&&ye.batchSizeIE(M,i)},[M,i]),u.useEffect(function(){typeof o<"u"&&M!==null&&ye.calculator(M,o)},[M,o]),u.useEffect(function(){typeof s<"u"&&M!==null&&ye.clusterClass(M,s)},[M,s]),u.useEffect(function(){typeof a<"u"&&M!==null&&ye.enableRetinaIcons(M,a)},[M,a]),u.useEffect(function(){typeof l<"u"&&M!==null&&ye.gridSize(M,l)},[M,l]),u.useEffect(function(){typeof c<"u"&&M!==null&&ye.ignoreHidden(M,c)},[M,c]),u.useEffect(function(){typeof f<"u"&&M!==null&&ye.imageExtension(M,f)},[M,f]),u.useEffect(function(){typeof d<"u"&&M!==null&&ye.imagePath(M,d)},[M,d]),u.useEffect(function(){typeof p<"u"&&M!==null&&ye.imageSizes(M,p)},[M,p]),u.useEffect(function(){typeof v<"u"&&M!==null&&ye.maxZoom(M,v)},[M,v]),u.useEffect(function(){typeof y<"u"&&M!==null&&ye.minimumClusterSize(M,y)},[M,y]),u.useEffect(function(){typeof g<"u"&&M!==null&&ye.styles(M,g)},[M,g]),u.useEffect(function(){typeof S<"u"&&M!==null&&ye.title(M,S)},[M,S]),u.useEffect(function(){typeof w<"u"&&M!==null&&ye.zoomOnClick(M,w)},[M,w]),u.useEffect(function(){if(O){var xe=G({},n||Dg),H=new _c(O,[],xe);return r&&ye.averageCenter(H,r),i&&ye.batchSizeIE(H,i),o&&ye.calculator(H,o),s&&ye.clusterClass(H,s),a&&ye.enableRetinaIcons(H,a),l&&ye.gridSize(H,l),c&&ye.ignoreHidden(H,c),f&&ye.imageExtension(H,f),d&&ye.imagePath(H,d),p&&ye.imageSizes(H,p),v&&ye.maxZoom(H,v),y&&ye.minimumClusterSize(H,y),g&&ye.styles(H,g),S&&ye.title(H,S),w&&ye.zoomOnClick(H,w),h&&X(google.maps.event.addListener(H,yt.onMouseOut,h)),E&&fe(google.maps.event.addListener(H,yt.onMouseOver,E)),L&&j(google.maps.event.addListener(H,yt.onClick,L)),m&&V(google.maps.event.addListener(H,yt.onClusteringBegin,m)),_&&F(google.maps.event.addListener(H,yt.onClusteringEnd,_)),P(H),b&&b(H),function(){te!==null&&google.maps.event.removeListener(te),T!==null&&google.maps.event.removeListener(T),D!==null&&google.maps.event.removeListener(D),N!==null&&google.maps.event.removeListener(N),$!==null&&google.maps.event.removeListener($),x&&x(H)}}},[]),M!==null&&e(M)||null}u.memo(Ig);var Ng=function(t){Ie(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 _c(this.context,[],this.props.options);this.registeredEvents=ae({updaterMap:ye,eventMap:yt,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{markerClusterer:n}},this.setClustererCallback)}},e.prototype.componentDidUpdate=function(n){this.state.markerClusterer&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:ye,eventMap:yt,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),ce(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=ie,e}(u.PureComponent);function Va(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}var Mc=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(c){c.returnValue=!1,c.preventDefault&&c.preventDefault(),e.enableEventPropagation||Va(c)};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,Va))}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,c=this.pixelOffset.width,f=this.pixelOffset.height,d=this.div.offsetWidth,p=this.div.offsetHeight,v=this.infoBoxClearance.width,y=this.infoBoxClearance.height,g=this.getProjection(),S=g.fromLatLngToContainerPixel(this.position);S!==null&&(S.x<-c+v?r=S.x+c-v:S.x+d+c+v>a&&(r=S.x+d+c+v-a),this.alignBottom?S.y<-f+y+p?i=S.y+f-y-p:S.y+f+y>l&&(i=S.y+f+y-l):S.y<-f+y?i=S.y+f-y:S.y+p+f+y>l&&(i=S.y+p+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}(),Fa={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},za={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)}},jg={};function Bg(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,c=t.onPositionChanged,f=t.onZindexChanged,d=t.onLoad,p=t.onUnmount,v=u.useContext(ie),y=u.useState(null),g=y[0],S=y[1],w=u.useState(null),L=w[0],m=w[1],_=u.useState(null),E=_[0],h=_[1],b=u.useState(null),x=b[0],k=b[1],M=u.useState(null),P=M[0],O=M[1],R=u.useState(null),D=R[0],j=R[1],U=u.useRef(null);return u.useEffect(function(){v&&g!==null&&(g.close(),n?g.open(v,n):g.getPosition()&&g.open(v))},[v,g,n]),u.useEffect(function(){r&&g!==null&&g.setOptions(r)},[g,r]),u.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]),u.useEffect(function(){typeof o=="number"&&g!==null&&g.setZIndex(o)},[o]),u.useEffect(function(){g&&s&&(L!==null&&google.maps.event.removeListener(L),m(google.maps.event.addListener(g,"closeclick",s)))},[s]),u.useEffect(function(){g&&a&&(E!==null&&google.maps.event.removeListener(E),h(google.maps.event.addListener(g,"domready",a)))},[a]),u.useEffect(function(){g&&l&&(x!==null&&google.maps.event.removeListener(x),k(google.maps.event.addListener(g,"content_changed",l)))},[l]),u.useEffect(function(){g&&c&&(P!==null&&google.maps.event.removeListener(P),O(google.maps.event.addListener(g,"position_changed",c)))},[c]),u.useEffect(function(){g&&f&&(D!==null&&google.maps.event.removeListener(D),j(google.maps.event.addListener(g,"zindex_changed",f)))},[f]),u.useEffect(function(){if(v){var N=r||jg,V=N.position,q=qs(N,["position"]),$=void 0;V&&!(V instanceof google.maps.LatLng)&&($=new google.maps.LatLng(V.lat,V.lng));var F=new Mc(G(G({},q),$?{position:$}:{}));U.current=document.createElement("div"),S(F),s&&m(google.maps.event.addListener(F,"closeclick",s)),a&&h(google.maps.event.addListener(F,"domready",a)),l&&k(google.maps.event.addListener(F,"content_changed",l)),c&&O(google.maps.event.addListener(F,"position_changed",c)),f&&j(google.maps.event.addListener(F,"zindex_changed",f)),F.setContent(U.current),n?F.open(v,n):F.getPosition()?F.open(v):We(!1,"You must provide either an anchor or a position prop for <InfoBox>."),d&&d(F)}return function(){g!==null&&(L&&google.maps.event.removeListener(L),x&&google.maps.event.removeListener(x),E&&google.maps.event.removeListener(E),P&&google.maps.event.removeListener(P),D&&google.maps.event.removeListener(D),p&&p(g),g.close())}},[]),U.current?Qn.createPortal(u.Children.only(e),U.current):null}u.memo(Bg);(function(t){Ie(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):We(!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=qs(n,["position"]),o;r&&!(r instanceof google.maps.LatLng)&&(o=new google.maps.LatLng(r.lat,r.lng));var s=new Mc(G(G({},i),o?{position:o}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=ae({updaterMap:za,eventMap:Fa,prevProps:{},nextProps:this.props,instance:s}),this.setState({infoBox:s},this.setInfoBoxCallback)},e.prototype.componentDidUpdate=function(n){var r=this.state.infoBox;r!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:za,eventMap:Fa,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),ce(this.registeredEvents),r.close())},e.prototype.render=function(){return this.containerElement?Qn.createPortal(u.Children.only(this.props.children),this.containerElement):null},e.contextType=ie,e})(u.PureComponent);var Ug=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},$a=bc(Ug);const Ha=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],xo=1,cr=8;class Ks{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!==xo)throw new Error(`Got v${i} data when expected v${xo}.`);const o=Ha[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 Ks(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=Ha.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,cr,e),this.coords=new this.ArrayType(this.data,cr+a+l,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(cr+s+a+l),this.ids=new this.IndexArrayType(this.data,cr,e),this.coords=new this.ArrayType(this.data,cr+a+l,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(xo<<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 us(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],c=[];for(;l.length;){const f=l.pop()||0,d=l.pop()||0,p=l.pop()||0;if(d-p<=a){for(let S=p;S<=d;S++){const w=s[2*S],L=s[2*S+1];w>=e&&w<=r&&L>=n&&L<=i&&c.push(o[S])}continue}const v=p+d>>1,y=s[2*v],g=s[2*v+1];y>=e&&y<=r&&g>=n&&g<=i&&c.push(o[v]),(f===0?e<=y:n<=g)&&(l.push(p),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 c}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=[],c=r*r;for(;a.length;){const f=a.pop()||0,d=a.pop()||0,p=a.pop()||0;if(d-p<=s){for(let S=p;S<=d;S++)Wa(o[2*S],o[2*S+1],e,n)<=c&&l.push(i[S]);continue}const v=p+d>>1,y=o[2*v],g=o[2*v+1];Wa(y,g,e,n)<=c&&l.push(i[v]),(f===0?e-r<=y:n-r<=g)&&(a.push(p),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 us(t,e,n,r,i,o){if(i-r<=n)return;const s=r+i>>1;Oc(t,e,s,r,i,o),us(t,e,n,r,s-1,1-o),us(t,e,n,s+1,i,1-o)}function Oc(t,e,n,r,i,o){for(;i>r;){if(i-r>600){const c=i-r+1,f=n-r+1,d=Math.log(c),p=.5*Math.exp(2*d/3),v=.5*Math.sqrt(d*p*(c-p)/c)*(f-c/2<0?-1:1),y=Math.max(r,Math.floor(n-f*p/c+v)),g=Math.min(i,Math.floor(n+(c-f)*p/c+v));Oc(t,e,n,y,g,o)}const s=e[2*n+o];let a=r,l=i;for(fr(t,e,r,n),e[2*i+o]>s&&fr(t,e,r,i);a<l;){for(fr(t,e,a,l),a++,l--;e[2*a+o]<s;)a++;for(;e[2*l+o]>s;)l--}e[2*r+o]===s?fr(t,e,r,l):(l++,fr(t,e,l,i)),l<=n&&(r=l+1),n<=l&&(i=l-1)}}function fr(t,e,n,r){Co(t,n,r),Co(e,2*n,2*r),Co(e,2*n+1,2*r+1)}function Co(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Wa(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}const Vg={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},Ga=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),mn=2,nn=3,_o=4,Qt=5,kc=6;class Fg{constructor(e){this.options=Object.assign(Object.create(Vg),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 c=e[l];if(!c.geometry)continue;const[f,d]=c.geometry.coordinates,p=Ga(ti(f)),v=Ga(ni(d));s.push(p,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 c=+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()-c)}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),p=this.getClusters([-180,i,o,s],n);return d.concat(p)}const a=this.trees[this._limitZoom(n)],l=a.range(ti(r),ni(s),ti(o),ni(i)),c=a.data,f=[];for(const d of l){const p=this.stride*d;f.push(c[p+Qt]>1?Za(c,p,this.clusterProps):this.points[c[p+nn]])}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],c=s[n*this.stride+1],f=o.within(l,c,a),d=[];for(const p of f){const v=p*this.stride;s[v+_o]===e&&d.push(s[v+Qt]>1?Za(s,v,this.clusterProps):this.points[s[v+nn]])}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,c=(r-l)/o,f=(r+1+l)/o,d={features:[]};return this._addTileFeatures(i.range((n-l)/o,c,(n+1+l)/o,f),i.data,n,r,o,d),n===0&&this._addTileFeatures(i.range(1-l/o,c,1,f),i.data,o,r,o,d),n===o-1&&this._addTileFeatures(i.range(0,c,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 Ks(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,c=n[l+Qt]>1;let f,d,p;if(c)f=Pc(n,l,this.clusterProps),d=n[l],p=n[l+1];else{const g=this.points[n[l+nn]];f=g.properties;const[S,w]=g.geometry.coordinates;d=ti(S),p=ni(w)}const v={type:1,geometry:[[Math.round(this.options.extent*(d*o-r)),Math.round(this.options.extent*(p*o-i))]],tags:f};let y;c||this.options.generateId?y=n[l+nn]:y=this.points[n[l+nn]].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,c=[],f=this.stride;for(let d=0;d<l.length;d+=f){if(l[d+mn]<=n)continue;l[d+mn]=n;const p=l[d],v=l[d+1],y=e.within(l[d],l[d+1],a),g=l[d+Qt];let S=g;for(const w of y){const L=w*f;l[L+mn]>n&&(S+=l[L+Qt])}if(S>g&&S>=s){let w=p*g,L=v*g,m,_=-1;const E=((d/f|0)<<5)+(n+1)+this.points.length;for(const h of y){const b=h*f;if(l[b+mn]<=n)continue;l[b+mn]=n;const x=l[b+Qt];w+=l[b]*x,L+=l[b+1]*x,l[b+_o]=E,o&&(m||(m=this._map(l,d,!0),_=this.clusterProps.length,this.clusterProps.push(m)),o(m,this._map(l,b)))}l[d+_o]=E,c.push(w/S,L/S,1/0,E,-1,S),o&&c.push(_)}else{for(let w=0;w<f;w++)c.push(l[d+w]);if(S>1)for(const w of y){const L=w*f;if(!(l[L+mn]<=n)){l[L+mn]=n;for(let m=0;m<f;m++)c.push(l[L+m])}}}}return c}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,n,r){if(e[n+Qt]>1){const s=this.clusterProps[e[n+kc]];return r?Object.assign({},s):s}const i=this.points[e[n+nn]].properties,o=this.options.map(i);return r&&o===i?Object.assign({},o):o}}function Za(t,e,n){return{type:"Feature",id:t[e+nn],properties:Pc(t,e,n),geometry:{type:"Point",coordinates:[zg(t[e]),$g(t[e+1])]}}}function Pc(t,e,n){const r=t[e+Qt],i=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,o=t[e+kc],s=o===-1?{}:Object.assign({},n[o]);return Object.assign(s,{cluster:!0,cluster_id:t[e+nn],point_count:r,point_count_abbreviated:i})}function ti(t){return t/360+.5}function ni(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 zg(t){return(t-.5)*360}function $g(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
|
|
49
49
|
Copyright (c) Microsoft Corporation.
|
|
50
50
|
|
|
51
51
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -58,12 +58,12 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
58
58
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
59
59
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
60
60
|
PERFORMANCE OF THIS SOFTWARE.
|
|
61
|
-
***************************************************************************** */function
|
|
61
|
+
***************************************************************************** */function Hg(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 mt{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 cs{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(mt.getPosition(n));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>mt.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(mt.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}class Wg{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return Gg(e)}}const Gg=t=>t.map(n=>new cs({position:mt.getPosition(n),markers:[n]}));class Zg extends Wg{constructor(e){var{maxZoom:n,radius:r=60}=e,i=Hg(e,["maxZoom","radius"]);super({maxZoom:n}),this.state={zoom:-1},this.superCluster=new Fg(Object.assign({maxZoom:this.maxZoom,radius:r},i))}calculate(e){let n=!1;const r={zoom:e.map.getZoom()};if(!$a(e.markers,this.markers)){n=!0,this.markers=[...e.markers];const i=this.markers.map(o=>{const s=mt.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=!$a(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 cs({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 cs({markers:[i],position:mt.getPosition(i)})}}class qg{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 Kg{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">
|
|
62
62
|
<circle cx="120" cy="120" opacity=".6" r="70" />
|
|
63
63
|
<circle cx="120" cy="120" opacity=".3" r="90" />
|
|
64
64
|
<circle cx="120" cy="120" opacity=".2" r="110" />
|
|
65
65
|
<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>
|
|
66
|
-
</svg>`,a=`Cluster of ${e} markers`,l=Number(google.maps.Marker.MAX_ZINDEX)+e;if(mt.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 c={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(c)}}function Xg(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class Ks{constructor(){Xg(Ks,google.maps.OverlayView)}}var Cr;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(Cr||(Cr={}));const Qg=(t,e,n)=>{n.fitBounds(e.bounds)};class ev extends Ks{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new Kg(r),renderer:o=new Yg,onClusterClick:s=Qg}){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:(mt.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,Cr.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)||mt.setMap(s.marker,null):o.push(s.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>o.forEach(s=>mt.setMap(s,null)))}google.maps.event.trigger(this,Cr.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=>mt.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new Jg(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=>mt.setMap(i,null)),this.onClusterClick&&r.marker.addListener("click",i=>{google.maps.event.trigger(this,Cr.CLUSTER_CLICK,r),this.onClusterClick(i,r,n)})),mt.setMap(r.marker,n)})}}function tv(t){var e=dg(),n=u.useState(null),r=n[0],i=n[1];return u.useEffect(function(){if(e&&r===null){var o=new ev(Z(Z({},t),{map:e}));i(o)}},[e]),r}function nv(t){var e=t.children,n=t.options,r=tv(n);return r!==null?e(r):null}u.memo(nv);var qa={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Ka={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function rv(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,c=t.onPositionChanged,f=t.onZindexChanged,d=t.onLoad,h=t.onUnmount,v=u.useContext(re),b=u.useState(null),g=b[0],S=b[1],w=u.useState(null),L=w[0],y=w[1],_=u.useState(null),x=_[0],p=_[1],m=u.useState(null),E=m[0],k=m[1],M=u.useState(null),O=M[0],P=M[1],A=u.useState(null),D=A[0],j=A[1],U=u.useRef(null);return u.useEffect(function(){g!==null&&(g.close(),n?g.open(v,n):g.getPosition()&&g.open(v))},[v,g,n]),u.useEffect(function(){r&&g!==null&&g.setOptions(r)},[g,r]),u.useEffect(function(){i&&g!==null&&g.setPosition(i)},[i]),u.useEffect(function(){typeof o=="number"&&g!==null&&g.setZIndex(o)},[o]),u.useEffect(function(){g&&s&&(L!==null&&google.maps.event.removeListener(L),y(google.maps.event.addListener(g,"closeclick",s)))},[s]),u.useEffect(function(){g&&a&&(x!==null&&google.maps.event.removeListener(x),p(google.maps.event.addListener(g,"domready",a)))},[a]),u.useEffect(function(){g&&l&&(E!==null&&google.maps.event.removeListener(E),k(google.maps.event.addListener(g,"content_changed",l)))},[l]),u.useEffect(function(){g&&c&&(O!==null&&google.maps.event.removeListener(O),P(google.maps.event.addListener(g,"position_changed",c)))},[c]),u.useEffect(function(){g&&f&&(D!==null&&google.maps.event.removeListener(D),j(google.maps.event.addListener(g,"zindex_changed",f)))},[f]),u.useEffect(function(){var N=new google.maps.InfoWindow(Z({},r||{}));return S(N),U.current=document.createElement("div"),s&&y(google.maps.event.addListener(N,"closeclick",s)),a&&p(google.maps.event.addListener(N,"domready",a)),l&&k(google.maps.event.addListener(N,"content_changed",l)),c&&P(google.maps.event.addListener(N,"position_changed",c)),f&&j(google.maps.event.addListener(N,"zindex_changed",f)),N.setContent(U.current),i&&N.setPosition(i),o&&N.setZIndex(o),n?N.open(v,n):N.getPosition()?N.open(v):We(!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),O&&google.maps.event.removeListener(O),D&&google.maps.event.removeListener(D),h&&h(N),N.close()}},[]),U.current?Qn.createPortal(u.Children.only(e),U.current):null}u.memo(rv);var Pc=function(t){Ie(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):We(!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(Z({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=se({updaterMap:Ka,eventMap:qa,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{infoWindow:n}},this.setInfoWindowCallback)},e.prototype.componentDidUpdate=function(n){this.state.infoWindow!==null&&(ue(this.registeredEvents),this.registeredEvents=se({updaterMap:Ka,eventMap:qa,prevProps:n,nextProps:this.props,instance:this.state.infoWindow}))},e.prototype.componentWillUnmount=function(){this.state.infoWindow!==null&&(ue(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},e.prototype.render=function(){return this.containerElement?Qn.createPortal(u.Children.only(this.props.children),this.containerElement):null},e.contextType=re,e}(u.PureComponent),Ja={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Ya={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)}},iv={};function ov(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,c=t.onMouseDown,f=t.onMouseMove,d=t.onMouseOut,h=t.onMouseOver,v=t.onMouseUp,b=t.onRightClick,g=t.onClick,S=t.onDrag,w=t.onLoad,L=t.onUnmount,y=u.useContext(re),_=u.useState(null),x=_[0],p=_[1],m=u.useState(null),E=m[0],k=m[1],M=u.useState(null),O=M[0],P=M[1],A=u.useState(null),D=A[0],j=A[1],U=u.useState(null),N=U[0],F=U[1],q=u.useState(null),H=q[0],V=q[1],$=u.useState(null),ie=$[0],W=$[1],te=u.useState(null),R=te[0],ce=te[1],fe=u.useState(null),K=fe[0],Se=fe[1],Ae=u.useState(null),de=Ae[0],Le=Ae[1],Ne=u.useState(null),ge=Ne[0],Ee=Ne[1],ke=u.useState(null),_e=ke[0],Pe=ke[1];return u.useEffect(function(){x!==null&&x.setMap(y)},[y]),u.useEffect(function(){typeof e<"u"&&x!==null&&x.setOptions(e)},[x,e]),u.useEffect(function(){typeof n<"u"&&x!==null&&x.setDraggable(n)},[x,n]),u.useEffect(function(){typeof r<"u"&&x!==null&&x.setEditable(r)},[x,r]),u.useEffect(function(){typeof i<"u"&&x!==null&&x.setVisible(i)},[x,i]),u.useEffect(function(){typeof o<"u"&&x!==null&&x.setPath(o)},[x,o]),u.useEffect(function(){x&&s&&(E!==null&&google.maps.event.removeListener(E),k(google.maps.event.addListener(x,"dblclick",s)))},[s]),u.useEffect(function(){x&&a&&(O!==null&&google.maps.event.removeListener(O),P(google.maps.event.addListener(x,"dragend",a)))},[a]),u.useEffect(function(){x&&l&&(D!==null&&google.maps.event.removeListener(D),j(google.maps.event.addListener(x,"dragstart",l)))},[l]),u.useEffect(function(){x&&c&&(N!==null&&google.maps.event.removeListener(N),F(google.maps.event.addListener(x,"mousedown",c)))},[c]),u.useEffect(function(){x&&f&&(H!==null&&google.maps.event.removeListener(H),V(google.maps.event.addListener(x,"mousemove",f)))},[f]),u.useEffect(function(){x&&d&&(ie!==null&&google.maps.event.removeListener(ie),W(google.maps.event.addListener(x,"mouseout",d)))},[d]),u.useEffect(function(){x&&h&&(R!==null&&google.maps.event.removeListener(R),ce(google.maps.event.addListener(x,"mouseover",h)))},[h]),u.useEffect(function(){x&&v&&(K!==null&&google.maps.event.removeListener(K),Se(google.maps.event.addListener(x,"mouseup",v)))},[v]),u.useEffect(function(){x&&b&&(de!==null&&google.maps.event.removeListener(de),Le(google.maps.event.addListener(x,"rightclick",b)))},[b]),u.useEffect(function(){x&&g&&(ge!==null&&google.maps.event.removeListener(ge),Ee(google.maps.event.addListener(x,"click",g)))},[g]),u.useEffect(function(){x&&S&&(_e!==null&&google.maps.event.removeListener(_e),Pe(google.maps.event.addListener(x,"drag",S)))},[S]),u.useEffect(function(){var Q=new google.maps.Polyline(Z(Z({},e||iv),{map:y}));return o&&Q.setPath(o),typeof i<"u"&&Q.setVisible(i),typeof r<"u"&&Q.setEditable(r),typeof n<"u"&&Q.setDraggable(n),s&&k(google.maps.event.addListener(Q,"dblclick",s)),a&&P(google.maps.event.addListener(Q,"dragend",a)),l&&j(google.maps.event.addListener(Q,"dragstart",l)),c&&F(google.maps.event.addListener(Q,"mousedown",c)),f&&V(google.maps.event.addListener(Q,"mousemove",f)),d&&W(google.maps.event.addListener(Q,"mouseout",d)),h&&ce(google.maps.event.addListener(Q,"mouseover",h)),v&&Se(google.maps.event.addListener(Q,"mouseup",v)),b&&Le(google.maps.event.addListener(Q,"rightclick",b)),g&&Ee(google.maps.event.addListener(Q,"click",g)),S&&Pe(google.maps.event.addListener(Q,"drag",S)),p(Q),w&&w(Q),function(){E!==null&&google.maps.event.removeListener(E),O!==null&&google.maps.event.removeListener(O),D!==null&&google.maps.event.removeListener(D),N!==null&&google.maps.event.removeListener(N),H!==null&&google.maps.event.removeListener(H),ie!==null&&google.maps.event.removeListener(ie),R!==null&&google.maps.event.removeListener(R),K!==null&&google.maps.event.removeListener(K),de!==null&&google.maps.event.removeListener(de),ge!==null&&google.maps.event.removeListener(ge),L&&L(Q),Q.setMap(null)}},[]),null}u.memo(ov);(function(t){Ie(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(Z(Z({},this.props.options||{}),{map:this.context}));this.registeredEvents=se({updaterMap:Ya,eventMap:Ja,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polyline:n}},this.setPolylineCallback)},e.prototype.componentDidUpdate=function(n){this.state.polyline!==null&&(ue(this.registeredEvents),this.registeredEvents=se({updaterMap:Ya,eventMap:Ja,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),ue(this.registeredEvents),this.state.polyline.setMap(null))},e.prototype.render=function(){return null},e.contextType=re,e})(u.PureComponent);var Xa={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Qa={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 sv(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,c=t.onDragStart,f=t.onMouseDown,d=t.onMouseMove,h=t.onMouseOut,v=t.onMouseOver,b=t.onMouseUp,g=t.onRightClick,S=t.onClick,w=t.onDrag,L=t.onLoad,y=t.onUnmount,_=t.onEdit,x=u.useContext(re),p=u.useState(null),m=p[0],E=p[1],k=u.useState(null),M=k[0],O=k[1],P=u.useState(null),A=P[0],D=P[1],j=u.useState(null),U=j[0],N=j[1],F=u.useState(null),q=F[0],H=F[1],V=u.useState(null),$=V[0],ie=V[1],W=u.useState(null),te=W[0],R=W[1],ce=u.useState(null),fe=ce[0],K=ce[1],Se=u.useState(null),Ae=Se[0],de=Se[1],Le=u.useState(null),Ne=Le[0],ge=Le[1],Ee=u.useState(null),ke=Ee[0],_e=Ee[1],Pe=u.useState(null),Q=Pe[0],Ve=Pe[1];return u.useEffect(function(){m!==null&&m.setMap(x)},[x]),u.useEffect(function(){typeof e<"u"&&m!==null&&m.setOptions(e)},[m,e]),u.useEffect(function(){typeof n<"u"&&m!==null&&m.setDraggable(n)},[m,n]),u.useEffect(function(){typeof r<"u"&&m!==null&&m.setEditable(r)},[m,r]),u.useEffect(function(){typeof i<"u"&&m!==null&&m.setVisible(i)},[m,i]),u.useEffect(function(){typeof o<"u"&&m!==null&&m.setPath(o)},[m,o]),u.useEffect(function(){typeof s<"u"&&m!==null&&m.setPaths(s)},[m,s]),u.useEffect(function(){m&&a&&(M!==null&&google.maps.event.removeListener(M),O(google.maps.event.addListener(m,"dblclick",a)))},[a]),u.useEffect(function(){m&&(google.maps.event.addListener(m.getPath(),"insert_at",function(){_==null||_(m)}),google.maps.event.addListener(m.getPath(),"set_at",function(){_==null||_(m)}))},[m,_]),u.useEffect(function(){m&&l&&(A!==null&&google.maps.event.removeListener(A),D(google.maps.event.addListener(m,"dragend",l)))},[l]),u.useEffect(function(){m&&c&&(U!==null&&google.maps.event.removeListener(U),N(google.maps.event.addListener(m,"dragstart",c)))},[c]),u.useEffect(function(){m&&f&&(q!==null&&google.maps.event.removeListener(q),H(google.maps.event.addListener(m,"mousedown",f)))},[f]),u.useEffect(function(){m&&d&&($!==null&&google.maps.event.removeListener($),ie(google.maps.event.addListener(m,"mousemove",d)))},[d]),u.useEffect(function(){m&&h&&(te!==null&&google.maps.event.removeListener(te),R(google.maps.event.addListener(m,"mouseout",h)))},[h]),u.useEffect(function(){m&&v&&(fe!==null&&google.maps.event.removeListener(fe),K(google.maps.event.addListener(m,"mouseover",v)))},[v]),u.useEffect(function(){m&&b&&(Ae!==null&&google.maps.event.removeListener(Ae),de(google.maps.event.addListener(m,"mouseup",b)))},[b]),u.useEffect(function(){m&&g&&(Ne!==null&&google.maps.event.removeListener(Ne),ge(google.maps.event.addListener(m,"rightclick",g)))},[g]),u.useEffect(function(){m&&S&&(ke!==null&&google.maps.event.removeListener(ke),_e(google.maps.event.addListener(m,"click",S)))},[S]),u.useEffect(function(){m&&w&&(Q!==null&&google.maps.event.removeListener(Q),Ve(google.maps.event.addListener(m,"drag",w)))},[w]),u.useEffect(function(){var X=new google.maps.Polygon(Z(Z({},e||{}),{map:x}));return o&&X.setPath(o),s&&X.setPaths(s),typeof i<"u"&&X.setVisible(i),typeof r<"u"&&X.setEditable(r),typeof n<"u"&&X.setDraggable(n),a&&O(google.maps.event.addListener(X,"dblclick",a)),l&&D(google.maps.event.addListener(X,"dragend",l)),c&&N(google.maps.event.addListener(X,"dragstart",c)),f&&H(google.maps.event.addListener(X,"mousedown",f)),d&&ie(google.maps.event.addListener(X,"mousemove",d)),h&&R(google.maps.event.addListener(X,"mouseout",h)),v&&K(google.maps.event.addListener(X,"mouseover",v)),b&&de(google.maps.event.addListener(X,"mouseup",b)),g&&ge(google.maps.event.addListener(X,"rightclick",g)),S&&_e(google.maps.event.addListener(X,"click",S)),w&&Ve(google.maps.event.addListener(X,"drag",w)),E(X),L&&L(X),function(){M!==null&&google.maps.event.removeListener(M),A!==null&&google.maps.event.removeListener(A),U!==null&&google.maps.event.removeListener(U),q!==null&&google.maps.event.removeListener(q),$!==null&&google.maps.event.removeListener($),te!==null&&google.maps.event.removeListener(te),fe!==null&&google.maps.event.removeListener(fe),Ae!==null&&google.maps.event.removeListener(Ae),Ne!==null&&google.maps.event.removeListener(Ne),ke!==null&&google.maps.event.removeListener(ke),y&&y(X),X.setMap(null)}},[]),null}u.memo(sv);(function(t){Ie(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(Z(Z({},this.props.options||{}),{map:this.context}));this.registeredEvents=se({updaterMap:Qa,eventMap:Xa,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polygon:n}},this.setPolygonCallback)},e.prototype.componentDidUpdate=function(n){this.state.polygon!==null&&(ue(this.registeredEvents),this.registeredEvents=se({updaterMap:Qa,eventMap:Xa,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),ue(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},e.prototype.render=function(){return null},e.contextType=re,e})(u.PureComponent);var el={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"},tl={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 av(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,c=t.onMouseDown,f=t.onMouseMove,d=t.onMouseOut,h=t.onMouseOver,v=t.onMouseUp,b=t.onRightClick,g=t.onClick,S=t.onDrag,w=t.onBoundsChanged,L=t.onLoad,y=t.onUnmount,_=u.useContext(re),x=u.useState(null),p=x[0],m=x[1],E=u.useState(null),k=E[0],M=E[1],O=u.useState(null),P=O[0],A=O[1],D=u.useState(null),j=D[0],U=D[1],N=u.useState(null),F=N[0],q=N[1],H=u.useState(null),V=H[0],$=H[1],ie=u.useState(null),W=ie[0],te=ie[1],R=u.useState(null),ce=R[0],fe=R[1],K=u.useState(null),Se=K[0],Ae=K[1],de=u.useState(null),Le=de[0],Ne=de[1],ge=u.useState(null),Ee=ge[0],ke=ge[1],_e=u.useState(null),Pe=_e[0],Q=_e[1],Ve=u.useState(null),X=Ve[0],qe=Ve[1];return u.useEffect(function(){p!==null&&p.setMap(_)},[_]),u.useEffect(function(){typeof e<"u"&&p!==null&&p.setOptions(e)},[p,e]),u.useEffect(function(){typeof r<"u"&&p!==null&&p.setDraggable(r)},[p,r]),u.useEffect(function(){typeof i<"u"&&p!==null&&p.setEditable(i)},[p,i]),u.useEffect(function(){typeof o<"u"&&p!==null&&p.setVisible(o)},[p,o]),u.useEffect(function(){typeof n<"u"&&p!==null&&p.setBounds(n)},[p,n]),u.useEffect(function(){p&&s&&(k!==null&&google.maps.event.removeListener(k),M(google.maps.event.addListener(p,"dblclick",s)))},[s]),u.useEffect(function(){p&&a&&(P!==null&&google.maps.event.removeListener(P),A(google.maps.event.addListener(p,"dragend",a)))},[a]),u.useEffect(function(){p&&l&&(j!==null&&google.maps.event.removeListener(j),U(google.maps.event.addListener(p,"dragstart",l)))},[l]),u.useEffect(function(){p&&c&&(F!==null&&google.maps.event.removeListener(F),q(google.maps.event.addListener(p,"mousedown",c)))},[c]),u.useEffect(function(){p&&f&&(V!==null&&google.maps.event.removeListener(V),$(google.maps.event.addListener(p,"mousemove",f)))},[f]),u.useEffect(function(){p&&d&&(W!==null&&google.maps.event.removeListener(W),te(google.maps.event.addListener(p,"mouseout",d)))},[d]),u.useEffect(function(){p&&h&&(ce!==null&&google.maps.event.removeListener(ce),fe(google.maps.event.addListener(p,"mouseover",h)))},[h]),u.useEffect(function(){p&&v&&(Se!==null&&google.maps.event.removeListener(Se),Ae(google.maps.event.addListener(p,"mouseup",v)))},[v]),u.useEffect(function(){p&&b&&(Le!==null&&google.maps.event.removeListener(Le),Ne(google.maps.event.addListener(p,"rightclick",b)))},[b]),u.useEffect(function(){p&&g&&(Ee!==null&&google.maps.event.removeListener(Ee),ke(google.maps.event.addListener(p,"click",g)))},[g]),u.useEffect(function(){p&&S&&(Pe!==null&&google.maps.event.removeListener(Pe),Q(google.maps.event.addListener(p,"drag",S)))},[S]),u.useEffect(function(){p&&w&&(X!==null&&google.maps.event.removeListener(X),qe(google.maps.event.addListener(p,"bounds_changed",w)))},[w]),u.useEffect(function(){var G=new google.maps.Rectangle(Z(Z({},e||{}),{map:_}));return typeof o<"u"&&G.setVisible(o),typeof i<"u"&&G.setEditable(i),typeof r<"u"&&G.setDraggable(r),typeof n<"u"&&G.setBounds(n),s&&M(google.maps.event.addListener(G,"dblclick",s)),a&&A(google.maps.event.addListener(G,"dragend",a)),l&&U(google.maps.event.addListener(G,"dragstart",l)),c&&q(google.maps.event.addListener(G,"mousedown",c)),f&&$(google.maps.event.addListener(G,"mousemove",f)),d&&te(google.maps.event.addListener(G,"mouseout",d)),h&&fe(google.maps.event.addListener(G,"mouseover",h)),v&&Ae(google.maps.event.addListener(G,"mouseup",v)),b&&Ne(google.maps.event.addListener(G,"rightclick",b)),g&&ke(google.maps.event.addListener(G,"click",g)),S&&Q(google.maps.event.addListener(G,"drag",S)),w&&qe(google.maps.event.addListener(G,"bounds_changed",w)),m(G),L&&L(G),function(){k!==null&&google.maps.event.removeListener(k),P!==null&&google.maps.event.removeListener(P),j!==null&&google.maps.event.removeListener(j),F!==null&&google.maps.event.removeListener(F),V!==null&&google.maps.event.removeListener(V),W!==null&&google.maps.event.removeListener(W),ce!==null&&google.maps.event.removeListener(ce),Se!==null&&google.maps.event.removeListener(Se),Le!==null&&google.maps.event.removeListener(Le),Ee!==null&&google.maps.event.removeListener(Ee),Pe!==null&&google.maps.event.removeListener(Pe),X!==null&&google.maps.event.removeListener(X),y&&y(G),G.setMap(null)}},[]),null}u.memo(av);(function(t){Ie(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(Z(Z({},this.props.options||{}),{map:this.context}));this.registeredEvents=se({updaterMap:tl,eventMap:el,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{rectangle:n}},this.setRectangleCallback)},e.prototype.componentDidUpdate=function(n){this.state.rectangle!==null&&(ue(this.registeredEvents),this.registeredEvents=se({updaterMap:tl,eventMap:el,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),ue(this.registeredEvents),this.state.rectangle.setMap(null))},e.prototype.render=function(){return null},e.contextType=re,e})(u.PureComponent);var nl={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"},rl={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)}},lv={};function uv(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,c=t.onDragStart,f=t.onMouseDown,d=t.onMouseMove,h=t.onMouseOut,v=t.onMouseOver,b=t.onMouseUp,g=t.onRightClick,S=t.onClick,w=t.onDrag,L=t.onCenterChanged,y=t.onRadiusChanged,_=t.onLoad,x=t.onUnmount,p=u.useContext(re),m=u.useState(null),E=m[0],k=m[1],M=u.useState(null),O=M[0],P=M[1],A=u.useState(null),D=A[0],j=A[1],U=u.useState(null),N=U[0],F=U[1],q=u.useState(null),H=q[0],V=q[1],$=u.useState(null),ie=$[0],W=$[1],te=u.useState(null),R=te[0],ce=te[1],fe=u.useState(null),K=fe[0],Se=fe[1],Ae=u.useState(null),de=Ae[0],Le=Ae[1],Ne=u.useState(null),ge=Ne[0],Ee=Ne[1],ke=u.useState(null),_e=ke[0],Pe=ke[1],Q=u.useState(null),Ve=Q[0],X=Q[1],qe=u.useState(null),G=qe[0],Fe=qe[1],je=u.useState(null),ut=je[0],tt=je[1];return u.useEffect(function(){E!==null&&E.setMap(p)},[p]),u.useEffect(function(){typeof e<"u"&&E!==null&&E.setOptions(e)},[E,e]),u.useEffect(function(){typeof i<"u"&&E!==null&&E.setDraggable(i)},[E,i]),u.useEffect(function(){typeof o<"u"&&E!==null&&E.setEditable(o)},[E,o]),u.useEffect(function(){typeof s<"u"&&E!==null&&E.setVisible(s)},[E,s]),u.useEffect(function(){typeof r=="number"&&E!==null&&E.setRadius(r)},[E,r]),u.useEffect(function(){typeof n<"u"&&E!==null&&E.setCenter(n)},[E,n]),u.useEffect(function(){E&&a&&(O!==null&&google.maps.event.removeListener(O),P(google.maps.event.addListener(E,"dblclick",a)))},[a]),u.useEffect(function(){E&&l&&(D!==null&&google.maps.event.removeListener(D),j(google.maps.event.addListener(E,"dragend",l)))},[l]),u.useEffect(function(){E&&c&&(N!==null&&google.maps.event.removeListener(N),F(google.maps.event.addListener(E,"dragstart",c)))},[c]),u.useEffect(function(){E&&f&&(H!==null&&google.maps.event.removeListener(H),V(google.maps.event.addListener(E,"mousedown",f)))},[f]),u.useEffect(function(){E&&d&&(ie!==null&&google.maps.event.removeListener(ie),W(google.maps.event.addListener(E,"mousemove",d)))},[d]),u.useEffect(function(){E&&h&&(R!==null&&google.maps.event.removeListener(R),ce(google.maps.event.addListener(E,"mouseout",h)))},[h]),u.useEffect(function(){E&&v&&(K!==null&&google.maps.event.removeListener(K),Se(google.maps.event.addListener(E,"mouseover",v)))},[v]),u.useEffect(function(){E&&b&&(de!==null&&google.maps.event.removeListener(de),Le(google.maps.event.addListener(E,"mouseup",b)))},[b]),u.useEffect(function(){E&&g&&(ge!==null&&google.maps.event.removeListener(ge),Ee(google.maps.event.addListener(E,"rightclick",g)))},[g]),u.useEffect(function(){E&&S&&(_e!==null&&google.maps.event.removeListener(_e),Pe(google.maps.event.addListener(E,"click",S)))},[S]),u.useEffect(function(){E&&w&&(Ve!==null&&google.maps.event.removeListener(Ve),X(google.maps.event.addListener(E,"drag",w)))},[w]),u.useEffect(function(){E&&L&&(G!==null&&google.maps.event.removeListener(G),Fe(google.maps.event.addListener(E,"center_changed",L)))},[S]),u.useEffect(function(){E&&y&&(ut!==null&&google.maps.event.removeListener(ut),tt(google.maps.event.addListener(E,"radius_changed",y)))},[y]),u.useEffect(function(){var ee=new google.maps.Circle(Z(Z({},e||lv),{map:p}));return typeof r=="number"&&ee.setRadius(r),typeof n<"u"&&ee.setCenter(n),typeof r=="number"&&ee.setRadius(r),typeof s<"u"&&ee.setVisible(s),typeof o<"u"&&ee.setEditable(o),typeof i<"u"&&ee.setDraggable(i),a&&P(google.maps.event.addListener(ee,"dblclick",a)),l&&j(google.maps.event.addListener(ee,"dragend",l)),c&&F(google.maps.event.addListener(ee,"dragstart",c)),f&&V(google.maps.event.addListener(ee,"mousedown",f)),d&&W(google.maps.event.addListener(ee,"mousemove",d)),h&&ce(google.maps.event.addListener(ee,"mouseout",h)),v&&Se(google.maps.event.addListener(ee,"mouseover",v)),b&&Le(google.maps.event.addListener(ee,"mouseup",b)),g&&Ee(google.maps.event.addListener(ee,"rightclick",g)),S&&Pe(google.maps.event.addListener(ee,"click",S)),w&&X(google.maps.event.addListener(ee,"drag",w)),L&&Fe(google.maps.event.addListener(ee,"center_changed",L)),y&&tt(google.maps.event.addListener(ee,"radius_changed",y)),k(ee),_&&_(ee),function(){O!==null&&google.maps.event.removeListener(O),D!==null&&google.maps.event.removeListener(D),N!==null&&google.maps.event.removeListener(N),H!==null&&google.maps.event.removeListener(H),ie!==null&&google.maps.event.removeListener(ie),R!==null&&google.maps.event.removeListener(R),K!==null&&google.maps.event.removeListener(K),de!==null&&google.maps.event.removeListener(de),ge!==null&&google.maps.event.removeListener(ge),_e!==null&&google.maps.event.removeListener(_e),G!==null&&google.maps.event.removeListener(G),ut!==null&&google.maps.event.removeListener(ut),x&&x(ee),ee.setMap(null)}},[]),null}u.memo(uv);(function(t){Ie(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(Z(Z({},this.props.options||{}),{map:this.context}));this.registeredEvents=se({updaterMap:rl,eventMap:nl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{circle:n}},this.setCircleCallback)},e.prototype.componentDidUpdate=function(n){this.state.circle!==null&&(ue(this.registeredEvents),this.registeredEvents=se({updaterMap:rl,eventMap:nl,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),ue(this.registeredEvents),(n=this.state.circle)===null||n===void 0||n.setMap(null))},e.prototype.render=function(){return null},e.contextType=re,e})(u.PureComponent);var il={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},ol={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 cv(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,c=t.onRightClick,f=t.onAddFeature,d=t.onRemoveFeature,h=t.onRemoveProperty,v=t.onSetGeometry,b=t.onSetProperty,g=t.onLoad,S=t.onUnmount,w=u.useContext(re),L=u.useState(null),y=L[0],_=L[1],x=u.useState(null),p=x[0],m=x[1],E=u.useState(null),k=E[0],M=E[1],O=u.useState(null),P=O[0],A=O[1],D=u.useState(null),j=D[0],U=D[1],N=u.useState(null),F=N[0],q=N[1],H=u.useState(null),V=H[0],$=H[1],ie=u.useState(null),W=ie[0],te=ie[1],R=u.useState(null),ce=R[0],fe=R[1],K=u.useState(null),Se=K[0],Ae=K[1],de=u.useState(null),Le=de[0],Ne=de[1],ge=u.useState(null),Ee=ge[0],ke=ge[1],_e=u.useState(null),Pe=_e[0],Q=_e[1],Ve=u.useState(null),X=Ve[0],qe=Ve[1];return u.useEffect(function(){y!==null&&y.setMap(w)},[w]),u.useEffect(function(){y&&r&&(p!==null&&google.maps.event.removeListener(p),m(google.maps.event.addListener(y,"dblclick",r)))},[r]),u.useEffect(function(){y&&i&&(k!==null&&google.maps.event.removeListener(k),M(google.maps.event.addListener(y,"mousedown",i)))},[i]),u.useEffect(function(){y&&o&&(P!==null&&google.maps.event.removeListener(P),A(google.maps.event.addListener(y,"mousemove",o)))},[o]),u.useEffect(function(){y&&s&&(j!==null&&google.maps.event.removeListener(j),U(google.maps.event.addListener(y,"mouseout",s)))},[s]),u.useEffect(function(){y&&a&&(F!==null&&google.maps.event.removeListener(F),q(google.maps.event.addListener(y,"mouseover",a)))},[a]),u.useEffect(function(){y&&l&&(V!==null&&google.maps.event.removeListener(V),$(google.maps.event.addListener(y,"mouseup",l)))},[l]),u.useEffect(function(){y&&c&&(W!==null&&google.maps.event.removeListener(W),te(google.maps.event.addListener(y,"rightclick",c)))},[c]),u.useEffect(function(){y&&n&&(ce!==null&&google.maps.event.removeListener(ce),fe(google.maps.event.addListener(y,"click",n)))},[n]),u.useEffect(function(){y&&f&&(Se!==null&&google.maps.event.removeListener(Se),Ae(google.maps.event.addListener(y,"addfeature",f)))},[f]),u.useEffect(function(){y&&d&&(Le!==null&&google.maps.event.removeListener(Le),Ne(google.maps.event.addListener(y,"removefeature",d)))},[d]),u.useEffect(function(){y&&h&&(Ee!==null&&google.maps.event.removeListener(Ee),ke(google.maps.event.addListener(y,"removeproperty",h)))},[h]),u.useEffect(function(){y&&v&&(Pe!==null&&google.maps.event.removeListener(Pe),Q(google.maps.event.addListener(y,"setgeometry",v)))},[v]),u.useEffect(function(){y&&b&&(X!==null&&google.maps.event.removeListener(X),qe(google.maps.event.addListener(y,"setproperty",b)))},[b]),u.useEffect(function(){if(w!==null){var G=new google.maps.Data(Z(Z({},e||{}),{map:w}));r&&m(google.maps.event.addListener(G,"dblclick",r)),i&&M(google.maps.event.addListener(G,"mousedown",i)),o&&A(google.maps.event.addListener(G,"mousemove",o)),s&&U(google.maps.event.addListener(G,"mouseout",s)),a&&q(google.maps.event.addListener(G,"mouseover",a)),l&&$(google.maps.event.addListener(G,"mouseup",l)),c&&te(google.maps.event.addListener(G,"rightclick",c)),n&&fe(google.maps.event.addListener(G,"click",n)),f&&Ae(google.maps.event.addListener(G,"addfeature",f)),d&&Ne(google.maps.event.addListener(G,"removefeature",d)),h&&ke(google.maps.event.addListener(G,"removeproperty",h)),v&&Q(google.maps.event.addListener(G,"setgeometry",v)),b&&qe(google.maps.event.addListener(G,"setproperty",b)),_(G),g&&g(G)}return function(){y&&(p!==null&&google.maps.event.removeListener(p),k!==null&&google.maps.event.removeListener(k),P!==null&&google.maps.event.removeListener(P),j!==null&&google.maps.event.removeListener(j),F!==null&&google.maps.event.removeListener(F),V!==null&&google.maps.event.removeListener(V),W!==null&&google.maps.event.removeListener(W),ce!==null&&google.maps.event.removeListener(ce),Se!==null&&google.maps.event.removeListener(Se),Le!==null&&google.maps.event.removeListener(Le),Ee!==null&&google.maps.event.removeListener(Ee),Pe!==null&&google.maps.event.removeListener(Pe),X!==null&&google.maps.event.removeListener(X),S&&S(y),y.setMap(null))}},[]),null}u.memo(cv);(function(t){Ie(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(Z(Z({},this.props.options||{}),{map:this.context}));this.registeredEvents=se({updaterMap:ol,eventMap:il,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{data:n}},this.setDataCallback)}},e.prototype.componentDidUpdate=function(n){this.state.data!==null&&(ue(this.registeredEvents),this.registeredEvents=se({updaterMap:ol,eventMap:il,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),ue(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},e.prototype.render=function(){return null},e.contextType=re,e})(u.PureComponent);var sl={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},al={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}};(function(t){Ie(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(Z(Z({},this.props.options),{map:this.context}));this.registeredEvents=se({updaterMap:al,eventMap:sl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{kmlLayer:n}},this.setKmlLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.kmlLayer!==null&&(ue(this.registeredEvents),this.registeredEvents=se({updaterMap:al,eventMap:sl,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),ue(this.registeredEvents),this.state.kmlLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=re,e})(u.PureComponent);function Rc(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function fv(t,e){return new e(t.lat,t.lng)}function dv(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 hv(t,e,n){return t instanceof e?t:n(t,e)}function pv(t,e,n){return t instanceof e?t:n(t,e)}function gv(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 vv(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 Tc(t,e,n,r){return n!==void 0?gv(t,e,pv(n,google.maps.LatLngBounds,dv)):vv(t,e,hv(r,google.maps.LatLng,fv))}function mv(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function yv(t,e,n,r,i){var o=function(s){Ie(a,s);function a(l,c,f,d){var h=s.call(this)||this;return h.container=l,h.pane=c,h.position=f,h.bounds=d,h}return a.prototype.onAdd=function(){var l,c=(l=this.getPanes())===null||l===void 0?void 0:l[this.pane];c==null||c.appendChild(this.container)},a.prototype.draw=function(){for(var l=this.getProjection(),c=Z({},this.container?Rc(this.container,i):{x:0,y:0}),f=Tc(l,c,this.bounds,this.position),d=0,h=Object.entries(f);d<h.length;d++){var v=h[d],b=v[0],g=v[1];this.container.style[b]=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 ll(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function ul(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 bv(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,c=u.useContext(re),f=u.useMemo(function(){var h=document.createElement("div");return h.style.position="absolute",h},[]),d=u.useMemo(function(){return yv(f,r,e,n,a)},[f,r,e,n]);return u.useEffect(function(){return o==null||o(d),d==null||d.setMap(c),function(){s==null||s(d),d==null||d.setMap(null)}},[c,d]),u.useEffect(function(){f.style.zIndex="".concat(i)},[i,f]),xu.createPortal(l,f)}u.memo(bv);(function(t){Ie(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();We(!!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=Z({x:0,y:0},r.containerRef.current?Rc(r.containerRef.current,r.props.getPixelPositionOffset):{}),a=Tc(o,s,r.props.bounds,r.props.position),l=r.state.containerStyle,c=l.left,f=l.top,d=l.width,h=l.height;mv(a,{left:c,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=u.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=ll(n.position),i=ll(this.props.position),o=ul(n.bounds),s=ul(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?xu.createPortal(C.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:u.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=re,e})(u.PureComponent);function wv(){}var cl={onDblClick:"dblclick",onClick:"click"},fl={opacity:function(t,e){t.setOpacity(e)}};function Sv(t){var e=t.url,n=t.bounds,r=t.options,i=t.visible,o=u.useContext(re),s=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east)),a=u.useMemo(function(){var l=new google.maps.GroundOverlay(e,s,Z({},r));return l},[]);return u.useEffect(function(){a!==null&&a.setMap(o)},[o]),u.useEffect(function(){typeof e<"u"&&a!==null&&(a.set("url",e),a.setMap(o))},[a,e]),u.useEffect(function(){typeof i<"u"&&a!==null&&a.setOpacity(i?1:0)},[a,i]),u.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}u.memo(Sv);(function(t){Ie(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(){We(!!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,Z(Z({},this.props.options),{map:this.context}));this.registeredEvents=se({updaterMap:fl,eventMap:cl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{groundOverlay:n}},this.setGroundOverlayCallback)},e.prototype.componentDidUpdate=function(n){this.state.groundOverlay!==null&&(ue(this.registeredEvents),this.registeredEvents=se({updaterMap:fl,eventMap:cl,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:wv},e.contextType=re,e})(u.PureComponent);var dl={},hl={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function Lv(t){var e=t.data,n=t.onLoad,r=t.onUnmount,i=t.options,o=u.useContext(re),s=u.useState(null),a=s[0],l=s[1];return u.useEffect(function(){google.maps.visualization||We(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),u.useEffect(function(){We(!!e,"data property is required in HeatmapLayer %s",e)},[e]),u.useEffect(function(){a!==null&&a.setMap(o)},[o]),u.useEffect(function(){i&&a!==null&&a.setOptions(i)},[a,i]),u.useEffect(function(){var c=new google.maps.visualization.HeatmapLayer(Z(Z({},i||{}),{data:e,map:o}));return l(c),n&&n(c),function(){a!==null&&(r&&r(a),a.setMap(null))}},[]),null}u.memo(Lv);(function(t){Ie(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(){We(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),We(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(Z(Z({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=se({updaterMap:hl,eventMap:dl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},e.prototype.componentDidUpdate=function(n){ue(this.registeredEvents),this.registeredEvents=se({updaterMap:hl,eventMap:dl,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),ue(this.registeredEvents),this.state.heatmapLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=re,e})(u.PureComponent);var pl={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},gl={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){Ie(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=se({updaterMap:gl,eventMap:pl,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{streetViewPanorama:i}},this.setStreetViewPanoramaCallback)},e.prototype.componentDidUpdate=function(n){this.state.streetViewPanorama!==null&&(ue(this.registeredEvents),this.registeredEvents=se({updaterMap:gl,eventMap:pl,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),ue(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},e.prototype.render=function(){return null},e.contextType=re,e})(u.PureComponent);(function(t){Ie(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=re,e})(u.PureComponent);(function(t){Ie(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(){We(!!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})(u.PureComponent);var vl={onDirectionsChanged:"directions_changed"},ml={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){Ie(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=se({updaterMap:ml,eventMap:vl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{directionsRenderer:n}},this.setDirectionsRendererCallback)},e.prototype.componentDidUpdate=function(n){this.state.directionsRenderer!==null&&(ue(this.registeredEvents),this.registeredEvents=se({updaterMap:ml,eventMap:vl,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),ue(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},e.prototype.render=function(){return C.jsx(C.Fragment,{})},e.contextType=re,e})(u.PureComponent);(function(t){Ie(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(){We(!!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})(u.PureComponent);var yl={onPlacesChanged:"places_changed"},bl={bounds:function(t,e){t.setBounds(e)}};(function(t){Ie(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=u.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(We(!!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=se({updaterMap:bl,eventMap:yl,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{searchBox:r}},this.setSearchBoxCallback)}}},e.prototype.componentDidUpdate=function(n){this.state.searchBox!==null&&(ue(this.registeredEvents),this.registeredEvents=se({updaterMap:bl,eventMap:yl,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),ue(this.registeredEvents))},e.prototype.render=function(){return C.jsx("div",{ref:this.containerElement,children:u.Children.only(this.props.children)})},e.contextType=re,e})(u.PureComponent);var wl={onPlaceChanged:"place_changed"},Sl={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){Ie(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=u.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;We(!!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=se({updaterMap:Sl,eventMap:wl,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{autocomplete:i}},this.setAutocompleteCallback)}},e.prototype.componentDidUpdate=function(n){ue(this.registeredEvents),this.registeredEvents=se({updaterMap:Sl,eventMap:wl,prevProps:n,nextProps:this.props,instance:this.state.autocomplete})},e.prototype.componentWillUnmount=function(){this.state.autocomplete!==null&&ue(this.registeredEvents)},e.prototype.render=function(){return C.jsx("div",{ref:this.containerElement,className:this.props.className,children:u.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=re,e})(u.PureComponent);const Ev='<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>',xv='<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"/><g fill-rule="evenodd" clip-rule="evenodd" filter="url(#b)"><path fill="currentColor" 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"/><path fill="#fff" d="M33.913 12H14.087A2.087 2.087 0 0 0 12 14.087v19.826c0 1.153.934 2.087 2.087 2.087h19.826A2.087 2.087 0 0 0 36 33.913V14.087A2.087 2.087 0 0 0 33.913 12Zm-20.348 2.087c0-.288.234-.522.522-.522h7.826v4.07h-8.348v-3.548Zm9.913 9.13v-9.652h4.696v9.652h-4.696Zm4.696 1.566h-4.696v9.652h4.696v-9.652Zm1.565 9.652h4.174a.523.523 0 0 0 .522-.522v-9.13h-4.696v9.652Zm0-11.218v-9.652h4.174c.288 0 .522.234.522.522v9.13h-4.696ZM21.913 19.2v4.017h-8.348V19.2h8.348Zm0 9.6v-4.017h-8.348V28.8h8.348Zm-8.348 1.565h8.348v4.07h-7.826a.522.522 0 0 1-.522-.522v-3.548Z"/></g><defs><radialGradient id="a" cx="0" cy="0" r="1" gradientTransform="matrix(0 6 -20 0 24 60)" gradientUnits="userSpaceOnUse"><stop stop-color="#1D3665"/><stop offset="1" stop-color="#1D3665" 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_2412_6054"/><feBlend in="SourceGraphic" in2="effect1_backgroundBlur_2412_6054" result="shape"/></filter></defs></svg>',Cv='<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-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><g fill="#fff"><path fill-rule="evenodd" d="M15.878 16.411c0-.34.273-.617.61-.617h15.024c.337 0 .61.276.61.617v10.103H15.878V16.41Zm1.22.617v8.253h13.803v-8.253H17.1Z" clip-rule="evenodd"/><path fill-rule="evenodd" d="M15.878 25.28h16.244v9.155c0 .864-.694 1.565-1.55 1.565H17.428c-.855 0-1.55-.7-1.55-1.565V25.28Zm1.22 1.234v7.92a.33.33 0 0 0 .33.333h13.145a.33.33 0 0 0 .328-.332v-7.921H17.1ZM14 13.565c0-.864.694-1.565 1.55-1.565h16.9c.856 0 1.55.7 1.55 1.565v1.898c0 .864-.694 1.565-1.55 1.565h-16.9c-.856 0-1.55-.701-1.55-1.565v-1.898Zm1.55-.332a.33.33 0 0 0-.33.332v1.898a.33.33 0 0 0 .33.332h16.9a.33.33 0 0 0 .33-.332v-1.898a.33.33 0 0 0-.33-.332h-16.9Z" clip-rule="evenodd"/><path fill-rule="evenodd" d="M20.573 24c0-1.912 1.535-3.462 3.427-3.462 1.893 0 3.428 1.55 3.428 3.462v1.872a.639.639 0 0 1-.636.642H21.21a.639.639 0 0 1-.636-.642V24ZM24 21.77A2.218 2.218 0 0 0 21.794 24v1.28h4.413V24c0-1.231-.988-2.23-2.207-2.23Z" clip-rule="evenodd"/><path d="m26.765 29.18-2.724-1.376a.093.093 0 0 0-.083 0l-2.724 1.376a.094.094 0 0 0-.051.084v2.752c0 .036.02.069.05.084l2.725 1.376a.09.09 0 0 0 .042.01.09.09 0 0 0 .041-.01l2.724-1.376a.094.094 0 0 0 .051-.084v-2.751a.095.095 0 0 0-.05-.085ZM24 27.994l2.624 1.326-1.26.637-2.525-1.378 1.16-.585Zm0 2.651-2.625-1.325 1.261-.637 2.524 1.377-1.16.585Zm-2.631-1.118 2.538 1.282v2.431l-2.538-1.282v-2.431Zm2.723 3.713V30.81l2.538-1.282v2.432l-2.538 1.281Z"/><path fill-rule="evenodd" d="M26.892 28.926a.38.38 0 0 1 .206.339v2.751a.379.379 0 0 1-.207.339l-2.723 1.375a.369.369 0 0 1-.338 0l-2.722-1.375a.379.379 0 0 1-.208-.339v-2.752c0-.142.079-.274.207-.339l2.727-1.377a.373.373 0 0 1 .33 0l.002.002 2.726 1.376ZM21.233 32.1a.094.094 0 0 1-.05-.084v-2.752c0-.035.019-.068.05-.084l2.724-1.376a.093.093 0 0 1 .084 0l2.724 1.376a.095.095 0 0 1 .05.085v2.751c0 .035-.019.068-.05.084l-2.724 1.376a.09.09 0 0 1-.042.01.09.09 0 0 1-.042-.01L21.233 32.1Zm5.397-.141v-2.432l-2.538 1.282v2.431l2.538-1.281Zm-.282-.176v-1.796l-1.974.998v1.795l1.974-.997Zm-2.442-.974-2.538-1.282v2.431l2.538 1.282V30.81Zm-2.256-.822 1.974.998v1.795l-1.974-.998v-1.795Zm2.349.658 1.16-.585-2.524-1.377-1.26.637 2.624 1.325Zm.55-.595-.55.277-1.995-1.008.626-.316 1.918 1.047Zm.814-.094 1.26-.636L24 27.994l-1.16.585 2.524 1.377Zm.005-.32-1.918-1.047.549-.277 1.995 1.008-.627.316Z" clip-rule="evenodd"/></g><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_958_9661"/><feBlend in="SourceGraphic" in2="effect1_backgroundBlur_958_9661" result="shape"/></filter></defs></svg>',yr={PinPvz:Cv,PinHome:Ev,PinLocker:xv},_v=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...t},oe.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"})),Ac=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:26,height:14,fill:"none",viewBox:"0 0 26 14",...t},oe.createElement("g",{fill:"#000"},oe.createElement("path",{d:"M0 13.252V8.346h1.053v3.844h3.08v1.062H0ZM4.535 13.252V8.346h1.053v3.844h3.08v1.062H4.535ZM9.126 13.252V9.36a1.02 1.02 0 0 1 .503-.87.973.973 0 0 1 .503-.137h2.874a.95.95 0 0 1 .502.136c.154.09.277.213.367.367.095.15.143.318.143.504v3.892H12.95v-1.58H10.18v1.58H9.126Zm1.053-2.64h2.772V9.413H10.18v1.197ZM14.792 13.252v-4.9h1.087l1.658 1.98 1.65-1.98h1.094v4.9h-1.06V9.965l-1.684 2.014-1.692-2.007v3.28h-1.053ZM21.108 13.252V9.36a1.018 1.018 0 0 1 .503-.87.973.973 0 0 1 .503-.137h2.874a.95.95 0 0 1 .503.136c.153.09.276.213.366.367A.92.92 0 0 1 26 9.36v3.892h-1.067v-1.58h-2.771v1.58h-1.054Zm1.053-2.64h2.772V9.413h-2.771v1.197ZM1.005 5.648a.973.973 0 0 1-.502-.137A1.018 1.018 0 0 1 0 4.641V1.756a1.018 1.018 0 0 1 .503-.87.973.973 0 0 1 .502-.137h2.881c.181 0 .347.045.496.136.154.09.276.213.367.367a.92.92 0 0 1 .143.504V4.64c0 .181-.048.349-.143.503-.09.154-.213.277-.367.367a.937.937 0 0 1-.496.137h-2.88Zm.048-1.062h2.772V1.81H1.053v2.776ZM5.64 5.648v-4.9h1.087l1.657 1.98 1.651-1.98h1.094v4.9h-1.06V2.36L8.384 4.375 6.693 2.368v3.28H5.64ZM11.943 5.648v-4.9h1.087l2.738 3.267V.749h1.066v4.899h-1.087l-2.751-3.28v3.28h-1.053ZM17.425 5.648v-4.9h1.04v4.9h-1.04Z"}))),Dc=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:26,height:8,fill:"none",viewBox:"0 0 26 8",...t},oe.createElement("g",{fill:"#000"},oe.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"})));function Mv(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 Js(t){return!!(t&&typeof t.then=="function")}function _i(t,e){return Js(t)?Promise.resolve(t).then(e):e(t)}function Ll(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 Ov(t){return typeof t=="object"&&!Array.isArray(t)&&t!==null}function Ic(t){if(typeof t=="string")return[t];if(Array.isArray(t))return t}function wt(t){return Ic(t)||[]}function kv(t,e){return Ov(e)?wt(e==null?void 0:e[t]):wt(e)}function us(t){return Array.from(new Set(t))}function Nc(t){return t&&t.replace(/\/+$/,"")}function Pv(t){if(typeof t=="string")return t;if(typeof(t==null?void 0:t.message)=="string")return t.message}const Rv=(t,e)=>fetch(t,e),jc=(t=Rv)=>(e,n)=>t(e,Object.assign(Object.assign({},n),{headers:Object.assign({"X-Tolgee-SDK-Type":"JS","X-Tolgee-SDK-Version":"5.19.6"},n==null?void 0:n.headers)}));function Jt(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 Tv(t,e,n){const r=new Set,i=new Set;function o(l){const c=new Set(e());i.forEach(f=>{(l===void 0||(l==null?void 0:l.findIndex(h=>c.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 c=new Set;l.forEach(d=>{d===void 0?c=void 0:c!==void 0&&d.forEach(h=>c.add(h))});const f=c?Array.from(c.keys()):void 0;o(f)}return Object.freeze({emit(l,c){t()&&(s.push(l),c?setTimeout(a,0):a())},listen(l){return r.add(l),{unsubscribe:()=>{r.delete(l)}}},listenSome(l){const c={fn:d=>{l(d)},namespaces:new Set};i.add(c);const f={unsubscribe:()=>{i.delete(c)},subscribeNs:d=>(wt(d).forEach(h=>c.namespaces.add(h)),d===void 0&&c.namespaces.add(n()),f)};return f}})}function Av(t,e){let n=!0;function r(){return n}const i=Object.freeze({onPendingLanguageChange:Jt(r),onLanguageChange:Jt(r),onLoadingChange:Jt(r),onFetchingChange:Jt(r),onInitialLoaded:Jt(r),onRunningChange:Jt(r),onCacheChange:Jt(r),onUpdate:Tv(r,t,e),onPermanentChange:Jt(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)}}});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}const Bc=t=>{const e=new Map;return Object.entries(t).forEach(([n,r])=>{if(r!=null){if(typeof r=="object"){Bc(r).forEach((i,o)=>{e.set(n+"."+o,i)});return}e.set(n,r)}}),e},br=t=>{const[e,...n]=t.split(":"),r=n.join(":");return{language:e,namespace:r||""}},Vt=({language:t,namespace:e})=>e?`${t}:${e}`:t;function Dv(t,e,n,r,i,o,s){const a=new Map,l=new Map;let c={},f=0;function d(g,S,w){const L=Vt(g);l.set(L,{data:Bc(S),version:w}),t.emit(g)}function h(g){let S;if(!S){const w=c[Vt(g)];typeof w=="function"&&(S=w())}return S||(S=e(g)),S}function v(g,S){var w;let L;return S&&(L=(w=n(g))===null||w===void 0?void 0:w.catch(()=>(console.warn("Tolgee: Failed to fetch data from dev backend"),h(g)))),L||(L=h(g)),L}const b=Object.freeze({addStaticData(g){g&&(c=Object.assign(Object.assign({},c),g),Object.entries(g).forEach(([S,w])=>{if(typeof w!="function"){const L=br(S),y=l.get(S);(!y||y.version===0)&&d(L,w,0)}}))},invalidate(){a.clear(),f+=1},addRecord(g,S){d(g,S,f)},exists(g,S=!1){const w=l.get(Vt(g));return w&&S?w.version===f:!!w},getRecord(g){var S;return(S=l.get(Vt(r(g))))===null||S===void 0?void 0:S.data},getTranslation(g,S){var w;return(w=l.get(Vt(g)))===null||w===void 0?void 0:w.data.get(S)},getTranslationNs(g,S,w){var L;for(const y of g)for(const _ of S){const x=(L=l.get(Vt({language:_,namespace:y})))===null||L===void 0?void 0:L.data.get(w);if(x!=null)return[y]}return us(g)},getTranslationFallback(g,S,w){var L;for(const y of g)for(const _ of S){const x=(L=l.get(Vt({language:_,namespace:y})))===null||L===void 0?void 0:L.data.get(w);if(x!=null)return x}},changeTranslation(g,S,w){var L;const y=(L=l.get(Vt(g)))===null||L===void 0?void 0:L.data;y==null||y.set(S,w),t.emit(Object.assign(Object.assign({},g),{key:S}))},isFetching(g){if(i())return!0;if(g===void 0)return a.size>0;const S=wt(g);return!!Array.from(a.keys()).find(w=>S.includes(br(w).namespace))},isLoading(g,S){const w=wt(S);return!!(i()||Array.from(a.keys()).find(L=>{const y=br(L);return(!w.length||w.includes(y.namespace))&&!b.exists({namespace:y.namespace,language:g})}))},async loadRecords(g,S){const w=g.map(y=>{const _=r(y),x=Vt(_),p=a.get(x);if(p)return{new:!1,promise:p,keyObject:_,cacheKey:x};const m=v(_,S)||Promise.resolve(void 0);return a.set(x,m),{new:!0,promise:m,keyObject:_,cacheKey:x}});o.notify(),s.notify();const L=await Promise.all(w.map(y=>y.promise));return w.forEach((y,_)=>{const x=a.get(y.cacheKey)!==y.promise;if(y.new&&!x){a.delete(y.cacheKey);const p=L[_];p?b.addRecord(y.keyObject,p):b.getRecord(y.keyObject)||b.addRecord(y.keyObject,{})}}),o.notify(),s.notify(),w.map(y=>b.getRecord(y.keyObject))},getAllRecords(){return Array.from(l.entries()).map(([S,w])=>Object.assign(Object.assign({},br(S)),{data:w.data}))}});return b}function Uc(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 Iv={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},cs="invalid",Nv="https://app.tolgee.io",jv=({key:t})=>t,Bv={defaultNs:"",observerOptions:Iv,observerType:"invisible",onFormatError:cs,apiUrl:Nv,fetch:jc(),onTranslationMissing:jv},fs=(...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 El(t,e){const n=fs(Bv,e==null?void 0:e.initialOptions,t);return n.apiUrl=Nc(n.apiUrl),t!=null&&t.fetch&&(n.fetch=jc(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 Uv(t,e,n,r,i,o,s,a){const l={ui:void 0},c={formatters:[],finalFormatter:void 0,observer:void 0,devBackend:void 0,backends:[],ui:void 0,languageDetector:void 0,languageStorage:void 0},f=async({keysAndDefaults:O,event:P})=>{var A;const D=O.map(({key:j,ns:U,defaultValue:N})=>({key:j,defaultValue:N,fallbackNamespaces:r(U),namespace:i({key:j,ns:U})[0],translation:o({key:j,ns:U})}));(A=c.ui)===null||A===void 0||A.handleElementClick(D,P)},d=(O,P)=>{var A;return((A=c.observer)===null||A===void 0?void 0:A.findPositions(O,P))||[]};function h(O){const P=o({key:O.key,ns:O.ns});return M.formatTranslation(Object.assign(Object.assign({},O),{translation:P,formatEnabled:!0}))}function v(){return{fetch:e().fetch}}function b(O){c.observer=O==null?void 0:O()}function g(){return!!c.observer}function S(O){O&&c.formatters.push(O)}function w(O){c.finalFormatter=O}function L(O){l.ui=O}function y(){return!!l.ui}function _(O){c.languageStorage=O}function x(O){c.languageDetector=O}function p(){if(!c.languageDetector)return;const O=n();return c.languageDetector.getLanguage(Object.assign({availableLanguages:O},v()))}function m(O){O&&c.backends.push(O)}function E(O){c.devBackend=O}function k(O,P){const A=Object.freeze({setFinalFormatter:w,addFormatter:S,setObserver:b,hasObserver:g,setUi:L,hasUi:y,setDevBackend:E,addBackend:m,setLanguageDetector:x,setLanguageStorage:_});P(O,A)}const M=Object.freeze({addPlugin:k,run(){var O,P;const{apiKey:A,apiUrl:D,projectId:j,observerOptions:U}=e();c.ui=(O=l.ui)===null||O===void 0?void 0:O.call(l,{apiKey:A,apiUrl:D,projectId:j,highlight:M.highlight,changeTranslation:s,findPositions:d,onPermanentChange:a}),(P=c.observer)===null||P===void 0||P.run({mouseHighlight:!0,options:U,translate:h,onClick:f})},stop(){var O;c.ui=void 0,(O=c.observer)===null||O===void 0||O.stop()},getLanguageStorage(){return c.languageStorage},getInitialLanguage(){var O;const P=n(),A=(O=c.languageStorage)===null||O===void 0?void 0:O.getLanguage(v());return _i(A,D=>(!P||P.includes(D))&&D?D:p())},setStoredLanguage(O){var P;(P=c.languageStorage)===null||P===void 0||P.setLanguage(O,v())},getDevBackend(){return c.devBackend},getBackendRecord:({language:O,namespace:P})=>{for(const A of c.backends){const D=A.getRecord(Object.assign({language:O,namespace:P},v()));if(Js(D))return D==null?void 0:D.catch(j=>(console.error(j),{}));if(D!==void 0)return D}},getBackendDevRecord:({language:O,namespace:P})=>{var A;const{apiKey:D,apiUrl:j,projectId:U}=e();return(A=c.devBackend)===null||A===void 0?void 0:A.getRecord(Object.assign({apiKey:D,apiUrl:j,projectId:U,language:O,namespace:P},v()))},getLanguageDetector(){return c.languageDetector},retranslate(){var O;(O=c.observer)===null||O===void 0||O.retranslate()},highlight:(O,P)=>{var A,D;return((D=(A=c.observer)===null||A===void 0?void 0:A.highlight)===null||D===void 0?void 0:D.call(A,O,P))||{unhighlight(){}}},unwrap(O){var P;return c.observer?(P=c.observer)===null||P===void 0?void 0:P.unwrap(O):{text:O,keys:[]}},wrap(O){var P;return c.observer?(P=c.observer)===null||P===void 0?void 0:P.wrap(O):O.translation},hasDevBackend(){return!!M.getDevBackend()},formatTranslation(O){var P,{formatEnabled:A}=O,D=Uc(O,["formatEnabled"]);const{key:j,translation:U,defaultValue:N,noWrap:F,params:q,ns:H,orEmpty:V}=D,$=U??N;let ie="";U==null&&(ie=e().onTranslationMissing(D));let W=$??(V?"":ie);const te=t(),R=A||!(!((P=c.observer)===null||P===void 0)&&P.outputNotFormattable),ce=fe=>c.observer&&!F?c.observer.wrap({key:j,translation:fe,defaultValue:N,params:q,ns:H}):fe;W=ce(W);try{if($&&te&&R)for(const fe of c.formatters)W=fe.format({translation:W,language:te,params:q});c.finalFormatter&&$&&te&&R&&(W=c.finalFormatter.format({translation:W,language:te,params:q}))}catch(fe){console.error(fe);const K=Pv(fe)||cs,Se=e().onFormatError,Ae=typeof Se;Ae==="string"?W=Se:Ae==="function"?W=Se(K,D):W=cs,W=ce(W)}return W}});return M}const xl=(t,e,n)=>{let r=t;return Object.freeze({init(i){r=i},notify(){const i=e();r!==i&&n(i),r=i}})};function Vv(t,e,n){let r=El(),i;const o=Object.freeze({init(s){r=El(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){wt(s).forEach(l=>{const c=r.activeNamespaces.get(l);c!==void 0?r.activeNamespaces.set(l,c+1):r.activeNamespaces.set(l,1)})},removeActiveNs(s){wt(s).forEach(l=>{const c=r.activeNamespaces.get(l);c!==void 0&&c>1?r.activeNamespaces.set(l,c-1):r.activeNamespaces.delete(l)})},getRequiredNamespaces(){return us([...r.initialOptions.ns||[r.initialOptions.defaultNs],...wt(r.initialOptions.fallbackNs),...r.activeNamespaces.keys()])},getFallbackLangs(s){const a=s||o.getLanguage();return a?us([a,...kv(a,r.initialOptions.fallbackLanguage)]):[]},getFallbackNs(){return wt(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=>br(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:Nc(s.apiUrl)}):i=void 0}});return o}function Fv(t){var{ns:e,noWrap:n,orEmpty:r,params:i,language:o}=t,s=Uc(t,["ns","noWrap","orEmpty","params","language"]);return Object.assign(Object.assign({},{ns:e,noWrap:n,orEmpty:r,language:o}),{params:Object.assign({},s)})}const Vc=(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({},Fv(r)),n)),n};function zv({options:t}){const e=Av(l,c),n=xl(!1,()=>s.isFetching(),e.onFetchingChange.emit),r=xl(!1,()=>p.isLoading(),e.onLoadingChange.emit),i=Vv(e.onLanguageChange,e.onPendingLanguageChange,e.onRunningChange),o=Uv(i.getLanguage,i.getInitialOptions,i.getAvailableLanguages,f,w,L,h,v),s=Dv(e.onCacheChange,o.getBackendRecord,o.getBackendDevRecord,i.withDefaultNs,i.isInitialLoading,n,r);t&&b(t);let a;e.onUpdate.listen(()=>{i.isRunning()&&o.retranslate()});function l(){return i.getFallbackNs()}function c(m){return i.getDefaultNs(m)}function f(m){return[...wt(c(m)),...l()]}function d(m){return[...wt(m??c()),...i.getRequiredNamespaces()]}function h(m,E,k){const M=i.withDefaultNs(m),O=s.getTranslation(M,E);return s.changeTranslation(M,E,k),{revert(){s.changeTranslation(M,E,O)}}}function v(m){e.onPermanentChange.emit({key:m.key,namespace:m.namespace})}function b(m){i.init(m),s.addStaticData(i.getInitialOptions().staticData)}function g(m,E){const k=i.getFallbackLangs(m),M=d(E),O=[];return k.forEach(P=>{M.forEach(A=>{s.exists({language:P,namespace:A},!0)||O.push({language:P,namespace:A})})}),O}function S(m,E){const k=g(m,E);if(k.length)return _i(p.loadRecords(k),()=>{})}function w({key:m,ns:E}){const k=i.getFallbackLangs(),M=f(E??void 0);return s.getTranslationNs(M,k,m)}function L({key:m,ns:E,language:k}){const M=f(E??void 0),O=i.getFallbackLangs(k);return s.getTranslationFallback(M,O,m)}function y(){const m=_i(_(),()=>S());if(Js(m))return i.setInitialLoading(!0),n.notify(),r.notify(),Promise.resolve(m).then(()=>{i.setInitialLoading(!1),n.notify(),r.notify(),e.onInitialLoaded.emit()});e.onInitialLoaded.emit()}function _(){if(i.getLanguage())return;const E=o.getInitialLanguage();return _i(E,k=>{const M=k||i.getInitialOptions().defaultLanguage;M&&i.setLanguage(M)})}function x(){if((o.getLanguageDetector()||o.getLanguageStorage())&&!i.getAvailableLanguages())throw new Error(Ll("availableLanguages"));if(!i.getLanguage()&&!i.getInitialOptions().defaultLanguage)throw new Error(Ll(["defaultLanguage","language"]))}const p=Object.freeze(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),i),o),s),{init:b,getTranslation:L,changeTranslation:h,getTranslationNs:w,getDefaultAndFallbackNs:f,async changeLanguage(m){i.getPendingLanguage()===m&&i.getLanguage()===m||(i.setPendingLanguage(m),i.isRunning()&&await S(m),m===i.getPendingLanguage()&&(i.setLanguage(m),o.setStoredLanguage(m)))},async addActiveNs(m,E){E||i.addActiveNs(m),i.isRunning()&&await S(void 0,m)},loadRecords(m){return s.loadRecords(m,p.isDev())},async loadRecord(m){return(await p.loadRecords([m]))[0]},isLoading(m){return s.isLoading(i.getLanguage(),m)},isLoaded(m){const E=i.getLanguage();if(!E)return!1;const k=i.getFallbackLangs(E),M=d(m),O=[];return k.forEach(P=>{M.forEach(A=>{s.exists({language:P,namespace:A})||O.push({language:P,namespace:A})})}),O.length===0},t:(...m)=>{const E=Vc(...m),k=L(E);return o.formatTranslation(Object.assign(Object.assign({},E),{translation:k}))},isDev(){return!!(i.getInitialOptions().apiKey&&i.getInitialOptions().apiUrl)},run(){return x(),i.isRunning()||(i.setRunning(!0),o.run(),a=y()),Promise.resolve(a)},stop(){i.isRunning()&&(o.stop(),i.setRunning(!1))}}));return p}function $v(t){const e=zv({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 Hv=()=>{const t={plugins:[],options:{}},e=Object.freeze({use(n){return t.plugins.push(n),e},updateDefaults(n){return t.options=fs(t.options,n),e},init(n){const r=$v(fs(t.options,n));return t.plugins.forEach(r.addPlugin),r}});return e},Fc=0,ds=1,Wv=2;class Gv extends Error{constructor(e,n,r){let i;e===Fc?i="Empty parameter":e===ds?i="Unexpected character":i="Unexpected end",super(`Tolgee parser: ${i} at ${n} in "${r}"`),this.code=e,this.index=n}}function Cl(t){return/\s/.test(t)}const en=0,hs=1,Mi=2,_o=3,Mo=4,Zv=new Set([Mi,hs,en]),ps="'",qv=new Set(["{","}",ps]),Kv=t=>/[0-9a-zA-Z_]/.test(t);function Jv(t){let e=en,n="",r="",i="";const o=[],s=[];let a=0;function l(h){throw new Gv(h,a,t)}const c=()=>{o.push(n),n=""},f=()=>{Kv(i)||l(ds),r+=i},d=()=>{r===""&&l(Fc),s.push(r),r=""};for(a=0;a<t.length;a++)switch(i=t[a],e){case en:i===ps?(n+=i,e=hs):i==="{"?(c(),e=_o):(n+=i,e=en);break;case hs:qv.has(i)?(n=n.slice(0,-1)+i,e=Mi):(n+=i,e=en);break;case Mi:i===ps?e=en:(n+=i,e=Mi);break;case _o:i==="}"?(d(),e=en):Cl(i)?r!==""&&(d(),e=Mo):(f(),e=_o);break;case Mo:i=="}"?e=en:Cl(i)?e=Mo:l(ds)}return Zv.has(e)||l(Wv),c(),[o,s]}function Yv(t,e){const[n,r]=Jv(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 Xv(){return{format:({translation:t,params:e})=>Yv(t,e)}}const Qv=()=>(t,e)=>(e.setFinalFormatter(Xv()),t);var Oo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},_l={};(function(t){function e(w,L){var y;return w instanceof Buffer?y=w:y=Buffer.from(w.buffer,w.byteOffset,w.byteLength),y.toString(L)}var n=function(w){return Buffer.from(w)};function r(w){for(var L=0,y=Math.min(256*256,w.length+1),_=new Uint16Array(y),x=[],p=0;;){var m=L<w.length;if(!m||p>=y-1){var E=_.subarray(0,p),k=E;if(x.push(String.fromCharCode.apply(null,k)),!m)return x.join("");w=w.subarray(L),L=0,p=0}var M=w[L++];if(!(M&128))_[p++]=M;else if((M&224)===192){var O=w[L++]&63;_[p++]=(M&31)<<6|O}else if((M&240)===224){var O=w[L++]&63,P=w[L++]&63;_[p++]=(M&31)<<12|O<<6|P}else if((M&248)===240){var O=w[L++]&63,P=w[L++]&63,A=w[L++]&63,D=(M&7)<<18|O<<12|P<<6|A;D>65535&&(D-=65536,_[p++]=D>>>10&1023|55296,D=56320|D&1023),_[p++]=D}}}function i(w){for(var L=0,y=w.length,_=0,x=Math.max(32,y+(y>>>1)+7),p=new Uint8Array(x>>>3<<3);L<y;){var m=w.charCodeAt(L++);if(m>=55296&&m<=56319){if(L<y){var E=w.charCodeAt(L);(E&64512)===56320&&(++L,m=((m&1023)<<10)+(E&1023)+65536)}if(m>=55296&&m<=56319)continue}if(_+4>p.length){x+=8,x*=1+L/w.length*2,x=x>>>3<<3;var k=new Uint8Array(x);k.set(p),p=k}if(m&4294967168)if(!(m&4294965248))p[_++]=m>>>6&31|192;else if(!(m&4294901760))p[_++]=m>>>12&15|224,p[_++]=m>>>6&63|128;else if(!(m&4292870144))p[_++]=m>>>18&7|240,p[_++]=m>>>12&63|128,p[_++]=m>>>6&63|128;else continue;else{p[_++]=m;continue}p[_++]=m&63|128}return p.slice?p.slice(0,_):p.subarray(0,_)}var o="Failed to ",s=function(w,L,y){if(w)throw new Error("".concat(o).concat(L,": the '").concat(y,"' option is unsupported."))},a=typeof Buffer=="function"&&Buffer.from,l=a?n:i;function c(){this.encoding="utf-8"}c.prototype.encode=function(w,L){return s(L&&L.stream,"encode","stream"),l(w)};function f(w){var L;try{var y=new Blob([w],{type:"text/plain;charset=UTF-8"});L=URL.createObjectURL(y);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(w){try{return f(w)}catch{return r(w)}});var b="construct 'TextDecoder'",g="".concat(o," ").concat(b,": the ");function S(w,L){s(L&&L.fatal,b,"fatal"),w=w||"utf-8";var y;if(a?y=Buffer.isEncoding(w):y=h.indexOf(w.toLowerCase())!==-1,!y)throw new RangeError("".concat(g," encoding label provided ('").concat(w,"') is invalid."));this.encoding=w,this.fatal=!1,this.ignoreBOM=!1}S.prototype.decode=function(w,L){s(L&&L.stream,"decode","stream");var y;return w instanceof Uint8Array?y=w:w.buffer instanceof ArrayBuffer?y=new Uint8Array(w.buffer):y=new Uint8Array(w),v(y,this.encoding)},t.TextEncoder=t.TextEncoder||c,t.TextDecoder=t.TextDecoder||S})(typeof window<"u"?window:Oo);var em=Mv({__proto__:null,default:_l},[_l]),ko;(ko=console.assert)===null||ko===void 0||ko.call(console,em);const tm="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";function nm(t){const e=tm.indexOf(t);if(e===-1)throw new Error("Invalid character found: "+t);return e}function rm(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 im(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|nm(t[s]),n+=5,n>=8&&(o[i++]=r>>>n-8&255,n-=8);return rm(o.buffer)}function om(t){if(t)try{const[e,n]=t.split("_");if(e==="tgpak"){const[r]=im(n).split("_");return Number(r)}}catch{console.warn("Tolgee: Api key can't be parsed")}}function sm(t){if(!t)return;const[e]=t.split("_");return e==="tgpak"?"tgpak":e==="tgpat"?"tgpat":"legacy"}function am(){return{getRecord({apiUrl:t,apiKey:e,language:n,namespace:r,projectId:i,fetch:o}){var s;const a=(s=om(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}`),sm(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(c=>{if(c.ok)return c.json().then(f=>f[n]);throw new Error(c.statusText)})}}}const lm=()=>(t,e)=>(e.setDevBackend(am()),t);function um(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 cm({message:t,recievingMessage:e,data:n,attempts:r=1,timeout:i=300}){let o=!1;const s=()=>new Promise((l,c)=>{const f=um(e,h);window.postMessage({type:t,data:n},window.origin);const d=setTimeout(b,i);function h(g){clearTimeout(d),v(),l(g)}function v(){f.unsubscribe()}function b(){v(),c()}});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 fm(){let t;async function e(n){t==null||t();const{cancel:r,promise:i}=cm({message:"TOLGEE_READY",recievingMessage:["TOLGEE_PLUGIN_READY","TOLGEE_PLUGIN_UPDATED"],data:n,attempts:4});return t=r,i}return{update:e}}const dm="tolgee-in-context-tools.umd.min.js",hm="@tolgee/in-context-tools",pm="InContextTools",gm="https://cdn.jsdelivr.net/npm";function vm(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 Po=null;function mm(t){return Po||(Po=vm(`${gm}/@tolgee/web@${t}/dist/${dm}`).then(()=>window[hm][pm])),Po}const zc="__tolgee_apiKey",$c="__tolgee_apiUrl";function Ml(){const t=sessionStorage.getItem(zc)||void 0,e=sessionStorage.getItem($c)||void 0;if(!(!t||!e))return{apiKey:t,apiUrl:e}}function ym(){sessionStorage.removeItem(zc),sessionStorage.removeItem($c)}function bm(t){document.readyState!=="loading"?Promise.resolve().then(()=>{t()}):document.addEventListener&&document.addEventListener("DOMContentLoaded",t)}let Hc=()=>t=>t;const wm=()=>{if(typeof window>"u")return!1;try{return typeof sessionStorage<"u"&&sessionStorage}catch(t){return console.error("sessionStorage not available",t),!1}};wm()&&(Hc=()=>t=>{const e=fm(),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 mm("5.19.6");return s=>{const a=Ml();return s.addPlugin(o({credentials:a})),s}};return t.on("running",({value:o})=>{o&&bm(()=>{e.update(n()).catch(ym)})}),Ml()&&r().then(o=>{t.addPlugin(o)}).catch(o=>{console.error("Tolgee: Failed to load in-context tools"),console.error(o)}),t});function Sm(){return Hv().use(Hc())}const Lm={useSuspense:!0};let Ro;const Wc=()=>(Ro||(Ro=u.createContext(void 0)),Ro),Em=({tolgee:t,options:e,children:n,fallback:r})=>{const[i,o]=u.useState(!t.isLoaded());u.useEffect(()=>{t.run().catch(l=>{console.error(l)}).finally(()=>{o(!1)})},[t]);const s=Object.assign(Object.assign({},Lm),e),a=Wc();return s.useSuspense?u.createElement(a.Provider,{value:{tolgee:t,options:s}},i?r:u.createElement(u.Suspense,{fallback:r||null},n)):u.createElement(a.Provider,{value:{tolgee:t,options:s}},i?r:n)};let xm;function Cm(){return xm}const _m=()=>{const t=Wc(),e=u.useContext(t)||Cm();if(!e)throw new Error("Couldn't find tolgee instance, did you forgot to use `TolgeeProvider`?");return e},Mm=()=>{const[t,e]=u.useState(0),n=u.useCallback(()=>{e(r=>r+1)},[e]);return{instance:t,rerender:n}},Gc=(t,e)=>{const{tolgee:n,options:r}=_m(),i=Ic(t),o=wt(i).join(":"),s=Object.assign(Object.assign({},r),e),{rerender:a,instance:l}=Mm(),c=u.useRef(),f=u.useRef([]);f.current=[];const d=b=>{var g;f.current.push(b),(g=c.current)===null||g===void 0||g.subscribeNs(b)},h=n.isLoaded(i);u.useEffect(()=>{const b=n.onNsUpdate(a);return c.current=b,b.subscribeNs(i),f.current.forEach(g=>{b.subscribeNs(g)}),()=>{b.unsubscribe()}},[o,n]),u.useEffect(()=>(n.addActiveNs(i),()=>n.removeActiveNs(i)),[o,n]);const v=u.useCallback(b=>{var g;const S=(g=b.ns)!==null&&g!==void 0?g:i==null?void 0:i[0];return d(S),n.t(Object.assign(Object.assign({},b),{ns:S}))},[n,l]);if(s.useSuspense&&!h)throw n.addActiveNs(i,!0);return{t:v,isLoading:!h}},Nt=(t,e)=>{const{t:n,isLoading:r}=Gc(t,e);return{t:u.useCallback((...o)=>{const s=Vc(...o);return n(s)},[n]),isLoading:r}},Om=t=>{if(!t)return;const e={};return Object.entries(t||{}).forEach(([n,r])=>{if(typeof r=="function")e[n]=i=>r(gs(i));else if(u.isValidElement(r)){const i=r;e[n]=o=>i.props.children===void 0&&(o!=null&&o.length)?u.cloneElement(i,{},gs(o)):u.cloneElement(i)}else e[n]=r}),e},gs=t=>Array.isArray(t)?u.Children.toArray(t):t,km=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=gs(t.t({key:e,params:Om(t.params),defaultValue:n,noWrap:t.noWrap,ns:t.ns,language:t.language}));return u.createElement(u.Fragment,null,r)},xn=t=>{const{t:e}=Gc();return u.createElement(km,Object.assign({t:e},t))},Pm="Button-module__root__8RX49h",Rm="Button-module__primary__st6yY9",Tm="Button-module__secondary__j-3rjz",Am="Button-module__loading__QfItr2",Dm="Button-module__spinner__kVZYqS",dr={root:Pm,primary:Rm,secondary:Tm,loading:Am,spinner:Dm},Lt=({children:t,className:e,loading:n,variant:r="primary",...i})=>{const o=[dr.root,e,dr[r],{[dr.loading]:n}];if(i.as==="link"){const{as:s,...a}=i;return C.jsxs("a",{className:me(o),...a,children:[!n&&t,n&&C.jsx(Vi,{className:dr.spinner})]})}if(i.as==="button"){const{as:s,...a}=i;return C.jsxs("button",{type:"button",className:me(o),...a,children:[!n&&t,n&&C.jsx(Vi,{className:dr.spinner})]})}Ht(!1,"Invalid button type")};Lt.defaultProps={as:"button"};const Im="LocationBalloon-module__root__GtUl6q",Nm="LocationBalloon-module__submit__lNcF4k",jm="LocationBalloon-module__details__--VOKk",Bm="LocationBalloon-module__icon__X7DOVA",Um="LocationBalloon-module__header__5VQJDW",Vm="LocationBalloon-module__title__bX9pf8",Fm="LocationBalloon-module__description__htav7b",zm="LocationBalloon-module__actions__c8dlOR",Yt={root:Im,submit:Nm,details:jm,icon:Bm,header:Um,title:Vm,description:Fm,actions:zm},$m={default:Dc,llama:Ac},Hm=({SSR:t,className:e,hideDetails:n,location:r,location_name:i,name:o,onDetails:s,onSubmit:a})=>{const{logo:l="default"}=ot(),c=$m[l];return C.jsxs("div",{className:me(Yt.root,e),children:[C.jsxs("div",{className:Yt.header,children:[C.jsx("div",{className:Yt.icon,children:C.jsx(c,{})}),C.jsx("span",{className:Yt.title,children:o||"{{ properties.point.name }}"})]}),C.jsxs("div",{className:Yt.description,children:[(r==null?void 0:r.full_address)||"{{ properties.point.location.full_address }}",","," ",i||"{{ properties.point.location_name }}"]}),C.jsxs("div",{className:Yt.actions,children:[C.jsx(Lt,{id:Sd,variant:"primary",className:Yt.submit,onClick:a,children:t?"{ choose }":C.jsx(xn,{keyName:"choose",ns:"common"})}),!n&&C.jsxs(Lt,{id:_u,as:"link",variant:"primary",className:Yt.details,onClick:s,children:[t?"{ details }":C.jsx(xn,{keyName:"details",ns:"common"}),C.jsx(_v,{})]})]})]})},Wm=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},oe.createElement("g",{clipPath:"url(#a)"},oe.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"})),oe.createElement("defs",null,oe.createElement("clipPath",{id:"a"},oe.createElement("path",{fill:"#fff",d:"M0 0h20v20H0z"})))),Gm="CloseButton-module__root__2m1asd",Zm="CloseButton-module__absolutePositionVariant__lGX4cQ",qm="CloseButton-module__relativePositionVariant__LqTTWf",Ol={root:Gm,absolutePositionVariant:Zm,relativePositionVariant:qm},$r=({className:t,position:e="absolute",...n})=>C.jsx("div",{...n,className:me(Ol.root,t,Ol[`${e}PositionVariant`]),children:C.jsx(Wm,{})}),Km="LocationView-module__title__-wT0bl",Jm="LocationView-module__logo__jDjNMt",Ym="LocationView-module__header__K0gBYX",Xm="LocationView-module__content__wtOPjm",Qm="LocationView-module__section__2J1zAJ",ey="LocationView-module__chips__ALwJDx",ty="LocationView-module__services__IgJ4ba",ny="LocationView-module__images__-wKmRM",ry="LocationView-module__image__T1E-gt",iy="LocationView-module__actions__NuafMj",oy="LocationView-module__actionsHidden__-vX5kK",sy="LocationView-module__submit__c-Hc8u",ay="LocationView-module__scheduleItem__RhAgat",Xe={title:Km,logo:Jm,header:Ym,content:Xm,section:Qm,chips:ey,services:ty,images:ny,image:ry,actions:iy,actionsHidden:oy,submit:sy,scheduleItem:ay},ly={default:Dc,llama:Ac},uy=({classes:t,hideActions:e,location:n,onClose:r,onSubmit:i})=>{const{t:o}=Nt(["details_modal","common"]),{logo:s="default"}=ot(),a=ly[s];return C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:me(Xe.header,t==null?void 0:t.header),children:[C.jsx($r,{onClick:r}),C.jsxs("div",{className:Xe.title,children:[C.jsx("div",{className:Xe.logo,children:C.jsx(a,{})}),C.jsx("span",{children:n.name})]})]}),C.jsxs("div",{className:me(Xe.content,t==null?void 0:t.content),children:[C.jsxs("section",{className:Xe.section,children:[C.jsxs("span",{children:[o("address"),":"]}),C.jsx("p",{children:n.location.full_address})]}),n.schedule.length>0&&C.jsxs("section",{className:Xe.section,children:[C.jsxs("span",{children:[o("schedule"),":"]}),n.schedule.map((l,c)=>C.jsx("p",{className:Xe.scheduleItem,children:l},c))]}),(n.pay_by_card||n.pay_by_card)&&C.jsxs("section",{className:Xe.section,children:[C.jsxs("span",{children:[o("payment_method"),":"]}),C.jsxs("div",{className:Xe.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")]})]}),C.jsxs("section",{className:Xe.section,children:[C.jsxs("span",{children:[o("services"),":"]}),C.jsxs("div",{className:Xe.services,children:[n.is_pickup&&C.jsx("span",{children:o("is_pickup")}),n.is_delivery&&C.jsx("span",{children:o("is_delivery")}),n.is_dressing_room&&C.jsx("span",{children:o("is_dressing_room")}),n.is_check_order&&C.jsx("span",{children:o("is_check_order")})]})]}),C.jsxs("section",{className:Xe.section,children:[C.jsxs("span",{children:[o("location"),":"]}),C.jsx("p",{children:n.location_name})]}),n.images.length>0&&C.jsx("section",{className:Xe.images,children:n.images.map(l=>C.jsx("img",{src:l,alt:n.name,className:Xe.image},l))})]}),C.jsx("div",{className:me(Xe.actions,{[Xe.actionsHidden]:e}),children:C.jsx(Lt,{variant:"primary",className:Xe.submit,onClick:i,children:o("choose",{ns:"common"})})})]})},Zc=u.memo(uy),cy={clickableIcons:!1,disableDefaultUI:!0,minZoom:4,maxZoom:20,restriction:{strictBounds:!0,latLngBounds:{north:85,south:-85,west:-179,east:179}}},qc={optimized:!0},Kc=({isSelectedPoint:t})=>{const e=xe(Ns),[n,r]=u.useState(!0);return u.useEffect(()=>{r(t?!e:!0)},[e,t]),n};var fy=dy()?u.useLayoutEffect:u.useEffect;function dy(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function hy(){var t=u.useState(Object.create(null)),e=t[1];return u.useCallback(function(){e(Object.create(null))},[])}var py=function(e){var n=e.children,r=e.type,i=r===void 0?"reach-portal":r,o=u.useRef(null),s=u.useRef(null),a=hy();return fy(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?Qn.createPortal(n,s.current):u.createElement("span",{ref:o})};/*! *****************************************************************************
|
|
66
|
+
</svg>`,a=`Cluster of ${e} markers`,l=Number(google.maps.Marker.MAX_ZINDEX)+e;if(mt.isAdvancedMarkerAvailable(i)){const d=new DOMParser().parseFromString(s,"image/svg+xml").documentElement;d.setAttribute("transform","translate(0 25)");const p={map:i,position:n,zIndex:l,title:a,content:d};return new google.maps.marker.AdvancedMarkerElement(p)}const c={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(c)}}function Jg(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class Js{constructor(){Jg(Js,google.maps.OverlayView)}}var _r;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(_r||(_r={}));const Xg=(t,e,n)=>{n.fitBounds(e.bounds)};class Yg extends Js{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new Zg(r),renderer:o=new Kg,onClusterClick:s=Xg}){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:(mt.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,_r.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)||mt.setMap(s.marker,null):o.push(s.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>o.forEach(s=>mt.setMap(s,null)))}google.maps.event.trigger(this,_r.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=>mt.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new qg(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=>mt.setMap(i,null)),this.onClusterClick&&r.marker.addListener("click",i=>{google.maps.event.trigger(this,_r.CLUSTER_CLICK,r),this.onClusterClick(i,r,n)})),mt.setMap(r.marker,n)})}}function Qg(t){var e=cg(),n=u.useState(null),r=n[0],i=n[1];return u.useEffect(function(){if(e&&r===null){var o=new Yg(G(G({},t),{map:e}));i(o)}},[e]),r}function ev(t){var e=t.children,n=t.options,r=Qg(n);return r!==null?e(r):null}u.memo(ev);var qa={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Ka={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function tv(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,c=t.onPositionChanged,f=t.onZindexChanged,d=t.onLoad,p=t.onUnmount,v=u.useContext(ie),y=u.useState(null),g=y[0],S=y[1],w=u.useState(null),L=w[0],m=w[1],_=u.useState(null),E=_[0],h=_[1],b=u.useState(null),x=b[0],k=b[1],M=u.useState(null),P=M[0],O=M[1],R=u.useState(null),D=R[0],j=R[1],U=u.useRef(null);return u.useEffect(function(){g!==null&&(g.close(),n?g.open(v,n):g.getPosition()&&g.open(v))},[v,g,n]),u.useEffect(function(){r&&g!==null&&g.setOptions(r)},[g,r]),u.useEffect(function(){i&&g!==null&&g.setPosition(i)},[i]),u.useEffect(function(){typeof o=="number"&&g!==null&&g.setZIndex(o)},[o]),u.useEffect(function(){g&&s&&(L!==null&&google.maps.event.removeListener(L),m(google.maps.event.addListener(g,"closeclick",s)))},[s]),u.useEffect(function(){g&&a&&(E!==null&&google.maps.event.removeListener(E),h(google.maps.event.addListener(g,"domready",a)))},[a]),u.useEffect(function(){g&&l&&(x!==null&&google.maps.event.removeListener(x),k(google.maps.event.addListener(g,"content_changed",l)))},[l]),u.useEffect(function(){g&&c&&(P!==null&&google.maps.event.removeListener(P),O(google.maps.event.addListener(g,"position_changed",c)))},[c]),u.useEffect(function(){g&&f&&(D!==null&&google.maps.event.removeListener(D),j(google.maps.event.addListener(g,"zindex_changed",f)))},[f]),u.useEffect(function(){var N=new google.maps.InfoWindow(G({},r||{}));return S(N),U.current=document.createElement("div"),s&&m(google.maps.event.addListener(N,"closeclick",s)),a&&h(google.maps.event.addListener(N,"domready",a)),l&&k(google.maps.event.addListener(N,"content_changed",l)),c&&O(google.maps.event.addListener(N,"position_changed",c)),f&&j(google.maps.event.addListener(N,"zindex_changed",f)),N.setContent(U.current),i&&N.setPosition(i),o&&N.setZIndex(o),n?N.open(v,n):N.getPosition()?N.open(v):We(!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),P&&google.maps.event.removeListener(P),D&&google.maps.event.removeListener(D),p&&p(N),N.close()}},[]),U.current?Qn.createPortal(u.Children.only(e),U.current):null}u.memo(tv);var Rc=function(t){Ie(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):We(!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(G({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=ae({updaterMap:Ka,eventMap:qa,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{infoWindow:n}},this.setInfoWindowCallback)},e.prototype.componentDidUpdate=function(n){this.state.infoWindow!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:Ka,eventMap:qa,prevProps:n,nextProps:this.props,instance:this.state.infoWindow}))},e.prototype.componentWillUnmount=function(){this.state.infoWindow!==null&&(ce(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},e.prototype.render=function(){return this.containerElement?Qn.createPortal(u.Children.only(this.props.children),this.containerElement):null},e.contextType=ie,e}(u.PureComponent),Ja={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Xa={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)}},nv={};function rv(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,c=t.onMouseDown,f=t.onMouseMove,d=t.onMouseOut,p=t.onMouseOver,v=t.onMouseUp,y=t.onRightClick,g=t.onClick,S=t.onDrag,w=t.onLoad,L=t.onUnmount,m=u.useContext(ie),_=u.useState(null),E=_[0],h=_[1],b=u.useState(null),x=b[0],k=b[1],M=u.useState(null),P=M[0],O=M[1],R=u.useState(null),D=R[0],j=R[1],U=u.useState(null),N=U[0],V=U[1],q=u.useState(null),$=q[0],F=q[1],Z=u.useState(null),te=Z[0],X=Z[1],J=u.useState(null),T=J[0],fe=J[1],xe=u.useState(null),H=xe[0],Oe=xe[1],ke=u.useState(null),se=ke[0],we=ke[1],Ne=u.useState(null),pe=Ne[0],Se=Ne[1],Pe=u.useState(null),Ce=Pe[0],Re=Pe[1];return u.useEffect(function(){E!==null&&E.setMap(m)},[m]),u.useEffect(function(){typeof e<"u"&&E!==null&&E.setOptions(e)},[E,e]),u.useEffect(function(){typeof n<"u"&&E!==null&&E.setDraggable(n)},[E,n]),u.useEffect(function(){typeof r<"u"&&E!==null&&E.setEditable(r)},[E,r]),u.useEffect(function(){typeof i<"u"&&E!==null&&E.setVisible(i)},[E,i]),u.useEffect(function(){typeof o<"u"&&E!==null&&E.setPath(o)},[E,o]),u.useEffect(function(){E&&s&&(x!==null&&google.maps.event.removeListener(x),k(google.maps.event.addListener(E,"dblclick",s)))},[s]),u.useEffect(function(){E&&a&&(P!==null&&google.maps.event.removeListener(P),O(google.maps.event.addListener(E,"dragend",a)))},[a]),u.useEffect(function(){E&&l&&(D!==null&&google.maps.event.removeListener(D),j(google.maps.event.addListener(E,"dragstart",l)))},[l]),u.useEffect(function(){E&&c&&(N!==null&&google.maps.event.removeListener(N),V(google.maps.event.addListener(E,"mousedown",c)))},[c]),u.useEffect(function(){E&&f&&($!==null&&google.maps.event.removeListener($),F(google.maps.event.addListener(E,"mousemove",f)))},[f]),u.useEffect(function(){E&&d&&(te!==null&&google.maps.event.removeListener(te),X(google.maps.event.addListener(E,"mouseout",d)))},[d]),u.useEffect(function(){E&&p&&(T!==null&&google.maps.event.removeListener(T),fe(google.maps.event.addListener(E,"mouseover",p)))},[p]),u.useEffect(function(){E&&v&&(H!==null&&google.maps.event.removeListener(H),Oe(google.maps.event.addListener(E,"mouseup",v)))},[v]),u.useEffect(function(){E&&y&&(se!==null&&google.maps.event.removeListener(se),we(google.maps.event.addListener(E,"rightclick",y)))},[y]),u.useEffect(function(){E&&g&&(pe!==null&&google.maps.event.removeListener(pe),Se(google.maps.event.addListener(E,"click",g)))},[g]),u.useEffect(function(){E&&S&&(Ce!==null&&google.maps.event.removeListener(Ce),Re(google.maps.event.addListener(E,"drag",S)))},[S]),u.useEffect(function(){var ee=new google.maps.Polyline(G(G({},e||nv),{map:m}));return o&&ee.setPath(o),typeof i<"u"&&ee.setVisible(i),typeof r<"u"&&ee.setEditable(r),typeof n<"u"&&ee.setDraggable(n),s&&k(google.maps.event.addListener(ee,"dblclick",s)),a&&O(google.maps.event.addListener(ee,"dragend",a)),l&&j(google.maps.event.addListener(ee,"dragstart",l)),c&&V(google.maps.event.addListener(ee,"mousedown",c)),f&&F(google.maps.event.addListener(ee,"mousemove",f)),d&&X(google.maps.event.addListener(ee,"mouseout",d)),p&&fe(google.maps.event.addListener(ee,"mouseover",p)),v&&Oe(google.maps.event.addListener(ee,"mouseup",v)),y&&we(google.maps.event.addListener(ee,"rightclick",y)),g&&Se(google.maps.event.addListener(ee,"click",g)),S&&Re(google.maps.event.addListener(ee,"drag",S)),h(ee),w&&w(ee),function(){x!==null&&google.maps.event.removeListener(x),P!==null&&google.maps.event.removeListener(P),D!==null&&google.maps.event.removeListener(D),N!==null&&google.maps.event.removeListener(N),$!==null&&google.maps.event.removeListener($),te!==null&&google.maps.event.removeListener(te),T!==null&&google.maps.event.removeListener(T),H!==null&&google.maps.event.removeListener(H),se!==null&&google.maps.event.removeListener(se),pe!==null&&google.maps.event.removeListener(pe),L&&L(ee),ee.setMap(null)}},[]),null}u.memo(rv);(function(t){Ie(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(G(G({},this.props.options||{}),{map:this.context}));this.registeredEvents=ae({updaterMap:Xa,eventMap:Ja,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polyline:n}},this.setPolylineCallback)},e.prototype.componentDidUpdate=function(n){this.state.polyline!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:Xa,eventMap:Ja,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),ce(this.registeredEvents),this.state.polyline.setMap(null))},e.prototype.render=function(){return null},e.contextType=ie,e})(u.PureComponent);var Ya={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Qa={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 iv(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,c=t.onDragStart,f=t.onMouseDown,d=t.onMouseMove,p=t.onMouseOut,v=t.onMouseOver,y=t.onMouseUp,g=t.onRightClick,S=t.onClick,w=t.onDrag,L=t.onLoad,m=t.onUnmount,_=t.onEdit,E=u.useContext(ie),h=u.useState(null),b=h[0],x=h[1],k=u.useState(null),M=k[0],P=k[1],O=u.useState(null),R=O[0],D=O[1],j=u.useState(null),U=j[0],N=j[1],V=u.useState(null),q=V[0],$=V[1],F=u.useState(null),Z=F[0],te=F[1],X=u.useState(null),J=X[0],T=X[1],fe=u.useState(null),xe=fe[0],H=fe[1],Oe=u.useState(null),ke=Oe[0],se=Oe[1],we=u.useState(null),Ne=we[0],pe=we[1],Se=u.useState(null),Pe=Se[0],Ce=Se[1],Re=u.useState(null),ee=Re[0],Ve=Re[1];return u.useEffect(function(){b!==null&&b.setMap(E)},[E]),u.useEffect(function(){typeof e<"u"&&b!==null&&b.setOptions(e)},[b,e]),u.useEffect(function(){typeof n<"u"&&b!==null&&b.setDraggable(n)},[b,n]),u.useEffect(function(){typeof r<"u"&&b!==null&&b.setEditable(r)},[b,r]),u.useEffect(function(){typeof i<"u"&&b!==null&&b.setVisible(i)},[b,i]),u.useEffect(function(){typeof o<"u"&&b!==null&&b.setPath(o)},[b,o]),u.useEffect(function(){typeof s<"u"&&b!==null&&b.setPaths(s)},[b,s]),u.useEffect(function(){b&&a&&(M!==null&&google.maps.event.removeListener(M),P(google.maps.event.addListener(b,"dblclick",a)))},[a]),u.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,_]),u.useEffect(function(){b&&l&&(R!==null&&google.maps.event.removeListener(R),D(google.maps.event.addListener(b,"dragend",l)))},[l]),u.useEffect(function(){b&&c&&(U!==null&&google.maps.event.removeListener(U),N(google.maps.event.addListener(b,"dragstart",c)))},[c]),u.useEffect(function(){b&&f&&(q!==null&&google.maps.event.removeListener(q),$(google.maps.event.addListener(b,"mousedown",f)))},[f]),u.useEffect(function(){b&&d&&(Z!==null&&google.maps.event.removeListener(Z),te(google.maps.event.addListener(b,"mousemove",d)))},[d]),u.useEffect(function(){b&&p&&(J!==null&&google.maps.event.removeListener(J),T(google.maps.event.addListener(b,"mouseout",p)))},[p]),u.useEffect(function(){b&&v&&(xe!==null&&google.maps.event.removeListener(xe),H(google.maps.event.addListener(b,"mouseover",v)))},[v]),u.useEffect(function(){b&&y&&(ke!==null&&google.maps.event.removeListener(ke),se(google.maps.event.addListener(b,"mouseup",y)))},[y]),u.useEffect(function(){b&&g&&(Ne!==null&&google.maps.event.removeListener(Ne),pe(google.maps.event.addListener(b,"rightclick",g)))},[g]),u.useEffect(function(){b&&S&&(Pe!==null&&google.maps.event.removeListener(Pe),Ce(google.maps.event.addListener(b,"click",S)))},[S]),u.useEffect(function(){b&&w&&(ee!==null&&google.maps.event.removeListener(ee),Ve(google.maps.event.addListener(b,"drag",w)))},[w]),u.useEffect(function(){var Q=new google.maps.Polygon(G(G({},e||{}),{map:E}));return o&&Q.setPath(o),s&&Q.setPaths(s),typeof i<"u"&&Q.setVisible(i),typeof r<"u"&&Q.setEditable(r),typeof n<"u"&&Q.setDraggable(n),a&&P(google.maps.event.addListener(Q,"dblclick",a)),l&&D(google.maps.event.addListener(Q,"dragend",l)),c&&N(google.maps.event.addListener(Q,"dragstart",c)),f&&$(google.maps.event.addListener(Q,"mousedown",f)),d&&te(google.maps.event.addListener(Q,"mousemove",d)),p&&T(google.maps.event.addListener(Q,"mouseout",p)),v&&H(google.maps.event.addListener(Q,"mouseover",v)),y&&se(google.maps.event.addListener(Q,"mouseup",y)),g&&pe(google.maps.event.addListener(Q,"rightclick",g)),S&&Ce(google.maps.event.addListener(Q,"click",S)),w&&Ve(google.maps.event.addListener(Q,"drag",w)),x(Q),L&&L(Q),function(){M!==null&&google.maps.event.removeListener(M),R!==null&&google.maps.event.removeListener(R),U!==null&&google.maps.event.removeListener(U),q!==null&&google.maps.event.removeListener(q),Z!==null&&google.maps.event.removeListener(Z),J!==null&&google.maps.event.removeListener(J),xe!==null&&google.maps.event.removeListener(xe),ke!==null&&google.maps.event.removeListener(ke),Ne!==null&&google.maps.event.removeListener(Ne),Pe!==null&&google.maps.event.removeListener(Pe),m&&m(Q),Q.setMap(null)}},[]),null}u.memo(iv);(function(t){Ie(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(G(G({},this.props.options||{}),{map:this.context}));this.registeredEvents=ae({updaterMap:Qa,eventMap:Ya,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polygon:n}},this.setPolygonCallback)},e.prototype.componentDidUpdate=function(n){this.state.polygon!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:Qa,eventMap:Ya,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),ce(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},e.prototype.render=function(){return null},e.contextType=ie,e})(u.PureComponent);var el={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"},tl={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 ov(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,c=t.onMouseDown,f=t.onMouseMove,d=t.onMouseOut,p=t.onMouseOver,v=t.onMouseUp,y=t.onRightClick,g=t.onClick,S=t.onDrag,w=t.onBoundsChanged,L=t.onLoad,m=t.onUnmount,_=u.useContext(ie),E=u.useState(null),h=E[0],b=E[1],x=u.useState(null),k=x[0],M=x[1],P=u.useState(null),O=P[0],R=P[1],D=u.useState(null),j=D[0],U=D[1],N=u.useState(null),V=N[0],q=N[1],$=u.useState(null),F=$[0],Z=$[1],te=u.useState(null),X=te[0],J=te[1],T=u.useState(null),fe=T[0],xe=T[1],H=u.useState(null),Oe=H[0],ke=H[1],se=u.useState(null),we=se[0],Ne=se[1],pe=u.useState(null),Se=pe[0],Pe=pe[1],Ce=u.useState(null),Re=Ce[0],ee=Ce[1],Ve=u.useState(null),Q=Ve[0],qe=Ve[1];return u.useEffect(function(){h!==null&&h.setMap(_)},[_]),u.useEffect(function(){typeof e<"u"&&h!==null&&h.setOptions(e)},[h,e]),u.useEffect(function(){typeof r<"u"&&h!==null&&h.setDraggable(r)},[h,r]),u.useEffect(function(){typeof i<"u"&&h!==null&&h.setEditable(i)},[h,i]),u.useEffect(function(){typeof o<"u"&&h!==null&&h.setVisible(o)},[h,o]),u.useEffect(function(){typeof n<"u"&&h!==null&&h.setBounds(n)},[h,n]),u.useEffect(function(){h&&s&&(k!==null&&google.maps.event.removeListener(k),M(google.maps.event.addListener(h,"dblclick",s)))},[s]),u.useEffect(function(){h&&a&&(O!==null&&google.maps.event.removeListener(O),R(google.maps.event.addListener(h,"dragend",a)))},[a]),u.useEffect(function(){h&&l&&(j!==null&&google.maps.event.removeListener(j),U(google.maps.event.addListener(h,"dragstart",l)))},[l]),u.useEffect(function(){h&&c&&(V!==null&&google.maps.event.removeListener(V),q(google.maps.event.addListener(h,"mousedown",c)))},[c]),u.useEffect(function(){h&&f&&(F!==null&&google.maps.event.removeListener(F),Z(google.maps.event.addListener(h,"mousemove",f)))},[f]),u.useEffect(function(){h&&d&&(X!==null&&google.maps.event.removeListener(X),J(google.maps.event.addListener(h,"mouseout",d)))},[d]),u.useEffect(function(){h&&p&&(fe!==null&&google.maps.event.removeListener(fe),xe(google.maps.event.addListener(h,"mouseover",p)))},[p]),u.useEffect(function(){h&&v&&(Oe!==null&&google.maps.event.removeListener(Oe),ke(google.maps.event.addListener(h,"mouseup",v)))},[v]),u.useEffect(function(){h&&y&&(we!==null&&google.maps.event.removeListener(we),Ne(google.maps.event.addListener(h,"rightclick",y)))},[y]),u.useEffect(function(){h&&g&&(Se!==null&&google.maps.event.removeListener(Se),Pe(google.maps.event.addListener(h,"click",g)))},[g]),u.useEffect(function(){h&&S&&(Re!==null&&google.maps.event.removeListener(Re),ee(google.maps.event.addListener(h,"drag",S)))},[S]),u.useEffect(function(){h&&w&&(Q!==null&&google.maps.event.removeListener(Q),qe(google.maps.event.addListener(h,"bounds_changed",w)))},[w]),u.useEffect(function(){var W=new google.maps.Rectangle(G(G({},e||{}),{map:_}));return typeof o<"u"&&W.setVisible(o),typeof i<"u"&&W.setEditable(i),typeof r<"u"&&W.setDraggable(r),typeof n<"u"&&W.setBounds(n),s&&M(google.maps.event.addListener(W,"dblclick",s)),a&&R(google.maps.event.addListener(W,"dragend",a)),l&&U(google.maps.event.addListener(W,"dragstart",l)),c&&q(google.maps.event.addListener(W,"mousedown",c)),f&&Z(google.maps.event.addListener(W,"mousemove",f)),d&&J(google.maps.event.addListener(W,"mouseout",d)),p&&xe(google.maps.event.addListener(W,"mouseover",p)),v&&ke(google.maps.event.addListener(W,"mouseup",v)),y&&Ne(google.maps.event.addListener(W,"rightclick",y)),g&&Pe(google.maps.event.addListener(W,"click",g)),S&&ee(google.maps.event.addListener(W,"drag",S)),w&&qe(google.maps.event.addListener(W,"bounds_changed",w)),b(W),L&&L(W),function(){k!==null&&google.maps.event.removeListener(k),O!==null&&google.maps.event.removeListener(O),j!==null&&google.maps.event.removeListener(j),V!==null&&google.maps.event.removeListener(V),F!==null&&google.maps.event.removeListener(F),X!==null&&google.maps.event.removeListener(X),fe!==null&&google.maps.event.removeListener(fe),Oe!==null&&google.maps.event.removeListener(Oe),we!==null&&google.maps.event.removeListener(we),Se!==null&&google.maps.event.removeListener(Se),Re!==null&&google.maps.event.removeListener(Re),Q!==null&&google.maps.event.removeListener(Q),m&&m(W),W.setMap(null)}},[]),null}u.memo(ov);(function(t){Ie(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(G(G({},this.props.options||{}),{map:this.context}));this.registeredEvents=ae({updaterMap:tl,eventMap:el,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{rectangle:n}},this.setRectangleCallback)},e.prototype.componentDidUpdate=function(n){this.state.rectangle!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:tl,eventMap:el,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),ce(this.registeredEvents),this.state.rectangle.setMap(null))},e.prototype.render=function(){return null},e.contextType=ie,e})(u.PureComponent);var nl={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"},rl={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)}},sv={};function av(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,c=t.onDragStart,f=t.onMouseDown,d=t.onMouseMove,p=t.onMouseOut,v=t.onMouseOver,y=t.onMouseUp,g=t.onRightClick,S=t.onClick,w=t.onDrag,L=t.onCenterChanged,m=t.onRadiusChanged,_=t.onLoad,E=t.onUnmount,h=u.useContext(ie),b=u.useState(null),x=b[0],k=b[1],M=u.useState(null),P=M[0],O=M[1],R=u.useState(null),D=R[0],j=R[1],U=u.useState(null),N=U[0],V=U[1],q=u.useState(null),$=q[0],F=q[1],Z=u.useState(null),te=Z[0],X=Z[1],J=u.useState(null),T=J[0],fe=J[1],xe=u.useState(null),H=xe[0],Oe=xe[1],ke=u.useState(null),se=ke[0],we=ke[1],Ne=u.useState(null),pe=Ne[0],Se=Ne[1],Pe=u.useState(null),Ce=Pe[0],Re=Pe[1],ee=u.useState(null),Ve=ee[0],Q=ee[1],qe=u.useState(null),W=qe[0],Fe=qe[1],je=u.useState(null),ut=je[0],nt=je[1];return u.useEffect(function(){x!==null&&x.setMap(h)},[h]),u.useEffect(function(){typeof e<"u"&&x!==null&&x.setOptions(e)},[x,e]),u.useEffect(function(){typeof i<"u"&&x!==null&&x.setDraggable(i)},[x,i]),u.useEffect(function(){typeof o<"u"&&x!==null&&x.setEditable(o)},[x,o]),u.useEffect(function(){typeof s<"u"&&x!==null&&x.setVisible(s)},[x,s]),u.useEffect(function(){typeof r=="number"&&x!==null&&x.setRadius(r)},[x,r]),u.useEffect(function(){typeof n<"u"&&x!==null&&x.setCenter(n)},[x,n]),u.useEffect(function(){x&&a&&(P!==null&&google.maps.event.removeListener(P),O(google.maps.event.addListener(x,"dblclick",a)))},[a]),u.useEffect(function(){x&&l&&(D!==null&&google.maps.event.removeListener(D),j(google.maps.event.addListener(x,"dragend",l)))},[l]),u.useEffect(function(){x&&c&&(N!==null&&google.maps.event.removeListener(N),V(google.maps.event.addListener(x,"dragstart",c)))},[c]),u.useEffect(function(){x&&f&&($!==null&&google.maps.event.removeListener($),F(google.maps.event.addListener(x,"mousedown",f)))},[f]),u.useEffect(function(){x&&d&&(te!==null&&google.maps.event.removeListener(te),X(google.maps.event.addListener(x,"mousemove",d)))},[d]),u.useEffect(function(){x&&p&&(T!==null&&google.maps.event.removeListener(T),fe(google.maps.event.addListener(x,"mouseout",p)))},[p]),u.useEffect(function(){x&&v&&(H!==null&&google.maps.event.removeListener(H),Oe(google.maps.event.addListener(x,"mouseover",v)))},[v]),u.useEffect(function(){x&&y&&(se!==null&&google.maps.event.removeListener(se),we(google.maps.event.addListener(x,"mouseup",y)))},[y]),u.useEffect(function(){x&&g&&(pe!==null&&google.maps.event.removeListener(pe),Se(google.maps.event.addListener(x,"rightclick",g)))},[g]),u.useEffect(function(){x&&S&&(Ce!==null&&google.maps.event.removeListener(Ce),Re(google.maps.event.addListener(x,"click",S)))},[S]),u.useEffect(function(){x&&w&&(Ve!==null&&google.maps.event.removeListener(Ve),Q(google.maps.event.addListener(x,"drag",w)))},[w]),u.useEffect(function(){x&&L&&(W!==null&&google.maps.event.removeListener(W),Fe(google.maps.event.addListener(x,"center_changed",L)))},[S]),u.useEffect(function(){x&&m&&(ut!==null&&google.maps.event.removeListener(ut),nt(google.maps.event.addListener(x,"radius_changed",m)))},[m]),u.useEffect(function(){var ne=new google.maps.Circle(G(G({},e||sv),{map:h}));return typeof r=="number"&&ne.setRadius(r),typeof n<"u"&&ne.setCenter(n),typeof r=="number"&&ne.setRadius(r),typeof s<"u"&&ne.setVisible(s),typeof o<"u"&&ne.setEditable(o),typeof i<"u"&&ne.setDraggable(i),a&&O(google.maps.event.addListener(ne,"dblclick",a)),l&&j(google.maps.event.addListener(ne,"dragend",l)),c&&V(google.maps.event.addListener(ne,"dragstart",c)),f&&F(google.maps.event.addListener(ne,"mousedown",f)),d&&X(google.maps.event.addListener(ne,"mousemove",d)),p&&fe(google.maps.event.addListener(ne,"mouseout",p)),v&&Oe(google.maps.event.addListener(ne,"mouseover",v)),y&&we(google.maps.event.addListener(ne,"mouseup",y)),g&&Se(google.maps.event.addListener(ne,"rightclick",g)),S&&Re(google.maps.event.addListener(ne,"click",S)),w&&Q(google.maps.event.addListener(ne,"drag",w)),L&&Fe(google.maps.event.addListener(ne,"center_changed",L)),m&&nt(google.maps.event.addListener(ne,"radius_changed",m)),k(ne),_&&_(ne),function(){P!==null&&google.maps.event.removeListener(P),D!==null&&google.maps.event.removeListener(D),N!==null&&google.maps.event.removeListener(N),$!==null&&google.maps.event.removeListener($),te!==null&&google.maps.event.removeListener(te),T!==null&&google.maps.event.removeListener(T),H!==null&&google.maps.event.removeListener(H),se!==null&&google.maps.event.removeListener(se),pe!==null&&google.maps.event.removeListener(pe),Ce!==null&&google.maps.event.removeListener(Ce),W!==null&&google.maps.event.removeListener(W),ut!==null&&google.maps.event.removeListener(ut),E&&E(ne),ne.setMap(null)}},[]),null}u.memo(av);(function(t){Ie(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(G(G({},this.props.options||{}),{map:this.context}));this.registeredEvents=ae({updaterMap:rl,eventMap:nl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{circle:n}},this.setCircleCallback)},e.prototype.componentDidUpdate=function(n){this.state.circle!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:rl,eventMap:nl,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),ce(this.registeredEvents),(n=this.state.circle)===null||n===void 0||n.setMap(null))},e.prototype.render=function(){return null},e.contextType=ie,e})(u.PureComponent);var il={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},ol={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 lv(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,c=t.onRightClick,f=t.onAddFeature,d=t.onRemoveFeature,p=t.onRemoveProperty,v=t.onSetGeometry,y=t.onSetProperty,g=t.onLoad,S=t.onUnmount,w=u.useContext(ie),L=u.useState(null),m=L[0],_=L[1],E=u.useState(null),h=E[0],b=E[1],x=u.useState(null),k=x[0],M=x[1],P=u.useState(null),O=P[0],R=P[1],D=u.useState(null),j=D[0],U=D[1],N=u.useState(null),V=N[0],q=N[1],$=u.useState(null),F=$[0],Z=$[1],te=u.useState(null),X=te[0],J=te[1],T=u.useState(null),fe=T[0],xe=T[1],H=u.useState(null),Oe=H[0],ke=H[1],se=u.useState(null),we=se[0],Ne=se[1],pe=u.useState(null),Se=pe[0],Pe=pe[1],Ce=u.useState(null),Re=Ce[0],ee=Ce[1],Ve=u.useState(null),Q=Ve[0],qe=Ve[1];return u.useEffect(function(){m!==null&&m.setMap(w)},[w]),u.useEffect(function(){m&&r&&(h!==null&&google.maps.event.removeListener(h),b(google.maps.event.addListener(m,"dblclick",r)))},[r]),u.useEffect(function(){m&&i&&(k!==null&&google.maps.event.removeListener(k),M(google.maps.event.addListener(m,"mousedown",i)))},[i]),u.useEffect(function(){m&&o&&(O!==null&&google.maps.event.removeListener(O),R(google.maps.event.addListener(m,"mousemove",o)))},[o]),u.useEffect(function(){m&&s&&(j!==null&&google.maps.event.removeListener(j),U(google.maps.event.addListener(m,"mouseout",s)))},[s]),u.useEffect(function(){m&&a&&(V!==null&&google.maps.event.removeListener(V),q(google.maps.event.addListener(m,"mouseover",a)))},[a]),u.useEffect(function(){m&&l&&(F!==null&&google.maps.event.removeListener(F),Z(google.maps.event.addListener(m,"mouseup",l)))},[l]),u.useEffect(function(){m&&c&&(X!==null&&google.maps.event.removeListener(X),J(google.maps.event.addListener(m,"rightclick",c)))},[c]),u.useEffect(function(){m&&n&&(fe!==null&&google.maps.event.removeListener(fe),xe(google.maps.event.addListener(m,"click",n)))},[n]),u.useEffect(function(){m&&f&&(Oe!==null&&google.maps.event.removeListener(Oe),ke(google.maps.event.addListener(m,"addfeature",f)))},[f]),u.useEffect(function(){m&&d&&(we!==null&&google.maps.event.removeListener(we),Ne(google.maps.event.addListener(m,"removefeature",d)))},[d]),u.useEffect(function(){m&&p&&(Se!==null&&google.maps.event.removeListener(Se),Pe(google.maps.event.addListener(m,"removeproperty",p)))},[p]),u.useEffect(function(){m&&v&&(Re!==null&&google.maps.event.removeListener(Re),ee(google.maps.event.addListener(m,"setgeometry",v)))},[v]),u.useEffect(function(){m&&y&&(Q!==null&&google.maps.event.removeListener(Q),qe(google.maps.event.addListener(m,"setproperty",y)))},[y]),u.useEffect(function(){if(w!==null){var W=new google.maps.Data(G(G({},e||{}),{map:w}));r&&b(google.maps.event.addListener(W,"dblclick",r)),i&&M(google.maps.event.addListener(W,"mousedown",i)),o&&R(google.maps.event.addListener(W,"mousemove",o)),s&&U(google.maps.event.addListener(W,"mouseout",s)),a&&q(google.maps.event.addListener(W,"mouseover",a)),l&&Z(google.maps.event.addListener(W,"mouseup",l)),c&&J(google.maps.event.addListener(W,"rightclick",c)),n&&xe(google.maps.event.addListener(W,"click",n)),f&&ke(google.maps.event.addListener(W,"addfeature",f)),d&&Ne(google.maps.event.addListener(W,"removefeature",d)),p&&Pe(google.maps.event.addListener(W,"removeproperty",p)),v&&ee(google.maps.event.addListener(W,"setgeometry",v)),y&&qe(google.maps.event.addListener(W,"setproperty",y)),_(W),g&&g(W)}return function(){m&&(h!==null&&google.maps.event.removeListener(h),k!==null&&google.maps.event.removeListener(k),O!==null&&google.maps.event.removeListener(O),j!==null&&google.maps.event.removeListener(j),V!==null&&google.maps.event.removeListener(V),F!==null&&google.maps.event.removeListener(F),X!==null&&google.maps.event.removeListener(X),fe!==null&&google.maps.event.removeListener(fe),Oe!==null&&google.maps.event.removeListener(Oe),we!==null&&google.maps.event.removeListener(we),Se!==null&&google.maps.event.removeListener(Se),Re!==null&&google.maps.event.removeListener(Re),Q!==null&&google.maps.event.removeListener(Q),S&&S(m),m.setMap(null))}},[]),null}u.memo(lv);(function(t){Ie(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(G(G({},this.props.options||{}),{map:this.context}));this.registeredEvents=ae({updaterMap:ol,eventMap:il,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{data:n}},this.setDataCallback)}},e.prototype.componentDidUpdate=function(n){this.state.data!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:ol,eventMap:il,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),ce(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},e.prototype.render=function(){return null},e.contextType=ie,e})(u.PureComponent);var sl={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},al={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}};(function(t){Ie(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(G(G({},this.props.options),{map:this.context}));this.registeredEvents=ae({updaterMap:al,eventMap:sl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{kmlLayer:n}},this.setKmlLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.kmlLayer!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:al,eventMap:sl,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),ce(this.registeredEvents),this.state.kmlLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ie,e})(u.PureComponent);function Tc(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function uv(t,e){return new e(t.lat,t.lng)}function cv(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 fv(t,e,n){return t instanceof e?t:n(t,e)}function dv(t,e,n){return t instanceof e?t:n(t,e)}function hv(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 pv(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 Ac(t,e,n,r){return n!==void 0?hv(t,e,dv(n,google.maps.LatLngBounds,cv)):pv(t,e,fv(r,google.maps.LatLng,uv))}function gv(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function vv(t,e,n,r,i){var o=function(s){Ie(a,s);function a(l,c,f,d){var p=s.call(this)||this;return p.container=l,p.pane=c,p.position=f,p.bounds=d,p}return a.prototype.onAdd=function(){var l,c=(l=this.getPanes())===null||l===void 0?void 0:l[this.pane];c==null||c.appendChild(this.container)},a.prototype.draw=function(){for(var l=this.getProjection(),c=G({},this.container?Tc(this.container,i):{x:0,y:0}),f=Ac(l,c,this.bounds,this.position),d=0,p=Object.entries(f);d<p.length;d++){var v=p[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 ll(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function ul(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 mv(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,c=u.useContext(ie),f=u.useMemo(function(){var p=document.createElement("div");return p.style.position="absolute",p},[]),d=u.useMemo(function(){return vv(f,r,e,n,a)},[f,r,e,n]);return u.useEffect(function(){return o==null||o(d),d==null||d.setMap(c),function(){s==null||s(d),d==null||d.setMap(null)}},[c,d]),u.useEffect(function(){f.style.zIndex="".concat(i)},[i,f]),Cu.createPortal(l,f)}u.memo(mv);(function(t){Ie(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();We(!!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=G({x:0,y:0},r.containerRef.current?Tc(r.containerRef.current,r.props.getPixelPositionOffset):{}),a=Ac(o,s,r.props.bounds,r.props.position),l=r.state.containerStyle,c=l.left,f=l.top,d=l.width,p=l.height;gv(a,{left:c,top:f,width:d,height:p})||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=u.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=ll(n.position),i=ll(this.props.position),o=ul(n.bounds),s=ul(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?Cu.createPortal(C.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:u.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=ie,e})(u.PureComponent);function yv(){}var cl={onDblClick:"dblclick",onClick:"click"},fl={opacity:function(t,e){t.setOpacity(e)}};function bv(t){var e=t.url,n=t.bounds,r=t.options,i=t.visible,o=u.useContext(ie),s=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east)),a=u.useMemo(function(){var l=new google.maps.GroundOverlay(e,s,G({},r));return l},[]);return u.useEffect(function(){a!==null&&a.setMap(o)},[o]),u.useEffect(function(){typeof e<"u"&&a!==null&&(a.set("url",e),a.setMap(o))},[a,e]),u.useEffect(function(){typeof i<"u"&&a!==null&&a.setOpacity(i?1:0)},[a,i]),u.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}u.memo(bv);(function(t){Ie(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(){We(!!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,G(G({},this.props.options),{map:this.context}));this.registeredEvents=ae({updaterMap:fl,eventMap:cl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{groundOverlay:n}},this.setGroundOverlayCallback)},e.prototype.componentDidUpdate=function(n){this.state.groundOverlay!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:fl,eventMap:cl,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:yv},e.contextType=ie,e})(u.PureComponent);var dl={},hl={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function wv(t){var e=t.data,n=t.onLoad,r=t.onUnmount,i=t.options,o=u.useContext(ie),s=u.useState(null),a=s[0],l=s[1];return u.useEffect(function(){google.maps.visualization||We(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),u.useEffect(function(){We(!!e,"data property is required in HeatmapLayer %s",e)},[e]),u.useEffect(function(){a!==null&&a.setMap(o)},[o]),u.useEffect(function(){i&&a!==null&&a.setOptions(i)},[a,i]),u.useEffect(function(){var c=new google.maps.visualization.HeatmapLayer(G(G({},i||{}),{data:e,map:o}));return l(c),n&&n(c),function(){a!==null&&(r&&r(a),a.setMap(null))}},[]),null}u.memo(wv);(function(t){Ie(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(){We(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),We(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(G(G({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=ae({updaterMap:hl,eventMap:dl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},e.prototype.componentDidUpdate=function(n){ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:hl,eventMap:dl,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),ce(this.registeredEvents),this.state.heatmapLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ie,e})(u.PureComponent);var pl={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},gl={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){Ie(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=ae({updaterMap:gl,eventMap:pl,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{streetViewPanorama:i}},this.setStreetViewPanoramaCallback)},e.prototype.componentDidUpdate=function(n){this.state.streetViewPanorama!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:gl,eventMap:pl,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),ce(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},e.prototype.render=function(){return null},e.contextType=ie,e})(u.PureComponent);(function(t){Ie(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=ie,e})(u.PureComponent);(function(t){Ie(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(){We(!!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})(u.PureComponent);var vl={onDirectionsChanged:"directions_changed"},ml={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){Ie(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=ae({updaterMap:ml,eventMap:vl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{directionsRenderer:n}},this.setDirectionsRendererCallback)},e.prototype.componentDidUpdate=function(n){this.state.directionsRenderer!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:ml,eventMap:vl,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),ce(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},e.prototype.render=function(){return C.jsx(C.Fragment,{})},e.contextType=ie,e})(u.PureComponent);(function(t){Ie(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(){We(!!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})(u.PureComponent);var yl={onPlacesChanged:"places_changed"},bl={bounds:function(t,e){t.setBounds(e)}};(function(t){Ie(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=u.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(We(!!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=ae({updaterMap:bl,eventMap:yl,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{searchBox:r}},this.setSearchBoxCallback)}}},e.prototype.componentDidUpdate=function(n){this.state.searchBox!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:bl,eventMap:yl,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),ce(this.registeredEvents))},e.prototype.render=function(){return C.jsx("div",{ref:this.containerElement,children:u.Children.only(this.props.children)})},e.contextType=ie,e})(u.PureComponent);var wl={onPlaceChanged:"place_changed"},Sl={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){Ie(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=u.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;We(!!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=ae({updaterMap:Sl,eventMap:wl,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{autocomplete:i}},this.setAutocompleteCallback)}},e.prototype.componentDidUpdate=function(n){ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:Sl,eventMap:wl,prevProps:n,nextProps:this.props,instance:this.state.autocomplete})},e.prototype.componentWillUnmount=function(){this.state.autocomplete!==null&&ce(this.registeredEvents)},e.prototype.render=function(){return C.jsx("div",{ref:this.containerElement,className:this.props.className,children:u.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=ie,e})(u.PureComponent);const Sv='<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>',Lv='<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"/><g fill-rule="evenodd" clip-rule="evenodd" filter="url(#b)"><path fill="currentColor" 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"/><path fill="#fff" d="M33.913 12H14.087A2.087 2.087 0 0 0 12 14.087v19.826c0 1.153.934 2.087 2.087 2.087h19.826A2.087 2.087 0 0 0 36 33.913V14.087A2.087 2.087 0 0 0 33.913 12Zm-20.348 2.087c0-.288.234-.522.522-.522h7.826v4.07h-8.348v-3.548Zm9.913 9.13v-9.652h4.696v9.652h-4.696Zm4.696 1.566h-4.696v9.652h4.696v-9.652Zm1.565 9.652h4.174a.523.523 0 0 0 .522-.522v-9.13h-4.696v9.652Zm0-11.218v-9.652h4.174c.288 0 .522.234.522.522v9.13h-4.696ZM21.913 19.2v4.017h-8.348V19.2h8.348Zm0 9.6v-4.017h-8.348V28.8h8.348Zm-8.348 1.565h8.348v4.07h-7.826a.522.522 0 0 1-.522-.522v-3.548Z"/></g><defs><radialGradient id="a" cx="0" cy="0" r="1" gradientTransform="matrix(0 6 -20 0 24 60)" gradientUnits="userSpaceOnUse"><stop stop-color="#1D3665"/><stop offset="1" stop-color="#1D3665" 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_2412_6054"/><feBlend in="SourceGraphic" in2="effect1_backgroundBlur_2412_6054" result="shape"/></filter></defs></svg>',Ev='<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-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><g fill="#fff"><path fill-rule="evenodd" d="M15.878 16.411c0-.34.273-.617.61-.617h15.024c.337 0 .61.276.61.617v10.103H15.878V16.41Zm1.22.617v8.253h13.803v-8.253H17.1Z" clip-rule="evenodd"/><path fill-rule="evenodd" d="M15.878 25.28h16.244v9.155c0 .864-.694 1.565-1.55 1.565H17.428c-.855 0-1.55-.7-1.55-1.565V25.28Zm1.22 1.234v7.92a.33.33 0 0 0 .33.333h13.145a.33.33 0 0 0 .328-.332v-7.921H17.1ZM14 13.565c0-.864.694-1.565 1.55-1.565h16.9c.856 0 1.55.7 1.55 1.565v1.898c0 .864-.694 1.565-1.55 1.565h-16.9c-.856 0-1.55-.701-1.55-1.565v-1.898Zm1.55-.332a.33.33 0 0 0-.33.332v1.898a.33.33 0 0 0 .33.332h16.9a.33.33 0 0 0 .33-.332v-1.898a.33.33 0 0 0-.33-.332h-16.9Z" clip-rule="evenodd"/><path fill-rule="evenodd" d="M20.573 24c0-1.912 1.535-3.462 3.427-3.462 1.893 0 3.428 1.55 3.428 3.462v1.872a.639.639 0 0 1-.636.642H21.21a.639.639 0 0 1-.636-.642V24ZM24 21.77A2.218 2.218 0 0 0 21.794 24v1.28h4.413V24c0-1.231-.988-2.23-2.207-2.23Z" clip-rule="evenodd"/><path d="m26.765 29.18-2.724-1.376a.093.093 0 0 0-.083 0l-2.724 1.376a.094.094 0 0 0-.051.084v2.752c0 .036.02.069.05.084l2.725 1.376a.09.09 0 0 0 .042.01.09.09 0 0 0 .041-.01l2.724-1.376a.094.094 0 0 0 .051-.084v-2.751a.095.095 0 0 0-.05-.085ZM24 27.994l2.624 1.326-1.26.637-2.525-1.378 1.16-.585Zm0 2.651-2.625-1.325 1.261-.637 2.524 1.377-1.16.585Zm-2.631-1.118 2.538 1.282v2.431l-2.538-1.282v-2.431Zm2.723 3.713V30.81l2.538-1.282v2.432l-2.538 1.281Z"/><path fill-rule="evenodd" d="M26.892 28.926a.38.38 0 0 1 .206.339v2.751a.379.379 0 0 1-.207.339l-2.723 1.375a.369.369 0 0 1-.338 0l-2.722-1.375a.379.379 0 0 1-.208-.339v-2.752c0-.142.079-.274.207-.339l2.727-1.377a.373.373 0 0 1 .33 0l.002.002 2.726 1.376ZM21.233 32.1a.094.094 0 0 1-.05-.084v-2.752c0-.035.019-.068.05-.084l2.724-1.376a.093.093 0 0 1 .084 0l2.724 1.376a.095.095 0 0 1 .05.085v2.751c0 .035-.019.068-.05.084l-2.724 1.376a.09.09 0 0 1-.042.01.09.09 0 0 1-.042-.01L21.233 32.1Zm5.397-.141v-2.432l-2.538 1.282v2.431l2.538-1.281Zm-.282-.176v-1.796l-1.974.998v1.795l1.974-.997Zm-2.442-.974-2.538-1.282v2.431l2.538 1.282V30.81Zm-2.256-.822 1.974.998v1.795l-1.974-.998v-1.795Zm2.349.658 1.16-.585-2.524-1.377-1.26.637 2.624 1.325Zm.55-.595-.55.277-1.995-1.008.626-.316 1.918 1.047Zm.814-.094 1.26-.636L24 27.994l-1.16.585 2.524 1.377Zm.005-.32-1.918-1.047.549-.277 1.995 1.008-.627.316Z" clip-rule="evenodd"/></g><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_958_9661"/><feBlend in="SourceGraphic" in2="effect1_backgroundBlur_958_9661" result="shape"/></filter></defs></svg>',yr={PinPvz:Ev,PinHome:Sv,PinLocker:Lv},xv=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...t},oe.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"})),Dc=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:26,height:14,fill:"none",viewBox:"0 0 26 14",...t},oe.createElement("g",{fill:"#000"},oe.createElement("path",{d:"M0 13.252V8.346h1.053v3.844h3.08v1.062H0ZM4.535 13.252V8.346h1.053v3.844h3.08v1.062H4.535ZM9.126 13.252V9.36a1.02 1.02 0 0 1 .503-.87.973.973 0 0 1 .503-.137h2.874a.95.95 0 0 1 .502.136c.154.09.277.213.367.367.095.15.143.318.143.504v3.892H12.95v-1.58H10.18v1.58H9.126Zm1.053-2.64h2.772V9.413H10.18v1.197ZM14.792 13.252v-4.9h1.087l1.658 1.98 1.65-1.98h1.094v4.9h-1.06V9.965l-1.684 2.014-1.692-2.007v3.28h-1.053ZM21.108 13.252V9.36a1.018 1.018 0 0 1 .503-.87.973.973 0 0 1 .503-.137h2.874a.95.95 0 0 1 .503.136c.153.09.276.213.366.367A.92.92 0 0 1 26 9.36v3.892h-1.067v-1.58h-2.771v1.58h-1.054Zm1.053-2.64h2.772V9.413h-2.771v1.197ZM1.005 5.648a.973.973 0 0 1-.502-.137A1.018 1.018 0 0 1 0 4.641V1.756a1.018 1.018 0 0 1 .503-.87.973.973 0 0 1 .502-.137h2.881c.181 0 .347.045.496.136.154.09.276.213.367.367a.92.92 0 0 1 .143.504V4.64c0 .181-.048.349-.143.503-.09.154-.213.277-.367.367a.937.937 0 0 1-.496.137h-2.88Zm.048-1.062h2.772V1.81H1.053v2.776ZM5.64 5.648v-4.9h1.087l1.657 1.98 1.651-1.98h1.094v4.9h-1.06V2.36L8.384 4.375 6.693 2.368v3.28H5.64ZM11.943 5.648v-4.9h1.087l2.738 3.267V.749h1.066v4.899h-1.087l-2.751-3.28v3.28h-1.053ZM17.425 5.648v-4.9h1.04v4.9h-1.04Z"}))),Ic=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:26,height:8,fill:"none",viewBox:"0 0 26 8",...t},oe.createElement("g",{fill:"#000"},oe.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"})));function Cv(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 co(t){return!!(t&&typeof t.then=="function")}function Mi(t,e){return co(t)?Promise.resolve(t).then(e):e(t)}function Mo(t,e,n){function r(i){const o=e(i);throw t.emit(o),console.error(o),o}try{const i=n();return co(i)?i.catch(r):i}catch(i){r(i)}}function Ll(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 _v(t){return typeof t=="object"&&!Array.isArray(t)&&t!==null}function Nc(t){if(typeof t=="string")return[t];if(Array.isArray(t))return t}function wt(t){return Nc(t)||[]}function Mv(t,e){return _v(e)?wt(e==null?void 0:e[t]):wt(e)}function fs(t){return Array.from(new Set(t))}function jc(t){return t&&t.replace(/\/+$/,"")}function Ov(t){if(typeof t=="string")return t;if(typeof(t==null?void 0:t.message)=="string")return t.message}const kv=(t,e)=>fetch(t,e),Bc=(t=kv)=>(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 Vt(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 Pv(t,e,n){const r=new Set,i=new Set;function o(l){const c=new Set(e());i.forEach(f=>{(l===void 0||(l==null?void 0:l.findIndex(p=>c.has(p)||f.namespaces.has(p)))!==-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 c=new Set;l.forEach(d=>{d===void 0?c=void 0:c!==void 0&&d.forEach(p=>c.add(p))});const f=c?Array.from(c.keys()):void 0;o(f)}return Object.freeze({emit(l,c){t()&&(s.push(l),c?setTimeout(a,0):a())},listen(l){return r.add(l),{unsubscribe:()=>{r.delete(l)}}},listenSome(l){const c={fn:d=>{l(d)},namespaces:new Set};i.add(c);const f={unsubscribe:()=>{i.delete(c)},subscribeNs:d=>(wt(d).forEach(p=>c.namespaces.add(p)),d===void 0&&c.namespaces.add(n()),f)};return f}})}function Rv(t,e){let n=!0;function r(){return n}const i=Object.freeze({onPendingLanguageChange:Vt(r),onLanguageChange:Vt(r),onLoadingChange:Vt(r),onFetchingChange:Vt(r),onInitialLoaded:Vt(r),onRunningChange:Vt(r),onCacheChange:Vt(r),onUpdate:Pv(r,t,e),onPermanentChange:Vt(r),onError:Vt(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 El 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 Tv extends Error{constructor(e,n){super(e),this.cause=n,this.name="LanguageDetectorError"}}class xl extends Error{constructor(e,n){super(e),this.cause=n,this.name="LanguageStorageError"}}const Uc=t=>{const e=new Map;return Object.entries(t).forEach(([n,r])=>{if(r!=null){if(typeof r=="object"){Uc(r).forEach((i,o)=>{e.set(n+"."+o,i)});return}e.set(n,r)}}),e},br=t=>{const[e,...n]=t.split(":"),r=n.join(":");return{language:e,namespace:r||""}},Ft=({language:t,namespace:e})=>e?`${t}:${e}`:t;function Av(t,e,n,r,i,o,s){const a=new Map,l=new Map;let c={},f=0;function d(g,S,w){const L=Ft(g);l.set(L,{data:Uc(S),version:w}),t.onCacheChange.emit(g)}function p(g){let S;if(!S){const w=c[Ft(g)];typeof w=="function"&&(S=w())}return S||(S=e(g)),co(S)?S==null?void 0:S.catch(w=>{const L=new El(g,w);throw t.onError.emit(L),console.error(L),L}):S}function v(g,S){var w;let L;return S&&(L=(w=n(g))===null||w===void 0?void 0:w.catch(m=>{const _=new El(g,m,!0);return t.onError.emit(_),console.warn(_),p(g)})),L||(L=p(g)),L}const y=Object.freeze({addStaticData(g){g&&(c=Object.assign(Object.assign({},c),g),Object.entries(g).forEach(([S,w])=>{if(typeof w!="function"){const L=br(S),m=l.get(S);(!m||m.version===0)&&d(L,w,0)}}))},invalidate(){a.clear(),f+=1},addRecord(g,S){d(g,S,f)},exists(g,S=!1){const w=l.get(Ft(g));return w&&S?w.version===f:!!w},getRecord(g){var S;return(S=l.get(Ft(r(g))))===null||S===void 0?void 0:S.data},getTranslation(g,S){var w;return(w=l.get(Ft(g)))===null||w===void 0?void 0:w.data.get(S)},getTranslationNs(g,S,w){var L;for(const m of g)for(const _ of S){const E=(L=l.get(Ft({language:_,namespace:m})))===null||L===void 0?void 0:L.data.get(w);if(E!=null)return[m]}return fs(g)},getTranslationFallback(g,S,w){var L;for(const m of g)for(const _ of S){const E=(L=l.get(Ft({language:_,namespace:m})))===null||L===void 0?void 0:L.data.get(w);if(E!=null)return E}},changeTranslation(g,S,w){var L;const m=(L=l.get(Ft(g)))===null||L===void 0?void 0:L.data;m==null||m.set(S,w),t.onCacheChange.emit(Object.assign(Object.assign({},g),{key:S}))},isFetching(g){if(i())return!0;if(g===void 0)return a.size>0;const S=wt(g);return!!Array.from(a.keys()).find(w=>S.includes(br(w).namespace))},isLoading(g,S){const w=wt(S);return!!(i()||Array.from(a.keys()).find(L=>{const m=br(L);return(!w.length||w.includes(m.namespace))&&!y.exists({namespace:m.namespace,language:g})}))},async loadRecords(g,S){const w=g.map(m=>{const _=r(m),E=Ft(_),h=a.get(E);if(h)return{new:!1,promise:h,keyObject:_,cacheKey:E};const b=v(_,S)||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(w.map(m=>m.promise));return w.forEach((m,_)=>{const E=a.get(m.cacheKey)!==m.promise;if(m.new&&!E){a.delete(m.cacheKey);const h=L[_];h?y.addRecord(m.keyObject,h):y.getRecord(m.keyObject)||y.addRecord(m.keyObject,{})}}),o.notify(),s.notify(),w.map(m=>y.getRecord(m.keyObject))},getAllRecords(){return Array.from(l.entries()).map(([S,w])=>Object.assign(Object.assign({},br(S)),{data:w.data}))}});return y}function Vc(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 Dv={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},ds="invalid",Iv="https://app.tolgee.io",Nv=({key:t})=>t,jv={defaultNs:"",observerOptions:Dv,observerType:"invisible",onFormatError:ds,apiUrl:Iv,fetch:Bc(),onTranslationMissing:Nv},hs=(...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 Cl(t,e){const n=hs(jv,e==null?void 0:e.initialOptions,t);return n.apiUrl=jc(n.apiUrl),t!=null&&t.fetch&&(n.fetch=Bc(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 Bv(t,e,n,r,i,o,s,a){const l={ui:void 0},c={formatters:[],finalFormatter:void 0,observer:void 0,devBackend:void 0,backends:[],ui:void 0,languageDetector:void 0,languageStorage:void 0},f=async({keysAndDefaults:O,event:R})=>{var D;const j=O.map(({key:U,ns:N,defaultValue:V})=>({key:U,defaultValue:V,fallbackNamespaces:r(N),namespace:i({key:U,ns:N})[0],translation:o({key:U,ns:N})}));(D=c.ui)===null||D===void 0||D.handleElementClick(j,R)},d=(O,R)=>{var D;return((D=c.observer)===null||D===void 0?void 0:D.findPositions(O,R))||[]};function p(O){const R=o({key:O.key,ns:O.ns});return P.formatTranslation(Object.assign(Object.assign({},O),{translation:R,formatEnabled:!0}))}function v(){return{fetch:e().fetch}}function y(O){c.observer=O==null?void 0:O()}function g(){return!!c.observer}function S(O){O&&c.formatters.push(O)}function w(O){c.finalFormatter=O}function L(O){l.ui=O}function m(){return!!l.ui}function _(O){c.languageStorage=O}function E(O){c.languageDetector=O}function h(){return Mo(a.onError,O=>new xl("Tolgee: Failed to load language",O),()=>{var O;return(O=c.languageStorage)===null||O===void 0?void 0:O.getLanguage(v())})}function b(){if(!c.languageDetector)return;const O=n();return Mo(a.onError,R=>new Tv("Tolgee: Failed to detect language",R),()=>{var R;return(R=c.languageDetector)===null||R===void 0?void 0:R.getLanguage(Object.assign({availableLanguages:O},v()))})}function x(O){O&&c.backends.push(O)}function k(O){c.devBackend=O}function M(O,R){const D=Object.freeze({setFinalFormatter:w,addFormatter:S,setObserver:y,hasObserver:g,setUi:L,hasUi:m,setDevBackend:k,addBackend:x,setLanguageDetector:E,setLanguageStorage:_});R(O,D)}const P=Object.freeze({addPlugin:M,run(){var O,R;const{apiKey:D,apiUrl:j,projectId:U,observerOptions:N}=e();c.ui=(O=l.ui)===null||O===void 0?void 0:O.call(l,{apiKey:D,apiUrl:j,projectId:U,highlight:P.highlight,changeTranslation:s,findPositions:d,onPermanentChange:V=>a.onPermanentChange.emit(V)}),(R=c.observer)===null||R===void 0||R.run({mouseHighlight:!0,options:N,translate:p,onClick:f})},stop(){var O;c.ui=void 0,(O=c.observer)===null||O===void 0||O.stop()},getLanguageStorage(){return c.languageStorage},getInitialLanguage(){const O=n(),R=h();return Mi(R,D=>(!O||O.includes(D))&&D?D:b())},setStoredLanguage(O){return Mo(a.onError,R=>new xl("Tolgee: Failed to store language",R),()=>{var R;return(R=c.languageStorage)===null||R===void 0?void 0:R.setLanguage(O,v())})},getDevBackend(){return c.devBackend},getBackendRecord:({language:O,namespace:R})=>{for(const D of c.backends){const j=D.getRecord(Object.assign({language:O,namespace:R},v()));if(j!==void 0)return j}},getBackendDevRecord:({language:O,namespace:R})=>{var D;const{apiKey:j,apiUrl:U,projectId:N}=e();return(D=c.devBackend)===null||D===void 0?void 0:D.getRecord(Object.assign({apiKey:j,apiUrl:U,projectId:N,language:O,namespace:R},v()))},getLanguageDetector(){return c.languageDetector},retranslate(){var O;(O=c.observer)===null||O===void 0||O.retranslate()},highlight:(O,R)=>{var D,j;return((j=(D=c.observer)===null||D===void 0?void 0:D.highlight)===null||j===void 0?void 0:j.call(D,O,R))||{unhighlight(){}}},unwrap(O){var R;return c.observer?(R=c.observer)===null||R===void 0?void 0:R.unwrap(O):{text:O,keys:[]}},wrap(O){var R;return c.observer?(R=c.observer)===null||R===void 0?void 0:R.wrap(O):O.translation},hasDevBackend(){return!!P.getDevBackend()},formatTranslation(O){var R,{formatEnabled:D}=O,j=Vc(O,["formatEnabled"]);const{key:U,translation:N,defaultValue:V,noWrap:q,params:$,ns:F,orEmpty:Z}=j,te=N??V;let X="";N==null&&(X=e().onTranslationMissing(j));let J=te??(Z?"":X);const T=t(),fe=D||!(!((R=c.observer)===null||R===void 0)&&R.outputNotFormattable),xe=H=>c.observer&&!q?c.observer.wrap({key:U,translation:H,defaultValue:V,params:$,ns:F}):H;J=xe(J);try{if(te&&T&&fe)for(const H of c.formatters)J=H.format({translation:J,language:T,params:$});c.finalFormatter&&te&&T&&fe&&(J=c.finalFormatter.format({translation:J,language:T,params:$}))}catch(H){console.error(H);const Oe=Ov(H)||ds,ke=e().onFormatError,se=typeof ke;se==="string"?J=ke:se==="function"?J=ke(Oe,j):J=ds,J=xe(J)}return J}});return P}const _l=(t,e,n)=>{let r=t;return Object.freeze({init(i){r=i},notify(){const i=e();r!==i&&n(i),r=i}})};function Uv(t,e,n){let r=Cl(),i;const o=Object.freeze({init(s){r=Cl(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){wt(s).forEach(l=>{const c=r.activeNamespaces.get(l);c!==void 0?r.activeNamespaces.set(l,c+1):r.activeNamespaces.set(l,1)})},removeActiveNs(s){wt(s).forEach(l=>{const c=r.activeNamespaces.get(l);c!==void 0&&c>1?r.activeNamespaces.set(l,c-1):r.activeNamespaces.delete(l)})},getRequiredNamespaces(){return fs([...r.initialOptions.ns||[r.initialOptions.defaultNs],...wt(r.initialOptions.fallbackNs),...r.activeNamespaces.keys()])},getFallbackLangs(s){const a=s||o.getLanguage();return a?fs([a,...Mv(a,r.initialOptions.fallbackLanguage)]):[]},getFallbackNs(){return wt(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=>br(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:jc(s.apiUrl)}):i=void 0}});return o}function Vv(t){var{ns:e,noWrap:n,orEmpty:r,params:i,language:o}=t,s=Vc(t,["ns","noWrap","orEmpty","params","language"]);return Object.assign(Object.assign({},{ns:e,noWrap:n,orEmpty:r,language:o}),{params:Object.assign({},s)})}const Fc=(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({},Vv(r)),n)),n};function Fv({options:t}){const e=Rv(l,c),n=_l(!1,()=>s.isFetching(),e.onFetchingChange.emit),r=_l(!1,()=>E.isLoading(),e.onLoadingChange.emit),i=Uv(e.onLanguageChange,e.onPendingLanguageChange,e.onRunningChange),o=Bv(i.getLanguage,i.getInitialOptions,i.getAvailableLanguages,f,S,w,p,e),s=Av(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 c(h){return i.getDefaultNs(h)}function f(h){return[...wt(c(h)),...l()]}function d(h){return[...wt(h??c()),...i.getRequiredNamespaces()]}function p(h,b,x){const k=i.withDefaultNs(h),M=s.getTranslation(k,b);return s.changeTranslation(k,b,x),{revert(){s.changeTranslation(k,b,M)}}}function v(h){i.init(h),s.addStaticData(i.getInitialOptions().staticData)}function y(h,b){const x=i.getFallbackLangs(h),k=d(b),M=[];return x.forEach(P=>{k.forEach(O=>{s.exists({language:P,namespace:O},!0)||M.push({language:P,namespace:O})})}),M}function g(h,b){const x=y(h,b);if(x.length)return Mi(E.loadRecords(x),()=>{})}function S({key:h,ns:b}){const x=i.getFallbackLangs(),k=f(b??void 0);return s.getTranslationNs(k,x,h)}function w({key:h,ns:b,language:x}){const k=f(b??void 0),M=i.getFallbackLangs(x);return s.getTranslationFallback(k,M,h)}function L(){const h=Mi(m(),()=>g());if(co(h))return i.setInitialLoading(!0),n.notify(),r.notify(),Promise.resolve(h).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 Mi(b,x=>{const k=x||i.getInitialOptions().defaultLanguage;k&&i.setLanguage(k)})}function _(){if((o.getLanguageDetector()||o.getLanguageStorage())&&!i.getAvailableLanguages())throw new Error(Ll("availableLanguages"));if(!i.getLanguage()&&!i.getInitialOptions().defaultLanguage)throw new Error(Ll(["defaultLanguage","language"]))}const E=Object.freeze(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),i),o),s),{init:v,getTranslation:w,changeTranslation:p,getTranslationNs:S,getDefaultAndFallbackNs:f,async changeLanguage(h){i.getPendingLanguage()===h&&i.getLanguage()===h||(i.setPendingLanguage(h),i.isRunning()&&await g(h),h===i.getPendingLanguage()&&(i.setLanguage(h),await o.setStoredLanguage(h)))},async addActiveNs(h,b){b||i.addActiveNs(h),i.isRunning()&&await g(void 0,h)},loadRecords(h){return s.loadRecords(h,E.isDev())},async loadRecord(h){return(await E.loadRecords([h]))[0]},isLoading(h){return s.isLoading(i.getLanguage(),h)},isLoaded(h){const b=i.getLanguage();if(!b)return!1;const x=i.getFallbackLangs(b),k=d(h),M=[];return x.forEach(P=>{k.forEach(O=>{s.exists({language:P,namespace:O})||M.push({language:P,namespace:O})})}),M.length===0},t:(...h)=>{const b=Fc(...h),x=w(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 zv(t){const e=Fv({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 $v=()=>{const t={plugins:[],options:{}},e=Object.freeze({use(n){return t.plugins.push(n),e},updateDefaults(n){return t.options=hs(t.options,n),e},init(n){const r=zv(hs(t.options,n));return t.plugins.forEach(r.addPlugin),r}});return e},zc=0,ps=1,Hv=2;class Wv extends Error{constructor(e,n,r){let i;e===zc?i="Empty parameter":e===ps?i="Unexpected character":i="Unexpected end",super(`Tolgee parser: ${i} at ${n} in "${r}"`),this.code=e,this.index=n}}function Ml(t){return/\s/.test(t)}const en=0,gs=1,Oi=2,Oo=3,ko=4,Gv=new Set([Oi,gs,en]),vs="'",Zv=new Set(["{","}",vs]),qv=t=>/[0-9a-zA-Z_]/.test(t);function Kv(t){let e=en,n="",r="",i="";const o=[],s=[];let a=0;function l(p){throw new Wv(p,a,t)}const c=()=>{o.push(n),n=""},f=()=>{qv(i)||l(ps),r+=i},d=()=>{r===""&&l(zc),s.push(r),r=""};for(a=0;a<t.length;a++)switch(i=t[a],e){case en:i===vs?(n+=i,e=gs):i==="{"?(c(),e=Oo):(n+=i,e=en);break;case gs:Zv.has(i)?(n=n.slice(0,-1)+i,e=Oi):(n+=i,e=en);break;case Oi:i===vs?e=en:(n+=i,e=Oi);break;case Oo:i==="}"?(d(),e=en):Ml(i)?r!==""&&(d(),e=ko):(f(),e=Oo);break;case ko:i=="}"?e=en:Ml(i)?e=ko:l(ps)}return Gv.has(e)||l(Hv),c(),[o,s]}function Jv(t,e){const[n,r]=Kv(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 Xv(){return{format:({translation:t,params:e})=>Jv(t,e)}}const Yv=()=>(t,e)=>(e.setFinalFormatter(Xv()),t);var Po=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ol={};(function(t){function e(w,L){var m;return w instanceof Buffer?m=w:m=Buffer.from(w.buffer,w.byteOffset,w.byteLength),m.toString(L)}var n=function(w){return Buffer.from(w)};function r(w){for(var L=0,m=Math.min(256*256,w.length+1),_=new Uint16Array(m),E=[],h=0;;){var b=L<w.length;if(!b||h>=m-1){var x=_.subarray(0,h),k=x;if(E.push(String.fromCharCode.apply(null,k)),!b)return E.join("");w=w.subarray(L),L=0,h=0}var M=w[L++];if(!(M&128))_[h++]=M;else if((M&224)===192){var P=w[L++]&63;_[h++]=(M&31)<<6|P}else if((M&240)===224){var P=w[L++]&63,O=w[L++]&63;_[h++]=(M&31)<<12|P<<6|O}else if((M&248)===240){var P=w[L++]&63,O=w[L++]&63,R=w[L++]&63,D=(M&7)<<18|P<<12|O<<6|R;D>65535&&(D-=65536,_[h++]=D>>>10&1023|55296,D=56320|D&1023),_[h++]=D}}}function i(w){for(var L=0,m=w.length,_=0,E=Math.max(32,m+(m>>>1)+7),h=new Uint8Array(E>>>3<<3);L<m;){var b=w.charCodeAt(L++);if(b>=55296&&b<=56319){if(L<m){var x=w.charCodeAt(L);(x&64512)===56320&&(++L,b=((b&1023)<<10)+(x&1023)+65536)}if(b>=55296&&b<=56319)continue}if(_+4>h.length){E+=8,E*=1+L/w.length*2,E=E>>>3<<3;var k=new Uint8Array(E);k.set(h),h=k}if(b&4294967168)if(!(b&4294965248))h[_++]=b>>>6&31|192;else if(!(b&4294901760))h[_++]=b>>>12&15|224,h[_++]=b>>>6&63|128;else if(!(b&4292870144))h[_++]=b>>>18&7|240,h[_++]=b>>>12&63|128,h[_++]=b>>>6&63|128;else continue;else{h[_++]=b;continue}h[_++]=b&63|128}return h.slice?h.slice(0,_):h.subarray(0,_)}var o="Failed to ",s=function(w,L,m){if(w)throw new Error("".concat(o).concat(L,": the '").concat(m,"' option is unsupported."))},a=typeof Buffer=="function"&&Buffer.from,l=a?n:i;function c(){this.encoding="utf-8"}c.prototype.encode=function(w,L){return s(L&&L.stream,"encode","stream"),l(w)};function f(w){var L;try{var m=new Blob([w],{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",p=["utf-8","utf8","unicode-1-1-utf-8"],v=r;a?v=e:d&&(v=function(w){try{return f(w)}catch{return r(w)}});var y="construct 'TextDecoder'",g="".concat(o," ").concat(y,": the ");function S(w,L){s(L&&L.fatal,y,"fatal"),w=w||"utf-8";var m;if(a?m=Buffer.isEncoding(w):m=p.indexOf(w.toLowerCase())!==-1,!m)throw new RangeError("".concat(g," encoding label provided ('").concat(w,"') is invalid."));this.encoding=w,this.fatal=!1,this.ignoreBOM=!1}S.prototype.decode=function(w,L){s(L&&L.stream,"decode","stream");var m;return w instanceof Uint8Array?m=w:w.buffer instanceof ArrayBuffer?m=new Uint8Array(w.buffer):m=new Uint8Array(w),v(m,this.encoding)},t.TextEncoder=t.TextEncoder||c,t.TextDecoder=t.TextDecoder||S})(typeof window<"u"?window:Po);var Qv=Cv({__proto__:null,default:Ol},[Ol]),Ro;(Ro=console.assert)===null||Ro===void 0||Ro.call(console,Qv);const em="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";function tm(t){const e=em.indexOf(t);if(e===-1)throw new Error("Invalid character found: "+t);return e}function nm(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 rm(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|tm(t[s]),n+=5,n>=8&&(o[i++]=r>>>n-8&255,n-=8);return nm(o.buffer)}function im(t){if(t)try{const[e,n]=t.split("_");if(e==="tgpak"){const[r]=rm(n).split("_");return Number(r)}}catch{console.warn("Tolgee: Api key can't be parsed")}}function om(t){if(!t)return;const[e]=t.split("_");return e==="tgpak"?"tgpak":e==="tgpat"?"tgpat":"legacy"}function sm(){return{getRecord({apiUrl:t,apiKey:e,language:n,namespace:r,projectId:i,fetch:o}){var s;const a=(s=im(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}`),om(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(c=>{if(c.ok)return c.json().then(f=>f[n]);throw new Error(c.statusText)})}}}const am=()=>(t,e)=>(e.setDevBackend(sm()),t);function lm(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 um({message:t,recievingMessage:e,data:n,attempts:r=1,timeout:i=300}){let o=!1;const s=()=>new Promise((l,c)=>{const f=lm(e,p);window.postMessage({type:t,data:n},window.origin);const d=setTimeout(y,i);function p(g){clearTimeout(d),v(),l(g)}function v(){f.unsubscribe()}function y(){v(),c()}});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 cm(){let t;async function e(n){t==null||t();const{cancel:r,promise:i}=um({message:"TOLGEE_READY",recievingMessage:["TOLGEE_PLUGIN_READY","TOLGEE_PLUGIN_UPDATED"],data:n,attempts:4});return t=r,i}return{update:e}}const fm="tolgee-in-context-tools.umd.min.js",dm="@tolgee/in-context-tools",hm="InContextTools",pm="https://cdn.jsdelivr.net/npm";function gm(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 To=null;function vm(t){return To||(To=gm(`${pm}/@tolgee/web@${t}/dist/${fm}`).then(()=>window[dm][hm])),To}const $c="__tolgee_apiKey",Hc="__tolgee_apiUrl";function kl(){const t=sessionStorage.getItem($c)||void 0,e=sessionStorage.getItem(Hc)||void 0;if(!(!t||!e))return{apiKey:t,apiUrl:e}}function mm(){sessionStorage.removeItem($c),sessionStorage.removeItem(Hc)}function ym(t){document.readyState!=="loading"?Promise.resolve().then(()=>{t()}):document.addEventListener&&document.addEventListener("DOMContentLoaded",t)}let Wc=()=>t=>t;const bm=()=>{if(typeof window>"u")return!1;try{return typeof sessionStorage<"u"&&sessionStorage}catch(t){return console.error("sessionStorage not available",t),!1}};bm()&&(Wc=()=>t=>{const e=cm(),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 vm("5.22.0");return s=>{const a=kl();return s.addPlugin(o({credentials:a})),s}};return t.on("running",({value:o})=>{o&&ym(()=>{e.update(n()).catch(mm)})}),kl()&&r().then(o=>{t.addPlugin(o)}).catch(o=>{console.error("Tolgee: Failed to load in-context tools"),console.error(o)}),t});function wm(){return $v().use(Wc())}const Sm={useSuspense:!0};let Ao;const Gc=()=>(Ao||(Ao=u.createContext(void 0)),Ao),Lm=({tolgee:t,options:e,children:n,fallback:r})=>{const[i,o]=u.useState(!t.isLoaded());u.useEffect(()=>{t.run().catch(l=>{console.error(l)}).finally(()=>{o(!1)})},[t]);const s=Object.assign(Object.assign({},Sm),e),a=Gc();return s.useSuspense?u.createElement(a.Provider,{value:{tolgee:t,options:s}},i?r:u.createElement(u.Suspense,{fallback:r||null},n)):u.createElement(a.Provider,{value:{tolgee:t,options:s}},i?r:n)};let Em;function xm(){return Em}const Cm=()=>{const t=Gc(),e=u.useContext(t)||xm();if(!e)throw new Error("Couldn't find tolgee instance, did you forgot to use `TolgeeProvider`?");return e},_m=()=>{const[t,e]=u.useState(0),n=u.useCallback(()=>{e(r=>r+1)},[e]);return{instance:t,rerender:n}},Zc=(t,e)=>{const{tolgee:n,options:r}=Cm(),i=Nc(t),o=wt(i).join(":"),s=Object.assign(Object.assign({},r),e),{rerender:a,instance:l}=_m(),c=u.useRef(),f=u.useRef([]);f.current=[];const d=y=>{var g;f.current.push(y),(g=c.current)===null||g===void 0||g.subscribeNs(y)},p=n.isLoaded(i);u.useEffect(()=>{const y=n.onNsUpdate(a);return c.current=y,y.subscribeNs(i),f.current.forEach(g=>{y.subscribeNs(g)}),()=>{y.unsubscribe()}},[o,n]),u.useEffect(()=>(n.addActiveNs(i),()=>n.removeActiveNs(i)),[o,n]);const v=u.useCallback(y=>{var g;const S=(g=y.ns)!==null&&g!==void 0?g:i==null?void 0:i[0];return d(S),n.t(Object.assign(Object.assign({},y),{ns:S}))},[n,l]);if(s.useSuspense&&!p)throw n.addActiveNs(i,!0);return{t:v,isLoading:!p}},Nt=(t,e)=>{const{t:n,isLoading:r}=Zc(t,e);return{t:u.useCallback((...o)=>{const s=Fc(...o);return n(s)},[n]),isLoading:r}},Mm=t=>{if(!t)return;const e={};return Object.entries(t||{}).forEach(([n,r])=>{if(typeof r=="function")e[n]=i=>r(ms(i));else if(u.isValidElement(r)){const i=r;e[n]=o=>i.props.children===void 0&&(o!=null&&o.length)?u.cloneElement(i,{},ms(o)):u.cloneElement(i)}else e[n]=r}),e},ms=t=>Array.isArray(t)?u.Children.toArray(t):t,Om=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=ms(t.t({key:e,params:Mm(t.params),defaultValue:n,noWrap:t.noWrap,ns:t.ns,language:t.language}));return u.createElement(u.Fragment,null,r)},xn=t=>{const{t:e}=Zc();return u.createElement(Om,Object.assign({t:e},t))},km="Button-module__root__8RX49h",Pm="Button-module__primary__st6yY9",Rm="Button-module__secondary__j-3rjz",Tm="Button-module__loading__QfItr2",Am="Button-module__spinner__kVZYqS",dr={root:km,primary:Pm,secondary:Rm,loading:Tm,spinner:Am},Lt=({children:t,className:e,loading:n,variant:r="primary",...i})=>{const o=[dr.root,e,dr[r],{[dr.loading]:n}];if(i.as==="link"){const{as:s,...a}=i;return C.jsxs("a",{className:ve(o),...a,children:[!n&&t,n&&C.jsx(Fi,{className:dr.spinner})]})}if(i.as==="button"){const{as:s,...a}=i;return C.jsxs("button",{type:"button",className:ve(o),...a,children:[!n&&t,n&&C.jsx(Fi,{className:dr.spinner})]})}Wt(!1,"Invalid button type")};Lt.defaultProps={as:"button"};const Dm="LocationBalloon-module__root__GtUl6q",Im="LocationBalloon-module__submit__lNcF4k",Nm="LocationBalloon-module__details__--VOKk",jm="LocationBalloon-module__icon__X7DOVA",Bm="LocationBalloon-module__header__5VQJDW",Um="LocationBalloon-module__title__bX9pf8",Vm="LocationBalloon-module__description__htav7b",Fm="LocationBalloon-module__actions__c8dlOR",Xt={root:Dm,submit:Im,details:Nm,icon:jm,header:Bm,title:Um,description:Vm,actions:Fm},zm={default:Ic,llama:Dc},$m=({SSR:t,className:e,hideDetails:n,location:r,location_name:i,name:o,onDetails:s,onSubmit:a})=>{const{logo:l="default"}=tt(),c=zm[l];return C.jsxs("div",{className:ve(Xt.root,e),children:[C.jsxs("div",{className:Xt.header,children:[C.jsx("div",{className:Xt.icon,children:C.jsx(c,{})}),C.jsx("span",{className:Xt.title,children:o||"{{ properties.point.name }}"})]}),C.jsxs("div",{className:Xt.description,children:[(r==null?void 0:r.full_address)||"{{ properties.point.location.full_address }}",","," ",i||"{{ properties.point.location_name }}"]}),C.jsxs("div",{className:Xt.actions,children:[C.jsx(Lt,{id:Ld,variant:"primary",className:Xt.submit,onClick:a,children:t?"{ choose }":C.jsx(xn,{keyName:"choose",ns:"common"})}),!n&&C.jsxs(Lt,{id:Mu,as:"link",variant:"primary",className:Xt.details,onClick:s,children:[t?"{ details }":C.jsx(xn,{keyName:"details",ns:"common"}),C.jsx(xv,{})]})]})]})},Hm=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},oe.createElement("g",{clipPath:"url(#a)"},oe.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"})),oe.createElement("defs",null,oe.createElement("clipPath",{id:"a"},oe.createElement("path",{fill:"#fff",d:"M0 0h20v20H0z"})))),Wm="CloseButton-module__root__2m1asd",Gm="CloseButton-module__absolutePositionVariant__lGX4cQ",Zm="CloseButton-module__relativePositionVariant__LqTTWf",Pl={root:Wm,absolutePositionVariant:Gm,relativePositionVariant:Zm},Hr=({className:t,position:e="absolute",...n})=>C.jsx("div",{...n,className:ve(Pl.root,t,Pl[`${e}PositionVariant`]),children:C.jsx(Hm,{})}),qm="LocationView-module__title__-wT0bl",Km="LocationView-module__logo__jDjNMt",Jm="LocationView-module__header__K0gBYX",Xm="LocationView-module__content__wtOPjm",Ym="LocationView-module__section__2J1zAJ",Qm="LocationView-module__chips__ALwJDx",ey="LocationView-module__services__IgJ4ba",ty="LocationView-module__images__-wKmRM",ny="LocationView-module__image__T1E-gt",ry="LocationView-module__actions__NuafMj",iy="LocationView-module__actionsHidden__-vX5kK",oy="LocationView-module__submit__c-Hc8u",sy="LocationView-module__scheduleItem__RhAgat",Ye={title:qm,logo:Km,header:Jm,content:Xm,section:Ym,chips:Qm,services:ey,images:ty,image:ny,actions:ry,actionsHidden:iy,submit:oy,scheduleItem:sy},ay={default:Ic,llama:Dc},ly=({classes:t,hideActions:e,location:n,onClose:r,onSubmit:i})=>{const{t:o}=Nt(["details_modal","common"]),{logo:s="default"}=tt(),a=ay[s];return C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:ve(Ye.header,t==null?void 0:t.header),children:[C.jsx(Hr,{onClick:r}),C.jsxs("div",{className:Ye.title,children:[C.jsx("div",{className:Ye.logo,children:C.jsx(a,{})}),C.jsx("span",{children:n.name})]})]}),C.jsxs("div",{className:ve(Ye.content,t==null?void 0:t.content),children:[C.jsxs("section",{className:Ye.section,children:[C.jsxs("span",{children:[o("address"),":"]}),C.jsx("p",{children:n.location.full_address})]}),n.schedule.length>0&&C.jsxs("section",{className:Ye.section,children:[C.jsxs("span",{children:[o("schedule"),":"]}),n.schedule.map((l,c)=>C.jsx("p",{className:Ye.scheduleItem,children:l},c))]}),(n.pay_by_card||n.pay_by_card)&&C.jsxs("section",{className:Ye.section,children:[C.jsxs("span",{children:[o("payment_method"),":"]}),C.jsxs("div",{className:Ye.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")]})]}),C.jsxs("section",{className:Ye.section,children:[C.jsxs("span",{children:[o("services"),":"]}),C.jsxs("div",{className:Ye.services,children:[n.is_pickup&&C.jsx("span",{children:o("is_pickup")}),n.is_delivery&&C.jsx("span",{children:o("is_delivery")}),n.is_dressing_room&&C.jsx("span",{children:o("is_dressing_room")}),n.is_check_order&&C.jsx("span",{children:o("is_check_order")})]})]}),C.jsxs("section",{className:Ye.section,children:[C.jsxs("span",{children:[o("location"),":"]}),C.jsx("p",{children:n.location_name})]}),n.images.length>0&&C.jsx("section",{className:Ye.images,children:n.images.map(l=>C.jsx("img",{src:l,alt:n.name,className:Ye.image},l))})]}),C.jsx("div",{className:ve(Ye.actions,{[Ye.actionsHidden]:e}),children:C.jsx(Lt,{variant:"primary",className:Ye.submit,onClick:i,children:o("choose",{ns:"common"})})})]})},qc=u.memo(ly),uy={clickableIcons:!1,disableDefaultUI:!0,minZoom:4,maxZoom:20,restriction:{strictBounds:!0,latLngBounds:{north:85,south:-85,west:-179,east:179}}},Kc={optimized:!0},Jc=({isSelectedPoint:t})=>{const e=Le(Bs),[n,r]=u.useState(!0);return u.useEffect(()=>{r(t?!e:!0)},[e,t]),n};var cy=fy()?u.useLayoutEffect:u.useEffect;function fy(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function dy(){var t=u.useState(Object.create(null)),e=t[1];return u.useCallback(function(){e(Object.create(null))},[])}var hy=function(e){var n=e.children,r=e.type,i=r===void 0?"reach-portal":r,o=u.useRef(null),s=u.useRef(null),a=dy();return cy(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?Qn.createPortal(n,s.current):u.createElement("span",{ref:o})};/*! *****************************************************************************
|
|
67
67
|
Copyright (c) Microsoft Corporation.
|
|
68
68
|
|
|
69
69
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -76,14 +76,14 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
76
76
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
77
77
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
78
78
|
PERFORMANCE OF THIS SOFTWARE.
|
|
79
|
-
***************************************************************************** */var B=function(){return B=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},B.apply(this,arguments)};function Ys(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 pe(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 we(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 Ue(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 De;(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"})(De||(De={}));var qn;(function(t){t.Parent="#_parent",t.Internal="#_internal"})(qn||(qn={}));var vs=De.Start,Xs=De.Stop,Hr=De.Raise,uo=De.Send,Jc=De.Cancel,gy=De.NullEvent,Qs=De.Assign;De.After;De.DoneState;var Yc=De.Log,vy=De.Init,ms=De.Invoke;De.ErrorExecution;var kl=De.ErrorPlatform,my=De.ErrorCustom,Xc=De.Update,yy=De.Choose,by=De.Pure,Qc=".",Pl={},ys="xstate.guard",wy="",ni;function ea(t,e,n){n===void 0&&(n=Qc);var r=_r(t,n),i=_r(e,n);return Oe(i)?Oe(r)?i===r:!1:Oe(r)?r in i:Object.keys(r).every(function(o){return o in i?ea(r[o],i[o]):!1})}function ef(t){try{return Oe(t)||typeof t=="number"?"".concat(t):t.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function bs(t,e){try{return tr(t)?t:t.toString().split(e)}catch{throw new Error("'".concat(t,"' is not a valid state path."))}}function Sy(t){return typeof t=="object"&&"value"in t&&"context"in t&&"event"in t&&"_event"in t}function _r(t,e){if(Sy(t))return t.value;if(tr(t))return zi(t);if(typeof t!="string")return t;var n=bs(t,e);return zi(n)}function zi(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 wr(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 Rl(t,e,n){var r,i,o={};try{for(var s=pe(Object.keys(t)),a=s.next();!a.done;a=s.next()){var l=a.value,c=t[l];n(c)&&(o[l]=e(c,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 Ly=function(t){return function(e){var n,r,i=e;try{for(var o=pe(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 Ey(t,e){return function(n){var r,i,o=n;try{for(var s=pe(t),a=s.next();!a.done;a=s.next()){var l=a.value;o=o[e][l]}}catch(c){r={error:c}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o}}function Oi(t){if(!t)return[[]];if(Oe(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]]:Oi(t[n]).map(function(i){return[n].concat(i)})}));return e}function ze(t){var e;return(e=[]).concat.apply(e,Ue([],we(t),!1))}function tf(t){return tr(t)?t:[t]}function Ct(t){return t===void 0?[]:tf(t)}function $i(t,e,n){var r,i;if(Ce(t))return t(e,n.data);var o={};try{for(var s=pe(Object.keys(t)),a=s.next();!a.done;a=s.next()){var l=a.value,c=t[l];Ce(c)?o[l]=c(e,n.data):o[l]=c}}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 xy(t){return/^(done|error)\./.test(t)}function Tl(t){return!!(t instanceof Promise||t!==null&&(Ce(t)||typeof t=="object")&&Ce(t.then))}function Cy(t){return t!==null&&typeof t=="object"&&"transition"in t&&typeof t.transition=="function"}function _y(t,e){var n,r,i=we([[],[]],2),o=i[0],s=i[1];try{for(var a=pe(t),l=a.next();!l.done;l=a.next()){var c=l.value;e(c)?o.push(c):s.push(c)}}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 nf(t,e){return wr(t.states,function(n,r){if(n){var i=(Oe(e)?void 0:e[r])||(n?n.current:void 0);if(i)return{current:i,states:nf(n,i)}}})}function My(t,e){return{current:e,states:nf(t,e)}}function Al(t,e,n,r){var i=t&&n.reduce(function(o,s){var a,l,c=s.assignment,f={state:r,action:s,_event:e},d={};if(Ce(c))d=c(o,e.data,f);else try{for(var h=pe(Object.keys(c)),v=h.next();!v.done;v=h.next()){var b=v.value,g=c[b];d[b]=Ce(g)?g(o,e.data,f):g}}catch(S){a={error:S}}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 Oy=function(){};function tr(t){return Array.isArray(t)}function Ce(t){return typeof t=="function"}function Oe(t){return typeof t=="string"}function rf(t,e){if(t)return Oe(t)?{type:ys,name:t,predicate:e?e[t]:void 0}:Ce(t)?{type:ys,name:t.name,predicate:t}:t}function ky(t){try{return"subscribe"in t&&Ce(t.subscribe)}catch{return!1}}var rn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();ni={},ni[rn]=function(){return this},ni[Symbol.observable]=function(){return this};function Kn(t){return!!t&&"__xstatenode"in t}function Py(t){return!!t&&typeof t.send=="function"}function co(t,e){return Oe(t)||typeof t=="number"?B({type:t},e):t}function et(t,e){if(!Oe(t)&&"$$type"in t&&t.$$type==="scxml")return t;var n=co(t);return B({name:n.type,data:n,$$type:"scxml",type:"external"},e)}function An(t,e){var n=tf(e).map(function(r){return typeof r>"u"||typeof r=="string"||Kn(r)?{target:r,event:t}:B(B({},r),{event:t})});return n}function Ry(t){if(!(t===void 0||t===wy))return Ct(t)}function of(t,e,n,r,i){var o=t.options.guards,s={state:i,cond:e,_event:r};if(e.type===ys)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 sf(t){return typeof t=="string"?{type:t}:t}function ki(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 ri(t,e){return"".concat(t,":invocation[").concat(e,"]")}function ws(t){return(t.type===Hr||t.type===uo&&t.to===qn.Internal)&&typeof t.delay!="number"}var zn=et({type:vy});function Ss(t,e){return e&&e[t]||void 0}function Br(t,e){var n;if(Oe(t)||typeof t=="number"){var r=Ss(t,e);Ce(r)?n={type:t,exec:r}:r?n=r:n={type:t,exec:void 0}}else if(Ce(t))n={type:t.name||t.toString(),exec:t};else{var r=Ss(t.type,e);if(Ce(r))n=B(B({},t),{exec:r});else if(r){var i=r.type||t.type;n=B(B(B({},r),t),{type:i})}else n=t}return n}var on=function(t,e){if(!t)return[];var n=tr(t)?t:[t];return n.map(function(r){return Br(r,e)})};function ta(t){var e=Br(t);return B(B({id:Oe(t)?t:e.id},e),{type:e.type})}function Ty(t,e){return{type:Hr,event:typeof t=="function"?t:co(t),delay:e?e.delay:void 0,id:e==null?void 0:e.id}}function Ay(t,e,n,r){var i={_event:n},o=et(Ce(t.event)?t.event(e,n.data,i):t.event),s;if(Oe(t.delay)){var a=r&&r[t.delay];s=Ce(a)?a(e,n.data,i):a}else s=Ce(t.delay)?t.delay(e,n.data,i):t.delay;return B(B({},t),{type:Hr,_event:o,delay:s})}function Dy(t,e){return{to:e?e.to:void 0,type:uo,event:Ce(t)?t:co(t),delay:e?e.delay:void 0,id:e&&e.id!==void 0?e.id:Ce(t)?t.name:ef(t)}}function Iy(t,e,n,r){var i={_event:n},o=et(Ce(t.event)?t.event(e,n.data,i):t.event),s;if(Oe(t.delay)){var a=r&&r[t.delay];s=Ce(a)?a(e,n.data,i):a}else s=Ce(t.delay)?t.delay(e,n.data,i):t.delay;var l=Ce(t.to)?t.to(e,n.data,i):t.to;return B(B({},t),{to:l,_event:o,event:o.data,delay:s})}var Ny=function(t,e,n){return B(B({},t),{value:Oe(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})},jy=function(t){return{type:Jc,sendId:t}};function By(t){var e=ta(t);return{type:De.Start,activity:e,exec:void 0}}function Uy(t){var e=Ce(t)?t:ta(t);return{type:De.Stop,activity:e,exec:void 0}}function Vy(t,e,n){var r=Ce(t.activity)?t.activity(e,n.data):t.activity,i=typeof r=="string"?{id:r}:r,o={type:De.Stop,activity:i};return o}var Fy=function(t){return{type:Qs,assignment:t}};function zy(t,e){var n=e?"#".concat(e):"";return"".concat(De.After,"(").concat(t,")").concat(n)}function ii(t,e){var n="".concat(De.DoneState,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function Pi(t,e){var n="".concat(De.DoneInvoke,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function Sr(t,e){var n="".concat(De.ErrorPlatform,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}var $y=function(t){var e,n,r=[];try{for(var i=pe(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===Qs){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 Hi(t,e,n,r,i,o,s){s===void 0&&(s=!1);var a=s?[]:$y(i),l=a.length?Al(n,r,a,e):n,c=s?[n]:void 0,f=[];function d(b,g){var S;switch(g.type){case Hr:{var w=Ay(g,l,r,t.options.delays);return o&&typeof w.delay=="number"&&o(w,l,r),w}case uo:var L=Iy(g,l,r,t.options.delays);return o&&L.to!==qn.Internal&&(b==="entry"?f.push(L):o(L,l,r)),L;case Yc:{var y=Ny(g,l,r);return o==null||o(y,l,r),y}case yy:{var _=g,x=(S=_.conds.find(function(U){var N=rf(U.cond,t.options.guards);return!N||of(t,N,l,r,o?void 0:e)}))===null||S===void 0?void 0:S.actions;if(!x)return[];var p=we(Hi(t,e,l,r,[{type:b,actions:on(Ct(x),t.options.actions)}],o,s),2),m=p[0],E=p[1];return l=E,c==null||c.push(l),m}case by:{var x=g.get(l,r.data);if(!x)return[];var k=we(Hi(t,e,l,r,[{type:b,actions:on(Ct(x),t.options.actions)}],o,s),2),M=k[0],O=k[1];return l=O,c==null||c.push(l),M}case Xs:{var y=Vy(g,l,r);return o==null||o(y,n,r),y}case Qs:{l=Al(l,r,[g],o?void 0:e),c==null||c.push(l);break}default:var P=Br(g,t.options.actions),A=P.exec;if(o)o(P,l,r);else if(A&&c){var D=c.length-1,j=B(B({},P),{exec:function(U){for(var N=[],F=1;F<arguments.length;F++)N[F-1]=arguments[F];A.apply(void 0,Ue([c[D]],we(N),!1))}});P=j}return P}}function h(b){var g,S,w=[];try{for(var L=pe(b.actions),y=L.next();!y.done;y=L.next()){var _=y.value,x=d(b.type,_);x&&(w=w.concat(x))}}catch(p){g={error:p}}finally{try{y&&!y.done&&(S=L.return)&&S.call(L)}finally{if(g)throw g.error}}return f.forEach(function(p){o(p,l,r)}),f.length=0,w}var v=ze(i.map(h));return[v,l]}var Dl=[],Un=function(t,e){Dl.push(t);var n=e(t);return Dl.pop(),n};function af(t){var e;return e={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:t}}},e[rn]=function(){return this},e}function Hy(t,e,n,r){var i,o=sf(t.src),s=(i=e==null?void 0:e.options.services)===null||i===void 0?void 0:i[o.type],a=t.data?$i(t.data,n,r):void 0,l=s?lf(s,t.id,a):af(t.id);return l.meta=t,l}function lf(t,e,n){var r=af(e);if(r.deferred=!0,Kn(t)){var i=r.state=Un(void 0,function(){return(n?t.withContext(n):t).initialState});r.getSnapshot=function(){return i}}return r}function Wy(t){try{return typeof t.send=="function"}catch{return!1}}function Gy(t){return Wy(t)&&"id"in t}function Zy(t){var e;return B((e={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},e[rn]=function(){return this},e),t)}var Wi=function(t){return t.type==="atomic"||t.type==="final"};function uf(t){return Object.keys(t.states).map(function(e){return t.states[e]})}function Ur(t){return uf(t).filter(function(e){return e.type!=="history"})}function cf(t){var e=[t];return Wi(t)?e:e.concat(ze(Ur(t).map(cf)))}function Lr(t,e){var n,r,i,o,s,a,l,c,f=new Set(t),d=Ls(f),h=new Set(e);try{for(var v=pe(h),b=v.next();!b.done;b=v.next())for(var g=b.value,S=g.parent;S&&!h.has(S);)h.add(S),S=S.parent}catch(k){n={error:k}}finally{try{b&&!b.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}var w=Ls(h);try{for(var L=pe(h),y=L.next();!y.done;y=L.next()){var g=y.value;if(g.type==="compound"&&(!w.get(g)||!w.get(g).length))d.get(g)?d.get(g).forEach(function(M){return h.add(M)}):g.initialStateNodes.forEach(function(M){return h.add(M)});else if(g.type==="parallel")try{for(var _=(s=void 0,pe(Ur(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(M){return h.add(M)}):p.initialStateNodes.forEach(function(M){return h.add(M)}))}}catch(M){s={error:M}}finally{try{x&&!x.done&&(a=_.return)&&a.call(_)}finally{if(s)throw s.error}}}}catch(k){i={error:k}}finally{try{y&&!y.done&&(o=L.return)&&o.call(L)}finally{if(i)throw i.error}}try{for(var m=pe(h),E=m.next();!E.done;E=m.next())for(var g=E.value,S=g.parent;S&&!h.has(S);)h.add(S),S=S.parent}catch(k){l={error:k}}finally{try{E&&!E.done&&(c=m.return)&&c.call(m)}finally{if(l)throw l.error}}return h}function ff(t,e){var n=e.get(t);if(!n)return{};if(t.type==="compound"){var r=n[0];if(r){if(Wi(r))return r.key}else return{}}var i={};return n.forEach(function(o){i[o.key]=ff(o,e)}),i}function Ls(t){var e,n,r=new Map;try{for(var i=pe(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 qy(t,e){var n=Lr([t],e);return ff(t,Ls(n))}function Er(t,e){return Array.isArray(t)?t.some(function(n){return n===e}):t instanceof Set?t.has(e):!1}function Ky(t){return Ue([],we(new Set(ze(Ue([],we(t.map(function(e){return e.ownEvents})),!1)))),!1)}function Ri(t,e){return e.type==="compound"?Ur(e).some(function(n){return n.type==="final"&&Er(t,n)}):e.type==="parallel"?Ur(e).every(function(n){return Ri(t,n)}):!1}function Jy(t){return t===void 0&&(t=[]),t.reduce(function(e,n){return n.meta!==void 0&&(e[n.id]=n.meta),e},{})}function Il(t){return new Set(ze(t.map(function(e){return e.tags})))}function df(t,e){if(t===e)return!0;if(t===void 0||e===void 0)return!1;if(Oe(t)||Oe(e))return t===e;var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(i){return df(t[i],e[i])})}function Yy(t){return typeof t!="object"||t===null?!1:"value"in t&&"_event"in t}function Xy(t,e){var n=t.exec,r=B(B({},t),{exec:n!==void 0?function(){return n(e.context,e.event,{action:t,state:e,_event:e._event})}:void 0});return r}var bt=function(){function t(e){var n=this,r;this.actions=[],this.activities=Pl,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||Pl,this.meta=Jy(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 Ky(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=zn;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=zn;return new t({value:e.value,context:n,_event:r,_sessionid:null,historyValue:e.historyValue,history:e.history,activities:e.activities,configuration:e.configuration,transitions:[],children:{}})}return t.from(e,n)},t.prototype.toStrings=function(e,n){var r=this;if(e===void 0&&(e=this.value),n===void 0&&(n="."),Oe(e))return[e];var i=Object.keys(e);return i.concat.apply(i,Ue([],we(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=Ys(e,["configuration","transitions","tags","machine"]);return B(B({},r),{tags:Array.from(n)})},t.prototype.matches=function(e){return ea(e,this.value)},t.prototype.hasTag=function(e){return this.tags.has(e)},t.prototype.can=function(e){var n;Oy(!!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}(),Qy={deferEvents:!1},Nl=function(){function t(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=B(B({},Qy),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}(),To=new Map,e0=0,hr={bookId:function(){return"x:".concat(e0++)},register:function(t,e){return To.set(t,e),t},get:function(t){return To.get(t)},free:function(t){To.delete(t)}};function na(){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 t0(){var t=na();if(t&&"__xstate__"in t)return t.__xstate__}function n0(t){if(na()){var e=t0();e&&e.register(t)}}function r0(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 c=i.shift();n=t.transition(n,c,l),r.forEach(function(f){return f.next(n)})}o=!1}},a=Zy({id:e.id,send:function(c){i.push(c),s()},getSnapshot:function(){return n},subscribe:function(c,f,d){var h=ki(c,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 i0={sync:!1,autoForward:!1},Je;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(Je||(Je={}));var o0=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=Je.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(f,d){if(tr(f))return r.batch(f),r.state;var h=et(co(f,d));if(r.status===Je.Stopped)return r.state;if(r.status!==Je.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.
|
|
80
|
-
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===qn.Parent||r.parent.id===d),b=v?r.parent:Oe(d)?d===qn.Internal?r:r.children.get(d)||hr.get(d):Py(d)?d:void 0;if(!b){if(!v)throw new Error("Unable to send event to child '".concat(d,"' from service '").concat(r.id,"'."));return}if("machine"in b){if(r.status!==Je.Stopped||r.parent!==b||r.state.done){var g=B(B({},f),{name:f.name===my?"".concat(Sr(r.id)):f.name,origin:r.sessionId});!h&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([b,g]):b.send(g)}}else!h&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([b,f.data]):b.send(f.data)},this._exec=function(f,d,h,v){v===void 0&&(v=r.machine.options.actions);var b=f.exec||Ss(f.type,v),g=Ce(b)?b:b?b.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(D){throw r.parent&&r.parent.send({type:"xstate.error",data:D}),D}switch(f.type){case Hr:{var S=f;r.defer(S);break}case uo:var w=f;if(typeof w.delay=="number"){r.defer(w);return}else w.to?r.sendTo(w._event,w.to,h===zn):r.send(w._event);break;case Jc:r.cancel(f.sendId);break;case vs:{if(r.status!==Je.Running)return;var L=f.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[L.id||L.type])break;if(L.type===De.Invoke){var y=sf(L.src),_=r.machine.options.services?r.machine.options.services[y.type]:void 0,x=L.id,p=L.data,m="autoForward"in L?L.autoForward:!!L.forward;if(!_)return;var E=p?$i(p,d,h):void 0;if(typeof _=="string")return;var k=Ce(_)?_(d,h.data,{data:E,src:y,meta:L.meta}):_;if(!k)return;var M=void 0;Kn(k)&&(k=E?k.withContext(E):k,M={autoForward:m}),r.spawn(k,x,M)}else r.spawnActivity(L);break}case Xs:{r.stopChild(f.activity.id);break}case Yc:var O=f,P=O.label,A=O.value;P?r.logger(P,A):r.logger(A);break}};var i=B(B({},t.defaultOptions),n),o=i.clock,s=i.logger,a=i.parent,l=i.id,c=l!==void 0?l:e.id;this.id=c,this.logger=s,this.clock=o,this.parent=a,this.options=i,this.scheduler=new Nl({deferEvents:this.options.deferEvents}),this.sessionId=hr.bookId()}return Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:Un(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=pe(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,c,f,d=this;if(e._sessionid=this.sessionId,this._state=e,(!this.machine.config.predictableActionArguments||n===zn)&&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(k){d.state.children[k.id]=k}),this.devTools&&this.devTools.send(n.data,e),e.event)try{for(var v=pe(this.eventListeners),b=v.next();!b.done;b=v.next()){var g=b.value;g(e.event)}}catch(k){r={error:k}}finally{try{b&&!b.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}try{for(var S=pe(this.listeners),w=S.next();!w.done;w=S.next()){var g=w.value;g(e,e.event)}}catch(k){o={error:k}}finally{try{w&&!w.done&&(s=S.return)&&s.call(S)}finally{if(o)throw o.error}}try{for(var L=pe(this.contextListeners),y=L.next();!y.done;y=L.next()){var _=y.value;_(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(k){a={error:k}}finally{try{y&&!y.done&&(l=L.return)&&l.call(L)}finally{if(a)throw a.error}}if(this.state.done){var x=e.configuration.find(function(k){return k.type==="final"&&k.parent===d.machine}),p=x&&x.doneData?$i(x.doneData,e.context,n):void 0;this._doneEvent=Pi(this.id,p);try{for(var m=pe(this.doneListeners),E=m.next();!E.done;E=m.next()){var g=E.value;g(this._doneEvent)}}catch(k){c={error:k}}finally{try{E&&!E.done&&(f=m.return)&&f.call(m)}finally{if(c)throw c.error}}this._stop(),this._stopChildren(),hr.free(this.sessionId)}},t.prototype.onTransition=function(e){return this.listeners.add(e),this.status===Je.Running&&e(this.state,this.state.event),this},t.prototype.subscribe=function(e,n,r){var i=this,o=ki(e,n,r);this.listeners.add(o.next),this.status!==Je.NotStarted&&o.next(this.state);var s=function(){i.doneListeners.delete(s),i.stopListeners.delete(s),o.complete()};return this.status===Je.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===Je.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===Je.Running)return this;this.machine._init(),hr.register(this.sessionId,this),this.initialized=!0,this.status=Je.Running;var r=e===void 0?this.initialState:Un(this,function(){return Yy(e)?n.machine.resolveState(e):n.machine.resolveState(bt.from(e,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(r,zn)}),this},t.prototype._stopChildren=function(){this.children.forEach(function(e){Ce(e.stop)&&e.stop()}),this.children.clear()},t.prototype._stop=function(){var e,n,r,i,o,s,a,l,c,f;try{for(var d=pe(this.listeners),h=d.next();!h.done;h=d.next()){var v=h.value;this.listeners.delete(v)}}catch(m){e={error:m}}finally{try{h&&!h.done&&(n=d.return)&&n.call(d)}finally{if(e)throw e.error}}try{for(var b=pe(this.stopListeners),g=b.next();!g.done;g=b.next()){var v=g.value;v(),this.stopListeners.delete(v)}}catch(m){r={error:m}}finally{try{g&&!g.done&&(i=b.return)&&i.call(b)}finally{if(r)throw r.error}}try{for(var S=pe(this.contextListeners),w=S.next();!w.done;w=S.next()){var v=w.value;this.contextListeners.delete(v)}}catch(m){o={error:m}}finally{try{w&&!w.done&&(s=S.return)&&s.call(S)}finally{if(o)throw o.error}}try{for(var L=pe(this.doneListeners),y=L.next();!y.done;y=L.next()){var v=y.value;this.doneListeners.delete(v)}}catch(m){a={error:m}}finally{try{y&&!y.done&&(l=L.return)&&l.call(L)}finally{if(a)throw a.error}}if(!this.initialized)return this;this.initialized=!1,this.status=Je.Stopped,this._initialState=void 0;try{for(var _=pe(Object.keys(this.delayedEventsMap)),x=_.next();!x.done;x=_.next()){var p=x.value;this.clock.clearTimeout(this.delayedEventsMap[p])}}catch(m){c={error:m}}finally{try{x&&!x.done&&(f=_.return)&&f.call(_)}finally{if(c)throw c.error}}this.scheduler.clear(),this.scheduler=new Nl({deferEvents:this.options.deferEvents})},t.prototype.stop=function(){var e=this,n=this.scheduler;return this._stop(),n.schedule(function(){var r=et({type:"xstate.stop"}),i=Un(e,function(){var o=ze(Ue([],we(e.state.configuration),!1).sort(function(f,d){return d.order-f.order}).map(function(f){return on(f.onExit,e.machine.options.actions)})),s=we(Hi(e.machine,e.state,e.state.context,r,[{type:"exit",actions:o}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),a=s[0],l=s[1],c=new bt({value:e.state.value,context:l,_event:r,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:a.filter(function(f){return!ws(f)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return c.changed=!0,c});e.update(i,r),e._stopChildren(),hr.free(e.sessionId)}),this},t.prototype.batch=function(e){var n=this;if(!(this.status===Je.NotStarted&&this.options.deferEvents)){if(this.status!==Je.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=[],c=function(v){var b=et(v);n.forward(b),s=Un(n,function(){return n.machine.transition(s,b,void 0,r||void 0)}),l.push.apply(l,Ue([],we(n.machine.config.predictableActionArguments?s.actions:s.actions.map(function(g){return Xy(g,s)})),!1)),a=a||!!s.changed};try{for(var f=pe(e),d=f.next();!d.done;d=f.next()){var h=d.value;c(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,et(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=et(e);if(i.name.indexOf(kl)===0&&!this.state.nextEvents.some(function(s){return s.indexOf(kl)===0}))throw i.data.data;var o=Un(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=pe(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),Ce(n.stop)&&n.stop())},t.prototype.spawn=function(e,n,r){if(this.status!==Je.Running)return lf(e,n);if(Tl(e))return this.spawnPromise(Promise.resolve(e),n);if(Ce(e))return this.spawnCallback(e,n);if(Gy(e))return this.spawnActor(e,n);if(ky(e))return this.spawnObservable(e,n);if(Kn(e))return this.spawnMachine(e,B(B({},r),{id:n}));if(Cy(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,B(B({},this.options),{parent:this,id:n.id||e.id})),o=B(B({},i0),n);o.sync&&i.onTransition(function(a){r.send(Xc,{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(et(a,{origin:i.id}))}).start(),s},t.prototype.spawnBehavior=function(e,n){var r=r0(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(et(Pi(n,l),{origin:n})))},function(l){if(!o){i.removeChild(n);var c=Sr(n,l);try{i.send(et(c,{origin:n}))}catch{i.devTools&&i.devTools.send(c,i.state),i.machine.strict&&i.stop()}}});var a=(r={id:n,send:function(){},subscribe:function(l,c,f){var d=ki(l,c,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[rn]=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,c=function(h){l=h,a.forEach(function(v){return v(h)}),!o&&i.send(et(h,{origin:n}))},f;try{f=e(c,function(h){s.add(h)})}catch(h){this.send(Sr(n,h))}if(Tl(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=ki(h);return a.add(v.next),{unsubscribe:function(){a.delete(v.next)}}},stop:function(){o=!0,Ce(f)&&f()},toJSON:function(){return{id:n}},getSnapshot:function(){return l}},r[rn]=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(et(l,{origin:n}))},function(l){i.removeChild(n),i.send(et(Sr(n,l),{origin:n}))},function(){i.removeChild(n),i.send(et(Pi(n),{origin:n}))}),a=(r={id:n,send:function(){},subscribe:function(l,c,f){return e.subscribe(l,c,f)},stop:function(){return s.unsubscribe()},getSnapshot:function(){return o},toJSON:function(){return{id:n}}},r[rn]=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[rn]=function(){return this},r))},t.prototype.attachDev=function(){var e=na();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(B(B({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:B({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}n0(this)}},t.prototype.toJSON=function(){return{id:this.id}},t.prototype[rn]=function(){return this},t.prototype.getSnapshot=function(){return this.status===Je.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=hf,t}();function hf(t,e){var n=new o0(t,e);return n}function s0(t){if(typeof t=="string"){var e={type:t};return e.toString=function(){return t},e}return t}function oi(t){return B(B({type:ms},t),{toJSON:function(){t.onDone,t.onError;var e=Ys(t,["onDone","onError"]);return B(B({},e),{type:ms,src:s0(t.src)})}})}var si="",Es="#",Ao="*",Dn={},In=function(t){return t[0]===Es},a0=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},l0=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(a0(),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:Qc),this.id=this.config.id||Ue([this.machine.key],we(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?wr(this.config.states,function(c,f){var d,h=new t(c,{},void 0,{parent:o,key:f});return Object.assign(o.idMap,B((d={},d[h.id]=h,d),h.idMap)),h}):Dn;var a=0;function l(c){var f,d;c.order=a++;try{for(var h=pe(uf(c)),v=h.next();!v.done;v=h.next()){var b=v.value;l(b)}}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(c){var f=c.event;return f===si}):si in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=Ct(this.config.entry||this.config.onEntry).map(function(c){return Br(c)}),this.onExit=Ct(this.config.exit||this.config.onExit).map(function(c){return Br(c)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=Ct(this.config.invoke).map(function(c,f){var d,h;if(Kn(c)){var v=ri(o.id,f);return o.machine.options.services=B((d={},d[v]=c,d),o.machine.options.services),oi({src:v,id:v})}else if(Oe(c.src)){var v=c.id||ri(o.id,f);return oi(B(B({},c),{id:v,src:c.src}))}else if(Kn(c.src)||Ce(c.src)){var v=c.id||ri(o.id,f);return o.machine.options.services=B((h={},h[v]=c.src,h),o.machine.options.services),oi(B(B({id:v},c),{src:v}))}else{var b=c.src;return oi(B(B({id:ri(o.id,f)},c),{src:b}))}}),this.activities=Ct(this.config.activities).concat(this.invoke).map(function(c){return ta(c)}),this.transition=this.transition.bind(this),this.tags=Ct(this.config.tags)}return t.prototype._init=function(){this.__cache.transitions||cf(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:B(B({},i),e.actions),activities:B(B({},o),e.activities),guards:B(B({},s),e.guards),services:B(B({},a),e.services),delays:B(B({},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 Ce(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:wr(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===si,r=this.transitions.filter(function(i){var o=i.eventType===e;return n?o:o||i.eventType===Ao});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=Ce(o)?"".concat(e.id,":delay[").concat(s,"]"):o,l=zy(a,e.id);return e.onEntry.push(Dy(l,{delay:o})),e.onExit.push(jy(l)),l},i=tr(n)?n.map(function(o,s){var a=r(o.delay,s);return B(B({},o),{event:a})}):ze(Object.keys(n).map(function(o,s){var a=n[o],l=Oe(a)?{target:a}:a,c=isNaN(+o)?o:+o,f=r(c,s);return Ct(l).map(function(d){return B(B({},d),{event:f,delay:c})})}));return i.map(function(o){var s=o.delay;return B(B({},e.formatTransition(o)),{delay:s})})},t.prototype.getStateNodes=function(e){var n,r=this;if(!e)return[];var i=e instanceof bt?e.value:_r(e,this.delimiter);if(Oe(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,Ue([],we(ze(s.map(function(l){return r.getStateNode(l).getStateNodes(i[l])}))),!1)),a},t.prototype.handles=function(e){var n=ef(e);return this.events.includes(n)},t.prototype.resolveState=function(e){var n=e instanceof bt?e:bt.create(e),r=Array.from(Lr([],this.getStateNodes(n.value)));return new bt(B(B({},n),{value:this.resolve(n.value),configuration:r,done:Ri(r,this),tags:Il(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=pe(Object.keys(e)),l=a.next();!l.done;l=a.next()){var c=l.value,f=e[c];if(f){var d=this.getStateNode(c),h=d._transition(f,n,r);h&&(s[c]=h)}}}catch(w){i={error:w}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}var v=Object.keys(s).map(function(w){return s[w]}),b=ze(v.map(function(w){return w.transitions})),g=v.some(function(w){return w.transitions.length>0});if(!g)return this.next(n,r);var S=ze(Object.keys(s).map(function(w){return s[w].configuration}));return{transitions:b,exitSet:ze(v.map(function(w){return w.exitSet})),configuration:S,source:n,actions:ze(Object.keys(s).map(function(w){return s[w].actions}))}},t.prototype._transition=function(e,n,r){return Oe(e)?this.transitionLeafNode(e,n,r):Object.keys(e).length===1?this.transitionCompoundNode(e,n,r):this.transitionParallelNode(e,n,r)},t.prototype.getTransitionData=function(e,n){return this._transition(e.value,e,et(n))},t.prototype.next=function(e,n){var r,i,o=this,s=n.name,a=[],l=[],c;try{for(var f=pe(this.getCandidates(s)),d=f.next();!d.done;d=f.next()){var h=d.value,v=h.cond,b=h.in,g=e.context,S=b?Oe(b)&&In(b)?e.matches(_r(this.getStateNodeById(b).path,this.delimiter)):ea(_r(b,this.delimiter),Ly(this.path.slice(0,-2))(e.value)):!0,w=!1;try{w=!v||of(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,`':
|
|
81
|
-
`).concat(_.message))}if(w&&S){h.target!==void 0&&(l=h.target),a.push.apply(a,Ue([],we(h.actions),!1)),c=h;break}}}catch(_){r={error:_}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}if(c){if(!l.length)return{transitions:[c],exitSet:[],configuration:e.value?[this]:[],source:e,actions:a};var L=ze(l.map(function(_){return o.getRelativeStateNodes(_,e.historyValue)})),y=!!c.internal;return{transitions:[c],exitSet:y?[]: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,c,f,d,h=this,v=s?Lr([],this.getStateNodes(s.value)):[],b=new Set;try{for(var g=pe(Array.from(e).sort(function(O,P){return O.order-P.order})),S=g.next();!S.done;S=g.next()){var w=S.value;(!Er(v,w)||Er(r.exitSet,w)||w.parent&&b.has(w.parent))&&b.add(w)}}catch(O){l={error:O}}finally{try{S&&!S.done&&(c=g.return)&&c.call(g)}finally{if(l)throw l.error}}try{for(var L=pe(v),y=L.next();!y.done;y=L.next()){var w=y.value;(!Er(e,w)||Er(r.exitSet,w.parent))&&r.exitSet.push(w)}}catch(O){f={error:O}}finally{try{y&&!y.done&&(d=L.return)&&d.call(L)}finally{if(f)throw f.error}}r.exitSet.sort(function(O,P){return P.order-O.order});var _=Array.from(b).sort(function(O,P){return O.order-P.order}),x=new Set(r.exitSet),p=ze(_.map(function(O){var P=[];if(O.type!=="final")return P;var A=O.parent;if(!A.parent)return P;P.push(ii(O.id,O.doneData),ii(A.id,O.doneData?$i(O.doneData,i,o):void 0));var D=A.parent;return D.type==="parallel"&&Ur(D).every(function(j){return Ri(r.configuration,j)})&&P.push(ii(D.id)),P})),m=_.map(function(O){var P=O.onEntry,A=O.activities.map(function(D){return By(D)});return{type:"entry",actions:on(a?Ue(Ue([],we(P),!1),we(A),!1):Ue(Ue([],we(A),!1),we(P),!1),h.machine.options.actions)}}).concat({type:"state_done",actions:p.map(function(O){return Ty(O)})}),E=Array.from(x).map(function(O){return{type:"exit",actions:on(Ue(Ue([],we(O.onExit),!1),we(O.activities.map(function(P){return Uy(P)})),!1),h.machine.options.actions)}}),k=E.concat({type:"transition",actions:on(r.actions,this.machine.options.actions)}).concat(m);if(n){var M=on(ze(Ue([],we(e),!1).sort(function(O,P){return P.order-O.order}).map(function(O){return O.onExit})),this.machine.options.actions).filter(function(O){return!ws(O)});return k.concat({type:"stop",actions:M})}return k},t.prototype.transition=function(e,n,r,i){e===void 0&&(e=this.initialState);var o=et(n),s;if(e instanceof bt)s=r===void 0?e:this.resolveState(bt.from(e,r));else{var a=Oe(e)?this.resolve(zi(this.getResolvedPath(e))):this.resolve(e),l=r??this.machine.context;s=this.resolveState(bt.from(a,l))}if(this.strict&&!this.events.includes(o.name)&&!xy(o.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(o.name,"'"));var c=this._transition(s.value,s,o)||{transitions:[],configuration:[],exitSet:[],source:s,actions:[]},f=Lr([],this.getStateNodes(s.value)),d=c.configuration.length?Lr(f,c.configuration):f;return c.configuration=Ue([],we(d),!1),this.resolveTransition(c,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,Ue([],we(s),!1)),e},t.prototype.resolveTransition=function(e,n,r,i,o){var s,a,l,c,f=this;o===void 0&&(o=zn);var d=e.configuration,h=!n||e.transitions.length>0,v=h?e.configuration:n?n.configuration:[],b=Ri(v,this),g=h?qy(this.machine,d):void 0,S=n?n.historyValue?n.historyValue:e.source?this.machine.historyValue(n.value):void 0:void 0,w=this.getActions(new Set(v),b,e,r,o,n,i),L=n?B({},n.activities):{};try{for(var y=pe(w),_=y.next();!_.done;_=y.next()){var x=_.value;try{for(var p=(l=void 0,pe(x.actions)),m=p.next();!m.done;m=p.next()){var E=m.value;E.type===vs?L[E.activity.id||E.activity.type]=E:E.type===Xs&&(L[E.activity.id||E.activity.type]=!1)}}catch(W){l={error:W}}finally{try{m&&!m.done&&(c=p.return)&&c.call(p)}finally{if(l)throw l.error}}}}catch(W){s={error:W}}finally{try{_&&!_.done&&(a=y.return)&&a.call(y)}finally{if(s)throw s.error}}var k=we(Hi(this,n,r,o,w,i,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),M=k[0],O=k[1],P=we(_y(M,ws),2),A=P[0],D=P[1],j=M.filter(function(W){var te;return W.type===vs&&((te=W.activity)===null||te===void 0?void 0:te.type)===ms}),U=j.reduce(function(W,te){return W[te.activity.id]=Hy(te.activity,f.machine,O,o),W},n?B({},n.children):{}),N=new bt({value:g||n.value,context:O,_event:o,_sessionid:n?n._sessionid:null,historyValue:g?S?My(S,g):void 0:n?n.historyValue:void 0,history:!g||e.source?n:void 0,actions:g?D:[],activities:g?L:n?n.activities:{},events:[],configuration:v,transitions:e.transitions,children:U,done:b,tags:Il(v),machine:this}),F=r!==O;N.changed=o.name===Xc||F;var q=N.history;q&&delete q.history;var H=!b&&(this._transient||d.some(function(W){return W._transient}));if(!h&&(!H||o.name===si))return N;var V=N;if(!b)for(H&&(V=this.resolveRaisedTransition(V,{type:gy},o,i));A.length;){var $=A.shift();V=this.resolveRaisedTransition(V,$._event,o,i)}var ie=V.changed||(q?!!V.actions.length||F||typeof q.value!=typeof V.value||!df(V.value,q.value):void 0);return V.changed=ie,V.history=q,V},t.prototype.getStateNode=function(e){if(In(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=In(e)?e.slice(Es.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"&&In(e))try{return this.getStateNodeById(e.slice(1))}catch{}for(var n=bs(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||Dn;switch(this.type){case"parallel":return wr(this.initialStateValue,function(o,s){return o?r.getStateNode(s).resolve(e[s]||o):Dn});case"compound":if(Oe(e)){var i=this.getStateNode(e);return i.type==="parallel"||i.type==="compound"?(n={},n[e]=i.initialStateValue,n):e}return Object.keys(e).length?wr(e,function(o,s){return o?r.getStateNode(s).resolve(o):Dn}):this.initialStateValue||{};default:return e||Dn}},t.prototype.getResolvedPath=function(e){if(In(e)){var n=this.machine.idMap[e.slice(Es.length)];if(!n)throw new Error("Unable to find state node '".concat(e,"'"));return n.path}return bs(e,this.delimiter)},Object.defineProperty(t.prototype,"initialStateValue",{get:function(){var e;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var n;if(this.type==="parallel")n=Rl(this.states,function(r){return r.initialStateValue||Dn},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=Wi(this.states[this.initial])?this.initial:(e={},e[this.initial]=this.states[this.initial].initialStateValue,e)}else n={};return this.__cache.initialStateValue=n,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),t.prototype.getInitialState=function(e,n){this._init();var r=this.getStateNodes(e);return this.resolveTransition({configuration:r,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,n??this.machine.context,void 0)},Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){var e;if(this.type==="history"){var n=this.config;Oe(n.target)?e=In(n.target)?zi(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(Wi(this))return[this];if(this.type==="compound"&&!this.initial)return[this];var n=Oi(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=we(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:Rl(this.states,function(n,r){if(!e)return n.historyValue();var i=Oe(e)?void 0:e[r];return n.historyValue(i||n.initialStateValue)},function(n){return!n.history})}},t.prototype.resolveHistory=function(e){var n=this;if(this.type!=="history")return[this];var r=this.parent;if(!e){var i=this.target;return i?ze(Oi(i).map(function(s){return r.getFromRelativePath(s)})):r.initialStateNodes}var o=Ey(r.path,"states")(e).current;return Oe(o)?[r.getStateNode(o)]:ze(Oi(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=pe(Object.keys(o)),l=a.next();!l.done;l=a.next()){var c=l.value,f=o[c];if(f.states)try{for(var d=(r=void 0,pe(f.events)),h=d.next();!h.done;h=d.next()){var v=h.value;s.add("".concat(v))}}catch(b){r={error:b}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}}}catch(b){e={error:b}}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(!Oe(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,`':
|
|
82
|
-
`).concat(a.message))}else return n.getStateNodeByPath(o)})},t.prototype.formatTransition=function(e){var n=this,r=Ry(e.target),i="internal"in e?e.internal:r?r.some(function(l){return Oe(l)&&l[0]===n.delimiter}):!0,o=this.machine.options.guards,s=this.resolveTarget(r),a=B(B({},e),{actions:on(Ct(e.actions)),cond:rf(e.cond,o),target:s,source:this,internal:i,eventType:e.event,toJSON:function(){return B(B({},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=Ao,a=o[s],l=a===void 0?[]:a,c=Ys(o,[typeof s=="symbol"?s:s+""]);i=ze(Object.keys(c).map(function(L){var y=An(L,c[L]);return y}).concat(An(Ao,l)))}var f=this.config.always?An("",this.config.always):[],d=this.config.onDone?An(String(ii(this.id)),this.config.onDone):[],h=ze(this.invoke.map(function(L){var y=[];return L.onDone&&y.push.apply(y,Ue([],we(An(String(Pi(L.id)),L.onDone)),!1)),L.onError&&y.push.apply(y,Ue([],we(An(String(Sr(L.id)),L.onError)),!1)),y})),v=this.after,b=ze(Ue(Ue(Ue(Ue([],we(d),!1),we(h),!1),we(i),!1),we(f),!1).map(function(L){return Ct(L).map(function(y){return r.formatTransition(y)})}));try{for(var g=pe(v),S=g.next();!S.done;S=g.next()){var w=S.value;b.push(w)}}catch(L){e={error:L}}finally{try{S&&!S.done&&(n=g.return)&&n.call(g)}finally{if(e)throw e.error}}return b},t}();function u0(t,e,n){return n===void 0&&(n=t.context),new l0(t,e,n)}var c0=Fy,xs;(function(t){t[t.Effect=1]="Effect",t[t.LayoutEffect=2]="LayoutEffect"})(xs||(xs={}));var Mr=u.useLayoutEffect;function jl(t){var e=oe.useRef();return e.current||(e.current={v:t()}),e.current.v}var f0=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},d0=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 h0(t,e){var n,r,i=f0([[],[]],2),o=i[0],s=i[1];try{for(var a=d0(t),l=a.next();!l.done;l=a.next()){var c=l.value;e(c)?o.push(c):s.push(c)}}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 pr=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},Bl=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 Ul(t,e){var n=t.exec,r=n(e.context,e._event.data,{action:t,state:e,_event:e._event});r()}function p0(t){var e=u.useRef([]),n=u.useRef([]);Mr(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=pr(h0(a,function(d){return d.exec.__effect===xs.Effect}),2),c=l[0],f=l[1];(o=e.current).push.apply(o,Bl([],pr(c.map(function(d){return[d,i]})),!1)),(s=n.current).push.apply(s,Bl([],pr(f.map(function(d){return[d,i]})),!1))}});return function(){r.unsubscribe()}},[]),Mr(function(){for(;n.current.length;){var r=pr(n.current.shift(),2),i=r[0],o=r[1];Ul(i,o)}}),u.useEffect(function(){for(;e.current.length;){var r=pr(e.current.shift(),2),i=r[0],o=r[1];Ul(i,o)}})}var Or=function(){return Or=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},Or.apply(this,arguments)},g0=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 v0(t,e,n){if(typeof t=="object")return t;var r=function(){};return{next:t,error:e||r,complete:n||r}}function m0(t,e,n){e===void 0&&(e={});var r=jl(function(){return typeof t=="function"?t():t}),i=e.context,o=e.guards,s=e.actions,a=e.activities,l=e.services,c=e.delays,f=e.state,d=g0(e,["context","guards","actions","activities","services","delays","state"]),h=jl(function(){var v={context:i,guards:o,actions:s,activities:a,services:l,delays:c},b=r.withConfig(v,function(){return Or(Or({},r.context),i)});return hf(b,Or({deferEvents:!0},d))});return Mr(function(){var v;return n&&(v=h.subscribe(v0(n))),function(){v==null||v.unsubscribe()}},[n]),Mr(function(){return h.start(f?bt.create(f):void 0),function(){h.stop()}},[]),Mr(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,c)},[s,o,a,l,c]),p0(h),h}var y0=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 b0(t,e){e===void 0&&(e={});var n=u.useCallback(function(a){var l=a.changed===void 0&&Object.keys(a.children).length;(a.changed||l)&&s(a)},[]),r=m0(t,e,n),i=y0(u.useState(function(){var a=r.machine.initialState;return e.state?bt.create(e.state):a}),2),o=i[0],s=i[1];return[o,r.send,r]}function $e(){return $e=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},$e.apply(this,arguments)}function $n(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 le={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(le.str(t)||le.num(t))return t===e;if(le.obj(t)&&le.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 le.und(n)?t===e:!0}};function w0(t,e){return e===void 0&&(e=!0),n=>(le.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 S0(){const t=u.useState(!1),e=t[1];return u.useCallback(()=>e(r=>!r),[])}function yn(t,e){return le.und(t)||le.nul(t)?e:t}function ai(t){return le.und(t)?[]:le.arr(t)?t:[t]}function Fn(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 le.fun(t)?t(...n):t}function L0(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,$n(t,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}function Do(t){const e=L0(t);if(le.und(e))return $e({to:e},t);const n=Object.keys(t).reduce((r,i)=>le.und(e[i])?$e({},r,{[i]:t[i]}):r,{});return $e({to:e},n)}function E0(t,e){return e&&(le.fun(e)?e(t):le.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 Cs 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 pf 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 ra;function x0(t,e){ra={fn:t,transform:e}}let gf;function C0(t){gf=t}let vf=t=>typeof window<"u"?window.requestAnimationFrame(t):-1,Gi;function _0(t){Gi=t}let mf=()=>Date.now(),M0=t=>t.current,yf;function O0(t){yf=t}class k0 extends pf{constructor(e,n){super(),this.update=void 0,this.payload=e.style?$e({},e,{style:yf(e.style)}):e,this.update=n,this.attach()}}const P0=t=>le.fun(t)&&!(t.prototype instanceof u.Component),R0=t=>u.forwardRef((n,r)=>{const i=S0(),o=u.useRef(!0),s=u.useRef(null),a=u.useRef(null),l=u.useCallback(h=>{const v=s.current,b=()=>{let g=!1;a.current&&(g=ra.fn(a.current,s.current.getAnimatedValue())),(!a.current||g===!1)&&i()};s.current=new k0(h,b),v&&v.detach()},[]);u.useEffect(()=>()=>{o.current=!1,s.current&&s.current.detach()},[]),u.useImperativeHandle(r,()=>M0(a)),l(n);const c=s.current.getValue();c.scrollTop,c.scrollLeft;const f=$n(c,["scrollTop","scrollLeft"]),d=P0(t)?void 0:h=>a.current=E0(h,r);return u.createElement(t,$e({},f,{ref:d}))});let kr=!1;const Cn=new Set,bf=()=>{if(!kr)return!1;let t=mf();for(let e of Cn){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 c=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 c=="string"||typeof f=="string"){l.setValue(f),l.done=!0;continue}if(i.duration!==void 0)d=c+i.easing((t-l.startTime)/i.duration)*(f-c),o=t>=l.startTime+i.duration;else if(i.decay)d=c+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 b=Math.floor(t-s);for(let L=0;L<b;++L){let y=-i.tension*(d-f),_=-i.friction*v,x=(y+_)/i.mass;v=v+x*1/1e3,d=d+v*1/1e3}let g=i.clamp&&i.tension!==0?c<f?d>f:d<f:!1,S=Math.abs(v)<=i.precision,w=i.tension!==0?Math.abs(f-d)<=i.precision:!0;o=g||S&&w,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||(Cn.delete(e),e.stop(!0))}return Cn.size?vf(bf):kr=!1,kr},T0=t=>{Cn.has(t)||Cn.add(t),kr||(kr=!0,vf(bf))},A0=t=>{Cn.has(t)&&Cn.delete(t)};function Zi(t,e,n){if(typeof t=="function")return t;if(Array.isArray(t))return Zi({range:t,output:e,extrapolate:n});if(Gi&&typeof t.output[0]=="string")return Gi(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||(c=>c);return c=>{const f=I0(c,o);return D0(c,o[f],o[f+1],i[f],i[f+1],l,s,a,r.map)}}function D0(t,e,n,r,i,o,s,a,l){let c=l?l(t):t;if(c<e){if(s==="identity")return c;s==="clamp"&&(c=e)}if(c>n){if(a==="identity")return c;a==="clamp"&&(c=n)}return r===i?r:e===n?t<=e?r:i:(e===-1/0?c=-c:n===1/0?c=c-e:c=(c-e)/(n-e),c=o(c),r===-1/0?c=-c:i===1/0?c=c+r:c=c*(i-r)+r,c)}function I0(t,e){for(var n=1;n<e.length-1&&!(e[n]>=t);++n);return n-1}class Jn extends Cs{constructor(e,n,r,i){super(),this.calc=void 0,this.payload=e instanceof Cs&&!(e instanceof Jn)?e.getPayload():Array.isArray(e)?e:[e],this.calc=Zi(n,r,i)}getValue(){return this.calc(...this.payload.map(e=>e.getValue()))}updateConfig(e,n,r){this.calc=Zi(e,n,r)}interpolate(e,n,r){return new Jn(this,e,n,r)}}const Nn=(t,e,n)=>t&&new Jn(t,e,n),N0={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 wf(t,e){"update"in t?e.add(t):t.getChildren().forEach(n=>wf(n,e))}class _s 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&&wf(this,this.animatedStyles),this.animatedStyles.forEach(e=>e.update())}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,n,r){return new Jn(this,e,n,r)}}class j0 extends Cs{constructor(e){super(),this.payload=e.map(n=>new _s(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 Jn(this,e,n)}}let B0=0,U0=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=B0++}update(e){if(!e)return this;const n=Do(e),r=n.delay,i=r===void 0?0:r,o=n.to,s=$n(n,["delay","to"]);if(le.arr(o)||le.fun(o))this.queue.push($e({},s,{delay:i,to:o}));else if(o){let a={};Object.entries(o).forEach(l=>{let c=l[0],f=l[1];const d=$e({to:{[c]:f},delay:Fn(i,c)},s),h=a[d.delay]&&a[d.delay].to;a[d.delay]=$e({},a[d.delay],d,{to:$e({},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;le.obj(s)&&(this.merged=$e({},s,this.merged)),le.obj(l)&&(this.merged=$e({},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=$n(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 c=le.arr(a.to)||le.fun(a.to);s?setTimeout(()=>{n===this.guid&&(c?this.runAsync(a,l):this.diff(a).start(l))},s):c?this.runAsync(a,l):this.diff(a).start(l)})}else le.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),T0(this);return this}stop(e){return this.listeners.forEach(n=>n(e)),this.listeners=[],this}pause(e){return this.stop(!0),e&&A0(this),this}runAsync(e,n){var r=this;e.delay;let i=$n(e,["delay"]);const o=this.local;let s=Promise.resolve(void 0);if(le.arr(i.to))for(let a=0;a<i.to.length;a++){const l=a,c=$e({},i,Do(i.to[l]));le.arr(c.config)&&(c.config=c.config[l]),s=s.then(()=>{if(o===this.guid)return new Promise(f=>this.diff(c).start(f))})}else if(le.fun(i.to)){let a=0,l;s=s.then(()=>i.to(c=>{const f=$e({},i,Do(c));if(le.arr(f.config)&&(f.config=f.config[a]),a++,o===this.guid)return l=new Promise(d=>this.diff(f).start(d))},function(c){return c===void 0&&(c=!0),r.stop(c)}).then(()=>l))}s.then(n)}diff(e){this.props=$e({},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,c=n.reverse,f=n.attach,d=n.reset,h=n.immediate;if(c){var v=[s,i];i=v[0],s=v[1]}this.merged=$e({},i,this.merged,s),this.hasChanged=!1;let b=f&&f(this);if(this.animations=Object.entries(this.merged).reduce((g,S)=>{let w=S[0],L=S[1],y=g[w]||{};const _=le.num(L),x=le.str(L)&&!L.startsWith("#")&&!/\d/.test(L)&&!gf[L],p=le.arr(L),m=!_&&!p&&!x;let E=le.und(i[w])?L:i[w],k=_||p||x?L:1,M=Fn(l,w);b&&(k=b.animations[w].parent);let O=y.parent,P=y.interpolation,A=ai(b?k.getPayload():k),D,j=L;m&&(j=Gi({range:[0,1],output:[L,L]})(1));let U=P&&P.getValue();const F=!le.und(O)&&y.animatedValues.some($=>!$.done),q=!le.equ(j,U),H=!le.equ(j,y.previous),V=!le.equ(M,y.config);if(d||H&&q||V){if(_||x)O=P=y.parent||new _s(E);else if(p)O=P=y.parent||new j0(E);else if(m){let $=y.interpolation&&y.interpolation.calc(y.parent.value);$=$!==void 0&&!d?$:E,y.parent?(O=y.parent,O.setValue(0,!1)):O=new _s(0);const ie={output:[$,L]};y.interpolation?(P=y.interpolation,y.interpolation.updateConfig(ie)):P=O.interpolate(ie)}return A=ai(b?k.getPayload():k),D=ai(O.getPayload()),d&&!m&&O.setValue(E,!1),this.hasChanged=!0,D.forEach($=>{$.startPosition=$.value,$.lastPosition=$.value,$.lastVelocity=F?$.lastVelocity:void 0,$.lastTime=F?$.lastTime:void 0,$.startTime=mf(),$.done=!1,$.animatedStyles.clear()}),Fn(h,w)&&O.setValue(m?k:L,!1),$e({},g,{[w]:$e({},y,{name:w,parent:O,interpolation:P,animatedValues:D,toValues:A,previous:j,config:M,fromValues:ai(O.getValue()),immediate:Fn(h,w),initialVelocity:yn(M.velocity,0),clamp:yn(M.clamp,!1),precision:yn(M.precision,.01),tension:yn(M.tension,170),friction:yn(M.friction,26),mass:yn(M.mass,1),duration:M.duration,easing:yn(M.easing,$=>$),decay:M.decay})})}else return q?g:(m&&(O.setValue(1,!1),P.updateConfig({output:[j,j]})),O.done=!0,this.hasChanged=!0,$e({},g,{[w]:$e({},g[w],{previous:j})}))},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 V0=(t,e)=>{const n=u.useRef(!1),r=u.useRef(),i=le.fun(e),o=u.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 U0,b=i?Fn(e,h,v):e[h];return h===0&&(f=b.ref),v.update(b),f||v.start(),v}),f]},[t]),s=o[0],a=o[1];r.current=s,u.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=u.useMemo(()=>f=>r.current.map((d,h)=>{d.update(i?Fn(f,h,d):f[h]),a||d.start()}),[t]);u.useEffect(()=>{n.current?i||l(e):a||r.current.forEach(f=>f.start())}),u.useEffect(()=>(n.current=!0,()=>r.current.forEach(f=>f.destroy())),[]);const c=r.current.map(f=>f.getValues());return i?[c,l,f=>r.current.forEach(d=>d.pause(f))]:c},F0=t=>{const e=le.fun(t),n=V0(1,e?t:[t]),r=n[0],i=n[1],o=n[2];return e?[r[0],i,o]:r};class z0 extends pf{constructor(e){e===void 0&&(e={}),super(),e.transform&&!(e.transform instanceof _t)&&(e=ra.transform(e)),this.payload=e}}const qi={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},Mt="[-+]?\\d*\\.?\\d+",Ki=Mt+"%";function fo(){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 $0=new RegExp("rgb"+fo(Mt,Mt,Mt)),H0=new RegExp("rgba"+fo(Mt,Mt,Mt,Mt)),W0=new RegExp("hsl"+fo(Mt,Ki,Ki)),G0=new RegExp("hsla"+fo(Mt,Ki,Ki,Mt)),Z0=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,q0=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,K0=/^#([0-9a-fA-F]{6})$/,J0=/^#([0-9a-fA-F]{8})$/;function Y0(t){let e;return typeof t=="number"?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=K0.exec(t))?parseInt(e[1]+"ff",16)>>>0:qi.hasOwnProperty(t)?qi[t]:(e=$0.exec(t))?(jn(e[1])<<24|jn(e[2])<<16|jn(e[3])<<8|255)>>>0:(e=H0.exec(t))?(jn(e[1])<<24|jn(e[2])<<16|jn(e[3])<<8|zl(e[4]))>>>0:(e=Z0.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=J0.exec(t))?parseInt(e[1],16)>>>0:(e=q0.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=W0.exec(t))?(Vl(Fl(e[1]),li(e[2]),li(e[3]))|255)>>>0:(e=G0.exec(t))?(Vl(Fl(e[1]),li(e[2]),li(e[3]))|zl(e[4]))>>>0:null}function Io(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 Vl(t,e,n){const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,o=Io(i,r,t+1/3),s=Io(i,r,t),a=Io(i,r,t-1/3);return Math.round(o*255)<<24|Math.round(s*255)<<16|Math.round(a*255)<<8}function jn(t){const e=parseInt(t,10);return e<0?0:e>255?255:e}function Fl(t){return(parseFloat(t)%360+360)%360/360}function zl(t){const e=parseFloat(t);return e<0?0:e>1?255:Math.round(e*255)}function li(t){const e=parseFloat(t);return e<0?0:e>100?1:e/100}function $l(t){let e=Y0(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 ui=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,X0=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Q0=new RegExp(`(${Object.keys(qi).join("|")})`,"g"),eb=t=>{const e=t.output.map(i=>i.replace(X0,$l)).map(i=>i.replace(Q0,$l)),n=e[0].match(ui).map(()=>[]);e.forEach(i=>{i.match(ui).forEach((o,s)=>n[s].push(+o))});const r=e[0].match(ui).map((i,o)=>Zi($e({},t,{output:n[o]})));return i=>{let o=0;return e[0].replace(ui,()=>r[o++](i)).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(s,a,l,c,f)=>`rgba(${Math.round(a)}, ${Math.round(l)}, ${Math.round(c)}, ${f})`)}};let Pr={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 tb=(t,e)=>t+e.charAt(0).toUpperCase()+e.substring(1),nb=["Webkit","Ms","Moz","O"];Pr=Object.keys(Pr).reduce((t,e)=>(nb.forEach(n=>t[tb(n,e)]=t[e]),t),Pr);function rb(t,e,n){return e==null||typeof e=="boolean"||e===""?"":!n&&typeof e=="number"&&e!==0&&!(Pr.hasOwnProperty(t)&&Pr[t])?e+"px":(""+e).trim()}const Hl={};O0(t=>new z0(t));_0(eb);C0(qi);x0((t,e)=>{if(t.nodeType&&t.setAttribute!==void 0){const i=e.style,o=e.children,s=e.scrollTop,a=e.scrollLeft,l=$n(e,["style","children","scrollTop","scrollLeft"]),c=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=rb(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=c?f:Hl[f]||(Hl[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 ib=["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"],ob=w0(R0,!1),sb=ob(ib);function Wl(t,e){return t.map(function(n,r){return n+e[r]})}function Sf(t,e){return t.map(function(n,r){return n-e[r]})}function Ms(t){return Math.hypot.apply(Math,t)}function ab(t,e,n){var r=Ms(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}),c=Ms(t);return{velocities:a,velocity:s,distance:c,direction:l}}function Os(t){return Math.sign?Math.sign(t):+(t>0)-+(t<0)||+t}function lb(t,e,n){return Math.max(e,Math.min(t,n))}function ub(t,e){return Math.pow(t,e*5)}function Gl(t,e,n){return e===0||Math.abs(e)===1/0?ub(t,n):t*e*n/(e+n*t)}function Rr(t,e,n,r){return r===void 0&&(r=.15),r===0?lb(t,e,n):t<e?-Gl(e-t,n-e,r)+e:t>n?+Gl(t-n,n-e,r)+n:t}function Zl(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 cb(t,e,n){return e&&Zl(t.prototype,e),n&&Zl(t,n),t}function lt(){return lt=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},lt.apply(this,arguments)}function Lf(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function fb(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 ci(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function db(t,e){if(t){if(typeof t=="string")return ql(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 ql(t,e)}}function ql(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 ho(t,e){var n;if(typeof Symbol>"u"||t[Symbol.iterator]==null){if(Array.isArray(t)||(n=db(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.
|
|
83
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return n=t[Symbol.iterator](),n.next.bind(n)}function Ef(){}function xf(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.length===0?Ef:e.length===1?e[0]:function(){for(var r,i=ho(e),o;!(o=i()).done;){var s=o.value;r=s.apply(this,arguments)||r}return r}}function sn(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 fi(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 ia(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]=ia(t[s],a);break;case"boolean":a&&(n[s]=t[s]);break}}return n}var hb=180,pb=.15,gb=.5,vb=60,mb={threshold:function(e){return e===void 0&&(e=0),sn(e)},rubberband:function(e){switch(e===void 0&&(e=0),e){case!0:return sn(pb);case!1:return sn(0);default:return sn(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:sn(e)}},Cf=lt({},mb,{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 Cf.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,c=n.bottom,f=c===void 0?1/0:c;return[[i,s],[l,f]]}}),yb=typeof window<"u"&&window.document&&window.document.createElement,bb={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=yb?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}}},wb=lt({},Cf,{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,c=l===void 0?void 0:l,f=sn(e,o?3:a||c?1:0);return this.filterTaps=o||f[0]+f[1]>0,f},swipeVelocity:function(e){return e===void 0&&(e=gb),sn(e)},swipeDistance:function(e){return e===void 0&&(e=vb),sn(e)},delay:function(e){switch(e===void 0&&(e=0),e){case!0:return hb;case!1:return 0;default:return e}}});function Sb(t){return t===void 0&&(t={}),ia(t,bb)}function Lb(t){return t===void 0&&(t={}),ia(t,wb)}function Eb(t){var e=t.domTarget,n=t.eventOptions,r=t.window,i=t.enabled,o=fb(t,["domTarget","eventOptions","window","enabled"]),s=Sb({domTarget:e,eventOptions:n,window:r,enabled:i});return s.drag=Lb(o),s}function gr(t){return lt({_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:Ef,canceled:!1,memo:void 0,args:void 0},t)}function _f(){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=gr({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=gr({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),r=gr({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),i=gr({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),o=gr({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 wn=new Map,xb=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,c=new Array(l>2?l-2:0),f=2;f<l;f++)c[f-2]=arguments[f];i.controller.timeouts[i.stateKey]=(a=window).setTimeout.apply(a,[o,s].concat(c))},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=lt({},i.controller.state.shared,i.state,i.mapStateValues(i.state)),c=i.handler(l);return i.state.memo=c!==void 0?c: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,c=this.state,f=c._bounds,d=c._initial,h=c._active,v=c._intentional,b=c.lastOffset,g=c.movement,S=this.getInternalMovement(r,this.state),w=v[0]===!1?Kl(S[0],l[0]):v[0],L=v[1]===!1?Kl(S[1],l[1]):v[1],y=this.checkIntentionality([w,L],S);if(y._blocked)return lt({},y,{_movement:S,delta:[0,0]});var _=y._intentional,x=S,p,m;if(_[0]!==!1&&v[0]===!1&&(m=fi(o,this.state),p=fi(s,this.state),d[0]=m[0],f[0]=p[0]),_[1]!==!1&&v[1]===!1){var E,k;m=(E=m)!=null?E:fi(o,this.state),p=(k=p)!=null?k:fi(s,this.state),d[1]=m[1],f[1]=p[1]}var M=[_[0]!==!1?S[0]-_[0]:d[0],_[1]!==!1?S[1]-_[1]:d[1]],O=Wl(M,b),P=h?a:[0,0];return M=Jl(f,Wl(M,d),P),lt({},y,{intentional:_[0]!==!1||_[1]!==!1,_initial:d,_movement:x,movement:M,values:r,offset:Jl(f,O,P),delta:Sf(M,g)})},e.clean=function(){this.clearTimeout()},cb(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 Kl(t,e){return Math.abs(t)>=e?Os(t)*e:!1}function Jl(t,e,n){var r=e[0],i=e[1],o=n[0],s=n[1],a=t[0],l=a[0],c=a[1],f=t[1],d=f[0],h=f[1];return[Rr(r,l,c,o),Rr(i,d,h,s)]}function No(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 Cb(t,e,n){var r=t.state.offset,i=n.timeStamp;return lt({},_f()[t.stateKey],{_active:!0,values:e,initial:e,offset:r,lastOffset:r,startTime:i})}function _b(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,lt({},e,{event:n})].concat(i))}}var Mb=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=ho(n.classes),l;!(l=a()).done;){var c=l.value;new c(n,o).addBindings(r)}for(var f=0,d=Object.entries(n.nativeRefs);f<d.length;f++){var h=d[f],v=h[0],b=h[1];ks(r,v,_b(b,lt({},n.state.shared,{args:o})))}return n.config.domTarget?Rb(n,r):Tb(n,r)},this.effect=function(){return n.config.domTarget&&n.bind(),n.clean},this.clean=function(){var r=Of(n.config),i=n.config.eventOptions;r&&Wr(r,Mf(n.domListeners),i),Object.values(n.timeouts).forEach(clearTimeout),Ob(n)},this.state=_f(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function Ob(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];Wr(n,s,r)}t.windowListeners={}}}function kb(t,e){var n=t.config,r=t.windowListeners;n.window&&(Wr(n.window,r[e],n.eventOptions),delete r[e])}function Pb(t,e,n){var r=t.config,i=t.windowListeners;n===void 0&&(n=[]),r.window&&(Wr(r.window,i[e],r.eventOptions),kf(r.window,i[e]=n,r.eventOptions))}function Rb(t,e){var n=t.config,r=t.domListeners,i=Of(n);if(!i)throw new Error("domTarget must be defined");var o=n.eventOptions;Wr(i,Mf(r),o);for(var s=0,a=Object.entries(e);s<a.length;s++){var l=a[s],c=l[0],f=l[1],d=c.slice(2).toLowerCase();r.push([d,xf.apply(void 0,f)])}kf(i,r,o)}function Tb(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],c=a[1],f=Array.isArray(c)?c:[c],d=l+i;r[d]=xf.apply(void 0,f)}return r}function Mf(t){return t===void 0&&(t=[]),t.splice(0,t.length)}function Of(t){var e=t.domTarget;return e&&"current"in e?e.current:e}function ks(t,e,n){t[e]||(t[e]=[]),t[e].push(n)}function kf(t,e,n){e===void 0&&(e=[]),n===void 0&&(n={});for(var r=ho(e),i;!(i=r()).done;){var o=i.value,s=o[0],a=o[1];t.addEventListener(s,a,n)}}function Wr(t,e,n){e===void 0&&(e=[]),n===void 0&&(n={});for(var r=ho(e),i;!(i=r()).done;){var o=i.value,s=o[0],a=o[1];t.removeEventListener(s,a,n)}}function Ab(t,e,n){n===void 0&&(n={});var r=Ib(t),i=u.useMemo(function(){return new Mb(r)},[]);return i.config=e,i.handlers=t,i.nativeRefs=n,u.useEffect(i.effect,[]),i.config.domTarget?Db:i.bind}function Db(){}function Ib(t){var e=new Set;return t.drag&&e.add(wn.get("drag")),t.wheel&&e.add(wn.get("wheel")),t.scroll&&e.add(wn.get("scroll")),t.move&&e.add(wn.get("move")),t.pinch&&e.add(wn.get("pinch")),t.hover&&e.add(wn.get("hover")),e}var Nb=function(t){Lf(e,t);function e(){return t.apply(this,arguments)||this}var n=e.prototype;return n.getInternalMovement=function(i,o){return Sf(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],c=this.state.axis||(a>l?"x":a<l?"y":void 0);return!this.config.axis&&!this.config.lockDirection?{_intentional:i,_blocked:!1,axis:c}:c?this.config.axis&&c!==this.config.axis?{_intentional:i,_blocked:!0,axis:c}:(i[c==="x"?1:0]=!1,{_intentional:i,_blocked:!1,axis:c}):{_intentional:[!1,!1],_blocked:!1,axis:c}},n.getKinematics=function(i,o){var s=this.getMovement(i);if(!s._blocked){var a=o.timeStamp-this.state.timeStamp;Object.assign(s,ab(s.movement,s.delta,a))}return s},n.mapStateValues=function(i){return{xy:i.values,vxvy:i.velocities}},e}(xb);function Pf(t){if("touches"in t){var e=t.targetTouches,n=t.changedTouches;return e.length>0?e:n}return null}function Yl(t){var e="buttons"in t?t.buttons:0,n=Pf(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 Xl(t){var e=Pf(t),n=e?e[0]:t,r=n.clientX,i=n.clientY;return[r,i]}var jb=3,Bb=220,Ub=function(t){Lf(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||(Pb(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(ci(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=Yl(i);if(!o.down){r.onDragEnd(i);return}r.updateSharedState(o);var s=Xl(i),a=r.getKinematics(s,i),l=No(ci(r),i),c=r.state._isTap,f=Ms(a._movement);c&&f>=jb&&(c=!1),r.updateGestureState(lt({},l,a,{_isTap:c})),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],c=r.state.movement,f=c[0],d=c[1],h=r.state._intentional,v=h[0],b=h[1],g=r.config.swipeVelocity,S=g[0],w=g[1],L=r.config.swipeDistance,y=L[0],_=L[1],x=lt({},No(ci(r),i),r.getMovement(r.state.values)),p=[0,0];x.elapsedTime<Bb&&(v!==!1&&Math.abs(a)>S&&Math.abs(f)>y&&(p[0]=Os(a)),b!==!1&&Math.abs(l)>w&&Math.abs(d)>_&&(p[1]=Os(l))),r.updateGestureState(lt({},x,{tap:o,swipe:p})),r.fireGestureHandler(o===!0)}},r.clean=function(){t.prototype.clean.call(ci(r)),r.state._delayedEvent=!1,kb(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=Xl(i);this.updateSharedState(Yl(i)),this.updateGestureState(lt({},Cb(this,o,i),No(this,i,!0),{_pointerId:i.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(o)),this.fireGestureHandler()},n.addBindings=function(i){if(ks(i,"onPointerDown",this.onDragStart),this.config.filterTaps){var o=this.controller.config.eventOptions.capture?"onClick":"onClickCapture";ks(i,o,this.onClick)}},e}(Nb);function Vb(t,e){var n,r=[],i,o=!1;function s(){for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];return o&&n===this&&e(l,r)||(i=t.apply(this,l),o=!0,n=this,r=l),i}return s}function Ti(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(!Ti(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(!Ti(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)&&!Ti(t[i[r]],e[i[r]]))return!1;return!0}return t!==t&&e!==e}function Fb(t,e){try{return Ti(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 zb(t,e){e===void 0&&(e={}),wn.set("drag",Ub);var n=u.useRef();return n.current||(n.current=Vb(Eb,Fb)),Ab({drag:t},n.current(e))}/*!
|
|
79
|
+
***************************************************************************** */var B=function(){return B=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},B.apply(this,arguments)};function Xs(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 he(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 be(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 Ue(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 De;(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"})(De||(De={}));var qn;(function(t){t.Parent="#_parent",t.Internal="#_internal"})(qn||(qn={}));var ys=De.Start,Ys=De.Stop,Wr=De.Raise,fo=De.Send,Xc=De.Cancel,py=De.NullEvent,Qs=De.Assign;De.After;De.DoneState;var Yc=De.Log,gy=De.Init,bs=De.Invoke;De.ErrorExecution;var Rl=De.ErrorPlatform,vy=De.ErrorCustom,Qc=De.Update,my=De.Choose,yy=De.Pure,ef=".",Tl={},ws="xstate.guard",by="",ri;function ea(t,e,n){n===void 0&&(n=ef);var r=Mr(t,n),i=Mr(e,n);return Me(i)?Me(r)?i===r:!1:Me(r)?r in i:Object.keys(r).every(function(o){return o in i?ea(r[o],i[o]):!1})}function tf(t){try{return Me(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 Ss(t,e){try{return tr(t)?t:t.toString().split(e)}catch{throw new Error("'".concat(t,"' is not a valid state path."))}}function wy(t){return typeof t=="object"&&"value"in t&&"context"in t&&"event"in t&&"_event"in t}function Mr(t,e){if(wy(t))return t.value;if(tr(t))return $i(t);if(typeof t!="string")return t;var n=Ss(t,e);return $i(n)}function $i(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 wr(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 Al(t,e,n){var r,i,o={};try{for(var s=he(Object.keys(t)),a=s.next();!a.done;a=s.next()){var l=a.value,c=t[l];n(c)&&(o[l]=e(c,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 Sy=function(t){return function(e){var n,r,i=e;try{for(var o=he(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 Ly(t,e){return function(n){var r,i,o=n;try{for(var s=he(t),a=s.next();!a.done;a=s.next()){var l=a.value;o=o[e][l]}}catch(c){r={error:c}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o}}function ki(t){if(!t)return[[]];if(Me(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]]:ki(t[n]).map(function(i){return[n].concat(i)})}));return e}function ze(t){var e;return(e=[]).concat.apply(e,Ue([],be(t),!1))}function nf(t){return tr(t)?t:[t]}function Ct(t){return t===void 0?[]:nf(t)}function Hi(t,e,n){var r,i;if(Ee(t))return t(e,n.data);var o={};try{for(var s=he(Object.keys(t)),a=s.next();!a.done;a=s.next()){var l=a.value,c=t[l];Ee(c)?o[l]=c(e,n.data):o[l]=c}}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 Ey(t){return/^(done|error)\./.test(t)}function Dl(t){return!!(t instanceof Promise||t!==null&&(Ee(t)||typeof t=="object")&&Ee(t.then))}function xy(t){return t!==null&&typeof t=="object"&&"transition"in t&&typeof t.transition=="function"}function Cy(t,e){var n,r,i=be([[],[]],2),o=i[0],s=i[1];try{for(var a=he(t),l=a.next();!l.done;l=a.next()){var c=l.value;e(c)?o.push(c):s.push(c)}}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 rf(t,e){return wr(t.states,function(n,r){if(n){var i=(Me(e)?void 0:e[r])||(n?n.current:void 0);if(i)return{current:i,states:rf(n,i)}}})}function _y(t,e){return{current:e,states:rf(t,e)}}function Il(t,e,n,r){var i=t&&n.reduce(function(o,s){var a,l,c=s.assignment,f={state:r,action:s,_event:e},d={};if(Ee(c))d=c(o,e.data,f);else try{for(var p=he(Object.keys(c)),v=p.next();!v.done;v=p.next()){var y=v.value,g=c[y];d[y]=Ee(g)?g(o,e.data,f):g}}catch(S){a={error:S}}finally{try{v&&!v.done&&(l=p.return)&&l.call(p)}finally{if(a)throw a.error}}return Object.assign({},o,d)},t);return i}var My=function(){};function tr(t){return Array.isArray(t)}function Ee(t){return typeof t=="function"}function Me(t){return typeof t=="string"}function of(t,e){if(t)return Me(t)?{type:ws,name:t,predicate:e?e[t]:void 0}:Ee(t)?{type:ws,name:t.name,predicate:t}:t}function Oy(t){try{return"subscribe"in t&&Ee(t.subscribe)}catch{return!1}}var rn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();ri={},ri[rn]=function(){return this},ri[Symbol.observable]=function(){return this};function Kn(t){return!!t&&"__xstatenode"in t}function ky(t){return!!t&&typeof t.send=="function"}function ho(t,e){return Me(t)||typeof t=="number"?B({type:t},e):t}function et(t,e){if(!Me(t)&&"$$type"in t&&t.$$type==="scxml")return t;var n=ho(t);return B({name:n.type,data:n,$$type:"scxml",type:"external"},e)}function An(t,e){var n=nf(e).map(function(r){return typeof r>"u"||typeof r=="string"||Kn(r)?{target:r,event:t}:B(B({},r),{event:t})});return n}function Py(t){if(!(t===void 0||t===by))return Ct(t)}function sf(t,e,n,r,i){var o=t.options.guards,s={state:i,cond:e,_event:r};if(e.type===ws)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 af(t){return typeof t=="string"?{type:t}:t}function Pi(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 ii(t,e){return"".concat(t,":invocation[").concat(e,"]")}function Ls(t){return(t.type===Wr||t.type===fo&&t.to===qn.Internal)&&typeof t.delay!="number"}var zn=et({type:gy});function Es(t,e){return e&&e[t]||void 0}function Ur(t,e){var n;if(Me(t)||typeof t=="number"){var r=Es(t,e);Ee(r)?n={type:t,exec:r}:r?n=r:n={type:t,exec:void 0}}else if(Ee(t))n={type:t.name||t.toString(),exec:t};else{var r=Es(t.type,e);if(Ee(r))n=B(B({},t),{exec:r});else if(r){var i=r.type||t.type;n=B(B(B({},r),t),{type:i})}else n=t}return n}var on=function(t,e){if(!t)return[];var n=tr(t)?t:[t];return n.map(function(r){return Ur(r,e)})};function ta(t){var e=Ur(t);return B(B({id:Me(t)?t:e.id},e),{type:e.type})}function Ry(t,e){return{type:Wr,event:typeof t=="function"?t:ho(t),delay:e?e.delay:void 0,id:e==null?void 0:e.id}}function Ty(t,e,n,r){var i={_event:n},o=et(Ee(t.event)?t.event(e,n.data,i):t.event),s;if(Me(t.delay)){var a=r&&r[t.delay];s=Ee(a)?a(e,n.data,i):a}else s=Ee(t.delay)?t.delay(e,n.data,i):t.delay;return B(B({},t),{type:Wr,_event:o,delay:s})}function Ay(t,e){return{to:e?e.to:void 0,type:fo,event:Ee(t)?t:ho(t),delay:e?e.delay:void 0,id:e&&e.id!==void 0?e.id:Ee(t)?t.name:tf(t)}}function Dy(t,e,n,r){var i={_event:n},o=et(Ee(t.event)?t.event(e,n.data,i):t.event),s;if(Me(t.delay)){var a=r&&r[t.delay];s=Ee(a)?a(e,n.data,i):a}else s=Ee(t.delay)?t.delay(e,n.data,i):t.delay;var l=Ee(t.to)?t.to(e,n.data,i):t.to;return B(B({},t),{to:l,_event:o,event:o.data,delay:s})}var Iy=function(t,e,n){return B(B({},t),{value:Me(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})},Ny=function(t){return{type:Xc,sendId:t}};function jy(t){var e=ta(t);return{type:De.Start,activity:e,exec:void 0}}function By(t){var e=Ee(t)?t:ta(t);return{type:De.Stop,activity:e,exec:void 0}}function Uy(t,e,n){var r=Ee(t.activity)?t.activity(e,n.data):t.activity,i=typeof r=="string"?{id:r}:r,o={type:De.Stop,activity:i};return o}var Vy=function(t){return{type:Qs,assignment:t}};function Fy(t,e){var n=e?"#".concat(e):"";return"".concat(De.After,"(").concat(t,")").concat(n)}function oi(t,e){var n="".concat(De.DoneState,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function Ri(t,e){var n="".concat(De.DoneInvoke,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function Sr(t,e){var n="".concat(De.ErrorPlatform,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}var zy=function(t){var e,n,r=[];try{for(var i=he(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===Qs){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 Wi(t,e,n,r,i,o,s){s===void 0&&(s=!1);var a=s?[]:zy(i),l=a.length?Il(n,r,a,e):n,c=s?[n]:void 0,f=[];function d(y,g){var S;switch(g.type){case Wr:{var w=Ty(g,l,r,t.options.delays);return o&&typeof w.delay=="number"&&o(w,l,r),w}case fo:var L=Dy(g,l,r,t.options.delays);return o&&L.to!==qn.Internal&&(y==="entry"?f.push(L):o(L,l,r)),L;case Yc:{var m=Iy(g,l,r);return o==null||o(m,l,r),m}case my:{var _=g,E=(S=_.conds.find(function(U){var N=of(U.cond,t.options.guards);return!N||sf(t,N,l,r,o?void 0:e)}))===null||S===void 0?void 0:S.actions;if(!E)return[];var h=be(Wi(t,e,l,r,[{type:y,actions:on(Ct(E),t.options.actions)}],o,s),2),b=h[0],x=h[1];return l=x,c==null||c.push(l),b}case yy:{var E=g.get(l,r.data);if(!E)return[];var k=be(Wi(t,e,l,r,[{type:y,actions:on(Ct(E),t.options.actions)}],o,s),2),M=k[0],P=k[1];return l=P,c==null||c.push(l),M}case Ys:{var m=Uy(g,l,r);return o==null||o(m,n,r),m}case Qs:{l=Il(l,r,[g],o?void 0:e),c==null||c.push(l);break}default:var O=Ur(g,t.options.actions),R=O.exec;if(o)o(O,l,r);else if(R&&c){var D=c.length-1,j=B(B({},O),{exec:function(U){for(var N=[],V=1;V<arguments.length;V++)N[V-1]=arguments[V];R.apply(void 0,Ue([c[D]],be(N),!1))}});O=j}return O}}function p(y){var g,S,w=[];try{for(var L=he(y.actions),m=L.next();!m.done;m=L.next()){var _=m.value,E=d(y.type,_);E&&(w=w.concat(E))}}catch(h){g={error:h}}finally{try{m&&!m.done&&(S=L.return)&&S.call(L)}finally{if(g)throw g.error}}return f.forEach(function(h){o(h,l,r)}),f.length=0,w}var v=ze(i.map(p));return[v,l]}var Un=function(t,e){var n=e(t);return n};function lf(t){var e;return e={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:t}}},e[rn]=function(){return this},e}function $y(t,e,n,r){var i,o=af(t.src),s=(i=e==null?void 0:e.options.services)===null||i===void 0?void 0:i[o.type],a=t.data?Hi(t.data,n,r):void 0,l=s?uf(s,t.id,a):lf(t.id);return l.meta=t,l}function uf(t,e,n){var r=lf(e);if(r.deferred=!0,Kn(t)){var i=r.state=Un(void 0,function(){return(n?t.withContext(n):t).initialState});r.getSnapshot=function(){return i}}return r}function Hy(t){try{return typeof t.send=="function"}catch{return!1}}function Wy(t){return Hy(t)&&"id"in t}function Gy(t){var e;return B((e={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},e[rn]=function(){return this},e),t)}var Gi=function(t){return t.type==="atomic"||t.type==="final"};function cf(t){return Object.keys(t.states).map(function(e){return t.states[e]})}function Vr(t){return cf(t).filter(function(e){return e.type!=="history"})}function ff(t){var e=[t];return Gi(t)?e:e.concat(ze(Vr(t).map(ff)))}function Lr(t,e){var n,r,i,o,s,a,l,c,f=new Set(t),d=xs(f),p=new Set(e);try{for(var v=he(p),y=v.next();!y.done;y=v.next())for(var g=y.value,S=g.parent;S&&!p.has(S);)p.add(S),S=S.parent}catch(k){n={error:k}}finally{try{y&&!y.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}var w=xs(p);try{for(var L=he(p),m=L.next();!m.done;m=L.next()){var g=m.value;if(g.type==="compound"&&(!w.get(g)||!w.get(g).length))d.get(g)?d.get(g).forEach(function(M){return p.add(M)}):g.initialStateNodes.forEach(function(M){return p.add(M)});else if(g.type==="parallel")try{for(var _=(s=void 0,he(Vr(g))),E=_.next();!E.done;E=_.next()){var h=E.value;p.has(h)||(p.add(h),d.get(h)?d.get(h).forEach(function(M){return p.add(M)}):h.initialStateNodes.forEach(function(M){return p.add(M)}))}}catch(M){s={error:M}}finally{try{E&&!E.done&&(a=_.return)&&a.call(_)}finally{if(s)throw s.error}}}}catch(k){i={error:k}}finally{try{m&&!m.done&&(o=L.return)&&o.call(L)}finally{if(i)throw i.error}}try{for(var b=he(p),x=b.next();!x.done;x=b.next())for(var g=x.value,S=g.parent;S&&!p.has(S);)p.add(S),S=S.parent}catch(k){l={error:k}}finally{try{x&&!x.done&&(c=b.return)&&c.call(b)}finally{if(l)throw l.error}}return p}function df(t,e){var n=e.get(t);if(!n)return{};if(t.type==="compound"){var r=n[0];if(r){if(Gi(r))return r.key}else return{}}var i={};return n.forEach(function(o){i[o.key]=df(o,e)}),i}function xs(t){var e,n,r=new Map;try{for(var i=he(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 Zy(t,e){var n=Lr([t],e);return df(t,xs(n))}function Er(t,e){return Array.isArray(t)?t.some(function(n){return n===e}):t instanceof Set?t.has(e):!1}function qy(t){return Ue([],be(new Set(ze(Ue([],be(t.map(function(e){return e.ownEvents})),!1)))),!1)}function Ti(t,e){return e.type==="compound"?Vr(e).some(function(n){return n.type==="final"&&Er(t,n)}):e.type==="parallel"?Vr(e).every(function(n){return Ti(t,n)}):!1}function Ky(t){return t===void 0&&(t=[]),t.reduce(function(e,n){return n.meta!==void 0&&(e[n.id]=n.meta),e},{})}function Nl(t){return new Set(ze(t.map(function(e){return e.tags})))}function hf(t,e){if(t===e)return!0;if(t===void 0||e===void 0)return!1;if(Me(t)||Me(e))return t===e;var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(i){return hf(t[i],e[i])})}function Jy(t){return typeof t!="object"||t===null?!1:"value"in t&&"_event"in t}function Xy(t,e){var n=t.exec,r=B(B({},t),{exec:n!==void 0?function(){return n(e.context,e.event,{action:t,state:e,_event:e._event})}:void 0});return r}var bt=function(){function t(e){var n=this,r;this.actions=[],this.activities=Tl,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||Tl,this.meta=Ky(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 qy(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=zn;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=zn;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="."),Me(e))return[e];var i=Object.keys(e);return i.concat.apply(i,Ue([],be(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=Xs(e,["configuration","transitions","tags","machine"]);return B(B({},r),{tags:Array.from(n)})},t.prototype.matches=function(e){return ea(e,this.value)},t.prototype.hasTag=function(e){return this.tags.has(e)},t.prototype.can=function(e){var n;My(!!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}(),Yy={deferEvents:!1},jl=function(){function t(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=B(B({},Yy),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}(),Do=new Map,Qy=0,hr={bookId:function(){return"x:".concat(Qy++)},register:function(t,e){return Do.set(t,e),t},get:function(t){return Do.get(t)},free:function(t){Do.delete(t)}};function na(){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 e0(){var t=na();if(t&&"__xstate__"in t)return t.__xstate__}function t0(t){if(na()){var e=e0();e&&e.register(t)}}function n0(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 c=i.shift();n=t.transition(n,c,l),r.forEach(function(f){return f.next(n)})}o=!1}},a=Gy({id:e.id,send:function(c){i.push(c),s()},getSnapshot:function(){return n},subscribe:function(c,f,d){var p=Pi(c,f,d);return r.add(p),p.next(n),{unsubscribe:function(){r.delete(p)}}}}),l={parent:e.parent,self:a,id:e.id||"anonymous",observers:r};return n=t.start?t.start(l):n,a}var r0={sync:!1,autoForward:!1},Je;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(Je||(Je={}));var i0=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=Je.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(f,d){if(tr(f))return r.batch(f),r.state;var p=et(ho(f,d));if(r.status===Je.Stopped)return r.state;if(r.status!==Je.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(p.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.
|
|
80
|
+
Event: `).concat(JSON.stringify(p.data)));return r.scheduler.schedule(function(){r.forward(p);var v=r._nextState(p);r.update(v,p)}),r._state},this.sendTo=function(f,d,p){var v=r.parent&&(d===qn.Parent||r.parent.id===d),y=v?r.parent:Me(d)?d===qn.Internal?r:r.children.get(d)||hr.get(d):ky(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!==Je.Stopped||r.parent!==y||r.state.done){var g=B(B({},f),{name:f.name===vy?"".concat(Sr(r.id)):f.name,origin:r.sessionId});!p&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([y,g]):y.send(g)}}else!p&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([y,f.data]):y.send(f.data)},this._exec=function(f,d,p,v){v===void 0&&(v=r.machine.options.actions);var y=f.exec||Es(f.type,v),g=Ee(y)?y:y?y.exec:f.exec;if(g)try{return g(d,p.data,r.machine.config.predictableActionArguments?{action:f,_event:p}:{action:f,state:r.state,_event:p})}catch(D){throw r.parent&&r.parent.send({type:"xstate.error",data:D}),D}switch(f.type){case Wr:{var S=f;r.defer(S);break}case fo:var w=f;if(typeof w.delay=="number"){r.defer(w);return}else w.to?r.sendTo(w._event,w.to,p===zn):r.send(w._event);break;case Xc:r.cancel(f.sendId);break;case ys:{if(r.status!==Je.Running)return;var L=f.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[L.id||L.type])break;if(L.type===De.Invoke){var m=af(L.src),_=r.machine.options.services?r.machine.options.services[m.type]:void 0,E=L.id,h=L.data,b="autoForward"in L?L.autoForward:!!L.forward;if(!_)return;var x=h?Hi(h,d,p):void 0;if(typeof _=="string")return;var k=Ee(_)?_(d,p.data,{data:x,src:m,meta:L.meta}):_;if(!k)return;var M=void 0;Kn(k)&&(k=x?k.withContext(x):k,M={autoForward:b}),r.spawn(k,E,M)}else r.spawnActivity(L);break}case Ys:{r.stopChild(f.activity.id);break}case Yc:var P=f,O=P.label,R=P.value;O?r.logger(O,R):r.logger(R);break}};var i=B(B({},t.defaultOptions),n),o=i.clock,s=i.logger,a=i.parent,l=i.id,c=l!==void 0?l:e.id;this.id=c,this.logger=s,this.clock=o,this.parent=a,this.options=i,this.scheduler=new jl({deferEvents:this.options.deferEvents}),this.sessionId=hr.bookId()}return Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:Un(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=he(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,c,f,d=this;if(e._sessionid=this.sessionId,this._state=e,(!this.machine.config.predictableActionArguments||n===zn)&&this.options.execute)this.execute(this.state);else for(var p=void 0;p=this._outgoingQueue.shift();)p[0].send(p[1]);if(this.children.forEach(function(k){d.state.children[k.id]=k}),this.devTools&&this.devTools.send(n.data,e),e.event)try{for(var v=he(this.eventListeners),y=v.next();!y.done;y=v.next()){var g=y.value;g(e.event)}}catch(k){r={error:k}}finally{try{y&&!y.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}try{for(var S=he(this.listeners),w=S.next();!w.done;w=S.next()){var g=w.value;g(e,e.event)}}catch(k){o={error:k}}finally{try{w&&!w.done&&(s=S.return)&&s.call(S)}finally{if(o)throw o.error}}try{for(var L=he(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(k){a={error:k}}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(k){return k.type==="final"&&k.parent===d.machine}),h=E&&E.doneData?Hi(E.doneData,e.context,n):void 0;this._doneEvent=Ri(this.id,h);try{for(var b=he(this.doneListeners),x=b.next();!x.done;x=b.next()){var g=x.value;g(this._doneEvent)}}catch(k){c={error:k}}finally{try{x&&!x.done&&(f=b.return)&&f.call(b)}finally{if(c)throw c.error}}this._stop(),this._stopChildren(),hr.free(this.sessionId)}},t.prototype.onTransition=function(e){return this.listeners.add(e),this.status===Je.Running&&e(this.state,this.state.event),this},t.prototype.subscribe=function(e,n,r){var i=this,o=Pi(e,n,r);this.listeners.add(o.next),this.status!==Je.NotStarted&&o.next(this.state);var s=function(){i.doneListeners.delete(s),i.stopListeners.delete(s),o.complete()};return this.status===Je.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===Je.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===Je.Running)return this;this.machine._init(),hr.register(this.sessionId,this),this.initialized=!0,this.status=Je.Running;var r=e===void 0?this.initialState:Un(this,function(){return Jy(e)?n.machine.resolveState(e):n.machine.resolveState(bt.from(e,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(r,zn)}),this},t.prototype._stopChildren=function(){this.children.forEach(function(e){Ee(e.stop)&&e.stop()}),this.children.clear()},t.prototype._stop=function(){var e,n,r,i,o,s,a,l,c,f;try{for(var d=he(this.listeners),p=d.next();!p.done;p=d.next()){var v=p.value;this.listeners.delete(v)}}catch(b){e={error:b}}finally{try{p&&!p.done&&(n=d.return)&&n.call(d)}finally{if(e)throw e.error}}try{for(var y=he(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 S=he(this.contextListeners),w=S.next();!w.done;w=S.next()){var v=w.value;this.contextListeners.delete(v)}}catch(b){o={error:b}}finally{try{w&&!w.done&&(s=S.return)&&s.call(S)}finally{if(o)throw o.error}}try{for(var L=he(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=Je.Stopped,this._initialState=void 0;try{for(var _=he(Object.keys(this.delayedEventsMap)),E=_.next();!E.done;E=_.next()){var h=E.value;this.clock.clearTimeout(this.delayedEventsMap[h])}}catch(b){c={error:b}}finally{try{E&&!E.done&&(f=_.return)&&f.call(_)}finally{if(c)throw c.error}}this.scheduler.clear(),this.scheduler=new jl({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=et({type:"xstate.stop"}),o=Un(e,function(){var s=ze(Ue([],be(e.state.configuration),!1).sort(function(d,p){return p.order-d.order}).map(function(d){return on(d.onExit,e.machine.options.actions)})),a=be(Wi(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],c=a[1],f=new bt({value:e.state.value,context:c,_event:i,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:l.filter(function(d){return!Ls(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(),hr.free(e.sessionId)}}),this},t.prototype.batch=function(e){var n=this;if(!(this.status===Je.NotStarted&&this.options.deferEvents)){if(this.status!==Je.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=[],c=function(v){var y=et(v);n.forward(y),s=Un(n,function(){return n.machine.transition(s,y,void 0,r||void 0)}),l.push.apply(l,Ue([],be(n.machine.config.predictableActionArguments?s.actions:s.actions.map(function(g){return Xy(g,s)})),!1)),a=a||!!s.changed};try{for(var f=he(e),d=f.next();!d.done;d=f.next()){var p=d.value;c(p)}}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,et(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=et(e);if(i.name.indexOf(Rl)===0&&!this.state.nextEvents.some(function(s){return s.indexOf(Rl)===0}))throw i.data.data;var o=Un(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=he(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),Ee(n.stop)&&n.stop())},t.prototype.spawn=function(e,n,r){if(this.status!==Je.Running)return uf(e,n);if(Dl(e))return this.spawnPromise(Promise.resolve(e),n);if(Ee(e))return this.spawnCallback(e,n);if(Wy(e))return this.spawnActor(e,n);if(Oy(e))return this.spawnObservable(e,n);if(Kn(e))return this.spawnMachine(e,B(B({},r),{id:n}));if(xy(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,B(B({},this.options),{parent:this,id:n.id||e.id})),o=B(B({},r0),n);o.sync&&i.onTransition(function(a){r.send(Qc,{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(et(a,{origin:i.id}))}).start(),s},t.prototype.spawnBehavior=function(e,n){var r=n0(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(et(Ri(n,l),{origin:n})))},function(l){if(!o){i.removeChild(n);var c=Sr(n,l);try{i.send(et(c,{origin:n}))}catch{i.devTools&&i.devTools.send(c,i.state),i.machine.strict&&i.stop()}}});var a=(r={id:n,send:function(){},subscribe:function(l,c,f){var d=Pi(l,c,f),p=!1;return e.then(function(v){p||(d.next(v),!p&&d.complete())},function(v){p||d.error(v)}),{unsubscribe:function(){return p=!0}}},stop:function(){o=!0},toJSON:function(){return{id:n}},getSnapshot:function(){return s}},r[rn]=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,c=function(p){l=p,a.forEach(function(v){return v(p)}),!o&&i.send(et(p,{origin:n}))},f;try{f=e(c,function(p){s.add(p)})}catch(p){this.send(Sr(n,p))}if(Dl(f))return this.spawnPromise(f,n);var d=(r={id:n,send:function(p){return s.forEach(function(v){return v(p)})},subscribe:function(p){var v=Pi(p);return a.add(v.next),{unsubscribe:function(){a.delete(v.next)}}},stop:function(){o=!0,Ee(f)&&f()},toJSON:function(){return{id:n}},getSnapshot:function(){return l}},r[rn]=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(et(l,{origin:n}))},function(l){i.removeChild(n),i.send(et(Sr(n,l),{origin:n}))},function(){i.removeChild(n),i.send(et(Ri(n),{origin:n}))}),a=(r={id:n,send:function(){},subscribe:function(l,c,f){return e.subscribe(l,c,f)},stop:function(){return s.unsubscribe()},getSnapshot:function(){return o},toJSON:function(){return{id:n}}},r[rn]=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[rn]=function(){return this},r))},t.prototype.attachDev=function(){var e=na();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(B(B({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:B({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}t0(this)}},t.prototype.toJSON=function(){return{id:this.id}},t.prototype[rn]=function(){return this},t.prototype.getSnapshot=function(){return this.status===Je.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=pf,t}();function pf(t,e){var n=new i0(t,e);return n}function o0(t){if(typeof t=="string"){var e={type:t};return e.toString=function(){return t},e}return t}function si(t){return B(B({type:bs},t),{toJSON:function(){t.onDone,t.onError;var e=Xs(t,["onDone","onError"]);return B(B({},e),{type:bs,src:o0(t.src)})}})}var ai="",Cs="#",Io="*",Dn={},In=function(t){return t[0]===Cs},s0=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},a0=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(s0(),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:ef),this.id=this.config.id||Ue([this.machine.key],be(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?wr(this.config.states,function(c,f){var d,p=new t(c,{},void 0,{parent:o,key:f});return Object.assign(o.idMap,B((d={},d[p.id]=p,d),p.idMap)),p}):Dn;var a=0;function l(c){var f,d;c.order=a++;try{for(var p=he(cf(c)),v=p.next();!v.done;v=p.next()){var y=v.value;l(y)}}catch(g){f={error:g}}finally{try{v&&!v.done&&(d=p.return)&&d.call(p)}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(c){var f=c.event;return f===ai}):ai in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=Ct(this.config.entry||this.config.onEntry).map(function(c){return Ur(c)}),this.onExit=Ct(this.config.exit||this.config.onExit).map(function(c){return Ur(c)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=Ct(this.config.invoke).map(function(c,f){var d,p;if(Kn(c)){var v=ii(o.id,f);return o.machine.options.services=B((d={},d[v]=c,d),o.machine.options.services),si({src:v,id:v})}else if(Me(c.src)){var v=c.id||ii(o.id,f);return si(B(B({},c),{id:v,src:c.src}))}else if(Kn(c.src)||Ee(c.src)){var v=c.id||ii(o.id,f);return o.machine.options.services=B((p={},p[v]=c.src,p),o.machine.options.services),si(B(B({id:v},c),{src:v}))}else{var y=c.src;return si(B(B({id:ii(o.id,f)},c),{src:y}))}}),this.activities=Ct(this.config.activities).concat(this.invoke).map(function(c){return ta(c)}),this.transition=this.transition.bind(this),this.tags=Ct(this.config.tags)}return t.prototype._init=function(){this.__cache.transitions||ff(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:B(B({},i),e.actions),activities:B(B({},o),e.activities),guards:B(B({},s),e.guards),services:B(B({},a),e.services),delays:B(B({},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 Ee(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:wr(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===ai,r=this.transitions.filter(function(i){var o=i.eventType===e;return n?o:o||i.eventType===Io});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=Ee(o)?"".concat(e.id,":delay[").concat(s,"]"):o,l=Fy(a,e.id);return e.onEntry.push(Ay(l,{delay:o})),e.onExit.push(Ny(l)),l},i=tr(n)?n.map(function(o,s){var a=r(o.delay,s);return B(B({},o),{event:a})}):ze(Object.keys(n).map(function(o,s){var a=n[o],l=Me(a)?{target:a}:a,c=isNaN(+o)?o:+o,f=r(c,s);return Ct(l).map(function(d){return B(B({},d),{event:f,delay:c})})}));return i.map(function(o){var s=o.delay;return B(B({},e.formatTransition(o)),{delay:s})})},t.prototype.getStateNodes=function(e){var n,r=this;if(!e)return[];var i=e instanceof bt?e.value:Mr(e,this.delimiter);if(Me(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,Ue([],be(ze(s.map(function(l){return r.getStateNode(l).getStateNodes(i[l])}))),!1)),a},t.prototype.handles=function(e){var n=tf(e);return this.events.includes(n)},t.prototype.resolveState=function(e){var n=e instanceof bt?e:bt.create(e),r=Array.from(Lr([],this.getStateNodes(n.value)));return new bt(B(B({},n),{value:this.resolve(n.value),configuration:r,done:Ti(r,this),tags:Nl(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=he(Object.keys(e)),l=a.next();!l.done;l=a.next()){var c=l.value,f=e[c];if(f){var d=this.getStateNode(c),p=d._transition(f,n,r);p&&(s[c]=p)}}}catch(w){i={error:w}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}var v=Object.keys(s).map(function(w){return s[w]}),y=ze(v.map(function(w){return w.transitions})),g=v.some(function(w){return w.transitions.length>0});if(!g)return this.next(n,r);var S=ze(Object.keys(s).map(function(w){return s[w].configuration}));return{transitions:y,exitSet:ze(v.map(function(w){return w.exitSet})),configuration:S,source:n,actions:ze(Object.keys(s).map(function(w){return s[w].actions}))}},t.prototype._transition=function(e,n,r){return Me(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,et(n))},t.prototype.next=function(e,n){var r,i,o=this,s=n.name,a=[],l=[],c;try{for(var f=he(this.getCandidates(s)),d=f.next();!d.done;d=f.next()){var p=d.value,v=p.cond,y=p.in,g=e.context,S=y?Me(y)&&In(y)?e.matches(Mr(this.getStateNodeById(y).path,this.delimiter)):ea(Mr(y,this.delimiter),Sy(this.path.slice(0,-2))(e.value)):!0,w=!1;try{w=!v||sf(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,`':
|
|
81
|
+
`).concat(_.message))}if(w&&S){p.target!==void 0&&(l=p.target),a.push.apply(a,Ue([],be(p.actions),!1)),c=p;break}}}catch(_){r={error:_}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}if(c){if(!l.length)return{transitions:[c],exitSet:[],configuration:e.value?[this]:[],source:e,actions:a};var L=ze(l.map(function(_){return o.getRelativeStateNodes(_,e.historyValue)})),m=!!c.internal;return{transitions:[c],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,c,f,d,p=this,v=s?Lr([],this.getStateNodes(s.value)):[],y=new Set;try{for(var g=he(Array.from(e).sort(function(P,O){return P.order-O.order})),S=g.next();!S.done;S=g.next()){var w=S.value;(!Er(v,w)||Er(r.exitSet,w)||w.parent&&y.has(w.parent))&&y.add(w)}}catch(P){l={error:P}}finally{try{S&&!S.done&&(c=g.return)&&c.call(g)}finally{if(l)throw l.error}}try{for(var L=he(v),m=L.next();!m.done;m=L.next()){var w=m.value;(!Er(e,w)||Er(r.exitSet,w.parent))&&r.exitSet.push(w)}}catch(P){f={error:P}}finally{try{m&&!m.done&&(d=L.return)&&d.call(L)}finally{if(f)throw f.error}}r.exitSet.sort(function(P,O){return O.order-P.order});var _=Array.from(y).sort(function(P,O){return P.order-O.order}),E=new Set(r.exitSet),h=ze(_.map(function(P){var O=[];if(P.type!=="final")return O;var R=P.parent;if(!R.parent)return O;O.push(oi(P.id,P.doneData),oi(R.id,P.doneData?Hi(P.doneData,i,o):void 0));var D=R.parent;return D.type==="parallel"&&Vr(D).every(function(j){return Ti(r.configuration,j)})&&O.push(oi(D.id)),O})),b=_.map(function(P){var O=P.onEntry,R=P.activities.map(function(D){return jy(D)});return{type:"entry",actions:on(a?Ue(Ue([],be(O),!1),be(R),!1):Ue(Ue([],be(R),!1),be(O),!1),p.machine.options.actions)}}).concat({type:"state_done",actions:h.map(function(P){return Ry(P)})}),x=Array.from(E).map(function(P){return{type:"exit",actions:on(Ue(Ue([],be(P.onExit),!1),be(P.activities.map(function(O){return By(O)})),!1),p.machine.options.actions)}}),k=x.concat({type:"transition",actions:on(r.actions,this.machine.options.actions)}).concat(b);if(n){var M=on(ze(Ue([],be(e),!1).sort(function(P,O){return O.order-P.order}).map(function(P){return P.onExit})),this.machine.options.actions).filter(function(P){return!Ls(P)});return k.concat({type:"stop",actions:M})}return k},t.prototype.transition=function(e,n,r,i){e===void 0&&(e=this.initialState);var o=et(n),s;if(e instanceof bt)s=r===void 0?e:this.resolveState(bt.from(e,r));else{var a=Me(e)?this.resolve($i(this.getResolvedPath(e))):this.resolve(e),l=r??this.machine.context;s=this.resolveState(bt.from(a,l))}if(this.strict&&!this.events.includes(o.name)&&!Ey(o.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(o.name,"'"));var c=this._transition(s.value,s,o)||{transitions:[],configuration:[],exitSet:[],source:s,actions:[]},f=Lr([],this.getStateNodes(s.value)),d=c.configuration.length?Lr(f,c.configuration):f;return c.configuration=Ue([],be(d),!1),this.resolveTransition(c,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,Ue([],be(s),!1)),e},t.prototype.resolveTransition=function(e,n,r,i,o){var s,a,l,c,f=this;o===void 0&&(o=zn);var d=e.configuration,p=!n||e.transitions.length>0,v=p?e.configuration:n?n.configuration:[],y=Ti(v,this),g=p?Zy(this.machine,d):void 0,S=n?n.historyValue?n.historyValue:e.source?this.machine.historyValue(n.value):void 0:void 0,w=this.getActions(new Set(v),y,e,r,o,n,i),L=n?B({},n.activities):{};try{for(var m=he(w),_=m.next();!_.done;_=m.next()){var E=_.value;try{for(var h=(l=void 0,he(E.actions)),b=h.next();!b.done;b=h.next()){var x=b.value;x.type===ys?L[x.activity.id||x.activity.type]=x:x.type===Ys&&(L[x.activity.id||x.activity.type]=!1)}}catch(X){l={error:X}}finally{try{b&&!b.done&&(c=h.return)&&c.call(h)}finally{if(l)throw l.error}}}}catch(X){s={error:X}}finally{try{_&&!_.done&&(a=m.return)&&a.call(m)}finally{if(s)throw s.error}}var k=be(Wi(this,n,r,o,w,i,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),M=k[0],P=k[1],O=be(Cy(M,Ls),2),R=O[0],D=O[1],j=M.filter(function(X){var J;return X.type===ys&&((J=X.activity)===null||J===void 0?void 0:J.type)===bs}),U=j.reduce(function(X,J){return X[J.activity.id]=$y(J.activity,f.machine,P,o),X},n?B({},n.children):{}),N=new bt({value:g||n.value,context:P,_event:o,_sessionid:n?n._sessionid:null,historyValue:g?S?_y(S,g):void 0:n?n.historyValue:void 0,history:!g||e.source?n:void 0,actions:g?D:[],activities:g?L:n?n.activities:{},events:[],configuration:v,transitions:e.transitions,children:U,done:y,tags:Nl(v),machine:this}),V=r!==P;N.changed=o.name===Qc||V;var q=N.history;q&&delete q.history;var $=!y&&(this._transient||d.some(function(X){return X._transient}));if(!p&&(!$||o.name===ai))return N;var F=N;if(!y)for($&&(F=this.resolveRaisedTransition(F,{type:py},o,i));R.length;){var Z=R.shift();F=this.resolveRaisedTransition(F,Z._event,o,i)}var te=F.changed||(q?!!F.actions.length||V||typeof q.value!=typeof F.value||!hf(F.value,q.value):void 0);return F.changed=te,F.history=q,F},t.prototype.getStateNode=function(e){if(In(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=In(e)?e.slice(Cs.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"&&In(e))try{return this.getStateNodeById(e.slice(1))}catch{}for(var n=Ss(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||Dn;switch(this.type){case"parallel":return wr(this.initialStateValue,function(o,s){return o?r.getStateNode(s).resolve(e[s]||o):Dn});case"compound":if(Me(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?wr(e,function(o,s){return o?r.getStateNode(s).resolve(o):Dn}):this.initialStateValue||{};default:return e||Dn}},t.prototype.getResolvedPath=function(e){if(In(e)){var n=this.machine.idMap[e.slice(Cs.length)];if(!n)throw new Error("Unable to find state node '".concat(e,"'"));return n.path}return Ss(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=Al(this.states,function(r){return r.initialStateValue||Dn},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=Gi(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;Me(n.target)?e=In(n.target)?$i(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(Gi(this))return[this];if(this.type==="compound"&&!this.initial)return[this];var n=ki(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=be(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:Al(this.states,function(n,r){if(!e)return n.historyValue();var i=Me(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(ki(i).map(function(s){return r.getFromRelativePath(s)})):r.initialStateNodes}var o=Ly(r.path,"states")(e).current;return Me(o)?[r.getStateNode(o)]:ze(ki(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=he(Object.keys(o)),l=a.next();!l.done;l=a.next()){var c=l.value,f=o[c];if(f.states)try{for(var d=(r=void 0,he(f.events)),p=d.next();!p.done;p=d.next()){var v=p.value;s.add("".concat(v))}}catch(y){r={error:y}}finally{try{p&&!p.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(!Me(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,`':
|
|
82
|
+
`).concat(a.message))}else return n.getStateNodeByPath(o)})},t.prototype.formatTransition=function(e){var n=this,r=Py(e.target),i="internal"in e?e.internal:r?r.some(function(l){return Me(l)&&l[0]===n.delimiter}):!0,o=this.machine.options.guards,s=this.resolveTarget(r),a=B(B({},e),{actions:on(Ct(e.actions)),cond:of(e.cond,o),target:s,source:this,internal:i,eventType:e.event,toJSON:function(){return B(B({},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=Io,a=o[s],l=a===void 0?[]:a,c=Xs(o,[typeof s=="symbol"?s:s+""]);i=ze(Object.keys(c).map(function(L){var m=An(L,c[L]);return m}).concat(An(Io,l)))}var f=this.config.always?An("",this.config.always):[],d=this.config.onDone?An(String(oi(this.id)),this.config.onDone):[],p=ze(this.invoke.map(function(L){var m=[];return L.onDone&&m.push.apply(m,Ue([],be(An(String(Ri(L.id)),L.onDone)),!1)),L.onError&&m.push.apply(m,Ue([],be(An(String(Sr(L.id)),L.onError)),!1)),m})),v=this.after,y=ze(Ue(Ue(Ue(Ue([],be(d),!1),be(p),!1),be(i),!1),be(f),!1).map(function(L){return Ct(L).map(function(m){return r.formatTransition(m)})}));try{for(var g=he(v),S=g.next();!S.done;S=g.next()){var w=S.value;y.push(w)}}catch(L){e={error:L}}finally{try{S&&!S.done&&(n=g.return)&&n.call(g)}finally{if(e)throw e.error}}return y},t}();function l0(t,e,n){return n===void 0&&(n=t.context),new a0(t,e,n)}var u0=Vy,_s;(function(t){t[t.Effect=1]="Effect",t[t.LayoutEffect=2]="LayoutEffect"})(_s||(_s={}));var Or=u.useLayoutEffect;function Bl(t){var e=oe.useRef();return e.current||(e.current={v:t()}),e.current.v}var c0=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},f0=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 d0(t,e){var n,r,i=c0([[],[]],2),o=i[0],s=i[1];try{for(var a=f0(t),l=a.next();!l.done;l=a.next()){var c=l.value;e(c)?o.push(c):s.push(c)}}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 pr=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},Ul=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 Vl(t,e){var n=t.exec,r=n(e.context,e._event.data,{action:t,state:e,_event:e._event});r()}function h0(t){var e=u.useRef([]),n=u.useRef([]);Or(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=pr(d0(a,function(d){return d.exec.__effect===_s.Effect}),2),c=l[0],f=l[1];(o=e.current).push.apply(o,Ul([],pr(c.map(function(d){return[d,i]})),!1)),(s=n.current).push.apply(s,Ul([],pr(f.map(function(d){return[d,i]})),!1))}});return function(){r.unsubscribe()}},[]),Or(function(){for(;n.current.length;){var r=pr(n.current.shift(),2),i=r[0],o=r[1];Vl(i,o)}}),u.useEffect(function(){for(;e.current.length;){var r=pr(e.current.shift(),2),i=r[0],o=r[1];Vl(i,o)}})}var kr=function(){return kr=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},kr.apply(this,arguments)},p0=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 g0(t,e,n){if(typeof t=="object")return t;var r=function(){};return{next:t,error:e||r,complete:n||r}}function v0(t,e,n){e===void 0&&(e={});var r=Bl(function(){return typeof t=="function"?t():t}),i=e.context,o=e.guards,s=e.actions,a=e.activities,l=e.services,c=e.delays,f=e.state,d=p0(e,["context","guards","actions","activities","services","delays","state"]),p=Bl(function(){var v={context:i,guards:o,actions:s,activities:a,services:l,delays:c},y=r.withConfig(v,function(){return kr(kr({},r.context),i)});return pf(y,kr({deferEvents:!0},d))});return Or(function(){var v;return n&&(v=p.subscribe(g0(n))),function(){v==null||v.unsubscribe()}},[n]),Or(function(){return p.start(f?bt.create(f):void 0),function(){p.stop()}},[]),Or(function(){Object.assign(p.machine.options.actions,s),Object.assign(p.machine.options.guards,o),Object.assign(p.machine.options.activities,a),Object.assign(p.machine.options.services,l),Object.assign(p.machine.options.delays,c)},[s,o,a,l,c]),h0(p),p}var m0=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 y0(t,e){e===void 0&&(e={});var n=u.useCallback(function(a){var l=a.changed===void 0&&Object.keys(a.children).length;(a.changed||l)&&s(a)},[]),r=v0(t,e,n),i=m0(u.useState(function(){var a=r.machine.initialState;return e.state?bt.create(e.state):a}),2),o=i[0],s=i[1];return[o,r.send,r]}function $e(){return $e=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},$e.apply(this,arguments)}function $n(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 ue={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(ue.str(t)||ue.num(t))return t===e;if(ue.obj(t)&&ue.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 ue.und(n)?t===e:!0}};function b0(t,e){return e===void 0&&(e=!0),n=>(ue.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 w0(){const t=u.useState(!1),e=t[1];return u.useCallback(()=>e(r=>!r),[])}function yn(t,e){return ue.und(t)||ue.nul(t)?e:t}function li(t){return ue.und(t)?[]:ue.arr(t)?t:[t]}function Fn(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 ue.fun(t)?t(...n):t}function S0(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,$n(t,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}function No(t){const e=S0(t);if(ue.und(e))return $e({to:e},t);const n=Object.keys(t).reduce((r,i)=>ue.und(e[i])?$e({},r,{[i]:t[i]}):r,{});return $e({to:e},n)}function L0(t,e){return e&&(ue.fun(e)?e(t):ue.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 Ms 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 gf 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 ra;function E0(t,e){ra={fn:t,transform:e}}let vf;function x0(t){vf=t}let mf=t=>typeof window<"u"?window.requestAnimationFrame(t):-1,Zi;function C0(t){Zi=t}let yf=()=>Date.now(),_0=t=>t.current,bf;function M0(t){bf=t}class O0 extends gf{constructor(e,n){super(),this.update=void 0,this.payload=e.style?$e({},e,{style:bf(e.style)}):e,this.update=n,this.attach()}}const k0=t=>ue.fun(t)&&!(t.prototype instanceof u.Component),P0=t=>u.forwardRef((n,r)=>{const i=w0(),o=u.useRef(!0),s=u.useRef(null),a=u.useRef(null),l=u.useCallback(p=>{const v=s.current,y=()=>{let g=!1;a.current&&(g=ra.fn(a.current,s.current.getAnimatedValue())),(!a.current||g===!1)&&i()};s.current=new O0(p,y),v&&v.detach()},[]);u.useEffect(()=>()=>{o.current=!1,s.current&&s.current.detach()},[]),u.useImperativeHandle(r,()=>_0(a)),l(n);const c=s.current.getValue();c.scrollTop,c.scrollLeft;const f=$n(c,["scrollTop","scrollLeft"]),d=k0(t)?void 0:p=>a.current=L0(p,r);return u.createElement(t,$e({},f,{ref:d}))});let Pr=!1;const Cn=new Set,wf=()=>{if(!Pr)return!1;let t=yf();for(let e of Cn){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 c=i.fromValues[a],f=i.toValues[a],d=l.lastPosition,p=f instanceof _t,v=Array.isArray(i.initialVelocity)?i.initialVelocity[a]:i.initialVelocity;if(p&&(f=f.getValue()),i.immediate){l.setValue(f),l.done=!0;continue}if(typeof c=="string"||typeof f=="string"){l.setValue(f),l.done=!0;continue}if(i.duration!==void 0)d=c+i.easing((t-l.startTime)/i.duration)*(f-c),o=t>=l.startTime+i.duration;else if(i.decay)d=c+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?c<f?d>f:d<f:!1,S=Math.abs(v)<=i.precision,w=i.tension!==0?Math.abs(f-d)<=i.precision:!0;o=g||S&&w,l.lastVelocity=v,l.lastTime=t}p&&!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||(Cn.delete(e),e.stop(!0))}return Cn.size?mf(wf):Pr=!1,Pr},R0=t=>{Cn.has(t)||Cn.add(t),Pr||(Pr=!0,mf(wf))},T0=t=>{Cn.has(t)&&Cn.delete(t)};function qi(t,e,n){if(typeof t=="function")return t;if(Array.isArray(t))return qi({range:t,output:e,extrapolate:n});if(Zi&&typeof t.output[0]=="string")return Zi(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||(c=>c);return c=>{const f=D0(c,o);return A0(c,o[f],o[f+1],i[f],i[f+1],l,s,a,r.map)}}function A0(t,e,n,r,i,o,s,a,l){let c=l?l(t):t;if(c<e){if(s==="identity")return c;s==="clamp"&&(c=e)}if(c>n){if(a==="identity")return c;a==="clamp"&&(c=n)}return r===i?r:e===n?t<=e?r:i:(e===-1/0?c=-c:n===1/0?c=c-e:c=(c-e)/(n-e),c=o(c),r===-1/0?c=-c:i===1/0?c=c+r:c=c*(i-r)+r,c)}function D0(t,e){for(var n=1;n<e.length-1&&!(e[n]>=t);++n);return n-1}class Jn extends Ms{constructor(e,n,r,i){super(),this.calc=void 0,this.payload=e instanceof Ms&&!(e instanceof Jn)?e.getPayload():Array.isArray(e)?e:[e],this.calc=qi(n,r,i)}getValue(){return this.calc(...this.payload.map(e=>e.getValue()))}updateConfig(e,n,r){this.calc=qi(e,n,r)}interpolate(e,n,r){return new Jn(this,e,n,r)}}const Nn=(t,e,n)=>t&&new Jn(t,e,n),I0={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 Sf(t,e){"update"in t?e.add(t):t.getChildren().forEach(n=>Sf(n,e))}class Os 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&&Sf(this,this.animatedStyles),this.animatedStyles.forEach(e=>e.update())}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,n,r){return new Jn(this,e,n,r)}}class N0 extends Ms{constructor(e){super(),this.payload=e.map(n=>new Os(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 Jn(this,e,n)}}let j0=0,B0=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=j0++}update(e){if(!e)return this;const n=No(e),r=n.delay,i=r===void 0?0:r,o=n.to,s=$n(n,["delay","to"]);if(ue.arr(o)||ue.fun(o))this.queue.push($e({},s,{delay:i,to:o}));else if(o){let a={};Object.entries(o).forEach(l=>{let c=l[0],f=l[1];const d=$e({to:{[c]:f},delay:Fn(i,c)},s),p=a[d.delay]&&a[d.delay].to;a[d.delay]=$e({},a[d.delay],d,{to:$e({},p,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;ue.obj(s)&&(this.merged=$e({},s,this.merged)),ue.obj(l)&&(this.merged=$e({},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=$n(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 c=ue.arr(a.to)||ue.fun(a.to);s?setTimeout(()=>{n===this.guid&&(c?this.runAsync(a,l):this.diff(a).start(l))},s):c?this.runAsync(a,l):this.diff(a).start(l)})}else ue.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),R0(this);return this}stop(e){return this.listeners.forEach(n=>n(e)),this.listeners=[],this}pause(e){return this.stop(!0),e&&T0(this),this}runAsync(e,n){var r=this;e.delay;let i=$n(e,["delay"]);const o=this.local;let s=Promise.resolve(void 0);if(ue.arr(i.to))for(let a=0;a<i.to.length;a++){const l=a,c=$e({},i,No(i.to[l]));ue.arr(c.config)&&(c.config=c.config[l]),s=s.then(()=>{if(o===this.guid)return new Promise(f=>this.diff(c).start(f))})}else if(ue.fun(i.to)){let a=0,l;s=s.then(()=>i.to(c=>{const f=$e({},i,No(c));if(ue.arr(f.config)&&(f.config=f.config[a]),a++,o===this.guid)return l=new Promise(d=>this.diff(f).start(d))},function(c){return c===void 0&&(c=!0),r.stop(c)}).then(()=>l))}s.then(n)}diff(e){this.props=$e({},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,c=n.reverse,f=n.attach,d=n.reset,p=n.immediate;if(c){var v=[s,i];i=v[0],s=v[1]}this.merged=$e({},i,this.merged,s),this.hasChanged=!1;let y=f&&f(this);if(this.animations=Object.entries(this.merged).reduce((g,S)=>{let w=S[0],L=S[1],m=g[w]||{};const _=ue.num(L),E=ue.str(L)&&!L.startsWith("#")&&!/\d/.test(L)&&!vf[L],h=ue.arr(L),b=!_&&!h&&!E;let x=ue.und(i[w])?L:i[w],k=_||h||E?L:1,M=Fn(l,w);y&&(k=y.animations[w].parent);let P=m.parent,O=m.interpolation,R=li(y?k.getPayload():k),D,j=L;b&&(j=Zi({range:[0,1],output:[L,L]})(1));let U=O&&O.getValue();const V=!ue.und(P)&&m.animatedValues.some(Z=>!Z.done),q=!ue.equ(j,U),$=!ue.equ(j,m.previous),F=!ue.equ(M,m.config);if(d||$&&q||F){if(_||E)P=O=m.parent||new Os(x);else if(h)P=O=m.parent||new N0(x);else if(b){let Z=m.interpolation&&m.interpolation.calc(m.parent.value);Z=Z!==void 0&&!d?Z:x,m.parent?(P=m.parent,P.setValue(0,!1)):P=new Os(0);const te={output:[Z,L]};m.interpolation?(O=m.interpolation,m.interpolation.updateConfig(te)):O=P.interpolate(te)}return R=li(y?k.getPayload():k),D=li(P.getPayload()),d&&!b&&P.setValue(x,!1),this.hasChanged=!0,D.forEach(Z=>{Z.startPosition=Z.value,Z.lastPosition=Z.value,Z.lastVelocity=V?Z.lastVelocity:void 0,Z.lastTime=V?Z.lastTime:void 0,Z.startTime=yf(),Z.done=!1,Z.animatedStyles.clear()}),Fn(p,w)&&P.setValue(b?k:L,!1),$e({},g,{[w]:$e({},m,{name:w,parent:P,interpolation:O,animatedValues:D,toValues:R,previous:j,config:M,fromValues:li(P.getValue()),immediate:Fn(p,w),initialVelocity:yn(M.velocity,0),clamp:yn(M.clamp,!1),precision:yn(M.precision,.01),tension:yn(M.tension,170),friction:yn(M.friction,26),mass:yn(M.mass,1),duration:M.duration,easing:yn(M.easing,Z=>Z),decay:M.decay})})}else return q?g:(b&&(P.setValue(1,!1),O.updateConfig({output:[j,j]})),P.done=!0,this.hasChanged=!0,$e({},g,{[w]:$e({},g[w],{previous:j})}))},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 U0=(t,e)=>{const n=u.useRef(!1),r=u.useRef(),i=ue.fun(e),o=u.useMemo(()=>{r.current&&(r.current.map(d=>d.destroy()),r.current=void 0);let f;return[new Array(t).fill().map((d,p)=>{const v=new B0,y=i?Fn(e,p,v):e[p];return p===0&&(f=y.ref),v.update(y),f||v.start(),v}),f]},[t]),s=o[0],a=o[1];r.current=s,u.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=u.useMemo(()=>f=>r.current.map((d,p)=>{d.update(i?Fn(f,p,d):f[p]),a||d.start()}),[t]);u.useEffect(()=>{n.current?i||l(e):a||r.current.forEach(f=>f.start())}),u.useEffect(()=>(n.current=!0,()=>r.current.forEach(f=>f.destroy())),[]);const c=r.current.map(f=>f.getValues());return i?[c,l,f=>r.current.forEach(d=>d.pause(f))]:c},V0=t=>{const e=ue.fun(t),n=U0(1,e?t:[t]),r=n[0],i=n[1],o=n[2];return e?[r[0],i,o]:r};class F0 extends gf{constructor(e){e===void 0&&(e={}),super(),e.transform&&!(e.transform instanceof _t)&&(e=ra.transform(e)),this.payload=e}}const Ki={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},Mt="[-+]?\\d*\\.?\\d+",Ji=Mt+"%";function po(){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 z0=new RegExp("rgb"+po(Mt,Mt,Mt)),$0=new RegExp("rgba"+po(Mt,Mt,Mt,Mt)),H0=new RegExp("hsl"+po(Mt,Ji,Ji)),W0=new RegExp("hsla"+po(Mt,Ji,Ji,Mt)),G0=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Z0=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,q0=/^#([0-9a-fA-F]{6})$/,K0=/^#([0-9a-fA-F]{8})$/;function J0(t){let e;return typeof t=="number"?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=q0.exec(t))?parseInt(e[1]+"ff",16)>>>0:Ki.hasOwnProperty(t)?Ki[t]:(e=z0.exec(t))?(jn(e[1])<<24|jn(e[2])<<16|jn(e[3])<<8|255)>>>0:(e=$0.exec(t))?(jn(e[1])<<24|jn(e[2])<<16|jn(e[3])<<8|$l(e[4]))>>>0:(e=G0.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=K0.exec(t))?parseInt(e[1],16)>>>0:(e=Z0.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=H0.exec(t))?(Fl(zl(e[1]),ui(e[2]),ui(e[3]))|255)>>>0:(e=W0.exec(t))?(Fl(zl(e[1]),ui(e[2]),ui(e[3]))|$l(e[4]))>>>0:null}function jo(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Fl(t,e,n){const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,o=jo(i,r,t+1/3),s=jo(i,r,t),a=jo(i,r,t-1/3);return Math.round(o*255)<<24|Math.round(s*255)<<16|Math.round(a*255)<<8}function jn(t){const e=parseInt(t,10);return e<0?0:e>255?255:e}function zl(t){return(parseFloat(t)%360+360)%360/360}function $l(t){const e=parseFloat(t);return e<0?0:e>1?255:Math.round(e*255)}function ui(t){const e=parseFloat(t);return e<0?0:e>100?1:e/100}function Hl(t){let e=J0(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 ci=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,X0=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Y0=new RegExp(`(${Object.keys(Ki).join("|")})`,"g"),Q0=t=>{const e=t.output.map(i=>i.replace(X0,Hl)).map(i=>i.replace(Y0,Hl)),n=e[0].match(ci).map(()=>[]);e.forEach(i=>{i.match(ci).forEach((o,s)=>n[s].push(+o))});const r=e[0].match(ci).map((i,o)=>qi($e({},t,{output:n[o]})));return i=>{let o=0;return e[0].replace(ci,()=>r[o++](i)).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(s,a,l,c,f)=>`rgba(${Math.round(a)}, ${Math.round(l)}, ${Math.round(c)}, ${f})`)}};let Rr={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 eb=(t,e)=>t+e.charAt(0).toUpperCase()+e.substring(1),tb=["Webkit","Ms","Moz","O"];Rr=Object.keys(Rr).reduce((t,e)=>(tb.forEach(n=>t[eb(n,e)]=t[e]),t),Rr);function nb(t,e,n){return e==null||typeof e=="boolean"||e===""?"":!n&&typeof e=="number"&&e!==0&&!(Rr.hasOwnProperty(t)&&Rr[t])?e+"px":(""+e).trim()}const Wl={};M0(t=>new F0(t));C0(Q0);x0(Ki);E0((t,e)=>{if(t.nodeType&&t.setAttribute!==void 0){const i=e.style,o=e.children,s=e.scrollTop,a=e.scrollLeft,l=$n(e,["style","children","scrollTop","scrollLeft"]),c=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=nb(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=c?f:Wl[f]||(Wl[f]=f.replace(/([A-Z])/g,p=>"-"+p.toLowerCase()));typeof t.getAttribute(d)<"u"&&t.setAttribute(d,l[f])}return}else return!1},t=>t);const rb=["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"],ib=b0(P0,!1),ob=ib(rb);function Gl(t,e){return t.map(function(n,r){return n+e[r]})}function Lf(t,e){return t.map(function(n,r){return n-e[r]})}function ks(t){return Math.hypot.apply(Math,t)}function sb(t,e,n){var r=ks(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}),c=ks(t);return{velocities:a,velocity:s,distance:c,direction:l}}function Ps(t){return Math.sign?Math.sign(t):+(t>0)-+(t<0)||+t}function ab(t,e,n){return Math.max(e,Math.min(t,n))}function lb(t,e){return Math.pow(t,e*5)}function Zl(t,e,n){return e===0||Math.abs(e)===1/0?lb(t,n):t*e*n/(e+n*t)}function Tr(t,e,n,r){return r===void 0&&(r=.15),r===0?ab(t,e,n):t<e?-Zl(e-t,n-e,r)+e:t>n?+Zl(t-n,n-e,r)+n:t}function ql(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ub(t,e,n){return e&&ql(t.prototype,e),n&&ql(t,n),t}function lt(){return lt=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},lt.apply(this,arguments)}function Ef(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function cb(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 fi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function fb(t,e){if(t){if(typeof t=="string")return Kl(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 Kl(t,e)}}function Kl(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 go(t,e){var n;if(typeof Symbol>"u"||t[Symbol.iterator]==null){if(Array.isArray(t)||(n=fb(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.
|
|
83
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return n=t[Symbol.iterator](),n.next.bind(n)}function xf(){}function Cf(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.length===0?xf:e.length===1?e[0]:function(){for(var r,i=go(e),o;!(o=i()).done;){var s=o.value;r=s.apply(this,arguments)||r}return r}}function sn(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 di(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 ia(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]=ia(t[s],a);break;case"boolean":a&&(n[s]=t[s]);break}}return n}var db=180,hb=.15,pb=.5,gb=60,vb={threshold:function(e){return e===void 0&&(e=0),sn(e)},rubberband:function(e){switch(e===void 0&&(e=0),e){case!0:return sn(hb);case!1:return sn(0);default:return sn(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:sn(e)}},_f=lt({},vb,{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 _f.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,c=n.bottom,f=c===void 0?1/0:c;return[[i,s],[l,f]]}}),mb=typeof window<"u"&&window.document&&window.document.createElement,yb={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=mb?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}}},bb=lt({},_f,{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,c=l===void 0?void 0:l,f=sn(e,o?3:a||c?1:0);return this.filterTaps=o||f[0]+f[1]>0,f},swipeVelocity:function(e){return e===void 0&&(e=pb),sn(e)},swipeDistance:function(e){return e===void 0&&(e=gb),sn(e)},delay:function(e){switch(e===void 0&&(e=0),e){case!0:return db;case!1:return 0;default:return e}}});function wb(t){return t===void 0&&(t={}),ia(t,yb)}function Sb(t){return t===void 0&&(t={}),ia(t,bb)}function Lb(t){var e=t.domTarget,n=t.eventOptions,r=t.window,i=t.enabled,o=cb(t,["domTarget","eventOptions","window","enabled"]),s=wb({domTarget:e,eventOptions:n,window:r,enabled:i});return s.drag=Sb(o),s}function gr(t){return lt({_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:xf,canceled:!1,memo:void 0,args:void 0},t)}function Mf(){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=gr({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=gr({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),r=gr({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),i=gr({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),o=gr({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 wn=new Map,Eb=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,c=new Array(l>2?l-2:0),f=2;f<l;f++)c[f-2]=arguments[f];i.controller.timeouts[i.stateKey]=(a=window).setTimeout.apply(a,[o,s].concat(c))},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=lt({},i.controller.state.shared,i.state,i.mapStateValues(i.state)),c=i.handler(l);return i.state.memo=c!==void 0?c: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,c=this.state,f=c._bounds,d=c._initial,p=c._active,v=c._intentional,y=c.lastOffset,g=c.movement,S=this.getInternalMovement(r,this.state),w=v[0]===!1?Jl(S[0],l[0]):v[0],L=v[1]===!1?Jl(S[1],l[1]):v[1],m=this.checkIntentionality([w,L],S);if(m._blocked)return lt({},m,{_movement:S,delta:[0,0]});var _=m._intentional,E=S,h,b;if(_[0]!==!1&&v[0]===!1&&(b=di(o,this.state),h=di(s,this.state),d[0]=b[0],f[0]=h[0]),_[1]!==!1&&v[1]===!1){var x,k;b=(x=b)!=null?x:di(o,this.state),h=(k=h)!=null?k:di(s,this.state),d[1]=b[1],f[1]=h[1]}var M=[_[0]!==!1?S[0]-_[0]:d[0],_[1]!==!1?S[1]-_[1]:d[1]],P=Gl(M,y),O=p?a:[0,0];return M=Xl(f,Gl(M,d),O),lt({},m,{intentional:_[0]!==!1||_[1]!==!1,_initial:d,_movement:E,movement:M,values:r,offset:Xl(f,P,O),delta:Lf(M,g)})},e.clean=function(){this.clearTimeout()},ub(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 Jl(t,e){return Math.abs(t)>=e?Ps(t)*e:!1}function Xl(t,e,n){var r=e[0],i=e[1],o=n[0],s=n[1],a=t[0],l=a[0],c=a[1],f=t[1],d=f[0],p=f[1];return[Tr(r,l,c,o),Tr(i,d,p,s)]}function Bo(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 xb(t,e,n){var r=t.state.offset,i=n.timeStamp;return lt({},Mf()[t.stateKey],{_active:!0,values:e,initial:e,offset:r,lastOffset:r,startTime:i})}function Cb(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,lt({},e,{event:n})].concat(i))}}var _b=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=go(n.classes),l;!(l=a()).done;){var c=l.value;new c(n,o).addBindings(r)}for(var f=0,d=Object.entries(n.nativeRefs);f<d.length;f++){var p=d[f],v=p[0],y=p[1];Rs(r,v,Cb(y,lt({},n.state.shared,{args:o})))}return n.config.domTarget?Pb(n,r):Rb(n,r)},this.effect=function(){return n.config.domTarget&&n.bind(),n.clean},this.clean=function(){var r=kf(n.config),i=n.config.eventOptions;r&&Gr(r,Of(n.domListeners),i),Object.values(n.timeouts).forEach(clearTimeout),Mb(n)},this.state=Mf(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function Mb(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];Gr(n,s,r)}t.windowListeners={}}}function Ob(t,e){var n=t.config,r=t.windowListeners;n.window&&(Gr(n.window,r[e],n.eventOptions),delete r[e])}function kb(t,e,n){var r=t.config,i=t.windowListeners;n===void 0&&(n=[]),r.window&&(Gr(r.window,i[e],r.eventOptions),Pf(r.window,i[e]=n,r.eventOptions))}function Pb(t,e){var n=t.config,r=t.domListeners,i=kf(n);if(!i)throw new Error("domTarget must be defined");var o=n.eventOptions;Gr(i,Of(r),o);for(var s=0,a=Object.entries(e);s<a.length;s++){var l=a[s],c=l[0],f=l[1],d=c.slice(2).toLowerCase();r.push([d,Cf.apply(void 0,f)])}Pf(i,r,o)}function Rb(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],c=a[1],f=Array.isArray(c)?c:[c],d=l+i;r[d]=Cf.apply(void 0,f)}return r}function Of(t){return t===void 0&&(t=[]),t.splice(0,t.length)}function kf(t){var e=t.domTarget;return e&&"current"in e?e.current:e}function Rs(t,e,n){t[e]||(t[e]=[]),t[e].push(n)}function Pf(t,e,n){e===void 0&&(e=[]),n===void 0&&(n={});for(var r=go(e),i;!(i=r()).done;){var o=i.value,s=o[0],a=o[1];t.addEventListener(s,a,n)}}function Gr(t,e,n){e===void 0&&(e=[]),n===void 0&&(n={});for(var r=go(e),i;!(i=r()).done;){var o=i.value,s=o[0],a=o[1];t.removeEventListener(s,a,n)}}function Tb(t,e,n){n===void 0&&(n={});var r=Db(t),i=u.useMemo(function(){return new _b(r)},[]);return i.config=e,i.handlers=t,i.nativeRefs=n,u.useEffect(i.effect,[]),i.config.domTarget?Ab:i.bind}function Ab(){}function Db(t){var e=new Set;return t.drag&&e.add(wn.get("drag")),t.wheel&&e.add(wn.get("wheel")),t.scroll&&e.add(wn.get("scroll")),t.move&&e.add(wn.get("move")),t.pinch&&e.add(wn.get("pinch")),t.hover&&e.add(wn.get("hover")),e}var Ib=function(t){Ef(e,t);function e(){return t.apply(this,arguments)||this}var n=e.prototype;return n.getInternalMovement=function(i,o){return Lf(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],c=this.state.axis||(a>l?"x":a<l?"y":void 0);return!this.config.axis&&!this.config.lockDirection?{_intentional:i,_blocked:!1,axis:c}:c?this.config.axis&&c!==this.config.axis?{_intentional:i,_blocked:!0,axis:c}:(i[c==="x"?1:0]=!1,{_intentional:i,_blocked:!1,axis:c}):{_intentional:[!1,!1],_blocked:!1,axis:c}},n.getKinematics=function(i,o){var s=this.getMovement(i);if(!s._blocked){var a=o.timeStamp-this.state.timeStamp;Object.assign(s,sb(s.movement,s.delta,a))}return s},n.mapStateValues=function(i){return{xy:i.values,vxvy:i.velocities}},e}(Eb);function Rf(t){if("touches"in t){var e=t.targetTouches,n=t.changedTouches;return e.length>0?e:n}return null}function Yl(t){var e="buttons"in t?t.buttons:0,n=Rf(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 Ql(t){var e=Rf(t),n=e?e[0]:t,r=n.clientX,i=n.clientY;return[r,i]}var Nb=3,jb=220,Bb=function(t){Ef(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||(kb(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(fi(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=Yl(i);if(!o.down){r.onDragEnd(i);return}r.updateSharedState(o);var s=Ql(i),a=r.getKinematics(s,i),l=Bo(fi(r),i),c=r.state._isTap,f=ks(a._movement);c&&f>=Nb&&(c=!1),r.updateGestureState(lt({},l,a,{_isTap:c})),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],c=r.state.movement,f=c[0],d=c[1],p=r.state._intentional,v=p[0],y=p[1],g=r.config.swipeVelocity,S=g[0],w=g[1],L=r.config.swipeDistance,m=L[0],_=L[1],E=lt({},Bo(fi(r),i),r.getMovement(r.state.values)),h=[0,0];E.elapsedTime<jb&&(v!==!1&&Math.abs(a)>S&&Math.abs(f)>m&&(h[0]=Ps(a)),y!==!1&&Math.abs(l)>w&&Math.abs(d)>_&&(h[1]=Ps(l))),r.updateGestureState(lt({},E,{tap:o,swipe:h})),r.fireGestureHandler(o===!0)}},r.clean=function(){t.prototype.clean.call(fi(r)),r.state._delayedEvent=!1,Ob(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=Ql(i);this.updateSharedState(Yl(i)),this.updateGestureState(lt({},xb(this,o,i),Bo(this,i,!0),{_pointerId:i.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(o)),this.fireGestureHandler()},n.addBindings=function(i){if(Rs(i,"onPointerDown",this.onDragStart),this.config.filterTaps){var o=this.controller.config.eventOptions.capture?"onClick":"onClickCapture";Rs(i,o,this.onClick)}},e}(Ib);function Ub(t,e){var n,r=[],i,o=!1;function s(){for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];return o&&n===this&&e(l,r)||(i=t.apply(this,l),o=!0,n=this,r=l),i}return s}function Ai(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(!Ai(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(!Ai(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)&&!Ai(t[i[r]],e[i[r]]))return!1;return!0}return t!==t&&e!==e}function Vb(t,e){try{return Ai(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 Fb(t,e){e===void 0&&(e={}),wn.set("drag",Bb);var n=u.useRef();return n.current||(n.current=Ub(Lb,Vb)),Tb({drag:t},n.current(e))}/*!
|
|
84
84
|
* tabbable 5.3.3
|
|
85
85
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
86
|
-
*/var
|
|
86
|
+
*/var Tf=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],Xi=Tf.join(","),Af=typeof Element>"u",kn=Af?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ts=!Af&&Element.prototype.getRootNode?function(t){return t.getRootNode()}:function(t){return t.ownerDocument},Df=function(e,n,r){var i=Array.prototype.slice.apply(e.querySelectorAll(Xi));return n&&kn.call(e,Xi)&&i.unshift(e),i=i.filter(r),i},If=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,c=t(l,!0,r);r.flatten?i.push.apply(i,c):i.push({scope:s,candidates:c})}else{var f=kn.call(s,Xi);f&&r.filter(s)&&(n||!e.includes(s))&&i.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),p=!r.shadowRootFilter||r.shadowRootFilter(s);if(d&&p){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},Nf=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},zb=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},jf=function(e){return e.tagName==="INPUT"},$b=function(e){return jf(e)&&e.type==="hidden"},Hb=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},Wb=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},Gb=function(e){if(!e.name)return!0;var n=e.form||Ts(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=Wb(i,e.form);return!o||o===e},Zb=function(e){return jf(e)&&e.type==="radio"},qb=function(e){return Zb(e)&&!Gb(e)},eu=function(e){var n=e.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},Kb=function(e,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var o=kn.call(e,"details>summary:first-of-type"),s=o?e.parentElement:e;if(kn.call(s,"details:not([open]) *"))return!0;var a=Ts(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 c=e;e;){var f=e.parentElement,d=Ts(e);if(f&&!f.shadowRoot&&i(f)===!0)return eu(e);e.assignedSlot?e=e.assignedSlot:!f&&d!==e.ownerDocument?e=d.host:e=f}e=c}if(l)return!e.getClientRects().length}else if(r==="non-zero-area")return eu(e);return!1},Jb=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 kn.call(n,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}n=n.parentElement}return!1},Yi=function(e,n){return!(n.disabled||$b(n)||Kb(n,e)||Hb(n)||Jb(n))},As=function(e,n){return!(qb(n)||Nf(n)<0||!Yi(e,n))},Xb=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Yb=function t(e){var n=[],r=[];return e.forEach(function(i,o){var s=!!i.scope,a=s?i.scope:i,l=Nf(a,s),c=s?t(i.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:o,tabIndex:l,item:i,isScope:s,content:c})}),r.sort(zb).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},Qb=function(e,n){n=n||{};var r;return n.getShadowRoot?r=If([e],n.includeContainer,{filter:As.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Xb}):r=Df(e,n.includeContainer,As.bind(null,n)),Yb(r)},ew=function(e,n){n=n||{};var r;return n.getShadowRoot?r=If([e],n.includeContainer,{filter:Yi.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Df(e,n.includeContainer,Yi.bind(null,n)),r},hi=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return kn.call(e,Xi)===!1?!1:As(n,e)},tw=Tf.concat("iframe").join(","),Uo=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return kn.call(e,tw)===!1?!1:Yi(n,e)};/*!
|
|
87
87
|
* focus-trap 6.9.4
|
|
88
88
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
89
|
-
*/function eu(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 tu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?eu(Object(n),!0).forEach(function(r){rw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):eu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function rw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var nu=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()}}}(),iw=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},ow=function(e){return e.key==="Escape"||e.key==="Esc"||e.keyCode===27},sw=function(e){return e.key==="Tab"||e.keyCode===9},ru=function(e){return setTimeout(e,0)},iu=function(e,n){var r=-1;return e.every(function(i,o){return n(i)?(r=o,!1):!0}),r},vr=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},hi=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},aw=function(e,n){var r=(n==null?void 0:n.document)||document,i=tu({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,m,E){return p&&p[m]!==void 0?p[m]:i[E||m]},l=function(p){return o.containerGroups.findIndex(function(m){var E=m.container,k=m.tabbableNodes;return E.contains(p)||k.find(function(M){return M===p})})},c=function(p){var m=i[p];if(typeof m=="function"){for(var E=arguments.length,k=new Array(E>1?E-1:0),M=1;M<E;M++)k[M-1]=arguments[M];m=m.apply(void 0,k)}if(m===!0&&(m=void 0),!m){if(m===void 0||m===!1)return m;throw new Error("`".concat(p,"` was specified but was not a node, or did not return a node"))}var O=m;if(typeof m=="string"&&(O=r.querySelector(m),!O))throw new Error("`".concat(p,"` as selector refers to no known node"));return O},f=function(){var p=c("initialFocus");if(p===!1)return!1;if(p===void 0)if(l(r.activeElement)>=0)p=r.activeElement;else{var m=o.tabbableGroups[0],E=m&&m.firstTabbableNode;p=E||c("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 m=ew(p,i.tabbableOptions),E=tw(p,i.tabbableOptions);return{container:p,tabbableNodes:m,focusableNodes:E,firstTabbableNode:m.length>0?m[0]:null,lastTabbableNode:m.length>0?m[m.length-1]:null,nextTabbableNode:function(M){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,P=E.findIndex(function(A){return A===M});if(!(P<0))return O?E.slice(P+1).find(function(A){return di(A,i.tabbableOptions)}):E.slice(0,P).reverse().find(function(A){return di(A,i.tabbableOptions)})}}}),o.tabbableGroups=o.containerGroups.filter(function(p){return p.tabbableNodes.length>0}),o.tabbableGroups.length<=0&&!c("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,iw(p)&&p.select()}},v=function(p){var m=c("setReturnFocus",p);return m||(m===!1?!1:p)},b=function(p){var m=hi(p);if(!(l(m)>=0)){if(vr(i.clickOutsideDeactivates,p)){s.deactivate({returnFocus:i.returnFocusOnDeactivate&&!jo(m,i.tabbableOptions)});return}vr(i.allowOutsideClick,p)||p.preventDefault()}},g=function(p){var m=hi(p),E=l(m)>=0;E||m instanceof Document?E&&(o.mostRecentlyFocusedNode=m):(p.stopImmediatePropagation(),h(o.mostRecentlyFocusedNode||f()))},S=function(p){var m=hi(p);d();var E=null;if(o.tabbableGroups.length>0){var k=l(m),M=k>=0?o.containerGroups[k]:void 0;if(k<0)p.shiftKey?E=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:E=o.tabbableGroups[0].firstTabbableNode;else if(p.shiftKey){var O=iu(o.tabbableGroups,function(N){var F=N.firstTabbableNode;return m===F});if(O<0&&(M.container===m||jo(m,i.tabbableOptions)&&!di(m,i.tabbableOptions)&&!M.nextTabbableNode(m,!1))&&(O=k),O>=0){var P=O===0?o.tabbableGroups.length-1:O-1,A=o.tabbableGroups[P];E=A.lastTabbableNode}}else{var D=iu(o.tabbableGroups,function(N){var F=N.lastTabbableNode;return m===F});if(D<0&&(M.container===m||jo(m,i.tabbableOptions)&&!di(m,i.tabbableOptions)&&!M.nextTabbableNode(m))&&(D=k),D>=0){var j=D===o.tabbableGroups.length-1?0:D+1,U=o.tabbableGroups[j];E=U.firstTabbableNode}}}else E=c("fallbackFocus");E&&(p.preventDefault(),h(E))},w=function(p){if(ow(p)&&vr(i.escapeDeactivates,p)!==!1){p.preventDefault(),s.deactivate();return}if(sw(p)){S(p);return}},L=function(p){var m=hi(p);l(m)>=0||vr(i.clickOutsideDeactivates,p)||vr(i.allowOutsideClick,p)||(p.preventDefault(),p.stopImmediatePropagation())},y=function(){if(o.active)return nu.activateTrap(s),o.delayInitialFocusTimer=i.delayInitialFocus?ru(function(){h(f())}):h(f()),r.addEventListener("focusin",g,!0),r.addEventListener("mousedown",b,{capture:!0,passive:!1}),r.addEventListener("touchstart",b,{capture:!0,passive:!1}),r.addEventListener("click",L,{capture:!0,passive:!1}),r.addEventListener("keydown",w,{capture:!0,passive:!1}),s},_=function(){if(o.active)return r.removeEventListener("focusin",g,!0),r.removeEventListener("mousedown",b,!0),r.removeEventListener("touchstart",b,!0),r.removeEventListener("click",L,!0),r.removeEventListener("keydown",w,!0),s};return s={get active(){return o.active},get paused(){return o.paused},activate:function(p){if(o.active)return this;var m=a(p,"onActivate"),E=a(p,"onPostActivate"),k=a(p,"checkCanFocusTrap");k||d(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,m&&m();var M=function(){k&&d(),y(),E&&E()};return k?(k(o.containers.concat()).then(M,M),this):(M(),this)},deactivate:function(p){if(!o.active)return this;var m=tu({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},p);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,_(),o.active=!1,o.paused=!1,nu.deactivateTrap(s);var E=a(m,"onDeactivate"),k=a(m,"onPostDeactivate"),M=a(m,"checkCanReturnFocus"),O=a(m,"returnFocus","returnFocusOnDeactivate");E&&E();var P=function(){ru(function(){O&&h(v(o.nodeFocusedBeforeActivation)),k&&k()})};return O&&M?(M(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(),y(),this)},updateContainerElements:function(p){var m=[].concat(p).filter(Boolean);return o.containers=m.map(function(E){return typeof E=="string"?r.querySelector(E):E}),o.active&&d(),this}},s.updateContainerElements(e),s};function lw(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 oa=!1;if(typeof window<"u"){var ou={get passive(){oa=!0}};window.addEventListener("testPassive",null,ou),window.removeEventListener("testPassive",null,ou)}var jf=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),an=[],Xi=!1,Bf=-1,Tr=void 0,Ar=void 0,Uf=function(e){return an.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(e))})},Qi=function(e){var n=e||window.event;return Uf(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},uw=function(e){if(Ar===void 0){var n=!!e&&e.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;n&&r>0&&(Ar=document.body.style.paddingRight,document.body.style.paddingRight=r+"px")}Tr===void 0&&(Tr=document.body.style.overflow,document.body.style.overflow="hidden")},cw=function(){Ar!==void 0&&(document.body.style.paddingRight=Ar,Ar=void 0),Tr!==void 0&&(document.body.style.overflow=Tr,Tr=void 0)},fw=function(e){return e?e.scrollHeight-e.scrollTop<=e.clientHeight:!1},dw=function(e,n){var r=e.targetTouches[0].clientY-Bf;return Uf(e.target)?!1:n&&n.scrollTop===0&&r>0||fw(n)&&r<0?Qi(e):(e.stopPropagation(),!0)},hw=function(e,n){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!an.some(function(i){return i.targetElement===e})){var r={targetElement:e,options:n||{}};an=[].concat(lw(an),[r]),jf?(e.ontouchstart=function(i){i.targetTouches.length===1&&(Bf=i.targetTouches[0].clientY)},e.ontouchmove=function(i){i.targetTouches.length===1&&dw(i,e)},Xi||(document.addEventListener("touchmove",Qi,oa?{passive:!1}:void 0),Xi=!0)):uw(n)}},pw=function(e){if(!e){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}an=an.filter(function(n){return n.targetElement!==e}),jf?(e.ontouchstart=null,e.ontouchmove=null,Xi&&an.length===0&&(document.removeEventListener("touchmove",Qi,oa?{passive:!1}:void 0),Xi=!1)):an.length||cw()},_n=[],gw=function(){return _n.some(function(t){return t.activeTargets.length>0})},vw=function(){return _n.some(function(t){return t.skippedTargets.length>0})},su="ResizeObserver loop completed with undelivered notifications.",mw=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:su}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=su),window.dispatchEvent(t)},Vr;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Vr||(Vr={}));var Mn=function(t){return Object.freeze(t)},yw=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,Mn(this)}return t}(),Vf=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,Mn(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,c=e.height;return{x:n,y:r,top:i,right:o,bottom:s,left:a,width:l,height:c}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),sa=function(t){return t instanceof SVGElement&&"getBBox"in t},Ff=function(t){if(sa(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)},au=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)},bw=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},Dr=typeof window<"u"?window:{},pi=new WeakMap,lu=/auto|scroll/,ww=/^tb|vertical/,Sw=/msie|trident/i.test(Dr.navigator&&Dr.navigator.userAgent),Rt=function(t){return parseFloat(t||"0")},Hn=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new yw((n?e:t)||0,(n?t:e)||0)},uu=Mn({devicePixelContentBoxSize:Hn(),borderBoxSize:Hn(),contentBoxSize:Hn(),contentRect:new Vf(0,0,0,0)}),zf=function(t,e){if(e===void 0&&(e=!1),pi.has(t)&&!e)return pi.get(t);if(Ff(t))return pi.set(t,uu),uu;var n=getComputedStyle(t),r=sa(t)&&t.ownerSVGElement&&t.getBBox(),i=!Sw&&n.boxSizing==="border-box",o=ww.test(n.writingMode||""),s=!r&&lu.test(n.overflowY||""),a=!r&&lu.test(n.overflowX||""),l=r?0:Rt(n.paddingTop),c=r?0:Rt(n.paddingRight),f=r?0:Rt(n.paddingBottom),d=r?0:Rt(n.paddingLeft),h=r?0:Rt(n.borderTopWidth),v=r?0:Rt(n.borderRightWidth),b=r?0:Rt(n.borderBottomWidth),g=r?0:Rt(n.borderLeftWidth),S=d+c,w=l+f,L=g+v,y=h+b,_=a?t.offsetHeight-y-t.clientHeight:0,x=s?t.offsetWidth-L-t.clientWidth:0,p=i?S+L:0,m=i?w+y:0,E=r?r.width:Rt(n.width)-p-x,k=r?r.height:Rt(n.height)-m-_,M=E+S+x+L,O=k+w+_+y,P=Mn({devicePixelContentBoxSize:Hn(Math.round(E*devicePixelRatio),Math.round(k*devicePixelRatio),o),borderBoxSize:Hn(M,O,o),contentBoxSize:Hn(E,k,o),contentRect:new Vf(d,l,E,k)});return pi.set(t,P),P},$f=function(t,e,n){var r=zf(t,n),i=r.borderBoxSize,o=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(e){case Vr.DEVICE_PIXEL_CONTENT_BOX:return s;case Vr.BORDER_BOX:return i;default:return o}},Lw=function(){function t(e){var n=zf(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=Mn([n.borderBoxSize]),this.contentBoxSize=Mn([n.contentBoxSize]),this.devicePixelContentBoxSize=Mn([n.devicePixelContentBoxSize])}return t}(),Hf=function(t){if(Ff(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},Ew=function(){var t=1/0,e=[];_n.forEach(function(s){if(s.activeTargets.length!==0){var a=[];s.activeTargets.forEach(function(c){var f=new Lw(c.target),d=Hf(c.target);a.push(f),c.lastReportedSize=$f(c.target,c.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},cu=function(t){_n.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(Hf(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},xw=function(){var t=0;for(cu(t);gw();)t=Ew(),cu(t);return vw()&&mw(),t>0},Bo,Wf=[],Cw=function(){return Wf.splice(0).forEach(function(t){return t()})},_w=function(t){if(!Bo){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Cw()}).observe(n,r),Bo=function(){n.textContent="".concat(e?e--:e++)}}Wf.push(t),Bo()},Mw=function(t){_w(function(){requestAnimationFrame(t)})},Ai=0,Ow=function(){return!!Ai},kw=250,Pw={attributes:!0,characterData:!0,childList:!0,subtree:!0},fu=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],du=function(t){return t===void 0&&(t=0),Date.now()+t},Uo=!1,Rw=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=kw),!Uo){Uo=!0;var r=du(e);Mw(function(){var i=!1;try{i=xw()}finally{if(Uo=!1,e=r-du(),!Ow())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,Pw)};document.body?n():Dr.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),fu.forEach(function(n){return Dr.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),fu.forEach(function(n){return Dr.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),Ts=new Rw,hu=function(t){!Ai&&t>0&&Ts.start(),Ai+=t,!Ai&&Ts.stop()},Tw=function(t){return!sa(t)&&!bw(t)&&getComputedStyle(t).display==="inline"},Aw=function(){function t(e,n){this.target=e,this.observedBox=n||Vr.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=$f(this.target,this.observedBox,!0);return Tw(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),Dw=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),gi=new WeakMap,pu=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},vi=function(){function t(){}return t.connect=function(e,n){var r=new Dw(e,n);gi.set(e,r)},t.observe=function(e,n,r){var i=gi.get(e),o=i.observationTargets.length===0;pu(i.observationTargets,n)<0&&(o&&_n.push(i),i.observationTargets.push(new Aw(n,r&&r.box)),hu(1),Ts.schedule())},t.unobserve=function(e,n){var r=gi.get(e),i=pu(r.observationTargets,n),o=r.observationTargets.length===1;i>=0&&(o&&_n.splice(_n.indexOf(r),1),r.observationTargets.splice(i,1),hu(-1))},t.disconnect=function(e){var n=this,r=gi.get(e);r.observationTargets.slice().forEach(function(i){return n.unobserve(e,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t}(),Iw=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.");vi.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(!au(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");vi.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(!au(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");vi.unobserve(this,e)},t.prototype.disconnect=function(){vi.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();function it(){return it=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},it.apply(this,arguments)}function Di(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 Ir=typeof window<"u"?u.useLayoutEffect:u.useEffect;function mr(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 mi(t){var e=Math.round(t);if(Number.isNaN(t))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return e}var Nw={box:"border-box"};function Vo(t,e){var n=e.label,r=e.enabled,i=e.resizeSourceRef,o=u.useState(0),s=o[0],a=o[1];u.useDebugValue(n+": "+s);var l=u.useCallback(function(c){a(c[0].borderBoxSize[0].blockSize),i.current="element"},[i]);return Ir(function(){if(t.current&&r){var c=new Iw(l);return c.observe(t.current,Nw),function(){c.disconnect()}}},[t,l,r]),r?s:0}function rt(t){return t===void 0&&(t=1e3),new Promise(function(e){return setTimeout(e,t)})}var gu={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},vu={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},jw=u0({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:it({},gu,vu)}}},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:it({},gu,vu)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:it({},{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:[c0({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(rt()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenStart:function(){try{return Promise.resolve(rt()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseStart:function(){try{return Promise.resolve(rt()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeStart:function(){try{return Promise.resolve(rt()).then(function(){})}catch(t){return Promise.reject(t)}},onSnapEnd:function(){try{return Promise.resolve(rt()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenEnd:function(){try{return Promise.resolve(rt()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseEnd:function(){try{return Promise.resolve(rt()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeEnd:function(){try{return Promise.resolve(rt()).then(function(){})}catch(t){return Promise.reject(t)}},renderVisuallyHidden:function(t,e){try{return Promise.resolve(rt()).then(function(){})}catch(n){return Promise.reject(n)}},activate:function(t,e){try{return Promise.resolve(rt()).then(function(){})}catch(n){return Promise.reject(n)}},deactivate:function(t,e){try{return Promise.resolve(rt()).then(function(){})}catch(n){return Promise.reject(n)}},openSmoothly:function(t,e){try{return Promise.resolve(rt()).then(function(){})}catch(n){return Promise.reject(n)}},openImmediately:function(t,e){try{return Promise.resolve(rt()).then(function(){})}catch(n){return Promise.reject(n)}},snapSmoothly:function(t,e){try{return Promise.resolve(rt()).then(function(){})}catch(n){return Promise.reject(n)}},resizeSmoothly:function(t,e){try{return Promise.resolve(rt()).then(function(){})}catch(n){return Promise.reject(n)}},closeSmoothly:function(t,e){try{return Promise.resolve(rt()).then(function(){})}catch(n){return Promise.reject(n)}}},guards:{initiallyClosed:function(t){return t.initialState==="CLOSED"},initiallyOpen:function(t){return t.initialState==="OPEN"}}}),Bw=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],Uw=["velocity"],Vw=["onRest","config"],Gf=N0.default,Fw=Gf.tension,yi=Gf.friction,zw=u.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,c=t.lastSnapRef,f=t.initialFocusRef,d=t.onDismiss,h=t.maxHeight,v=t.defaultSnap,b=v===void 0?Hw:v,g=t.snapPoints,S=g===void 0?Ww:g,w=t.blocking,L=w===void 0||w,y=t.scrollLocking,_=y===void 0||y,x=t.style,p=t.onSpringStart,m=t.onSpringCancel,E=t.onSpringEnd,k=t.reserveScrollBarGap,M=k===void 0?L:k,O=t.expandOnContentDrag,P=O!==void 0&&O,A=Di(t,Bw),D=function(){var I=u.useState(!1),J=I[0],z=I[1],ae=u.useState({}),Re=ae[0],ye=ae[1],Te=u.useCallback(function(Me){return ye(function(Be){var ne;return it({},Be,((ne={})[Me]=!1,ne))}),function(){ye(function(Be){var ne;return it({},Be,((ne={})[Me]=!0,ne))})}},[]);return u.useEffect(function(){var Me=Object.values(Re);Me.length!==0&&Me.every(Boolean)&&z(!0)},[Re]),{ready:J,registerReady:Te}}(),j=D.ready,U=D.registerReady,N=u.useRef(!1),F=u.useRef(p),q=u.useRef(m),H=u.useRef(E);u.useEffect(function(){F.current=p,q.current=m,H.current=E},[m,p,E]);var V,$,ie=F0(function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}}),W=ie[0],te=ie[1],R=u.useRef(null),ce=u.useRef(null),fe=u.useRef(null),K=u.useRef(null),Se=u.useRef(null),Ae=u.useRef(null),de=u.useRef(0),Le=u.useRef(),Ne=u.useRef(!1),ge=(V=u.useMemo(function(){return typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null},[]),$=u.useRef(V==null?void 0:V.matches),u.useDebugValue($.current?"reduce":"no-preference"),u.useEffect(function(){var I=function(J){$.current=J.matches};return V==null||V.addListener(I),function(){return V==null?void 0:V.removeListener(I)}},[V]),$),Ee=function(I){var J=I.targetRef,z=I.enabled,ae=I.reserveScrollBarGap,Re=u.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return u.useDebugValue(z?"Enabled":"Disabled"),u.useEffect(function(){if(!z)return Re.current.deactivate(),void(Re.current={activate:function(){},deactivate:function(){}});var ye=J.current,Te=!1;Re.current={activate:function(){Te||(Te=!0,hw(ye,{allowTouchMove:function(Me){return Me.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:ae}))},deactivate:function(){Te&&(Te=!1,pw(ye))}}},[z,J,ae]),Re}({targetRef:ce,enabled:j&&_,reserveScrollBarGap:M}),ke=function(I){var J=I.targetRef,z=I.enabled,ae=u.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return u.useDebugValue(z?"Enabled":"Disabled"),u.useEffect(function(){if(!z)return ae.current.deactivate(),void(ae.current={activate:function(){},deactivate:function(){}});var Re=J.current,ye=!1,Te=[],Me=[];ae.current={activate:function(){if(!ye){ye=!0;var Be=Re.parentNode;document.querySelectorAll("body > *").forEach(function(ne){if(ne!==Be){var he=ne.getAttribute("aria-hidden");he!==null&&he!=="false"||(Te.push(he),Me.push(ne),ne.setAttribute("aria-hidden","true"))}})}},deactivate:function(){ye&&(ye=!1,Me.forEach(function(Be,ne){var he=Te[ne];he===null?Be.removeAttribute("aria-hidden"):Be.setAttribute("aria-hidden",he)}),Te=[],Me=[])}}},[J,z]),ae}({targetRef:R,enabled:j&&L}),_e=function(I){var J=I.targetRef,z=I.fallbackRef,ae=I.initialFocusRef,Re=I.enabled,ye=u.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return u.useDebugValue(Re?"Enabled":"Disabled"),u.useEffect(function(){if(!Re)return ye.current.deactivate(),void(ye.current={activate:function(){},deactivate:function(){}});var Te=z.current,Me=aw(J.current,{onActivate:void 0,initialFocus:ae?function(){return(ae==null?void 0:ae.current)||Te}:void 0,fallbackFocus:Te,escapeDeactivates:!1,clickOutsideDeactivates:!1}),Be=!1;ye.current={activate:function(){try{return Be?Promise.resolve():(Be=!0,Promise.resolve(Me.activate()).then(function(){return Promise.resolve(new Promise(function(ne){return setTimeout(function(){return ne(void 0)},0)})).then(function(){})}))}catch(ne){return Promise.reject(ne)}},deactivate:function(){Be&&(Be=!1,Me.deactivate())}}},[Re,z,ae,J]),ye}({targetRef:R,fallbackRef:Ae,initialFocusRef:f||void 0,enabled:j&&L&&f!==!1}),Pe=function(I){var J=I.getSnapPoints,z=I.heightRef,ae=I.lastSnapRef,Re=I.ready,ye=function(Ge){var ct=Ge.contentRef,ft=Ge.controlledMaxHeight,Ke=Ge.footerEnabled,Pt=Ge.footerRef,xt=Ge.headerEnabled,dt=Ge.headerRef,Gt=Ge.registerReady,Ut=Ge.resizeSourceRef,nr=u.useMemo(function(){return Gt("contentHeight")},[Gt]),rr=function(Zt,hn,pn){var gn=u.useMemo(function(){return hn("maxHeight")},[hn]),vn=u.useState(function(){return mi(Zt)||typeof window<"u"?window.innerHeight:0}),sr=vn[0],ar=vn[1],qt=sr>0,Y=u.useRef(0);return u.useDebugValue(Zt?"controlled":"auto"),u.useEffect(function(){qt&&gn()},[qt,gn]),Ir(function(){if(Zt)return ar(mi(Zt)),void(pn.current="maxheightprop");var la=function(){Y.current||(Y.current=requestAnimationFrame(function(){ar(window.innerHeight),pn.current="window",Y.current=0}))};return window.addEventListener("resize",la),ar(window.innerHeight),pn.current="window",gn(),function(){window.removeEventListener("resize",la),cancelAnimationFrame(Y.current)}},[Zt,gn,pn]),sr}(ft,Gt,Ut),Pn=Vo(dt,{label:"headerHeight",enabled:xt,resizeSourceRef:Ut}),ir=Vo(ct,{label:"contentHeight",enabled:!0,resizeSourceRef:Ut}),Rn=Vo(Pt,{label:"footerHeight",enabled:Ke,resizeSourceRef:Ut}),dn=Math.min(rr-Pn-Rn,ir)+Pn+Rn;u.useDebugValue("minHeight: "+dn);var or=ir>0;return u.useEffect(function(){or&&nr()},[or,nr]),{maxHeight:rr,minHeight:dn,headerHeight:Pn,footerHeight:Rn}}({contentRef:I.contentRef,controlledMaxHeight:I.controlledMaxHeight,footerEnabled:I.footerEnabled,footerRef:I.footerRef,headerEnabled:I.headerEnabled,headerRef:I.headerRef,registerReady:I.registerReady,resizeSourceRef:I.resizeSourceRef}),Te=ye.maxHeight,Me=ye.minHeight,Be=ye.headerHeight,ne=ye.footerHeight,he=function(Ge,ct){var ft=[].concat(Ge).map(mi).reduce(function(dt,Gt){return dt.add(mr(Gt,0,ct)),dt},new Set),Ke=Array.from(ft),Pt=Math.min.apply(Math,Ke);if(Number.isNaN(Pt))throw new TypeError("minSnap is NaN");var xt=Math.max.apply(Math,Ke);if(Number.isNaN(xt))throw new TypeError("maxSnap is NaN");return{snapPoints:Ke,minSnap:Pt,maxSnap:xt}}(Re?J({height:z.current,footerHeight:ne,headerHeight:Be,minHeight:Me,maxHeight:Te}):[0],Te),st=he.snapPoints,Bt=he.minSnap,nt=he.maxSnap;return u.useDebugValue("minSnap: "+Bt+", maxSnap:"+nt),{minSnap:Bt,maxSnap:nt,findSnap:function(Ge){var ct=mi(typeof Ge=="function"?Ge({footerHeight:ne,headerHeight:Be,height:z.current,minHeight:Me,maxHeight:Te,snapPoints:st,lastSnap:ae.current}):Ge);return st.reduce(function(ft,Ke){return Math.abs(Ke-ct)<Math.abs(ft-ct)?Ke:ft},Bt)},maxHeight:Te}}({contentRef:fe,controlledMaxHeight:h,footerEnabled:!!o,footerRef:Se,getSnapPoints:S,headerEnabled:s!==!1,headerRef:K,heightRef:de,lastSnapRef:c,ready:j,registerReady:U,resizeSourceRef:Le}),Q=Pe.minSnap,Ve=Pe.maxSnap,X=Pe.maxHeight,qe=Pe.findSnap,G=u.useRef(X),Fe=u.useRef(Q),je=u.useRef(Ve),ut=u.useRef(qe),tt=u.useRef(0);Ir(function(){G.current=X,je.current=Ve,Fe.current=Q,ut.current=qe,tt.current=qe(b)},[qe,b,X,Ve,Q]);var ee=u.useCallback(function(I){var J=I.onRest,z=I.config,ae=(z=z===void 0?{}:z).velocity,Re=ae===void 0?1:ae,ye=Di(z,Uw),Te=Di(I,Vw);return new Promise(function(Me){return te(it({},Te,{config:it({velocity:Re},ye,{mass:1,tension:Fw,friction:Math.max(yi,yi+(yi-yi*Re))}),onRest:function(){var Be=[].slice.call(arguments);Me.apply(void 0,Be),J==null||J.apply(void 0,Be)}}))})},[te]),fn=b0(jw,{devTools:!1,actions:{onOpenCancel:u.useCallback(function(){return q.current==null?void 0:q.current({type:"OPEN"})},[]),onSnapCancel:u.useCallback(function(I){return q.current==null?void 0:q.current({type:"SNAP",source:I.snapSource})},[]),onCloseCancel:u.useCallback(function(){return q.current==null?void 0:q.current({type:"CLOSE"})},[]),onResizeCancel:u.useCallback(function(){return q.current==null?void 0:q.current({type:"RESIZE",source:Le.current})},[]),onOpenEnd:u.useCallback(function(){return H.current==null?void 0:H.current({type:"OPEN"})},[]),onSnapEnd:u.useCallback(function(I,J){return H.current==null?void 0:H.current({type:"SNAP",source:I.snapSource})},[]),onResizeEnd:u.useCallback(function(){return H.current==null?void 0:H.current({type:"RESIZE",source:Le.current})},[])},context:{initialState:l},services:{onSnapStart:u.useCallback(function(I,J){try{return Promise.resolve(F.current==null?void 0:F.current({type:"SNAP",source:J.payload.source||"custom"}))}catch(z){return Promise.reject(z)}},[]),onOpenStart:u.useCallback(function(){try{return Promise.resolve(F.current==null?void 0:F.current({type:"OPEN"}))}catch(I){return Promise.reject(I)}},[]),onCloseStart:u.useCallback(function(){try{return Promise.resolve(F.current==null?void 0:F.current({type:"CLOSE"}))}catch(I){return Promise.reject(I)}},[]),onResizeStart:u.useCallback(function(){try{return Promise.resolve(F.current==null?void 0:F.current({type:"RESIZE",source:Le.current}))}catch(I){return Promise.reject(I)}},[]),onSnapEnd:u.useCallback(function(I,J){try{return Promise.resolve(H.current==null?void 0:H.current({type:"SNAP",source:I.snapSource}))}catch(z){return Promise.reject(z)}},[]),onOpenEnd:u.useCallback(function(){try{return Promise.resolve(H.current==null?void 0:H.current({type:"OPEN"}))}catch(I){return Promise.reject(I)}},[]),onCloseEnd:u.useCallback(function(){try{return Promise.resolve(H.current==null?void 0:H.current({type:"CLOSE"}))}catch(I){return Promise.reject(I)}},[]),onResizeEnd:u.useCallback(function(){try{return Promise.resolve(H.current==null?void 0:H.current({type:"RESIZE",source:Le.current}))}catch(I){return Promise.reject(I)}},[]),renderVisuallyHidden:u.useCallback(function(I,J){try{return Promise.resolve(ee({y:tt.current,ready:0,maxHeight:G.current,maxSnap:je.current,minSnap:tt.current,immediate:!0})).then(function(){})}catch(z){return Promise.reject(z)}},[ee]),activate:u.useCallback(function(I,J){try{return N.current=!0,Promise.resolve(Promise.all([Ee.current.activate(),_e.current.activate(),ke.current.activate()])).then(function(){})}catch(z){return Promise.reject(z)}},[ke,_e,Ee]),deactivate:u.useCallback(function(){try{return Ee.current.deactivate(),_e.current.deactivate(),ke.current.deactivate(),N.current=!1,Promise.resolve()}catch(I){return Promise.reject(I)}},[ke,_e,Ee]),openImmediately:u.useCallback(function(){try{return de.current=tt.current,Promise.resolve(ee({y:tt.current,ready:1,maxHeight:G.current,maxSnap:je.current,minSnap:tt.current,immediate:!0})).then(function(){})}catch(I){return Promise.reject(I)}},[ee]),openSmoothly:u.useCallback(function(){try{return Promise.resolve(ee({y:0,ready:1,maxHeight:G.current,maxSnap:je.current,minSnap:tt.current,immediate:!0})).then(function(){return de.current=tt.current,Promise.resolve(ee({y:tt.current,ready:1,maxHeight:G.current,maxSnap:je.current,minSnap:tt.current,immediate:ge.current})).then(function(){})})}catch(I){return Promise.reject(I)}},[ee,ge]),snapSmoothly:u.useCallback(function(I,J){try{var z=ut.current(I.y);return de.current=z,c.current=z,Promise.resolve(ee({y:z,ready:1,maxHeight:G.current,maxSnap:je.current,minSnap:Fe.current,immediate:ge.current,config:{velocity:I.velocity}})).then(function(){})}catch(ae){return Promise.reject(ae)}},[ee,c,ge]),resizeSmoothly:u.useCallback(function(){try{var I=ut.current(de.current);return de.current=I,c.current=I,Promise.resolve(ee({y:I,ready:1,maxHeight:G.current,maxSnap:je.current,minSnap:Fe.current,immediate:Le.current!=="element"||ge.current})).then(function(){})}catch(J){return Promise.reject(J)}},[ee,c,ge]),closeSmoothly:u.useCallback(function(I,J){try{return ee({minSnap:de.current,immediate:!0}),de.current=0,Promise.resolve(ee({y:0,maxHeight:G.current,maxSnap:je.current,immediate:ge.current})).then(function(){return Promise.resolve(ee({ready:0,immediate:!0})).then(function(){})})}catch(z){return Promise.reject(z)}},[ee,ge])}}),Zr=fn[0],Et=fn[1];u.useEffect(function(){j&&Et(a?"OPEN":"CLOSE")},[a,Et,j]),Ir(function(){(X||Ve||Q)&&Et("RESIZE")},[X,Ve,Q,Et]),u.useEffect(function(){return function(){Ee.current.deactivate(),_e.current.deactivate(),ke.current.deactivate()}},[ke,_e,Ee]),u.useImperativeHandle(e,function(){return{snapTo:function(I,J){var z=J===void 0?{}:J,ae=z.velocity,Re=ae===void 0?1:ae,ye=z.source,Te=ye===void 0?"custom":ye;Et("SNAP",{payload:{y:ut.current(I),velocity:Re,source:Te}})},get height(){return de.current}}},[Et]),u.useEffect(function(){var I=ce.current,J=function(ae){Ne.current&&ae.preventDefault()},z=function(ae){I.scrollTop<0&&(requestAnimationFrame(function(){I.style.overflow="hidden",I.scrollTop=0,I.style.removeProperty("overflow")}),ae.preventDefault())};return P&&(I.addEventListener("scroll",J),I.addEventListener("touchmove",J),I.addEventListener("touchstart",z)),function(){I.removeEventListener("scroll",J),I.removeEventListener("touchmove",J),I.removeEventListener("touchstart",z)}},[P,ce]);var jt=zb(function(I){var J=I.args,z=(J=J===void 0?[]:J)[0],ae=(z=z===void 0?{}:z).closeOnTap,Re=ae!==void 0&&ae,ye=z.isContentDragging,Te=ye!==void 0&&ye,Me=I.cancel,Be=I.direction[1],ne=I.down,he=I.first,st=I.last,Bt=I.memo,nt=Bt===void 0?W.y.getValue():Bt,Ge=I.tap,ct=I.velocity,ft=-1*I.movement[1];if(!N.current)return Me(),nt;if(d&&Re&&Ge)return Me(),setTimeout(function(){return d()},0),nt;if(Ge)return nt;var Ke=nt+ft,Pt=ft*ct,xt=Math.max(Fe.current,Math.min(je.current,Ke+2*Pt));if(!ne&&d&&Be>0&&Ke+Pt<Fe.current/2)return Me(),d(),nt;var dt=ne?d||Fe.current!==je.current?Rr(Ke,d?0:Fe.current,je.current,.55):Ke<Fe.current?Rr(Ke,Fe.current,2*je.current,.55):Rr(Ke,Fe.current/2,je.current,.55):xt;return P&&Te?(dt>=je.current&&(dt=je.current),nt===je.current&&ce.current.scrollTop>0&&(dt=je.current),Ne.current=dt<je.current):Ne.current=!1,he&&Et("DRAG"),st?(Et("SNAP",{payload:{y:dt,velocity:ct>.05?ct:1,source:"dragging"}}),nt):(te({y:dt,ready:1,maxHeight:G.current,maxSnap:je.current,minSnap:Fe.current,immediate:!0,config:{velocity:ct}}),nt)},{filterTaps:!0});if(Number.isNaN(je.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(Fe.current))throw new TypeError("minSnapRef is NaN!!");var qr=function(I){var J,z=I.spring,ae=Nn([z.y,z.maxHeight],function(ne,he){return Math.round(mr(he-ne,0,16))+"px"}),Re=Nn([z.y,z.minSnap,z.maxSnap],function(ne,he,st){return mr(ne,he,st)+"px"}),ye=Nn([z.y,z.minSnap,z.maxSnap],function(ne,he,st){return ne<he?he-ne+"px":ne>st?st-ne+"px":"0px"}),Te=Nn([z.y,z.maxSnap],function(ne,he){return ne>=he?Math.ceil(ne-he):0}),Me=Nn([z.y,z.minSnap],function(ne,he){if(!he)return 0;var st=Math.max(he/2-45,0);return mr((ne-st)*(1/(Math.min(he/2+45,he)-st)+0),0,1)}),Be=Nn([z.y,z.minSnap],function(ne,he){return he?mr(ne/he,0,1):0});return(J={})["--rsbs-content-opacity"]=Me,J["--rsbs-backdrop-opacity"]=Be,J["--rsbs-antigap-scale-y"]=Te,J["--rsbs-overlay-translate-y"]=ye,J["--rsbs-overlay-rounded"]=ae,J["--rsbs-overlay-h"]=Re,J}({spring:W});return u.createElement(sb.div,it({},A,{"data-rsbs-root":!0,"data-rsbs-state":$w.find(Zr.matches),"data-rsbs-is-blocking":L,"data-rsbs-is-dismissable":!!d,"data-rsbs-has-header":!!s,"data-rsbs-has-footer":!!o,className:i,ref:R,style:it({},qr,x,{opacity:W.ready})}),r,L&&u.createElement("div",it({key:"backdrop","data-rsbs-backdrop":!0},jt({closeOnTap:!0}))),u.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:Ae,onKeyDown:function(I){I.key==="Escape"&&(I.stopPropagation(),d&&d())}},s!==!1&&u.createElement("div",it({key:"header","data-rsbs-header":!0,ref:K},jt()),s),u.createElement("div",it({key:"scroll","data-rsbs-scroll":!0,ref:ce},P?jt({isContentDragging:!0}):{}),u.createElement("div",{"data-rsbs-content":!0,ref:fe},n)),o&&u.createElement("div",it({key:"footer",ref:Se,"data-rsbs-footer":!0},jt()),o)))}),$w=["closed","opening","open","closing","dragging","snapping","resizing"];function Hw(t){var e=t.lastSnap;return e??Math.min.apply(Math,t.snapPoints)}function Ww(t){return t.minHeight}var Gw=["onSpringStart","onSpringEnd","skipInitialTransition"],Zf=u.forwardRef(function(t,e){var n=t.onSpringStart,r=t.onSpringEnd,i=t.skipInitialTransition,o=Di(t,Gw),s=u.useState(!1),a=s[0],l=s[1],c=u.useRef(),f=u.useRef(null),d=u.useRef(i&&o.open?"OPEN":"CLOSED");Ir(function(){if(o.open)return cancelAnimationFrame(c.current),l(!0),function(){d.current="CLOSED"}},[o.open]);var h=u.useCallback(function(b){return Promise.resolve(n==null?void 0:n(b)).then(function(){b.type==="OPEN"&&cancelAnimationFrame(c.current)})},[n]),v=u.useCallback(function(b){return Promise.resolve(r==null?void 0:r(b)).then(function(){b.type==="CLOSE"&&(c.current=requestAnimationFrame(function(){return l(!1)}))})},[r]);return a?u.createElement(py,{"data-rsbs-portal":!0},u.createElement(zw,it({},o,{lastSnapRef:f,ref:e,initialState:d.current,onSpringStart:h,onSpringEnd:v}))):null});const qf=28,Zw="MapGoogle-module__root__Vi-sMl",qw="MapGoogle-module__mapContainer__OCCTIX",Kw="MapGoogle-module__balloon__4UVhuT",Jw="MapGoogle-module__details__4osNXn",Yw="MapGoogle-module__cluster__5qmRds",Xw="MapGoogle-module__overlay__g-nEoT",Qw="MapGoogle-module__mapControl__mzyTwr",eS="MapGoogle-module__geolocationControl__1exHgA",tS="MapGoogle-module__bottomSheet__avcBmY",nS="MapGoogle-module__locationViewContent__xwLeDh",rS="MapGoogle-module__locationViewHeader__maBLv0",iS="MapGoogle-module__deliveryDetailsViewContent__wH-RCe",oS="MapGoogle-module__deliveryDetailsViewHeader__4AKoBe",sS="MapGoogle-module__sheetSubmit__rPQG26",Ye={root:Zw,mapContainer:qw,balloon:Kw,details:Jw,cluster:Yw,overlay:Xw,mapControl:Qw,geolocationControl:eS,bottomSheet:tS,locationViewContent:nS,locationViewHeader:rS,deliveryDetailsViewContent:iS,deliveryDetailsViewHeader:oS,sheetSubmit:sS},Kf=({children:t,hideFooter:e,minSnapHeight:n,onSubmitClick:r,open:i,submitDisabled:o,submitLoading:s,...a})=>C.jsx(Zf,{expandOnContentDrag:!0,open:i,initialFocusRef:!1,defaultSnap:({snapPoints:l})=>Math.min(...l),blocking:!1,snapPoints:({footerHeight:l,headerHeight:c,maxHeight:f,minHeight:d})=>[n==null?d:c+l+n,f-qf],footer:e?null:C.jsx(Lt,{disabled:o,loading:s,variant:"primary",className:Ye.sheetSubmit,onClick:r,children:C.jsx(xn,{keyName:"choose",ns:"common"})}),sibling:C.jsx("div",{role:"presentation","data-rsbs-backdrop":"true",onClick:l=>{var c;l.stopPropagation(),l.preventDefault(),(c=a.onDismiss)==null||c.call(a)}}),children:C.jsx("div",{className:Ye.bottomSheet,children:t})}),aS={header:Ye.locationViewHeader,content:Ye.locationViewContent},lS=({clusterer:t,hideDetails:e,onPointClick:n,onPointSelected:r,point:i,selectedPoint:o,setOpenDetails:s})=>{const a=Gr("screenSm"),[l,c]=u.useState(null),f=()=>{s==null||s(!1),r==null||r(i)},d=()=>{r==null||r(null)},h=()=>{s==null||s(!0),r==null||r(i)},v=()=>{n==null||n(i),s==null||s(!1),r==null||r(null)},b=(o==null?void 0:o.uid)===i.uid,g=b?Ld:Mu,S=Kc({isSelectedPoint:b}),w=u.useMemo(()=>{let _;switch(!0){case(i.type===30&&!b):{_=Vn(yr.PinLocker,"--owl-color-primary");break}case(i.type!==30&&!b):{_=Vn(yr.PinPvz,"--owl-color-grey-80");break}case(i.type===30&&b):{_=Vn(yr.PinLocker,"--owl-color-success");break}case(i.type!==30&&b):{_=Vn(yr.PinPvz,"--owl-color-black");break}}return Ht(_,"Icon url is not defined"),{scaledSize:new google.maps.Size(...g),url:Hs(_)}},[b,g,i.type]),L=u.useMemo(()=>({lat:i.location.latitude,lng:i.location.longitude}),[i.location.latitude,i.location.longitude]),y=b&&S&&!!(l!=null&&l.getVisible());return C.jsxs(xc,{noClustererRedraw:!0,icon:w,position:L,clusterer:t,options:qc,onLoad:c,onClick:f,children:[a&&C.jsx(Kf,{minSnapHeight:200,open:y,onDismiss:d,onSubmitClick:v,children:C.jsx(Zc,{hideActions:!0,classes:aS,location:i,onClose:d})}),y&&!a&&C.jsx(Pc,{onCloseClick:d,children:C.jsx(Hm,{...i,hideDetails:e,className:Ye.balloon,onSubmit:v,onDetails:h})})]},i.uid)},uS=({hideDetails:t,onOpenDetails:e,onPointClick:n,onPointSelected:r,points:i,selectedPoint:o})=>C.jsx(Bg,{clusterClass:Ye.cluster,onClusteringEnd:()=>{setTimeout(()=>{const s=document.getElementsByClassName(Ye.cluster);for(const a of s)a.addEventListener("touchstart",es,{passive:!0})},100)},onUnmount:()=>{const s=document.getElementsByClassName(Ye.cluster);for(const a of s)a.removeEventListener("touchstart",es)},children:s=>C.jsx(C.Fragment,{children:i.map(a=>C.jsx(lS,{point:a,clusterer:s,hideDetails:t,selectedPoint:o,setOpenDetails:e,onPointClick:n,onPointSelected:r},a.uid))})}),cS=u.memo(uS),fS=({onOpenDetails:t,onPointClick:e,onPointSelected:n})=>{const{hideDetails:r,locale:i}=ot(),o=On(Np),s=Wt(c=>c.location),a=Dt(vc),l=JSON.stringify([o.length,i,a==null?void 0:a.place_id]);return C.jsx(cS,{points:o,hideDetails:r,selectedPoint:s,onOpenDetails:t,onPointClick:e,onPointSelected:n},l)},dS=u.memo(fS),Jf=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:42,height:42,fill:"none",viewBox:"0 0 42 42",...t},oe.createElement("rect",{width:42,height:42,fill:"#fff",rx:21}),oe.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"}),oe.createElement("rect",{width:41,height:41,x:.5,y:.5,stroke:"#1D3665",strokeOpacity:.1,rx:20.5})),hS="DeliveryBalloon-module__root__Nu90iy",pS="DeliveryBalloon-module__details__eqUTaI",gS="DeliveryBalloon-module__header__JVdyxN",vS="DeliveryBalloon-module__title__-zKKCt",mS="DeliveryBalloon-module__description__no5-ki",yS="DeliveryBalloon-module__actions__C-N0H-",bS="DeliveryBalloon-module__errorVariant__e6uhZl",wS="DeliveryBalloon-module__logo__62gC5h",Xt={root:hS,details:pS,header:gS,title:vS,description:mS,actions:yS,errorVariant:bS,logo:wS},SS=({SSR:t,address:e,className:n,hasCloseButton:r,hideDetails:i,onClose:o,onDetails:s,variant:a})=>{const l=a==="error",c=a==="default",f=t?"{ courier_balloon.title }":C.jsx(xn,{keyName:"title",ns:"courier_balloon"}),d=t?"{ courier_balloon.error_title }":C.jsx(xn,{keyName:"error_title",ns:"courier_balloon"}),h=t?"{ courier_balloon.error_description }":C.jsx(xn,{keyName:"error_description",ns:"courier_balloon"});return C.jsxs("div",{className:me(Xt.root,n,Xt[`${a}Variant`]),children:[C.jsxs("div",{className:Xt.header,children:[C.jsx(Jf,{className:Xt.logo}),C.jsx("span",{className:Xt.title,children:l?d:f}),r&&C.jsx($r,{onClick:o})]}),C.jsx("div",{className:Xt.description,children:l?h:e||"{{ properties.address }}"}),c&&!i&&C.jsx("div",{className:Xt.actions,children:C.jsx(Lt,{id:_u,as:"button",variant:"primary",className:Xt.details,onClick:s,children:t?"{ details }":C.jsx(xn,{keyName:"details",ns:"common"})})})]})},LS="Chip-module__root__zsoSyP",ES="Chip-module__active__BlTSFB",mu={root:LS,active:ES},yu=({active:t,children:e,className:n,...r})=>C.jsx("div",{...r,className:me(mu.root,n,{[mu.active]:t}),children:e}),xS="TextArea-module__root__8YFknR",CS={root:xS},bu=u.forwardRef(({className:t,inputRef:e,onBlur:n,onChange:r,onFocus:i,...o},s)=>{const a=u.useRef(null);u.useImperativeHandle(s,()=>({focus:()=>{var c,f;(c=a.current)==null||c.focus(),i&&i({target:{value:(f=a.current)==null?void 0:f.value}})},blur:()=>{var c,f;(c=a.current)==null||c.blur(),n&&n({target:{value:(f=a.current)==null?void 0:f.value}})},setValue:c=>{r&&r({target:{value:c}}),a.current&&(a.current.value=c)}}),[n,r,i]);const l=Xf(e,a);return C.jsx("textarea",{...o,ref:l,className:me(CS.root,t),onBlur:n,onFocus:i,onChange:r})}),_S=({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},MS="DeliveryDetailsView-module__title__azeoUr",OS="DeliveryDetailsView-module__logo__4zZtpM",kS="DeliveryDetailsView-module__header__oDE9He",PS="DeliveryDetailsView-module__content__6P27SY",RS="DeliveryDetailsView-module__section__2M3Qip",TS="DeliveryDetailsView-module__chips__KmYgha",AS="DeliveryDetailsView-module__actions__43XZ-V",DS="DeliveryDetailsView-module__submit__58LKBw",IS="DeliveryDetailsView-module__actionsHidden__SW-67b",NS="DeliveryDetailsView-module__commentSection__GlX1A2",jS="DeliveryDetailsView-module__comment__2pGG6h",ht={title:MS,logo:OS,header:kS,content:PS,section:RS,chips:TS,actions:AS,submit:DS,actionsHidden:IS,commentSection:NS,comment:jS},BS=u.forwardRef(({classes:t,hideActions:e,location:n,onChange:r,onClose:i,onSubmit:o},s)=>{var p;const{hideDeliveryTime:a,inputs:l,locale:c}=ot(),{t:f}=Nt(["details_modal","courier_balloon","common"]),d=u.useMemo(()=>_S({set:r,hideDeliveryTime:a}),[a,r]),[h,v]=u.useState(!1),[b,g]=u.useReducer(d,{comment:"",delivery_time:"",apartment_number:"",...n}),S=u.useCallback(async()=>{v(!0);try{Ht(n.address,"Address is required");const m=await hd({address:n.address,algorithm:10,service:10,language:c||Ou});if(!oc(m))return;const E=m==null?void 0:m.data.data,k={...b,address:E};return o==null||o(k),k}finally{v(!1)}},[c,n.address,o,b]);u.useImperativeHandle(s,()=>({submit:S}),[S]);const w=m=>()=>{g({payload:m,type:"SET_DELIVERY_TIME"})},L=m=>{g({payload:m.target.value,type:"SET_APARTMENT_NUMBER"})},y=m=>{g({payload:m.target.value,type:"SET_COMMENT"})},_=eo(l==null?void 0:l.apartment),x=eo(l==null?void 0:l.comment);return C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:me(ht.header,t==null?void 0:t.header),children:[C.jsx($r,{onClick:i}),C.jsxs("div",{className:ht.title,children:[C.jsx(Jf,{className:ht.logo}),C.jsx("span",{children:f("title",{ns:"courier_balloon"})})]})]}),C.jsxs("div",{className:me(ht.content,t==null?void 0:t.content),children:[C.jsxs("section",{className:ht.section,children:[C.jsxs("span",{children:[f("address"),":"]}),C.jsx("p",{children:n.address})]}),!a&&C.jsxs("section",{className:ht.section,children:[C.jsxs("span",{children:[f("delivery_time"),":"]}),C.jsxs("div",{className:ht.chips,children:[C.jsx(yu,{active:b.delivery_time==="8:00-13:00",onClick:w("8:00-13:00"),children:"8:00 - 13:00"}),C.jsx(yu,{active:b.delivery_time==="14:00-22:00",onClick:w("14:00-22:00"),children:"14:00 - 22:00"})]})]}),C.jsxs("section",{className:ht.section,children:[C.jsxs("span",{children:[f("apartment_number"),":"]}),C.jsx(bu,{..._,rows:1,onChange:L})]}),C.jsxs("section",{className:me(ht.section,ht.commentSection),children:[C.jsxs("span",{children:[f("comment"),":"]}),C.jsx(bu,{...x,className:ht.comment,onChange:y})]})]}),C.jsx("div",{className:me(ht.actions,{[ht.actionsHidden]:e}),children:C.jsx(Lt,{loading:h,disabled:!((p=b.meta)!=null&&p.valid)||h,variant:"primary",className:ht.submit,onClick:S,children:f("choose",{ns:"common"})})})]})}),Yf=u.memo(BS),US={header:Ye.deliveryDetailsViewHeader,content:Ye.deliveryDetailsViewContent},VS=({hideDeliveryTime:t,hideDetails:e,onPointClick:n,point:r,setDeliveryPoint:i,setOpenDetails:o})=>{const s=Kc({isSelectedPoint:!0}),a=u.useRef(null),[l,c]=u.useState(!1),[f,d]=u.useState({...r,comment:"",delivery_time:"",apartment_number:""});u.useEffect(()=>{d({...r,comment:"",delivery_time:"",apartment_number:""})},[r]);const[h,v]=u.useState(null),b=Gr("screenSm"),g=u.useMemo(()=>({lat:f.coords[0],lng:f.coords[1]}),[f.coords]),S=()=>{o==null||o(!0)},w=()=>{i==null||i(null)},L=u.useMemo(()=>({url:Hs(Vn(yr.PinHome,"--owl-color-success")),scaledSize:new google.maps.Size(...Mu)}),[]),y=async()=>{var m;try{c(!0);const E=await((m=a.current)==null?void 0:m.submit());if(!E)return;n==null||n(E),o==null||o(!1),i==null||i(null)}finally{c(!1)}},_=C.jsx(SS,{...f,hideDetails:e,hasCloseButton:b,variant:f.address?"default":"error",className:Ye.balloon,onDetails:S,onClose:w}),x=s&&!!(h!=null&&h.getVisible()),p=t?!!f.apartment_number:!!f.apartment_number&&!!f.delivery_time;return C.jsxs(xc,{noClustererRedraw:!0,icon:L,position:g,options:qc,onLoad:v,children:[b&&C.jsxs(Kf,{minSnapHeight:f.address?200:void 0,submitDisabled:!p||l,submitLoading:l,hideFooter:!f.address,open:x,onDismiss:w,onSubmitClick:y,children:[f.address&&C.jsx(Yf,{ref:a,hideActions:!0,classes:US,location:r,onChange:d,onClose:w}),!f.address&&_]}),!b&&x&&C.jsx(Pc,{onCloseClick:w,children:_})]})},FS=({children:t,className:e,...n})=>{const{disableDelivery:r,map:i}=ot(),o=u.useMemo(()=>{var a,l;return{lat:((a=i==null?void 0:i.center)==null?void 0:a[0])??Go[0],lng:((l=i==null?void 0:i.center)==null?void 0:l[1])??Go[1]}},[i==null?void 0:i.center]),s=u.useCallback(async a=>{const{latLng:l}=a;if(!l||r)return;xe.getState().setDetailsOpen(!1),Wt.getState().setSelectedLocation(null);const c=[l.lat(),l.lng()];console.debug("[OmnicLocationsWidget::mapClick]",c);try{await Dt.getState().setPlaceAndPoint(c)}catch{vt.getState().setDeliverPoint({address:null,coords:c})}},[r]);return C.jsx(bg,{zoom:i==null?void 0:i.initialZoom,center:o,options:cy,mapContainerClassName:me(Ye.root,e),onClick:s,...n,children:t})},zS=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},oe.createElement("rect",{width:2,height:20,x:9,fill:"#fff",rx:1}),oe.createElement("rect",{width:2,height:20,x:20,y:9,fill:"#fff",rx:1,transform:"rotate(90 20 9)"}),oe.createElement("circle",{cx:10,cy:10,r:8,fill:"#fff"}),oe.createElement("circle",{cx:10,cy:10,r:6,fill:"currentcolor"}),oe.createElement("circle",{cx:10,cy:10,r:4,fill:"#fff"})),$S=t=>{const e=document.createElement("div"),n=document.createElement("div");e.classList.add(Ye.mapControl),n.classList.add(Ye.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)})},HS=t=>{const e=document.createElement("div");e.classList.add(Ye.mapControl),e.classList.add(Ye.geolocationControl),e.innerHTML=pd.renderToString(C.jsx(zS,{})),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{$s(async n=>{const{latitude:r,longitude:i}=n.coords,o=[r,i];await Dt.getState().setPlaceAndPoint(o)})})},WS=({className:t})=>{const e=ln(),n=xe(Iu),r=xe(rh),i=On(ac),o=vt(Is),{disableGeolocation:s,hideDeliveryTime:a,hideDetails:l,hideMapControls:c,onPointClick:f}=ot(),d=u.useCallback(S=>{console.debug("[OmnicLocationsWidget::loadMap]",S),xe.getState().setMap(S),c||($S(S),s||HS(S))},[s,c]),h=u.useCallback(()=>{console.debug("[OmnicLocationsWidget::unmountMap]"),xe.getState().setMap(null)},[]),v=u.useCallback(()=>{if(!n)return;const S=n==null?void 0:n.getBounds();S&&(console.debug("[OmnicLocationsWidget::changeBounds]",S),On.getState().loadNext([[S.getSouthWest().lat(),S.getNorthEast().lat()],[S.getSouthWest().lng(),S.getNorthEast().lng()]],e))},[e,n]),b=u.useCallback(async S=>{if(vt.getState().setDeliverPoint(null),Wt.getState().setSelectedLocation(S),!S)return;const w=[S.location.latitude,S.location.longitude];console.debug("[OmnicLocationsWidget::selectPoint]",w),await Dt.getState().setPlace(w)},[]),g=u.useCallback(()=>{console.debug("[OmnicLocationsWidget::tilesLoaded]")},[]);return C.jsxs("div",{className:me(Ye.mapContainer,t),children:[C.jsxs(FS,{onIdle:v,onLoad:d,onUnmount:h,onTilesLoaded:g,children:[o&&C.jsx(VS,{hideDeliveryTime:a,hideDetails:l,point:o,setOpenDetails:xe.getState().setDetailsOpen,setDeliveryPoint:vt.getState().setDeliverPoint,onPointClick:f}),C.jsx(dS,{onPointClick:f,onOpenDetails:xe.getState().setDetailsOpen,onPointSelected:b})]}),(i||r)&&C.jsx(mc,{className:Ye.overlay,children:C.jsx(Vi,{})})]})},GS=u.memo(WS),ZS=t=>({google:GS})[t];function Xf(...t){return u.useCallback(e=>{for(const n of t)typeof n=="function"?n(e):n&&typeof n=="object"&&(n.current=e)},t)}const eo=t=>{const e=u.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}},qS=()=>{throw new Error("useMediaQuery is a client-only hook")};function KS(t){const e=u.useCallback(r=>{const i=window.matchMedia(t);return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[t]),n=()=>window.matchMedia(t).matches;return u.useSyncExternalStore(e,n,qS)}const JS="768px",YS="1024px",XS="1280px",QS="1536px",eL={screenSm:JS,screenMd:YS,screenLg:XS,screenXl:QS};function Gr(t){return KS(`(max-width: calc(${eL[t]} - 1px))`)}const tL=(t,e,n)=>{const{disableGeolocation:r}=n??{},i=xe(Iu);u.useEffect(()=>{i&&(console.debug("[OmnicWidgetLocations::setMapLoaded]",i),xe.getState().setLoaded())},[i]);const o=t[0],s=t[1];u.useEffect(()=>{if(!i)return;const a=[o,s],l=async()=>{console.debug("[OmnicWidgetLocations::setFallbackCenter]",a),Dt.getState().setPlace(a,[],"country")};if(r){l();return}$s(async c=>{const{latitude:f,longitude:d}=c.coords,h=[f,d];console.debug("[OmnicWidgetLocations::setGeoPosition]",h),await Dt.getState().setPlace(h,[],"country")},()=>l())},[o,s,i,e,r])},Qf=Sm().use(lm()).use(Qv()).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"}),nL=t=>{u.useEffect(()=>{t&&(Qf.changeLanguage(t),Bi.setLanguage(t))},[t])},rL=t=>{u.useEffect(()=>{if(t){const e=Object.keys(t);for(const n of e){const r=t[n];r&&lo(`--owl-color-${n}`,r)}}},[t])},iL=t=>{u.useEffect(()=>{t&&t!==void 0&&lo("--owl-button-radius",`${t}px`)},[t])},oL=t=>{u.useEffect(()=>{t&&t!==void 0&&lo("--owl-font",t)},[t])},sL={open:!1},aL=t=>t.open,Ln=cn(t=>({...sL,toggle(e){t(n=>({open:e??!n.open}))}})),lL=t=>{const e=t==="selector";u.useEffect(()=>{e&&Ln.getState().toggle(!0)},[e])},uL=({locale:t})=>{const[e,n]=u.useState(!1);return u.useEffect(()=>{n(!1)},[t]),u.useEffect(()=>{e||n(!0)},[e]),console.debug("[OmnicWidgetLocations::remount]",{locale:t,mounted:e}),e},cL=({children:t})=>{const{font:e,locale:n,palette:r,radius:i,startScreen:o}=ot();return oL(e),nL(n),rL(r),iL(i),lL(o),C.jsx(C.Fragment,{children:t})},fL=({children:t})=>{const{disableGeolocation:e,map:n}=ot();return Ht(n==null?void 0:n.center,"Map center is required"),Ht(n==null?void 0:n.initialZoom,"Map initial zoom is required"),tL(n.center,n.initialZoom,{disableGeolocation:e}),C.jsx(C.Fragment,{children:t})},dL=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:28,fill:"none",viewBox:"0 0 24 28",...t},oe.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"})),hL=()=>{Ln.getState().toggle(!0),xe.getState().setDetailsOpen(!1),vt.getState().setDeliverPoint(null),Wt.getState().setSelectedLocation(null)},pL="CurrentLocation-module__root__AeQCGT",gL="CurrentLocation-module__icon__459m9q",vL="CurrentLocation-module__text__w-9v28",Fo={root:pL,icon:gL,text:vL},ed=({className:t})=>{const{t:e}=Nt("current_location"),n=Dt(vc),r=Dt(rg);return C.jsxs("div",{role:"presentation",className:me(Fo.root,t),onClick:hL,children:[C.jsx(dL,{className:Fo.icon}),C.jsxs("span",{className:Fo.text,children:[!n&&e("choose_from_map"),n&&`${(r==null?void 0:r.long_name)??n.formatted_address}`]})]})},mL=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:123,height:32,fill:"none",viewBox:"0 0 123 32",...t},oe.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"})),yL=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:192,height:20,fill:"none",viewBox:"0 0 192 20",...t},oe.createElement("path",{fill:"#000",d:"M4.1 20a3.966 3.966 0 0 1-2.05-.555 4.15 4.15 0 0 1-1.496-1.498A3.982 3.982 0 0 1 0 15.895V4.133c0-.758.185-1.442.554-2.052A4.15 4.15 0 0 1 2.05.583 3.966 3.966 0 0 1 4.1.028h11.743c.738 0 1.412.185 2.022.555A4.15 4.15 0 0 1 19.36 2.08c.388.61.582 1.294.582 2.052v11.762a3.83 3.83 0 0 1-.582 2.052 4.15 4.15 0 0 1-1.495 1.498c-.61.37-1.284.555-2.022.555H4.099Zm.193-4.327h11.3V4.355h-11.3v11.318ZM22.992 20V.028h4.432L34.182 8.1l6.73-8.072h4.46V20H41.05V6.602l-6.87 8.21-6.896-8.182V20h-4.293Zm25.696 0V.028h4.431l11.162 13.315V.028h4.348V20h-4.431L52.98 6.63V20h-4.294Zm22.352 0V.028h4.238V20H71.04Zm14.963 0V0h4.293v15.673h12.554V20H86.003Zm18.489 0V0h4.293v15.673h12.554V20h-16.847Zm18.717 0V4.133c0-.758.185-1.442.554-2.052a4.156 4.156 0 0 1 1.496-1.498 3.966 3.966 0 0 1 2.049-.555h11.716c.757 0 1.441.185 2.05.555.628.37 1.126.869 1.495 1.498.388.61.582 1.294.582 2.052V20h-4.348v-6.435h-11.301V20h-4.293Zm4.293-10.763h11.301V4.355h-11.301v4.882ZM146.307 20V.028h4.432l6.758 8.072 6.73-8.072h4.459V20h-4.32V6.602l-6.869 8.21L150.6 6.63V20h-4.293Zm25.751 0V4.133c0-.758.185-1.442.554-2.052a4.148 4.148 0 0 1 1.496-1.498 3.966 3.966 0 0 1 2.049-.555h11.716c.757 0 1.44.185 2.05.555.628.37 1.126.869 1.496 1.498A3.75 3.75 0 0 1 192 4.133V20h-4.348v-6.435h-11.301V20h-4.293Zm4.293-10.763h11.301V4.355h-11.301v4.882Z"})),bL="Header-module__root__Pe4MYp",wL="Header-module__nav__wtnkmT",SL="Header-module__navItem__-Fy63Z",LL="Header-module__logo__xO2bWO",xr={root:bL,nav:wL,navItem:SL,logo:LL},EL={llama:yL,default:mL},xL=()=>{const{hideLogo:t,logo:e="default"}=ot();if(t)return null;const n=EL[e];return C.jsx("div",{className:xr.logo,children:C.jsx(n,{})})},CL=({className:t})=>{const{t:e}=Nt("header"),{disableDelivery:n}=ot(),r=xe(Qd),i=vt(Is);u.useEffect(()=>{i?xe.getState().setMode("location_delivery"):xe.getState().setMode("self_pickup")},[i]);const o=()=>{vt.getState().setDeliverPoint(null),xe.getState().setMode("self_pickup")},s=()=>{vt.getState().setDeliverPoint(null),xe.getState().setMode("location_delivery")},a=r==="self_pickup",l=r==="location_delivery";return C.jsxs("div",{className:me(xr.root,t),children:[C.jsx(xL,{}),C.jsxs("nav",{className:xr.nav,children:[!n&&C.jsx(Lt,{as:"link",className:xr.navItem,variant:a?"primary":"secondary",onClick:o,children:e("self_pickup")}),!n&&C.jsx(Lt,{as:"link",className:xr.navItem,variant:l?"primary":"secondary",onClick:s,children:e("courier_delivery")}),C.jsx(ed,{})]})]})},_L=u.memo(CL),ML={open:!1},Yn=cn(t=>({...ML,toggle(e){xe.getState().setDetailsOpen(!1),vt.getState().setDeliverPoint(null),Wt.getState().setSelectedLocation(null),t(n=>({open:e??!n.open}))}})),OL="Layout-module__root__qzPL-f",kL="Layout-module__headerHidden__JEN-d0",PL="Layout-module__sidebarHidden__x017O3",RL="Layout-module__sidebarOpen__IZnIjs",bi={root:OL,headerHidden:kL,sidebarHidden:PL,sidebarOpen:RL},TL=({children:t})=>{const{hideFilters:e,hideHeader:n}=ot(),r=Yn(i=>i.open);return C.jsx("div",{className:me(bi.root,{[bi.sidebarOpen]:r,[bi.headerHidden]:n,[bi.sidebarHidden]:e}),children:t})},aa=()=>C.jsx(mc,{children:C.jsx(Vi,{})}),AL=({children:t})=>{const e=On(jp);return On(ac)&&!e?C.jsx(aa,{}):C.jsx(C.Fragment,{children:t})};var td={},po={},nd={exports:{}},DL="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",IL=DL,NL=IL;function rd(){}function id(){}id.resetWarningCache=rd;var jL=function(){function t(r,i,o,s,a,l){if(l!==NL){var c=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 c.name="Invariant Violation",c}}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:id,resetWarningCache:rd};return n.PropTypes=n,n};nd.exports=jL();var BL=nd.exports,go={},Xn={};Object.defineProperty(Xn,"__esModule",{value:!0});Xn.loadGoogleMapScript=Xn.isBrowser=void 0;var od=typeof window<"u"&&window.document;Xn.isBrowser=od;var UL=function(e,n){if(!od||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)})};Xn.loadGoogleMapScript=UL;var vo={};Object.defineProperty(vo,"__esModule",{value:!0});vo.GOOGLE_MAP_SCRIPT_BASE_URL=void 0;var VL="https://maps.googleapis.com/maps/api/js";vo.GOOGLE_MAP_SCRIPT_BASE_URL=VL;function Ii(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ii=function(n){return typeof n}:Ii=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ii(t)}Object.defineProperty(go,"__esModule",{value:!0});go.default=GL;var pt=zL(u),zo=Xn,FL=vo;function sd(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(sd=function(i){return i?n:e})(t)}function zL(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||Ii(t)!=="object"&&typeof t!="function")return{default:t};var n=sd(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 wu(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 Su(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?wu(Object(n),!0).forEach(function(r){$L(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function $L(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function HL(t,e){if(t==null)return{};var n=WL(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 WL(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 GL(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 c=l.types,f=c===void 0?["(cities)"]:c,d=l.componentRestrictions,h=l.fields,v=h===void 0?["address_components","geometry.location","place_id","formatted_address"]:h,b=l.bounds,g=HL(l,["types","componentRestrictions","fields","bounds"]),S=t.googleMapsScriptBaseUrl,w=S===void 0?FL.GOOGLE_MAP_SCRIPT_BASE_URL:S,L=t.language,y=(0,pt.useRef)(null),_=(0,pt.useRef)(null),x=(0,pt.useRef)(null),p=(0,pt.useRef)(null),m=L?"&language=".concat(L):"",E="".concat(w,"?libraries=").concat(o,"&key=").concat(r).concat(m),k=(0,pt.useCallback)(function(){return(0,zo.loadGoogleMapScript)(w,E)},[w,E]);return(0,pt.useEffect)(function(){var M=Su(Su({},g),{},{fields:v,types:f,bounds:b});if(d&&(M.componentRestrictions=d),!(x.current||!y.current||!zo.isBrowser)){e&&!e.current&&(e.current=y.current);var O=function(){var A;if(typeof google>"u")return console.error("Google has not been found. Make sure your provide apiKey prop.");if(!((A=google.maps)!==null&&A!==void 0&&A.places))return console.error("Google maps places API must be loaded.");if(!y.current instanceof HTMLInputElement)return console.error("Input ref must be HTMLInputElement.");x.current=new google.maps.places.Autocomplete(y.current,M),x.current&&(_.current=x.current.addListener("place_changed",function(){n&&x&&x.current&&n(x.current.getPlace(),y.current,x.current)}))};return r?k().then(function(){return O()}):O(),function(){return _.current?_.current.remove():void 0}}},[]),(0,pt.useEffect)(function(){var M;!(pt.default!==null&&pt.default!==void 0&&(M=pt.default.version)!==null&&M!==void 0&&M.startsWith("18"))&&zo.isBrowser&&window.MutationObserver&&y.current&&y.current instanceof HTMLInputElement&&(p.current=new MutationObserver(function(){p.current.disconnect(),y.current&&(y.current.autocomplete=a)}),p.current.observe(y.current,{attributes:!0,attributeFilter:["autocomplete"]}))},[a]),(0,pt.useEffect)(function(){x.current&&x.current.setFields(v)},[v]),(0,pt.useEffect)(function(){x.current&&x.current.setBounds(b)},[b]),(0,pt.useEffect)(function(){x.current&&x.current.setComponentRestrictions(d)},[d]),(0,pt.useEffect)(function(){x.current&&x.current.setOptions(g)},[g]),{ref:y,autocompleteRef:x}}function Ni(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ni=function(n){return typeof n}:Ni=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ni(t)}Object.defineProperty(po,"__esModule",{value:!0});po.default=void 0;var As=qL(u),He=ad(BL),ZL=ad(go);function ad(t){return t&&t.__esModule?t:{default:t}}function ld(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(ld=function(i){return i?n:e})(t)}function qL(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||Ni(t)!=="object"&&typeof t!="function")return{default:t};var n=ld(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 to(){return to=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},to.apply(this,arguments)}function KL(t,e){if(t==null)return{};var n=JL(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 JL(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 ud(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,c=KL(t,["onPlaceSelected","apiKey","libraries","inputAutocompleteValue","options","googleMapsScriptBaseUrl","refProp","language"]),f=(0,ZL.default)({ref:a,googleMapsScriptBaseUrl:s,onPlaceSelected:e,apiKey:n,libraries:r,inputAutocompleteValue:i,options:o,language:l}),d=f.ref;return As.default.createElement("input",to({ref:d},c))}ud.propTypes={apiKey:He.default.string,libraries:He.default.arrayOf(He.default.string),ref:He.default.oneOfType([He.default.func,He.default.shape({current:He.default.any})]),googleMapsScriptBaseUrl:He.default.string,onPlaceSelected:He.default.func,inputAutocompleteValue:He.default.string,options:He.default.shape({componentRestrictions:He.default.object,bounds:He.default.object,location:He.default.object,offset:He.default.number,origin:He.default.object,radius:He.default.number,sessionToken:He.default.object,types:He.default.arrayOf(He.default.string)}),language:He.default.string};var YL=(0,As.forwardRef)(function(t,e){return As.default.createElement(ud,to({},t,{refProp:e}))});po.default=YL;(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(po),n=r(go);function r(i){return i&&i.__esModule?i:{default:i}}})(td);var cd=td;const XL="Aside-module__root__EotK2f",QL="Aside-module__open__Zwmbs5",e1="Aside-module__overlay__slLdHF",t1="Aside-module__container__28P4wq",wi={root:XL,open:QL,overlay:e1,container:t1},n1=({children:t,className:e,open:n})=>C.jsxs("div",{className:me(wi.root,e,{[wi.open]:n}),children:[C.jsx("div",{className:wi.overlay}),C.jsx("div",{className:wi.container,children:t})]}),r1="Input-module__root__TF9IiD",i1="Input-module__endAdornment__m40K5R",o1="Input-module__input__505b7i",s1="Input-module__startAdornment__D-sJ0N",a1="Input-module__label__gmqtsf",l1="Input-module__inputContainer__vubIa-",Bn={root:r1,endAdornment:i1,input:o1,startAdornment:s1,label:a1,inputContainer:l1},fd=u.forwardRef(({className:t,endAdornment:e,inputRef:n,label:r,onBlur:i,onChange:o,startAdornment:s,...a},l)=>{const c=u.useId(),f=u.useRef(null);u.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=Xf(n,f);return C.jsxs("label",{htmlFor:a.id??c,className:me(Bn.root,t),children:[r&&C.jsx("span",{className:Bn.label,children:r}),C.jsxs("div",{className:Bn.inputContainer,children:[s&&C.jsx("div",{className:Bn.startAdornment,children:s}),C.jsx("input",{...a,ref:d,id:a.id??c,className:Bn.input,onChange:o,onBlur:i}),e&&C.jsx("div",{className:Bn.endAdornment,children:e})]})]})}),u1="LocationAside-module__submit__CSKcqi",c1="LocationAside-module__container__S1NejR",f1="LocationAside-module__selector__hl74ke",d1="LocationAside-module__label__0Zk8at",h1="LocationAside-module__header__N1wgyn",p1="LocationAside-module__close__VsE88z",Si={submit:u1,container:c1,selector:f1,label:d1,header:h1,close:p1},g1=u.forwardRef((t,e)=>{const{t:n}=Nt(["location_aside","common"]),r=Ln(aL),{country:i,hideCloseButtonOnLocationScreen:o,inputs:s,onCloseLocationSelector:a,onLocationSelect:l}=ot(),c=u.useRef(null),[f,d]=u.useState("");u.useImperativeHandle(e,()=>({open:()=>Ln.getState().toggle(!0),close:()=>Ln.getState().toggle(!1)}),[]);const h=async L=>{Ln.getState().toggle(!1),await Dt.getState().setPlace(L),l==null||l(L),L!=null&&L.formatted_address&&d(L==null?void 0:L.formatted_address)},v=()=>{Ln.getState().toggle(!1),a==null||a()},b=i?{componentRestrictions:{country:i}}:void 0,g=L=>{d(L.target.value)},{ref:S}=cd.usePlacesWidget({libraries:["places"],options:b,onPlaceSelected:h,apiKey:"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA",inputAutocompleteValue:f}),w=eo(s==null?void 0:s.city);return C.jsx(n1,{open:r,children:C.jsx("div",{ref:c,className:Si.container,children:C.jsxs("div",{className:Si.selector,children:[C.jsxs("div",{className:Si.header,children:[C.jsx("div",{className:Si.label,children:n("choose_city")}),!o&&C.jsx($r,{position:"relative",onClick:v})]}),C.jsx(fd,{...w,inputRef:S,value:f,placeholder:n("placeholder"),onChange:g})]})})})}),v1=u.memo(g1),m1=({children:t})=>{const{locale:e}=ot(),{isLoaded:n}=Ec({language:e,libraries:xd,googleMapsApiKey:"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA"});return n?C.jsx(C.Fragment,{children:t}):C.jsx(aa,{})},y1=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},oe.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"})),b1=({className:t})=>{const{t:e}=Nt("location_selector"),{country:n,inputs:r,onLocationSelect:i}=ot(),[o,s]=u.useState(""),[a,l]=u.useState(!1),c=[],f=n?{componentRestrictions:{country:n},types:c}:{types:c},d=async L=>{await Dt.getState().setPlaceAndPoint(L),i==null||i(L)},{ref:h}=cd.usePlacesWidget({libraries:["places"],options:f,onPlaceSelected:d,inputAutocompleteValue:o}),v=L=>{a&&xe.getState().setBlurred(!!L.target.value),s(L.target.value)},b=()=>{o&&xe.getState().setBlurred(!0),xe.getState().setDetailsOpen(!1),vt.getState().setDeliverPoint(null),Wt.getState().setSelectedLocation(null),l(!0)},g=()=>{xe.getState().setBlurred(!1),l(!1)},S=L=>{L.key==="Enter"&&L.preventDefault()},w=eo(r==null?void 0:r.address);return C.jsx(fd,{...w,inputRef:h,value:o,className:t,endAdornment:C.jsx(y1,{}),placeholder:e("placeholder"),onChange:v,onFocus:b,onBlur:g,onKeyDown:S})},w1=({className:t})=>xe(nh)?C.jsx(b1,{className:t}):null,S1=u.memo(w1),L1="DeliveryDetailsModal-module__root__qwKnjX",E1={root:L1},x1=({className:t,location:e,onClose:n,onSubmit:r})=>C.jsx("div",{className:me(E1.root,t),children:C.jsx(Yf,{location:e,onClose:n,onSubmit:r})}),C1="LocationDetailsModal-module__root__PyRnLM",_1={root:C1},M1=({className:t,location:e,onClose:n,onSubmit:r})=>{const i=()=>{r==null||r(e)};return C.jsx("div",{className:me(_1.root,t),children:C.jsx(Zc,{location:e,onClose:n,onSubmit:i})})},O1="MapContainer-module__root__1Os6Q-",k1="MapContainer-module__mapWrapper__Cwe7qC",P1="MapContainer-module__wrapperBlurred__04NN2L",R1="MapContainer-module__locationSelector__Pr1zS-",T1="MapContainer-module__filterButton__CW3Qv7",A1="MapContainer-module__sidebarOpen__lGMVrJ",D1="MapContainer-module__filterIcon__T01XsJ",I1="MapContainer-module__details__gM8LWX",At={root:O1,mapWrapper:k1,wrapperBlurred:P1,locationSelector:R1,filterButton:T1,sidebarOpen:A1,filterIcon:D1,details:I1},N1=()=>{const{onPointClick:t}=ot(),e=xe(Ns),n=Wt(oh),r=vt(Is),i=u.useCallback(()=>{xe.getState().setDetailsOpen(!1)},[]),o=u.useCallback(s=>{t==null||t(s),xe.getState().setDetailsOpen(!1),Wt.getState().setSelectedLocation(null),vt.getState().setDeliverPoint(null)},[t]);return C.jsxs(C.Fragment,{children:[(r==null?void 0:r.address)&&e&&C.jsx(x1,{location:r,className:At.details,onClose:i,onSubmit:o}),n&&e&&C.jsx(M1,{location:n,className:At.details,onClose:i,onSubmit:o})]})},j1=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:60,height:40,fill:"none",viewBox:"0 0 60 40",...t},oe.createElement("path",{d:"M0 0h52a8 8 0 0 1 8 8v24a8 8 0 0 1-8 8H0V0Z"}),oe.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"})),B1=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:28,height:28,fill:"none",viewBox:"0 0 28 28",...t},oe.createElement("rect",{width:28,height:28,fill:"#333",rx:4}),oe.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"})),U1=()=>{const t=Yn(i=>i.open),e=Yn(i=>i.toggle),n=Gr("screenSm"),r=()=>{e(!0)};return C.jsxs("div",{role:"presentation",className:me(At.filterButton,{[At.sidebarOpen]:t}),onClick:n?void 0:r,children:[n&&C.jsx(ed,{}),n?C.jsx(B1,{className:At.filterIcon,onClick:r}):C.jsx(j1,{className:At.filterIcon})]})},V1=({children:t,className:e})=>{const{hideFilters:n,hideSearchInput:r}=ot(),i=xe(th),o=xe(Ns);return C.jsxs("div",{className:me(At.root,e),children:[!r&&!o&&C.jsx(S1,{className:At.locationSelector}),!n&&C.jsx(U1,{}),C.jsx("div",{className:me(At.mapWrapper,{[At.wrapperBlurred]:i}),children:t}),C.jsx(N1,{})]})},F1=u.memo(V1),z1="Separator-module__root__eQtZey",$1={root:z1},$o=({className:t,...e})=>C.jsx("hr",{className:me($1.root,t),...e}),H1="Sidebar-module__root__4j1MA3",W1="Sidebar-module__closeButton__HLXy1c",G1="Sidebar-module__open__mqQXF6",Z1="Sidebar-module__header__Afp6uz",q1="Sidebar-module__typeFilter__GN46u9",K1="Sidebar-module__separator__6I4QoJ",J1="Sidebar-module__withRightPadding__2u1Ina",Y1="Sidebar-module__sheetContent__SaoncI",X1="Sidebar-module__doneButton__4aeaSD",zt={root:H1,closeButton:W1,open:G1,header:Z1,typeFilter:q1,separator:K1,withRightPadding:J1,sheetContent:Y1,doneButton:X1},Q1=()=>{const{t}=Nt("common"),e=Gr("screenSm"),n=Yn(i=>i.toggle),r=()=>{n(!1)};return C.jsxs("div",{className:zt.header,children:[e&&C.jsx("div",{role:"presentation",className:zt.doneButton,onClick:r,children:t("done")}),!e&&C.jsx($r,{className:zt.closeButton,onClick:r})]})},eE="Radio-module__root__7ElY2W",tE="Radio-module__label__c-sYW3",Lu={root:eE,label:tE},nE=({className:t,label:e,labelProps:n={},...r})=>{const i=u.useId(),{className:o,...s}=n;return C.jsxs("label",{htmlFor:i,className:me(Lu.label,o),...s,children:[C.jsx("input",{id:i,type:"radio",className:me(Lu.root,t),...r}),e]})},Wn=t=>C.jsx(nE,{...t,type:"checkbox"}),rE="RadioGroup-module__root__ewZw-x",iE="RadioGroup-module__body__k8BJAs",oE="RadioGroup-module__legend__tcfV7q",Ho={root:rE,body:iE,legend:oE},dd=({children:t,className:e,label:n,onChange:r,value:i,...o})=>C.jsxs("div",{className:me(Ho.root,e),...o,children:[n&&C.jsx("span",{className:Ho.legend,children:n}),C.jsx("div",{className:Ho.body,children:u.Children.map(t,s=>u.isValidElement(s)?u.cloneElement(s,{checked:!!(i!=null&&i[s.props.value]),onChange:a=>r==null?void 0:r({...i,[a.target.value]:a.target.checked})}):null)})]}),sE=({className:t,onChange:e})=>{const{t:n}=Nt("receive_filter"),r=ln(uh);return C.jsxs(dd,{value:r,label:n("title"),className:t,onChange:e,children:[C.jsx(Wn,{name:"receive",value:Ot.DressingRoom,label:n("dressing_room")}),C.jsx(Wn,{name:"receive",value:Ot.CheckOrder,label:n("check_order")}),C.jsx(Wn,{name:"receive",value:Ot.PayByCash,label:n("pay_by_cash")})]})},aE=u.memo(sE),lE=({className:t,onChange:e})=>{const{t:n}=Nt("send_filter"),r=ln(lh);return C.jsxs(dd,{className:t,value:r,label:n("title"),onChange:e,children:[C.jsx(Wn,{name:"send",value:kt.Return,label:n("sending_returns")}),C.jsx(Wn,{name:"send",value:kt.Shipping,label:n("shipping")}),C.jsx(Wn,{name:"send",value:kt.Payment,label:n("payment")})]})},uE=u.memo(lE),cE="TypeFilter-module__root__WH5EQV",fE="TypeFilter-module__button__f0mSfo",Li={root:cE,button:fE},dE=({className:t,onChange:e,value:n})=>{const{t:r}=Nt("type_filter"),i=o=>()=>e==null?void 0:e(o);return C.jsxs("div",{className:me(Li.root,t),children:[C.jsx(Lt,{className:Li.button,variant:n===Ft.All?"primary":"secondary",onClick:i(Ft.All),children:r("all")}),C.jsx(Lt,{className:Li.button,variant:n===Ft.PostOffice?"primary":"secondary",onClick:i(Ft.PostOffice),children:r("post_office")}),C.jsx(Lt,{className:Li.button,variant:n===Ft.PickPoint?"primary":"secondary",onClick:i(Ft.PickPoint),children:r("pick_point")})]})},hE=({className:t,onChange:e})=>{const n=ln(ah);return C.jsx(dE,{value:n,className:t,onChange:e})},pE=u.memo(hE),gE=({className:t})=>{const e=Gr("screenSm"),n=Yn(l=>l.open),r=u.useCallback(l=>ln.getState().setFilter({type:l}),[]),i=u.useCallback(l=>ln.getState().setFilter({send:l}),[]),o=u.useCallback(l=>ln.getState().setFilter({receive:l}),[]),s=u.useCallback(()=>Yn.getState().toggle(!1),[]),a=C.jsxs(C.Fragment,{children:[C.jsx(Q1,{}),C.jsxs("div",{className:zt.withRightPadding,children:[C.jsx(pE,{className:zt.typeFilter,onChange:r}),C.jsx($o,{className:zt.separator}),C.jsx(aE,{onChange:o}),C.jsx($o,{}),C.jsx(uE,{onChange:i}),C.jsx($o,{})]})]});return e?C.jsx(Zf,{initialFocusRef:!1,open:n,snapPoints:({maxHeight:l})=>l-qf,onDismiss:s,children:C.jsx("div",{className:zt.sheetContent,children:a})}):C.jsx("div",{className:me(zt.root,t,{[zt.open]:n}),children:a})},vE="App-module__map__Kf-2JS",mE="App-module__sidebar__ORIzGk",yE="App-module__header__bgP9DA",Wo={map:vE,sidebar:mE,header:yE},bE=({config:t,options:e})=>{const n=Qp(t),{INN:r,hideFilters:i,hideHeader:o,locale:s,map:a}=n;Ht(r,"INN is required"),eg(r,e),Ht(a==null?void 0:a.provider,"Map provider is required");const l=ZS(a.provider);Bp();const c=uL({locale:s});return C.jsx(ku.Provider,{value:n,children:C.jsx(fL,{children:C.jsx(cL,{children:C.jsx(Em,{tolgee:Qf,fallback:C.jsx(aa,{}),children:c&&C.jsx(m1,{children:C.jsx(AL,{children:C.jsxs(TL,{children:[!o&&C.jsx(_L,{className:Wo.header}),!i&&C.jsx(gE,{className:Wo.sidebar}),C.jsx(F1,{className:Wo.map,children:C.jsx(l,{})}),C.jsx(v1,{})]})})})})})})})},hd=async t=>jr.request({baseURL:"https://api.geo-data.omnic.solutions/api/1.0/",method:"POST",url:"normalize/address",data:t,headers:{Authorization:"Token 9877f9631b2e30570cc1c5aa8c740b0c912efe99a8b6c45c21cf4bd394adc7e9"}});exports.EReceiveFilter=Ot;exports.ESendFilter=kt;exports.ETypeFilter=Ft;exports.Widget=bE;exports.createPointsIterator=Qo;exports.fetchPointsRequest=Xo;exports.fromHoursMinutesToMinutes=ch;exports.fromMinutesToHoursMinutes=fh;exports.getAddressFormGeocode=ns;exports.getBoundsFromPoint=dh;exports.getCurrentPosition=$s;exports.getNormalizedAddress=hd;exports.getPropertyValue=sc;exports.isCoordinates=ts;exports.isDeliveryPoint=Dp;exports.isHttpSuccess=oc;exports.isPlaceId=ic;exports.replaceSvgCurrentColor=Vn;exports.setWidgetCSSProperty=lo;exports.stopImmediatePropagation=es;exports.svgStringToBase64URL=Hs;
|
|
89
|
+
*/function tu(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 nu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?tu(Object(n),!0).forEach(function(r){nw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function nw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ru=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()}}}(),rw=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},iw=function(e){return e.key==="Escape"||e.key==="Esc"||e.keyCode===27},ow=function(e){return e.key==="Tab"||e.keyCode===9},iu=function(e){return setTimeout(e,0)},ou=function(e,n){var r=-1;return e.every(function(i,o){return n(i)?(r=o,!1):!0}),r},vr=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},pi=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},sw=function(e,n){var r=(n==null?void 0:n.document)||document,i=nu({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(h,b,x){return h&&h[b]!==void 0?h[b]:i[x||b]},l=function(h){return o.containerGroups.findIndex(function(b){var x=b.container,k=b.tabbableNodes;return x.contains(h)||k.find(function(M){return M===h})})},c=function(h){var b=i[h];if(typeof b=="function"){for(var x=arguments.length,k=new Array(x>1?x-1:0),M=1;M<x;M++)k[M-1]=arguments[M];b=b.apply(void 0,k)}if(b===!0&&(b=void 0),!b){if(b===void 0||b===!1)return b;throw new Error("`".concat(h,"` was specified but was not a node, or did not return a node"))}var P=b;if(typeof b=="string"&&(P=r.querySelector(b),!P))throw new Error("`".concat(h,"` as selector refers to no known node"));return P},f=function(){var h=c("initialFocus");if(h===!1)return!1;if(h===void 0)if(l(r.activeElement)>=0)h=r.activeElement;else{var b=o.tabbableGroups[0],x=b&&b.firstTabbableNode;h=x||c("fallbackFocus")}if(!h)throw new Error("Your focus-trap needs to have at least one focusable element");return h},d=function(){if(o.containerGroups=o.containers.map(function(h){var b=Qb(h,i.tabbableOptions),x=ew(h,i.tabbableOptions);return{container:h,tabbableNodes:b,focusableNodes:x,firstTabbableNode:b.length>0?b[0]:null,lastTabbableNode:b.length>0?b[b.length-1]:null,nextTabbableNode:function(M){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,O=x.findIndex(function(R){return R===M});if(!(O<0))return P?x.slice(O+1).find(function(R){return hi(R,i.tabbableOptions)}):x.slice(0,O).reverse().find(function(R){return hi(R,i.tabbableOptions)})}}}),o.tabbableGroups=o.containerGroups.filter(function(h){return h.tabbableNodes.length>0}),o.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},p=function E(h){if(h!==!1&&h!==r.activeElement){if(!h||!h.focus){E(f());return}h.focus({preventScroll:!!i.preventScroll}),o.mostRecentlyFocusedNode=h,rw(h)&&h.select()}},v=function(h){var b=c("setReturnFocus",h);return b||(b===!1?!1:h)},y=function(h){var b=pi(h);if(!(l(b)>=0)){if(vr(i.clickOutsideDeactivates,h)){s.deactivate({returnFocus:i.returnFocusOnDeactivate&&!Uo(b,i.tabbableOptions)});return}vr(i.allowOutsideClick,h)||h.preventDefault()}},g=function(h){var b=pi(h),x=l(b)>=0;x||b instanceof Document?x&&(o.mostRecentlyFocusedNode=b):(h.stopImmediatePropagation(),p(o.mostRecentlyFocusedNode||f()))},S=function(h){var b=pi(h);d();var x=null;if(o.tabbableGroups.length>0){var k=l(b),M=k>=0?o.containerGroups[k]:void 0;if(k<0)h.shiftKey?x=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:x=o.tabbableGroups[0].firstTabbableNode;else if(h.shiftKey){var P=ou(o.tabbableGroups,function(N){var V=N.firstTabbableNode;return b===V});if(P<0&&(M.container===b||Uo(b,i.tabbableOptions)&&!hi(b,i.tabbableOptions)&&!M.nextTabbableNode(b,!1))&&(P=k),P>=0){var O=P===0?o.tabbableGroups.length-1:P-1,R=o.tabbableGroups[O];x=R.lastTabbableNode}}else{var D=ou(o.tabbableGroups,function(N){var V=N.lastTabbableNode;return b===V});if(D<0&&(M.container===b||Uo(b,i.tabbableOptions)&&!hi(b,i.tabbableOptions)&&!M.nextTabbableNode(b))&&(D=k),D>=0){var j=D===o.tabbableGroups.length-1?0:D+1,U=o.tabbableGroups[j];x=U.firstTabbableNode}}}else x=c("fallbackFocus");x&&(h.preventDefault(),p(x))},w=function(h){if(iw(h)&&vr(i.escapeDeactivates,h)!==!1){h.preventDefault(),s.deactivate();return}if(ow(h)){S(h);return}},L=function(h){var b=pi(h);l(b)>=0||vr(i.clickOutsideDeactivates,h)||vr(i.allowOutsideClick,h)||(h.preventDefault(),h.stopImmediatePropagation())},m=function(){if(o.active)return ru.activateTrap(s),o.delayInitialFocusTimer=i.delayInitialFocus?iu(function(){p(f())}):p(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",w,{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",w,!0),s};return s={get active(){return o.active},get paused(){return o.paused},activate:function(h){if(o.active)return this;var b=a(h,"onActivate"),x=a(h,"onPostActivate"),k=a(h,"checkCanFocusTrap");k||d(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,b&&b();var M=function(){k&&d(),m(),x&&x()};return k?(k(o.containers.concat()).then(M,M),this):(M(),this)},deactivate:function(h){if(!o.active)return this;var b=nu({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},h);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,_(),o.active=!1,o.paused=!1,ru.deactivateTrap(s);var x=a(b,"onDeactivate"),k=a(b,"onPostDeactivate"),M=a(b,"checkCanReturnFocus"),P=a(b,"returnFocus","returnFocusOnDeactivate");x&&x();var O=function(){iu(function(){P&&p(v(o.nodeFocusedBeforeActivation)),k&&k()})};return P&&M?(M(v(o.nodeFocusedBeforeActivation)).then(O,O),this):(O(),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(h){var b=[].concat(h).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 aw(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 oa=!1;if(typeof window<"u"){var su={get passive(){oa=!0}};window.addEventListener("testPassive",null,su),window.removeEventListener("testPassive",null,su)}var Bf=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),an=[],Qi=!1,Uf=-1,Ar=void 0,Dr=void 0,Vf=function(e){return an.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(e))})},eo=function(e){var n=e||window.event;return Vf(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},lw=function(e){if(Dr===void 0){var n=!!e&&e.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;n&&r>0&&(Dr=document.body.style.paddingRight,document.body.style.paddingRight=r+"px")}Ar===void 0&&(Ar=document.body.style.overflow,document.body.style.overflow="hidden")},uw=function(){Dr!==void 0&&(document.body.style.paddingRight=Dr,Dr=void 0),Ar!==void 0&&(document.body.style.overflow=Ar,Ar=void 0)},cw=function(e){return e?e.scrollHeight-e.scrollTop<=e.clientHeight:!1},fw=function(e,n){var r=e.targetTouches[0].clientY-Uf;return Vf(e.target)?!1:n&&n.scrollTop===0&&r>0||cw(n)&&r<0?eo(e):(e.stopPropagation(),!0)},dw=function(e,n){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!an.some(function(i){return i.targetElement===e})){var r={targetElement:e,options:n||{}};an=[].concat(aw(an),[r]),Bf?(e.ontouchstart=function(i){i.targetTouches.length===1&&(Uf=i.targetTouches[0].clientY)},e.ontouchmove=function(i){i.targetTouches.length===1&&fw(i,e)},Qi||(document.addEventListener("touchmove",eo,oa?{passive:!1}:void 0),Qi=!0)):lw(n)}},hw=function(e){if(!e){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}an=an.filter(function(n){return n.targetElement!==e}),Bf?(e.ontouchstart=null,e.ontouchmove=null,Qi&&an.length===0&&(document.removeEventListener("touchmove",eo,oa?{passive:!1}:void 0),Qi=!1)):an.length||uw()},_n=[],pw=function(){return _n.some(function(t){return t.activeTargets.length>0})},gw=function(){return _n.some(function(t){return t.skippedTargets.length>0})},au="ResizeObserver loop completed with undelivered notifications.",vw=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:au}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=au),window.dispatchEvent(t)},Fr;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Fr||(Fr={}));var Mn=function(t){return Object.freeze(t)},mw=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,Mn(this)}return t}(),Ff=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,Mn(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,c=e.height;return{x:n,y:r,top:i,right:o,bottom:s,left:a,width:l,height:c}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),sa=function(t){return t instanceof SVGElement&&"getBBox"in t},zf=function(t){if(sa(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)},lu=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)},yw=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},Ir=typeof window<"u"?window:{},gi=new WeakMap,uu=/auto|scroll/,bw=/^tb|vertical/,ww=/msie|trident/i.test(Ir.navigator&&Ir.navigator.userAgent),Rt=function(t){return parseFloat(t||"0")},Hn=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new mw((n?e:t)||0,(n?t:e)||0)},cu=Mn({devicePixelContentBoxSize:Hn(),borderBoxSize:Hn(),contentBoxSize:Hn(),contentRect:new Ff(0,0,0,0)}),$f=function(t,e){if(e===void 0&&(e=!1),gi.has(t)&&!e)return gi.get(t);if(zf(t))return gi.set(t,cu),cu;var n=getComputedStyle(t),r=sa(t)&&t.ownerSVGElement&&t.getBBox(),i=!ww&&n.boxSizing==="border-box",o=bw.test(n.writingMode||""),s=!r&&uu.test(n.overflowY||""),a=!r&&uu.test(n.overflowX||""),l=r?0:Rt(n.paddingTop),c=r?0:Rt(n.paddingRight),f=r?0:Rt(n.paddingBottom),d=r?0:Rt(n.paddingLeft),p=r?0:Rt(n.borderTopWidth),v=r?0:Rt(n.borderRightWidth),y=r?0:Rt(n.borderBottomWidth),g=r?0:Rt(n.borderLeftWidth),S=d+c,w=l+f,L=g+v,m=p+y,_=a?t.offsetHeight-m-t.clientHeight:0,E=s?t.offsetWidth-L-t.clientWidth:0,h=i?S+L:0,b=i?w+m:0,x=r?r.width:Rt(n.width)-h-E,k=r?r.height:Rt(n.height)-b-_,M=x+S+E+L,P=k+w+_+m,O=Mn({devicePixelContentBoxSize:Hn(Math.round(x*devicePixelRatio),Math.round(k*devicePixelRatio),o),borderBoxSize:Hn(M,P,o),contentBoxSize:Hn(x,k,o),contentRect:new Ff(d,l,x,k)});return gi.set(t,O),O},Hf=function(t,e,n){var r=$f(t,n),i=r.borderBoxSize,o=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(e){case Fr.DEVICE_PIXEL_CONTENT_BOX:return s;case Fr.BORDER_BOX:return i;default:return o}},Sw=function(){function t(e){var n=$f(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=Mn([n.borderBoxSize]),this.contentBoxSize=Mn([n.contentBoxSize]),this.devicePixelContentBoxSize=Mn([n.devicePixelContentBoxSize])}return t}(),Wf=function(t){if(zf(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},Lw=function(){var t=1/0,e=[];_n.forEach(function(s){if(s.activeTargets.length!==0){var a=[];s.activeTargets.forEach(function(c){var f=new Sw(c.target),d=Wf(c.target);a.push(f),c.lastReportedSize=Hf(c.target,c.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},fu=function(t){_n.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(Wf(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},Ew=function(){var t=0;for(fu(t);pw();)t=Lw(),fu(t);return gw()&&vw(),t>0},Vo,Gf=[],xw=function(){return Gf.splice(0).forEach(function(t){return t()})},Cw=function(t){if(!Vo){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return xw()}).observe(n,r),Vo=function(){n.textContent="".concat(e?e--:e++)}}Gf.push(t),Vo()},_w=function(t){Cw(function(){requestAnimationFrame(t)})},Di=0,Mw=function(){return!!Di},Ow=250,kw={attributes:!0,characterData:!0,childList:!0,subtree:!0},du=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],hu=function(t){return t===void 0&&(t=0),Date.now()+t},Fo=!1,Pw=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=Ow),!Fo){Fo=!0;var r=hu(e);_w(function(){var i=!1;try{i=Ew()}finally{if(Fo=!1,e=r-hu(),!Mw())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,kw)};document.body?n():Ir.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),du.forEach(function(n){return Ir.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),du.forEach(function(n){return Ir.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),Ds=new Pw,pu=function(t){!Di&&t>0&&Ds.start(),Di+=t,!Di&&Ds.stop()},Rw=function(t){return!sa(t)&&!yw(t)&&getComputedStyle(t).display==="inline"},Tw=function(){function t(e,n){this.target=e,this.observedBox=n||Fr.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=Hf(this.target,this.observedBox,!0);return Rw(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),Aw=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),vi=new WeakMap,gu=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},mi=function(){function t(){}return t.connect=function(e,n){var r=new Aw(e,n);vi.set(e,r)},t.observe=function(e,n,r){var i=vi.get(e),o=i.observationTargets.length===0;gu(i.observationTargets,n)<0&&(o&&_n.push(i),i.observationTargets.push(new Tw(n,r&&r.box)),pu(1),Ds.schedule())},t.unobserve=function(e,n){var r=vi.get(e),i=gu(r.observationTargets,n),o=r.observationTargets.length===1;i>=0&&(o&&_n.splice(_n.indexOf(r),1),r.observationTargets.splice(i,1),pu(-1))},t.disconnect=function(e){var n=this,r=vi.get(e);r.observationTargets.slice().forEach(function(i){return n.unobserve(e,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t}(),Dw=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.");mi.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(!lu(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");mi.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(!lu(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");mi.unobserve(this,e)},t.prototype.disconnect=function(){mi.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();function ot(){return ot=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},ot.apply(this,arguments)}function Ii(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 Nr=typeof window<"u"?u.useLayoutEffect:u.useEffect;function mr(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 yi(t){var e=Math.round(t);if(Number.isNaN(t))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return e}var Iw={box:"border-box"};function zo(t,e){var n=e.label,r=e.enabled,i=e.resizeSourceRef,o=u.useState(0),s=o[0],a=o[1];u.useDebugValue(n+": "+s);var l=u.useCallback(function(c){a(c[0].borderBoxSize[0].blockSize),i.current="element"},[i]);return Nr(function(){if(t.current&&r){var c=new Dw(l);return c.observe(t.current,Iw),function(){c.disconnect()}}},[t,l,r]),r?s:0}function it(t){return t===void 0&&(t=1e3),new Promise(function(e){return setTimeout(e,t)})}var vu={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},mu={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},Nw=l0({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:ot({},vu,mu)}}},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:ot({},vu,mu)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:ot({},{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:[u0({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(it()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenStart:function(){try{return Promise.resolve(it()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseStart:function(){try{return Promise.resolve(it()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeStart:function(){try{return Promise.resolve(it()).then(function(){})}catch(t){return Promise.reject(t)}},onSnapEnd:function(){try{return Promise.resolve(it()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenEnd:function(){try{return Promise.resolve(it()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseEnd:function(){try{return Promise.resolve(it()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeEnd:function(){try{return Promise.resolve(it()).then(function(){})}catch(t){return Promise.reject(t)}},renderVisuallyHidden:function(t,e){try{return Promise.resolve(it()).then(function(){})}catch(n){return Promise.reject(n)}},activate:function(t,e){try{return Promise.resolve(it()).then(function(){})}catch(n){return Promise.reject(n)}},deactivate:function(t,e){try{return Promise.resolve(it()).then(function(){})}catch(n){return Promise.reject(n)}},openSmoothly:function(t,e){try{return Promise.resolve(it()).then(function(){})}catch(n){return Promise.reject(n)}},openImmediately:function(t,e){try{return Promise.resolve(it()).then(function(){})}catch(n){return Promise.reject(n)}},snapSmoothly:function(t,e){try{return Promise.resolve(it()).then(function(){})}catch(n){return Promise.reject(n)}},resizeSmoothly:function(t,e){try{return Promise.resolve(it()).then(function(){})}catch(n){return Promise.reject(n)}},closeSmoothly:function(t,e){try{return Promise.resolve(it()).then(function(){})}catch(n){return Promise.reject(n)}}},guards:{initiallyClosed:function(t){return t.initialState==="CLOSED"},initiallyOpen:function(t){return t.initialState==="OPEN"}}}),jw=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],Bw=["velocity"],Uw=["onRest","config"],Zf=I0.default,Vw=Zf.tension,bi=Zf.friction,Fw=u.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,c=t.lastSnapRef,f=t.initialFocusRef,d=t.onDismiss,p=t.maxHeight,v=t.defaultSnap,y=v===void 0?$w:v,g=t.snapPoints,S=g===void 0?Hw:g,w=t.blocking,L=w===void 0||w,m=t.scrollLocking,_=m===void 0||m,E=t.style,h=t.onSpringStart,b=t.onSpringCancel,x=t.onSpringEnd,k=t.reserveScrollBarGap,M=k===void 0?L:k,P=t.expandOnContentDrag,O=P!==void 0&&P,R=Ii(t,jw),D=function(){var I=u.useState(!1),K=I[0],z=I[1],le=u.useState({}),Te=le[0],me=le[1],Ae=u.useCallback(function(_e){return me(function(Be){var re;return ot({},Be,((re={})[_e]=!1,re))}),function(){me(function(Be){var re;return ot({},Be,((re={})[_e]=!0,re))})}},[]);return u.useEffect(function(){var _e=Object.values(Te);_e.length!==0&&_e.every(Boolean)&&z(!0)},[Te]),{ready:K,registerReady:Ae}}(),j=D.ready,U=D.registerReady,N=u.useRef(!1),V=u.useRef(h),q=u.useRef(b),$=u.useRef(x);u.useEffect(function(){V.current=h,q.current=b,$.current=x},[b,h,x]);var F,Z,te=V0(function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}}),X=te[0],J=te[1],T=u.useRef(null),fe=u.useRef(null),xe=u.useRef(null),H=u.useRef(null),Oe=u.useRef(null),ke=u.useRef(null),se=u.useRef(0),we=u.useRef(),Ne=u.useRef(!1),pe=(F=u.useMemo(function(){return typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null},[]),Z=u.useRef(F==null?void 0:F.matches),u.useDebugValue(Z.current?"reduce":"no-preference"),u.useEffect(function(){var I=function(K){Z.current=K.matches};return F==null||F.addListener(I),function(){return F==null?void 0:F.removeListener(I)}},[F]),Z),Se=function(I){var K=I.targetRef,z=I.enabled,le=I.reserveScrollBarGap,Te=u.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return u.useDebugValue(z?"Enabled":"Disabled"),u.useEffect(function(){if(!z)return Te.current.deactivate(),void(Te.current={activate:function(){},deactivate:function(){}});var me=K.current,Ae=!1;Te.current={activate:function(){Ae||(Ae=!0,dw(me,{allowTouchMove:function(_e){return _e.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:le}))},deactivate:function(){Ae&&(Ae=!1,hw(me))}}},[z,K,le]),Te}({targetRef:fe,enabled:j&&_,reserveScrollBarGap:M}),Pe=function(I){var K=I.targetRef,z=I.enabled,le=u.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return u.useDebugValue(z?"Enabled":"Disabled"),u.useEffect(function(){if(!z)return le.current.deactivate(),void(le.current={activate:function(){},deactivate:function(){}});var Te=K.current,me=!1,Ae=[],_e=[];le.current={activate:function(){if(!me){me=!0;var Be=Te.parentNode;document.querySelectorAll("body > *").forEach(function(re){if(re!==Be){var de=re.getAttribute("aria-hidden");de!==null&&de!=="false"||(Ae.push(de),_e.push(re),re.setAttribute("aria-hidden","true"))}})}},deactivate:function(){me&&(me=!1,_e.forEach(function(Be,re){var de=Ae[re];de===null?Be.removeAttribute("aria-hidden"):Be.setAttribute("aria-hidden",de)}),Ae=[],_e=[])}}},[K,z]),le}({targetRef:T,enabled:j&&L}),Ce=function(I){var K=I.targetRef,z=I.fallbackRef,le=I.initialFocusRef,Te=I.enabled,me=u.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return u.useDebugValue(Te?"Enabled":"Disabled"),u.useEffect(function(){if(!Te)return me.current.deactivate(),void(me.current={activate:function(){},deactivate:function(){}});var Ae=z.current,_e=sw(K.current,{onActivate:void 0,initialFocus:le?function(){return(le==null?void 0:le.current)||Ae}:void 0,fallbackFocus:Ae,escapeDeactivates:!1,clickOutsideDeactivates:!1}),Be=!1;me.current={activate:function(){try{return Be?Promise.resolve():(Be=!0,Promise.resolve(_e.activate()).then(function(){return Promise.resolve(new Promise(function(re){return setTimeout(function(){return re(void 0)},0)})).then(function(){})}))}catch(re){return Promise.reject(re)}},deactivate:function(){Be&&(Be=!1,_e.deactivate())}}},[Te,z,le,K]),me}({targetRef:T,fallbackRef:ke,initialFocusRef:f||void 0,enabled:j&&L&&f!==!1}),Re=function(I){var K=I.getSnapPoints,z=I.heightRef,le=I.lastSnapRef,Te=I.ready,me=function(Ge){var ct=Ge.contentRef,ft=Ge.controlledMaxHeight,Ke=Ge.footerEnabled,Pt=Ge.footerRef,xt=Ge.headerEnabled,dt=Ge.headerRef,Zt=Ge.registerReady,Ut=Ge.resizeSourceRef,nr=u.useMemo(function(){return Zt("contentHeight")},[Zt]),rr=function(qt,hn,pn){var gn=u.useMemo(function(){return hn("maxHeight")},[hn]),vn=u.useState(function(){return yi(qt)||typeof window<"u"?window.innerHeight:0}),sr=vn[0],ar=vn[1],Kt=sr>0,Y=u.useRef(0);return u.useDebugValue(qt?"controlled":"auto"),u.useEffect(function(){Kt&&gn()},[Kt,gn]),Nr(function(){if(qt)return ar(yi(qt)),void(pn.current="maxheightprop");var la=function(){Y.current||(Y.current=requestAnimationFrame(function(){ar(window.innerHeight),pn.current="window",Y.current=0}))};return window.addEventListener("resize",la),ar(window.innerHeight),pn.current="window",gn(),function(){window.removeEventListener("resize",la),cancelAnimationFrame(Y.current)}},[qt,gn,pn]),sr}(ft,Zt,Ut),Pn=zo(dt,{label:"headerHeight",enabled:xt,resizeSourceRef:Ut}),ir=zo(ct,{label:"contentHeight",enabled:!0,resizeSourceRef:Ut}),Rn=zo(Pt,{label:"footerHeight",enabled:Ke,resizeSourceRef:Ut}),dn=Math.min(rr-Pn-Rn,ir)+Pn+Rn;u.useDebugValue("minHeight: "+dn);var or=ir>0;return u.useEffect(function(){or&&nr()},[or,nr]),{maxHeight:rr,minHeight:dn,headerHeight:Pn,footerHeight:Rn}}({contentRef:I.contentRef,controlledMaxHeight:I.controlledMaxHeight,footerEnabled:I.footerEnabled,footerRef:I.footerRef,headerEnabled:I.headerEnabled,headerRef:I.headerRef,registerReady:I.registerReady,resizeSourceRef:I.resizeSourceRef}),Ae=me.maxHeight,_e=me.minHeight,Be=me.headerHeight,re=me.footerHeight,de=function(Ge,ct){var ft=[].concat(Ge).map(yi).reduce(function(dt,Zt){return dt.add(mr(Zt,0,ct)),dt},new Set),Ke=Array.from(ft),Pt=Math.min.apply(Math,Ke);if(Number.isNaN(Pt))throw new TypeError("minSnap is NaN");var xt=Math.max.apply(Math,Ke);if(Number.isNaN(xt))throw new TypeError("maxSnap is NaN");return{snapPoints:Ke,minSnap:Pt,maxSnap:xt}}(Te?K({height:z.current,footerHeight:re,headerHeight:Be,minHeight:_e,maxHeight:Ae}):[0],Ae),st=de.snapPoints,Bt=de.minSnap,rt=de.maxSnap;return u.useDebugValue("minSnap: "+Bt+", maxSnap:"+rt),{minSnap:Bt,maxSnap:rt,findSnap:function(Ge){var ct=yi(typeof Ge=="function"?Ge({footerHeight:re,headerHeight:Be,height:z.current,minHeight:_e,maxHeight:Ae,snapPoints:st,lastSnap:le.current}):Ge);return st.reduce(function(ft,Ke){return Math.abs(Ke-ct)<Math.abs(ft-ct)?Ke:ft},Bt)},maxHeight:Ae}}({contentRef:xe,controlledMaxHeight:p,footerEnabled:!!o,footerRef:Oe,getSnapPoints:S,headerEnabled:s!==!1,headerRef:H,heightRef:se,lastSnapRef:c,ready:j,registerReady:U,resizeSourceRef:we}),ee=Re.minSnap,Ve=Re.maxSnap,Q=Re.maxHeight,qe=Re.findSnap,W=u.useRef(Q),Fe=u.useRef(ee),je=u.useRef(Ve),ut=u.useRef(qe),nt=u.useRef(0);Nr(function(){W.current=Q,je.current=Ve,Fe.current=ee,ut.current=qe,nt.current=qe(y)},[qe,y,Q,Ve,ee]);var ne=u.useCallback(function(I){var K=I.onRest,z=I.config,le=(z=z===void 0?{}:z).velocity,Te=le===void 0?1:le,me=Ii(z,Bw),Ae=Ii(I,Uw);return new Promise(function(_e){return J(ot({},Ae,{config:ot({velocity:Te},me,{mass:1,tension:Vw,friction:Math.max(bi,bi+(bi-bi*Te))}),onRest:function(){var Be=[].slice.call(arguments);_e.apply(void 0,Be),K==null||K.apply(void 0,Be)}}))})},[J]),fn=y0(Nw,{devTools:!1,actions:{onOpenCancel:u.useCallback(function(){return q.current==null?void 0:q.current({type:"OPEN"})},[]),onSnapCancel:u.useCallback(function(I){return q.current==null?void 0:q.current({type:"SNAP",source:I.snapSource})},[]),onCloseCancel:u.useCallback(function(){return q.current==null?void 0:q.current({type:"CLOSE"})},[]),onResizeCancel:u.useCallback(function(){return q.current==null?void 0:q.current({type:"RESIZE",source:we.current})},[]),onOpenEnd:u.useCallback(function(){return $.current==null?void 0:$.current({type:"OPEN"})},[]),onSnapEnd:u.useCallback(function(I,K){return $.current==null?void 0:$.current({type:"SNAP",source:I.snapSource})},[]),onResizeEnd:u.useCallback(function(){return $.current==null?void 0:$.current({type:"RESIZE",source:we.current})},[])},context:{initialState:l},services:{onSnapStart:u.useCallback(function(I,K){try{return Promise.resolve(V.current==null?void 0:V.current({type:"SNAP",source:K.payload.source||"custom"}))}catch(z){return Promise.reject(z)}},[]),onOpenStart:u.useCallback(function(){try{return Promise.resolve(V.current==null?void 0:V.current({type:"OPEN"}))}catch(I){return Promise.reject(I)}},[]),onCloseStart:u.useCallback(function(){try{return Promise.resolve(V.current==null?void 0:V.current({type:"CLOSE"}))}catch(I){return Promise.reject(I)}},[]),onResizeStart:u.useCallback(function(){try{return Promise.resolve(V.current==null?void 0:V.current({type:"RESIZE",source:we.current}))}catch(I){return Promise.reject(I)}},[]),onSnapEnd:u.useCallback(function(I,K){try{return Promise.resolve($.current==null?void 0:$.current({type:"SNAP",source:I.snapSource}))}catch(z){return Promise.reject(z)}},[]),onOpenEnd:u.useCallback(function(){try{return Promise.resolve($.current==null?void 0:$.current({type:"OPEN"}))}catch(I){return Promise.reject(I)}},[]),onCloseEnd:u.useCallback(function(){try{return Promise.resolve($.current==null?void 0:$.current({type:"CLOSE"}))}catch(I){return Promise.reject(I)}},[]),onResizeEnd:u.useCallback(function(){try{return Promise.resolve($.current==null?void 0:$.current({type:"RESIZE",source:we.current}))}catch(I){return Promise.reject(I)}},[]),renderVisuallyHidden:u.useCallback(function(I,K){try{return Promise.resolve(ne({y:nt.current,ready:0,maxHeight:W.current,maxSnap:je.current,minSnap:nt.current,immediate:!0})).then(function(){})}catch(z){return Promise.reject(z)}},[ne]),activate:u.useCallback(function(I,K){try{return N.current=!0,Promise.resolve(Promise.all([Se.current.activate(),Ce.current.activate(),Pe.current.activate()])).then(function(){})}catch(z){return Promise.reject(z)}},[Pe,Ce,Se]),deactivate:u.useCallback(function(){try{return Se.current.deactivate(),Ce.current.deactivate(),Pe.current.deactivate(),N.current=!1,Promise.resolve()}catch(I){return Promise.reject(I)}},[Pe,Ce,Se]),openImmediately:u.useCallback(function(){try{return se.current=nt.current,Promise.resolve(ne({y:nt.current,ready:1,maxHeight:W.current,maxSnap:je.current,minSnap:nt.current,immediate:!0})).then(function(){})}catch(I){return Promise.reject(I)}},[ne]),openSmoothly:u.useCallback(function(){try{return Promise.resolve(ne({y:0,ready:1,maxHeight:W.current,maxSnap:je.current,minSnap:nt.current,immediate:!0})).then(function(){return se.current=nt.current,Promise.resolve(ne({y:nt.current,ready:1,maxHeight:W.current,maxSnap:je.current,minSnap:nt.current,immediate:pe.current})).then(function(){})})}catch(I){return Promise.reject(I)}},[ne,pe]),snapSmoothly:u.useCallback(function(I,K){try{var z=ut.current(I.y);return se.current=z,c.current=z,Promise.resolve(ne({y:z,ready:1,maxHeight:W.current,maxSnap:je.current,minSnap:Fe.current,immediate:pe.current,config:{velocity:I.velocity}})).then(function(){})}catch(le){return Promise.reject(le)}},[ne,c,pe]),resizeSmoothly:u.useCallback(function(){try{var I=ut.current(se.current);return se.current=I,c.current=I,Promise.resolve(ne({y:I,ready:1,maxHeight:W.current,maxSnap:je.current,minSnap:Fe.current,immediate:we.current!=="element"||pe.current})).then(function(){})}catch(K){return Promise.reject(K)}},[ne,c,pe]),closeSmoothly:u.useCallback(function(I,K){try{return ne({minSnap:se.current,immediate:!0}),se.current=0,Promise.resolve(ne({y:0,maxHeight:W.current,maxSnap:je.current,immediate:pe.current})).then(function(){return Promise.resolve(ne({ready:0,immediate:!0})).then(function(){})})}catch(z){return Promise.reject(z)}},[ne,pe])}}),qr=fn[0],Et=fn[1];u.useEffect(function(){j&&Et(a?"OPEN":"CLOSE")},[a,Et,j]),Nr(function(){(Q||Ve||ee)&&Et("RESIZE")},[Q,Ve,ee,Et]),u.useEffect(function(){return function(){Se.current.deactivate(),Ce.current.deactivate(),Pe.current.deactivate()}},[Pe,Ce,Se]),u.useImperativeHandle(e,function(){return{snapTo:function(I,K){var z=K===void 0?{}:K,le=z.velocity,Te=le===void 0?1:le,me=z.source,Ae=me===void 0?"custom":me;Et("SNAP",{payload:{y:ut.current(I),velocity:Te,source:Ae}})},get height(){return se.current}}},[Et]),u.useEffect(function(){var I=fe.current,K=function(le){Ne.current&&le.preventDefault()},z=function(le){I.scrollTop<0&&(requestAnimationFrame(function(){I.style.overflow="hidden",I.scrollTop=0,I.style.removeProperty("overflow")}),le.preventDefault())};return O&&(I.addEventListener("scroll",K),I.addEventListener("touchmove",K),I.addEventListener("touchstart",z)),function(){I.removeEventListener("scroll",K),I.removeEventListener("touchmove",K),I.removeEventListener("touchstart",z)}},[O,fe]);var jt=Fb(function(I){var K=I.args,z=(K=K===void 0?[]:K)[0],le=(z=z===void 0?{}:z).closeOnTap,Te=le!==void 0&&le,me=z.isContentDragging,Ae=me!==void 0&&me,_e=I.cancel,Be=I.direction[1],re=I.down,de=I.first,st=I.last,Bt=I.memo,rt=Bt===void 0?X.y.getValue():Bt,Ge=I.tap,ct=I.velocity,ft=-1*I.movement[1];if(!N.current)return _e(),rt;if(d&&Te&&Ge)return _e(),setTimeout(function(){return d()},0),rt;if(Ge)return rt;var Ke=rt+ft,Pt=ft*ct,xt=Math.max(Fe.current,Math.min(je.current,Ke+2*Pt));if(!re&&d&&Be>0&&Ke+Pt<Fe.current/2)return _e(),d(),rt;var dt=re?d||Fe.current!==je.current?Tr(Ke,d?0:Fe.current,je.current,.55):Ke<Fe.current?Tr(Ke,Fe.current,2*je.current,.55):Tr(Ke,Fe.current/2,je.current,.55):xt;return O&&Ae?(dt>=je.current&&(dt=je.current),rt===je.current&&fe.current.scrollTop>0&&(dt=je.current),Ne.current=dt<je.current):Ne.current=!1,de&&Et("DRAG"),st?(Et("SNAP",{payload:{y:dt,velocity:ct>.05?ct:1,source:"dragging"}}),rt):(J({y:dt,ready:1,maxHeight:W.current,maxSnap:je.current,minSnap:Fe.current,immediate:!0,config:{velocity:ct}}),rt)},{filterTaps:!0});if(Number.isNaN(je.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(Fe.current))throw new TypeError("minSnapRef is NaN!!");var Kr=function(I){var K,z=I.spring,le=Nn([z.y,z.maxHeight],function(re,de){return Math.round(mr(de-re,0,16))+"px"}),Te=Nn([z.y,z.minSnap,z.maxSnap],function(re,de,st){return mr(re,de,st)+"px"}),me=Nn([z.y,z.minSnap,z.maxSnap],function(re,de,st){return re<de?de-re+"px":re>st?st-re+"px":"0px"}),Ae=Nn([z.y,z.maxSnap],function(re,de){return re>=de?Math.ceil(re-de):0}),_e=Nn([z.y,z.minSnap],function(re,de){if(!de)return 0;var st=Math.max(de/2-45,0);return mr((re-st)*(1/(Math.min(de/2+45,de)-st)+0),0,1)}),Be=Nn([z.y,z.minSnap],function(re,de){return de?mr(re/de,0,1):0});return(K={})["--rsbs-content-opacity"]=_e,K["--rsbs-backdrop-opacity"]=Be,K["--rsbs-antigap-scale-y"]=Ae,K["--rsbs-overlay-translate-y"]=me,K["--rsbs-overlay-rounded"]=le,K["--rsbs-overlay-h"]=Te,K}({spring:X});return u.createElement(ob.div,ot({},R,{"data-rsbs-root":!0,"data-rsbs-state":zw.find(qr.matches),"data-rsbs-is-blocking":L,"data-rsbs-is-dismissable":!!d,"data-rsbs-has-header":!!s,"data-rsbs-has-footer":!!o,className:i,ref:T,style:ot({},Kr,E,{opacity:X.ready})}),r,L&&u.createElement("div",ot({key:"backdrop","data-rsbs-backdrop":!0},jt({closeOnTap:!0}))),u.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:ke,onKeyDown:function(I){I.key==="Escape"&&(I.stopPropagation(),d&&d())}},s!==!1&&u.createElement("div",ot({key:"header","data-rsbs-header":!0,ref:H},jt()),s),u.createElement("div",ot({key:"scroll","data-rsbs-scroll":!0,ref:fe},O?jt({isContentDragging:!0}):{}),u.createElement("div",{"data-rsbs-content":!0,ref:xe},n)),o&&u.createElement("div",ot({key:"footer",ref:Oe,"data-rsbs-footer":!0},jt()),o)))}),zw=["closed","opening","open","closing","dragging","snapping","resizing"];function $w(t){var e=t.lastSnap;return e??Math.min.apply(Math,t.snapPoints)}function Hw(t){return t.minHeight}var Ww=["onSpringStart","onSpringEnd","skipInitialTransition"],qf=u.forwardRef(function(t,e){var n=t.onSpringStart,r=t.onSpringEnd,i=t.skipInitialTransition,o=Ii(t,Ww),s=u.useState(!1),a=s[0],l=s[1],c=u.useRef(),f=u.useRef(null),d=u.useRef(i&&o.open?"OPEN":"CLOSED");Nr(function(){if(o.open)return cancelAnimationFrame(c.current),l(!0),function(){d.current="CLOSED"}},[o.open]);var p=u.useCallback(function(y){return Promise.resolve(n==null?void 0:n(y)).then(function(){y.type==="OPEN"&&cancelAnimationFrame(c.current)})},[n]),v=u.useCallback(function(y){return Promise.resolve(r==null?void 0:r(y)).then(function(){y.type==="CLOSE"&&(c.current=requestAnimationFrame(function(){return l(!1)}))})},[r]);return a?u.createElement(hy,{"data-rsbs-portal":!0},u.createElement(Fw,ot({},o,{lastSnapRef:f,ref:e,initialState:d.current,onSpringStart:p,onSpringEnd:v}))):null});const Kf=28,Gw="MapGoogle-module__root__Vi-sMl",Zw="MapGoogle-module__mapContainer__OCCTIX",qw="MapGoogle-module__balloon__4UVhuT",Kw="MapGoogle-module__details__4osNXn",Jw="MapGoogle-module__cluster__5qmRds",Xw="MapGoogle-module__overlay__g-nEoT",Yw="MapGoogle-module__mapControl__mzyTwr",Qw="MapGoogle-module__geolocationControl__1exHgA",eS="MapGoogle-module__bottomSheet__avcBmY",tS="MapGoogle-module__locationViewContent__xwLeDh",nS="MapGoogle-module__locationViewHeader__maBLv0",rS="MapGoogle-module__deliveryDetailsViewContent__wH-RCe",iS="MapGoogle-module__deliveryDetailsViewHeader__4AKoBe",oS="MapGoogle-module__sheetSubmit__rPQG26",Xe={root:Gw,mapContainer:Zw,balloon:qw,details:Kw,cluster:Jw,overlay:Xw,mapControl:Yw,geolocationControl:Qw,bottomSheet:eS,locationViewContent:tS,locationViewHeader:nS,deliveryDetailsViewContent:rS,deliveryDetailsViewHeader:iS,sheetSubmit:oS},Jf=({children:t,hideFooter:e,minSnapHeight:n,onSubmitClick:r,open:i,submitDisabled:o,submitLoading:s,...a})=>C.jsx(qf,{expandOnContentDrag:!0,open:i,initialFocusRef:!1,defaultSnap:({snapPoints:l})=>Math.min(...l),blocking:!1,snapPoints:({footerHeight:l,headerHeight:c,maxHeight:f,minHeight:d})=>[n==null?d:c+l+n,f-Kf],footer:e?null:C.jsx(Lt,{disabled:o,loading:s,variant:"primary",className:Xe.sheetSubmit,onClick:r,children:C.jsx(xn,{keyName:"choose",ns:"common"})}),sibling:C.jsx("div",{role:"presentation","data-rsbs-backdrop":"true",onClick:l=>{var c;l.stopPropagation(),l.preventDefault(),(c=a.onDismiss)==null||c.call(a)}}),children:C.jsx("div",{className:Xe.bottomSheet,children:t})}),sS={header:Xe.locationViewHeader,content:Xe.locationViewContent},aS=({clusterer:t,hideDetails:e,onPointClick:n,onPointSelected:r,point:i,selectedPoint:o,setOpenDetails:s})=>{const a=Zr("screenSm"),{skipPointInfo:l}=tt(),[c,f]=u.useState(null),d=()=>{if(l){n==null||n(i);return}s==null||s(!1),r==null||r(i)},p=()=>{r==null||r(null)},v=()=>{s==null||s(!0),r==null||r(i)},y=()=>{n==null||n(i),s==null||s(!1),r==null||r(null)},g=(o==null?void 0:o.uid)===i.uid,S=g?Ed:Ou,w=Jc({isSelectedPoint:g}),L=u.useMemo(()=>{let E;switch(!0){case(i.type===30&&!g):{E=Vn(yr.PinLocker,"--owl-color-primary");break}case(i.type!==30&&!g):{E=Vn(yr.PinPvz,"--owl-color-grey-80");break}case(i.type===30&&g):{E=Vn(yr.PinLocker,"--owl-color-success");break}case(i.type!==30&&g):{E=Vn(yr.PinPvz,"--owl-color-black");break}}return Wt(E,"Icon url is not defined"),{scaledSize:new google.maps.Size(...S),url:Gs(E)}},[g,S,i.type]),m=u.useMemo(()=>({lat:i.location.latitude,lng:i.location.longitude}),[i.location.latitude,i.location.longitude]),_=g&&w&&!!(c!=null&&c.getVisible());return C.jsxs(Cc,{noClustererRedraw:!0,icon:L,position:m,clusterer:t,options:Kc,onLoad:f,onClick:d,children:[a&&C.jsx(Jf,{minSnapHeight:200,open:_,onDismiss:p,onSubmitClick:y,children:C.jsx(qc,{hideActions:!0,classes:sS,location:i,onClose:p})}),_&&!a&&C.jsx(Rc,{onCloseClick:p,children:C.jsx($m,{...i,hideDetails:e,className:Xe.balloon,onSubmit:y,onDetails:v})})]},i.uid)},lS=({hideDetails:t,onOpenDetails:e,onPointClick:n,onPointSelected:r,points:i,selectedPoint:o})=>C.jsx(Ng,{clusterClass:Xe.cluster,onClusteringEnd:()=>{setTimeout(()=>{const s=document.getElementsByClassName(Xe.cluster);for(const a of s)a.addEventListener("touchstart",ns,{passive:!0})},100)},onUnmount:()=>{const s=document.getElementsByClassName(Xe.cluster);for(const a of s)a.removeEventListener("touchstart",ns)},children:s=>C.jsx(C.Fragment,{children:i.map(a=>C.jsx(aS,{point:a,clusterer:s,hideDetails:t,selectedPoint:o,setOpenDetails:e,onPointClick:n,onPointSelected:r},a.uid))})}),uS=u.memo(lS),cS=({onOpenDetails:t,onPointClick:e,onPointSelected:n})=>{const{hideDetails:r,locale:i}=tt(),o=On(Ip),s=Gt(c=>c.location),a=Dt(mc),l=JSON.stringify([o.length,i,a==null?void 0:a.place_id]);return C.jsx(uS,{points:o,hideDetails:r,selectedPoint:s,onOpenDetails:t,onPointClick:e,onPointSelected:n},l)},fS=u.memo(cS),Xf=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:42,height:42,fill:"none",viewBox:"0 0 42 42",...t},oe.createElement("rect",{width:42,height:42,fill:"#fff",rx:21}),oe.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"}),oe.createElement("rect",{width:41,height:41,x:.5,y:.5,stroke:"#1D3665",strokeOpacity:.1,rx:20.5})),dS="DeliveryBalloon-module__root__Nu90iy",hS="DeliveryBalloon-module__details__eqUTaI",pS="DeliveryBalloon-module__header__JVdyxN",gS="DeliveryBalloon-module__title__-zKKCt",vS="DeliveryBalloon-module__description__no5-ki",mS="DeliveryBalloon-module__actions__C-N0H-",yS="DeliveryBalloon-module__errorVariant__e6uhZl",bS="DeliveryBalloon-module__logo__62gC5h",Yt={root:dS,details:hS,header:pS,title:gS,description:vS,actions:mS,errorVariant:yS,logo:bS},wS=({SSR:t,address:e,className:n,hasCloseButton:r,hideDetails:i,onClose:o,onDetails:s,variant:a})=>{const l=a==="error",c=a==="default",f=t?"{ courier_balloon.title }":C.jsx(xn,{keyName:"title",ns:"courier_balloon"}),d=t?"{ courier_balloon.error_title }":C.jsx(xn,{keyName:"error_title",ns:"courier_balloon"}),p=t?"{ courier_balloon.error_description }":C.jsx(xn,{keyName:"error_description",ns:"courier_balloon"});return C.jsxs("div",{className:ve(Yt.root,n,Yt[`${a}Variant`]),children:[C.jsxs("div",{className:Yt.header,children:[C.jsx(Xf,{className:Yt.logo}),C.jsx("span",{className:Yt.title,children:l?d:f}),r&&C.jsx(Hr,{onClick:o})]}),C.jsx("div",{className:Yt.description,children:l?p:e||"{{ properties.address }}"}),c&&!i&&C.jsx("div",{className:Yt.actions,children:C.jsx(Lt,{id:Mu,as:"button",variant:"primary",className:Yt.details,onClick:s,children:t?"{ details }":C.jsx(xn,{keyName:"details",ns:"common"})})})]})},SS="Chip-module__root__zsoSyP",LS="Chip-module__active__BlTSFB",yu={root:SS,active:LS},bu=({active:t,children:e,className:n,...r})=>C.jsx("div",{...r,className:ve(yu.root,n,{[yu.active]:t}),children:e}),ES="TextArea-module__root__8YFknR",xS={root:ES},wu=u.forwardRef(({className:t,inputRef:e,onBlur:n,onChange:r,onFocus:i,...o},s)=>{const a=u.useRef(null);u.useImperativeHandle(s,()=>({focus:()=>{var c,f;(c=a.current)==null||c.focus(),i&&i({target:{value:(f=a.current)==null?void 0:f.value}})},blur:()=>{var c,f;(c=a.current)==null||c.blur(),n&&n({target:{value:(f=a.current)==null?void 0:f.value}})},setValue:c=>{r&&r({target:{value:c}}),a.current&&(a.current.value=c)}}),[n,r,i]);const l=Qf(e,a);return C.jsx("textarea",{...o,ref:l,className:ve(xS.root,t),onBlur:n,onFocus:i,onChange:r})}),CS=({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},_S="DeliveryDetailsView-module__title__azeoUr",MS="DeliveryDetailsView-module__logo__4zZtpM",OS="DeliveryDetailsView-module__header__oDE9He",kS="DeliveryDetailsView-module__content__6P27SY",PS="DeliveryDetailsView-module__section__2M3Qip",RS="DeliveryDetailsView-module__chips__KmYgha",TS="DeliveryDetailsView-module__actions__43XZ-V",AS="DeliveryDetailsView-module__submit__58LKBw",DS="DeliveryDetailsView-module__actionsHidden__SW-67b",IS="DeliveryDetailsView-module__commentSection__GlX1A2",NS="DeliveryDetailsView-module__comment__2pGG6h",ht={title:_S,logo:MS,header:OS,content:kS,section:PS,chips:RS,actions:TS,submit:AS,actionsHidden:DS,commentSection:IS,comment:NS},jS=u.forwardRef(({classes:t,hideActions:e,location:n,onChange:r,onClose:i,onSubmit:o},s)=>{var h;const{hideDeliveryTime:a,inputs:l,locale:c}=tt(),{t:f}=Nt(["details_modal","courier_balloon","common"]),d=u.useMemo(()=>CS({set:r,hideDeliveryTime:a}),[a,r]),[p,v]=u.useState(!1),[y,g]=u.useReducer(d,{comment:"",delivery_time:"",apartment_number:"",...n}),S=u.useCallback(async()=>{v(!0);try{Wt(n.address,"Address is required");const b=await pd({address:n.address,algorithm:10,service:10,language:c||ku});if(!sc(b))return;const x=b==null?void 0:b.data.data,k={...y,address:x};return o==null||o(k),k}finally{v(!1)}},[c,n.address,o,y]);u.useImperativeHandle(s,()=>({submit:S}),[S]);const w=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"})},_=to(l==null?void 0:l.apartment),E=to(l==null?void 0:l.comment);return C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:ve(ht.header,t==null?void 0:t.header),children:[C.jsx(Hr,{onClick:i}),C.jsxs("div",{className:ht.title,children:[C.jsx(Xf,{className:ht.logo}),C.jsx("span",{children:f("title",{ns:"courier_balloon"})})]})]}),C.jsxs("div",{className:ve(ht.content,t==null?void 0:t.content),children:[C.jsxs("section",{className:ht.section,children:[C.jsxs("span",{children:[f("address"),":"]}),C.jsx("p",{children:n.address})]}),!a&&C.jsxs("section",{className:ht.section,children:[C.jsxs("span",{children:[f("delivery_time"),":"]}),C.jsxs("div",{className:ht.chips,children:[C.jsx(bu,{active:y.delivery_time==="8:00-13:00",onClick:w("8:00-13:00"),children:"8:00 - 13:00"}),C.jsx(bu,{active:y.delivery_time==="14:00-22:00",onClick:w("14:00-22:00"),children:"14:00 - 22:00"})]})]}),C.jsxs("section",{className:ht.section,children:[C.jsxs("span",{children:[f("apartment_number"),":"]}),C.jsx(wu,{..._,rows:1,onChange:L})]}),C.jsxs("section",{className:ve(ht.section,ht.commentSection),children:[C.jsxs("span",{children:[f("comment"),":"]}),C.jsx(wu,{...E,className:ht.comment,onChange:m})]})]}),C.jsx("div",{className:ve(ht.actions,{[ht.actionsHidden]:e}),children:C.jsx(Lt,{loading:p,disabled:!((h=y.meta)!=null&&h.valid)||p,variant:"primary",className:ht.submit,onClick:S,children:f("choose",{ns:"common"})})})]})}),Yf=u.memo(jS),BS={header:Xe.deliveryDetailsViewHeader,content:Xe.deliveryDetailsViewContent},US=({hideDeliveryTime:t,hideDetails:e,onPointClick:n,point:r,setDeliveryPoint:i,setOpenDetails:o})=>{const s=Jc({isSelectedPoint:!0}),a=u.useRef(null),[l,c]=u.useState(!1),[f,d]=u.useState({...r,comment:"",delivery_time:"",apartment_number:""});u.useEffect(()=>{d({...r,comment:"",delivery_time:"",apartment_number:""})},[r]);const[p,v]=u.useState(null),y=Zr("screenSm"),g=u.useMemo(()=>({lat:f.coords[0],lng:f.coords[1]}),[f.coords]),S=()=>{o==null||o(!0)},w=()=>{i==null||i(null)},L=u.useMemo(()=>({url:Gs(Vn(yr.PinHome,"--owl-color-success")),scaledSize:new google.maps.Size(...Ou)}),[]),m=async()=>{var b;try{c(!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{c(!1)}},_=C.jsx(wS,{...f,hideDetails:e,hasCloseButton:y,variant:f.address?"default":"error",className:Xe.balloon,onDetails:S,onClose:w}),E=s&&!!(p!=null&&p.getVisible()),h=t?!!f.apartment_number:!!f.apartment_number&&!!f.delivery_time;return C.jsxs(Cc,{noClustererRedraw:!0,icon:L,position:g,options:Kc,onLoad:v,children:[y&&C.jsxs(Jf,{minSnapHeight:f.address?200:void 0,submitDisabled:!h||l,submitLoading:l,hideFooter:!f.address,open:E,onDismiss:w,onSubmitClick:m,children:[f.address&&C.jsx(Yf,{ref:a,hideActions:!0,classes:BS,location:r,onChange:d,onClose:w}),!f.address&&_]}),!y&&E&&C.jsx(Rc,{onCloseClick:w,children:_})]})},VS=({children:t,className:e,...n})=>{const{disableDelivery:r,map:i}=tt(),o=u.useMemo(()=>{var a,l;return{lat:((a=i==null?void 0:i.center)==null?void 0:a[0])??qo[0],lng:((l=i==null?void 0:i.center)==null?void 0:l[1])??qo[1]}},[i==null?void 0:i.center]),s=u.useCallback(async a=>{const{latLng:l}=a;if(!l||r)return;Le.getState().setDetailsOpen(!1),Gt.getState().setSelectedLocation(null);const c=[l.lat(),l.lng()];console.debug("[OmnicLocationsWidget::mapClick]",c);try{await Dt.getState().setPlaceAndPoint(c)}catch{vt.getState().setDeliverPoint({address:null,coords:c})}},[r]);return C.jsx(mg,{zoom:i==null?void 0:i.initialZoom,center:o,options:uy,mapContainerClassName:ve(Xe.root,e),onClick:s,...n,children:t})},FS=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},oe.createElement("rect",{width:2,height:20,x:9,fill:"#fff",rx:1}),oe.createElement("rect",{width:2,height:20,x:20,y:9,fill:"#fff",rx:1,transform:"rotate(90 20 9)"}),oe.createElement("circle",{cx:10,cy:10,r:8,fill:"#fff"}),oe.createElement("circle",{cx:10,cy:10,r:6,fill:"currentcolor"}),oe.createElement("circle",{cx:10,cy:10,r:4,fill:"#fff"})),zS=t=>{const e=document.createElement("div"),n=document.createElement("div");e.classList.add(Xe.mapControl),n.classList.add(Xe.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)})},$S=t=>{const e=document.createElement("div");e.classList.add(Xe.mapControl),e.classList.add(Xe.geolocationControl),e.innerHTML=gd.renderToString(C.jsx(FS,{})),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{Ws(async n=>{const{latitude:r,longitude:i}=n.coords,o=[r,i];await Dt.getState().setPlaceAndPoint(o)})})},HS=({className:t})=>{const e=ln(),n=Le(Nu),r=Le(ih),i=On(lc),o=vt(js),{disableGeolocation:s,hideDeliveryTime:a,hideDetails:l,hideMapControls:c,onPointClick:f}=tt(),d=u.useCallback(S=>{console.debug("[OmnicLocationsWidget::loadMap]",S),Le.getState().setMap(S),c||(zS(S),s||$S(S))},[s,c]),p=u.useCallback(()=>{console.debug("[OmnicLocationsWidget::unmountMap]"),Le.getState().setMap(null)},[]),v=u.useCallback(()=>{if(!n)return;const S=n==null?void 0:n.getBounds();S&&(console.debug("[OmnicLocationsWidget::changeBounds]",S),On.getState().loadNext([[S.getSouthWest().lat(),S.getNorthEast().lat()],[S.getSouthWest().lng(),S.getNorthEast().lng()]],e))},[e,n]),y=u.useCallback(async S=>{if(vt.getState().setDeliverPoint(null),Gt.getState().setSelectedLocation(S),!S)return;const w=[S.location.latitude,S.location.longitude];console.debug("[OmnicLocationsWidget::selectPoint]",w),await Dt.getState().setPlace(w)},[]),g=u.useCallback(()=>{console.debug("[OmnicLocationsWidget::tilesLoaded]")},[]);return C.jsxs("div",{className:ve(Xe.mapContainer,t),children:[C.jsxs(VS,{onIdle:v,onLoad:d,onUnmount:p,onTilesLoaded:g,children:[o&&C.jsx(US,{hideDeliveryTime:a,hideDetails:l,point:o,setOpenDetails:Le.getState().setDetailsOpen,setDeliveryPoint:vt.getState().setDeliverPoint,onPointClick:f}),C.jsx(fS,{onPointClick:f,onOpenDetails:Le.getState().setDetailsOpen,onPointSelected:y})]}),(i||r)&&C.jsx(yc,{className:Xe.overlay,children:C.jsx(Fi,{})})]})},WS=u.memo(HS),GS=t=>({google:WS})[t];function Qf(...t){return u.useCallback(e=>{for(const n of t)typeof n=="function"?n(e):n&&typeof n=="object"&&(n.current=e)},t)}const to=t=>{const e=u.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}},ZS=()=>{throw new Error("useMediaQuery is a client-only hook")};function qS(t){const e=u.useCallback(r=>{const i=window.matchMedia(t);return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[t]),n=()=>window.matchMedia(t).matches;return u.useSyncExternalStore(e,n,ZS)}const KS="768px",JS="1024px",XS="1280px",YS="1536px",QS={screenSm:KS,screenMd:JS,screenLg:XS,screenXl:YS};function Zr(t){return qS(`(max-width: calc(${QS[t]} - 1px))`)}const eL=(t,e,n)=>{const{disableGeolocation:r}=n??{},i=Le(Nu);u.useEffect(()=>{i&&(console.debug("[OmnicWidgetLocations::setMapLoaded]",i),Le.getState().setLoaded())},[i]);const o=t[0],s=t[1];u.useEffect(()=>{if(!i)return;const a=[o,s],l=async()=>{console.debug("[OmnicWidgetLocations::setFallbackCenter]",a),Dt.getState().setPlace(a,[],"country")};if(r){l();return}Ws(async c=>{const{latitude:f,longitude:d}=c.coords,p=[f,d];console.debug("[OmnicWidgetLocations::setGeoPosition]",p),await Dt.getState().setPlace(p,[],"country")},()=>l())},[o,s,i,e,r])},ed=wm().use(am()).use(Yv()).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"}),tL=t=>{u.useEffect(()=>{t&&(ed.changeLanguage(t),Ui.setLanguage(t))},[t])},nL=t=>{u.useEffect(()=>{if(t){const e=Object.keys(t);for(const n of e){const r=t[n];r&&uo(`--owl-color-${n}`,r)}}},[t])},rL=t=>{u.useEffect(()=>{t&&t!==void 0&&uo("--owl-button-radius",`${t}px`)},[t])},iL=t=>{u.useEffect(()=>{t&&t!==void 0&&uo("--owl-font",t)},[t])},oL={open:!1},sL=t=>t.open,Ln=cn(t=>({...oL,toggle(e){t(n=>({open:e??!n.open}))}})),aL=t=>{const e=t==="selector";u.useEffect(()=>{e&&Ln.getState().toggle(!0)},[e])},lL=({locale:t})=>{const[e,n]=u.useState(!1);return u.useEffect(()=>{n(!1)},[t]),u.useEffect(()=>{e||n(!0)},[e]),console.debug("[OmnicWidgetLocations::remount]",{locale:t,mounted:e}),e},uL=({children:t})=>{const{font:e,locale:n,palette:r,radius:i,startScreen:o}=tt();return iL(e),tL(n),nL(r),rL(i),aL(o),C.jsx(C.Fragment,{children:t})},cL=({children:t})=>{const{disableGeolocation:e,map:n}=tt();return Wt(n==null?void 0:n.center,"Map center is required"),Wt(n==null?void 0:n.initialZoom,"Map initial zoom is required"),eL(n.center,n.initialZoom,{disableGeolocation:e}),C.jsx(C.Fragment,{children:t})},fL=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:28,fill:"none",viewBox:"0 0 24 28",...t},oe.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"})),dL=()=>{Ln.getState().toggle(!0),Le.getState().setDetailsOpen(!1),vt.getState().setDeliverPoint(null),Gt.getState().setSelectedLocation(null)},hL="CurrentLocation-module__root__AeQCGT",pL="CurrentLocation-module__icon__459m9q",gL="CurrentLocation-module__text__w-9v28",$o={root:hL,icon:pL,text:gL},td=({className:t})=>{const{t:e}=Nt("current_location"),n=Dt(mc),r=Dt(tg);return C.jsxs("div",{role:"presentation",className:ve($o.root,t),onClick:dL,children:[C.jsx(fL,{className:$o.icon}),C.jsxs("span",{className:$o.text,children:[!n&&e("choose_from_map"),n&&`${(r==null?void 0:r.long_name)??n.formatted_address}`]})]})},vL=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:123,height:32,fill:"none",viewBox:"0 0 123 32",...t},oe.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"})),mL=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:192,height:20,fill:"none",viewBox:"0 0 192 20",...t},oe.createElement("path",{fill:"#000",d:"M4.1 20a3.966 3.966 0 0 1-2.05-.555 4.15 4.15 0 0 1-1.496-1.498A3.982 3.982 0 0 1 0 15.895V4.133c0-.758.185-1.442.554-2.052A4.15 4.15 0 0 1 2.05.583 3.966 3.966 0 0 1 4.1.028h11.743c.738 0 1.412.185 2.022.555A4.15 4.15 0 0 1 19.36 2.08c.388.61.582 1.294.582 2.052v11.762a3.83 3.83 0 0 1-.582 2.052 4.15 4.15 0 0 1-1.495 1.498c-.61.37-1.284.555-2.022.555H4.099Zm.193-4.327h11.3V4.355h-11.3v11.318ZM22.992 20V.028h4.432L34.182 8.1l6.73-8.072h4.46V20H41.05V6.602l-6.87 8.21-6.896-8.182V20h-4.293Zm25.696 0V.028h4.431l11.162 13.315V.028h4.348V20h-4.431L52.98 6.63V20h-4.294Zm22.352 0V.028h4.238V20H71.04Zm14.963 0V0h4.293v15.673h12.554V20H86.003Zm18.489 0V0h4.293v15.673h12.554V20h-16.847Zm18.717 0V4.133c0-.758.185-1.442.554-2.052a4.156 4.156 0 0 1 1.496-1.498 3.966 3.966 0 0 1 2.049-.555h11.716c.757 0 1.441.185 2.05.555.628.37 1.126.869 1.495 1.498.388.61.582 1.294.582 2.052V20h-4.348v-6.435h-11.301V20h-4.293Zm4.293-10.763h11.301V4.355h-11.301v4.882ZM146.307 20V.028h4.432l6.758 8.072 6.73-8.072h4.459V20h-4.32V6.602l-6.869 8.21L150.6 6.63V20h-4.293Zm25.751 0V4.133c0-.758.185-1.442.554-2.052a4.148 4.148 0 0 1 1.496-1.498 3.966 3.966 0 0 1 2.049-.555h11.716c.757 0 1.44.185 2.05.555.628.37 1.126.869 1.496 1.498A3.75 3.75 0 0 1 192 4.133V20h-4.348v-6.435h-11.301V20h-4.293Zm4.293-10.763h11.301V4.355h-11.301v4.882Z"})),yL="Header-module__root__Pe4MYp",bL="Header-module__nav__wtnkmT",wL="Header-module__navItem__-Fy63Z",SL="Header-module__logo__xO2bWO",xr={root:yL,nav:bL,navItem:wL,logo:SL},LL={llama:mL,default:vL},EL=()=>{const{hideLogo:t,logo:e="default"}=tt();if(t)return null;const n=LL[e];return C.jsx("div",{className:xr.logo,children:C.jsx(n,{})})},xL=({className:t})=>{const{t:e}=Nt("header"),{disableDelivery:n}=tt(),r=Le(eh),i=vt(js);u.useEffect(()=>{i?Le.getState().setMode("location_delivery"):Le.getState().setMode("self_pickup")},[i]);const o=()=>{vt.getState().setDeliverPoint(null),Le.getState().setMode("self_pickup")},s=()=>{vt.getState().setDeliverPoint(null),Le.getState().setMode("location_delivery")},a=r==="self_pickup",l=r==="location_delivery";return C.jsxs("div",{className:ve(xr.root,t),children:[C.jsx(EL,{}),C.jsxs("nav",{className:xr.nav,children:[!n&&C.jsx(Lt,{as:"link",className:xr.navItem,variant:a?"primary":"secondary",onClick:o,children:e("self_pickup")}),!n&&C.jsx(Lt,{as:"link",className:xr.navItem,variant:l?"primary":"secondary",onClick:s,children:e("courier_delivery")}),C.jsx(td,{})]})]})},CL=u.memo(xL),_L={open:!1},Xn=cn(t=>({..._L,toggle(e){Le.getState().setDetailsOpen(!1),vt.getState().setDeliverPoint(null),Gt.getState().setSelectedLocation(null),t(n=>({open:e??!n.open}))}})),ML="Layout-module__root__qzPL-f",OL="Layout-module__headerHidden__JEN-d0",kL="Layout-module__sidebarHidden__x017O3",PL="Layout-module__sidebarOpen__IZnIjs",wi={root:ML,headerHidden:OL,sidebarHidden:kL,sidebarOpen:PL},RL=({children:t})=>{const{hideFilters:e,hideHeader:n}=tt(),r=Xn(i=>i.open);return C.jsx("div",{className:ve(wi.root,{[wi.sidebarOpen]:r,[wi.headerHidden]:n,[wi.sidebarHidden]:e}),children:t})},aa=()=>C.jsx(yc,{children:C.jsx(Fi,{})}),TL=({children:t})=>{const e=On(Np);return On(lc)&&!e?C.jsx(aa,{}):C.jsx(C.Fragment,{children:t})};var nd={},vo={},rd={exports:{}},AL="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",DL=AL,IL=DL;function id(){}function od(){}od.resetWarningCache=id;var NL=function(){function t(r,i,o,s,a,l){if(l!==IL){var c=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 c.name="Invariant Violation",c}}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:od,resetWarningCache:id};return n.PropTypes=n,n};rd.exports=NL();var jL=rd.exports,mo={},Yn={};Object.defineProperty(Yn,"__esModule",{value:!0});Yn.loadGoogleMapScript=Yn.isBrowser=void 0;var sd=typeof window<"u"&&window.document;Yn.isBrowser=sd;var BL=function(e,n){if(!sd||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)})};Yn.loadGoogleMapScript=BL;var yo={};Object.defineProperty(yo,"__esModule",{value:!0});yo.GOOGLE_MAP_SCRIPT_BASE_URL=void 0;var UL="https://maps.googleapis.com/maps/api/js";yo.GOOGLE_MAP_SCRIPT_BASE_URL=UL;function Ni(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ni=function(n){return typeof n}:Ni=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ni(t)}Object.defineProperty(mo,"__esModule",{value:!0});mo.default=WL;var pt=FL(u),Ho=Yn,VL=yo;function ad(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(ad=function(i){return i?n:e})(t)}function FL(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||Ni(t)!=="object"&&typeof t!="function")return{default:t};var n=ad(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 Su(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 Lu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Su(Object(n),!0).forEach(function(r){zL(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Su(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function zL(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $L(t,e){if(t==null)return{};var n=HL(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 HL(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 WL(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 c=l.types,f=c===void 0?["(cities)"]:c,d=l.componentRestrictions,p=l.fields,v=p===void 0?["address_components","geometry.location","place_id","formatted_address"]:p,y=l.bounds,g=$L(l,["types","componentRestrictions","fields","bounds"]),S=t.googleMapsScriptBaseUrl,w=S===void 0?VL.GOOGLE_MAP_SCRIPT_BASE_URL:S,L=t.language,m=(0,pt.useRef)(null),_=(0,pt.useRef)(null),E=(0,pt.useRef)(null),h=(0,pt.useRef)(null),b=L?"&language=".concat(L):"",x="".concat(w,"?libraries=").concat(o,"&key=").concat(r).concat(b),k=(0,pt.useCallback)(function(){return(0,Ho.loadGoogleMapScript)(w,x)},[w,x]);return(0,pt.useEffect)(function(){var M=Lu(Lu({},g),{},{fields:v,types:f,bounds:y});if(d&&(M.componentRestrictions=d),!(E.current||!m.current||!Ho.isBrowser)){e&&!e.current&&(e.current=m.current);var P=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,M),E.current&&(_.current=E.current.addListener("place_changed",function(){n&&E&&E.current&&n(E.current.getPlace(),m.current,E.current)}))};return r?k().then(function(){return P()}):P(),function(){return _.current?_.current.remove():void 0}}},[]),(0,pt.useEffect)(function(){var M;!(pt.default!==null&&pt.default!==void 0&&(M=pt.default.version)!==null&&M!==void 0&&M.startsWith("18"))&&Ho.isBrowser&&window.MutationObserver&&m.current&&m.current instanceof HTMLInputElement&&(h.current=new MutationObserver(function(){h.current.disconnect(),m.current&&(m.current.autocomplete=a)}),h.current.observe(m.current,{attributes:!0,attributeFilter:["autocomplete"]}))},[a]),(0,pt.useEffect)(function(){E.current&&E.current.setFields(v)},[v]),(0,pt.useEffect)(function(){E.current&&E.current.setBounds(y)},[y]),(0,pt.useEffect)(function(){E.current&&E.current.setComponentRestrictions(d)},[d]),(0,pt.useEffect)(function(){E.current&&E.current.setOptions(g)},[g]),{ref:m,autocompleteRef:E}}function ji(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ji=function(n){return typeof n}:ji=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ji(t)}Object.defineProperty(vo,"__esModule",{value:!0});vo.default=void 0;var Is=ZL(u),He=ld(jL),GL=ld(mo);function ld(t){return t&&t.__esModule?t:{default:t}}function ud(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(ud=function(i){return i?n:e})(t)}function ZL(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||ji(t)!=="object"&&typeof t!="function")return{default:t};var n=ud(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 no(){return no=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},no.apply(this,arguments)}function qL(t,e){if(t==null)return{};var n=KL(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 KL(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 cd(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,c=qL(t,["onPlaceSelected","apiKey","libraries","inputAutocompleteValue","options","googleMapsScriptBaseUrl","refProp","language"]),f=(0,GL.default)({ref:a,googleMapsScriptBaseUrl:s,onPlaceSelected:e,apiKey:n,libraries:r,inputAutocompleteValue:i,options:o,language:l}),d=f.ref;return Is.default.createElement("input",no({ref:d},c))}cd.propTypes={apiKey:He.default.string,libraries:He.default.arrayOf(He.default.string),ref:He.default.oneOfType([He.default.func,He.default.shape({current:He.default.any})]),googleMapsScriptBaseUrl:He.default.string,onPlaceSelected:He.default.func,inputAutocompleteValue:He.default.string,options:He.default.shape({componentRestrictions:He.default.object,bounds:He.default.object,location:He.default.object,offset:He.default.number,origin:He.default.object,radius:He.default.number,sessionToken:He.default.object,types:He.default.arrayOf(He.default.string)}),language:He.default.string};var JL=(0,Is.forwardRef)(function(t,e){return Is.default.createElement(cd,no({},t,{refProp:e}))});vo.default=JL;(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(vo),n=r(mo);function r(i){return i&&i.__esModule?i:{default:i}}})(nd);var fd=nd;const XL="Aside-module__root__EotK2f",YL="Aside-module__open__Zwmbs5",QL="Aside-module__overlay__slLdHF",e1="Aside-module__container__28P4wq",Si={root:XL,open:YL,overlay:QL,container:e1},t1=({children:t,className:e,open:n})=>C.jsxs("div",{className:ve(Si.root,e,{[Si.open]:n}),children:[C.jsx("div",{className:Si.overlay}),C.jsx("div",{className:Si.container,children:t})]}),n1="Input-module__root__TF9IiD",r1="Input-module__endAdornment__m40K5R",i1="Input-module__input__505b7i",o1="Input-module__startAdornment__D-sJ0N",s1="Input-module__label__gmqtsf",a1="Input-module__inputContainer__vubIa-",Bn={root:n1,endAdornment:r1,input:i1,startAdornment:o1,label:s1,inputContainer:a1},dd=u.forwardRef(({className:t,endAdornment:e,inputRef:n,label:r,onBlur:i,onChange:o,startAdornment:s,...a},l)=>{const c=u.useId(),f=u.useRef(null);u.useImperativeHandle(l,()=>({focus:()=>{var p;(p=f.current)==null||p.focus()},blur:()=>{var p;(p=f.current)==null||p.blur()},setValue:p=>{if(o){o({target:{value:p}});return}if(i){i({target:{value:p}});return}f.current&&(f.current.value=p)}}),[i,o]);const d=Qf(n,f);return C.jsxs("label",{htmlFor:a.id??c,className:ve(Bn.root,t),children:[r&&C.jsx("span",{className:Bn.label,children:r}),C.jsxs("div",{className:Bn.inputContainer,children:[s&&C.jsx("div",{className:Bn.startAdornment,children:s}),C.jsx("input",{...a,ref:d,id:a.id??c,className:Bn.input,onChange:o,onBlur:i}),e&&C.jsx("div",{className:Bn.endAdornment,children:e})]})]})}),l1="LocationAside-module__submit__CSKcqi",u1="LocationAside-module__container__S1NejR",c1="LocationAside-module__selector__hl74ke",f1="LocationAside-module__label__0Zk8at",d1="LocationAside-module__header__N1wgyn",h1="LocationAside-module__close__VsE88z",Li={submit:l1,container:u1,selector:c1,label:f1,header:d1,close:h1},p1=u.forwardRef((t,e)=>{const{t:n}=Nt(["location_aside","common"]),r=Ln(sL),{country:i,hideCloseButtonOnLocationScreen:o,inputs:s,onCloseLocationSelector:a,onLocationSelect:l}=tt(),c=u.useRef(null),[f,d]=u.useState("");u.useImperativeHandle(e,()=>({open:()=>Ln.getState().toggle(!0),close:()=>Ln.getState().toggle(!1)}),[]);const p=async L=>{Ln.getState().toggle(!1),await Dt.getState().setPlace(L),l==null||l(L),L!=null&&L.formatted_address&&d(L==null?void 0:L.formatted_address)},v=()=>{Ln.getState().toggle(!1),a==null||a()},y=i?{componentRestrictions:{country:i}}:void 0,g=L=>{d(L.target.value)},{ref:S}=fd.usePlacesWidget({libraries:["places"],options:y,onPlaceSelected:p,apiKey:"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA",inputAutocompleteValue:f}),w=to(s==null?void 0:s.city);return C.jsx(t1,{open:r,children:C.jsx("div",{ref:c,className:Li.container,children:C.jsxs("div",{className:Li.selector,children:[C.jsxs("div",{className:Li.header,children:[C.jsx("div",{className:Li.label,children:n("choose_city")}),!o&&C.jsx(Hr,{position:"relative",onClick:v})]}),C.jsx(dd,{...w,inputRef:S,value:f,placeholder:n("placeholder"),onChange:g})]})})})}),g1=u.memo(p1),v1=({children:t})=>{const{locale:e}=tt(),{isLoaded:n}=xc({language:e,libraries:Cd,googleMapsApiKey:"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA"});return n?C.jsx(C.Fragment,{children:t}):C.jsx(aa,{})},m1=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},oe.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"})),y1=({className:t})=>{const{t:e}=Nt("location_selector"),{country:n,inputs:r,onLocationSelect:i}=tt(),[o,s]=u.useState(""),[a,l]=u.useState(!1),c=[],f=n?{componentRestrictions:{country:n},types:c}:{types:c},d=async L=>{await Dt.getState().setPlaceAndPoint(L),i==null||i(L)},{ref:p}=fd.usePlacesWidget({libraries:["places"],options:f,onPlaceSelected:d,inputAutocompleteValue:o}),v=L=>{a&&Le.getState().setBlurred(!!L.target.value),s(L.target.value)},y=()=>{o&&Le.getState().setBlurred(!0),Le.getState().setDetailsOpen(!1),vt.getState().setDeliverPoint(null),Gt.getState().setSelectedLocation(null),l(!0)},g=()=>{Le.getState().setBlurred(!1),l(!1)},S=L=>{L.key==="Enter"&&L.preventDefault()},w=to(r==null?void 0:r.address);return C.jsx(dd,{...w,inputRef:p,value:o,className:t,endAdornment:C.jsx(m1,{}),placeholder:e("placeholder"),onChange:v,onFocus:y,onBlur:g,onKeyDown:S})},b1=({className:t})=>Le(rh)?C.jsx(y1,{className:t}):null,w1=u.memo(b1),S1="DeliveryDetailsModal-module__root__qwKnjX",L1={root:S1},E1=({className:t,location:e,onClose:n,onSubmit:r})=>C.jsx("div",{className:ve(L1.root,t),children:C.jsx(Yf,{location:e,onClose:n,onSubmit:r})}),x1="LocationDetailsModal-module__root__PyRnLM",C1={root:x1},_1=({className:t,location:e,onClose:n,onSubmit:r})=>{const i=()=>{r==null||r(e)};return C.jsx("div",{className:ve(C1.root,t),children:C.jsx(qc,{location:e,onClose:n,onSubmit:i})})},M1="MapContainer-module__root__1Os6Q-",O1="MapContainer-module__mapWrapper__Cwe7qC",k1="MapContainer-module__wrapperBlurred__04NN2L",P1="MapContainer-module__locationSelector__Pr1zS-",R1="MapContainer-module__filterButton__CW3Qv7",T1="MapContainer-module__sidebarOpen__lGMVrJ",A1="MapContainer-module__filterIcon__T01XsJ",D1="MapContainer-module__details__gM8LWX",At={root:M1,mapWrapper:O1,wrapperBlurred:k1,locationSelector:P1,filterButton:R1,sidebarOpen:T1,filterIcon:A1,details:D1},I1=()=>{const{onPointClick:t}=tt(),e=Le(Bs),n=Gt(sh),r=vt(js),i=u.useCallback(()=>{Le.getState().setDetailsOpen(!1)},[]),o=u.useCallback(s=>{t==null||t(s),Le.getState().setDetailsOpen(!1),Gt.getState().setSelectedLocation(null),vt.getState().setDeliverPoint(null)},[t]);return C.jsxs(C.Fragment,{children:[(r==null?void 0:r.address)&&e&&C.jsx(E1,{location:r,className:At.details,onClose:i,onSubmit:o}),n&&e&&C.jsx(_1,{location:n,className:At.details,onClose:i,onSubmit:o})]})},N1=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:60,height:40,fill:"none",viewBox:"0 0 60 40",...t},oe.createElement("path",{d:"M0 0h52a8 8 0 0 1 8 8v24a8 8 0 0 1-8 8H0V0Z"}),oe.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"})),j1=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:28,height:28,fill:"none",viewBox:"0 0 28 28",...t},oe.createElement("rect",{width:28,height:28,fill:"#333",rx:4}),oe.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"})),B1=()=>{const t=Xn(i=>i.open),e=Xn(i=>i.toggle),n=Zr("screenSm"),r=()=>{e(!0)};return C.jsxs("div",{role:"presentation",className:ve(At.filterButton,{[At.sidebarOpen]:t}),onClick:n?void 0:r,children:[n&&C.jsx(td,{}),n?C.jsx(j1,{className:At.filterIcon,onClick:r}):C.jsx(N1,{className:At.filterIcon})]})},U1=({children:t,className:e})=>{const{hideFilters:n,hideSearchInput:r}=tt(),i=Le(nh),o=Le(Bs);return C.jsxs("div",{className:ve(At.root,e),children:[!r&&!o&&C.jsx(w1,{className:At.locationSelector}),!n&&C.jsx(B1,{}),C.jsx("div",{className:ve(At.mapWrapper,{[At.wrapperBlurred]:i}),children:t}),C.jsx(I1,{})]})},V1=u.memo(U1),F1="Separator-module__root__eQtZey",z1={root:F1},Wo=({className:t,...e})=>C.jsx("hr",{className:ve(z1.root,t),...e}),$1="Sidebar-module__root__4j1MA3",H1="Sidebar-module__closeButton__HLXy1c",W1="Sidebar-module__open__mqQXF6",G1="Sidebar-module__header__Afp6uz",Z1="Sidebar-module__typeFilter__GN46u9",q1="Sidebar-module__separator__6I4QoJ",K1="Sidebar-module__withRightPadding__2u1Ina",J1="Sidebar-module__sheetContent__SaoncI",X1="Sidebar-module__doneButton__4aeaSD",$t={root:$1,closeButton:H1,open:W1,header:G1,typeFilter:Z1,separator:q1,withRightPadding:K1,sheetContent:J1,doneButton:X1},Y1=()=>{const{t}=Nt("common"),e=Zr("screenSm"),n=Xn(i=>i.toggle),r=()=>{n(!1)};return C.jsxs("div",{className:$t.header,children:[e&&C.jsx("div",{role:"presentation",className:$t.doneButton,onClick:r,children:t("done")}),!e&&C.jsx(Hr,{className:$t.closeButton,onClick:r})]})},Q1="Radio-module__root__7ElY2W",eE="Radio-module__label__c-sYW3",Eu={root:Q1,label:eE},tE=({className:t,label:e,labelProps:n={},...r})=>{const i=u.useId(),{className:o,...s}=n;return C.jsxs("label",{htmlFor:i,className:ve(Eu.label,o),...s,children:[C.jsx("input",{id:i,type:"radio",className:ve(Eu.root,t),...r}),e]})},Wn=t=>C.jsx(tE,{...t,type:"checkbox"}),nE="RadioGroup-module__root__ewZw-x",rE="RadioGroup-module__body__k8BJAs",iE="RadioGroup-module__legend__tcfV7q",Go={root:nE,body:rE,legend:iE},hd=({children:t,className:e,label:n,onChange:r,value:i,...o})=>C.jsxs("div",{className:ve(Go.root,e),...o,children:[n&&C.jsx("span",{className:Go.legend,children:n}),C.jsx("div",{className:Go.body,children:u.Children.map(t,s=>u.isValidElement(s)?u.cloneElement(s,{checked:!!(i!=null&&i[s.props.value]),onChange:a=>r==null?void 0:r({...i,[a.target.value]:a.target.checked})}):null)})]}),oE=({className:t,onChange:e})=>{const{t:n}=Nt("receive_filter"),r=ln(ch);return C.jsxs(hd,{value:r,label:n("title"),className:t,onChange:e,children:[C.jsx(Wn,{name:"receive",value:Ot.DressingRoom,label:n("dressing_room")}),C.jsx(Wn,{name:"receive",value:Ot.CheckOrder,label:n("check_order")}),C.jsx(Wn,{name:"receive",value:Ot.PayByCash,label:n("pay_by_cash")})]})},sE=u.memo(oE),aE=({className:t,onChange:e})=>{const{t:n}=Nt("send_filter"),r=ln(uh);return C.jsxs(hd,{className:t,value:r,label:n("title"),onChange:e,children:[C.jsx(Wn,{name:"send",value:kt.Return,label:n("sending_returns")}),C.jsx(Wn,{name:"send",value:kt.Shipping,label:n("shipping")}),C.jsx(Wn,{name:"send",value:kt.Payment,label:n("payment")})]})},lE=u.memo(aE),uE="TypeFilter-module__root__WH5EQV",cE="TypeFilter-module__button__f0mSfo",Ei={root:uE,button:cE},fE=({className:t,onChange:e,value:n})=>{const{t:r}=Nt("type_filter"),i=o=>()=>e==null?void 0:e(o);return C.jsxs("div",{className:ve(Ei.root,t),children:[C.jsx(Lt,{className:Ei.button,variant:n===zt.All?"primary":"secondary",onClick:i(zt.All),children:r("all")}),C.jsx(Lt,{className:Ei.button,variant:n===zt.PostOffice?"primary":"secondary",onClick:i(zt.PostOffice),children:r("post_office")}),C.jsx(Lt,{className:Ei.button,variant:n===zt.PickPoint?"primary":"secondary",onClick:i(zt.PickPoint),children:r("pick_point")})]})},dE=({className:t,onChange:e})=>{const n=ln(lh);return C.jsx(fE,{value:n,className:t,onChange:e})},hE=u.memo(dE),pE=({className:t})=>{const e=Zr("screenSm"),n=Xn(l=>l.open),r=u.useCallback(l=>ln.getState().setFilter({type:l}),[]),i=u.useCallback(l=>ln.getState().setFilter({send:l}),[]),o=u.useCallback(l=>ln.getState().setFilter({receive:l}),[]),s=u.useCallback(()=>Xn.getState().toggle(!1),[]),a=C.jsxs(C.Fragment,{children:[C.jsx(Y1,{}),C.jsxs("div",{className:$t.withRightPadding,children:[C.jsx(hE,{className:$t.typeFilter,onChange:r}),C.jsx(Wo,{className:$t.separator}),C.jsx(sE,{onChange:o}),C.jsx(Wo,{}),C.jsx(lE,{onChange:i}),C.jsx(Wo,{})]})]});return e?C.jsx(qf,{initialFocusRef:!1,open:n,snapPoints:({maxHeight:l})=>l-Kf,onDismiss:s,children:C.jsx("div",{className:$t.sheetContent,children:a})}):C.jsx("div",{className:ve($t.root,t,{[$t.open]:n}),children:a})},gE="App-module__map__Kf-2JS",vE="App-module__sidebar__ORIzGk",mE="App-module__header__bgP9DA",Zo={map:gE,sidebar:vE,header:mE},yE=({config:t,options:e})=>{const n=Xp(t),{INN:r,hideFilters:i,hideHeader:o,locale:s,map:a}=n;Wt(r,"INN is required"),Yp(r,e),Wt(a==null?void 0:a.provider,"Map provider is required");const l=GS(a.provider);jp();const c=lL({locale:s});return C.jsx(Pu.Provider,{value:n,children:C.jsx(cL,{children:C.jsx(uL,{children:C.jsx(Lm,{tolgee:ed,fallback:C.jsx(aa,{}),children:c&&C.jsx(v1,{children:C.jsx(TL,{children:C.jsxs(RL,{children:[!o&&C.jsx(CL,{className:Zo.header}),!i&&C.jsx(pE,{className:Zo.sidebar}),C.jsx(V1,{className:Zo.map,children:C.jsx(l,{})}),C.jsx(g1,{})]})})})})})})})},pd=async t=>Br.request({baseURL:"https://api.geo-data.omnic.solutions/api/1.0/",method:"POST",url:"normalize/address",data:t,headers:{Authorization:"Token 9877f9631b2e30570cc1c5aa8c740b0c912efe99a8b6c45c21cf4bd394adc7e9"}});exports.EReceiveFilter=Ot;exports.ESendFilter=kt;exports.ETypeFilter=zt;exports.Widget=yE;exports.createPointsIterator=ts;exports.fetchPointsRequest=es;exports.fromHoursMinutesToMinutes=fh;exports.fromMinutesToHoursMinutes=dh;exports.getAddressFormGeocode=is;exports.getBoundsFromPoint=hh;exports.getCurrentPosition=Ws;exports.getNormalizedAddress=pd;exports.getPropertyValue=ac;exports.isCoordinates=rs;exports.isDeliveryPoint=Ap;exports.isHttpSuccess=sc;exports.isPlaceId=oc;exports.replaceSvgCurrentColor=Vn;exports.setWidgetCSSProperty=uo;exports.stopImmediatePropagation=ns;exports.svgStringToBase64URL=Gs;
|