@omnic/widget-locations 1.1.7 → 1.1.8
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/dist/lib/widget.cjs.js +3 -3
- package/dist/lib/widget.esm.js +753 -753
- package/package.json +3 -3
package/dist/lib/widget.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react/jsx-runtime"),u=require("react"),dr=require("react-dom"),$i=require("react-dom/server");function ou(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 ce=ou(u),su=ou(dr);function Mo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Xd=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}},Qd=Xd;const mn=Mo(Qd);let vi;const eh=new Uint8Array(16);function th(){if(!vi&&(vi=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!vi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return vi(eh)}const it=[];for(let t=0;t<256;++t)it.push((t+256).toString(16).slice(1));function nh(t,e=0){return it[t[e+0]]+it[t[e+1]]+it[t[e+2]]+it[t[e+3]]+"-"+it[t[e+4]]+it[t[e+5]]+"-"+it[t[e+6]]+it[t[e+7]]+"-"+it[t[e+8]]+it[t[e+9]]+"-"+it[t[e+10]]+it[t[e+11]]+it[t[e+12]]+it[t[e+13]]+it[t[e+14]]+it[t[e+15]]}const rh=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ba={randomUUID:rh};function au(t,e,n){if(Ba.randomUUID&&!e&&!t)return Ba.randomUUID();t=t||{};const r=t.random||(t.rng||th)();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 nh(r)}const bs=au(),lo=au(),Xt=[48,66],Yn=[58,80],oa=6,co=[49.3478969,14.0983344],lu="en",ih=["places","geocoding"],Mn={logo:"default",locale:lu,map:{provider:"google",center:co,initialZoom:oa}},cu=u.createContext(Mn),st=()=>u.useContext(cu);var Kt=(t=>(t[t.All=0]="All",t[t.PickPoint=20]="PickPoint",t[t.PostOffice=30]="PostOffice",t))(Kt||{}),Dt=(t=>(t[t.PayByCash=0]="PayByCash",t[t.DressingRoom=1]="DressingRoom",t[t.CheckOrder=2]="CheckOrder",t))(Dt||{}),It=(t=>(t[t.Return=0]="Return",t[t.Payment=1]="Payment",t[t.Shipping=2]="Shipping",t))(It||{}),oh={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:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react/jsx-runtime"),u=require("react"),dr=require("react-dom"),$i=require("react-dom/server");function ou(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 ce=ou(u),su=ou(dr);function Mo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Xd=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}},Qd=Xd;const mn=Mo(Qd);let vi;const eh=new Uint8Array(16);function th(){if(!vi&&(vi=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!vi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return vi(eh)}const it=[];for(let t=0;t<256;++t)it.push((t+256).toString(16).slice(1));function nh(t,e=0){return it[t[e+0]]+it[t[e+1]]+it[t[e+2]]+it[t[e+3]]+"-"+it[t[e+4]]+it[t[e+5]]+"-"+it[t[e+6]]+it[t[e+7]]+"-"+it[t[e+8]]+it[t[e+9]]+"-"+it[t[e+10]]+it[t[e+11]]+it[t[e+12]]+it[t[e+13]]+it[t[e+14]]+it[t[e+15]]}const rh=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ba={randomUUID:rh};function au(t,e,n){if(Ba.randomUUID&&!e&&!t)return Ba.randomUUID();t=t||{};const r=t.random||(t.rng||th)();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 nh(r)}const bs=au(),lo=au(),Xt=[48,66],Yn=[58,80],oa=6,co=[49.3478969,14.0983344],lu="en",ih=["places","geocoding"],Mn={logo:"default",locale:lu,map:{provider:"google",center:co,initialZoom:oa}},cu=u.createContext(Mn),st=()=>u.useContext(cu);var Kt=(t=>(t[t.All=0]="All",t[t.PickPoint=20]="PickPoint",t[t.PostOffice=30]="PostOffice",t))(Kt||{}),Dt=(t=>(t[t.PayByCash=0]="PayByCash",t[t.DressingRoom=1]="DressingRoom",t[t.CheckOrder=2]="CheckOrder",t))(Dt||{}),It=(t=>(t[t.Return=0]="Return",t[t.Payment=1]="Payment",t[t.Shipping=2]="Shipping",t))(It||{}),oh={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 Ua=t=>{let e;const n=new Set,r=(l,c)=>{const f=typeof l=="function"?l(e):l;if(!Object.is(f,e)){const d=e;e=c??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(h=>h(e,d))}},i=()=>e,a={setState:r,getState:i,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{(oh?"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()}};return e=t(r,i,a),a},sh=t=>t?Ua(t):Ua;var uu={exports:{}},fu={},du={exports:{}},hu={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* use-sync-external-store-shim.production.min.js
|
|
4
4
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
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 ko=u,mh=vh;function yh(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var bh=typeof Object.is=="function"?Object.is:yh,wh=mh.useSyncExternalStore,Sh=ko.useRef,Lh=ko.useEffect,Eh=ko.useMemo,xh=ko.useDebugValue;fu.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=Sh(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=Eh(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,bh(f,v))return y;var p=r(v);return i!==void 0&&i(y,p)?y:(f=v,d=p)}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=wh(t,o[0],o[1]);return Lh(function(){s.hasValue=!0,s.value=a},[a]),xh(a),a};uu.exports=fu;var Ch=uu.exports;const _h=Mo(Ch);var pu={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_gfpwi2dimy3domrsnezham3ugbvw24tfm5vwk3bqgntxa",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:Oh}=u,{useSyncExternalStoreWithSelector:Mh}=_h;let Va=!1;function kh(t,e=t.getState,n){(pu?"production":void 0)!=="production"&&n&&!Va&&(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"),Va=!0);const r=Mh(t.subscribe,t.getState,t.getServerState||t.getState,e,n);return Oh(r),r}const Fa=t=>{(pu?"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"?sh(t):t,n=(r,i)=>kh(e,r,i);return Object.assign(n,e),n},bn=t=>t?Fa(t):Fa,Ph={location:null},Po=t=>t.location,We=bn()(t=>({...Ph,setDeliverPoint(e){t({location:e})}})),Rh={map:null,mode:"self_pickup",bounds:null,blurred:!1,loaded:!1,loading:!0,detailsOpen:!1},gu=t=>t.map,Th=t=>t.mode,Ah=t=>t.bounds,Dh=t=>t.blurred,Ih=t=>t.loaded,jh=t=>t.loading,sa=t=>t.detailsOpen,ye=bn()(t=>({...Rh,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})}})),Nh={location:null},Bh=t=>t.location,bt=bn()(t=>({...Nh,setSelectedLocation(e){t({location:e})}})),Uh={query:"",type:Kt.All,hours:["08:00","22:00"],send:{[It.Return]:!1,[It.Payment]:!1,[It.Shipping]:!1},receive:{[Dt.PayByCash]:!1,[Dt.CheckOrder]:!1,[Dt.DressingRoom]:!1}},Vh=t=>t.type,Fh=t=>t.send,zh=t=>t.receive,Qt=bn(t=>({...Uh,setFilter(e){ye.getState().setDetailsOpen(!1),We.getState().setDeliverPoint(null),bt.getState().setSelectedLocation(null),t(e)}})),$h=t=>{const[e,n]=t.split(":");return Number(e)*60+Number(n)},Hh=t=>{const e=Math.floor(t/60),n=t%60;return`${e<10?`0${e}`:e}:${n<10?`0${n}`:n}`},Gh=(t,e)=>[[t[0]-e,t[0]+e],[t[1]-e,t[1]+e]];function vu(t,e){return function(){return t.apply(e,arguments)}}const{toString:Zh}=Object.prototype,{getPrototypeOf:aa}=Object,Ro=(t=>e=>{const n=Zh.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ht=t=>(t=t.toLowerCase(),e=>Ro(e)===t),To=t=>e=>typeof e===t,{isArray:hr}=Array,ti=To("undefined");function Wh(t){return t!==null&&!ti(t)&&t.constructor!==null&&!ti(t.constructor)&&_t(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const mu=Ht("ArrayBuffer");function qh(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&mu(t.buffer),e}const Kh=To("string"),_t=To("function"),yu=To("number"),Ao=t=>t!==null&&typeof t=="object",Jh=t=>t===!0||t===!1,Hi=t=>{if(Ro(t)!=="object")return!1;const e=aa(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Yh=Ht("Date"),Xh=Ht("File"),Qh=Ht("Blob"),ep=Ht("FileList"),tp=t=>Ao(t)&&_t(t.pipe),np=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||_t(t.append)&&((e=Ro(t))==="formdata"||e==="object"&&_t(t.toString)&&t.toString()==="[object FormData]"))},rp=Ht("URLSearchParams"),ip=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function li(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),hr(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 bu(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 wu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Su=t=>!ti(t)&&t!==wu;function ws(){const{caseless:t}=Su(this)&&this||{},e={},n=(r,i)=>{const o=t&&bu(e,i)||i;Hi(e[o])&&Hi(r)?e[o]=ws(e[o],r):Hi(r)?e[o]=ws({},r):hr(r)?e[o]=r.slice():e[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&li(arguments[r],n);return e}const op=(t,e,n,{allOwnKeys:r}={})=>(li(e,(i,o)=>{n&&_t(i)?t[o]=vu(i,n):t[o]=i},{allOwnKeys:r}),t),sp=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),ap=(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)},lp=(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&&aa(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},cp=(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},up=t=>{if(!t)return null;if(hr(t))return t;let e=t.length;if(!yu(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},fp=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&aa(Uint8Array)),dp=(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])}},hp=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},pp=Ht("HTMLFormElement"),gp=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),za=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),vp=Ht("RegExp"),Lu=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};li(n,(i,o)=>{let s;(s=e(i,o,t))!==!1&&(r[o]=s||i)}),Object.defineProperties(t,r)},mp=t=>{Lu(t,(e,n)=>{if(_t(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(_t(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+"'")})}})},yp=(t,e)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return hr(t)?r(t):r(String(t).split(e)),n},bp=()=>{},wp=(t,e)=>(t=+t,Number.isFinite(t)?t:e),Zo="abcdefghijklmnopqrstuvwxyz",$a="0123456789",Eu={DIGIT:$a,ALPHA:Zo,ALPHA_DIGIT:Zo+Zo.toUpperCase()+$a},Sp=(t=16,e=Eu.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function Lp(t){return!!(t&&_t(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Ep=t=>{const e=new Array(10),n=(r,i)=>{if(Ao(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const o=hr(r)?[]:{};return li(r,(s,a)=>{const l=n(s,i+1);!ti(l)&&(o[a]=l)}),e[i]=void 0,o}}return r};return n(t,0)},xp=Ht("AsyncFunction"),Cp=t=>t&&(Ao(t)||_t(t))&&_t(t.then)&&_t(t.catch),N={isArray:hr,isArrayBuffer:mu,isBuffer:Wh,isFormData:np,isArrayBufferView:qh,isString:Kh,isNumber:yu,isBoolean:Jh,isObject:Ao,isPlainObject:Hi,isUndefined:ti,isDate:Yh,isFile:Xh,isBlob:Qh,isRegExp:vp,isFunction:_t,isStream:tp,isURLSearchParams:rp,isTypedArray:fp,isFileList:ep,forEach:li,merge:ws,extend:op,trim:ip,stripBOM:sp,inherits:ap,toFlatObject:lp,kindOf:Ro,kindOfTest:Ht,endsWith:cp,toArray:up,forEachEntry:dp,matchAll:hp,isHTMLForm:pp,hasOwnProperty:za,hasOwnProp:za,reduceDescriptors:Lu,freezeMethods:mp,toObjectSet:yp,toCamelCase:gp,noop:bp,toFiniteNumber:wp,findKey:bu,global:wu,isContextDefined:Su,ALPHABET:Eu,generateString:Sp,isSpecCompliantForm:Lp,toJSONObject:Ep,isAsyncFn:xp,isThenable:Cp};function Se(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)}N.inherits(Se,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:N.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const xu=Se.prototype,Cu={};["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=>{Cu[t]={value:t}});Object.defineProperties(Se,Cu);Object.defineProperty(xu,"isAxiosError",{value:!0});Se.from=(t,e,n,r,i,o)=>{const s=Object.create(xu);return N.toFlatObject(t,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),Se.call(s,t.message,e,n,r,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};const _p=null;function Ss(t){return N.isPlainObject(t)||N.isArray(t)}function _u(t){return N.endsWith(t,"[]")?t.slice(0,-2):t}function Ha(t,e,n){return t?t.concat(e).map(function(i,o){return i=_u(i),!n&&o?"["+i+"]":i}).join(n?".":""):e}function Op(t){return N.isArray(t)&&!t.some(Ss)}const Mp=N.toFlatObject(N,{},null,function(e){return/^is[A-Z]/.test(e)});function Do(t,e,n){if(!N.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=N.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,L){return!N.isUndefined(L[p])});const r=n.metaTokens,i=n.visitor||f,o=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&N.isSpecCompliantForm(e);if(!N.isFunction(i))throw new TypeError("visitor must be a function");function c(y){if(y===null)return"";if(N.isDate(y))return y.toISOString();if(!l&&N.isBlob(y))throw new Se("Blob is not supported. Use a Buffer instead.");return N.isArrayBuffer(y)||N.isTypedArray(y)?l&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function f(y,p,L){let w=y;if(y&&!L&&typeof y=="object"){if(N.endsWith(p,"{}"))p=r?p:p.slice(0,-2),y=JSON.stringify(y);else if(N.isArray(y)&&Op(y)||(N.isFileList(y)||N.endsWith(p,"[]"))&&(w=N.toArray(y)))return p=_u(p),w.forEach(function(b,_){!(N.isUndefined(b)||b===null)&&e.append(s===!0?Ha([p],_,o):s===null?p:p+"[]",c(b))}),!1}return Ss(y)?!0:(e.append(Ha(L,p,o),c(y)),!1)}const d=[],h=Object.assign(Mp,{defaultVisitor:f,convertValue:c,isVisitable:Ss});function v(y,p){if(!N.isUndefined(y)){if(d.indexOf(y)!==-1)throw Error("Circular reference detected in "+p.join("."));d.push(y),N.forEach(y,function(w,g){(!(N.isUndefined(w)||w===null)&&i.call(e,w,N.isString(g)?g.trim():g,p,h))===!0&&v(w,p?p.concat(g):[g])}),d.pop()}}if(!N.isObject(t))throw new TypeError("data must be an object");return v(t),e}function Ga(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function la(t,e){this._pairs=[],t&&Do(t,this,e)}const Ou=la.prototype;Ou.append=function(e,n){this._pairs.push([e,n])};Ou.toString=function(e){const n=e?function(r){return e.call(this,r,Ga)}:Ga;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function kp(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Mu(t,e,n){if(!e)return t;const r=n&&n.encode||kp,i=n&&n.serialize;let o;if(i?o=i(e,n):o=N.isURLSearchParams(e)?e.toString():new la(e,n).toString(r),o){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class Pp{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){N.forEach(this.handlers,function(r){r!==null&&e(r)})}}const Za=Pp,ku={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Rp=typeof URLSearchParams<"u"?URLSearchParams:la,Tp=typeof FormData<"u"?FormData:null,Ap=typeof Blob<"u"?Blob:null,Dp={isBrowser:!0,classes:{URLSearchParams:Rp,FormData:Tp,Blob:Ap},protocols:["http","https","file","blob","url","data"]},Pu=typeof window<"u"&&typeof document<"u",Ip=(t=>Pu&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),jp=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Np=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Pu,hasStandardBrowserEnv:Ip,hasStandardBrowserWebWorkerEnv:jp},Symbol.toStringTag,{value:"Module"})),Vt={...Np,...Dp};function Bp(t,e){return Do(t,new Vt.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Vt.isNode&&N.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function Up(t){return N.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Vp(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 Ru(t){function e(n,r,i,o){let s=n[o++];const a=Number.isFinite(+s),l=o>=n.length;return s=!s&&N.isArray(i)?i.length:s,l?(N.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!N.isObject(i[s]))&&(i[s]=[]),e(n,r,i[s],o)&&N.isArray(i[s])&&(i[s]=Vp(i[s])),!a)}if(N.isFormData(t)&&N.isFunction(t.entries)){const n={};return N.forEachEntry(t,(r,i)=>{e(Up(r),i,n,0)}),n}return null}function Fp(t,e,n){if(N.isString(t))try{return(e||JSON.parse)(t),N.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const ca={transitional:ku,adapter:["xhr","http"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=N.isObject(e);if(o&&N.isHTMLForm(e)&&(e=new FormData(e)),N.isFormData(e))return i&&i?JSON.stringify(Ru(e)):e;if(N.isArrayBuffer(e)||N.isBuffer(e)||N.isStream(e)||N.isFile(e)||N.isBlob(e))return e;if(N.isArrayBufferView(e))return e.buffer;if(N.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 Bp(e,this.formSerializer).toString();if((a=N.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Do(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),Fp(e)):e}],transformResponse:[function(e){const n=this.transitional||ca.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(e&&N.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"?Se.from(a,Se.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:Vt.classes.FormData,Blob:Vt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};N.forEach(["delete","get","head","post","put","patch"],t=>{ca.headers[t]={}});const ua=ca,zp=N.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"]),$p=t=>{const e={};let n,r,i;return t&&t.split(`
|
|
17
|
+
*/var ko=u,mh=vh;function yh(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var bh=typeof Object.is=="function"?Object.is:yh,wh=mh.useSyncExternalStore,Sh=ko.useRef,Lh=ko.useEffect,Eh=ko.useMemo,xh=ko.useDebugValue;fu.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=Sh(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=Eh(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,bh(f,v))return y;var p=r(v);return i!==void 0&&i(y,p)?y:(f=v,d=p)}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=wh(t,o[0],o[1]);return Lh(function(){s.hasValue=!0,s.value=a},[a]),xh(a),a};uu.exports=fu;var Ch=uu.exports;const _h=Mo(Ch);var pu={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:Oh}=u,{useSyncExternalStoreWithSelector:Mh}=_h;let Va=!1;function kh(t,e=t.getState,n){(pu?"production":void 0)!=="production"&&n&&!Va&&(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"),Va=!0);const r=Mh(t.subscribe,t.getState,t.getServerState||t.getState,e,n);return Oh(r),r}const Fa=t=>{(pu?"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"?sh(t):t,n=(r,i)=>kh(e,r,i);return Object.assign(n,e),n},bn=t=>t?Fa(t):Fa,Ph={location:null},Po=t=>t.location,We=bn()(t=>({...Ph,setDeliverPoint(e){t({location:e})}})),Rh={map:null,mode:"self_pickup",bounds:null,blurred:!1,loaded:!1,loading:!0,detailsOpen:!1},gu=t=>t.map,Th=t=>t.mode,Ah=t=>t.bounds,Dh=t=>t.blurred,Ih=t=>t.loaded,jh=t=>t.loading,sa=t=>t.detailsOpen,ye=bn()(t=>({...Rh,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})}})),Nh={location:null},Bh=t=>t.location,bt=bn()(t=>({...Nh,setSelectedLocation(e){t({location:e})}})),Uh={query:"",type:Kt.All,hours:["08:00","22:00"],send:{[It.Return]:!1,[It.Payment]:!1,[It.Shipping]:!1},receive:{[Dt.PayByCash]:!1,[Dt.CheckOrder]:!1,[Dt.DressingRoom]:!1}},Vh=t=>t.type,Fh=t=>t.send,zh=t=>t.receive,Qt=bn(t=>({...Uh,setFilter(e){ye.getState().setDetailsOpen(!1),We.getState().setDeliverPoint(null),bt.getState().setSelectedLocation(null),t(e)}})),$h=t=>{const[e,n]=t.split(":");return Number(e)*60+Number(n)},Hh=t=>{const e=Math.floor(t/60),n=t%60;return`${e<10?`0${e}`:e}:${n<10?`0${n}`:n}`},Gh=(t,e)=>[[t[0]-e,t[0]+e],[t[1]-e,t[1]+e]];function vu(t,e){return function(){return t.apply(e,arguments)}}const{toString:Zh}=Object.prototype,{getPrototypeOf:aa}=Object,Ro=(t=>e=>{const n=Zh.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ht=t=>(t=t.toLowerCase(),e=>Ro(e)===t),To=t=>e=>typeof e===t,{isArray:hr}=Array,ti=To("undefined");function Wh(t){return t!==null&&!ti(t)&&t.constructor!==null&&!ti(t.constructor)&&_t(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const mu=Ht("ArrayBuffer");function qh(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&mu(t.buffer),e}const Kh=To("string"),_t=To("function"),yu=To("number"),Ao=t=>t!==null&&typeof t=="object",Jh=t=>t===!0||t===!1,Hi=t=>{if(Ro(t)!=="object")return!1;const e=aa(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Yh=Ht("Date"),Xh=Ht("File"),Qh=Ht("Blob"),ep=Ht("FileList"),tp=t=>Ao(t)&&_t(t.pipe),np=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||_t(t.append)&&((e=Ro(t))==="formdata"||e==="object"&&_t(t.toString)&&t.toString()==="[object FormData]"))},rp=Ht("URLSearchParams"),ip=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function li(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),hr(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 bu(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 wu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Su=t=>!ti(t)&&t!==wu;function ws(){const{caseless:t}=Su(this)&&this||{},e={},n=(r,i)=>{const o=t&&bu(e,i)||i;Hi(e[o])&&Hi(r)?e[o]=ws(e[o],r):Hi(r)?e[o]=ws({},r):hr(r)?e[o]=r.slice():e[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&li(arguments[r],n);return e}const op=(t,e,n,{allOwnKeys:r}={})=>(li(e,(i,o)=>{n&&_t(i)?t[o]=vu(i,n):t[o]=i},{allOwnKeys:r}),t),sp=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),ap=(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)},lp=(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&&aa(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},cp=(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},up=t=>{if(!t)return null;if(hr(t))return t;let e=t.length;if(!yu(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},fp=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&aa(Uint8Array)),dp=(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])}},hp=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},pp=Ht("HTMLFormElement"),gp=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),za=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),vp=Ht("RegExp"),Lu=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};li(n,(i,o)=>{let s;(s=e(i,o,t))!==!1&&(r[o]=s||i)}),Object.defineProperties(t,r)},mp=t=>{Lu(t,(e,n)=>{if(_t(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(_t(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+"'")})}})},yp=(t,e)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return hr(t)?r(t):r(String(t).split(e)),n},bp=()=>{},wp=(t,e)=>(t=+t,Number.isFinite(t)?t:e),Zo="abcdefghijklmnopqrstuvwxyz",$a="0123456789",Eu={DIGIT:$a,ALPHA:Zo,ALPHA_DIGIT:Zo+Zo.toUpperCase()+$a},Sp=(t=16,e=Eu.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function Lp(t){return!!(t&&_t(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Ep=t=>{const e=new Array(10),n=(r,i)=>{if(Ao(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const o=hr(r)?[]:{};return li(r,(s,a)=>{const l=n(s,i+1);!ti(l)&&(o[a]=l)}),e[i]=void 0,o}}return r};return n(t,0)},xp=Ht("AsyncFunction"),Cp=t=>t&&(Ao(t)||_t(t))&&_t(t.then)&&_t(t.catch),N={isArray:hr,isArrayBuffer:mu,isBuffer:Wh,isFormData:np,isArrayBufferView:qh,isString:Kh,isNumber:yu,isBoolean:Jh,isObject:Ao,isPlainObject:Hi,isUndefined:ti,isDate:Yh,isFile:Xh,isBlob:Qh,isRegExp:vp,isFunction:_t,isStream:tp,isURLSearchParams:rp,isTypedArray:fp,isFileList:ep,forEach:li,merge:ws,extend:op,trim:ip,stripBOM:sp,inherits:ap,toFlatObject:lp,kindOf:Ro,kindOfTest:Ht,endsWith:cp,toArray:up,forEachEntry:dp,matchAll:hp,isHTMLForm:pp,hasOwnProperty:za,hasOwnProp:za,reduceDescriptors:Lu,freezeMethods:mp,toObjectSet:yp,toCamelCase:gp,noop:bp,toFiniteNumber:wp,findKey:bu,global:wu,isContextDefined:Su,ALPHABET:Eu,generateString:Sp,isSpecCompliantForm:Lp,toJSONObject:Ep,isAsyncFn:xp,isThenable:Cp};function Se(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)}N.inherits(Se,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:N.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const xu=Se.prototype,Cu={};["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=>{Cu[t]={value:t}});Object.defineProperties(Se,Cu);Object.defineProperty(xu,"isAxiosError",{value:!0});Se.from=(t,e,n,r,i,o)=>{const s=Object.create(xu);return N.toFlatObject(t,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),Se.call(s,t.message,e,n,r,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};const _p=null;function Ss(t){return N.isPlainObject(t)||N.isArray(t)}function _u(t){return N.endsWith(t,"[]")?t.slice(0,-2):t}function Ha(t,e,n){return t?t.concat(e).map(function(i,o){return i=_u(i),!n&&o?"["+i+"]":i}).join(n?".":""):e}function Op(t){return N.isArray(t)&&!t.some(Ss)}const Mp=N.toFlatObject(N,{},null,function(e){return/^is[A-Z]/.test(e)});function Do(t,e,n){if(!N.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=N.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,L){return!N.isUndefined(L[p])});const r=n.metaTokens,i=n.visitor||f,o=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&N.isSpecCompliantForm(e);if(!N.isFunction(i))throw new TypeError("visitor must be a function");function c(y){if(y===null)return"";if(N.isDate(y))return y.toISOString();if(!l&&N.isBlob(y))throw new Se("Blob is not supported. Use a Buffer instead.");return N.isArrayBuffer(y)||N.isTypedArray(y)?l&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function f(y,p,L){let w=y;if(y&&!L&&typeof y=="object"){if(N.endsWith(p,"{}"))p=r?p:p.slice(0,-2),y=JSON.stringify(y);else if(N.isArray(y)&&Op(y)||(N.isFileList(y)||N.endsWith(p,"[]"))&&(w=N.toArray(y)))return p=_u(p),w.forEach(function(b,_){!(N.isUndefined(b)||b===null)&&e.append(s===!0?Ha([p],_,o):s===null?p:p+"[]",c(b))}),!1}return Ss(y)?!0:(e.append(Ha(L,p,o),c(y)),!1)}const d=[],h=Object.assign(Mp,{defaultVisitor:f,convertValue:c,isVisitable:Ss});function v(y,p){if(!N.isUndefined(y)){if(d.indexOf(y)!==-1)throw Error("Circular reference detected in "+p.join("."));d.push(y),N.forEach(y,function(w,g){(!(N.isUndefined(w)||w===null)&&i.call(e,w,N.isString(g)?g.trim():g,p,h))===!0&&v(w,p?p.concat(g):[g])}),d.pop()}}if(!N.isObject(t))throw new TypeError("data must be an object");return v(t),e}function Ga(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function la(t,e){this._pairs=[],t&&Do(t,this,e)}const Ou=la.prototype;Ou.append=function(e,n){this._pairs.push([e,n])};Ou.toString=function(e){const n=e?function(r){return e.call(this,r,Ga)}:Ga;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function kp(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Mu(t,e,n){if(!e)return t;const r=n&&n.encode||kp,i=n&&n.serialize;let o;if(i?o=i(e,n):o=N.isURLSearchParams(e)?e.toString():new la(e,n).toString(r),o){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class Pp{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){N.forEach(this.handlers,function(r){r!==null&&e(r)})}}const Za=Pp,ku={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Rp=typeof URLSearchParams<"u"?URLSearchParams:la,Tp=typeof FormData<"u"?FormData:null,Ap=typeof Blob<"u"?Blob:null,Dp={isBrowser:!0,classes:{URLSearchParams:Rp,FormData:Tp,Blob:Ap},protocols:["http","https","file","blob","url","data"]},Pu=typeof window<"u"&&typeof document<"u",Ip=(t=>Pu&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),jp=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Np=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Pu,hasStandardBrowserEnv:Ip,hasStandardBrowserWebWorkerEnv:jp},Symbol.toStringTag,{value:"Module"})),Vt={...Np,...Dp};function Bp(t,e){return Do(t,new Vt.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Vt.isNode&&N.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function Up(t){return N.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Vp(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 Ru(t){function e(n,r,i,o){let s=n[o++];const a=Number.isFinite(+s),l=o>=n.length;return s=!s&&N.isArray(i)?i.length:s,l?(N.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!N.isObject(i[s]))&&(i[s]=[]),e(n,r,i[s],o)&&N.isArray(i[s])&&(i[s]=Vp(i[s])),!a)}if(N.isFormData(t)&&N.isFunction(t.entries)){const n={};return N.forEachEntry(t,(r,i)=>{e(Up(r),i,n,0)}),n}return null}function Fp(t,e,n){if(N.isString(t))try{return(e||JSON.parse)(t),N.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const ca={transitional:ku,adapter:["xhr","http"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=N.isObject(e);if(o&&N.isHTMLForm(e)&&(e=new FormData(e)),N.isFormData(e))return i&&i?JSON.stringify(Ru(e)):e;if(N.isArrayBuffer(e)||N.isBuffer(e)||N.isStream(e)||N.isFile(e)||N.isBlob(e))return e;if(N.isArrayBufferView(e))return e.buffer;if(N.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 Bp(e,this.formSerializer).toString();if((a=N.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Do(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),Fp(e)):e}],transformResponse:[function(e){const n=this.transitional||ca.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(e&&N.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"?Se.from(a,Se.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:Vt.classes.FormData,Blob:Vt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};N.forEach(["delete","get","head","post","put","patch"],t=>{ca.headers[t]={}});const ua=ca,zp=N.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"]),$p=t=>{const e={};let n,r,i;return t&&t.split(`
|
|
18
18
|
`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||e[n]&&zp[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Wa=Symbol("internals");function Lr(t){return t&&String(t).trim().toLowerCase()}function Gi(t){return t===!1||t==null?t:N.isArray(t)?t.map(Gi):String(t)}function Hp(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 Gp=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Wo(t,e,n,r,i){if(N.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!N.isString(e)){if(N.isString(r))return e.indexOf(r)!==-1;if(N.isRegExp(r))return r.test(e)}}function Zp(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Wp(t,e){const n=N.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 Io{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=N.findKey(i,f);(!d||i[d]===void 0||c===!0||c===void 0&&i[d]!==!1)&&(i[d||l]=Gi(a))}const s=(a,l)=>N.forEach(a,(c,f)=>o(c,f,l));return N.isPlainObject(e)||e instanceof this.constructor?s(e,n):N.isString(e)&&(e=e.trim())&&!Gp(e)?s($p(e),n):e!=null&&o(n,e,r),this}get(e,n){if(e=Lr(e),e){const r=N.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return Hp(i);if(N.isFunction(n))return n.call(this,i,r);if(N.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=N.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||Wo(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=N.findKey(r,s);a&&(!n||Wo(r,r[a],a,n))&&(delete r[a],i=!0)}}return N.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||Wo(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const n=this,r={};return N.forEach(this,(i,o)=>{const s=N.findKey(r,o);if(s){n[s]=Gi(i),delete n[o];return}const a=e?Zp(o):String(o).trim();a!==o&&delete n[o],n[a]=Gi(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return N.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&N.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
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[Wa]=this[Wa]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=Lr(s);r[a]||(Wp(i,s),r[a]=!0)}return N.isArray(e)?e.forEach(o):o(e),this}}Io.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);N.reduceDescriptors(Io.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});N.freezeMethods(Io);const en=Io;function qo(t,e){const n=this||ua,r=e||n,i=en.from(r.headers);let o=r.data;return N.forEach(t,function(a){o=a.call(n,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function Tu(t){return!!(t&&t.__CANCEL__)}function ci(t,e,n){Se.call(this,t??"canceled",Se.ERR_CANCELED,e,n),this.name="CanceledError"}N.inherits(ci,Se,{__CANCEL__:!0});function qp(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Se("Request failed with status code "+n.status,[Se.ERR_BAD_REQUEST,Se.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Kp=Vt.hasStandardBrowserEnv?{write(t,e,n,r,i,o){const s=[t+"="+encodeURIComponent(e)];N.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),N.isString(r)&&s.push("path="+r),N.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 Jp(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Yp(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}function Au(t,e){return t&&!Jp(e)?Yp(t,e):e}const Xp=Vt.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=N.isString(s)?i(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function Qp(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function eg(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,h=0;for(;d!==i;)h+=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(h*1e3/v):void 0}}function qa(t,e){let n=0;const r=eg(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 tg=typeof XMLHttpRequest<"u",ng=tg&&function(t){return new Promise(function(n,r){let i=t.data;const o=en.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(N.isFormData(i)){if(Vt.hasStandardBrowserEnv||Vt.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((f=o.getContentType())!==!1){const[p,...L]=f?f.split(";").map(w=>w.trim()).filter(Boolean):[];o.setContentType([p||"multipart/form-data",...L].join("; "))}}let d=new XMLHttpRequest;if(t.auth){const p=t.auth.username||"",L=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(p+":"+L))}const h=Au(t.baseURL,t.url);d.open(t.method.toUpperCase(),Mu(h,t.params,t.paramsSerializer),!0),d.timeout=t.timeout;function v(){if(!d)return;const p=en.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),w={data:!s||s==="text"||s==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:p,config:t,request:d};qp(function(b){n(b),c()},function(b){r(b),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 Se("Request aborted",Se.ECONNABORTED,t,d)),d=null)},d.onerror=function(){r(new Se("Network Error",Se.ERR_NETWORK,t,d)),d=null},d.ontimeout=function(){let L=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const w=t.transitional||ku;t.timeoutErrorMessage&&(L=t.timeoutErrorMessage),r(new Se(L,w.clarifyTimeoutError?Se.ETIMEDOUT:Se.ECONNABORTED,t,d)),d=null},Vt.hasStandardBrowserEnv&&(a&&N.isFunction(a)&&(a=a(t)),a||a!==!1&&Xp(h))){const p=t.xsrfHeaderName&&t.xsrfCookieName&&Kp.read(t.xsrfCookieName);p&&o.set(t.xsrfHeaderName,p)}i===void 0&&o.setContentType(null),"setRequestHeader"in d&&N.forEach(o.toJSON(),function(L,w){d.setRequestHeader(w,L)}),N.isUndefined(t.withCredentials)||(d.withCredentials=!!t.withCredentials),s&&s!=="json"&&(d.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&d.addEventListener("progress",qa(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",qa(t.onUploadProgress)),(t.cancelToken||t.signal)&&(l=p=>{d&&(r(!p||p.type?new ci(null,t,d):p),d.abort(),d=null)},t.cancelToken&&t.cancelToken.subscribe(l),t.signal&&(t.signal.aborted?l():t.signal.addEventListener("abort",l)));const y=Qp(h);if(y&&Vt.protocols.indexOf(y)===-1){r(new Se("Unsupported protocol "+y+":",Se.ERR_BAD_REQUEST,t));return}d.send(i||null)})},Ls={http:_p,xhr:ng};N.forEach(Ls,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Ka=t=>`- ${t}`,rg=t=>N.isFunction(t)||t===null||t===!1,Du={getAdapter:t=>{t=N.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,!rg(n)&&(r=Ls[(s=String(n)).toLowerCase()],r===void 0))throw new Se(`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(Ka).join(`
|
|
@@ -99,4 +99,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
99
99
|
*/var cd=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],Lo=cd.join(","),ud=typeof Element>"u",Nn=ud?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ea=!ud&&Element.prototype.getRootNode?function(t){return t.getRootNode()}:function(t){return t.ownerDocument},fd=function(e,n,r){var i=Array.prototype.slice.apply(e.querySelectorAll(Lo));return n&&Nn.call(e,Lo)&&i.unshift(e),i=i.filter(r),i},dd=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=Nn.call(s,Lo);f&&r.filter(s)&&(n||!e.includes(s))&&i.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),h=!r.shadowRootFilter||r.shadowRootFilter(s);if(d&&h){var v=t(d===!0?s.children:d.children,!0,r);r.flatten?i.push.apply(i,v):i.push({scope:s,candidates:v})}else o.unshift.apply(o,s.children)}}return i},hd=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},Cw=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},pd=function(e){return e.tagName==="INPUT"},_w=function(e){return pd(e)&&e.type==="hidden"},Ow=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},Mw=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},kw=function(e){if(!e.name)return!0;var n=e.form||ea(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=Mw(i,e.form);return!o||o===e},Pw=function(e){return pd(e)&&e.type==="radio"},Rw=function(e){return Pw(e)&&!kw(e)},Mc=function(e){var n=e.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},Tw=function(e,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var o=Nn.call(e,"details>summary:first-of-type"),s=o?e.parentElement:e;if(Nn.call(s,"details:not([open]) *"))return!0;var a=ea(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=ea(e);if(f&&!f.shadowRoot&&i(f)===!0)return Mc(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 Mc(e);return!1},Aw=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 Nn.call(n,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}n=n.parentElement}return!1},Eo=function(e,n){return!(n.disabled||_w(n)||Tw(n,e)||Ow(n)||Aw(n))},ta=function(e,n){return!(Rw(n)||hd(n)<0||!Eo(e,n))},Dw=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Iw=function t(e){var n=[],r=[];return e.forEach(function(i,o){var s=!!i.scope,a=s?i.scope:i,l=hd(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(Cw).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},jw=function(e,n){n=n||{};var r;return n.getShadowRoot?r=dd([e],n.includeContainer,{filter:ta.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Dw}):r=fd(e,n.includeContainer,ta.bind(null,n)),Iw(r)},Nw=function(e,n){n=n||{};var r;return n.getShadowRoot?r=dd([e],n.includeContainer,{filter:Eo.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=fd(e,n.includeContainer,Eo.bind(null,n)),r},Ti=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Nn.call(e,Lo)===!1?!1:ta(n,e)},Bw=cd.concat("iframe").join(","),us=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Nn.call(e,Bw)===!1?!1:Eo(n,e)};/*!
|
|
100
100
|
* focus-trap 6.9.4
|
|
101
101
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
102
|
-
*/function kc(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 Pc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?kc(Object(n),!0).forEach(function(r){Uw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):kc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Uw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Rc=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()}}}(),Vw=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},Fw=function(e){return e.key==="Escape"||e.key==="Esc"||e.keyCode===27},zw=function(e){return e.key==="Tab"||e.keyCode===9},Tc=function(e){return setTimeout(e,0)},Ac=function(e,n){var r=-1;return e.every(function(i,o){return n(i)?(r=o,!1):!0}),r},Rr=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},Ai=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},$w=function(e,n){var r=(n==null?void 0:n.document)||document,i=Pc({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(m,S,C){return m&&m[S]!==void 0?m[S]:i[C||S]},l=function(m){return o.containerGroups.findIndex(function(S){var C=S.container,R=S.tabbableNodes;return C.contains(m)||R.find(function(M){return M===m})})},c=function(m){var S=i[m];if(typeof S=="function"){for(var C=arguments.length,R=new Array(C>1?C-1:0),M=1;M<C;M++)R[M-1]=arguments[M];S=S.apply(void 0,R)}if(S===!0&&(S=void 0),!S){if(S===void 0||S===!1)return S;throw new Error("`".concat(m,"` was specified but was not a node, or did not return a node"))}var O=S;if(typeof S=="string"&&(O=r.querySelector(S),!O))throw new Error("`".concat(m,"` as selector refers to no known node"));return O},f=function(){var m=c("initialFocus");if(m===!1)return!1;if(m===void 0)if(l(r.activeElement)>=0)m=r.activeElement;else{var S=o.tabbableGroups[0],C=S&&S.firstTabbableNode;m=C||c("fallbackFocus")}if(!m)throw new Error("Your focus-trap needs to have at least one focusable element");return m},d=function(){if(o.containerGroups=o.containers.map(function(m){var S=jw(m,i.tabbableOptions),C=Nw(m,i.tabbableOptions);return{container:m,tabbableNodes:S,focusableNodes:C,firstTabbableNode:S.length>0?S[0]:null,lastTabbableNode:S.length>0?S[S.length-1]:null,nextTabbableNode:function(M){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,P=C.findIndex(function(j){return j===M});if(!(P<0))return O?C.slice(P+1).find(function(j){return Ti(j,i.tabbableOptions)}):C.slice(0,P).reverse().find(function(j){return Ti(j,i.tabbableOptions)})}}}),o.tabbableGroups=o.containerGroups.filter(function(m){return m.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 E(m){if(m!==!1&&m!==r.activeElement){if(!m||!m.focus){E(f());return}m.focus({preventScroll:!!i.preventScroll}),o.mostRecentlyFocusedNode=m,Vw(m)&&m.select()}},v=function(m){var S=c("setReturnFocus",m);return S||(S===!1?!1:m)},y=function(m){var S=Ai(m);if(!(l(S)>=0)){if(Rr(i.clickOutsideDeactivates,m)){s.deactivate({returnFocus:i.returnFocusOnDeactivate&&!us(S,i.tabbableOptions)});return}Rr(i.allowOutsideClick,m)||m.preventDefault()}},p=function(m){var S=Ai(m),C=l(S)>=0;C||S instanceof Document?C&&(o.mostRecentlyFocusedNode=S):(m.stopImmediatePropagation(),h(o.mostRecentlyFocusedNode||f()))},L=function(m){var S=Ai(m);d();var C=null;if(o.tabbableGroups.length>0){var R=l(S),M=R>=0?o.containerGroups[R]:void 0;if(R<0)m.shiftKey?C=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:C=o.tabbableGroups[0].firstTabbableNode;else if(m.shiftKey){var O=Ac(o.tabbableGroups,function(z){var Z=z.firstTabbableNode;return S===Z});if(O<0&&(M.container===S||us(S,i.tabbableOptions)&&!Ti(S,i.tabbableOptions)&&!M.nextTabbableNode(S,!1))&&(O=R),O>=0){var P=O===0?o.tabbableGroups.length-1:O-1,j=o.tabbableGroups[P];C=j.lastTabbableNode}}else{var B=Ac(o.tabbableGroups,function(z){var Z=z.lastTabbableNode;return S===Z});if(B<0&&(M.container===S||us(S,i.tabbableOptions)&&!Ti(S,i.tabbableOptions)&&!M.nextTabbableNode(S))&&(B=R),B>=0){var $=B===o.tabbableGroups.length-1?0:B+1,G=o.tabbableGroups[$];C=G.firstTabbableNode}}}else C=c("fallbackFocus");C&&(m.preventDefault(),h(C))},w=function(m){if(Fw(m)&&Rr(i.escapeDeactivates,m)!==!1){m.preventDefault(),s.deactivate();return}if(zw(m)){L(m);return}},g=function(m){var S=Ai(m);l(S)>=0||Rr(i.clickOutsideDeactivates,m)||Rr(i.allowOutsideClick,m)||(m.preventDefault(),m.stopImmediatePropagation())},b=function(){if(o.active)return Rc.activateTrap(s),o.delayInitialFocusTimer=i.delayInitialFocus?Tc(function(){h(f())}):h(f()),r.addEventListener("focusin",p,!0),r.addEventListener("mousedown",y,{capture:!0,passive:!1}),r.addEventListener("touchstart",y,{capture:!0,passive:!1}),r.addEventListener("click",g,{capture:!0,passive:!1}),r.addEventListener("keydown",w,{capture:!0,passive:!1}),s},_=function(){if(o.active)return r.removeEventListener("focusin",p,!0),r.removeEventListener("mousedown",y,!0),r.removeEventListener("touchstart",y,!0),r.removeEventListener("click",g,!0),r.removeEventListener("keydown",w,!0),s};return s={get active(){return o.active},get paused(){return o.paused},activate:function(m){if(o.active)return this;var S=a(m,"onActivate"),C=a(m,"onPostActivate"),R=a(m,"checkCanFocusTrap");R||d(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,S&&S();var M=function(){R&&d(),b(),C&&C()};return R?(R(o.containers.concat()).then(M,M),this):(M(),this)},deactivate:function(m){if(!o.active)return this;var S=Pc({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},m);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,_(),o.active=!1,o.paused=!1,Rc.deactivateTrap(s);var C=a(S,"onDeactivate"),R=a(S,"onPostDeactivate"),M=a(S,"checkCanReturnFocus"),O=a(S,"returnFocus","returnFocusOnDeactivate");C&&C();var P=function(){Tc(function(){O&&h(v(o.nodeFocusedBeforeActivation)),R&&R()})};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(),b(),this)},updateContainerElements:function(m){var S=[].concat(m).filter(Boolean);return o.containers=S.map(function(C){return typeof C=="string"?r.querySelector(C):C}),o.active&&d(),this}},s.updateContainerElements(e),s};function Hw(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 Ta=!1;if(typeof window<"u"){var Dc={get passive(){Ta=!0}};window.addEventListener("testPassive",null,Dc),window.removeEventListener("testPassive",null,Dc)}var gd=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),vn=[],xo=!1,vd=-1,qr=void 0,Kr=void 0,md=function(e){return vn.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(e))})},Co=function(e){var n=e||window.event;return md(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},Gw=function(e){if(Kr===void 0){var n=!!e&&e.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;n&&r>0&&(Kr=document.body.style.paddingRight,document.body.style.paddingRight=r+"px")}qr===void 0&&(qr=document.body.style.overflow,document.body.style.overflow="hidden")},Zw=function(){Kr!==void 0&&(document.body.style.paddingRight=Kr,Kr=void 0),qr!==void 0&&(document.body.style.overflow=qr,qr=void 0)},Ww=function(e){return e?e.scrollHeight-e.scrollTop<=e.clientHeight:!1},qw=function(e,n){var r=e.targetTouches[0].clientY-vd;return md(e.target)?!1:n&&n.scrollTop===0&&r>0||Ww(n)&&r<0?Co(e):(e.stopPropagation(),!0)},Kw=function(e,n){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!vn.some(function(i){return i.targetElement===e})){var r={targetElement:e,options:n||{}};vn=[].concat(Hw(vn),[r]),gd?(e.ontouchstart=function(i){i.targetTouches.length===1&&(vd=i.targetTouches[0].clientY)},e.ontouchmove=function(i){i.targetTouches.length===1&&qw(i,e)},xo||(document.addEventListener("touchmove",Co,Ta?{passive:!1}:void 0),xo=!0)):Gw(n)}},Jw=function(e){if(!e){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}vn=vn.filter(function(n){return n.targetElement!==e}),gd?(e.ontouchstart=null,e.ontouchmove=null,xo&&vn.length===0&&(document.removeEventListener("touchmove",Co,Ta?{passive:!1}:void 0),xo=!1)):vn.length||Zw()},In=[],Yw=function(){return In.some(function(t){return t.activeTargets.length>0})},Xw=function(){return In.some(function(t){return t.skippedTargets.length>0})},Ic="ResizeObserver loop completed with undelivered notifications.",Qw=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:Ic}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=Ic),window.dispatchEvent(t)},ai;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(ai||(ai={}));var jn=function(t){return Object.freeze(t)},eS=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,jn(this)}return t}(),yd=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,jn(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}(),Aa=function(t){return t instanceof SVGElement&&"getBBox"in t},bd=function(t){if(Aa(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)},jc=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)},tS=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},Jr=typeof window<"u"?window:{},Di=new WeakMap,Nc=/auto|scroll/,nS=/^tb|vertical/,rS=/msie|trident/i.test(Jr.navigator&&Jr.navigator.userAgent),Bt=function(t){return parseFloat(t||"0")},nr=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new eS((n?e:t)||0,(n?t:e)||0)},Bc=jn({devicePixelContentBoxSize:nr(),borderBoxSize:nr(),contentBoxSize:nr(),contentRect:new yd(0,0,0,0)}),wd=function(t,e){if(e===void 0&&(e=!1),Di.has(t)&&!e)return Di.get(t);if(bd(t))return Di.set(t,Bc),Bc;var n=getComputedStyle(t),r=Aa(t)&&t.ownerSVGElement&&t.getBBox(),i=!rS&&n.boxSizing==="border-box",o=nS.test(n.writingMode||""),s=!r&&Nc.test(n.overflowY||""),a=!r&&Nc.test(n.overflowX||""),l=r?0:Bt(n.paddingTop),c=r?0:Bt(n.paddingRight),f=r?0:Bt(n.paddingBottom),d=r?0:Bt(n.paddingLeft),h=r?0:Bt(n.borderTopWidth),v=r?0:Bt(n.borderRightWidth),y=r?0:Bt(n.borderBottomWidth),p=r?0:Bt(n.borderLeftWidth),L=d+c,w=l+f,g=p+v,b=h+y,_=a?t.offsetHeight-b-t.clientHeight:0,E=s?t.offsetWidth-g-t.clientWidth:0,m=i?L+g:0,S=i?w+b:0,C=r?r.width:Bt(n.width)-m-E,R=r?r.height:Bt(n.height)-S-_,M=C+L+E+g,O=R+w+_+b,P=jn({devicePixelContentBoxSize:nr(Math.round(C*devicePixelRatio),Math.round(R*devicePixelRatio),o),borderBoxSize:nr(M,O,o),contentBoxSize:nr(C,R,o),contentRect:new yd(d,l,C,R)});return Di.set(t,P),P},Sd=function(t,e,n){var r=wd(t,n),i=r.borderBoxSize,o=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(e){case ai.DEVICE_PIXEL_CONTENT_BOX:return s;case ai.BORDER_BOX:return i;default:return o}},iS=function(){function t(e){var n=wd(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=jn([n.borderBoxSize]),this.contentBoxSize=jn([n.contentBoxSize]),this.devicePixelContentBoxSize=jn([n.devicePixelContentBoxSize])}return t}(),Ld=function(t){if(bd(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},oS=function(){var t=1/0,e=[];In.forEach(function(s){if(s.activeTargets.length!==0){var a=[];s.activeTargets.forEach(function(c){var f=new iS(c.target),d=Ld(c.target);a.push(f),c.lastReportedSize=Sd(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},Uc=function(t){In.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(Ld(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},sS=function(){var t=0;for(Uc(t);Yw();)t=oS(),Uc(t);return Xw()&&Qw(),t>0},fs,Ed=[],aS=function(){return Ed.splice(0).forEach(function(t){return t()})},lS=function(t){if(!fs){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return aS()}).observe(n,r),fs=function(){n.textContent="".concat(e?e--:e++)}}Ed.push(t),fs()},cS=function(t){lS(function(){requestAnimationFrame(t)})},eo=0,uS=function(){return!!eo},fS=250,dS={attributes:!0,characterData:!0,childList:!0,subtree:!0},Vc=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Fc=function(t){return t===void 0&&(t=0),Date.now()+t},ds=!1,hS=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=fS),!ds){ds=!0;var r=Fc(e);cS(function(){var i=!1;try{i=sS()}finally{if(ds=!1,e=r-Fc(),!uS())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,dS)};document.body?n():Jr.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Vc.forEach(function(n){return Jr.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Vc.forEach(function(n){return Jr.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),na=new hS,zc=function(t){!eo&&t>0&&na.start(),eo+=t,!eo&&na.stop()},pS=function(t){return!Aa(t)&&!tS(t)&&getComputedStyle(t).display==="inline"},gS=function(){function t(e,n){this.target=e,this.observedBox=n||ai.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=Sd(this.target,this.observedBox,!0);return pS(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),vS=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),Ii=new WeakMap,$c=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},ji=function(){function t(){}return t.connect=function(e,n){var r=new vS(e,n);Ii.set(e,r)},t.observe=function(e,n,r){var i=Ii.get(e),o=i.observationTargets.length===0;$c(i.observationTargets,n)<0&&(o&&In.push(i),i.observationTargets.push(new gS(n,r&&r.box)),zc(1),na.schedule())},t.unobserve=function(e,n){var r=Ii.get(e),i=$c(r.observationTargets,n),o=r.observationTargets.length===1;i>=0&&(o&&In.splice(In.indexOf(r),1),r.observationTargets.splice(i,1),zc(-1))},t.disconnect=function(e){var n=this,r=Ii.get(e);r.observationTargets.slice().forEach(function(i){return n.unobserve(e,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t}(),mS=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.");ji.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(!jc(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ji.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(!jc(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ji.unobserve(this,e)},t.prototype.disconnect=function(){ji.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();function ut(){return ut=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},ut.apply(this,arguments)}function to(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 Yr=typeof window<"u"?u.useLayoutEffect:u.useEffect;function Tr(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 Ni(t){var e=Math.round(t);if(Number.isNaN(t))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return e}var yS={box:"border-box"};function hs(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 Yr(function(){if(t.current&&r){var c=new mS(l);return c.observe(t.current,yS),function(){c.disconnect()}}},[t,l,r]),r?s:0}function ct(t){return t===void 0&&(t=1e3),new Promise(function(e){return setTimeout(e,t)})}var Hc={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},Gc={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},bS=G0({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:ut({},Hc,Gc)}}},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:ut({},Hc,Gc)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:ut({},{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:[Z0({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(ct()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenStart:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseStart:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeStart:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},onSnapEnd:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenEnd:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseEnd:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeEnd:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},renderVisuallyHidden:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}},activate:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}},deactivate:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}},openSmoothly:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}},openImmediately:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}},snapSmoothly:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}},resizeSmoothly:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}},closeSmoothly:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}}},guards:{initiallyClosed:function(t){return t.initialState==="CLOSED"},initiallyOpen:function(t){return t.initialState==="OPEN"}}}),wS=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],SS=["velocity"],LS=["onRest","config"],xd=yb.default,ES=xd.tension,Bi=xd.friction,xS=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,y=v===void 0?_S:v,p=t.snapPoints,L=p===void 0?OS:p,w=t.blocking,g=w===void 0||w,b=t.scrollLocking,_=b===void 0||b,E=t.style,m=t.onSpringStart,S=t.onSpringCancel,C=t.onSpringEnd,R=t.reserveScrollBarGap,M=R===void 0?g:R,O=t.expandOnContentDrag,P=O!==void 0&&O,j=to(t,wS),B=function(){var F=u.useState(!1),te=F[0],q=F[1],de=u.useState({}),Te=de[0],xe=de[1],Ae=u.useCallback(function(ke){return xe(function(Be){var ae;return ut({},Be,((ae={})[ke]=!1,ae))}),function(){xe(function(Be){var ae;return ut({},Be,((ae={})[ke]=!0,ae))})}},[]);return u.useEffect(function(){var ke=Object.values(Te);ke.length!==0&&ke.every(Boolean)&&q(!0)},[Te]),{ready:te,registerReady:Ae}}(),$=B.ready,G=B.registerReady,z=u.useRef(!1),Z=u.useRef(m),A=u.useRef(S),T=u.useRef(C);u.useEffect(function(){Z.current=m,A.current=S,T.current=C},[S,m,C]);var k,D,U=Eb(function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}}),V=U[0],W=U[1],I=u.useRef(null),X=u.useRef(null),ee=u.useRef(null),K=u.useRef(null),ie=u.useRef(null),fe=u.useRef(null),ge=u.useRef(0),Le=u.useRef(),Fe=u.useRef(!1),we=(k=u.useMemo(function(){return typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null},[]),D=u.useRef(k==null?void 0:k.matches),u.useDebugValue(D.current?"reduce":"no-preference"),u.useEffect(function(){var F=function(te){D.current=te.matches};return k==null||k.addListener(F),function(){return k==null?void 0:k.removeListener(F)}},[k]),D),Ee=function(F){var te=F.targetRef,q=F.enabled,de=F.reserveScrollBarGap,Te=u.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return u.useDebugValue(q?"Enabled":"Disabled"),u.useEffect(function(){if(!q)return Te.current.deactivate(),void(Te.current={activate:function(){},deactivate:function(){}});var xe=te.current,Ae=!1;Te.current={activate:function(){Ae||(Ae=!0,Kw(xe,{allowTouchMove:function(ke){return ke.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:de}))},deactivate:function(){Ae&&(Ae=!1,Jw(xe))}}},[q,te,de]),Te}({targetRef:X,enabled:$&&_,reserveScrollBarGap:M}),Ie=function(F){var te=F.targetRef,q=F.enabled,de=u.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return u.useDebugValue(q?"Enabled":"Disabled"),u.useEffect(function(){if(!q)return de.current.deactivate(),void(de.current={activate:function(){},deactivate:function(){}});var Te=te.current,xe=!1,Ae=[],ke=[];de.current={activate:function(){if(!xe){xe=!0;var Be=Te.parentNode;document.querySelectorAll("body > *").forEach(function(ae){if(ae!==Be){var ve=ae.getAttribute("aria-hidden");ve!==null&&ve!=="false"||(Ae.push(ve),ke.push(ae),ae.setAttribute("aria-hidden","true"))}})}},deactivate:function(){xe&&(xe=!1,ke.forEach(function(Be,ae){var ve=Ae[ae];ve===null?Be.removeAttribute("aria-hidden"):Be.setAttribute("aria-hidden",ve)}),Ae=[],ke=[])}}},[te,q]),de}({targetRef:I,enabled:$&&g}),Me=function(F){var te=F.targetRef,q=F.fallbackRef,de=F.initialFocusRef,Te=F.enabled,xe=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 xe.current.deactivate(),void(xe.current={activate:function(){},deactivate:function(){}});var Ae=q.current,ke=$w(te.current,{onActivate:void 0,initialFocus:de?function(){return(de==null?void 0:de.current)||Ae}:void 0,fallbackFocus:Ae,escapeDeactivates:!1,clickOutsideDeactivates:!1}),Be=!1;xe.current={activate:function(){try{return Be?Promise.resolve():(Be=!0,Promise.resolve(ke.activate()).then(function(){return Promise.resolve(new Promise(function(ae){return setTimeout(function(){return ae(void 0)},0)})).then(function(){})}))}catch(ae){return Promise.reject(ae)}},deactivate:function(){Be&&(Be=!1,ke.deactivate())}}},[Te,q,de,te]),xe}({targetRef:I,fallbackRef:fe,initialFocusRef:f||void 0,enabled:$&&g&&f!==!1}),Re=function(F){var te=F.getSnapPoints,q=F.heightRef,de=F.lastSnapRef,Te=F.ready,xe=function(Ke){var pt=Ke.contentRef,gt=Ke.controlledMaxHeight,Qe=Ke.footerEnabled,Nt=Ke.footerRef,kt=Ke.headerEnabled,vt=Ke.headerRef,tn=Ke.registerReady,Wt=Ke.resizeSourceRef,vr=u.useMemo(function(){return tn("contentHeight")},[tn]),mr=function(nn,Ln,En){var xn=u.useMemo(function(){return Ln("maxHeight")},[Ln]),Cn=u.useState(function(){return Ni(nn)||typeof window<"u"?window.innerHeight:0}),wr=Cn[0],Sr=Cn[1],rn=wr>0,ne=u.useRef(0);return u.useDebugValue(nn?"controlled":"auto"),u.useEffect(function(){rn&&xn()},[rn,xn]),Yr(function(){if(nn)return Sr(Ni(nn)),void(En.current="maxheightprop");var Na=function(){ne.current||(ne.current=requestAnimationFrame(function(){Sr(window.innerHeight),En.current="window",ne.current=0}))};return window.addEventListener("resize",Na),Sr(window.innerHeight),En.current="window",xn(),function(){window.removeEventListener("resize",Na),cancelAnimationFrame(ne.current)}},[nn,xn,En]),wr}(gt,tn,Wt),Fn=hs(vt,{label:"headerHeight",enabled:kt,resizeSourceRef:Wt}),yr=hs(pt,{label:"contentHeight",enabled:!0,resizeSourceRef:Wt}),zn=hs(Nt,{label:"footerHeight",enabled:Qe,resizeSourceRef:Wt}),Sn=Math.min(mr-Fn-zn,yr)+Fn+zn;u.useDebugValue("minHeight: "+Sn);var br=yr>0;return u.useEffect(function(){br&&vr()},[br,vr]),{maxHeight:mr,minHeight:Sn,headerHeight:Fn,footerHeight:zn}}({contentRef:F.contentRef,controlledMaxHeight:F.controlledMaxHeight,footerEnabled:F.footerEnabled,footerRef:F.footerRef,headerEnabled:F.headerEnabled,headerRef:F.headerRef,registerReady:F.registerReady,resizeSourceRef:F.resizeSourceRef}),Ae=xe.maxHeight,ke=xe.minHeight,Be=xe.headerHeight,ae=xe.footerHeight,ve=function(Ke,pt){var gt=[].concat(Ke).map(Ni).reduce(function(vt,tn){return vt.add(Tr(tn,0,pt)),vt},new Set),Qe=Array.from(gt),Nt=Math.min.apply(Math,Qe);if(Number.isNaN(Nt))throw new TypeError("minSnap is NaN");var kt=Math.max.apply(Math,Qe);if(Number.isNaN(kt))throw new TypeError("maxSnap is NaN");return{snapPoints:Qe,minSnap:Nt,maxSnap:kt}}(Te?te({height:q.current,footerHeight:ae,headerHeight:Be,minHeight:ke,maxHeight:Ae}):[0],Ae),ft=ve.snapPoints,Zt=ve.minSnap,lt=ve.maxSnap;return u.useDebugValue("minSnap: "+Zt+", maxSnap:"+lt),{minSnap:Zt,maxSnap:lt,findSnap:function(Ke){var pt=Ni(typeof Ke=="function"?Ke({footerHeight:ae,headerHeight:Be,height:q.current,minHeight:ke,maxHeight:Ae,snapPoints:ft,lastSnap:de.current}):Ke);return ft.reduce(function(gt,Qe){return Math.abs(Qe-pt)<Math.abs(gt-pt)?Qe:gt},Zt)},maxHeight:Ae}}({contentRef:ee,controlledMaxHeight:h,footerEnabled:!!o,footerRef:ie,getSnapPoints:L,headerEnabled:s!==!1,headerRef:K,heightRef:ge,lastSnapRef:c,ready:$,registerReady:G,resizeSourceRef:Le}),re=Re.minSnap,oe=Re.maxSnap,ze=Re.maxHeight,Ye=Re.findSnap,J=u.useRef(ze),$e=u.useRef(re),Ne=u.useRef(oe),ht=u.useRef(Ye),at=u.useRef(0);Yr(function(){J.current=ze,Ne.current=oe,$e.current=re,ht.current=Ye,at.current=Ye(y)},[Ye,y,ze,oe,re]);var se=u.useCallback(function(F){var te=F.onRest,q=F.config,de=(q=q===void 0?{}:q).velocity,Te=de===void 0?1:de,xe=to(q,SS),Ae=to(F,LS);return new Promise(function(ke){return W(ut({},Ae,{config:ut({velocity:Te},xe,{mass:1,tension:ES,friction:Math.max(Bi,Bi+(Bi-Bi*Te))}),onRest:function(){var Be=[].slice.call(arguments);ke.apply(void 0,Be),te==null||te.apply(void 0,Be)}}))})},[W]),wn=tb(bS,{devTools:!1,actions:{onOpenCancel:u.useCallback(function(){return A.current==null?void 0:A.current({type:"OPEN"})},[]),onSnapCancel:u.useCallback(function(F){return A.current==null?void 0:A.current({type:"SNAP",source:F.snapSource})},[]),onCloseCancel:u.useCallback(function(){return A.current==null?void 0:A.current({type:"CLOSE"})},[]),onResizeCancel:u.useCallback(function(){return A.current==null?void 0:A.current({type:"RESIZE",source:Le.current})},[]),onOpenEnd:u.useCallback(function(){return T.current==null?void 0:T.current({type:"OPEN"})},[]),onSnapEnd:u.useCallback(function(F,te){return T.current==null?void 0:T.current({type:"SNAP",source:F.snapSource})},[]),onResizeEnd:u.useCallback(function(){return T.current==null?void 0:T.current({type:"RESIZE",source:Le.current})},[])},context:{initialState:l},services:{onSnapStart:u.useCallback(function(F,te){try{return Promise.resolve(Z.current==null?void 0:Z.current({type:"SNAP",source:te.payload.source||"custom"}))}catch(q){return Promise.reject(q)}},[]),onOpenStart:u.useCallback(function(){try{return Promise.resolve(Z.current==null?void 0:Z.current({type:"OPEN"}))}catch(F){return Promise.reject(F)}},[]),onCloseStart:u.useCallback(function(){try{return Promise.resolve(Z.current==null?void 0:Z.current({type:"CLOSE"}))}catch(F){return Promise.reject(F)}},[]),onResizeStart:u.useCallback(function(){try{return Promise.resolve(Z.current==null?void 0:Z.current({type:"RESIZE",source:Le.current}))}catch(F){return Promise.reject(F)}},[]),onSnapEnd:u.useCallback(function(F,te){try{return Promise.resolve(T.current==null?void 0:T.current({type:"SNAP",source:F.snapSource}))}catch(q){return Promise.reject(q)}},[]),onOpenEnd:u.useCallback(function(){try{return Promise.resolve(T.current==null?void 0:T.current({type:"OPEN"}))}catch(F){return Promise.reject(F)}},[]),onCloseEnd:u.useCallback(function(){try{return Promise.resolve(T.current==null?void 0:T.current({type:"CLOSE"}))}catch(F){return Promise.reject(F)}},[]),onResizeEnd:u.useCallback(function(){try{return Promise.resolve(T.current==null?void 0:T.current({type:"RESIZE",source:Le.current}))}catch(F){return Promise.reject(F)}},[]),renderVisuallyHidden:u.useCallback(function(F,te){try{return Promise.resolve(se({y:at.current,ready:0,maxHeight:J.current,maxSnap:Ne.current,minSnap:at.current,immediate:!0})).then(function(){})}catch(q){return Promise.reject(q)}},[se]),activate:u.useCallback(function(F,te){try{return z.current=!0,Promise.resolve(Promise.all([Ee.current.activate(),Me.current.activate(),Ie.current.activate()])).then(function(){})}catch(q){return Promise.reject(q)}},[Ie,Me,Ee]),deactivate:u.useCallback(function(){try{return Ee.current.deactivate(),Me.current.deactivate(),Ie.current.deactivate(),z.current=!1,Promise.resolve()}catch(F){return Promise.reject(F)}},[Ie,Me,Ee]),openImmediately:u.useCallback(function(){try{return ge.current=at.current,Promise.resolve(se({y:at.current,ready:1,maxHeight:J.current,maxSnap:Ne.current,minSnap:at.current,immediate:!0})).then(function(){})}catch(F){return Promise.reject(F)}},[se]),openSmoothly:u.useCallback(function(){try{return Promise.resolve(se({y:0,ready:1,maxHeight:J.current,maxSnap:Ne.current,minSnap:at.current,immediate:!0})).then(function(){return ge.current=at.current,Promise.resolve(se({y:at.current,ready:1,maxHeight:J.current,maxSnap:Ne.current,minSnap:at.current,immediate:we.current})).then(function(){})})}catch(F){return Promise.reject(F)}},[se,we]),snapSmoothly:u.useCallback(function(F,te){try{var q=ht.current(F.y);return ge.current=q,c.current=q,Promise.resolve(se({y:q,ready:1,maxHeight:J.current,maxSnap:Ne.current,minSnap:$e.current,immediate:we.current,config:{velocity:F.velocity}})).then(function(){})}catch(de){return Promise.reject(de)}},[se,c,we]),resizeSmoothly:u.useCallback(function(){try{var F=ht.current(ge.current);return ge.current=F,c.current=F,Promise.resolve(se({y:F,ready:1,maxHeight:J.current,maxSnap:Ne.current,minSnap:$e.current,immediate:Le.current!=="element"||we.current})).then(function(){})}catch(te){return Promise.reject(te)}},[se,c,we]),closeSmoothly:u.useCallback(function(F,te){try{return se({minSnap:ge.current,immediate:!0}),ge.current=0,Promise.resolve(se({y:0,maxHeight:J.current,maxSnap:Ne.current,immediate:we.current})).then(function(){return Promise.resolve(se({ready:0,immediate:!0})).then(function(){})})}catch(q){return Promise.reject(q)}},[se,we])}}),pi=wn[0],Mt=wn[1];u.useEffect(function(){$&&Mt(a?"OPEN":"CLOSE")},[a,Mt,$]),Yr(function(){(ze||oe||re)&&Mt("RESIZE")},[ze,oe,re,Mt]),u.useEffect(function(){return function(){Ee.current.deactivate(),Me.current.deactivate(),Ie.current.deactivate()}},[Ie,Me,Ee]),u.useImperativeHandle(e,function(){return{snapTo:function(F,te){var q=te===void 0?{}:te,de=q.velocity,Te=de===void 0?1:de,xe=q.source,Ae=xe===void 0?"custom":xe;Mt("SNAP",{payload:{y:ht.current(F),velocity:Te,source:Ae}})},get height(){return ge.current}}},[Mt]),u.useEffect(function(){var F=X.current,te=function(de){Fe.current&&de.preventDefault()},q=function(de){F.scrollTop<0&&(requestAnimationFrame(function(){F.style.overflow="hidden",F.scrollTop=0,F.style.removeProperty("overflow")}),de.preventDefault())};return P&&(F.addEventListener("scroll",te),F.addEventListener("touchmove",te),F.addEventListener("touchstart",q)),function(){F.removeEventListener("scroll",te),F.removeEventListener("touchmove",te),F.removeEventListener("touchstart",q)}},[P,X]);var Gt=xw(function(F){var te=F.args,q=(te=te===void 0?[]:te)[0],de=(q=q===void 0?{}:q).closeOnTap,Te=de!==void 0&&de,xe=q.isContentDragging,Ae=xe!==void 0&&xe,ke=F.cancel,Be=F.direction[1],ae=F.down,ve=F.first,ft=F.last,Zt=F.memo,lt=Zt===void 0?V.y.getValue():Zt,Ke=F.tap,pt=F.velocity,gt=-1*F.movement[1];if(!z.current)return ke(),lt;if(d&&Te&&Ke)return ke(),setTimeout(function(){return d()},0),lt;if(Ke)return lt;var Qe=lt+gt,Nt=gt*pt,kt=Math.max($e.current,Math.min(Ne.current,Qe+2*Nt));if(!ae&&d&&Be>0&&Qe+Nt<$e.current/2)return ke(),d(),lt;var vt=ae?d||$e.current!==Ne.current?Wr(Qe,d?0:$e.current,Ne.current,.55):Qe<$e.current?Wr(Qe,$e.current,2*Ne.current,.55):Wr(Qe,$e.current/2,Ne.current,.55):kt;return P&&Ae?(vt>=Ne.current&&(vt=Ne.current),lt===Ne.current&&X.current.scrollTop>0&&(vt=Ne.current),Fe.current=vt<Ne.current):Fe.current=!1,ve&&Mt("DRAG"),ft?(Mt("SNAP",{payload:{y:vt,velocity:pt>.05?pt:1,source:"dragging"}}),lt):(W({y:vt,ready:1,maxHeight:J.current,maxSnap:Ne.current,minSnap:$e.current,immediate:!0,config:{velocity:pt}}),lt)},{filterTaps:!0});if(Number.isNaN(Ne.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN($e.current))throw new TypeError("minSnapRef is NaN!!");var gi=function(F){var te,q=F.spring,de=Wn([q.y,q.maxHeight],function(ae,ve){return Math.round(Tr(ve-ae,0,16))+"px"}),Te=Wn([q.y,q.minSnap,q.maxSnap],function(ae,ve,ft){return Tr(ae,ve,ft)+"px"}),xe=Wn([q.y,q.minSnap,q.maxSnap],function(ae,ve,ft){return ae<ve?ve-ae+"px":ae>ft?ft-ae+"px":"0px"}),Ae=Wn([q.y,q.maxSnap],function(ae,ve){return ae>=ve?Math.ceil(ae-ve):0}),ke=Wn([q.y,q.minSnap],function(ae,ve){if(!ve)return 0;var ft=Math.max(ve/2-45,0);return Tr((ae-ft)*(1/(Math.min(ve/2+45,ve)-ft)+0),0,1)}),Be=Wn([q.y,q.minSnap],function(ae,ve){return ve?Tr(ae/ve,0,1):0});return(te={})["--rsbs-content-opacity"]=ke,te["--rsbs-backdrop-opacity"]=Be,te["--rsbs-antigap-scale-y"]=Ae,te["--rsbs-overlay-translate-y"]=xe,te["--rsbs-overlay-rounded"]=de,te["--rsbs-overlay-h"]=Te,te}({spring:V});return u.createElement(zb.div,ut({},j,{"data-rsbs-root":!0,"data-rsbs-state":CS.find(pi.matches),"data-rsbs-is-blocking":g,"data-rsbs-is-dismissable":!!d,"data-rsbs-has-header":!!s,"data-rsbs-has-footer":!!o,className:i,ref:I,style:ut({},gi,E,{opacity:V.ready})}),r,g&&u.createElement("div",ut({key:"backdrop","data-rsbs-backdrop":!0},Gt({closeOnTap:!0}))),u.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:fe,onKeyDown:function(F){F.key==="Escape"&&(F.stopPropagation(),d&&d())}},s!==!1&&u.createElement("div",ut({key:"header","data-rsbs-header":!0,ref:K},Gt()),s),u.createElement("div",ut({key:"scroll","data-rsbs-scroll":!0,ref:X},P?Gt({isContentDragging:!0}):{}),u.createElement("div",{"data-rsbs-content":!0,ref:ee},n)),o&&u.createElement("div",ut({key:"footer",ref:ie,"data-rsbs-footer":!0},Gt()),o)))}),CS=["closed","opening","open","closing","dragging","snapping","resizing"];function _S(t){var e=t.lastSnap;return e??Math.min.apply(Math,t.snapPoints)}function OS(t){return t.minHeight}var MS=["onSpringStart","onSpringEnd","skipInitialTransition"],Cd=u.forwardRef(function(t,e){var n=t.onSpringStart,r=t.onSpringEnd,i=t.skipInitialTransition,o=to(t,MS),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");Yr(function(){if(o.open)return cancelAnimationFrame(c.current),l(!0),function(){d.current="CLOSED"}},[o.open]);var h=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(Jy,{"data-rsbs-portal":!0},u.createElement(xS,ut({},o,{lastSnapRef:f,ref:e,initialState:d.current,onSpringStart:h,onSpringEnd:v}))):null});const _d=28,kS="MapGoogle-module__root__Vi-sMl",PS="MapGoogle-module__hideUI__-JYLuR",RS="MapGoogle-module__mapContainer__OCCTIX",TS="MapGoogle-module__balloon__4UVhuT",AS="MapGoogle-module__details__4osNXn",DS="MapGoogle-module__cluster__5qmRds",IS="MapGoogle-module__overlay__g-nEoT",jS="MapGoogle-module__mapControl__mzyTwr",NS="MapGoogle-module__geolocationControl__1exHgA",BS="MapGoogle-module__bottomSheet__avcBmY",US="MapGoogle-module__locationViewContent__xwLeDh",VS="MapGoogle-module__locationViewHeader__maBLv0",FS="MapGoogle-module__deliveryDetailsViewContent__wH-RCe",zS="MapGoogle-module__deliveryDetailsViewHeader__4AKoBe",$S="MapGoogle-module__sheetSubmit__rPQG26",Xe={root:kS,hideUI:PS,mapContainer:RS,balloon:TS,details:AS,cluster:DS,overlay:IS,mapControl:jS,geolocationControl:NS,bottomSheet:BS,locationViewContent:US,locationViewHeader:VS,deliveryDetailsViewContent:FS,deliveryDetailsViewHeader:zS,sheetSubmit:$S},Od=({children:t,hideFooter:e,minSnapHeight:n,onSubmitClick:r,open:i,submitDisabled:o,submitLoading:s,...a})=>x.jsx(Cd,{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-_d],footer:e?null:x.jsx(Ot,{disabled:o,loading:s,variant:"primary",className:Xe.sheetSubmit,onClick:r,children:x.jsx(An,{keyName:"choose",ns:"common"})}),sibling:x.jsx("div",{role:"presentation","data-rsbs-backdrop":"true",onClick:l=>{var c;l.stopPropagation(),l.preventDefault(),(c=a.onDismiss)==null||c.call(a)}}),children:x.jsx("div",{className:Xe.bottomSheet,children:t})}),HS={header:Xe.locationViewHeader,content:Xe.locationViewContent},GS=({clusterer:t,hideDetails:e,onPointClick:n,onPointSelected:r,point:i,selectedPoint:o,setOpenDetails:s})=>{const a=hi("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)},y=(o==null?void 0:o.uid)===i.uid,p=y?Yn:Xt,L=Mf({isSelectedPoint:y}),w=u.useMemo(()=>{let _;switch(!0){case(i.type===30&&!y):{_=xt(Rt.PinLocker,"--owl-color-primary");break}case(i.type!==30&&!y):{_=xt(Rt.PinPvz,"--owl-color-grey-80");break}case(i.type===30&&y):{_=xt(Rt.PinLocker,"--owl-color-success");break}case(i.type!==30&&y):{_=xt(Rt.PinPvz,"--owl-color-black");break}}return mn(_,"Icon url is not defined"),{scaledSize:new google.maps.Size(...p),url:Jt(_)}},[y,p,i.type]),g=u.useMemo(()=>({lat:i.location.latitude,lng:i.location.longitude}),[i.location.latitude,i.location.longitude]),b=y&&L&&!!(l!=null&&l.getVisible());return x.jsxs(tf,{noClustererRedraw:!0,icon:w,position:g,clusterer:t,options:Of,onLoad:c,onClick:f,children:[a&&x.jsx(Od,{minSnapHeight:200,open:b,onDismiss:d,onSubmitClick:v,children:x.jsx(_f,{hideActions:!0,classes:HS,location:i,onClose:d})}),b&&!a&&x.jsx(lf,{onCloseClick:d,children:x.jsx(Cf,{...i,hideDetails:e,className:Xe.balloon,onSubmit:v,onDetails:h})})]},i.uid)},ZS=({hideDetails:t,onOpenDetails:e,onPointClick:n,onPointSelected:r,points:i,selectedPoint:o})=>x.jsx(Sv,{clusterClass:Xe.cluster,onClusteringEnd:()=>{setTimeout(()=>{const s=document.getElementsByClassName(Xe.cluster);for(const a of s)a.addEventListener("touchstart",Os,{passive:!0})},100)},onUnmount:()=>{const s=document.getElementsByClassName(Xe.cluster);for(const a of s)a.removeEventListener("touchstart",Os)},children:s=>x.jsx(x.Fragment,{children:i.map(a=>x.jsx(GS,{point:a,clusterer:s,hideDetails:t,selectedPoint:o,setOpenDetails:e,onPointClick:n,onPointSelected:r},a.uid))})}),WS=u.memo(ZS),qS=({onOpenDetails:t,onPointClick:e,onPointSelected:n})=>{const{hideDetails:r,locale:i}=st(),o=zt(Fu),s=bt(c=>c.location),a=$t(Ju),l=JSON.stringify([o.length,i,a==null?void 0:a.place_id]);return x.jsx(WS,{points:o,hideDetails:r,selectedPoint:s,onOpenDetails:t,onPointClick:e,onPointSelected:n},l)},KS=u.memo(qS),Md=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:42,height:42,fill:"none",viewBox:"0 0 42 42",...t},ce.createElement("rect",{width:42,height:42,fill:"#fff",rx:21}),ce.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"}),ce.createElement("rect",{width:41,height:41,x:.5,y:.5,stroke:"#1D3665",strokeOpacity:.1,rx:20.5})),JS="DeliveryBalloon-module__root__Nu90iy",YS="DeliveryBalloon-module__details__eqUTaI",XS="DeliveryBalloon-module__header__JVdyxN",QS="DeliveryBalloon-module__title__-zKKCt",e1="DeliveryBalloon-module__description__no5-ki",t1="DeliveryBalloon-module__actions__C-N0H-",n1="DeliveryBalloon-module__errorVariant__e6uhZl",r1="DeliveryBalloon-module__logo__62gC5h",ln={root:JS,details:YS,header:XS,title:QS,description:e1,actions:t1,errorVariant:n1,logo:r1},ra=({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 }":x.jsx(An,{keyName:"title",ns:"courier_balloon"}),d=t?"{ courier_balloon.error_title }":x.jsx(An,{keyName:"error_title",ns:"courier_balloon"}),h=t?"{ courier_balloon.error_description }":x.jsx(An,{keyName:"error_description",ns:"courier_balloon"});return x.jsxs("div",{className:be(ln.root,n,ln[`${a}Variant`]),children:[x.jsxs("div",{className:ln.header,children:[x.jsx(Md,{className:ln.logo}),x.jsx("span",{className:ln.title,children:l?d:f}),r&&x.jsx(ui,{onClick:o})]}),x.jsx("div",{className:ln.description,children:l?h:e||"{{ properties.address }}"}),c&&!i&&x.jsx("div",{className:ln.actions,children:x.jsx(Ot,{id:lo,as:"button",variant:"primary",className:ln.details,onClick:s,children:t?"{ details }":x.jsx(An,{keyName:"details",ns:"common"})})})]})},i1="Chip-module__root__zsoSyP",o1="Chip-module__active__BlTSFB",Zc={root:i1,active:o1},Wc=({active:t,children:e,className:n,...r})=>x.jsx("div",{...r,className:be(Zc.root,n,{[Zc.active]:t}),children:e}),s1="TextArea-module__root__8YFknR",a1={root:s1},qc=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=jd(e,a);return x.jsx("textarea",{...o,ref:l,className:be(a1.root,t),onBlur:n,onFocus:i,onChange:r})}),l1=({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},c1="DeliveryDetailsView-module__title__azeoUr",u1="DeliveryDetailsView-module__logo__4zZtpM",f1="DeliveryDetailsView-module__header__oDE9He",d1="DeliveryDetailsView-module__content__6P27SY",h1="DeliveryDetailsView-module__section__2M3Qip",p1="DeliveryDetailsView-module__chips__KmYgha",g1="DeliveryDetailsView-module__actions__43XZ-V",v1="DeliveryDetailsView-module__submit__58LKBw",m1="DeliveryDetailsView-module__actionsHidden__SW-67b",y1="DeliveryDetailsView-module__commentSection__GlX1A2",b1="DeliveryDetailsView-module__comment__2pGG6h",mt={title:c1,logo:u1,header:f1,content:d1,section:h1,chips:p1,actions:g1,submit:v1,actionsHidden:m1,commentSection:y1,comment:b1},w1=u.forwardRef(({classes:t,hideActions:e,location:n,onChange:r,onClose:i,onSubmit:o},s)=>{var m;const{hideDeliveryTime:a,inputs:l,locale:c}=st(),{t:f}=jt(["details_modal","courier_balloon","common"]),d=u.useMemo(()=>l1({set:r,hideDeliveryTime:a}),[a,r]),[h,v]=u.useState(!1),[y,p]=u.useReducer(d,{comment:"",delivery_time:"",apartment_number:"",...n}),L=u.useCallback(async()=>{v(!0);try{mn(n.address,"Address is required");const S=await Yd({address:n.address,algorithm:10,service:10,language:c||lu});if(!Vu(S))return;const C=S==null?void 0:S.data.data,R={...y,address:C};return o==null||o(R),R}finally{v(!1)}},[c,n.address,o,y]);u.useImperativeHandle(s,()=>({submit:L}),[L]);const w=S=>()=>{p({payload:S,type:"SET_DELIVERY_TIME"})},g=S=>{p({payload:S.target.value,type:"SET_APARTMENT_NUMBER"})},b=S=>{p({payload:S.target.value,type:"SET_COMMENT"})},_=_o(l==null?void 0:l.apartment),E=_o(l==null?void 0:l.comment);return x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:be(mt.header,t==null?void 0:t.header),children:[x.jsx(ui,{onClick:i}),x.jsxs("div",{className:mt.title,children:[x.jsx(Md,{className:mt.logo}),x.jsx("span",{children:f("title",{ns:"courier_balloon"})})]})]}),x.jsxs("div",{className:be(mt.content,t==null?void 0:t.content),children:[x.jsxs("section",{className:mt.section,children:[x.jsxs("span",{children:[f("address"),":"]}),x.jsx("p",{children:n.address})]}),!a&&x.jsxs("section",{className:mt.section,children:[x.jsxs("span",{children:[f("delivery_time"),":"]}),x.jsxs("div",{className:mt.chips,children:[x.jsx(Wc,{active:y.delivery_time==="8:00-13:00",onClick:w("8:00-13:00"),children:"8:00 - 13:00"}),x.jsx(Wc,{active:y.delivery_time==="14:00-22:00",onClick:w("14:00-22:00"),children:"14:00 - 22:00"})]})]}),x.jsxs("section",{className:mt.section,children:[x.jsxs("span",{children:[f("apartment_number"),":"]}),x.jsx(qc,{..._,rows:1,onChange:g})]}),x.jsxs("section",{className:be(mt.section,mt.commentSection),children:[x.jsxs("span",{children:[f("comment"),":"]}),x.jsx(qc,{...E,className:mt.comment,onChange:b})]})]}),x.jsx("div",{className:be(mt.actions,{[mt.actionsHidden]:e}),children:x.jsx(Ot,{loading:h,disabled:!((m=y.meta)!=null&&m.valid)||h,variant:"primary",className:mt.submit,onClick:L,children:f("choose",{ns:"common"})})})]})}),kd=u.memo(w1),S1={header:Xe.deliveryDetailsViewHeader,content:Xe.deliveryDetailsViewContent},L1=({hideDeliveryTime:t,hideDetails:e,onPointClick:n,point:r,setDeliveryPoint:i,setOpenDetails:o})=>{const s=Mf({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),y=hi("screenSm"),p=u.useMemo(()=>({lat:f.coords[0],lng:f.coords[1]}),[f.coords]),L=()=>{o==null||o(!0)},w=()=>{i==null||i(null)},g=u.useMemo(()=>({url:Jt(xt(Rt.PinHome,"--owl-color-success")),scaledSize:new google.maps.Size(...Xt)}),[]),b=async()=>{var S;try{c(!0);const C=await((S=a.current)==null?void 0:S.submit());if(!C)return;n==null||n(C),o==null||o(!1),i==null||i(null)}finally{c(!1)}},_=x.jsx(ra,{...f,hideDetails:e,hasCloseButton:y,variant:f.address?"default":"error",className:Xe.balloon,onDetails:L,onClose:w}),E=s&&!!(h!=null&&h.getVisible()),m=t?!!f.apartment_number:!!f.apartment_number&&!!f.delivery_time;return x.jsxs(tf,{noClustererRedraw:!0,icon:g,position:p,options:Of,onLoad:v,children:[y&&x.jsxs(Od,{minSnapHeight:f.address?200:void 0,submitDisabled:!m||l,submitLoading:l,hideFooter:!f.address,open:E,onDismiss:w,onSubmitClick:b,children:[f.address&&x.jsx(kd,{ref:a,hideActions:!0,classes:S1,location:r,onChange:d,onClose:w}),!f.address&&_]}),!y&&E&&x.jsx(lf,{onCloseClick:w,children:_})]})},E1=({children:t,className:e,onIdle:n,onLoad:r,onUnmount:i})=>{const{disableDelivery:o,hideMapUI:s,map:a}=st(),l=u.useMemo(()=>{var f,d;return{lat:((f=a==null?void 0:a.center)==null?void 0:f[0])??co[0],lng:((d=a==null?void 0:a.center)==null?void 0:d[1])??co[1]}},[a==null?void 0:a.center]),c=u.useCallback(async f=>{var v;const{latLng:d}=f;if(!d||o)return;ye.getState().setDetailsOpen(!1),bt.getState().setSelectedLocation(null);const h=[d.lat(),d.lng()];try{const y=await sr(h),p=(v=y==null?void 0:y.results)==null?void 0:v[0],L=p==null?void 0:p.formatted_address;$t.getState().setPlace(p),mn(L,"Address is not defined"),We.getState().setDeliverPoint({address:L,coords:h})}catch{We.getState().setDeliverPoint({address:null,coords:h})}},[o]);return x.jsx(Yg,{zoom:a==null?void 0:a.initialZoom,center:l,options:Zy,mapContainerClassName:be(Xe.root,e,{[Xe.hideUI]:s}),onLoad:r,onIdle:n,onUnmount:i,onClick:c,children:t})},x1=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},ce.createElement("rect",{width:2,height:20,x:9,fill:"#fff",rx:1}),ce.createElement("rect",{width:2,height:20,x:20,y:9,fill:"#fff",rx:1,transform:"rotate(90 20 9)"}),ce.createElement("circle",{cx:10,cy:10,r:8,fill:"#fff"}),ce.createElement("circle",{cx:10,cy:10,r:6,fill:"currentcolor"}),ce.createElement("circle",{cx:10,cy:10,r:4,fill:"#fff"})),C1=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)})},_1=t=>{const e=document.createElement("div");e.classList.add(Xe.mapControl),e.classList.add(Xe.geolocationControl),e.innerHTML=$i.renderToString(x.jsx(x1,{})),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{ha(async n=>{var a;const{latitude:r,longitude:i}=n.coords,s=await sr([r,i]);$t.getState().setPlace((a=s.results)==null?void 0:a[0])})})},O1=({className:t})=>{const e=Qt(),n=ye(gu),r=ye(jh),i=zt(ga),o=We(Po),{disableGeolocation:s,hideDeliveryTime:a,hideDetails:l,hideMapControls:c,onPointClick:f}=st(),d=u.useCallback(p=>{ye.getState().setMap(p),c||(C1(p),s||_1(p))},[s,c]),h=u.useCallback(()=>{ye.getState().setMap(null)},[]),v=u.useCallback(()=>{if(!n)return;const p=n==null?void 0:n.getBounds();p&&zt.getState().loadNext([[p.getSouthWest().lat(),p.getNorthEast().lat()],[p.getSouthWest().lng(),p.getNorthEast().lng()]],e)},[e,n]),y=u.useCallback(async p=>{var g;if(We.getState().setDeliverPoint(null),bt.getState().setSelectedLocation(p),!p)return;const L=[p.location.latitude,p.location.longitude],w=await sr(L);$t.getState().setPlace((g=w.results)==null?void 0:g[0])},[]);return x.jsxs("div",{className:be(Xe.mapContainer,t),children:[x.jsxs(E1,{onIdle:v,onLoad:d,onUnmount:h,children:[o&&x.jsx(L1,{hideDeliveryTime:a,hideDetails:l,point:o,setOpenDetails:ye.getState().setDetailsOpen,setDeliveryPoint:We.getState().setDeliverPoint,onPointClick:f}),x.jsx(KS,{onPointClick:f,onOpenDetails:ye.getState().setDetailsOpen,onPointSelected:y})]}),(i||r)&&x.jsx(ya,{className:Xe.overlay,children:x.jsx(ri,{})})]})},M1=u.memo(O1);function Bn(){return Bn=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},Bn.apply(this,arguments)}const Pd=(t,e)=>{const n={};for(const r in t)e.indexOf(r)===-1&&(n[r]=t[r]);return n},Rd=u.createContext(null),Fo=u.createContext(null),Td=t=>e=>u.createElement(Fo.Consumer,null,n=>u.createElement(t,Bn({parent:n},e))),k1=(t=[])=>{const[e,n]=u.useState(!1),r=u.useRef(t),i=(()=>{const s=u.useContext(Rd);if(s===null)throw new Error("Couldn't find Yandex.Maps API in the context. Make sure that hook useYMaps is inside <YMaps /> provider");return s})(),o=i.getApi();return u.useEffect(()=>{i.load().then(()=>Promise.all(r.current.map(i.loadModule))).then(()=>n(!0))},[]),e&&o?o:null},P1=()=>{},R1=["onLoad","onError","modules","apiLoader"];function Da(t,e=!1,n=[]){return r=>{const{width:i,height:o,modules:s=[],onLoad:a=P1}=r,l=k1(n.concat(s)),c=!e||!!l,f=Pd(r,R1);return u.useEffect(()=>l?a(l):void 0,[l]),c?u.createElement(t,Bn({ymaps:l},f)):u.createElement("div",{style:{width:i,height:o}})}}const T1=typeof window<"u",Kc={lang:"ru_RU",load:"",ns:"",mode:"release"},A1=t=>{const{version:e="2.1",enterprise:n=!1,query:r={lang:"ru_RU",load:"",ns:""},preload:i=!1,children:o}=t,s=u.useRef((a=>{const{query:l=Kc}=a,c=Date.now().toString(32),f=l.ns||"",d="__yandex-maps-api-onload__$$"+c,h="__yandex-maps-api-onerror__$$"+c,v=T1?window:{},y={};let p;const L=()=>f?v[f]:p,w=()=>{delete v[d],delete v[h]};return{load:()=>{if(L())return Promise.resolve(p);if(y[f])return y[f];const g={onload:d,onerror:h,...Kc,...l},b=Object.keys(g).map(E=>`${E}=${g[E]}`).join("&"),_=[`https://${a.enterprise?"enterprise.":""}api-maps.yandex.ru`,a.version,"?"+b].join("/");return y[f]=new Promise((E,m)=>{v[d]=S=>{w(),S.ready(()=>{p=S,E(S)})},v[h]=S=>{w(),m(S)},(S=>new Promise((C,R)=>{const M=document.createElement("script");M.type="text/javascript",M.onload=C,M.onerror=R,M.src=S,M.async=!0,document.head.appendChild(M)}))(_).catch(v[h])}),y[f]},getApi:L,loadModule:g=>new Promise((b,_)=>{p.modules.require(g).done(E=>{E.forEach(m=>{((S,C,R,M=!1)=>{const O=typeof C=="string"?C.split("."):C.slice();let P,j=S;for(;O.length>1;)P=O.shift(),j[P]||(j[P]={}),j=j[P];const B=O[0];j[B]=M===!0&&j[B]||R})(p,g,m,!0)}),b(p)},_)})}})({version:e,enterprise:n,query:r,preload:i}));return u.useEffect(()=>{i&&s.current.load()},[s.current]),u.createElement(Rd.Provider,{value:s.current},o)},Jc=/^on(?=[A-Z])/;function Ve(t){return Object.keys(t).reduce((e,n)=>{if(Jc.test(n)){const r=n.replace(Jc,"").toLowerCase();e._events[r]=t[n]}else e[n]=t[n];return e},{_events:{}})}function Un(t,e,n){typeof n=="function"&&t.events.add(e,n)}function Vn(t,e,n){typeof n=="function"&&t.events.remove(e,n)}function gr(t,e,n){Object.keys(Object.assign({},e,n)).forEach(r=>{e[r]!==n[r]&&(Vn(t,r,e[r]),Un(t,r,n[r]))})}const Ad=t=>"default"+t.charAt(0).toUpperCase()+t.slice(1);function tt(t,e){return t[e]!==void 0||t[Ad(e)]===void 0}function Y(t,e,n){return(tt(t,e)?t[e]:t[Ad(e)])||n}function nt(t,e,n=null){if(t!==e){if(t&&("current"in t?t.current=null:typeof t=="function"&&t(null)),!e)return;"current"in e?e.current=n:typeof e=="function"&&e(n)}}function Dd(t){const{width:e,height:n,style:r,className:i}=t;return r!==void 0||i!==void 0?Object.assign({},r&&{style:r},i&&{className:i}):{style:{width:e,height:n}}}class D1 extends u.Component{constructor(e){super(e),this.state={error:null,errorInfo:null}}componentDidCatch(e,n){const{onError:r=()=>{}}=this.props;r(e),this.setState({error:e,errorInfo:n})}render(){return this.state.error?null:this.props.children}}const Ia=t=>({onError:e,...n})=>u.createElement(D1,{onError:e},u.createElement(t,n));class Xr extends u.Component{constructor(){super(),this.instance=null,this.state={instance:null},this._parentElement=null,this._getRef=e=>{this._parentElement=e}}componentDidMount(){this.instance=Xr.mountObject(this._parentElement,this.props.ymaps.Map,this.props),this.setState({instance:this.instance})}componentDidUpdate(e){this.instance!==null&&Xr.updateObject(this.instance,e,this.props)}componentWillUnmount(){Xr.unmountObject(this.instance,this.props)}render(){const e=Dd(this.props),n=Ve(this.props),r=Pd(n,["_events","state","defaultState","options","defaultOptions","instanceRef","ymaps","children","width","height","style","className"]);return u.createElement(Fo.Provider,{value:this.state.instance},u.createElement("div",Bn({ref:this._getRef},e,r),this.props.children))}static mountObject(e,n,r){const{instanceRef:i,_events:o}=Ve(r),s=new n(e,Y(r,"state"),Y(r,"options"));return Object.keys(o).forEach(a=>Un(s,a,o[a])),nt(null,i,s),s}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(tt(r,"state")){const l=Y(n,"state",{}),c=Y(r,"state",{});l.type!==c.type&&e.setType(c.type),l.behaviors!==c.behaviors&&(l.behaviors&&e.behaviors.disable(l.behaviors),c.behaviors&&e.behaviors.enable(c.behaviors)),c.zoom&&l.zoom!==c.zoom&&e.setZoom(c.zoom),c.center&&l.center!==c.center&&e.setCenter(c.center),c.bounds&&l.bounds!==c.bounds&&e.setBounds(c.bounds)}if(tt(r,"options")){const l=Y(n,"options"),c=Y(r,"options",{});l!==c&&e.options.set(c)}Y(n,"width")===Y(r,"width")&&Y(n,"height")===Y(r,"height")||e.container.fitToViewport(),gr(e,s,i),nt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,_events:i}=Ve(n);e!==null&&(Object.keys(i).forEach(o=>Vn(e,o,i[o])),e.destroy(),nt(r))}}const Id=Ia(Da(Xr,!0,["Map"]));Id.defaultProps={width:320,height:240};class no extends u.Component{constructor(){super(),this.state={instance:null},this._parentElement=null,this._getRef=e=>{this._parentElement=e}}componentDidMount(){this._mounted=!0,this.props.ymaps.panorama.isSupported()&&no.mountObject(this._parentElement,this.props.ymaps.panorama,this.props).then(e=>this._mounted&&this.setState({instance:e}))}componentDidUpdate(e){this.state.instance!==null&&no.updateObject(this.state.instance,e,this.props)}componentWillUnmount(){this._mounted=!1,no.unmountObject(this.state.instance,this.props)}render(){const e=Dd(this.props);return u.createElement("div",Bn({ref:this._getRef},e))}static mountObject(e,n,r){const{instanceRef:i,_events:o}=Ve(r),s=Y(r,"point"),a=Y(r,"locateOptions"),l=Y(r,"options");return new Promise((c,f)=>{n.locate(s,a).done(d=>{if(d.length>0){const h=new n.Player(e,d[0],l);nt(null,i,h),Object.keys(o).forEach(v=>Un(h,v,o[v])),c(h)}},f)})}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(tt(r,"options")){const l=Y(n,"options"),c=Y(r,"options");l!==c&&e.options.set(c)}if(tt(r,"point")){const l=Y(r,"point"),c=Y(n,"point"),f=Y(r,"locateOptions");l!==c&&e.moveTo(l,f)}gr(e,s,i),nt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,_events:i}=Ve(n);e!==null&&(Object.keys(i).forEach(o=>Vn(e,o,i[o])),nt(r))}}class ro extends u.Component{constructor(){super(),this.state={instance:null},this.instance=null}componentDidMount(){const e=ro.mountControl(this.props.ymaps.control[this.props.name],this.props);this.instance=e,this.setState({instance:e})}componentDidUpdate(e){this.instance!==null&&ro.updateControl(this.instance,e,this.props)}componentWillUnmount(){ro.unmountControl(this.instance,this.props)}render(){return u.createElement(Fo.Provider,{value:this.state.instance},this.props.children)}static mountControl(e,n){const{instanceRef:r,parent:i,lazy:o,_events:s}=Ve(n),a=new e({data:Y(n,"data"),options:Y(n,"options"),state:Y(n,"state"),mapTypes:Y(n,"mapTypes"),lazy:o});if(Object.keys(s).forEach(l=>Un(a,l,s[l])),i&&i.controls&&typeof i.controls.add=="function")i.controls.add(a);else{if(!i||!i.add||typeof i.add!="function")throw new Error(`No parent found to mount ${n.name}`);i.add(a)}return nt(null,r,a),a}static updateControl(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(tt(r,"options")){const l=Y(n,"options"),c=Y(r,"options");l!==c&&e.options.set(c)}if(tt(r,"data")){const l=Y(n,"data"),c=Y(r,"data");l!==c&&e.data.set(c)}if(tt(r,"state")){const l=Y(n,"state"),c=Y(r,"state");l!==c&&e.state.set(c)}if(tt(r,"mapTypes")){const l=Y(n,"mapTypes"),c=Y(r,"mapTypes");l!==c&&(e.removeAllMapTypes(),c.forEach(f=>e.addMapType(f)))}gr(e,s,i),nt(a,o,e)}static unmountControl(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n);e!==null&&(Object.keys(o).forEach(s=>Vn(e,s,o[s])),i.controls&&typeof i.controls.remove=="function"?i.controls.remove(e):i.remove&&typeof i.remove=="function"&&i.remove(e),nt(r))}}class io extends u.Component{constructor(){super(),this.state={instance:null},this.instance=null}componentDidMount(){const e=io.mountObject(this.props.ymaps.Clusterer,this.props);this.instance=e,this.setState({instance:e})}componentDidUpdate(e){this.state.instance!==null&&io.updateObject(this.instance,e,this.props)}componentWillUnmount(){io.unmountObject(this.instance,this.props)}render(){return u.createElement(Fo.Provider,{value:this.state.instance},this.props.children)}static mountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n),s=new e(Y(n,"options"));if(Object.keys(o).forEach(a=>Un(s,a,o[a])),i.geoObjects&&typeof i.geoObjects.add=="function")i.geoObjects.add(s);else{if(!i.add||typeof i.add!="function")throw new Error("No parent found to mount Clusterer");i.add(s)}return nt(null,r,s),s}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(tt(r,"options")){const l=Y(n,"options"),c=Y(r,"options");l!==c&&e.options.set(c)}gr(e,s,i),nt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n);e!==null&&(Object.keys(o).forEach(s=>Vn(e,s,o[s])),i.geoObjects&&typeof i.geoObjects.remove=="function"?i.geoObjects.remove(e):i.remove&&typeof i.remove=="function"&&i.remove(e),nt(r))}}class Qr extends u.Component{constructor(){super(),this.state={instance:null}}componentDidMount(){const e=Qr.mountObject(this.props.ymaps.ObjectManager,this.props);this.instance=e,this.setState({instance:e})}componentDidUpdate(e){this.instance!==null&&Qr.updateObject(this.instance,e,this.props)}componentWillUnmount(){Qr.unmountObject(this.instance,this.props)}render(){return null}static mountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n),s=Y(n,"options",{}),a=Y(n,"features",{}),l=Y(n,"filter",null),c=Y(n,"objects",{}),f=Y(n,"clusters",{}),d=new e(s);if(d.add(a||[]),d.setFilter(l),d.objects.options.set(c),d.clusters.options.set(f),Object.keys(o).forEach(h=>Un(d,h,o[h])),i.geoObjects&&typeof i.geoObjects.add=="function")i.geoObjects.add(d);else{if(!i.add||typeof i.add!="function")throw new Error("No parent found to mount ObjectManager");i.add(d)}return nt(null,r,d),d}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(tt(r,"options")){const l=Y(n,"options"),c=Y(r,"options");l!==c&&e.options.set(c)}if(tt(r,"objects")){const l=Y(n,"objects"),c=Y(r,"objects");l!==c&&e.objects.options.set(c)}if(tt(r,"clusters")){const l=Y(n,"clusters"),c=Y(r,"clusters");l!==c&&e.clusters.options.set(c)}if(tt(r,"filter")){const l=Y(n,"filter"),c=Y(r,"filter");l!==c&&e.setFilter(c)}if(tt(r,"features")){const l=Y(n,"features"),c=Y(r,"features");l!==c&&(e.remove(l),e.add(c))}gr(e,s,i),nt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n);e!==null&&(Object.keys(o).forEach(s=>Vn(e,s,o[s])),i.geoObjects&&typeof i.geoObjects.remove=="function"?i.geoObjects.remove(e):i.remove&&typeof i.remove=="function"&&i.remove(e),nt(r))}}var I1=Ia(Td(Da(Qr,!0,["ObjectManager"])));class ei extends u.Component{constructor(){super(),this.state={instance:null},this.instance=null}componentDidMount(){const{name:e,ymaps:n,dangerZone:r}=this.props,i=ei.mountObject(r&&typeof r.modifyConstructor=="function"?r.modifyConstructor(n[e]):n[e],this.props);this.instance=i,this.setState({instance:i})}componentDidUpdate(e){this.instance!==null&&ei.updateObject(this.instance,e,this.props)}componentWillUnmount(){ei.unmountObject(this.instance,this.props)}render(){return null}static mountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n),s=new e(Y(n,"geometry"),Y(n,"properties"),Y(n,"options"));if(Object.keys(o).forEach(a=>Un(s,a,o[a])),i&&i.geoObjects&&typeof i.geoObjects.add=="function")i.geoObjects.add(s);else{if(!i||!i.add||typeof i.add!="function")throw new Error(`No parent found to mount ${n.name}`);i.add(s)}return nt(null,r,s),s}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(tt(r,"geometry")){const l=Y(n,"geometry",{}),c=Y(r,"geometry",{});Array.isArray(c)&&c!==l?Array.isArray(c[0])&&typeof c[1]=="number"?(e.geometry.setCoordinates(c[0]),e.geometry.setRadius(c[1])):e.geometry.setCoordinates(c):typeof c=="object"&&(c.coordinates!==l.coordinates&&e.geometry.setCoordinates(c.coordinates),c.radius!==l.radius&&e.geometry.setRadius(c.radius))}if(tt(r,"properties")){const l=Y(n,"properties"),c=Y(r,"properties");l!==c&&e.properties.set(c)}if(tt(r,"options")){const l=Y(n,"options"),c=Y(r,"options");l!==c&&e.options.set(c)}gr(e,s,i),nt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n);e!==null&&(Object.keys(o).forEach(s=>Vn(e,s,o[s])),i.geoObjects&&typeof i.geoObjects.remove=="function"?i.geoObjects.remove(e):i.remove&&typeof i.remove=="function"&&i.remove(e),nt(r))}}var Yc=Ia(Td(Da(t=>u.createElement(ei,Bn({},t,{name:"Placemark"})),!0,["Placemark"])));const oo=(t,e)=>t===30?`custom#pin-locker${e?`__${e}`:""}`:`custom#pin-pvz${e?`__${e}`:""}`,Br=t=>[-(t[0]/2),-t[1]],Xc=(t,e,n)=>t==null?void 0:t.map(r=>{var i;return{id:r.uid,type:"Feature",properties:{point:r},geometry:{type:"Point",coordinates:[r.location.latitude,r.location.longitude]},options:{hideIconOnBalloonOpen:!1,preset:oo(r.type),balloonOffset:[0,-Yn[1]],balloonContentLayout:(i=e==null?void 0:e.templateLayoutFactory)==null?void 0:i.createClass(n)}}}),j1={en:"en_US",ru:"ru_RU"},N1={load:"suggest",apikey:"5298a725-4baa-457a-a2a7-c3abac81db20"},B1=["templateLayoutFactory","option.presetStorage","geocode"],U1=["objectManager.addon.objectsBalloon"],Qc=["geoObject.addon.balloon"],V1={yandexMapDisablePoiInteractivity:!1},F1={clusterize:!0},eu={iconImageSize:Xt,iconLayout:"default#image",hideIconOnBalloonOpen:!1,balloonOffset:[0,-Xt[1]],iconImageOffset:Br(Xt)},z1="MapYandex-module__root__GNnwcS",$1="MapYandex-module__overlay__lf7cbO",H1="MapYandex-module__details__T9uy6N",tu={root:z1,overlay:$1,details:H1},G1=({className:t})=>{const{t:e}=jt(["courier_balloon","common"]),n=u.useRef(),r=u.useRef(null),{disableDelivery:i,hideDetails:o,locale:s,map:a,onPointClick:l}=st(),[c,f]=u.useState(null),[d,h]=u.useState([]),[v,y]=u.useState(F1),p=Qt(),L=zt(Fu),w=zt(ga),g=We(Po),b=bt(k=>k.location),_=u.useRef([]),E=u.useMemo(()=>$i.renderToString(x.jsx(Cf,{SSR:!0,hideDetails:o})).replace("{ choose }",e("choose")).replace("{ details }",e("details")),[e,s,o]),m=u.useMemo(()=>$i.renderToString(x.jsx(ra,{SSR:!0,variant:"default",hideDetails:o})).replace("{ details }",e("details",{ns:"common"})).replace("{ courier_balloon.title }",e("title")),[e,s,o]),S=u.useMemo(()=>$i.renderToString(x.jsx(ra,{SSR:!0,variant:"error",hideDetails:o})).replace("{ courier_balloon.error_title }",e("error_title")).replace("{ courier_balloon.error_description }",e("error_description")),[e,s,o]),C=u.useMemo(()=>({zoom:(a==null?void 0:a.initialZoom)??oa,center:(a==null?void 0:a.center)??co,behaviors:["default","scrollZoom"]}),[a==null?void 0:a.center,a==null?void 0:a.initialZoom]);u.useEffect(()=>{var k,D;(D=n.current)==null||D.events.fire("boundschange",{newBounds:(k=n.current)==null?void 0:k.getBounds()})},[c]),u.useEffect(()=>{var D;if(!c||!r.current)return;for(const U of _.current)U.id!==(b==null?void 0:b.uid)&&((D=r.current)==null||D.remove(U));const k=Xc(L,c,E);_.current=k,r.current.add(k)},[E,c,L,b==null?void 0:b.uid]);const R=u.useCallback(k=>{const D=k.get("newBounds");zt.getState().loadNext([[D[0][0],D[1][0]],[D[0][1],D[1][1]]],p)},[p]),M=u.useRef(b),O=u.useCallback(k=>{var D,U,V,W;f(k),ye.getState().setLoaded(),(D=k==null?void 0:k.option)==null||D.presetStorage.add("custom#pin-locker",{iconImageSize:Xt,iconLayout:"default#image",iconImageHref:Jt(xt(Rt.PinLocker,"--owl-color-primary")),iconImageOffset:Br(Xt)}),(U=k==null?void 0:k.option)==null||U.presetStorage.add("custom#pin-locker__active",{iconLayout:"default#image",iconImageHref:Jt(xt(Rt.PinLocker,"--owl-color-success")),iconImageSize:Yn,iconImageOffset:Br(Yn)}),(V=k==null?void 0:k.option)==null||V.presetStorage.add("custom#pin-pvz",{iconImageSize:Xt,iconLayout:"default#image",iconImageHref:Jt(xt(Rt.PinPvz,"--owl-color-grey-80")),iconImageOffset:Br(Xt)}),(W=k==null?void 0:k.option)==null||W.presetStorage.add("custom#pin-pvz__active",{iconLayout:"default#image",iconImageHref:Jt(xt(Rt.PinPvz,"--owl-color-black")),iconImageSize:Yn,iconImageOffset:Br(Yn)}),y(I=>({...I,clusterIconColor:pa("--owl-color-primary")})),h(Xc(L,k,E))},[E,L]),P=u.useCallback(()=>{ye.getState().setDetailsOpen(!0)},[]),j=u.useCallback(()=>{var k;M.current&&(l==null||l(M.current),ye.getState().setDetailsOpen(!1),bt.getState().setSelectedLocation(null),We.getState().setDeliverPoint(null),(k=n.current)==null||k.balloon.close())},[l]),B=u.useCallback(()=>{var k,D;(k=document.getElementById(lo))==null||k.addEventListener("click",P),(D=document.getElementById(bs))==null||D.addEventListener("click",j)},[j,P]),$=u.useCallback(k=>{var U,V,W,I,X,ee;const D=k.get("objectId");((U=M.current)==null?void 0:U.uid)===D&&((I=r.current)==null||I.objects.setObjectOptions((V=M.current)==null?void 0:V.uid,{preset:oo((W=M.current)==null?void 0:W.type)}),We.getState().setDeliverPoint(null),bt.getState().setSelectedLocation(null),We.getState().setDeliverPoint(null),M.current=null),(X=document.getElementById(lo))==null||X.removeEventListener("click",P),(ee=document.getElementById(bs))==null||ee.removeEventListener("click",j)},[j,P]),G=u.useCallback(k=>{var W,I,X,ee;const D=k.get("objectId"),U=(I=(W=r.current)==null?void 0:W.objects)==null?void 0:I.getById(D);if(!U)return;const V=U.properties.point;ye.getState().setDetailsOpen(!1),We.getState().setDeliverPoint(null),bt.getState().setSelectedLocation(V),(X=r.current)==null||X.objects.each(K=>{var fe;const ie=K;(fe=r.current)==null||fe.objects.setObjectOptions(ie.id,{preset:oo(ie.properties.point.type)})}),(ee=r.current)==null||ee.objects.setObjectOptions(D,{preset:oo(V.type,"active")}),M.current=V},[]),z=u.useCallback(async k=>{if(!c||i)return;const D=k.get("coords"),{geoObjects:U}=await c.geocode(D),V=U.get(0),W=V.getAddressLine(),I=V.properties.get("metaDataProperty.GeocoderMetaData.precision",{});if(bt.getState().setSelectedLocation(null),I!=="exact"){We.getState().setDeliverPoint({coords:D,address:null});return}We.getState().setDeliverPoint({coords:D,address:W})},[i,c]),Z=u.useMemo(()=>{var k;return{...eu,iconImageHref:Jt(xt(Rt.PinHome,"--owl-color-success")),balloonContentLayout:(k=c==null?void 0:c.templateLayoutFactory)==null?void 0:k.createClass(m)}},[m,c==null?void 0:c.templateLayoutFactory]),A=u.useMemo(()=>{var k;return{...eu,iconImageHref:Jt(xt(Rt.PinHome,"--owl-color-success")),balloonContentLayout:(k=c==null?void 0:c.templateLayoutFactory)==null?void 0:k.createClass(S)}},[S,c==null?void 0:c.templateLayoutFactory]),T=u.useCallback(k=>{var D,U,V,W,I;(D=k==null?void 0:k.balloon)==null||D.open(),(V=(U=k==null?void 0:k.balloon)==null?void 0:U.events)==null||V.add("open",B),(I=(W=k==null?void 0:k.balloon)==null?void 0:W.events)==null||I.add("close",$)},[$,B]);return x.jsxs("div",{className:be(tu.root,t),children:[x.jsx(A1,{query:{...N1,lang:j1[s??"ru"]},children:x.jsxs(Id,{width:"100%",height:"100%",state:C,instanceRef:n,options:V1,modules:B1,onLoad:O,onClick:z,onBoundsChange:R,children:[(g==null?void 0:g.address)&&x.jsx(Yc,{properties:g,modules:Qc,geometry:g.coords,options:Z,instanceRef:T},JSON.stringify(g.coords)),g&&!g.address&&x.jsx(Yc,{modules:Qc,geometry:g.coords,instanceRef:T,options:A},JSON.stringify(g.coords)),x.jsx(I1,{features:d,instanceRef:r,modules:U1,options:v,onClick:G,onBalloonOpen:B,onBalloonClose:$})]})},s),w&&x.jsx(ya,{className:tu.overlay,children:x.jsx(ri,{})})]})},Z1=u.memo(G1),W1=t=>({google:M1,yandex:Z1})[t];function jd(...t){return u.useCallback(e=>{for(const n of t)typeof n=="function"?n(e):n&&typeof n=="object"&&(n.current=e)},t)}const _o=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}},q1=()=>{throw new Error("useMediaQuery is a client-only hook")};function K1(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,q1)}const J1="768px",Y1="1024px",X1="1280px",Q1="1536px",eL={screenSm:J1,screenMd:Y1,screenLg:X1,screenXl:Q1};function hi(t){return K1(`(max-width: calc(${eL[t]} - 1px))`)}const tL=(t,e,n)=>{const{disableGeolocation:r}=n??{},i=ye(gu);u.useEffect(()=>{i&&ye.getState().setLoaded()},[i]);const o=t[0],s=t[1];u.useEffect(()=>{if(!i)return;const a=[o,s],l=async()=>{var f;const c=await sr(a,"GEOMETRIC_CENTER");$t.getState().setPlace((f=c.results)==null?void 0:f[0],oa)};if(r){l();return}ha(async c=>{var v;const{latitude:f,longitude:d}=c.coords,h=await sr([f,d],"GEOMETRIC_CENTER");$t.getState().setPlace((v=h.results)==null?void 0:v[0])},()=>l())},[o,s,i,e,r])},Nd=iy().use(Gm()).use(jm()).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_gfpwi2dimy3domrsnezham3ugbvw24tfm5vwk3bqgntxa"}),nL=t=>{u.useEffect(()=>{t&&(Nd.changeLanguage(t),fo.setLanguage(t))},[t])},rL=t=>{u.useEffect(()=>{if(t){const e=Object.keys(t);for(const n of e){const r=t[n];r&&jo(`--owl-color-${n}`,r)}}},[t])},iL=t=>{u.useEffect(()=>{t&&t!==void 0&&jo("--owl-button-radius",`${t}px`)},[t])},oL=t=>{u.useEffect(()=>{t&&t!==void 0&&jo("--owl-font",t)},[t])},sL={open:!1},aL=t=>t.open,Tn=bn(t=>({...sL,toggle(e){t(n=>({open:e??!n.open}))}})),lL=t=>{const e=t==="selector";u.useEffect(()=>{e&&Tn.getState().toggle(!0)},[e])},cL=({children:t})=>{const{font:e,locale:n,palette:r,radius:i,startScreen:o}=st();return oL(e),nL(n),rL(r),iL(i),lL(o),x.jsx(x.Fragment,{children:t})},uL=({children:t})=>{const{disableGeolocation:e,map:n}=st();return mn(n==null?void 0:n.center,"Map center is required"),mn(n==null?void 0:n.initialZoom,"Map initial zoom is required"),tL(n.center,n.initialZoom,{disableGeolocation:e}),x.jsx(x.Fragment,{children:t})},fL=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:28,fill:"none",viewBox:"0 0 24 28",...t},ce.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=()=>{Tn.getState().toggle(!0),ye.getState().setDetailsOpen(!1),We.getState().setDeliverPoint(null),bt.getState().setSelectedLocation(null)},hL="CurrentLocation-module__root__AeQCGT",pL="CurrentLocation-module__icon__459m9q",gL="CurrentLocation-module__text__w-9v28",ps={root:hL,icon:pL,text:gL},Bd=({className:t})=>{const{t:e}=jt("current_location"),n=$t(Ju),r=$t(Ig);return x.jsxs("div",{role:"presentation",className:be(ps.root,t),onClick:dL,children:[x.jsx(fL,{className:ps.icon}),x.jsxs("span",{className:ps.text,children:[!n&&e("choose_from_map"),n&&`${(r==null?void 0:r.long_name)??n.formatted_address}`]})]})},vL=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:123,height:32,fill:"none",viewBox:"0 0 123 32",...t},ce.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=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:192,height:20,fill:"none",viewBox:"0 0 192 20",...t},ce.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",Ur={root:yL,nav:bL,navItem:wL,logo:SL},LL={llama:mL,default:vL},EL=()=>{const{hideLogo:t,logo:e="default"}=st();if(t)return null;const n=LL[e];return x.jsx("div",{className:Ur.logo,children:x.jsx(n,{})})},xL=({className:t})=>{const{t:e}=jt("header"),{disableDelivery:n}=st(),r=ye(Th),i=We(Po);u.useEffect(()=>{i?ye.getState().setMode("location_delivery"):ye.getState().setMode("self_pickup")},[i]);const o=()=>{We.getState().setDeliverPoint(null),ye.getState().setMode("self_pickup")},s=()=>{We.getState().setDeliverPoint(null),ye.getState().setMode("location_delivery")},a=r==="self_pickup",l=r==="location_delivery";return x.jsxs("div",{className:be(Ur.root,t),children:[x.jsx(EL,{}),x.jsxs("nav",{className:Ur.nav,children:[!n&&x.jsx(Ot,{as:"link",className:Ur.navItem,variant:a?"primary":"secondary",onClick:o,children:e("self_pickup")}),!n&&x.jsx(Ot,{as:"link",className:Ur.navItem,variant:l?"primary":"secondary",onClick:s,children:e("courier_delivery")}),x.jsx(Bd,{})]})]})},CL=u.memo(xL),_L={open:!1},ur=bn(t=>({..._L,toggle(e){ye.getState().setDetailsOpen(!1),We.getState().setDeliverPoint(null),bt.getState().setSelectedLocation(null),t(n=>({open:e??!n.open}))}})),OL="Layout-module__root__qzPL-f",ML="Layout-module__headerHidden__JEN-d0",kL="Layout-module__sidebarHidden__x017O3",PL="Layout-module__sidebarOpen__IZnIjs",Ui={root:OL,headerHidden:ML,sidebarHidden:kL,sidebarOpen:PL},RL=({children:t})=>{const{hideFilters:e,hideHeader:n}=st(),r=ur(i=>i.open);return x.jsx("div",{className:be(Ui.root,{[Ui.sidebarOpen]:r,[Ui.headerHidden]:n,[Ui.sidebarHidden]:e}),children:t})},ja=()=>x.jsx(ya,{children:x.jsx(ri,{})}),TL=({children:t})=>{const e=zt(vg);return zt(ga)&&!e?x.jsx(ja,{}):x.jsx(x.Fragment,{children:t})};var Ud={},zo={},Vd={exports:{}},AL="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",DL=AL,IL=DL;function Fd(){}function zd(){}zd.resetWarningCache=Fd;var jL=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:zd,resetWarningCache:Fd};return n.PropTypes=n,n};Vd.exports=jL();var NL=Vd.exports,$o={},fr={};Object.defineProperty(fr,"__esModule",{value:!0});fr.loadGoogleMapScript=fr.isBrowser=void 0;var $d=typeof window<"u"&&window.document;fr.isBrowser=$d;var BL=function(e,n){if(!$d||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)})};fr.loadGoogleMapScript=BL;var Ho={};Object.defineProperty(Ho,"__esModule",{value:!0});Ho.GOOGLE_MAP_SCRIPT_BASE_URL=void 0;var UL="https://maps.googleapis.com/maps/api/js";Ho.GOOGLE_MAP_SCRIPT_BASE_URL=UL;function so(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?so=function(n){return typeof n}:so=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},so(t)}Object.defineProperty($o,"__esModule",{value:!0});$o.default=GL;var yt=FL(u),gs=fr,VL=Ho;function Hd(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(Hd=function(i){return i?n:e})(t)}function FL(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||so(t)!=="object"&&typeof t!="function")return{default:t};var n=Hd(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 nu(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 ru(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?nu(Object(n),!0).forEach(function(r){zL(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nu(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 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,y=l.bounds,p=$L(l,["types","componentRestrictions","fields","bounds"]),L=t.googleMapsScriptBaseUrl,w=L===void 0?VL.GOOGLE_MAP_SCRIPT_BASE_URL:L,g=t.language,b=(0,yt.useRef)(null),_=(0,yt.useRef)(null),E=(0,yt.useRef)(null),m=(0,yt.useRef)(null),S=g?"&language=".concat(g):"",C="".concat(w,"?libraries=").concat(o,"&key=").concat(r).concat(S),R=(0,yt.useCallback)(function(){return(0,gs.loadGoogleMapScript)(w,C)},[w,C]);return(0,yt.useEffect)(function(){var M=ru(ru({},p),{},{fields:v,types:f,bounds:y});if(d&&(M.componentRestrictions=d),!(E.current||!b.current||!gs.isBrowser)){e&&!e.current&&(e.current=b.current);var O=function(){var j;if(typeof google>"u")return console.error("Google has not been found. Make sure your provide apiKey prop.");if(!((j=google.maps)!==null&&j!==void 0&&j.places))return console.error("Google maps places API must be loaded.");if(!b.current instanceof HTMLInputElement)return console.error("Input ref must be HTMLInputElement.");E.current=new google.maps.places.Autocomplete(b.current,M),E.current&&(_.current=E.current.addListener("place_changed",function(){n&&E&&E.current&&n(E.current.getPlace(),b.current,E.current)}))};return r?R().then(function(){return O()}):O(),function(){return _.current?_.current.remove():void 0}}},[]),(0,yt.useEffect)(function(){var M;!(yt.default!==null&&yt.default!==void 0&&(M=yt.default.version)!==null&&M!==void 0&&M.startsWith("18"))&&gs.isBrowser&&window.MutationObserver&&b.current&&b.current instanceof HTMLInputElement&&(m.current=new MutationObserver(function(){m.current.disconnect(),b.current&&(b.current.autocomplete=a)}),m.current.observe(b.current,{attributes:!0,attributeFilter:["autocomplete"]}))},[a]),(0,yt.useEffect)(function(){E.current&&E.current.setFields(v)},[v]),(0,yt.useEffect)(function(){E.current&&E.current.setBounds(y)},[y]),(0,yt.useEffect)(function(){E.current&&E.current.setComponentRestrictions(d)},[d]),(0,yt.useEffect)(function(){E.current&&E.current.setOptions(p)},[p]),{ref:b,autocompleteRef:E}}function ao(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ao=function(n){return typeof n}:ao=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ao(t)}Object.defineProperty(zo,"__esModule",{value:!0});zo.default=void 0;var ia=WL(u),Ze=Gd(NL),ZL=Gd($o);function Gd(t){return t&&t.__esModule?t:{default:t}}function Zd(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(Zd=function(i){return i?n:e})(t)}function WL(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||ao(t)!=="object"&&typeof t!="function")return{default:t};var n=Zd(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 Oo(){return Oo=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},Oo.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 Wd(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,ZL.default)({ref:a,googleMapsScriptBaseUrl:s,onPlaceSelected:e,apiKey:n,libraries:r,inputAutocompleteValue:i,options:o,language:l}),d=f.ref;return ia.default.createElement("input",Oo({ref:d},c))}Wd.propTypes={apiKey:Ze.default.string,libraries:Ze.default.arrayOf(Ze.default.string),ref:Ze.default.oneOfType([Ze.default.func,Ze.default.shape({current:Ze.default.any})]),googleMapsScriptBaseUrl:Ze.default.string,onPlaceSelected:Ze.default.func,inputAutocompleteValue:Ze.default.string,options:Ze.default.shape({componentRestrictions:Ze.default.object,bounds:Ze.default.object,location:Ze.default.object,offset:Ze.default.number,origin:Ze.default.object,radius:Ze.default.number,sessionToken:Ze.default.object,types:Ze.default.arrayOf(Ze.default.string)}),language:Ze.default.string};var JL=(0,ia.forwardRef)(function(t,e){return ia.default.createElement(Wd,Oo({},t,{refProp:e}))});zo.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(zo),n=r($o);function r(i){return i&&i.__esModule?i:{default:i}}})(Ud);var qd=Ud;const YL="Aside-module__root__EotK2f",XL="Aside-module__open__Zwmbs5",QL="Aside-module__overlay__slLdHF",eE="Aside-module__container__28P4wq",Vi={root:YL,open:XL,overlay:QL,container:eE},tE=({children:t,className:e,open:n})=>x.jsxs("div",{className:be(Vi.root,e,{[Vi.open]:n}),children:[x.jsx("div",{className:Vi.overlay}),x.jsx("div",{className:Vi.container,children:t})]}),nE="Input-module__root__TF9IiD",rE="Input-module__endAdornment__m40K5R",iE="Input-module__input__505b7i",oE="Input-module__startAdornment__D-sJ0N",sE="Input-module__label__gmqtsf",aE="Input-module__inputContainer__vubIa-",Kn={root:nE,endAdornment:rE,input:iE,startAdornment:oE,label:sE,inputContainer:aE},Kd=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=jd(n,f);return x.jsxs("label",{htmlFor:a.id??c,className:be(Kn.root,t),children:[r&&x.jsx("span",{className:Kn.label,children:r}),x.jsxs("div",{className:Kn.inputContainer,children:[s&&x.jsx("div",{className:Kn.startAdornment,children:s}),x.jsx("input",{...a,ref:d,id:a.id??c,className:Kn.input,onChange:o,onBlur:i}),e&&x.jsx("div",{className:Kn.endAdornment,children:e})]})]})}),lE="LocationAside-module__submit__CSKcqi",cE="LocationAside-module__container__S1NejR",uE="LocationAside-module__selector__hl74ke",fE="LocationAside-module__label__0Zk8at",dE="LocationAside-module__header__N1wgyn",hE="LocationAside-module__close__VsE88z",Fi={submit:lE,container:cE,selector:uE,label:fE,header:dE,close:hE},pE=u.forwardRef((t,e)=>{const{t:n}=jt(["location_aside","common"]),r=Tn(aL),{country:i,hideCloseButtonOnLocationScreen:o,inputs:s,onCloseLocationSelector:a,onLocationSelect:l}=st(),c=u.useRef(null),[f,d]=u.useState("");u.useImperativeHandle(e,()=>({open:()=>Tn.getState().toggle(!0),close:()=>Tn.getState().toggle(!1)}),[]);const h=g=>{Tn.getState().toggle(!1),$t.getState().setPlace(g),l==null||l(g),g!=null&&g.formatted_address&&d(g==null?void 0:g.formatted_address)},v=()=>{Tn.getState().toggle(!1),a==null||a()},y=i?{componentRestrictions:{country:i}}:void 0,p=g=>{d(g.target.value)},{ref:L}=qd.usePlacesWidget({libraries:["places"],options:y,onPlaceSelected:h,apiKey:"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA",inputAutocompleteValue:f}),w=_o(s==null?void 0:s.city);return x.jsx(tE,{open:r,children:x.jsx("div",{ref:c,className:Fi.container,children:x.jsxs("div",{className:Fi.selector,children:[x.jsxs("div",{className:Fi.header,children:[x.jsx("div",{className:Fi.label,children:n("choose_city")}),!o&&x.jsx(ui,{position:"relative",onClick:v})]}),x.jsx(Kd,{...w,inputRef:L,value:f,placeholder:n("placeholder"),onChange:p})]})})})}),gE=u.memo(pE),vE=({children:t})=>{const{locale:e}=st(),n=u.useRef(e),{isLoaded:r}=iv({language:n.current,libraries:ih,googleMapsApiKey:"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA"});return r?x.jsx(x.Fragment,{children:t}):x.jsx(ja,{})},mE=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},ce.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"})),yE=({className:t})=>{const{t:e}=jt("location_selector"),{country:n,inputs:r,onLocationSelect:i}=st(),[o,s]=u.useState(""),[a,l]=u.useState(!1),c=[],f=n?{componentRestrictions:{country:n},types:c}:{types:c},d=g=>{$t.getState().setPlace(g),i==null||i(g)},{ref:h}=qd.usePlacesWidget({libraries:["places"],options:f,onPlaceSelected:d,inputAutocompleteValue:o}),v=g=>{a&&ye.getState().setBlurred(!!g.target.value),s(g.target.value)},y=()=>{o&&ye.getState().setBlurred(!0),ye.getState().setDetailsOpen(!1),We.getState().setDeliverPoint(null),bt.getState().setSelectedLocation(null),l(!0)},p=()=>{ye.getState().setBlurred(!1),l(!1)},L=g=>{g.key==="Enter"&&g.preventDefault()},w=_o(r==null?void 0:r.address);return x.jsx(Kd,{...w,inputRef:h,value:o,className:t,endAdornment:x.jsx(mE,{}),placeholder:e("placeholder"),onChange:v,onFocus:y,onBlur:p,onKeyDown:L})},bE=({className:t})=>ye(Ih)?x.jsx(yE,{className:t}):null,wE=u.memo(bE),SE="DeliveryDetailsModal-module__root__qwKnjX",LE={root:SE},EE=({className:t,location:e,onClose:n,onSubmit:r})=>x.jsx("div",{className:be(LE.root,t),children:x.jsx(kd,{location:e,onClose:n,onSubmit:r})}),xE="LocationDetailsModal-module__root__PyRnLM",CE={root:xE},_E=({className:t,location:e,onClose:n,onSubmit:r})=>{const i=()=>{r==null||r(e)};return x.jsx("div",{className:be(CE.root,t),children:x.jsx(_f,{location:e,onClose:n,onSubmit:i})})},OE="MapContainer-module__root__1Os6Q-",ME="MapContainer-module__mapWrapper__Cwe7qC",kE="MapContainer-module__wrapperBlurred__04NN2L",PE="MapContainer-module__locationSelector__Pr1zS-",RE="MapContainer-module__filterButton__CW3Qv7",TE="MapContainer-module__sidebarOpen__lGMVrJ",AE="MapContainer-module__filterIcon__T01XsJ",DE="MapContainer-module__details__gM8LWX",Ft={root:OE,mapWrapper:ME,wrapperBlurred:kE,locationSelector:PE,filterButton:RE,sidebarOpen:TE,filterIcon:AE,details:DE},IE=()=>{const{onPointClick:t}=st(),e=ye(sa),n=bt(Bh),r=We(Po),i=u.useCallback(()=>{ye.getState().setDetailsOpen(!1)},[]),o=u.useCallback(s=>{t==null||t(s),ye.getState().setDetailsOpen(!1),bt.getState().setSelectedLocation(null),We.getState().setDeliverPoint(null)},[t]);return x.jsxs(x.Fragment,{children:[(r==null?void 0:r.address)&&e&&x.jsx(EE,{location:r,className:Ft.details,onClose:i,onSubmit:o}),n&&e&&x.jsx(_E,{location:n,className:Ft.details,onClose:i,onSubmit:o})]})},jE=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:60,height:40,fill:"none",viewBox:"0 0 60 40",...t},ce.createElement("path",{d:"M0 0h52a8 8 0 0 1 8 8v24a8 8 0 0 1-8 8H0V0Z"}),ce.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"})),NE=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:28,height:28,fill:"none",viewBox:"0 0 28 28",...t},ce.createElement("rect",{width:28,height:28,fill:"#333",rx:4}),ce.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"})),BE=()=>{const t=ur(i=>i.open),e=ur(i=>i.toggle),n=hi("screenSm"),r=()=>{e(!0)};return x.jsxs("div",{role:"presentation",className:be(Ft.filterButton,{[Ft.sidebarOpen]:t}),onClick:n?void 0:r,children:[n&&x.jsx(Bd,{}),n?x.jsx(NE,{className:Ft.filterIcon,onClick:r}):x.jsx(jE,{className:Ft.filterIcon})]})},UE=({children:t,className:e})=>{const{hideFilters:n,hideSearchInput:r}=st(),i=ye(Dh),o=ye(sa);return x.jsxs("div",{className:be(Ft.root,e),children:[!r&&!o&&x.jsx(wE,{className:Ft.locationSelector}),!n&&x.jsx(BE,{}),x.jsx("div",{className:be(Ft.mapWrapper,{[Ft.wrapperBlurred]:i}),children:t}),x.jsx(IE,{})]})},VE=u.memo(UE),FE="Separator-module__root__eQtZey",zE={root:FE},vs=({className:t,...e})=>x.jsx("hr",{className:be(zE.root,t),...e}),$E="Sidebar-module__root__4j1MA3",HE="Sidebar-module__closeButton__HLXy1c",GE="Sidebar-module__open__mqQXF6",ZE="Sidebar-module__header__Afp6uz",WE="Sidebar-module__typeFilter__GN46u9",qE="Sidebar-module__separator__6I4QoJ",KE="Sidebar-module__withRightPadding__2u1Ina",JE="Sidebar-module__sheetContent__SaoncI",YE="Sidebar-module__doneButton__4aeaSD",Yt={root:$E,closeButton:HE,open:GE,header:ZE,typeFilter:WE,separator:qE,withRightPadding:KE,sheetContent:JE,doneButton:YE},XE=()=>{const{t}=jt("common"),e=hi("screenSm"),n=ur(i=>i.toggle),r=()=>{n(!1)};return x.jsxs("div",{className:Yt.header,children:[e&&x.jsx("div",{role:"presentation",className:Yt.doneButton,onClick:r,children:t("done")}),!e&&x.jsx(ui,{className:Yt.closeButton,onClick:r})]})},QE="Radio-module__root__7ElY2W",ex="Radio-module__label__c-sYW3",iu={root:QE,label:ex},tx=({className:t,label:e,labelProps:n={},...r})=>{const i=u.useId(),{className:o,...s}=n;return x.jsxs("label",{htmlFor:i,className:be(iu.label,o),...s,children:[x.jsx("input",{id:i,type:"radio",className:be(iu.root,t),...r}),e]})},rr=t=>x.jsx(tx,{...t,type:"checkbox"}),nx="RadioGroup-module__root__ewZw-x",rx="RadioGroup-module__body__k8BJAs",ix="RadioGroup-module__legend__tcfV7q",ms={root:nx,body:rx,legend:ix},Jd=({children:t,className:e,label:n,onChange:r,value:i,...o})=>x.jsxs("div",{className:be(ms.root,e),...o,children:[n&&x.jsx("span",{className:ms.legend,children:n}),x.jsx("div",{className:ms.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)})]}),ox=({className:t,onChange:e})=>{const{t:n}=jt("receive_filter"),r=Qt(zh);return x.jsxs(Jd,{value:r,label:n("title"),className:t,onChange:e,children:[x.jsx(rr,{name:"receive",value:Dt.DressingRoom,label:n("dressing_room")}),x.jsx(rr,{name:"receive",value:Dt.CheckOrder,label:n("check_order")}),x.jsx(rr,{name:"receive",value:Dt.PayByCash,label:n("pay_by_cash")})]})},sx=u.memo(ox),ax=({className:t,onChange:e})=>{const{t:n}=jt("send_filter"),r=Qt(Fh);return x.jsxs(Jd,{className:t,value:r,label:n("title"),onChange:e,children:[x.jsx(rr,{name:"send",value:It.Return,label:n("sending_returns")}),x.jsx(rr,{name:"send",value:It.Shipping,label:n("shipping")}),x.jsx(rr,{name:"send",value:It.Payment,label:n("payment")})]})},lx=u.memo(ax),cx="TypeFilter-module__root__WH5EQV",ux="TypeFilter-module__button__f0mSfo",zi={root:cx,button:ux},fx=({className:t,onChange:e,value:n})=>{const{t:r}=jt("type_filter"),i=o=>()=>e==null?void 0:e(o);return x.jsxs("div",{className:be(zi.root,t),children:[x.jsx(Ot,{className:zi.button,variant:n===Kt.All?"primary":"secondary",onClick:i(Kt.All),children:r("all")}),x.jsx(Ot,{className:zi.button,variant:n===Kt.PostOffice?"primary":"secondary",onClick:i(Kt.PostOffice),children:r("post_office")}),x.jsx(Ot,{className:zi.button,variant:n===Kt.PickPoint?"primary":"secondary",onClick:i(Kt.PickPoint),children:r("pick_point")})]})},dx=({className:t,onChange:e})=>{const n=Qt(Vh);return x.jsx(fx,{value:n,className:t,onChange:e})},hx=u.memo(dx),px=({className:t})=>{const e=hi("screenSm"),n=ur(l=>l.open),r=u.useCallback(l=>Qt.getState().setFilter({type:l}),[]),i=u.useCallback(l=>Qt.getState().setFilter({send:l}),[]),o=u.useCallback(l=>Qt.getState().setFilter({receive:l}),[]),s=u.useCallback(()=>ur.getState().toggle(!1),[]),a=x.jsxs(x.Fragment,{children:[x.jsx(XE,{}),x.jsxs("div",{className:Yt.withRightPadding,children:[x.jsx(hx,{className:Yt.typeFilter,onChange:r}),x.jsx(vs,{className:Yt.separator}),x.jsx(sx,{onChange:o}),x.jsx(vs,{}),x.jsx(lx,{onChange:i}),x.jsx(vs,{})]})]});return e?x.jsx(Cd,{initialFocusRef:!1,open:n,snapPoints:({maxHeight:l})=>l-_d,onDismiss:s,children:x.jsx("div",{className:Yt.sheetContent,children:a})}):x.jsx("div",{className:be(Yt.root,t,{[Yt.open]:n}),children:a})},gx="App-module__map__Kf-2JS",vx="App-module__sidebar__ORIzGk",mx="App-module__header__bgP9DA",ys={map:gx,sidebar:vx,header:mx};fo.setApiKey("AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA");const yx=({config:t,options:e})=>{const n=Rg(t),{INN:r,hideFilters:i,hideHeader:o,map:s}=n;mn(r,"INN is required"),Tg(r,e),mn(s==null?void 0:s.provider,"Map provider is required");const a=W1(s.provider);return mg(),x.jsx(cu.Provider,{value:n,children:x.jsx(uL,{children:x.jsx(cL,{children:x.jsx(sy,{tolgee:Nd,fallback:x.jsx(ja,{}),children:x.jsx(vE,{children:x.jsx(TL,{children:x.jsxs(RL,{children:[!o&&x.jsx(CL,{className:ys.header}),!i&&x.jsx(px,{className:ys.sidebar}),x.jsx(VE,{className:ys.map,children:x.jsx(a,{})}),x.jsx(gE,{})]})})})})})})})},Yd=async t=>ni.request({baseURL:"https://api.geo-data.omnic.solutions/api/1.0/",method:"POST",url:"normalize/address",data:t,headers:{Authorization:"Token 9877f9631b2e30570cc1c5aa8c740b0c912efe99a8b6c45c21cf4bd394adc7e9"}});exports.EReceiveFilter=Dt;exports.ESendFilter=It;exports.ETypeFilter=Kt;exports.Widget=yx;exports.createPointsIterator=_s;exports.fetchPointsRequest=Cs;exports.fromHoursMinutesToMinutes=$h;exports.fromMinutesToHoursMinutes=Hh;exports.getAddressFromLatLng=sr;exports.getBoundsFromPoint=Gh;exports.getCurrentPosition=ha;exports.getNormalizedAddress=Yd;exports.getPropertyValue=pa;exports.isDeliveryPoint=pg;exports.isHttpSuccess=Vu;exports.replaceSvgCurrentColor=xt;exports.setWidgetCSSProperty=jo;exports.stopImmediatePropagation=Os;exports.svgStringToBase64URL=Jt;
|
|
102
|
+
*/function kc(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 Pc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?kc(Object(n),!0).forEach(function(r){Uw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):kc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Uw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Rc=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()}}}(),Vw=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},Fw=function(e){return e.key==="Escape"||e.key==="Esc"||e.keyCode===27},zw=function(e){return e.key==="Tab"||e.keyCode===9},Tc=function(e){return setTimeout(e,0)},Ac=function(e,n){var r=-1;return e.every(function(i,o){return n(i)?(r=o,!1):!0}),r},Rr=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},Ai=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},$w=function(e,n){var r=(n==null?void 0:n.document)||document,i=Pc({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(m,S,C){return m&&m[S]!==void 0?m[S]:i[C||S]},l=function(m){return o.containerGroups.findIndex(function(S){var C=S.container,R=S.tabbableNodes;return C.contains(m)||R.find(function(M){return M===m})})},c=function(m){var S=i[m];if(typeof S=="function"){for(var C=arguments.length,R=new Array(C>1?C-1:0),M=1;M<C;M++)R[M-1]=arguments[M];S=S.apply(void 0,R)}if(S===!0&&(S=void 0),!S){if(S===void 0||S===!1)return S;throw new Error("`".concat(m,"` was specified but was not a node, or did not return a node"))}var O=S;if(typeof S=="string"&&(O=r.querySelector(S),!O))throw new Error("`".concat(m,"` as selector refers to no known node"));return O},f=function(){var m=c("initialFocus");if(m===!1)return!1;if(m===void 0)if(l(r.activeElement)>=0)m=r.activeElement;else{var S=o.tabbableGroups[0],C=S&&S.firstTabbableNode;m=C||c("fallbackFocus")}if(!m)throw new Error("Your focus-trap needs to have at least one focusable element");return m},d=function(){if(o.containerGroups=o.containers.map(function(m){var S=jw(m,i.tabbableOptions),C=Nw(m,i.tabbableOptions);return{container:m,tabbableNodes:S,focusableNodes:C,firstTabbableNode:S.length>0?S[0]:null,lastTabbableNode:S.length>0?S[S.length-1]:null,nextTabbableNode:function(M){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,P=C.findIndex(function(j){return j===M});if(!(P<0))return O?C.slice(P+1).find(function(j){return Ti(j,i.tabbableOptions)}):C.slice(0,P).reverse().find(function(j){return Ti(j,i.tabbableOptions)})}}}),o.tabbableGroups=o.containerGroups.filter(function(m){return m.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 E(m){if(m!==!1&&m!==r.activeElement){if(!m||!m.focus){E(f());return}m.focus({preventScroll:!!i.preventScroll}),o.mostRecentlyFocusedNode=m,Vw(m)&&m.select()}},v=function(m){var S=c("setReturnFocus",m);return S||(S===!1?!1:m)},y=function(m){var S=Ai(m);if(!(l(S)>=0)){if(Rr(i.clickOutsideDeactivates,m)){s.deactivate({returnFocus:i.returnFocusOnDeactivate&&!us(S,i.tabbableOptions)});return}Rr(i.allowOutsideClick,m)||m.preventDefault()}},p=function(m){var S=Ai(m),C=l(S)>=0;C||S instanceof Document?C&&(o.mostRecentlyFocusedNode=S):(m.stopImmediatePropagation(),h(o.mostRecentlyFocusedNode||f()))},L=function(m){var S=Ai(m);d();var C=null;if(o.tabbableGroups.length>0){var R=l(S),M=R>=0?o.containerGroups[R]:void 0;if(R<0)m.shiftKey?C=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:C=o.tabbableGroups[0].firstTabbableNode;else if(m.shiftKey){var O=Ac(o.tabbableGroups,function(z){var Z=z.firstTabbableNode;return S===Z});if(O<0&&(M.container===S||us(S,i.tabbableOptions)&&!Ti(S,i.tabbableOptions)&&!M.nextTabbableNode(S,!1))&&(O=R),O>=0){var P=O===0?o.tabbableGroups.length-1:O-1,j=o.tabbableGroups[P];C=j.lastTabbableNode}}else{var B=Ac(o.tabbableGroups,function(z){var Z=z.lastTabbableNode;return S===Z});if(B<0&&(M.container===S||us(S,i.tabbableOptions)&&!Ti(S,i.tabbableOptions)&&!M.nextTabbableNode(S))&&(B=R),B>=0){var $=B===o.tabbableGroups.length-1?0:B+1,G=o.tabbableGroups[$];C=G.firstTabbableNode}}}else C=c("fallbackFocus");C&&(m.preventDefault(),h(C))},w=function(m){if(Fw(m)&&Rr(i.escapeDeactivates,m)!==!1){m.preventDefault(),s.deactivate();return}if(zw(m)){L(m);return}},g=function(m){var S=Ai(m);l(S)>=0||Rr(i.clickOutsideDeactivates,m)||Rr(i.allowOutsideClick,m)||(m.preventDefault(),m.stopImmediatePropagation())},b=function(){if(o.active)return Rc.activateTrap(s),o.delayInitialFocusTimer=i.delayInitialFocus?Tc(function(){h(f())}):h(f()),r.addEventListener("focusin",p,!0),r.addEventListener("mousedown",y,{capture:!0,passive:!1}),r.addEventListener("touchstart",y,{capture:!0,passive:!1}),r.addEventListener("click",g,{capture:!0,passive:!1}),r.addEventListener("keydown",w,{capture:!0,passive:!1}),s},_=function(){if(o.active)return r.removeEventListener("focusin",p,!0),r.removeEventListener("mousedown",y,!0),r.removeEventListener("touchstart",y,!0),r.removeEventListener("click",g,!0),r.removeEventListener("keydown",w,!0),s};return s={get active(){return o.active},get paused(){return o.paused},activate:function(m){if(o.active)return this;var S=a(m,"onActivate"),C=a(m,"onPostActivate"),R=a(m,"checkCanFocusTrap");R||d(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,S&&S();var M=function(){R&&d(),b(),C&&C()};return R?(R(o.containers.concat()).then(M,M),this):(M(),this)},deactivate:function(m){if(!o.active)return this;var S=Pc({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},m);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,_(),o.active=!1,o.paused=!1,Rc.deactivateTrap(s);var C=a(S,"onDeactivate"),R=a(S,"onPostDeactivate"),M=a(S,"checkCanReturnFocus"),O=a(S,"returnFocus","returnFocusOnDeactivate");C&&C();var P=function(){Tc(function(){O&&h(v(o.nodeFocusedBeforeActivation)),R&&R()})};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(),b(),this)},updateContainerElements:function(m){var S=[].concat(m).filter(Boolean);return o.containers=S.map(function(C){return typeof C=="string"?r.querySelector(C):C}),o.active&&d(),this}},s.updateContainerElements(e),s};function Hw(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 Ta=!1;if(typeof window<"u"){var Dc={get passive(){Ta=!0}};window.addEventListener("testPassive",null,Dc),window.removeEventListener("testPassive",null,Dc)}var gd=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),vn=[],xo=!1,vd=-1,qr=void 0,Kr=void 0,md=function(e){return vn.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(e))})},Co=function(e){var n=e||window.event;return md(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},Gw=function(e){if(Kr===void 0){var n=!!e&&e.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;n&&r>0&&(Kr=document.body.style.paddingRight,document.body.style.paddingRight=r+"px")}qr===void 0&&(qr=document.body.style.overflow,document.body.style.overflow="hidden")},Zw=function(){Kr!==void 0&&(document.body.style.paddingRight=Kr,Kr=void 0),qr!==void 0&&(document.body.style.overflow=qr,qr=void 0)},Ww=function(e){return e?e.scrollHeight-e.scrollTop<=e.clientHeight:!1},qw=function(e,n){var r=e.targetTouches[0].clientY-vd;return md(e.target)?!1:n&&n.scrollTop===0&&r>0||Ww(n)&&r<0?Co(e):(e.stopPropagation(),!0)},Kw=function(e,n){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!vn.some(function(i){return i.targetElement===e})){var r={targetElement:e,options:n||{}};vn=[].concat(Hw(vn),[r]),gd?(e.ontouchstart=function(i){i.targetTouches.length===1&&(vd=i.targetTouches[0].clientY)},e.ontouchmove=function(i){i.targetTouches.length===1&&qw(i,e)},xo||(document.addEventListener("touchmove",Co,Ta?{passive:!1}:void 0),xo=!0)):Gw(n)}},Jw=function(e){if(!e){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}vn=vn.filter(function(n){return n.targetElement!==e}),gd?(e.ontouchstart=null,e.ontouchmove=null,xo&&vn.length===0&&(document.removeEventListener("touchmove",Co,Ta?{passive:!1}:void 0),xo=!1)):vn.length||Zw()},In=[],Yw=function(){return In.some(function(t){return t.activeTargets.length>0})},Xw=function(){return In.some(function(t){return t.skippedTargets.length>0})},Ic="ResizeObserver loop completed with undelivered notifications.",Qw=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:Ic}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=Ic),window.dispatchEvent(t)},ai;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(ai||(ai={}));var jn=function(t){return Object.freeze(t)},eS=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,jn(this)}return t}(),yd=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,jn(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}(),Aa=function(t){return t instanceof SVGElement&&"getBBox"in t},bd=function(t){if(Aa(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)},jc=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)},tS=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},Jr=typeof window<"u"?window:{},Di=new WeakMap,Nc=/auto|scroll/,nS=/^tb|vertical/,rS=/msie|trident/i.test(Jr.navigator&&Jr.navigator.userAgent),Bt=function(t){return parseFloat(t||"0")},nr=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new eS((n?e:t)||0,(n?t:e)||0)},Bc=jn({devicePixelContentBoxSize:nr(),borderBoxSize:nr(),contentBoxSize:nr(),contentRect:new yd(0,0,0,0)}),wd=function(t,e){if(e===void 0&&(e=!1),Di.has(t)&&!e)return Di.get(t);if(bd(t))return Di.set(t,Bc),Bc;var n=getComputedStyle(t),r=Aa(t)&&t.ownerSVGElement&&t.getBBox(),i=!rS&&n.boxSizing==="border-box",o=nS.test(n.writingMode||""),s=!r&&Nc.test(n.overflowY||""),a=!r&&Nc.test(n.overflowX||""),l=r?0:Bt(n.paddingTop),c=r?0:Bt(n.paddingRight),f=r?0:Bt(n.paddingBottom),d=r?0:Bt(n.paddingLeft),h=r?0:Bt(n.borderTopWidth),v=r?0:Bt(n.borderRightWidth),y=r?0:Bt(n.borderBottomWidth),p=r?0:Bt(n.borderLeftWidth),L=d+c,w=l+f,g=p+v,b=h+y,_=a?t.offsetHeight-b-t.clientHeight:0,E=s?t.offsetWidth-g-t.clientWidth:0,m=i?L+g:0,S=i?w+b:0,C=r?r.width:Bt(n.width)-m-E,R=r?r.height:Bt(n.height)-S-_,M=C+L+E+g,O=R+w+_+b,P=jn({devicePixelContentBoxSize:nr(Math.round(C*devicePixelRatio),Math.round(R*devicePixelRatio),o),borderBoxSize:nr(M,O,o),contentBoxSize:nr(C,R,o),contentRect:new yd(d,l,C,R)});return Di.set(t,P),P},Sd=function(t,e,n){var r=wd(t,n),i=r.borderBoxSize,o=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(e){case ai.DEVICE_PIXEL_CONTENT_BOX:return s;case ai.BORDER_BOX:return i;default:return o}},iS=function(){function t(e){var n=wd(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=jn([n.borderBoxSize]),this.contentBoxSize=jn([n.contentBoxSize]),this.devicePixelContentBoxSize=jn([n.devicePixelContentBoxSize])}return t}(),Ld=function(t){if(bd(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},oS=function(){var t=1/0,e=[];In.forEach(function(s){if(s.activeTargets.length!==0){var a=[];s.activeTargets.forEach(function(c){var f=new iS(c.target),d=Ld(c.target);a.push(f),c.lastReportedSize=Sd(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},Uc=function(t){In.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(Ld(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},sS=function(){var t=0;for(Uc(t);Yw();)t=oS(),Uc(t);return Xw()&&Qw(),t>0},fs,Ed=[],aS=function(){return Ed.splice(0).forEach(function(t){return t()})},lS=function(t){if(!fs){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return aS()}).observe(n,r),fs=function(){n.textContent="".concat(e?e--:e++)}}Ed.push(t),fs()},cS=function(t){lS(function(){requestAnimationFrame(t)})},eo=0,uS=function(){return!!eo},fS=250,dS={attributes:!0,characterData:!0,childList:!0,subtree:!0},Vc=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Fc=function(t){return t===void 0&&(t=0),Date.now()+t},ds=!1,hS=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=fS),!ds){ds=!0;var r=Fc(e);cS(function(){var i=!1;try{i=sS()}finally{if(ds=!1,e=r-Fc(),!uS())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,dS)};document.body?n():Jr.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Vc.forEach(function(n){return Jr.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Vc.forEach(function(n){return Jr.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),na=new hS,zc=function(t){!eo&&t>0&&na.start(),eo+=t,!eo&&na.stop()},pS=function(t){return!Aa(t)&&!tS(t)&&getComputedStyle(t).display==="inline"},gS=function(){function t(e,n){this.target=e,this.observedBox=n||ai.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=Sd(this.target,this.observedBox,!0);return pS(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),vS=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),Ii=new WeakMap,$c=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},ji=function(){function t(){}return t.connect=function(e,n){var r=new vS(e,n);Ii.set(e,r)},t.observe=function(e,n,r){var i=Ii.get(e),o=i.observationTargets.length===0;$c(i.observationTargets,n)<0&&(o&&In.push(i),i.observationTargets.push(new gS(n,r&&r.box)),zc(1),na.schedule())},t.unobserve=function(e,n){var r=Ii.get(e),i=$c(r.observationTargets,n),o=r.observationTargets.length===1;i>=0&&(o&&In.splice(In.indexOf(r),1),r.observationTargets.splice(i,1),zc(-1))},t.disconnect=function(e){var n=this,r=Ii.get(e);r.observationTargets.slice().forEach(function(i){return n.unobserve(e,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t}(),mS=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.");ji.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(!jc(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ji.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(!jc(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ji.unobserve(this,e)},t.prototype.disconnect=function(){ji.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();function ut(){return ut=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},ut.apply(this,arguments)}function to(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 Yr=typeof window<"u"?u.useLayoutEffect:u.useEffect;function Tr(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 Ni(t){var e=Math.round(t);if(Number.isNaN(t))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return e}var yS={box:"border-box"};function hs(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 Yr(function(){if(t.current&&r){var c=new mS(l);return c.observe(t.current,yS),function(){c.disconnect()}}},[t,l,r]),r?s:0}function ct(t){return t===void 0&&(t=1e3),new Promise(function(e){return setTimeout(e,t)})}var Hc={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},Gc={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},bS=G0({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:ut({},Hc,Gc)}}},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:ut({},Hc,Gc)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:ut({},{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:[Z0({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(ct()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenStart:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseStart:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeStart:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},onSnapEnd:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenEnd:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseEnd:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeEnd:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},renderVisuallyHidden:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}},activate:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}},deactivate:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}},openSmoothly:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}},openImmediately:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}},snapSmoothly:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}},resizeSmoothly:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}},closeSmoothly:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}}},guards:{initiallyClosed:function(t){return t.initialState==="CLOSED"},initiallyOpen:function(t){return t.initialState==="OPEN"}}}),wS=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],SS=["velocity"],LS=["onRest","config"],xd=yb.default,ES=xd.tension,Bi=xd.friction,xS=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,y=v===void 0?_S:v,p=t.snapPoints,L=p===void 0?OS:p,w=t.blocking,g=w===void 0||w,b=t.scrollLocking,_=b===void 0||b,E=t.style,m=t.onSpringStart,S=t.onSpringCancel,C=t.onSpringEnd,R=t.reserveScrollBarGap,M=R===void 0?g:R,O=t.expandOnContentDrag,P=O!==void 0&&O,j=to(t,wS),B=function(){var F=u.useState(!1),te=F[0],q=F[1],de=u.useState({}),Te=de[0],xe=de[1],Ae=u.useCallback(function(ke){return xe(function(Be){var ae;return ut({},Be,((ae={})[ke]=!1,ae))}),function(){xe(function(Be){var ae;return ut({},Be,((ae={})[ke]=!0,ae))})}},[]);return u.useEffect(function(){var ke=Object.values(Te);ke.length!==0&&ke.every(Boolean)&&q(!0)},[Te]),{ready:te,registerReady:Ae}}(),$=B.ready,G=B.registerReady,z=u.useRef(!1),Z=u.useRef(m),A=u.useRef(S),T=u.useRef(C);u.useEffect(function(){Z.current=m,A.current=S,T.current=C},[S,m,C]);var k,D,U=Eb(function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}}),V=U[0],W=U[1],I=u.useRef(null),X=u.useRef(null),ee=u.useRef(null),K=u.useRef(null),ie=u.useRef(null),fe=u.useRef(null),ge=u.useRef(0),Le=u.useRef(),Fe=u.useRef(!1),we=(k=u.useMemo(function(){return typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null},[]),D=u.useRef(k==null?void 0:k.matches),u.useDebugValue(D.current?"reduce":"no-preference"),u.useEffect(function(){var F=function(te){D.current=te.matches};return k==null||k.addListener(F),function(){return k==null?void 0:k.removeListener(F)}},[k]),D),Ee=function(F){var te=F.targetRef,q=F.enabled,de=F.reserveScrollBarGap,Te=u.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return u.useDebugValue(q?"Enabled":"Disabled"),u.useEffect(function(){if(!q)return Te.current.deactivate(),void(Te.current={activate:function(){},deactivate:function(){}});var xe=te.current,Ae=!1;Te.current={activate:function(){Ae||(Ae=!0,Kw(xe,{allowTouchMove:function(ke){return ke.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:de}))},deactivate:function(){Ae&&(Ae=!1,Jw(xe))}}},[q,te,de]),Te}({targetRef:X,enabled:$&&_,reserveScrollBarGap:M}),Ie=function(F){var te=F.targetRef,q=F.enabled,de=u.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return u.useDebugValue(q?"Enabled":"Disabled"),u.useEffect(function(){if(!q)return de.current.deactivate(),void(de.current={activate:function(){},deactivate:function(){}});var Te=te.current,xe=!1,Ae=[],ke=[];de.current={activate:function(){if(!xe){xe=!0;var Be=Te.parentNode;document.querySelectorAll("body > *").forEach(function(ae){if(ae!==Be){var ve=ae.getAttribute("aria-hidden");ve!==null&&ve!=="false"||(Ae.push(ve),ke.push(ae),ae.setAttribute("aria-hidden","true"))}})}},deactivate:function(){xe&&(xe=!1,ke.forEach(function(Be,ae){var ve=Ae[ae];ve===null?Be.removeAttribute("aria-hidden"):Be.setAttribute("aria-hidden",ve)}),Ae=[],ke=[])}}},[te,q]),de}({targetRef:I,enabled:$&&g}),Me=function(F){var te=F.targetRef,q=F.fallbackRef,de=F.initialFocusRef,Te=F.enabled,xe=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 xe.current.deactivate(),void(xe.current={activate:function(){},deactivate:function(){}});var Ae=q.current,ke=$w(te.current,{onActivate:void 0,initialFocus:de?function(){return(de==null?void 0:de.current)||Ae}:void 0,fallbackFocus:Ae,escapeDeactivates:!1,clickOutsideDeactivates:!1}),Be=!1;xe.current={activate:function(){try{return Be?Promise.resolve():(Be=!0,Promise.resolve(ke.activate()).then(function(){return Promise.resolve(new Promise(function(ae){return setTimeout(function(){return ae(void 0)},0)})).then(function(){})}))}catch(ae){return Promise.reject(ae)}},deactivate:function(){Be&&(Be=!1,ke.deactivate())}}},[Te,q,de,te]),xe}({targetRef:I,fallbackRef:fe,initialFocusRef:f||void 0,enabled:$&&g&&f!==!1}),Re=function(F){var te=F.getSnapPoints,q=F.heightRef,de=F.lastSnapRef,Te=F.ready,xe=function(Ke){var pt=Ke.contentRef,gt=Ke.controlledMaxHeight,Qe=Ke.footerEnabled,Nt=Ke.footerRef,kt=Ke.headerEnabled,vt=Ke.headerRef,tn=Ke.registerReady,Wt=Ke.resizeSourceRef,vr=u.useMemo(function(){return tn("contentHeight")},[tn]),mr=function(nn,Ln,En){var xn=u.useMemo(function(){return Ln("maxHeight")},[Ln]),Cn=u.useState(function(){return Ni(nn)||typeof window<"u"?window.innerHeight:0}),wr=Cn[0],Sr=Cn[1],rn=wr>0,ne=u.useRef(0);return u.useDebugValue(nn?"controlled":"auto"),u.useEffect(function(){rn&&xn()},[rn,xn]),Yr(function(){if(nn)return Sr(Ni(nn)),void(En.current="maxheightprop");var Na=function(){ne.current||(ne.current=requestAnimationFrame(function(){Sr(window.innerHeight),En.current="window",ne.current=0}))};return window.addEventListener("resize",Na),Sr(window.innerHeight),En.current="window",xn(),function(){window.removeEventListener("resize",Na),cancelAnimationFrame(ne.current)}},[nn,xn,En]),wr}(gt,tn,Wt),Fn=hs(vt,{label:"headerHeight",enabled:kt,resizeSourceRef:Wt}),yr=hs(pt,{label:"contentHeight",enabled:!0,resizeSourceRef:Wt}),zn=hs(Nt,{label:"footerHeight",enabled:Qe,resizeSourceRef:Wt}),Sn=Math.min(mr-Fn-zn,yr)+Fn+zn;u.useDebugValue("minHeight: "+Sn);var br=yr>0;return u.useEffect(function(){br&&vr()},[br,vr]),{maxHeight:mr,minHeight:Sn,headerHeight:Fn,footerHeight:zn}}({contentRef:F.contentRef,controlledMaxHeight:F.controlledMaxHeight,footerEnabled:F.footerEnabled,footerRef:F.footerRef,headerEnabled:F.headerEnabled,headerRef:F.headerRef,registerReady:F.registerReady,resizeSourceRef:F.resizeSourceRef}),Ae=xe.maxHeight,ke=xe.minHeight,Be=xe.headerHeight,ae=xe.footerHeight,ve=function(Ke,pt){var gt=[].concat(Ke).map(Ni).reduce(function(vt,tn){return vt.add(Tr(tn,0,pt)),vt},new Set),Qe=Array.from(gt),Nt=Math.min.apply(Math,Qe);if(Number.isNaN(Nt))throw new TypeError("minSnap is NaN");var kt=Math.max.apply(Math,Qe);if(Number.isNaN(kt))throw new TypeError("maxSnap is NaN");return{snapPoints:Qe,minSnap:Nt,maxSnap:kt}}(Te?te({height:q.current,footerHeight:ae,headerHeight:Be,minHeight:ke,maxHeight:Ae}):[0],Ae),ft=ve.snapPoints,Zt=ve.minSnap,lt=ve.maxSnap;return u.useDebugValue("minSnap: "+Zt+", maxSnap:"+lt),{minSnap:Zt,maxSnap:lt,findSnap:function(Ke){var pt=Ni(typeof Ke=="function"?Ke({footerHeight:ae,headerHeight:Be,height:q.current,minHeight:ke,maxHeight:Ae,snapPoints:ft,lastSnap:de.current}):Ke);return ft.reduce(function(gt,Qe){return Math.abs(Qe-pt)<Math.abs(gt-pt)?Qe:gt},Zt)},maxHeight:Ae}}({contentRef:ee,controlledMaxHeight:h,footerEnabled:!!o,footerRef:ie,getSnapPoints:L,headerEnabled:s!==!1,headerRef:K,heightRef:ge,lastSnapRef:c,ready:$,registerReady:G,resizeSourceRef:Le}),re=Re.minSnap,oe=Re.maxSnap,ze=Re.maxHeight,Ye=Re.findSnap,J=u.useRef(ze),$e=u.useRef(re),Ne=u.useRef(oe),ht=u.useRef(Ye),at=u.useRef(0);Yr(function(){J.current=ze,Ne.current=oe,$e.current=re,ht.current=Ye,at.current=Ye(y)},[Ye,y,ze,oe,re]);var se=u.useCallback(function(F){var te=F.onRest,q=F.config,de=(q=q===void 0?{}:q).velocity,Te=de===void 0?1:de,xe=to(q,SS),Ae=to(F,LS);return new Promise(function(ke){return W(ut({},Ae,{config:ut({velocity:Te},xe,{mass:1,tension:ES,friction:Math.max(Bi,Bi+(Bi-Bi*Te))}),onRest:function(){var Be=[].slice.call(arguments);ke.apply(void 0,Be),te==null||te.apply(void 0,Be)}}))})},[W]),wn=tb(bS,{devTools:!1,actions:{onOpenCancel:u.useCallback(function(){return A.current==null?void 0:A.current({type:"OPEN"})},[]),onSnapCancel:u.useCallback(function(F){return A.current==null?void 0:A.current({type:"SNAP",source:F.snapSource})},[]),onCloseCancel:u.useCallback(function(){return A.current==null?void 0:A.current({type:"CLOSE"})},[]),onResizeCancel:u.useCallback(function(){return A.current==null?void 0:A.current({type:"RESIZE",source:Le.current})},[]),onOpenEnd:u.useCallback(function(){return T.current==null?void 0:T.current({type:"OPEN"})},[]),onSnapEnd:u.useCallback(function(F,te){return T.current==null?void 0:T.current({type:"SNAP",source:F.snapSource})},[]),onResizeEnd:u.useCallback(function(){return T.current==null?void 0:T.current({type:"RESIZE",source:Le.current})},[])},context:{initialState:l},services:{onSnapStart:u.useCallback(function(F,te){try{return Promise.resolve(Z.current==null?void 0:Z.current({type:"SNAP",source:te.payload.source||"custom"}))}catch(q){return Promise.reject(q)}},[]),onOpenStart:u.useCallback(function(){try{return Promise.resolve(Z.current==null?void 0:Z.current({type:"OPEN"}))}catch(F){return Promise.reject(F)}},[]),onCloseStart:u.useCallback(function(){try{return Promise.resolve(Z.current==null?void 0:Z.current({type:"CLOSE"}))}catch(F){return Promise.reject(F)}},[]),onResizeStart:u.useCallback(function(){try{return Promise.resolve(Z.current==null?void 0:Z.current({type:"RESIZE",source:Le.current}))}catch(F){return Promise.reject(F)}},[]),onSnapEnd:u.useCallback(function(F,te){try{return Promise.resolve(T.current==null?void 0:T.current({type:"SNAP",source:F.snapSource}))}catch(q){return Promise.reject(q)}},[]),onOpenEnd:u.useCallback(function(){try{return Promise.resolve(T.current==null?void 0:T.current({type:"OPEN"}))}catch(F){return Promise.reject(F)}},[]),onCloseEnd:u.useCallback(function(){try{return Promise.resolve(T.current==null?void 0:T.current({type:"CLOSE"}))}catch(F){return Promise.reject(F)}},[]),onResizeEnd:u.useCallback(function(){try{return Promise.resolve(T.current==null?void 0:T.current({type:"RESIZE",source:Le.current}))}catch(F){return Promise.reject(F)}},[]),renderVisuallyHidden:u.useCallback(function(F,te){try{return Promise.resolve(se({y:at.current,ready:0,maxHeight:J.current,maxSnap:Ne.current,minSnap:at.current,immediate:!0})).then(function(){})}catch(q){return Promise.reject(q)}},[se]),activate:u.useCallback(function(F,te){try{return z.current=!0,Promise.resolve(Promise.all([Ee.current.activate(),Me.current.activate(),Ie.current.activate()])).then(function(){})}catch(q){return Promise.reject(q)}},[Ie,Me,Ee]),deactivate:u.useCallback(function(){try{return Ee.current.deactivate(),Me.current.deactivate(),Ie.current.deactivate(),z.current=!1,Promise.resolve()}catch(F){return Promise.reject(F)}},[Ie,Me,Ee]),openImmediately:u.useCallback(function(){try{return ge.current=at.current,Promise.resolve(se({y:at.current,ready:1,maxHeight:J.current,maxSnap:Ne.current,minSnap:at.current,immediate:!0})).then(function(){})}catch(F){return Promise.reject(F)}},[se]),openSmoothly:u.useCallback(function(){try{return Promise.resolve(se({y:0,ready:1,maxHeight:J.current,maxSnap:Ne.current,minSnap:at.current,immediate:!0})).then(function(){return ge.current=at.current,Promise.resolve(se({y:at.current,ready:1,maxHeight:J.current,maxSnap:Ne.current,minSnap:at.current,immediate:we.current})).then(function(){})})}catch(F){return Promise.reject(F)}},[se,we]),snapSmoothly:u.useCallback(function(F,te){try{var q=ht.current(F.y);return ge.current=q,c.current=q,Promise.resolve(se({y:q,ready:1,maxHeight:J.current,maxSnap:Ne.current,minSnap:$e.current,immediate:we.current,config:{velocity:F.velocity}})).then(function(){})}catch(de){return Promise.reject(de)}},[se,c,we]),resizeSmoothly:u.useCallback(function(){try{var F=ht.current(ge.current);return ge.current=F,c.current=F,Promise.resolve(se({y:F,ready:1,maxHeight:J.current,maxSnap:Ne.current,minSnap:$e.current,immediate:Le.current!=="element"||we.current})).then(function(){})}catch(te){return Promise.reject(te)}},[se,c,we]),closeSmoothly:u.useCallback(function(F,te){try{return se({minSnap:ge.current,immediate:!0}),ge.current=0,Promise.resolve(se({y:0,maxHeight:J.current,maxSnap:Ne.current,immediate:we.current})).then(function(){return Promise.resolve(se({ready:0,immediate:!0})).then(function(){})})}catch(q){return Promise.reject(q)}},[se,we])}}),pi=wn[0],Mt=wn[1];u.useEffect(function(){$&&Mt(a?"OPEN":"CLOSE")},[a,Mt,$]),Yr(function(){(ze||oe||re)&&Mt("RESIZE")},[ze,oe,re,Mt]),u.useEffect(function(){return function(){Ee.current.deactivate(),Me.current.deactivate(),Ie.current.deactivate()}},[Ie,Me,Ee]),u.useImperativeHandle(e,function(){return{snapTo:function(F,te){var q=te===void 0?{}:te,de=q.velocity,Te=de===void 0?1:de,xe=q.source,Ae=xe===void 0?"custom":xe;Mt("SNAP",{payload:{y:ht.current(F),velocity:Te,source:Ae}})},get height(){return ge.current}}},[Mt]),u.useEffect(function(){var F=X.current,te=function(de){Fe.current&&de.preventDefault()},q=function(de){F.scrollTop<0&&(requestAnimationFrame(function(){F.style.overflow="hidden",F.scrollTop=0,F.style.removeProperty("overflow")}),de.preventDefault())};return P&&(F.addEventListener("scroll",te),F.addEventListener("touchmove",te),F.addEventListener("touchstart",q)),function(){F.removeEventListener("scroll",te),F.removeEventListener("touchmove",te),F.removeEventListener("touchstart",q)}},[P,X]);var Gt=xw(function(F){var te=F.args,q=(te=te===void 0?[]:te)[0],de=(q=q===void 0?{}:q).closeOnTap,Te=de!==void 0&&de,xe=q.isContentDragging,Ae=xe!==void 0&&xe,ke=F.cancel,Be=F.direction[1],ae=F.down,ve=F.first,ft=F.last,Zt=F.memo,lt=Zt===void 0?V.y.getValue():Zt,Ke=F.tap,pt=F.velocity,gt=-1*F.movement[1];if(!z.current)return ke(),lt;if(d&&Te&&Ke)return ke(),setTimeout(function(){return d()},0),lt;if(Ke)return lt;var Qe=lt+gt,Nt=gt*pt,kt=Math.max($e.current,Math.min(Ne.current,Qe+2*Nt));if(!ae&&d&&Be>0&&Qe+Nt<$e.current/2)return ke(),d(),lt;var vt=ae?d||$e.current!==Ne.current?Wr(Qe,d?0:$e.current,Ne.current,.55):Qe<$e.current?Wr(Qe,$e.current,2*Ne.current,.55):Wr(Qe,$e.current/2,Ne.current,.55):kt;return P&&Ae?(vt>=Ne.current&&(vt=Ne.current),lt===Ne.current&&X.current.scrollTop>0&&(vt=Ne.current),Fe.current=vt<Ne.current):Fe.current=!1,ve&&Mt("DRAG"),ft?(Mt("SNAP",{payload:{y:vt,velocity:pt>.05?pt:1,source:"dragging"}}),lt):(W({y:vt,ready:1,maxHeight:J.current,maxSnap:Ne.current,minSnap:$e.current,immediate:!0,config:{velocity:pt}}),lt)},{filterTaps:!0});if(Number.isNaN(Ne.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN($e.current))throw new TypeError("minSnapRef is NaN!!");var gi=function(F){var te,q=F.spring,de=Wn([q.y,q.maxHeight],function(ae,ve){return Math.round(Tr(ve-ae,0,16))+"px"}),Te=Wn([q.y,q.minSnap,q.maxSnap],function(ae,ve,ft){return Tr(ae,ve,ft)+"px"}),xe=Wn([q.y,q.minSnap,q.maxSnap],function(ae,ve,ft){return ae<ve?ve-ae+"px":ae>ft?ft-ae+"px":"0px"}),Ae=Wn([q.y,q.maxSnap],function(ae,ve){return ae>=ve?Math.ceil(ae-ve):0}),ke=Wn([q.y,q.minSnap],function(ae,ve){if(!ve)return 0;var ft=Math.max(ve/2-45,0);return Tr((ae-ft)*(1/(Math.min(ve/2+45,ve)-ft)+0),0,1)}),Be=Wn([q.y,q.minSnap],function(ae,ve){return ve?Tr(ae/ve,0,1):0});return(te={})["--rsbs-content-opacity"]=ke,te["--rsbs-backdrop-opacity"]=Be,te["--rsbs-antigap-scale-y"]=Ae,te["--rsbs-overlay-translate-y"]=xe,te["--rsbs-overlay-rounded"]=de,te["--rsbs-overlay-h"]=Te,te}({spring:V});return u.createElement(zb.div,ut({},j,{"data-rsbs-root":!0,"data-rsbs-state":CS.find(pi.matches),"data-rsbs-is-blocking":g,"data-rsbs-is-dismissable":!!d,"data-rsbs-has-header":!!s,"data-rsbs-has-footer":!!o,className:i,ref:I,style:ut({},gi,E,{opacity:V.ready})}),r,g&&u.createElement("div",ut({key:"backdrop","data-rsbs-backdrop":!0},Gt({closeOnTap:!0}))),u.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:fe,onKeyDown:function(F){F.key==="Escape"&&(F.stopPropagation(),d&&d())}},s!==!1&&u.createElement("div",ut({key:"header","data-rsbs-header":!0,ref:K},Gt()),s),u.createElement("div",ut({key:"scroll","data-rsbs-scroll":!0,ref:X},P?Gt({isContentDragging:!0}):{}),u.createElement("div",{"data-rsbs-content":!0,ref:ee},n)),o&&u.createElement("div",ut({key:"footer",ref:ie,"data-rsbs-footer":!0},Gt()),o)))}),CS=["closed","opening","open","closing","dragging","snapping","resizing"];function _S(t){var e=t.lastSnap;return e??Math.min.apply(Math,t.snapPoints)}function OS(t){return t.minHeight}var MS=["onSpringStart","onSpringEnd","skipInitialTransition"],Cd=u.forwardRef(function(t,e){var n=t.onSpringStart,r=t.onSpringEnd,i=t.skipInitialTransition,o=to(t,MS),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");Yr(function(){if(o.open)return cancelAnimationFrame(c.current),l(!0),function(){d.current="CLOSED"}},[o.open]);var h=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(Jy,{"data-rsbs-portal":!0},u.createElement(xS,ut({},o,{lastSnapRef:f,ref:e,initialState:d.current,onSpringStart:h,onSpringEnd:v}))):null});const _d=28,kS="MapGoogle-module__root__Vi-sMl",PS="MapGoogle-module__hideUI__-JYLuR",RS="MapGoogle-module__mapContainer__OCCTIX",TS="MapGoogle-module__balloon__4UVhuT",AS="MapGoogle-module__details__4osNXn",DS="MapGoogle-module__cluster__5qmRds",IS="MapGoogle-module__overlay__g-nEoT",jS="MapGoogle-module__mapControl__mzyTwr",NS="MapGoogle-module__geolocationControl__1exHgA",BS="MapGoogle-module__bottomSheet__avcBmY",US="MapGoogle-module__locationViewContent__xwLeDh",VS="MapGoogle-module__locationViewHeader__maBLv0",FS="MapGoogle-module__deliveryDetailsViewContent__wH-RCe",zS="MapGoogle-module__deliveryDetailsViewHeader__4AKoBe",$S="MapGoogle-module__sheetSubmit__rPQG26",Xe={root:kS,hideUI:PS,mapContainer:RS,balloon:TS,details:AS,cluster:DS,overlay:IS,mapControl:jS,geolocationControl:NS,bottomSheet:BS,locationViewContent:US,locationViewHeader:VS,deliveryDetailsViewContent:FS,deliveryDetailsViewHeader:zS,sheetSubmit:$S},Od=({children:t,hideFooter:e,minSnapHeight:n,onSubmitClick:r,open:i,submitDisabled:o,submitLoading:s,...a})=>x.jsx(Cd,{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-_d],footer:e?null:x.jsx(Ot,{disabled:o,loading:s,variant:"primary",className:Xe.sheetSubmit,onClick:r,children:x.jsx(An,{keyName:"choose",ns:"common"})}),sibling:x.jsx("div",{role:"presentation","data-rsbs-backdrop":"true",onClick:l=>{var c;l.stopPropagation(),l.preventDefault(),(c=a.onDismiss)==null||c.call(a)}}),children:x.jsx("div",{className:Xe.bottomSheet,children:t})}),HS={header:Xe.locationViewHeader,content:Xe.locationViewContent},GS=({clusterer:t,hideDetails:e,onPointClick:n,onPointSelected:r,point:i,selectedPoint:o,setOpenDetails:s})=>{const a=hi("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)},y=(o==null?void 0:o.uid)===i.uid,p=y?Yn:Xt,L=Mf({isSelectedPoint:y}),w=u.useMemo(()=>{let _;switch(!0){case(i.type===30&&!y):{_=xt(Rt.PinLocker,"--owl-color-primary");break}case(i.type!==30&&!y):{_=xt(Rt.PinPvz,"--owl-color-grey-80");break}case(i.type===30&&y):{_=xt(Rt.PinLocker,"--owl-color-success");break}case(i.type!==30&&y):{_=xt(Rt.PinPvz,"--owl-color-black");break}}return mn(_,"Icon url is not defined"),{scaledSize:new google.maps.Size(...p),url:Jt(_)}},[y,p,i.type]),g=u.useMemo(()=>({lat:i.location.latitude,lng:i.location.longitude}),[i.location.latitude,i.location.longitude]),b=y&&L&&!!(l!=null&&l.getVisible());return x.jsxs(tf,{noClustererRedraw:!0,icon:w,position:g,clusterer:t,options:Of,onLoad:c,onClick:f,children:[a&&x.jsx(Od,{minSnapHeight:200,open:b,onDismiss:d,onSubmitClick:v,children:x.jsx(_f,{hideActions:!0,classes:HS,location:i,onClose:d})}),b&&!a&&x.jsx(lf,{onCloseClick:d,children:x.jsx(Cf,{...i,hideDetails:e,className:Xe.balloon,onSubmit:v,onDetails:h})})]},i.uid)},ZS=({hideDetails:t,onOpenDetails:e,onPointClick:n,onPointSelected:r,points:i,selectedPoint:o})=>x.jsx(Sv,{clusterClass:Xe.cluster,onClusteringEnd:()=>{setTimeout(()=>{const s=document.getElementsByClassName(Xe.cluster);for(const a of s)a.addEventListener("touchstart",Os,{passive:!0})},100)},onUnmount:()=>{const s=document.getElementsByClassName(Xe.cluster);for(const a of s)a.removeEventListener("touchstart",Os)},children:s=>x.jsx(x.Fragment,{children:i.map(a=>x.jsx(GS,{point:a,clusterer:s,hideDetails:t,selectedPoint:o,setOpenDetails:e,onPointClick:n,onPointSelected:r},a.uid))})}),WS=u.memo(ZS),qS=({onOpenDetails:t,onPointClick:e,onPointSelected:n})=>{const{hideDetails:r,locale:i}=st(),o=zt(Fu),s=bt(c=>c.location),a=$t(Ju),l=JSON.stringify([o.length,i,a==null?void 0:a.place_id]);return x.jsx(WS,{points:o,hideDetails:r,selectedPoint:s,onOpenDetails:t,onPointClick:e,onPointSelected:n},l)},KS=u.memo(qS),Md=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:42,height:42,fill:"none",viewBox:"0 0 42 42",...t},ce.createElement("rect",{width:42,height:42,fill:"#fff",rx:21}),ce.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"}),ce.createElement("rect",{width:41,height:41,x:.5,y:.5,stroke:"#1D3665",strokeOpacity:.1,rx:20.5})),JS="DeliveryBalloon-module__root__Nu90iy",YS="DeliveryBalloon-module__details__eqUTaI",XS="DeliveryBalloon-module__header__JVdyxN",QS="DeliveryBalloon-module__title__-zKKCt",e1="DeliveryBalloon-module__description__no5-ki",t1="DeliveryBalloon-module__actions__C-N0H-",n1="DeliveryBalloon-module__errorVariant__e6uhZl",r1="DeliveryBalloon-module__logo__62gC5h",ln={root:JS,details:YS,header:XS,title:QS,description:e1,actions:t1,errorVariant:n1,logo:r1},ra=({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 }":x.jsx(An,{keyName:"title",ns:"courier_balloon"}),d=t?"{ courier_balloon.error_title }":x.jsx(An,{keyName:"error_title",ns:"courier_balloon"}),h=t?"{ courier_balloon.error_description }":x.jsx(An,{keyName:"error_description",ns:"courier_balloon"});return x.jsxs("div",{className:be(ln.root,n,ln[`${a}Variant`]),children:[x.jsxs("div",{className:ln.header,children:[x.jsx(Md,{className:ln.logo}),x.jsx("span",{className:ln.title,children:l?d:f}),r&&x.jsx(ui,{onClick:o})]}),x.jsx("div",{className:ln.description,children:l?h:e||"{{ properties.address }}"}),c&&!i&&x.jsx("div",{className:ln.actions,children:x.jsx(Ot,{id:lo,as:"button",variant:"primary",className:ln.details,onClick:s,children:t?"{ details }":x.jsx(An,{keyName:"details",ns:"common"})})})]})},i1="Chip-module__root__zsoSyP",o1="Chip-module__active__BlTSFB",Zc={root:i1,active:o1},Wc=({active:t,children:e,className:n,...r})=>x.jsx("div",{...r,className:be(Zc.root,n,{[Zc.active]:t}),children:e}),s1="TextArea-module__root__8YFknR",a1={root:s1},qc=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=jd(e,a);return x.jsx("textarea",{...o,ref:l,className:be(a1.root,t),onBlur:n,onFocus:i,onChange:r})}),l1=({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},c1="DeliveryDetailsView-module__title__azeoUr",u1="DeliveryDetailsView-module__logo__4zZtpM",f1="DeliveryDetailsView-module__header__oDE9He",d1="DeliveryDetailsView-module__content__6P27SY",h1="DeliveryDetailsView-module__section__2M3Qip",p1="DeliveryDetailsView-module__chips__KmYgha",g1="DeliveryDetailsView-module__actions__43XZ-V",v1="DeliveryDetailsView-module__submit__58LKBw",m1="DeliveryDetailsView-module__actionsHidden__SW-67b",y1="DeliveryDetailsView-module__commentSection__GlX1A2",b1="DeliveryDetailsView-module__comment__2pGG6h",mt={title:c1,logo:u1,header:f1,content:d1,section:h1,chips:p1,actions:g1,submit:v1,actionsHidden:m1,commentSection:y1,comment:b1},w1=u.forwardRef(({classes:t,hideActions:e,location:n,onChange:r,onClose:i,onSubmit:o},s)=>{var m;const{hideDeliveryTime:a,inputs:l,locale:c}=st(),{t:f}=jt(["details_modal","courier_balloon","common"]),d=u.useMemo(()=>l1({set:r,hideDeliveryTime:a}),[a,r]),[h,v]=u.useState(!1),[y,p]=u.useReducer(d,{comment:"",delivery_time:"",apartment_number:"",...n}),L=u.useCallback(async()=>{v(!0);try{mn(n.address,"Address is required");const S=await Yd({address:n.address,algorithm:10,service:10,language:c||lu});if(!Vu(S))return;const C=S==null?void 0:S.data.data,R={...y,address:C};return o==null||o(R),R}finally{v(!1)}},[c,n.address,o,y]);u.useImperativeHandle(s,()=>({submit:L}),[L]);const w=S=>()=>{p({payload:S,type:"SET_DELIVERY_TIME"})},g=S=>{p({payload:S.target.value,type:"SET_APARTMENT_NUMBER"})},b=S=>{p({payload:S.target.value,type:"SET_COMMENT"})},_=_o(l==null?void 0:l.apartment),E=_o(l==null?void 0:l.comment);return x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:be(mt.header,t==null?void 0:t.header),children:[x.jsx(ui,{onClick:i}),x.jsxs("div",{className:mt.title,children:[x.jsx(Md,{className:mt.logo}),x.jsx("span",{children:f("title",{ns:"courier_balloon"})})]})]}),x.jsxs("div",{className:be(mt.content,t==null?void 0:t.content),children:[x.jsxs("section",{className:mt.section,children:[x.jsxs("span",{children:[f("address"),":"]}),x.jsx("p",{children:n.address})]}),!a&&x.jsxs("section",{className:mt.section,children:[x.jsxs("span",{children:[f("delivery_time"),":"]}),x.jsxs("div",{className:mt.chips,children:[x.jsx(Wc,{active:y.delivery_time==="8:00-13:00",onClick:w("8:00-13:00"),children:"8:00 - 13:00"}),x.jsx(Wc,{active:y.delivery_time==="14:00-22:00",onClick:w("14:00-22:00"),children:"14:00 - 22:00"})]})]}),x.jsxs("section",{className:mt.section,children:[x.jsxs("span",{children:[f("apartment_number"),":"]}),x.jsx(qc,{..._,rows:1,onChange:g})]}),x.jsxs("section",{className:be(mt.section,mt.commentSection),children:[x.jsxs("span",{children:[f("comment"),":"]}),x.jsx(qc,{...E,className:mt.comment,onChange:b})]})]}),x.jsx("div",{className:be(mt.actions,{[mt.actionsHidden]:e}),children:x.jsx(Ot,{loading:h,disabled:!((m=y.meta)!=null&&m.valid)||h,variant:"primary",className:mt.submit,onClick:L,children:f("choose",{ns:"common"})})})]})}),kd=u.memo(w1),S1={header:Xe.deliveryDetailsViewHeader,content:Xe.deliveryDetailsViewContent},L1=({hideDeliveryTime:t,hideDetails:e,onPointClick:n,point:r,setDeliveryPoint:i,setOpenDetails:o})=>{const s=Mf({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),y=hi("screenSm"),p=u.useMemo(()=>({lat:f.coords[0],lng:f.coords[1]}),[f.coords]),L=()=>{o==null||o(!0)},w=()=>{i==null||i(null)},g=u.useMemo(()=>({url:Jt(xt(Rt.PinHome,"--owl-color-success")),scaledSize:new google.maps.Size(...Xt)}),[]),b=async()=>{var S;try{c(!0);const C=await((S=a.current)==null?void 0:S.submit());if(!C)return;n==null||n(C),o==null||o(!1),i==null||i(null)}finally{c(!1)}},_=x.jsx(ra,{...f,hideDetails:e,hasCloseButton:y,variant:f.address?"default":"error",className:Xe.balloon,onDetails:L,onClose:w}),E=s&&!!(h!=null&&h.getVisible()),m=t?!!f.apartment_number:!!f.apartment_number&&!!f.delivery_time;return x.jsxs(tf,{noClustererRedraw:!0,icon:g,position:p,options:Of,onLoad:v,children:[y&&x.jsxs(Od,{minSnapHeight:f.address?200:void 0,submitDisabled:!m||l,submitLoading:l,hideFooter:!f.address,open:E,onDismiss:w,onSubmitClick:b,children:[f.address&&x.jsx(kd,{ref:a,hideActions:!0,classes:S1,location:r,onChange:d,onClose:w}),!f.address&&_]}),!y&&E&&x.jsx(lf,{onCloseClick:w,children:_})]})},E1=({children:t,className:e,onIdle:n,onLoad:r,onUnmount:i})=>{const{disableDelivery:o,hideMapUI:s,map:a}=st(),l=u.useMemo(()=>{var f,d;return{lat:((f=a==null?void 0:a.center)==null?void 0:f[0])??co[0],lng:((d=a==null?void 0:a.center)==null?void 0:d[1])??co[1]}},[a==null?void 0:a.center]),c=u.useCallback(async f=>{var v;const{latLng:d}=f;if(!d||o)return;ye.getState().setDetailsOpen(!1),bt.getState().setSelectedLocation(null);const h=[d.lat(),d.lng()];try{const y=await sr(h),p=(v=y==null?void 0:y.results)==null?void 0:v[0],L=p==null?void 0:p.formatted_address;$t.getState().setPlace(p),mn(L,"Address is not defined"),We.getState().setDeliverPoint({address:L,coords:h})}catch{We.getState().setDeliverPoint({address:null,coords:h})}},[o]);return x.jsx(Yg,{zoom:a==null?void 0:a.initialZoom,center:l,options:Zy,mapContainerClassName:be(Xe.root,e,{[Xe.hideUI]:s}),onLoad:r,onIdle:n,onUnmount:i,onClick:c,children:t})},x1=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},ce.createElement("rect",{width:2,height:20,x:9,fill:"#fff",rx:1}),ce.createElement("rect",{width:2,height:20,x:20,y:9,fill:"#fff",rx:1,transform:"rotate(90 20 9)"}),ce.createElement("circle",{cx:10,cy:10,r:8,fill:"#fff"}),ce.createElement("circle",{cx:10,cy:10,r:6,fill:"currentcolor"}),ce.createElement("circle",{cx:10,cy:10,r:4,fill:"#fff"})),C1=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)})},_1=t=>{const e=document.createElement("div");e.classList.add(Xe.mapControl),e.classList.add(Xe.geolocationControl),e.innerHTML=$i.renderToString(x.jsx(x1,{})),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{ha(async n=>{var a;const{latitude:r,longitude:i}=n.coords,s=await sr([r,i]);$t.getState().setPlace((a=s.results)==null?void 0:a[0])})})},O1=({className:t})=>{const e=Qt(),n=ye(gu),r=ye(jh),i=zt(ga),o=We(Po),{disableGeolocation:s,hideDeliveryTime:a,hideDetails:l,hideMapControls:c,onPointClick:f}=st(),d=u.useCallback(p=>{ye.getState().setMap(p),c||(C1(p),s||_1(p))},[s,c]),h=u.useCallback(()=>{ye.getState().setMap(null)},[]),v=u.useCallback(()=>{if(!n)return;const p=n==null?void 0:n.getBounds();p&&zt.getState().loadNext([[p.getSouthWest().lat(),p.getNorthEast().lat()],[p.getSouthWest().lng(),p.getNorthEast().lng()]],e)},[e,n]),y=u.useCallback(async p=>{var g;if(We.getState().setDeliverPoint(null),bt.getState().setSelectedLocation(p),!p)return;const L=[p.location.latitude,p.location.longitude],w=await sr(L);$t.getState().setPlace((g=w.results)==null?void 0:g[0])},[]);return x.jsxs("div",{className:be(Xe.mapContainer,t),children:[x.jsxs(E1,{onIdle:v,onLoad:d,onUnmount:h,children:[o&&x.jsx(L1,{hideDeliveryTime:a,hideDetails:l,point:o,setOpenDetails:ye.getState().setDetailsOpen,setDeliveryPoint:We.getState().setDeliverPoint,onPointClick:f}),x.jsx(KS,{onPointClick:f,onOpenDetails:ye.getState().setDetailsOpen,onPointSelected:y})]}),(i||r)&&x.jsx(ya,{className:Xe.overlay,children:x.jsx(ri,{})})]})},M1=u.memo(O1);function Bn(){return Bn=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},Bn.apply(this,arguments)}const Pd=(t,e)=>{const n={};for(const r in t)e.indexOf(r)===-1&&(n[r]=t[r]);return n},Rd=u.createContext(null),Fo=u.createContext(null),Td=t=>e=>u.createElement(Fo.Consumer,null,n=>u.createElement(t,Bn({parent:n},e))),k1=(t=[])=>{const[e,n]=u.useState(!1),r=u.useRef(t),i=(()=>{const s=u.useContext(Rd);if(s===null)throw new Error("Couldn't find Yandex.Maps API in the context. Make sure that hook useYMaps is inside <YMaps /> provider");return s})(),o=i.getApi();return u.useEffect(()=>{i.load().then(()=>Promise.all(r.current.map(i.loadModule))).then(()=>n(!0))},[]),e&&o?o:null},P1=()=>{},R1=["onLoad","onError","modules","apiLoader"];function Da(t,e=!1,n=[]){return r=>{const{width:i,height:o,modules:s=[],onLoad:a=P1}=r,l=k1(n.concat(s)),c=!e||!!l,f=Pd(r,R1);return u.useEffect(()=>l?a(l):void 0,[l]),c?u.createElement(t,Bn({ymaps:l},f)):u.createElement("div",{style:{width:i,height:o}})}}const T1=typeof window<"u",Kc={lang:"ru_RU",load:"",ns:"",mode:"release"},A1=t=>{const{version:e="2.1",enterprise:n=!1,query:r={lang:"ru_RU",load:"",ns:""},preload:i=!1,children:o}=t,s=u.useRef((a=>{const{query:l=Kc}=a,c=Date.now().toString(32),f=l.ns||"",d="__yandex-maps-api-onload__$$"+c,h="__yandex-maps-api-onerror__$$"+c,v=T1?window:{},y={};let p;const L=()=>f?v[f]:p,w=()=>{delete v[d],delete v[h]};return{load:()=>{if(L())return Promise.resolve(p);if(y[f])return y[f];const g={onload:d,onerror:h,...Kc,...l},b=Object.keys(g).map(E=>`${E}=${g[E]}`).join("&"),_=[`https://${a.enterprise?"enterprise.":""}api-maps.yandex.ru`,a.version,"?"+b].join("/");return y[f]=new Promise((E,m)=>{v[d]=S=>{w(),S.ready(()=>{p=S,E(S)})},v[h]=S=>{w(),m(S)},(S=>new Promise((C,R)=>{const M=document.createElement("script");M.type="text/javascript",M.onload=C,M.onerror=R,M.src=S,M.async=!0,document.head.appendChild(M)}))(_).catch(v[h])}),y[f]},getApi:L,loadModule:g=>new Promise((b,_)=>{p.modules.require(g).done(E=>{E.forEach(m=>{((S,C,R,M=!1)=>{const O=typeof C=="string"?C.split("."):C.slice();let P,j=S;for(;O.length>1;)P=O.shift(),j[P]||(j[P]={}),j=j[P];const B=O[0];j[B]=M===!0&&j[B]||R})(p,g,m,!0)}),b(p)},_)})}})({version:e,enterprise:n,query:r,preload:i}));return u.useEffect(()=>{i&&s.current.load()},[s.current]),u.createElement(Rd.Provider,{value:s.current},o)},Jc=/^on(?=[A-Z])/;function Ve(t){return Object.keys(t).reduce((e,n)=>{if(Jc.test(n)){const r=n.replace(Jc,"").toLowerCase();e._events[r]=t[n]}else e[n]=t[n];return e},{_events:{}})}function Un(t,e,n){typeof n=="function"&&t.events.add(e,n)}function Vn(t,e,n){typeof n=="function"&&t.events.remove(e,n)}function gr(t,e,n){Object.keys(Object.assign({},e,n)).forEach(r=>{e[r]!==n[r]&&(Vn(t,r,e[r]),Un(t,r,n[r]))})}const Ad=t=>"default"+t.charAt(0).toUpperCase()+t.slice(1);function tt(t,e){return t[e]!==void 0||t[Ad(e)]===void 0}function Y(t,e,n){return(tt(t,e)?t[e]:t[Ad(e)])||n}function nt(t,e,n=null){if(t!==e){if(t&&("current"in t?t.current=null:typeof t=="function"&&t(null)),!e)return;"current"in e?e.current=n:typeof e=="function"&&e(n)}}function Dd(t){const{width:e,height:n,style:r,className:i}=t;return r!==void 0||i!==void 0?Object.assign({},r&&{style:r},i&&{className:i}):{style:{width:e,height:n}}}class D1 extends u.Component{constructor(e){super(e),this.state={error:null,errorInfo:null}}componentDidCatch(e,n){const{onError:r=()=>{}}=this.props;r(e),this.setState({error:e,errorInfo:n})}render(){return this.state.error?null:this.props.children}}const Ia=t=>({onError:e,...n})=>u.createElement(D1,{onError:e},u.createElement(t,n));class Xr extends u.Component{constructor(){super(),this.instance=null,this.state={instance:null},this._parentElement=null,this._getRef=e=>{this._parentElement=e}}componentDidMount(){this.instance=Xr.mountObject(this._parentElement,this.props.ymaps.Map,this.props),this.setState({instance:this.instance})}componentDidUpdate(e){this.instance!==null&&Xr.updateObject(this.instance,e,this.props)}componentWillUnmount(){Xr.unmountObject(this.instance,this.props)}render(){const e=Dd(this.props),n=Ve(this.props),r=Pd(n,["_events","state","defaultState","options","defaultOptions","instanceRef","ymaps","children","width","height","style","className"]);return u.createElement(Fo.Provider,{value:this.state.instance},u.createElement("div",Bn({ref:this._getRef},e,r),this.props.children))}static mountObject(e,n,r){const{instanceRef:i,_events:o}=Ve(r),s=new n(e,Y(r,"state"),Y(r,"options"));return Object.keys(o).forEach(a=>Un(s,a,o[a])),nt(null,i,s),s}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(tt(r,"state")){const l=Y(n,"state",{}),c=Y(r,"state",{});l.type!==c.type&&e.setType(c.type),l.behaviors!==c.behaviors&&(l.behaviors&&e.behaviors.disable(l.behaviors),c.behaviors&&e.behaviors.enable(c.behaviors)),c.zoom&&l.zoom!==c.zoom&&e.setZoom(c.zoom),c.center&&l.center!==c.center&&e.setCenter(c.center),c.bounds&&l.bounds!==c.bounds&&e.setBounds(c.bounds)}if(tt(r,"options")){const l=Y(n,"options"),c=Y(r,"options",{});l!==c&&e.options.set(c)}Y(n,"width")===Y(r,"width")&&Y(n,"height")===Y(r,"height")||e.container.fitToViewport(),gr(e,s,i),nt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,_events:i}=Ve(n);e!==null&&(Object.keys(i).forEach(o=>Vn(e,o,i[o])),e.destroy(),nt(r))}}const Id=Ia(Da(Xr,!0,["Map"]));Id.defaultProps={width:320,height:240};class no extends u.Component{constructor(){super(),this.state={instance:null},this._parentElement=null,this._getRef=e=>{this._parentElement=e}}componentDidMount(){this._mounted=!0,this.props.ymaps.panorama.isSupported()&&no.mountObject(this._parentElement,this.props.ymaps.panorama,this.props).then(e=>this._mounted&&this.setState({instance:e}))}componentDidUpdate(e){this.state.instance!==null&&no.updateObject(this.state.instance,e,this.props)}componentWillUnmount(){this._mounted=!1,no.unmountObject(this.state.instance,this.props)}render(){const e=Dd(this.props);return u.createElement("div",Bn({ref:this._getRef},e))}static mountObject(e,n,r){const{instanceRef:i,_events:o}=Ve(r),s=Y(r,"point"),a=Y(r,"locateOptions"),l=Y(r,"options");return new Promise((c,f)=>{n.locate(s,a).done(d=>{if(d.length>0){const h=new n.Player(e,d[0],l);nt(null,i,h),Object.keys(o).forEach(v=>Un(h,v,o[v])),c(h)}},f)})}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(tt(r,"options")){const l=Y(n,"options"),c=Y(r,"options");l!==c&&e.options.set(c)}if(tt(r,"point")){const l=Y(r,"point"),c=Y(n,"point"),f=Y(r,"locateOptions");l!==c&&e.moveTo(l,f)}gr(e,s,i),nt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,_events:i}=Ve(n);e!==null&&(Object.keys(i).forEach(o=>Vn(e,o,i[o])),nt(r))}}class ro extends u.Component{constructor(){super(),this.state={instance:null},this.instance=null}componentDidMount(){const e=ro.mountControl(this.props.ymaps.control[this.props.name],this.props);this.instance=e,this.setState({instance:e})}componentDidUpdate(e){this.instance!==null&&ro.updateControl(this.instance,e,this.props)}componentWillUnmount(){ro.unmountControl(this.instance,this.props)}render(){return u.createElement(Fo.Provider,{value:this.state.instance},this.props.children)}static mountControl(e,n){const{instanceRef:r,parent:i,lazy:o,_events:s}=Ve(n),a=new e({data:Y(n,"data"),options:Y(n,"options"),state:Y(n,"state"),mapTypes:Y(n,"mapTypes"),lazy:o});if(Object.keys(s).forEach(l=>Un(a,l,s[l])),i&&i.controls&&typeof i.controls.add=="function")i.controls.add(a);else{if(!i||!i.add||typeof i.add!="function")throw new Error(`No parent found to mount ${n.name}`);i.add(a)}return nt(null,r,a),a}static updateControl(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(tt(r,"options")){const l=Y(n,"options"),c=Y(r,"options");l!==c&&e.options.set(c)}if(tt(r,"data")){const l=Y(n,"data"),c=Y(r,"data");l!==c&&e.data.set(c)}if(tt(r,"state")){const l=Y(n,"state"),c=Y(r,"state");l!==c&&e.state.set(c)}if(tt(r,"mapTypes")){const l=Y(n,"mapTypes"),c=Y(r,"mapTypes");l!==c&&(e.removeAllMapTypes(),c.forEach(f=>e.addMapType(f)))}gr(e,s,i),nt(a,o,e)}static unmountControl(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n);e!==null&&(Object.keys(o).forEach(s=>Vn(e,s,o[s])),i.controls&&typeof i.controls.remove=="function"?i.controls.remove(e):i.remove&&typeof i.remove=="function"&&i.remove(e),nt(r))}}class io extends u.Component{constructor(){super(),this.state={instance:null},this.instance=null}componentDidMount(){const e=io.mountObject(this.props.ymaps.Clusterer,this.props);this.instance=e,this.setState({instance:e})}componentDidUpdate(e){this.state.instance!==null&&io.updateObject(this.instance,e,this.props)}componentWillUnmount(){io.unmountObject(this.instance,this.props)}render(){return u.createElement(Fo.Provider,{value:this.state.instance},this.props.children)}static mountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n),s=new e(Y(n,"options"));if(Object.keys(o).forEach(a=>Un(s,a,o[a])),i.geoObjects&&typeof i.geoObjects.add=="function")i.geoObjects.add(s);else{if(!i.add||typeof i.add!="function")throw new Error("No parent found to mount Clusterer");i.add(s)}return nt(null,r,s),s}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(tt(r,"options")){const l=Y(n,"options"),c=Y(r,"options");l!==c&&e.options.set(c)}gr(e,s,i),nt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n);e!==null&&(Object.keys(o).forEach(s=>Vn(e,s,o[s])),i.geoObjects&&typeof i.geoObjects.remove=="function"?i.geoObjects.remove(e):i.remove&&typeof i.remove=="function"&&i.remove(e),nt(r))}}class Qr extends u.Component{constructor(){super(),this.state={instance:null}}componentDidMount(){const e=Qr.mountObject(this.props.ymaps.ObjectManager,this.props);this.instance=e,this.setState({instance:e})}componentDidUpdate(e){this.instance!==null&&Qr.updateObject(this.instance,e,this.props)}componentWillUnmount(){Qr.unmountObject(this.instance,this.props)}render(){return null}static mountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n),s=Y(n,"options",{}),a=Y(n,"features",{}),l=Y(n,"filter",null),c=Y(n,"objects",{}),f=Y(n,"clusters",{}),d=new e(s);if(d.add(a||[]),d.setFilter(l),d.objects.options.set(c),d.clusters.options.set(f),Object.keys(o).forEach(h=>Un(d,h,o[h])),i.geoObjects&&typeof i.geoObjects.add=="function")i.geoObjects.add(d);else{if(!i.add||typeof i.add!="function")throw new Error("No parent found to mount ObjectManager");i.add(d)}return nt(null,r,d),d}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(tt(r,"options")){const l=Y(n,"options"),c=Y(r,"options");l!==c&&e.options.set(c)}if(tt(r,"objects")){const l=Y(n,"objects"),c=Y(r,"objects");l!==c&&e.objects.options.set(c)}if(tt(r,"clusters")){const l=Y(n,"clusters"),c=Y(r,"clusters");l!==c&&e.clusters.options.set(c)}if(tt(r,"filter")){const l=Y(n,"filter"),c=Y(r,"filter");l!==c&&e.setFilter(c)}if(tt(r,"features")){const l=Y(n,"features"),c=Y(r,"features");l!==c&&(e.remove(l),e.add(c))}gr(e,s,i),nt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n);e!==null&&(Object.keys(o).forEach(s=>Vn(e,s,o[s])),i.geoObjects&&typeof i.geoObjects.remove=="function"?i.geoObjects.remove(e):i.remove&&typeof i.remove=="function"&&i.remove(e),nt(r))}}var I1=Ia(Td(Da(Qr,!0,["ObjectManager"])));class ei extends u.Component{constructor(){super(),this.state={instance:null},this.instance=null}componentDidMount(){const{name:e,ymaps:n,dangerZone:r}=this.props,i=ei.mountObject(r&&typeof r.modifyConstructor=="function"?r.modifyConstructor(n[e]):n[e],this.props);this.instance=i,this.setState({instance:i})}componentDidUpdate(e){this.instance!==null&&ei.updateObject(this.instance,e,this.props)}componentWillUnmount(){ei.unmountObject(this.instance,this.props)}render(){return null}static mountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n),s=new e(Y(n,"geometry"),Y(n,"properties"),Y(n,"options"));if(Object.keys(o).forEach(a=>Un(s,a,o[a])),i&&i.geoObjects&&typeof i.geoObjects.add=="function")i.geoObjects.add(s);else{if(!i||!i.add||typeof i.add!="function")throw new Error(`No parent found to mount ${n.name}`);i.add(s)}return nt(null,r,s),s}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(tt(r,"geometry")){const l=Y(n,"geometry",{}),c=Y(r,"geometry",{});Array.isArray(c)&&c!==l?Array.isArray(c[0])&&typeof c[1]=="number"?(e.geometry.setCoordinates(c[0]),e.geometry.setRadius(c[1])):e.geometry.setCoordinates(c):typeof c=="object"&&(c.coordinates!==l.coordinates&&e.geometry.setCoordinates(c.coordinates),c.radius!==l.radius&&e.geometry.setRadius(c.radius))}if(tt(r,"properties")){const l=Y(n,"properties"),c=Y(r,"properties");l!==c&&e.properties.set(c)}if(tt(r,"options")){const l=Y(n,"options"),c=Y(r,"options");l!==c&&e.options.set(c)}gr(e,s,i),nt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n);e!==null&&(Object.keys(o).forEach(s=>Vn(e,s,o[s])),i.geoObjects&&typeof i.geoObjects.remove=="function"?i.geoObjects.remove(e):i.remove&&typeof i.remove=="function"&&i.remove(e),nt(r))}}var Yc=Ia(Td(Da(t=>u.createElement(ei,Bn({},t,{name:"Placemark"})),!0,["Placemark"])));const oo=(t,e)=>t===30?`custom#pin-locker${e?`__${e}`:""}`:`custom#pin-pvz${e?`__${e}`:""}`,Br=t=>[-(t[0]/2),-t[1]],Xc=(t,e,n)=>t==null?void 0:t.map(r=>{var i;return{id:r.uid,type:"Feature",properties:{point:r},geometry:{type:"Point",coordinates:[r.location.latitude,r.location.longitude]},options:{hideIconOnBalloonOpen:!1,preset:oo(r.type),balloonOffset:[0,-Yn[1]],balloonContentLayout:(i=e==null?void 0:e.templateLayoutFactory)==null?void 0:i.createClass(n)}}}),j1={en:"en_US",ru:"ru_RU"},N1={load:"suggest",apikey:"5298a725-4baa-457a-a2a7-c3abac81db20"},B1=["templateLayoutFactory","option.presetStorage","geocode"],U1=["objectManager.addon.objectsBalloon"],Qc=["geoObject.addon.balloon"],V1={yandexMapDisablePoiInteractivity:!1},F1={clusterize:!0},eu={iconImageSize:Xt,iconLayout:"default#image",hideIconOnBalloonOpen:!1,balloonOffset:[0,-Xt[1]],iconImageOffset:Br(Xt)},z1="MapYandex-module__root__GNnwcS",$1="MapYandex-module__overlay__lf7cbO",H1="MapYandex-module__details__T9uy6N",tu={root:z1,overlay:$1,details:H1},G1=({className:t})=>{const{t:e}=jt(["courier_balloon","common"]),n=u.useRef(),r=u.useRef(null),{disableDelivery:i,hideDetails:o,locale:s,map:a,onPointClick:l}=st(),[c,f]=u.useState(null),[d,h]=u.useState([]),[v,y]=u.useState(F1),p=Qt(),L=zt(Fu),w=zt(ga),g=We(Po),b=bt(k=>k.location),_=u.useRef([]),E=u.useMemo(()=>$i.renderToString(x.jsx(Cf,{SSR:!0,hideDetails:o})).replace("{ choose }",e("choose")).replace("{ details }",e("details")),[e,s,o]),m=u.useMemo(()=>$i.renderToString(x.jsx(ra,{SSR:!0,variant:"default",hideDetails:o})).replace("{ details }",e("details",{ns:"common"})).replace("{ courier_balloon.title }",e("title")),[e,s,o]),S=u.useMemo(()=>$i.renderToString(x.jsx(ra,{SSR:!0,variant:"error",hideDetails:o})).replace("{ courier_balloon.error_title }",e("error_title")).replace("{ courier_balloon.error_description }",e("error_description")),[e,s,o]),C=u.useMemo(()=>({zoom:(a==null?void 0:a.initialZoom)??oa,center:(a==null?void 0:a.center)??co,behaviors:["default","scrollZoom"]}),[a==null?void 0:a.center,a==null?void 0:a.initialZoom]);u.useEffect(()=>{var k,D;(D=n.current)==null||D.events.fire("boundschange",{newBounds:(k=n.current)==null?void 0:k.getBounds()})},[c]),u.useEffect(()=>{var D;if(!c||!r.current)return;for(const U of _.current)U.id!==(b==null?void 0:b.uid)&&((D=r.current)==null||D.remove(U));const k=Xc(L,c,E);_.current=k,r.current.add(k)},[E,c,L,b==null?void 0:b.uid]);const R=u.useCallback(k=>{const D=k.get("newBounds");zt.getState().loadNext([[D[0][0],D[1][0]],[D[0][1],D[1][1]]],p)},[p]),M=u.useRef(b),O=u.useCallback(k=>{var D,U,V,W;f(k),ye.getState().setLoaded(),(D=k==null?void 0:k.option)==null||D.presetStorage.add("custom#pin-locker",{iconImageSize:Xt,iconLayout:"default#image",iconImageHref:Jt(xt(Rt.PinLocker,"--owl-color-primary")),iconImageOffset:Br(Xt)}),(U=k==null?void 0:k.option)==null||U.presetStorage.add("custom#pin-locker__active",{iconLayout:"default#image",iconImageHref:Jt(xt(Rt.PinLocker,"--owl-color-success")),iconImageSize:Yn,iconImageOffset:Br(Yn)}),(V=k==null?void 0:k.option)==null||V.presetStorage.add("custom#pin-pvz",{iconImageSize:Xt,iconLayout:"default#image",iconImageHref:Jt(xt(Rt.PinPvz,"--owl-color-grey-80")),iconImageOffset:Br(Xt)}),(W=k==null?void 0:k.option)==null||W.presetStorage.add("custom#pin-pvz__active",{iconLayout:"default#image",iconImageHref:Jt(xt(Rt.PinPvz,"--owl-color-black")),iconImageSize:Yn,iconImageOffset:Br(Yn)}),y(I=>({...I,clusterIconColor:pa("--owl-color-primary")})),h(Xc(L,k,E))},[E,L]),P=u.useCallback(()=>{ye.getState().setDetailsOpen(!0)},[]),j=u.useCallback(()=>{var k;M.current&&(l==null||l(M.current),ye.getState().setDetailsOpen(!1),bt.getState().setSelectedLocation(null),We.getState().setDeliverPoint(null),(k=n.current)==null||k.balloon.close())},[l]),B=u.useCallback(()=>{var k,D;(k=document.getElementById(lo))==null||k.addEventListener("click",P),(D=document.getElementById(bs))==null||D.addEventListener("click",j)},[j,P]),$=u.useCallback(k=>{var U,V,W,I,X,ee;const D=k.get("objectId");((U=M.current)==null?void 0:U.uid)===D&&((I=r.current)==null||I.objects.setObjectOptions((V=M.current)==null?void 0:V.uid,{preset:oo((W=M.current)==null?void 0:W.type)}),We.getState().setDeliverPoint(null),bt.getState().setSelectedLocation(null),We.getState().setDeliverPoint(null),M.current=null),(X=document.getElementById(lo))==null||X.removeEventListener("click",P),(ee=document.getElementById(bs))==null||ee.removeEventListener("click",j)},[j,P]),G=u.useCallback(k=>{var W,I,X,ee;const D=k.get("objectId"),U=(I=(W=r.current)==null?void 0:W.objects)==null?void 0:I.getById(D);if(!U)return;const V=U.properties.point;ye.getState().setDetailsOpen(!1),We.getState().setDeliverPoint(null),bt.getState().setSelectedLocation(V),(X=r.current)==null||X.objects.each(K=>{var fe;const ie=K;(fe=r.current)==null||fe.objects.setObjectOptions(ie.id,{preset:oo(ie.properties.point.type)})}),(ee=r.current)==null||ee.objects.setObjectOptions(D,{preset:oo(V.type,"active")}),M.current=V},[]),z=u.useCallback(async k=>{if(!c||i)return;const D=k.get("coords"),{geoObjects:U}=await c.geocode(D),V=U.get(0),W=V.getAddressLine(),I=V.properties.get("metaDataProperty.GeocoderMetaData.precision",{});if(bt.getState().setSelectedLocation(null),I!=="exact"){We.getState().setDeliverPoint({coords:D,address:null});return}We.getState().setDeliverPoint({coords:D,address:W})},[i,c]),Z=u.useMemo(()=>{var k;return{...eu,iconImageHref:Jt(xt(Rt.PinHome,"--owl-color-success")),balloonContentLayout:(k=c==null?void 0:c.templateLayoutFactory)==null?void 0:k.createClass(m)}},[m,c==null?void 0:c.templateLayoutFactory]),A=u.useMemo(()=>{var k;return{...eu,iconImageHref:Jt(xt(Rt.PinHome,"--owl-color-success")),balloonContentLayout:(k=c==null?void 0:c.templateLayoutFactory)==null?void 0:k.createClass(S)}},[S,c==null?void 0:c.templateLayoutFactory]),T=u.useCallback(k=>{var D,U,V,W,I;(D=k==null?void 0:k.balloon)==null||D.open(),(V=(U=k==null?void 0:k.balloon)==null?void 0:U.events)==null||V.add("open",B),(I=(W=k==null?void 0:k.balloon)==null?void 0:W.events)==null||I.add("close",$)},[$,B]);return x.jsxs("div",{className:be(tu.root,t),children:[x.jsx(A1,{query:{...N1,lang:j1[s??"ru"]},children:x.jsxs(Id,{width:"100%",height:"100%",state:C,instanceRef:n,options:V1,modules:B1,onLoad:O,onClick:z,onBoundsChange:R,children:[(g==null?void 0:g.address)&&x.jsx(Yc,{properties:g,modules:Qc,geometry:g.coords,options:Z,instanceRef:T},JSON.stringify(g.coords)),g&&!g.address&&x.jsx(Yc,{modules:Qc,geometry:g.coords,instanceRef:T,options:A},JSON.stringify(g.coords)),x.jsx(I1,{features:d,instanceRef:r,modules:U1,options:v,onClick:G,onBalloonOpen:B,onBalloonClose:$})]})},s),w&&x.jsx(ya,{className:tu.overlay,children:x.jsx(ri,{})})]})},Z1=u.memo(G1),W1=t=>({google:M1,yandex:Z1})[t];function jd(...t){return u.useCallback(e=>{for(const n of t)typeof n=="function"?n(e):n&&typeof n=="object"&&(n.current=e)},t)}const _o=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}},q1=()=>{throw new Error("useMediaQuery is a client-only hook")};function K1(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,q1)}const J1="768px",Y1="1024px",X1="1280px",Q1="1536px",eL={screenSm:J1,screenMd:Y1,screenLg:X1,screenXl:Q1};function hi(t){return K1(`(max-width: calc(${eL[t]} - 1px))`)}const tL=(t,e,n)=>{const{disableGeolocation:r}=n??{},i=ye(gu);u.useEffect(()=>{i&&ye.getState().setLoaded()},[i]);const o=t[0],s=t[1];u.useEffect(()=>{if(!i)return;const a=[o,s],l=async()=>{var f;const c=await sr(a,"GEOMETRIC_CENTER");$t.getState().setPlace((f=c.results)==null?void 0:f[0],oa)};if(r){l();return}ha(async c=>{var v;const{latitude:f,longitude:d}=c.coords,h=await sr([f,d],"GEOMETRIC_CENTER");$t.getState().setPlace((v=h.results)==null?void 0:v[0])},()=>l())},[o,s,i,e,r])},Nd=iy().use(Gm()).use(jm()).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&&(Nd.changeLanguage(t),fo.setLanguage(t))},[t])},rL=t=>{u.useEffect(()=>{if(t){const e=Object.keys(t);for(const n of e){const r=t[n];r&&jo(`--owl-color-${n}`,r)}}},[t])},iL=t=>{u.useEffect(()=>{t&&t!==void 0&&jo("--owl-button-radius",`${t}px`)},[t])},oL=t=>{u.useEffect(()=>{t&&t!==void 0&&jo("--owl-font",t)},[t])},sL={open:!1},aL=t=>t.open,Tn=bn(t=>({...sL,toggle(e){t(n=>({open:e??!n.open}))}})),lL=t=>{const e=t==="selector";u.useEffect(()=>{e&&Tn.getState().toggle(!0)},[e])},cL=({children:t})=>{const{font:e,locale:n,palette:r,radius:i,startScreen:o}=st();return oL(e),nL(n),rL(r),iL(i),lL(o),x.jsx(x.Fragment,{children:t})},uL=({children:t})=>{const{disableGeolocation:e,map:n}=st();return mn(n==null?void 0:n.center,"Map center is required"),mn(n==null?void 0:n.initialZoom,"Map initial zoom is required"),tL(n.center,n.initialZoom,{disableGeolocation:e}),x.jsx(x.Fragment,{children:t})},fL=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:28,fill:"none",viewBox:"0 0 24 28",...t},ce.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=()=>{Tn.getState().toggle(!0),ye.getState().setDetailsOpen(!1),We.getState().setDeliverPoint(null),bt.getState().setSelectedLocation(null)},hL="CurrentLocation-module__root__AeQCGT",pL="CurrentLocation-module__icon__459m9q",gL="CurrentLocation-module__text__w-9v28",ps={root:hL,icon:pL,text:gL},Bd=({className:t})=>{const{t:e}=jt("current_location"),n=$t(Ju),r=$t(Ig);return x.jsxs("div",{role:"presentation",className:be(ps.root,t),onClick:dL,children:[x.jsx(fL,{className:ps.icon}),x.jsxs("span",{className:ps.text,children:[!n&&e("choose_from_map"),n&&`${(r==null?void 0:r.long_name)??n.formatted_address}`]})]})},vL=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:123,height:32,fill:"none",viewBox:"0 0 123 32",...t},ce.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=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:192,height:20,fill:"none",viewBox:"0 0 192 20",...t},ce.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",Ur={root:yL,nav:bL,navItem:wL,logo:SL},LL={llama:mL,default:vL},EL=()=>{const{hideLogo:t,logo:e="default"}=st();if(t)return null;const n=LL[e];return x.jsx("div",{className:Ur.logo,children:x.jsx(n,{})})},xL=({className:t})=>{const{t:e}=jt("header"),{disableDelivery:n}=st(),r=ye(Th),i=We(Po);u.useEffect(()=>{i?ye.getState().setMode("location_delivery"):ye.getState().setMode("self_pickup")},[i]);const o=()=>{We.getState().setDeliverPoint(null),ye.getState().setMode("self_pickup")},s=()=>{We.getState().setDeliverPoint(null),ye.getState().setMode("location_delivery")},a=r==="self_pickup",l=r==="location_delivery";return x.jsxs("div",{className:be(Ur.root,t),children:[x.jsx(EL,{}),x.jsxs("nav",{className:Ur.nav,children:[!n&&x.jsx(Ot,{as:"link",className:Ur.navItem,variant:a?"primary":"secondary",onClick:o,children:e("self_pickup")}),!n&&x.jsx(Ot,{as:"link",className:Ur.navItem,variant:l?"primary":"secondary",onClick:s,children:e("courier_delivery")}),x.jsx(Bd,{})]})]})},CL=u.memo(xL),_L={open:!1},ur=bn(t=>({..._L,toggle(e){ye.getState().setDetailsOpen(!1),We.getState().setDeliverPoint(null),bt.getState().setSelectedLocation(null),t(n=>({open:e??!n.open}))}})),OL="Layout-module__root__qzPL-f",ML="Layout-module__headerHidden__JEN-d0",kL="Layout-module__sidebarHidden__x017O3",PL="Layout-module__sidebarOpen__IZnIjs",Ui={root:OL,headerHidden:ML,sidebarHidden:kL,sidebarOpen:PL},RL=({children:t})=>{const{hideFilters:e,hideHeader:n}=st(),r=ur(i=>i.open);return x.jsx("div",{className:be(Ui.root,{[Ui.sidebarOpen]:r,[Ui.headerHidden]:n,[Ui.sidebarHidden]:e}),children:t})},ja=()=>x.jsx(ya,{children:x.jsx(ri,{})}),TL=({children:t})=>{const e=zt(vg);return zt(ga)&&!e?x.jsx(ja,{}):x.jsx(x.Fragment,{children:t})};var Ud={},zo={},Vd={exports:{}},AL="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",DL=AL,IL=DL;function Fd(){}function zd(){}zd.resetWarningCache=Fd;var jL=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:zd,resetWarningCache:Fd};return n.PropTypes=n,n};Vd.exports=jL();var NL=Vd.exports,$o={},fr={};Object.defineProperty(fr,"__esModule",{value:!0});fr.loadGoogleMapScript=fr.isBrowser=void 0;var $d=typeof window<"u"&&window.document;fr.isBrowser=$d;var BL=function(e,n){if(!$d||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)})};fr.loadGoogleMapScript=BL;var Ho={};Object.defineProperty(Ho,"__esModule",{value:!0});Ho.GOOGLE_MAP_SCRIPT_BASE_URL=void 0;var UL="https://maps.googleapis.com/maps/api/js";Ho.GOOGLE_MAP_SCRIPT_BASE_URL=UL;function so(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?so=function(n){return typeof n}:so=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},so(t)}Object.defineProperty($o,"__esModule",{value:!0});$o.default=GL;var yt=FL(u),gs=fr,VL=Ho;function Hd(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(Hd=function(i){return i?n:e})(t)}function FL(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||so(t)!=="object"&&typeof t!="function")return{default:t};var n=Hd(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 nu(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 ru(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?nu(Object(n),!0).forEach(function(r){zL(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nu(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 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,y=l.bounds,p=$L(l,["types","componentRestrictions","fields","bounds"]),L=t.googleMapsScriptBaseUrl,w=L===void 0?VL.GOOGLE_MAP_SCRIPT_BASE_URL:L,g=t.language,b=(0,yt.useRef)(null),_=(0,yt.useRef)(null),E=(0,yt.useRef)(null),m=(0,yt.useRef)(null),S=g?"&language=".concat(g):"",C="".concat(w,"?libraries=").concat(o,"&key=").concat(r).concat(S),R=(0,yt.useCallback)(function(){return(0,gs.loadGoogleMapScript)(w,C)},[w,C]);return(0,yt.useEffect)(function(){var M=ru(ru({},p),{},{fields:v,types:f,bounds:y});if(d&&(M.componentRestrictions=d),!(E.current||!b.current||!gs.isBrowser)){e&&!e.current&&(e.current=b.current);var O=function(){var j;if(typeof google>"u")return console.error("Google has not been found. Make sure your provide apiKey prop.");if(!((j=google.maps)!==null&&j!==void 0&&j.places))return console.error("Google maps places API must be loaded.");if(!b.current instanceof HTMLInputElement)return console.error("Input ref must be HTMLInputElement.");E.current=new google.maps.places.Autocomplete(b.current,M),E.current&&(_.current=E.current.addListener("place_changed",function(){n&&E&&E.current&&n(E.current.getPlace(),b.current,E.current)}))};return r?R().then(function(){return O()}):O(),function(){return _.current?_.current.remove():void 0}}},[]),(0,yt.useEffect)(function(){var M;!(yt.default!==null&&yt.default!==void 0&&(M=yt.default.version)!==null&&M!==void 0&&M.startsWith("18"))&&gs.isBrowser&&window.MutationObserver&&b.current&&b.current instanceof HTMLInputElement&&(m.current=new MutationObserver(function(){m.current.disconnect(),b.current&&(b.current.autocomplete=a)}),m.current.observe(b.current,{attributes:!0,attributeFilter:["autocomplete"]}))},[a]),(0,yt.useEffect)(function(){E.current&&E.current.setFields(v)},[v]),(0,yt.useEffect)(function(){E.current&&E.current.setBounds(y)},[y]),(0,yt.useEffect)(function(){E.current&&E.current.setComponentRestrictions(d)},[d]),(0,yt.useEffect)(function(){E.current&&E.current.setOptions(p)},[p]),{ref:b,autocompleteRef:E}}function ao(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ao=function(n){return typeof n}:ao=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ao(t)}Object.defineProperty(zo,"__esModule",{value:!0});zo.default=void 0;var ia=WL(u),Ze=Gd(NL),ZL=Gd($o);function Gd(t){return t&&t.__esModule?t:{default:t}}function Zd(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(Zd=function(i){return i?n:e})(t)}function WL(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||ao(t)!=="object"&&typeof t!="function")return{default:t};var n=Zd(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 Oo(){return Oo=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},Oo.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 Wd(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,ZL.default)({ref:a,googleMapsScriptBaseUrl:s,onPlaceSelected:e,apiKey:n,libraries:r,inputAutocompleteValue:i,options:o,language:l}),d=f.ref;return ia.default.createElement("input",Oo({ref:d},c))}Wd.propTypes={apiKey:Ze.default.string,libraries:Ze.default.arrayOf(Ze.default.string),ref:Ze.default.oneOfType([Ze.default.func,Ze.default.shape({current:Ze.default.any})]),googleMapsScriptBaseUrl:Ze.default.string,onPlaceSelected:Ze.default.func,inputAutocompleteValue:Ze.default.string,options:Ze.default.shape({componentRestrictions:Ze.default.object,bounds:Ze.default.object,location:Ze.default.object,offset:Ze.default.number,origin:Ze.default.object,radius:Ze.default.number,sessionToken:Ze.default.object,types:Ze.default.arrayOf(Ze.default.string)}),language:Ze.default.string};var JL=(0,ia.forwardRef)(function(t,e){return ia.default.createElement(Wd,Oo({},t,{refProp:e}))});zo.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(zo),n=r($o);function r(i){return i&&i.__esModule?i:{default:i}}})(Ud);var qd=Ud;const YL="Aside-module__root__EotK2f",XL="Aside-module__open__Zwmbs5",QL="Aside-module__overlay__slLdHF",eE="Aside-module__container__28P4wq",Vi={root:YL,open:XL,overlay:QL,container:eE},tE=({children:t,className:e,open:n})=>x.jsxs("div",{className:be(Vi.root,e,{[Vi.open]:n}),children:[x.jsx("div",{className:Vi.overlay}),x.jsx("div",{className:Vi.container,children:t})]}),nE="Input-module__root__TF9IiD",rE="Input-module__endAdornment__m40K5R",iE="Input-module__input__505b7i",oE="Input-module__startAdornment__D-sJ0N",sE="Input-module__label__gmqtsf",aE="Input-module__inputContainer__vubIa-",Kn={root:nE,endAdornment:rE,input:iE,startAdornment:oE,label:sE,inputContainer:aE},Kd=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=jd(n,f);return x.jsxs("label",{htmlFor:a.id??c,className:be(Kn.root,t),children:[r&&x.jsx("span",{className:Kn.label,children:r}),x.jsxs("div",{className:Kn.inputContainer,children:[s&&x.jsx("div",{className:Kn.startAdornment,children:s}),x.jsx("input",{...a,ref:d,id:a.id??c,className:Kn.input,onChange:o,onBlur:i}),e&&x.jsx("div",{className:Kn.endAdornment,children:e})]})]})}),lE="LocationAside-module__submit__CSKcqi",cE="LocationAside-module__container__S1NejR",uE="LocationAside-module__selector__hl74ke",fE="LocationAside-module__label__0Zk8at",dE="LocationAside-module__header__N1wgyn",hE="LocationAside-module__close__VsE88z",Fi={submit:lE,container:cE,selector:uE,label:fE,header:dE,close:hE},pE=u.forwardRef((t,e)=>{const{t:n}=jt(["location_aside","common"]),r=Tn(aL),{country:i,hideCloseButtonOnLocationScreen:o,inputs:s,onCloseLocationSelector:a,onLocationSelect:l}=st(),c=u.useRef(null),[f,d]=u.useState("");u.useImperativeHandle(e,()=>({open:()=>Tn.getState().toggle(!0),close:()=>Tn.getState().toggle(!1)}),[]);const h=g=>{Tn.getState().toggle(!1),$t.getState().setPlace(g),l==null||l(g),g!=null&&g.formatted_address&&d(g==null?void 0:g.formatted_address)},v=()=>{Tn.getState().toggle(!1),a==null||a()},y=i?{componentRestrictions:{country:i}}:void 0,p=g=>{d(g.target.value)},{ref:L}=qd.usePlacesWidget({libraries:["places"],options:y,onPlaceSelected:h,apiKey:"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA",inputAutocompleteValue:f}),w=_o(s==null?void 0:s.city);return x.jsx(tE,{open:r,children:x.jsx("div",{ref:c,className:Fi.container,children:x.jsxs("div",{className:Fi.selector,children:[x.jsxs("div",{className:Fi.header,children:[x.jsx("div",{className:Fi.label,children:n("choose_city")}),!o&&x.jsx(ui,{position:"relative",onClick:v})]}),x.jsx(Kd,{...w,inputRef:L,value:f,placeholder:n("placeholder"),onChange:p})]})})})}),gE=u.memo(pE),vE=({children:t})=>{const{locale:e}=st(),n=u.useRef(e),{isLoaded:r}=iv({language:n.current,libraries:ih,googleMapsApiKey:"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA"});return r?x.jsx(x.Fragment,{children:t}):x.jsx(ja,{})},mE=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},ce.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"})),yE=({className:t})=>{const{t:e}=jt("location_selector"),{country:n,inputs:r,onLocationSelect:i}=st(),[o,s]=u.useState(""),[a,l]=u.useState(!1),c=[],f=n?{componentRestrictions:{country:n},types:c}:{types:c},d=g=>{$t.getState().setPlace(g),i==null||i(g)},{ref:h}=qd.usePlacesWidget({libraries:["places"],options:f,onPlaceSelected:d,inputAutocompleteValue:o}),v=g=>{a&&ye.getState().setBlurred(!!g.target.value),s(g.target.value)},y=()=>{o&&ye.getState().setBlurred(!0),ye.getState().setDetailsOpen(!1),We.getState().setDeliverPoint(null),bt.getState().setSelectedLocation(null),l(!0)},p=()=>{ye.getState().setBlurred(!1),l(!1)},L=g=>{g.key==="Enter"&&g.preventDefault()},w=_o(r==null?void 0:r.address);return x.jsx(Kd,{...w,inputRef:h,value:o,className:t,endAdornment:x.jsx(mE,{}),placeholder:e("placeholder"),onChange:v,onFocus:y,onBlur:p,onKeyDown:L})},bE=({className:t})=>ye(Ih)?x.jsx(yE,{className:t}):null,wE=u.memo(bE),SE="DeliveryDetailsModal-module__root__qwKnjX",LE={root:SE},EE=({className:t,location:e,onClose:n,onSubmit:r})=>x.jsx("div",{className:be(LE.root,t),children:x.jsx(kd,{location:e,onClose:n,onSubmit:r})}),xE="LocationDetailsModal-module__root__PyRnLM",CE={root:xE},_E=({className:t,location:e,onClose:n,onSubmit:r})=>{const i=()=>{r==null||r(e)};return x.jsx("div",{className:be(CE.root,t),children:x.jsx(_f,{location:e,onClose:n,onSubmit:i})})},OE="MapContainer-module__root__1Os6Q-",ME="MapContainer-module__mapWrapper__Cwe7qC",kE="MapContainer-module__wrapperBlurred__04NN2L",PE="MapContainer-module__locationSelector__Pr1zS-",RE="MapContainer-module__filterButton__CW3Qv7",TE="MapContainer-module__sidebarOpen__lGMVrJ",AE="MapContainer-module__filterIcon__T01XsJ",DE="MapContainer-module__details__gM8LWX",Ft={root:OE,mapWrapper:ME,wrapperBlurred:kE,locationSelector:PE,filterButton:RE,sidebarOpen:TE,filterIcon:AE,details:DE},IE=()=>{const{onPointClick:t}=st(),e=ye(sa),n=bt(Bh),r=We(Po),i=u.useCallback(()=>{ye.getState().setDetailsOpen(!1)},[]),o=u.useCallback(s=>{t==null||t(s),ye.getState().setDetailsOpen(!1),bt.getState().setSelectedLocation(null),We.getState().setDeliverPoint(null)},[t]);return x.jsxs(x.Fragment,{children:[(r==null?void 0:r.address)&&e&&x.jsx(EE,{location:r,className:Ft.details,onClose:i,onSubmit:o}),n&&e&&x.jsx(_E,{location:n,className:Ft.details,onClose:i,onSubmit:o})]})},jE=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:60,height:40,fill:"none",viewBox:"0 0 60 40",...t},ce.createElement("path",{d:"M0 0h52a8 8 0 0 1 8 8v24a8 8 0 0 1-8 8H0V0Z"}),ce.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"})),NE=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:28,height:28,fill:"none",viewBox:"0 0 28 28",...t},ce.createElement("rect",{width:28,height:28,fill:"#333",rx:4}),ce.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"})),BE=()=>{const t=ur(i=>i.open),e=ur(i=>i.toggle),n=hi("screenSm"),r=()=>{e(!0)};return x.jsxs("div",{role:"presentation",className:be(Ft.filterButton,{[Ft.sidebarOpen]:t}),onClick:n?void 0:r,children:[n&&x.jsx(Bd,{}),n?x.jsx(NE,{className:Ft.filterIcon,onClick:r}):x.jsx(jE,{className:Ft.filterIcon})]})},UE=({children:t,className:e})=>{const{hideFilters:n,hideSearchInput:r}=st(),i=ye(Dh),o=ye(sa);return x.jsxs("div",{className:be(Ft.root,e),children:[!r&&!o&&x.jsx(wE,{className:Ft.locationSelector}),!n&&x.jsx(BE,{}),x.jsx("div",{className:be(Ft.mapWrapper,{[Ft.wrapperBlurred]:i}),children:t}),x.jsx(IE,{})]})},VE=u.memo(UE),FE="Separator-module__root__eQtZey",zE={root:FE},vs=({className:t,...e})=>x.jsx("hr",{className:be(zE.root,t),...e}),$E="Sidebar-module__root__4j1MA3",HE="Sidebar-module__closeButton__HLXy1c",GE="Sidebar-module__open__mqQXF6",ZE="Sidebar-module__header__Afp6uz",WE="Sidebar-module__typeFilter__GN46u9",qE="Sidebar-module__separator__6I4QoJ",KE="Sidebar-module__withRightPadding__2u1Ina",JE="Sidebar-module__sheetContent__SaoncI",YE="Sidebar-module__doneButton__4aeaSD",Yt={root:$E,closeButton:HE,open:GE,header:ZE,typeFilter:WE,separator:qE,withRightPadding:KE,sheetContent:JE,doneButton:YE},XE=()=>{const{t}=jt("common"),e=hi("screenSm"),n=ur(i=>i.toggle),r=()=>{n(!1)};return x.jsxs("div",{className:Yt.header,children:[e&&x.jsx("div",{role:"presentation",className:Yt.doneButton,onClick:r,children:t("done")}),!e&&x.jsx(ui,{className:Yt.closeButton,onClick:r})]})},QE="Radio-module__root__7ElY2W",ex="Radio-module__label__c-sYW3",iu={root:QE,label:ex},tx=({className:t,label:e,labelProps:n={},...r})=>{const i=u.useId(),{className:o,...s}=n;return x.jsxs("label",{htmlFor:i,className:be(iu.label,o),...s,children:[x.jsx("input",{id:i,type:"radio",className:be(iu.root,t),...r}),e]})},rr=t=>x.jsx(tx,{...t,type:"checkbox"}),nx="RadioGroup-module__root__ewZw-x",rx="RadioGroup-module__body__k8BJAs",ix="RadioGroup-module__legend__tcfV7q",ms={root:nx,body:rx,legend:ix},Jd=({children:t,className:e,label:n,onChange:r,value:i,...o})=>x.jsxs("div",{className:be(ms.root,e),...o,children:[n&&x.jsx("span",{className:ms.legend,children:n}),x.jsx("div",{className:ms.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)})]}),ox=({className:t,onChange:e})=>{const{t:n}=jt("receive_filter"),r=Qt(zh);return x.jsxs(Jd,{value:r,label:n("title"),className:t,onChange:e,children:[x.jsx(rr,{name:"receive",value:Dt.DressingRoom,label:n("dressing_room")}),x.jsx(rr,{name:"receive",value:Dt.CheckOrder,label:n("check_order")}),x.jsx(rr,{name:"receive",value:Dt.PayByCash,label:n("pay_by_cash")})]})},sx=u.memo(ox),ax=({className:t,onChange:e})=>{const{t:n}=jt("send_filter"),r=Qt(Fh);return x.jsxs(Jd,{className:t,value:r,label:n("title"),onChange:e,children:[x.jsx(rr,{name:"send",value:It.Return,label:n("sending_returns")}),x.jsx(rr,{name:"send",value:It.Shipping,label:n("shipping")}),x.jsx(rr,{name:"send",value:It.Payment,label:n("payment")})]})},lx=u.memo(ax),cx="TypeFilter-module__root__WH5EQV",ux="TypeFilter-module__button__f0mSfo",zi={root:cx,button:ux},fx=({className:t,onChange:e,value:n})=>{const{t:r}=jt("type_filter"),i=o=>()=>e==null?void 0:e(o);return x.jsxs("div",{className:be(zi.root,t),children:[x.jsx(Ot,{className:zi.button,variant:n===Kt.All?"primary":"secondary",onClick:i(Kt.All),children:r("all")}),x.jsx(Ot,{className:zi.button,variant:n===Kt.PostOffice?"primary":"secondary",onClick:i(Kt.PostOffice),children:r("post_office")}),x.jsx(Ot,{className:zi.button,variant:n===Kt.PickPoint?"primary":"secondary",onClick:i(Kt.PickPoint),children:r("pick_point")})]})},dx=({className:t,onChange:e})=>{const n=Qt(Vh);return x.jsx(fx,{value:n,className:t,onChange:e})},hx=u.memo(dx),px=({className:t})=>{const e=hi("screenSm"),n=ur(l=>l.open),r=u.useCallback(l=>Qt.getState().setFilter({type:l}),[]),i=u.useCallback(l=>Qt.getState().setFilter({send:l}),[]),o=u.useCallback(l=>Qt.getState().setFilter({receive:l}),[]),s=u.useCallback(()=>ur.getState().toggle(!1),[]),a=x.jsxs(x.Fragment,{children:[x.jsx(XE,{}),x.jsxs("div",{className:Yt.withRightPadding,children:[x.jsx(hx,{className:Yt.typeFilter,onChange:r}),x.jsx(vs,{className:Yt.separator}),x.jsx(sx,{onChange:o}),x.jsx(vs,{}),x.jsx(lx,{onChange:i}),x.jsx(vs,{})]})]});return e?x.jsx(Cd,{initialFocusRef:!1,open:n,snapPoints:({maxHeight:l})=>l-_d,onDismiss:s,children:x.jsx("div",{className:Yt.sheetContent,children:a})}):x.jsx("div",{className:be(Yt.root,t,{[Yt.open]:n}),children:a})},gx="App-module__map__Kf-2JS",vx="App-module__sidebar__ORIzGk",mx="App-module__header__bgP9DA",ys={map:gx,sidebar:vx,header:mx};fo.setApiKey("AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA");const yx=({config:t,options:e})=>{const n=Rg(t),{INN:r,hideFilters:i,hideHeader:o,map:s}=n;mn(r,"INN is required"),Tg(r,e),mn(s==null?void 0:s.provider,"Map provider is required");const a=W1(s.provider);return mg(),x.jsx(cu.Provider,{value:n,children:x.jsx(uL,{children:x.jsx(cL,{children:x.jsx(sy,{tolgee:Nd,fallback:x.jsx(ja,{}),children:x.jsx(vE,{children:x.jsx(TL,{children:x.jsxs(RL,{children:[!o&&x.jsx(CL,{className:ys.header}),!i&&x.jsx(px,{className:ys.sidebar}),x.jsx(VE,{className:ys.map,children:x.jsx(a,{})}),x.jsx(gE,{})]})})})})})})})},Yd=async t=>ni.request({baseURL:"https://api.geo-data.omnic.solutions/api/1.0/",method:"POST",url:"normalize/address",data:t,headers:{Authorization:"Token 9877f9631b2e30570cc1c5aa8c740b0c912efe99a8b6c45c21cf4bd394adc7e9"}});exports.EReceiveFilter=Dt;exports.ESendFilter=It;exports.ETypeFilter=Kt;exports.Widget=yx;exports.createPointsIterator=_s;exports.fetchPointsRequest=Cs;exports.fromHoursMinutesToMinutes=$h;exports.fromMinutesToHoursMinutes=Hh;exports.getAddressFromLatLng=sr;exports.getBoundsFromPoint=Gh;exports.getCurrentPosition=ha;exports.getNormalizedAddress=Yd;exports.getPropertyValue=pa;exports.isDeliveryPoint=pg;exports.isHttpSuccess=Vu;exports.replaceSvgCurrentColor=xt;exports.setWidgetCSSProperty=jo;exports.stopImmediatePropagation=Os;exports.svgStringToBase64URL=Jt;
|