@omnic/widget-locations 1.1.77 → 1.1.78

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.
@@ -226,4 +226,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
226
226
  <circle cx="120" cy="120" opacity=".3" r="90" />
227
227
  <circle cx="120" cy="120" opacity=".2" r="110" />
228
228
  <text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${e}</text>
229
- </svg>`,a=`Cluster of ${e} markers`,c=Number(google.maps.Marker.MAX_ZINDEX)+e;if(ze.isAdvancedMarkerAvailable(i)){const d=new DOMParser().parseFromString(o,"image/svg+xml").documentElement;d.setAttribute("transform","translate(0 25)");const f={map:i,position:n,zIndex:c,title:a,content:d};return new google.maps.marker.AdvancedMarkerElement(f)}const l={position:n,zIndex:c,title:a,icon:{url:`data:image/svg+xml;base64,${btoa(o)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(l)}}function d5(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class Pc{constructor(){d5(Pc,google.maps.OverlayView)}}var bn;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click",t.GMP_CLICK="gmp-click"})(bn||(bn={}));const f5=(t,e,n)=>{e.bounds&&n.fitBounds(e.bounds)};class h5 extends Pc{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new c5(r),renderer:s=new u5,onClusterClick:o=f5}){super(),this.map=null,this.idleListener=null,this.markers=[...n],this.clusters=[],this.algorithm=i,this.renderer=s,this.onClusterClick=o,e&&this.setMap(e)}addMarker(e,n){this.markers.includes(e)||(this.markers.push(e),n||this.render())}addMarkers(e,n){e.forEach(r=>{this.addMarker(r,!0)}),n||this.render()}removeMarker(e,n){const r=this.markers.indexOf(e);return r===-1?!1:(ze.setMap(e,null),this.markers.splice(r,1),n||this.render(),!0)}removeMarkers(e,n){let r=!1;return e.forEach(i=>{r=this.removeMarker(i,!0)||r}),r&&!n&&this.render(),r}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,bn.CLUSTERING_BEGIN,this);const{clusters:n,changed:r}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(r||r==null){const i=new Set;for(const o of n)o.markers.length==1&&i.add(o.markers[0]);const s=[];for(const o of this.clusters)o.marker!=null&&(o.markers.length==1?i.has(o.marker)||ze.setMap(o.marker,null):s.push(o.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>s.forEach(o=>ze.setMap(o,null)))}google.maps.event.trigger(this,bn.CLUSTERING_END,this)}}onAdd(){const e=this.getMap();Xa(e),this.idleListener=e.addListener("idle",this.render.bind(this)),this.render()}onRemove(){this.idleListener&&google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>ze.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new l5(this.markers,this.clusters),n=this.getMap();this.clusters.forEach(r=>{if(r.markers.length===1)r.marker=r.markers[0];else if(r.marker=this.renderer.render(r,e,n),r.markers.forEach(i=>ze.setMap(i,null)),this.onClusterClick){const i=ze.isAdvancedMarker(r.marker)?bn.GMP_CLICK:bn.CLUSTER_CLICK;r.marker.addListener(i,s=>{google.maps.event.trigger(this,bn.CLUSTER_CLICK,r),this.onClusterClick(s,r,n)})}ze.setMap(r.marker,n)})}}const p5="LocationBalloon-module__root__GtUl6q",m5="LocationBalloon-module__submit__lNcF4k",g5="LocationBalloon-module__details__--VOKk",v5="LocationBalloon-module__icon__X7DOVA",y5="LocationBalloon-module__header__5VQJDW",b5="LocationBalloon-module__titleContainer__BAO73U",w5="LocationBalloon-module__title__bX9pf8",S5="LocationBalloon-module__description__htav7b",_5="LocationBalloon-module__actions__c8dlOR",C5="LocationBalloon-module__close__7Ujvya",bt={root:p5,submit:m5,details:g5,icon:v5,header:y5,titleContainer:b5,title:w5,description:S5,actions:_5,close:C5},E5={default:Zd,llama:Kd},x5=({SSR:t,className:e,hideDetails:n,location:r,location_name:i,name:s,onCloseClick:o,onDetails:a,onSubmit:c})=>{var h;const{logo:l="default"}=be(),{isLoading:u,lmsData:d}=mo(),f=(h=d==null?void 0:d.location)==null?void 0:h.what3words,v=!!(f!=null&&f.id),m=E5[l];return w.jsxs("div",{className:K(bt.root,e),children:[w.jsxs("div",{className:bt.header,children:[w.jsxs("div",{className:bt.titleContainer,children:[u?w.jsx(Ze,{circle:!0,width:40,height:40}):w.jsx("div",{className:bt.icon,children:w.jsx(m,{})}),u?w.jsx(Ze,{width:200}):w.jsx("span",{className:bt.title,children:s||"{{ properties.point.name }}"})]}),w.jsx("div",{className:bt.close,children:w.jsx(Ar,{position:"relative",onClick:o})})]}),w.jsxs("div",{className:bt.description,children:[u?w.jsx(Ze,{width:300}):(r==null?void 0:r.full_address)||"{{ properties.point.location.full_address }}"," ",u?w.jsx(Ze,{width:300}):i||"{{ properties.point.location_name }}"]}),u?w.jsx(Ze,{width:150}):v&&w.jsx(lf,{what3words:f}),w.jsxs("div",{className:bt.actions,children:[w.jsx(rt,{id:Xh,variant:"primary",className:bt.submit,disabled:u,onClick:c,children:t?"{ choose }":w.jsx(It,{keyName:"choose",ns:"common"})}),!n&&w.jsxs(rt,{id:Ku,as:"link",variant:"primary",className:bt.details,disabled:u,onClick:a,children:[t?"{ details }":w.jsx(It,{keyName:"details",ns:"common"}),w.jsx(_c,{})]})]})]})},O5=({handleCloseClick:t,handleDetailsClick:e,handlePointClick:n,handleSubmitClick:r,point:i,setMarkerRef:s})=>{const[o,a]=p.useState(!1),{hideDetails:c,iconType:l,palette:u}=be(),d=p.useRef(null),{closeSamePoints:f}=Pt(),v=it(O=>O.location),m=(u==null?void 0:u.primary)||"#fc0",h=l==="omni-llama"?We.PinLlama:We.PinOmnic,S=!!i&&(v==null?void 0:v.uid)===i.uid,b=Nn("screenSm"),{isIdle:C}=Z(),y=dc({isSelectedPoint:S}),E=C&&S&&y&&o;p.useEffect(()=>{d.current&&a(d.current.checkVisibility()??!1)},[i]);const x=p.useMemo(()=>{let O;if(i.type===30)switch(l){case"omni-llama":{S?O=We.PinLlamaSelected:O=We.PinLlama;break}case"we-chip":{S?O=We.PinWeChipSelected:O=We.PinWeChip;break}default:{S?O=We.PinOmnicSelected:O=rr(h,m);break}}else S?O=rr(We.PinPvz,"--owl-color-black"):O=rr(We.PinPvz,"--owl-color-grey-80");return Ot(O,"Icon url is not defined"),O},[i.type,S,l,h,m]),g=p.useMemo(()=>({lat:i.location.latitude,lng:i.location.longitude}),[i.location.latitude,i.location.longitude]),_=()=>{f(),n(i)};return w.jsxs(w.Fragment,{children:[w.jsx(Gd,{ref:O=>{d.current=O,s(O)},position:g,zIndex:S?9999:void 0,onClick:_,children:w.jsx("span",{dangerouslySetInnerHTML:{__html:x}})},i.uid),E&&!b&&w.jsx(Wd,{anchor:d.current||void 0,onCloseClick:t,children:w.jsx(x5,{...i,hideDetails:c,className:Le.balloon,onCloseClick:t,onSubmit:()=>r(i),onDetails:()=>e(i)})})]})},T5=({handleCloseClick:t,points:e,...n})=>{const{setSamePoints:r}=Pt(),{onSamePointsClusterClick:i}=be(),s=ji(),o=p.useMemo(()=>(v,m)=>{if(!m)return;t();const h=m.markers??[],S=h.map(E=>{const x=E.position;if(!x)return{lat:NaN,lng:NaN};const g=typeof x.lat=="number"?x.lat:x.lat(),_=typeof x.lng=="number"?x.lng:x.lng();return{lat:g,lng:_}});if(!S.length)return;const{lat:b,lng:C}=S[0];if(S.every(E=>E.lat===b&&E.lng===C)){const E=e.filter(({location:{latitude:x,longitude:g}})=>x===b&&g===C);r(E),i==null||i(E);return}if(s instanceof google.maps.Map){const E=new google.maps.LatLngBounds;for(const x of h){const g=x.position;if(!g)continue;const _=(typeof g.lat=="number",g);E.extend(_)}s.fitBounds(E,150)}},[s,e,t,i,r]),a=p.useMemo(()=>({render:({count:v,position:m})=>{const h=document.createElement("div");return h.className=Le.cluster,h.innerHTML=`<span class="${Le.number}">${v}</span>`,new google.maps.marker.AdvancedMarkerElement({position:m,content:h,zIndex:v})}}),[]),c=p.useRef(new h5({renderer:a,map:null,onClusterClick:o})),l=p.useRef([]),[u,d]=p.useState([]);p.useEffect(()=>{d([]),c.current.clearMarkers()},[e,s]),p.useEffect(()=>{c.current.setMap(null),s&&c.current.setMap(s)},[s]),p.useEffect(()=>{!s||!u.length||c.current.addMarkers(u)},[u,s]);function f(v){u.length||d(v)}return w.jsx(w.Fragment,{children:e.map((v,m)=>{const h=m===0,S=m===e.length-1;return h&&(l.current=[]),w.jsx(O5,{point:v,handleCloseClick:t,setMarkerRef:b=>{b&&(l.current.push(b),S&&f([...l.current]))},...n},v.uid)})})},P5=p.memo(T5),A5=t=>{const e=Pt(dm);return w.jsx(P5,{points:e,...t})},R5=p.memo(A5),Th=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:42,height:42,fill:"none",viewBox:"0 0 42 42",...t},N.createElement("rect",{width:42,height:42,fill:"#fff",rx:21}),N.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M31.003 28V17.766a3 3 0 0 0-1.579-2.643l-7.003-3.765a3 3 0 0 0-2.842 0l-7.003 3.765a3 3 0 0 0-1.58 2.643V28a3 3 0 0 0 3 3h14.008a3 3 0 0 0 3-3Zm-5.919 1h2.92a1 1 0 0 0 1-1V17.766a1 1 0 0 0-.527-.881l-7.003-3.766a1 1 0 0 0-.948 0l-7.003 3.766a1 1 0 0 0-.527.88v10.237a1 1 0 0 0 1 1h2.92a2.513 2.513 0 0 1-.05-.5v-7.606a2.5 2.5 0 0 1 2.5-2.5h3.268a2.5 2.5 0 0 1 2.5 2.5V28.5c0 .171-.017.338-.05.5Zm-2.426 0a.5.5 0 0 0 .476-.499v-7.606a.5.5 0 0 0-.5-.5h-3.269a.5.5 0 0 0-.5.5V28.5a.5.5 0 0 0 .476.5h3.317Z",clipRule:"evenodd"}),N.createElement("rect",{width:41,height:41,x:.5,y:.5,stroke:"#1D3665",strokeOpacity:.1,rx:20.5})),L5="DeliveryBalloon-module__root__Nu90iy",k5="DeliveryBalloon-module__details__eqUTaI",M5="DeliveryBalloon-module__wh__1lJtLN",D5="DeliveryBalloon-module__header__JVdyxN",j5="DeliveryBalloon-module__title__-zKKCt",N5="DeliveryBalloon-module__description__no5-ki",I5="DeliveryBalloon-module__actions__C-N0H-",F5="DeliveryBalloon-module__errorVariant__e6uhZl",B5="DeliveryBalloon-module__logo__62gC5h",Dt={root:L5,details:k5,wh:M5,header:D5,title:j5,description:N5,actions:I5,errorVariant:F5,logo:B5},V5=({SSR:t,address:e,className:n,hasCloseButton:r,hideDetails:i,onClose:s,onDetails:o,variant:a})=>{const{onWarehouseSelect:c,warehouseSelection:l}=be(),{setWarehousePoint:u,warehousePoint:d}=Re(),f=a==="error",v=a==="default",m=function(){return l?t?"{ courier_balloon.warehouse_title }":w.jsx(It,{keyName:"warehouse_title",ns:"courier_balloon"}):t?"{ courier_balloon.title }":w.jsx(It,{keyName:"title",ns:"courier_balloon"})}(),h=t?"{ courier_balloon.error_title }":w.jsx(It,{keyName:"error_title",ns:"courier_balloon"}),S=t?"{ courier_balloon.error_description }":w.jsx(It,{keyName:"error_description",ns:"courier_balloon"});function b(){d&&(c==null||c(d),u(null))}const{label:C,onClick:y}=l?{onClick:b,label:t?"{ select }":w.jsx(It,{keyName:"select",ns:"common"})}:{onClick:o,label:t?"{ details }":w.jsx(It,{keyName:"details",ns:"common"})};return w.jsxs("div",{className:K(Dt.root,n,Dt[`${a}Variant`]),children:[w.jsxs("div",{className:Dt.header,children:[w.jsx(Th,{className:Dt.logo}),w.jsx("span",{className:Dt.title,children:f?h:m}),r&&w.jsx(Ar,{onClick:s})]}),w.jsx("div",{className:Dt.description,children:f?S:e||"{{ properties.address }}"}),v&&(!i||l)&&w.jsx("div",{className:Dt.actions,children:w.jsx(rt,{id:Ku,as:"button",variant:"primary",className:K(Dt.details,l?Dt.wh:""),onClick:y,children:C})})]})},H5="Chip-module__root__zsoSyP",U5="Chip-module__active__BlTSFB",ku={root:H5,active:U5},Mu=({active:t,children:e,className:n,...r})=>w.jsx("div",{...r,className:K(ku.root,n,{[ku.active]:t}),children:e}),$5="TextArea-module__root__8YFknR",z5={root:$5},Du=p.forwardRef(({className:t,inputRef:e,onBlur:n,onChange:r,onFocus:i,...s},o)=>{const a=p.useRef(null);p.useImperativeHandle(o,()=>({focus:()=>{var l,u;(l=a.current)==null||l.focus(),i&&i({target:{value:(u=a.current)==null?void 0:u.value}})},blur:()=>{var l,u;(l=a.current)==null||l.blur(),n&&n({target:{value:(u=a.current)==null?void 0:u.value}})},setValue:l=>{r&&r({target:{value:l}}),a.current&&(a.current.value=l)}}),[n,r,i]);const c=Rh(e,a);return w.jsx("textarea",{...s,ref:c,className:K(z5.root,t),onBlur:n,onFocus:i,onChange:r})}),q5=({hideDeliveryTime:t,set:e})=>(n,r)=>{let i={...n};switch(r.type){case"SET_COMMENT":{i={...n,comment:r.payload};break}case"SET_DELIVERY_TIME":{i={...n,delivery_time:r.payload};break}case"SET_APARTMENT_NUMBER":{i={...n,apartment_number:r.payload};break}}return i.meta={...i.meta,valid:(t||!!i.delivery_time)&&!!i.apartment_number},e==null||e(i),i},G5="DeliveryDetailsView-module__title__azeoUr",W5="DeliveryDetailsView-module__logo__4zZtpM",Z5="DeliveryDetailsView-module__header__oDE9He",K5="DeliveryDetailsView-module__content__6P27SY",Q5="DeliveryDetailsView-module__section__2M3Qip",J5="DeliveryDetailsView-module__chips__KmYgha",X5="DeliveryDetailsView-module__actions__43XZ-V",Y5="DeliveryDetailsView-module__submit__58LKBw",e6="DeliveryDetailsView-module__actionsHidden__SW-67b",t6="DeliveryDetailsView-module__commentSection__GlX1A2",n6="DeliveryDetailsView-module__comment__2pGG6h",He={title:G5,logo:W5,header:Z5,content:K5,section:Q5,chips:J5,actions:X5,submit:Y5,actionsHidden:e6,commentSection:t6,comment:n6},r6=p.forwardRef(({classes:t,hideActions:e,location:n,onChange:r,onClose:i,onSubmit:s},o)=>{var g;const{hideDeliveryTime:a,inputs:c,locale:l}=be(),{t:u}=mt(["details_modal","courier_balloon","common"]),d=p.useMemo(()=>q5({set:r,hideDeliveryTime:a}),[a,r]),[f,v]=p.useState(!1),[m,h]=p.useReducer(d,{comment:"",delivery_time:"",apartment_number:"",...n}),S=p.useCallback(async()=>{v(!0);try{Ot(n.address,"Address is required");const _=await Ih({address:n.address,algorithm:10,service:10,language:l||Qu});if(!Od(_))return;const O=_==null?void 0:_.data.data,P={...m,address:O};return s==null||s(P),P}finally{v(!1)}},[l,n.address,s,m]);p.useImperativeHandle(o,()=>({submit:S}),[S]);const b=_=>()=>{h({payload:_,type:"SET_DELIVERY_TIME"})},C=_=>{h({payload:_.target.value,type:"SET_APARTMENT_NUMBER"})},y=_=>{h({payload:_.target.value,type:"SET_COMMENT"})},E=so(c==null?void 0:c.apartment),x=so(c==null?void 0:c.comment);return w.jsxs(w.Fragment,{children:[w.jsxs("div",{className:K(He.header,t==null?void 0:t.header),children:[w.jsx(Ar,{onClick:i}),w.jsxs("div",{className:He.title,children:[w.jsx(Th,{className:He.logo}),w.jsx("span",{children:u("title",{ns:"courier_balloon"})})]})]}),w.jsxs("div",{className:K(He.content,t==null?void 0:t.content),children:[w.jsxs("section",{className:He.section,children:[w.jsxs("span",{children:[u("address"),":"]}),w.jsx("p",{children:n.address})]}),!a&&w.jsxs("section",{className:He.section,children:[w.jsxs("span",{children:[u("delivery_time"),":"]}),w.jsxs("div",{className:He.chips,children:[w.jsx(Mu,{active:m.delivery_time==="8:00-13:00",onClick:b("8:00-13:00"),children:"8:00 - 13:00"}),w.jsx(Mu,{active:m.delivery_time==="14:00-22:00",onClick:b("14:00-22:00"),children:"14:00 - 22:00"})]})]}),w.jsxs("section",{className:He.section,children:[w.jsxs("span",{children:[u("apartment_number"),":"]}),w.jsx(Du,{...E,rows:1,onChange:C})]}),w.jsxs("section",{className:K(He.section,He.commentSection),children:[w.jsxs("span",{children:[u("comment"),":"]}),w.jsx(Du,{...x,className:He.comment,onChange:y})]})]}),w.jsx("div",{className:K(He.actions,{[He.actionsHidden]:e}),children:w.jsx(rt,{loading:f,disabled:!((g=m.meta)!=null&&g.valid)||f,variant:"primary",className:He.submit,onClick:S,children:u("choose",{ns:"common"})})})]})}),Ph=p.memo(r6),i6={header:Le.deliveryDetailsViewHeader,content:Le.deliveryDetailsViewContent},s6=({hideDeliveryTime:t,hideDetails:e,onPointClick:n,point:r,setDeliveryPoint:i,setOpenDetails:s})=>{var L;const[o,a]=p.useState(!1),[c,l]=p.useState(!1),[u,d]=p.useState({...r,comment:"",delivery_time:"",apartment_number:""}),f=p.useRef(null),v=p.useRef(null),{warehouseSelection:m}=be(),{warehousePoint:h}=Re(),S=dc({isSelectedPoint:!0}),b=((L=f.current)==null?void 0:L.checkVisibility())??!1;p.useEffect(()=>{setTimeout(()=>{a(!0)},100)},[]),p.useEffect(()=>{d({...r,comment:"",delivery_time:"",apartment_number:""})},[r]);const C=Nn("screenSm"),y=p.useMemo(()=>({lat:u.coords[0],lng:u.coords[1]}),[u.coords]),E=()=>{s==null||s(!0)},x=()=>{i==null||i(null)},g=p.useMemo(()=>rr(We.PinHome,"--owl-color-success"),[]),_=async()=>{var A;try{l(!0);const D=await((A=v.current)==null?void 0:A.submit());if(!D)return;n==null||n(D),s==null||s(!1),i==null||i(null)}finally{l(!1)}},O=w.jsx(V5,{...u,hideDetails:e,hasCloseButton:C,variant:u.address?"default":"error",className:Le.balloon,onDetails:E,onClose:x}),P=m?!!h&&b:S&&!b,R=t?!!u.apartment_number:!!u.apartment_number&&!!u.delivery_time;return w.jsxs(w.Fragment,{children:[w.jsx(Gd,{ref:f,position:y,children:w.jsx("span",{dangerouslySetInnerHTML:{__html:g}})}),C&&w.jsxs(lh,{minSnapHeight:u.address?200:void 0,submitDisabled:!R||c,submitLoading:c,hideFooter:!u.address,open:P,onDismiss:x,onSubmitClick:_,children:[u.address&&w.jsx(Ph,{ref:v,hideActions:!0,classes:i6,location:r,onChange:d,onClose:x}),u.address?null:O]}),!C&&P&&w.jsx(Wd,{anchor:f.current||void 0,onCloseClick:x,children:O})]})},Ac=()=>w.jsx(uh,{children:w.jsx(qs,{})});async function o6(){return(await _e.request({method:"GET",baseURL:"https://api.geo-data.omnic.solutions/api/1.0/",url:"/key-data",headers:{Authorization:"Token fa812020-3197-401a-9b39-345999046111"}})).data.data}function a6(t){return _h({queryKey:["wl-map-key-wl"],queryFn:()=>o6(),refetchOnWindowFocus:!1,retry:2,enabled:t})}const Ah=p.createContext(null),c6=({children:t})=>{const{gMapId:e,gMapKey:n,mapTheme:r}=be(),i=!n||!e,{data:s,isFetching:o}=a6(i),a=s==null?void 0:s.key;function c(){var f,v,m;switch(r){case"omnic":return(f=s==null?void 0:s.additional_data)==null?void 0:f.map_id_omnic;case"llama":return(v=s==null?void 0:s.additional_data)==null?void 0:v.map_id_llama;case"chip":return(m=s==null?void 0:s.additional_data)==null?void 0:m.map_id_chip;default:return"e130cd87a3f1b9cbe3cb5de4"}}const l=n||a||"AIzaSyDsI0AO8VsUrTPoyR9fF7T31FKx1a9TLO0",u=e||c(),d=p.useMemo(()=>({mapKey:l,mapId:u}),[u,l]);return w.jsx(Ah.Provider,{value:d,children:o?w.jsx(Ac,{}):t})},Rc=()=>{const t=p.useContext(Ah);if(!t)throw new Error("useMapKeyContext must be used within a MapKeyProvider");return t},l6={place:null,mapKey:""},u6=t=>{var e,n;return(n=(e=t.place)==null?void 0:e.address_components)==null?void 0:n.find(r=>r.types.includes("locality"))},Bi=Ht((t,e)=>({...l6,setMapKey(n){t({mapKey:n})},async setPlace(n,r,i){var c,l,u,d,f,v;const{map:s}=Z.getState();let o,a;if(console.debug("[OmnicWidgetLocations::setDeliveryAdressPlace]",{value:n,types:r}),la(n)){const m=await ua(n,e().mapKey,r);o=(c=m==null?void 0:m.results)==null?void 0:c[0],i&&(o=(l=m==null?void 0:m.results)==null?void 0:l.find(h=>{var S;return(S=h.types)==null?void 0:S.includes(i)}))}else if(o=n,o!=null&&o.place_id){const{results:m}=await ua(o.place_id,e().mapKey);a=(d=(u=m==null?void 0:m[0])==null?void 0:u.geometry)==null?void 0:d.viewport}else(f=o==null?void 0:o.geometry)!=null&&f.viewport?a=o.geometry.viewport:(v=o==null?void 0:o.geometry)!=null&&v.location&&(a=new google.maps.LatLngBounds,a.extend(o.geometry.location));return a&&(console.debug("[OmnicWidgetLocations::fitMapBounds]",a.toJSON()),s==null||s.fitBounds(a)),Ot(o,"Place is not defined"),t({place:o}),o},async setPlaceAndPoint(n,r){var l;const i=r==null?void 0:r.types,s=la(n)?await e().setPlace(n,i):await e().setPlace(n),o=(l=s.geometry)==null?void 0:l.location;Ot(o,"Location is not defined");const a=[o.lat(),o.lng()],c={address:s.formatted_address,coords:a};return r!=null&&r.warehouseSelection&&Re.getState().setWarehousePoint({...s,coords:{lat:o.lat(),lng:o.lng()}}),(!(r!=null&&r.ignoreSelection)||r!=null&&r.warehouseSelection)&&Re.getState().setDeliverPoint(c),s},setPlaceSimple(n,r){var i,s;if(r!=null&&r.withNavigation){const{map:o}=Z.getState();Ot(o,"Map is not defined");let a;(i=n==null?void 0:n.geometry)!=null&&i.viewport?a=n.geometry.viewport:(s=n==null?void 0:n.geometry)!=null&&s.location&&(a=new google.maps.LatLngBounds,a.extend(n.geometry.location)),a&&(o.fitBounds(a),o.setZoom(12))}t({place:n})}})),d6=({children:t,className:e,...n})=>{const{disableDelivery:r,map:i,warehouseSelection:s}=be(),{mapId:o}=Rc(),a=p.useMemo(()=>{var l,u;return{lat:((l=i==null?void 0:i.center)==null?void 0:l[0])??ta[0],lng:((u=i==null?void 0:i.center)==null?void 0:u[1])??ta[1]}},[i==null?void 0:i.center]),c=p.useCallback(async l=>{const u=l.detail.latLng;if(!u||r&&!s)return;Z.getState().setDetailsOpen(!1),it.getState().setSelectedLocation(null);const d=[u.lat,u.lng];console.debug("[OmnicLocationsWidget::mapClick]",d);try{await Bi.getState().setPlaceAndPoint(d,{warehouseSelection:s})}catch{Re.getState().setDeliverPoint({address:null,coords:d})}},[r,s]);return w.jsx(qd,{disableDefaultUI:!0,mapId:o,defaultZoom:i==null?void 0:i.initialZoom,defaultCenter:a,className:K(Le.root,e),clickableIcons:!1,minZoom:4,maxZoom:20,restriction:{strictBounds:!0,latLngBounds:{north:85,south:-85,west:-179,east:179}},onClick:c,...n,children:t})},f6=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},N.createElement("rect",{width:2,height:20,x:9,fill:"#fff",rx:1}),N.createElement("rect",{width:2,height:20,x:20,y:9,fill:"#fff",rx:1,transform:"rotate(90 20 9)"}),N.createElement("circle",{cx:10,cy:10,r:8,fill:"#fff"}),N.createElement("circle",{cx:10,cy:10,r:6,fill:"currentcolor"}),N.createElement("circle",{cx:10,cy:10,r:4,fill:"#fff"})),h6=t=>{const e=document.createElement("div"),n=document.createElement("div");e.classList.add(Le.mapControl),n.classList.add(Le.mapControl),e.innerHTML="+",n.innerHTML="—",t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(n),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{const r=t.getZoom()||0;return t.setZoom(r+1)}),n.addEventListener("click",()=>{const r=t.getZoom()||0;return t.setZoom(r-1)})},p6=t=>{const e=document.createElement("div");e.classList.add(Le.mapControl),e.classList.add(Le.geolocationControl),e.innerHTML=Uh.renderToString(w.jsx(f6,{})),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{cc()})},m6=({className:t})=>{const e=un(),n=Z(Ap),r=Z(Dp),i=Pt(Ad),s=Re(ec),o=ji(),{lmsData:a}=mo(),{cityName:c,countryAbbreviation:l,disableGeolocation:u,hideDeliveryTime:d,hideDetails:f,hideMapControls:v,onPointClick:m,regionName:h,skipPointInfo:S}=be(),b=p.useCallback(V=>{console.debug("[OmnicLocationsWidget::loadMap]",V),Z.getState().setMap(V),Z.getState().setLoaded(),v||(h6(V),u||p6(V))},[u,v]),C=p.useCallback(()=>{console.debug("[OmnicLocationsWidget::unmountMap]"),Z.getState().setMap(null)},[]);p.useEffect(()=>{if(o)return b(o),()=>{C()}},[o,b,C]);const y=p.useCallback(V=>{const z=a==null?void 0:a.location.what3words,W=z!=null&&z.id?z:void 0;m==null||m(V,W)},[m,a]),E=p.useRef(null),x=p.useRef(null),g=p.useCallback(V=>{const z=V.getSouthWest(),W=V.getNorthEast(),ce=ne=>Math.round(ne*1e3)/1e3,le=`${ce(z.lat())}:${ce(z.lng())}:${ce(W.lat())}:${ce(W.lng())}`,ue=JSON.stringify(e??{});return`${le}|${ue}|${c??""}|${l??""}|${h??""}`},[c,l,e,h]),_=p.useCallback(()=>{Z.getState().setIdle(!0),n&&(E.current&&window.clearTimeout(E.current),E.current=window.setTimeout(()=>{const V=n.getBounds();if(!V)return;const z=g(V);x.current!==z&&(x.current=z,console.debug("[OmnicLocationsWidget::changeBounds]",V),Pt.getState().loadNext({bounds:[[V.getSouthWest().lat(),V.getNorthEast().lat()],[V.getSouthWest().lng(),V.getNorthEast().lng()]],filter:e,city_name:c,country_abbreviation:l,region_name:h}))},250))},[g,c,l,e,n,h]);p.useEffect(()=>()=>{E.current&&window.clearTimeout(E.current)},[]);const O=p.useCallback(async V=>{Re.getState().setDeliverPoint(null),it.getState().setSelectedLocation(V)},[]),P=p.useCallback(()=>{console.debug("[OmnicLocationsWidget::tilesLoaded]")},[]),R=Z.getState().setDetailsOpen,{getLMSData:L}=b4(),A=V=>{if(L(V.code),S){y(V);return}R(!1),O(V)},D=()=>{R(!1),O(null)},I=V=>{R(!0),O(V)},U=V=>{y(V),R(!1),O(null)};return w.jsxs(w.Fragment,{children:[w.jsxs("div",{className:K(Le.mapContainer,t),children:[w.jsxs(d6,{onIdle:_,onTilesLoaded:P,onBoundsChanged:()=>{Z.getState().setIdle(!1)},children:[s&&w.jsx(s6,{hideDeliveryTime:d,hideDetails:f,point:s,setOpenDetails:Z.getState().setDetailsOpen,setDeliveryPoint:Re.getState().setDeliverPoint,onPointClick:y}),w.jsx(R5,{handleCloseClick:D,handleDetailsClick:I,handlePointClick:A,handleSubmitClick:U})]}),(i||r)&&w.jsx(uh,{className:Le.overlay,children:w.jsx(qs,{})})]}),w.jsx(Ib,{handleDetailsClick:I,handlePointClick:A}),w.jsx(db,{handleCloseClick:D,handleSubmitClick:U})]})},g6=p.memo(m6),v6=t=>({google:g6})[t];function Rh(...t){return p.useCallback(e=>{for(const n of t)typeof n=="function"?n(e):n&&typeof n=="object"&&(n.current=e)},t)}const so=t=>{const e=p.useCallback(()=>{var n;(n=t==null?void 0:t.onClick)==null||n.call(t,t.name)},[t]);return{ref:t==null?void 0:t.ref,name:t==null?void 0:t.name,onClick:e}},y6=()=>{throw new Error("useMediaQuery is a client-only hook")};function b6(t){const e=p.useCallback(r=>{const i=window.matchMedia(t);return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[t]),n=()=>window.matchMedia(t).matches;return p.useSyncExternalStore(e,n,y6)}const w6="768px",S6="1024px",_6="1280px",C6="1536px",E6={screenSm:w6,screenMd:S6,screenLg:_6,screenXl:C6};function Nn(t){return b6(`(max-width: calc(${E6[t]} - 1px))`)}const Lh=mv().use(nv()).use(Wg()).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"}),x6=t=>{p.useEffect(()=>{t&&(Lh.changeLanguage(t),$s.setLanguage(t))},[t])},O6=t=>{p.useEffect(()=>{if(t){const e=Object.keys(t);for(const n of e){const r=t[n];r&&Mi(`--owl-color-${n}`,r)}}},[t])},T6=t=>{p.useEffect(()=>{t&&t!==void 0&&Mi("--owl-button-radius",`${t}px`)},[t])},P6=t=>{p.useEffect(()=>{t&&t!==void 0&&Mi("--owl-font",t)},[t])},A6=500,Jn=[];function kh(t={}){const{country:e,debounceMs:n=A6,onPlaceSelect:r,types:i}=t,s=uc("places"),[o,a]=p.useState(""),[c,l]=p.useState(Jn),[u,d]=p.useState(!1),f=p.useMemo(()=>i,[JSON.stringify(i)]),v=p.useRef(null),m=p.useRef(),h=p.useRef(r);h.current=r;const S=p.useCallback(()=>s?(v.current||(v.current=new s.AutocompleteSessionToken),v.current):null,[s]),b=p.useCallback(()=>{v.current=null},[]),C=p.useCallback(()=>{l(Jn)},[]);p.useEffect(()=>{if(!s||!o.trim()){l(E=>E.length>0?Jn:E);return}return clearTimeout(m.current),m.current=setTimeout(async()=>{d(!0);try{const E=S(),x={input:o,...E&&{sessionToken:E},...e&&{includedRegionCodes:[e]},...(f==null?void 0:f.length)&&{includedPrimaryTypes:f}},{suggestions:g}=await s.AutocompleteSuggestion.fetchAutocompleteSuggestions(x),_=g.filter(O=>O.placePrediction!==null).map(O=>{var R,L;const P=O.placePrediction;return{placeId:P.placeId,mainText:((R=P.mainText)==null?void 0:R.text)??"",secondaryText:((L=P.secondaryText)==null?void 0:L.text)??"",description:P.text.text}});l(_.length>0?_:Jn)}catch(E){console.error("[usePlaceAutocomplete] Failed to fetch suggestions:",E),l(Jn)}finally{d(!1)}},n),()=>clearTimeout(m.current)},[o,s,e,f,n,S]);const y=p.useCallback(async E=>{var x;if(s)try{const g=new s.Place({id:E}),_=await Pd(g);(x=h.current)==null||x.call(h,_),b(),l(Jn)}catch(g){console.error("[usePlaceAutocomplete] Failed to fetch place details:",g)}},[s,b]);return p.useMemo(()=>({value:o,setValue:a,suggestions:c,isLoading:u,clearSuggestions:C,handleSelect:y}),[o,c,u,C,y])}const R6={open:!1},L6=t=>t.open,wn=Ht(t=>({...R6,toggle(e){t(n=>({open:e??!n.open}))}})),k6=t=>{const e=t==="selector";p.useEffect(()=>{e&&wn.getState().toggle(!0)},[e])},M6=t=>{p.useEffect(()=>{t==="sharp"&&Mi("--owl-radius","0")},[t])},D6=({children:t})=>{const{cornersVariant:e,font:n,locale:r,palette:i,radius:s,startScreen:o}=be();return P6(n),x6(r),O6(i),T6(s),k6(o),M6(e),w.jsx(w.Fragment,{children:t})},j6=({children:t})=>{const{disableGeolocation:e,map:n}=be(),[r,i]=p.useState(e),{loaded:s}=Z();return Ot(n==null?void 0:n.center,"Map center is required"),Ot(n==null?void 0:n.initialZoom,"Map initial zoom is required"),p.useEffect(()=>{!s||e||r||cc({success:o=>{n.center=[o.coords.latitude,o.coords.longitude],i(!0),it.getState().setIsTrackingEnabled(!0)},error:()=>{i(!0)}})},[e,r,s,n]),t},N6=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:28,fill:"none",viewBox:"0 0 24 28",...t},N.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M24 11.777C24 4.052 17.606 0 12 0S0 4.052 0 11.777C0 16.915 3.994 22.334 12 28c8.006-5.666 12-11.085 12-16.224ZM12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z",clipRule:"evenodd"})),I6=()=>{wn.getState().toggle(!0),Z.getState().setDetailsOpen(!1),Re.getState().setDeliverPoint(null),it.getState().setSelectedLocation(null)},F6="CurrentLocation-module__root__AeQCGT",B6="CurrentLocation-module__icon__459m9q",V6="CurrentLocation-module__text__w-9v28",Jo={root:F6,icon:B6,text:V6},Mh=({className:t})=>{const{t:e}=mt("current_location"),n=Bi(u6),{location:r}=it(),s=(r==null?void 0:r.location.full_address)??(n==null?void 0:n.long_name)??e("choose_from_map");return w.jsxs("div",{role:"presentation",className:K(Jo.root,t),onClick:I6,children:[w.jsx(N6,{className:Jo.icon}),w.jsx("span",{className:Jo.text,children:s})]})},H6=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:123,height:32,fill:"none",viewBox:"0 0 123 32",...t},N.createElement("path",{fill:"currentcolor",d:"M6.698 32a6.579 6.579 0 0 1-3.35-.889 6.718 6.718 0 0 1-2.443-2.4A6.285 6.285 0 0 1 0 25.422V6.578c0-1.215.302-2.311.905-3.29A6.718 6.718 0 0 1 3.35.889 6.579 6.579 0 0 1 6.698 0h19.188c1.207 0 2.308.296 3.304.889a6.72 6.72 0 0 1 2.444 2.4c.633.978.95 2.074.95 3.289v18.844a6.061 6.061 0 0 1-.95 3.29 6.72 6.72 0 0 1-2.444 2.4c-.996.592-2.097.888-3.304.888H6.698Zm.317-6.933h18.464V6.933H7.015v18.134ZM37.568 32V0h7.24l11.043 12.933L66.848 0h7.287v32h-7.06V10.533L55.85 23.69 44.582 10.578V32h-7.014Zm41.985 0V0h7.241l18.238 21.333V0h7.105v32h-7.241L86.568 10.578V32h-7.015Zm36.523 0V0H123v32h-6.924Z"})),U6=t=>N.createElement("svg",{width:119,height:44,viewBox:"0 0 119 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},N.createElement("path",{d:"M4.70489 0.199253H0V13.4418H10.7452V10.0105H4.70489V0.199253Z",fill:"black"}),N.createElement("path",{d:"M16.9359 0.199253H12.2287V13.4418H22.974V10.0105H16.9359V0.199253Z",fill:"black"}),N.createElement("path",{d:"M27.9807 0.199253L23.6569 13.4418H28.3442L28.9701 10.913H32.5644L33.1703 13.4418H37.9766L33.6354 0.199253H27.9807ZM29.6775 8.00558L30.7881 3.41028L31.879 8.00558H29.6775Z",fill:"black"}),N.createElement("path",{d:"M48.1266 6.0777L47.5404 8.54701H47.5008L46.9146 6.0777L45.3786 0.199253H38.7936V13.4418H42.9146V8.84631L42.8551 4.39405H42.9345L45.48 13.4418H49.2373L51.8222 4.39405H51.8817L51.8222 8.84631V13.4418H55.9233V0.199253H49.6626L48.1266 6.0777Z",fill:"black"}),N.createElement("path",{d:"M61.057 0.199253L56.7333 13.4418H61.4206L62.0465 10.913H65.6429L66.2489 13.4418H71.0552L66.7139 0.199253H61.057ZM62.7539 8.00558L63.8645 3.41028L64.9553 8.00558H62.7539Z",fill:"black"}),N.createElement("path",{d:"M85.656 6.77975C86.6916 6.6323 87.4541 6.28455 87.9389 5.73657C88.4238 5.18853 88.6662 4.51949 88.6662 3.72939C88.6662 2.55195 88.2562 1.67601 87.4344 1.1016C86.6145 0.513972 85.3607 0.212458 83.677 0.199253H76.0413V13.4418H84.2015C85.8301 13.4418 87.0354 13.1533 87.8177 12.5789C88.611 11.9913 89.0099 11.1132 89.0099 9.95118C89.0099 9.09505 88.7411 8.38636 88.2011 7.82518C87.6612 7.26393 86.8151 6.9228 85.656 6.80175V6.77975ZM80.5455 3.41028H82.6457C83.4545 3.41028 83.8577 3.7316 83.8577 4.37425C83.8577 5.01689 83.4545 5.33822 82.6457 5.33822H80.5455V3.41028ZM83.8797 10.1492C83.677 10.312 83.3685 10.3913 82.952 10.3913H80.5499V8.46561H82.952C83.3685 8.46561 83.6792 8.54701 83.8797 8.70549C84.0957 8.86619 84.2015 9.09945 84.2015 9.40754C84.2015 9.71567 84.0935 9.97757 83.8797 10.1492Z",fill:"black"}),N.createElement("path",{d:"M114.374 6.72035L118.616 0.199253H113.485L111.91 3.51152L110.354 0.199253H104.801L109.063 6.8414L104.638 13.4418H109.951L111.566 10.0105L113.325 13.4418H118.999L114.374 6.72035Z",fill:"black"}),N.createElement("path",{d:"M102.472 0.378544C102.053 0.125449 101.59 0 101.086 0H93.0312C92.5242 0 92.0549 0.127649 91.6252 0.378544C91.1931 0.631642 90.8517 0.972769 90.5982 1.40194C90.3448 1.8201 90.217 2.28667 90.217 2.80386V10.8369C90.217 11.3432 90.3448 11.8097 90.5982 12.2388C90.8517 12.6681 91.1931 13.0092 91.6252 13.2622C92.0549 13.5152 92.5242 13.6407 93.0312 13.6407H101.086C101.593 13.6407 102.053 13.513 102.472 13.2622C102.902 13.0092 103.245 12.6681 103.497 12.2388C103.763 11.8097 103.895 11.341 103.895 10.8369V2.80606C103.895 2.28667 103.761 1.8201 103.497 1.40414C103.243 0.974969 102.902 0.633842 102.472 0.380745V0.378544ZM100.116 9.89279H93.9611V3.75243H100.116V9.89279Z",fill:"black"}),N.createElement("path",{d:"M43.3879 27.3704C42.6166 26.8512 41.7372 26.4993 40.7478 26.3145L44.9726 21.5605H40.8226L36.1199 26.794V30.7935C37.0917 30.4415 37.9887 30.2655 38.8107 30.2655C39.5644 30.2655 40.2101 30.4085 40.7478 30.6923C41.6204 31.1455 42.0569 31.8319 42.0569 32.7559V32.8307C42.0569 33.1827 41.973 33.4269 41.8056 33.5611C41.6558 33.6953 41.3692 33.7635 40.9505 33.7635H32.8715C32.2345 33.7635 31.7983 33.6469 31.5625 33.4115C31.3444 33.1607 31.2363 32.6987 31.2363 32.0277V26.3431L27.0866 28.532V32.6569C27.0866 33.0925 27.0117 33.3873 26.8595 33.5369C26.7075 33.6887 26.4144 33.7635 25.9803 33.7635H23.7412C23.305 33.7635 23.0118 33.6887 22.8619 33.5369C22.7121 33.3851 22.6349 33.0925 22.6349 32.6569V26.8468L18.4852 29.0357V32.6591C18.4852 33.0947 18.4103 33.3895 18.2583 33.5391C18.1084 33.6909 17.8131 33.7657 17.379 33.7657H15.1664C14.73 33.7657 14.4369 33.6909 14.2871 33.5391C14.1372 33.3873 14.06 33.0947 14.06 32.6591V27.3506L9.91037 29.5395V35.9282C9.91037 37.6727 8.92967 38.5439 6.96835 38.5439C6.02952 38.5439 5.28242 38.2073 4.72931 37.5386C4.17615 36.8522 3.89848 35.9458 3.89848 34.8216C3.89848 33.6975 4.18276 32.5161 4.75355 31.4249L0.830824 32.2543C0.277676 33.2113 0 34.3091 0 35.5498C0 37.2944 0.50246 38.8033 1.50958 40.0771C2.801 41.7381 4.61911 42.5674 6.96835 42.5674C8.6454 42.5674 10.0779 42.1736 11.2701 41.3861C12.5946 40.5149 13.4497 39.2895 13.8353 37.7123C14.1372 37.7629 14.4568 37.7871 14.7917 37.7871H18.0114C19.0009 37.7365 19.8559 37.4858 20.5767 37.0326C21.3655 37.5364 22.2956 37.7871 23.3689 37.7871H26.5885C27.7125 37.7365 28.6513 37.4352 29.405 36.8808C30.3262 37.4836 31.4259 37.7871 32.6996 37.7871H41.3581C42.7157 37.7871 43.8309 37.4022 44.7036 36.63C45.7107 35.7566 46.2132 34.5334 46.2132 32.9561V32.7053C46.2132 30.3909 45.2745 28.6134 43.3967 27.3726L43.3879 27.3704Z",fill:"#6A4A9D"}),N.createElement("path",{d:"M66.0266 39.8246C65.4051 39.8246 64.9026 40.0094 64.517 40.3789C64.1313 40.7639 63.9397 41.2677 63.9397 41.8881C63.9397 42.5084 64.1335 43.0123 64.517 43.3973C64.9026 43.7998 65.4051 44 66.0266 44C66.648 44 67.1416 43.8064 67.5097 43.4215C67.8953 43.0365 68.0869 42.5238 68.0869 41.8881C68.0869 41.2523 67.8931 40.7639 67.5097 40.3789C67.1416 40.0094 66.6458 39.8246 66.0266 39.8246Z",fill:"#6A4A9D"}),N.createElement("path",{d:"M65.0208 32.6578C65.0208 33.0933 64.9459 33.3881 64.7938 33.5377C64.6418 33.6896 64.3487 33.7644 63.9124 33.7644H59.5733V30.6954C59.5733 29.3205 59.1788 28.2051 58.3922 27.3495C57.4864 26.3441 56.2038 25.8403 54.5444 25.8403C53.002 25.8403 51.752 26.3353 50.7956 27.3253C49.74 28.4165 49.2111 29.9079 49.2111 31.802C49.2111 33.1109 49.6143 34.2835 50.4187 35.3241C51.3751 36.5494 52.6666 37.2862 54.2932 37.5372C54.745 37.6032 55.124 37.6472 55.4259 37.6626C55.3599 37.997 55.124 38.283 54.7207 38.5182C54.3351 38.769 53.9076 38.8946 53.4382 38.8946C52.532 38.8946 51.5339 38.5754 50.4452 37.9398V41.5366C51.5691 42.2229 52.6841 42.5683 53.7908 42.5683C55.1835 42.5683 56.3979 42.1987 57.438 41.4619C58.6962 40.5731 59.3993 39.3478 59.5513 37.788H64.2936C65.6691 37.788 66.793 37.3942 67.6635 36.6044C68.6684 35.6981 69.173 34.4485 69.173 32.8558V26.3397L65.0235 28.5285V32.6534L65.0208 32.6578ZM55.4259 33.6896C55.3599 33.672 55.2674 33.6654 55.1484 33.6654C54.864 33.6147 54.6612 33.573 54.5444 33.5399C53.707 33.3221 53.2861 32.693 53.2861 31.6524C53.2861 30.3787 53.7048 29.7407 54.5444 29.7407C55.1306 29.7407 55.4237 30.0597 55.4237 30.6977V33.6918L55.4259 33.6896Z",fill:"#6A4A9D"}),N.createElement("path",{d:"M95.419 25.837C94.0615 25.837 92.9465 26.2221 92.0734 26.9942C91.0839 27.883 90.5903 29.1149 90.5903 30.6923V32.6547C90.5903 33.0903 90.5155 33.3851 90.3633 33.5347C90.2135 33.6865 89.9182 33.7613 89.4839 33.7613H85.3124C84.8761 33.7613 84.583 33.6865 84.431 33.5347C84.2811 33.3829 84.204 33.0903 84.204 32.6547V21.5605L80.0544 23.7495V32.8571C80.0544 34.2497 80.4489 35.3892 81.2357 36.278C82.1237 37.2834 83.3556 37.7871 84.9334 37.7871H89.8587C90.8305 37.7871 91.6943 37.5782 92.4507 37.158C93.2726 37.5782 94.3282 37.7871 95.6196 37.7871C97.0608 37.7871 98.2354 37.2922 99.1411 36.3022C100.181 35.1956 100.701 33.6953 100.701 31.7989C100.701 30.1731 100.292 28.8224 99.4694 27.7489C98.513 26.4751 97.1644 25.837 95.419 25.837ZM95.3948 33.7613C94.9584 33.7613 94.7403 33.5853 94.7403 33.2333V30.5427C94.7403 30.0059 94.9673 29.7375 95.419 29.7375C96.2234 29.7375 96.6267 30.3755 96.6267 31.6493C96.6267 33.0573 96.2168 33.7635 95.3948 33.7635V33.7613Z",fill:"#6A4A9D"}),N.createElement("path",{d:"M114.85 32.0277C114.85 32.6987 114.734 33.1607 114.498 33.4115C114.28 33.6469 113.852 33.7635 113.215 33.7635H112.31V24.8317L108.159 27.0448V33.7613H105.167L103.08 37.7871H113.392C115.036 37.7871 116.36 37.2921 117.365 36.3021C118.456 35.2462 119 33.8295 119 32.0497V21.5605L114.85 23.7737V32.0277Z",fill:"#6A4A9D"})),$6="Header-module__root__Pe4MYp",z6="Header-module__nav__wtnkmT",q6="Header-module__navItem__-Fy63Z",G6="Header-module__logo__xO2bWO",ei={root:$6,nav:z6,navItem:q6,logo:G6},W6={llama:U6,default:H6},Z6=()=>{const{hideLogo:t,logo:e="default"}=be();if(t)return null;const n=W6[e];return w.jsx("div",{className:ei.logo,children:w.jsx(n,{})})},K6=({className:t})=>{const{t:e}=mt("header"),{disableDelivery:n}=be(),r=Z(Rp),i=Re(ec);p.useEffect(()=>{i?Z.getState().setMode("location_delivery"):Z.getState().setMode("self_pickup")},[i]);const s=()=>{Re.getState().setDeliverPoint(null),Z.getState().setMode("self_pickup")},o=()=>{Re.getState().setDeliverPoint(null),Z.getState().setMode("location_delivery")},a=r==="self_pickup",c=r==="location_delivery";return w.jsxs("div",{className:K(ei.root,t),children:[w.jsx(Z6,{}),w.jsxs("nav",{className:ei.nav,children:[!n&&w.jsx(rt,{as:"link",className:ei.navItem,variant:a?"primary":"secondary",onClick:s,children:e("self_pickup")}),!n&&w.jsx(rt,{as:"link",className:ei.navItem,variant:c?"primary":"secondary",onClick:o,children:e("courier_delivery")}),w.jsx(Mh,{})]})]})},Q6=p.memo(K6),J6={open:!1},Tr=Ht(t=>({...J6,toggle(e){Z.getState().setDetailsOpen(!1),Re.getState().setDeliverPoint(null),it.getState().setSelectedLocation(null),t(n=>({open:e??!n.open}))}})),X6="Layout-module__root__qzPL-f",Y6="Layout-module__headerHidden__JEN-d0",ew="Layout-module__sidebarHidden__x017O3",tw="Layout-module__sidebarOpen__IZnIjs",Es={root:X6,headerHidden:Y6,sidebarHidden:ew,sidebarOpen:tw},nw=({children:t})=>{const{hideFilters:e,hideHeader:n}=be(),r=Tr(i=>i.open);return w.jsx("div",{className:K(Es.root,{[Es.sidebarOpen]:r,[Es.headerHidden]:n,[Es.sidebarHidden]:e}),children:t})},rw=({children:t})=>{const e=Pt(fm);return Pt(Ad)&&!e?w.jsx(Ac,{}):w.jsx(w.Fragment,{children:t})},iw="Aside-module__root__EotK2f",sw="Aside-module__open__Zwmbs5",ow="Aside-module__overlay__slLdHF",aw="Aside-module__container__28P4wq",xs={root:iw,open:sw,overlay:ow,container:aw},cw=({children:t,className:e,open:n})=>w.jsxs("div",{className:K(xs.root,e,{[xs.open]:n}),children:[w.jsx("div",{className:xs.overlay}),w.jsx("div",{className:xs.container,children:t})]}),lw="Input-module__locationSearchRoot__svh-f9",uw="Input-module__endAdornment__m40K5R",dw="Input-module__input__505b7i",fw="Input-module__startAdornment__D-sJ0N",hw="Input-module__locationSearchInput__2YK1MG",pw="Input-module__label__gmqtsf",mw="Input-module__inputContainer__vubIa-",Xn={locationSearchRoot:lw,endAdornment:uw,input:dw,startAdornment:fw,locationSearchInput:hw,label:pw,inputContainer:mw},gw=p.forwardRef(({className:t,endAdornment:e,inputRef:n,label:r,onBlur:i,onChange:s,startAdornment:o,...a},c)=>{const l=p.useId(),u=p.useRef(null);p.useImperativeHandle(c,()=>({focus:()=>{var f;(f=u.current)==null||f.focus()},blur:()=>{var f;(f=u.current)==null||f.blur()},setValue:f=>{if(s){s({target:{value:f}});return}if(i){i({target:{value:f}});return}u.current&&(u.current.value=f)}}),[i,s]);const d=Rh(n,u);return w.jsxs("label",{htmlFor:a.id??l,className:K(Xn.locationSearchRoot,t),children:[r&&w.jsx("span",{className:Xn.label,children:r}),w.jsxs("div",{className:Xn.inputContainer,children:[o&&w.jsx("div",{className:Xn.startAdornment,children:o}),w.jsx("input",{...a,ref:d,id:a.id??l,className:Xn.locationSearchInput,onChange:s,onBlur:i}),e&&w.jsx("div",{className:Xn.endAdornment,children:e})]})]})}),vw="PlaceAutocomplete-module__container__fdiqiO",yw="PlaceAutocomplete-module__dropdown__u-0PdK",bw="PlaceAutocomplete-module__item__zHJqmC",ww="PlaceAutocomplete-module__itemMain__-skwdB",Sw="PlaceAutocomplete-module__itemSecondary__sD5QDK",_w="PlaceAutocomplete-module__itemArrow__CtQ5GG",er={container:vw,dropdown:yw,item:bw,itemMain:ww,itemSecondary:Sw,itemArrow:_w},Cw=({onSelect:t,suggestions:e})=>w.jsx("div",{className:er.dropdown,role:"listbox",children:e.map(n=>w.jsxs("div",{className:er.item,role:"option","aria-selected":!1,onClick:()=>t(n),onKeyDown:r=>{r.key==="Enter"&&t(n)},children:[w.jsx("span",{className:er.itemMain,children:n.mainText}),n.secondaryText&&w.jsx("span",{className:er.itemSecondary,children:n.secondaryText}),w.jsx(_c,{className:er.itemArrow})]},n.placeId))}),Dh=({autocomplete:t,className:e,endAdornment:n,inputRef:r,label:i,name:s,onBlur:o,onClick:a,onFocus:c,placeholder:l})=>{const u=p.useRef(null),d=t.suggestions.length>0,f=p.useRef(t.clearSuggestions);f.current=t.clearSuggestions,p.useEffect(()=>{if(!d)return;const h=S=>{u.current&&!u.current.contains(S.target)&&f.current()};return document.addEventListener("click",h),()=>document.removeEventListener("click",h)},[d]);const v=h=>{t.setValue(h.target.value)},m=h=>{t.setValue(h.description),t.handleSelect(h.placeId)};return w.jsxs("div",{ref:u,className:K(er.container,e),children:[w.jsx(gw,{inputRef:r,label:i,name:s,value:t.value,placeholder:l,endAdornment:n,onChange:v,onClick:a,onFocus:c,onBlur:o}),d&&w.jsx(Cw,{suggestions:t.suggestions,onSelect:m})]})},Ew="LocationAside-module__submit__CSKcqi",xw="LocationAside-module__container__S1NejR",Ow="LocationAside-module__selector__hl74ke",Tw="LocationAside-module__label__0Zk8at",Pw="LocationAside-module__header__N1wgyn",Aw="LocationAside-module__close__VsE88z",Os={submit:Ew,container:xw,selector:Ow,label:Tw,header:Pw,close:Aw},Rw=p.forwardRef((t,e)=>{const{t:n}=mt(["location_aside","common"]),r=wn(L6),{country:i,hideCloseButtonOnLocationScreen:s,inputs:o,onCloseLocationSelector:a,onLocationSelect:c}=be(),l=p.useRef(null);p.useImperativeHandle(e,()=>({open:()=>wn.getState().toggle(!0),close:()=>wn.getState().toggle(!1)}),[]);const u=p.useCallback(m=>{wn.getState().toggle(!1),Bi.getState().setPlaceSimple(m,{withNavigation:!0}),c==null||c(m)},[c]),d=kh({country:i,onPlaceSelect:u}),f=()=>{wn.getState().toggle(!1),a==null||a()},v=so(o==null?void 0:o.city);return w.jsx(cw,{open:r,children:w.jsx("div",{ref:l,className:Os.container,children:w.jsxs("div",{className:Os.selector,children:[w.jsxs("div",{className:Os.header,children:[w.jsx("div",{className:Os.label,children:n("choose_city")}),!s&&w.jsx(Ar,{position:"relative",onClick:f})]}),w.jsx(Dh,{autocomplete:d,inputRef:v.ref,name:v.name,placeholder:n("placeholder"),onClick:v.onClick})]})})})}),Lw=p.memo(Rw),kw=({children:t})=>{const{locale:e}=be(),{mapKey:n}=Rc(),r=p.useRef(e);return w.jsx(Vm,{apiKey:n,language:r.current,libraries:ep,children:t})},Mw=({children:t})=>{const{disableGoogleInit:e}=be(),{mapKey:n}=Rc(),{setMapKey:r}=Bi();return p.useEffect(()=>{r(n)},[n,r]),e?w.jsx(w.Fragment,{children:t}):w.jsx(kw,{children:t})},Dw=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},N.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M14.617 16.032a9 9 0 1 1 1.414-1.414l3.676 3.675a1 1 0 0 1-1.414 1.414l-3.676-3.675ZM2 9a7 7 0 1 1 12.04 4.858 1.005 1.005 0 0 0-.182.182A7 7 0 0 1 2 9Z",clipRule:"evenodd"})),jw=({className:t})=>{const{t:e}=mt("location_selector"),{country:n,inputs:r,onLocationSelect:i}=be(),s=p.useCallback(u=>{Bi.getState().setPlaceSimple(u,{withNavigation:!0}),i==null||i(u)},[i]),o=kh({country:n,types:[],onPlaceSelect:s}),a=()=>{o.value&&Z.getState().setBlurred(!0),Z.getState().setDetailsOpen(!1),Re.getState().setDeliverPoint(null),it.getState().setSelectedLocation(null)},c=()=>{Z.getState().setBlurred(!1)},l=so(r==null?void 0:r.address);return w.jsx(Dh,{autocomplete:o,className:t,endAdornment:w.jsx(Dw,{}),inputRef:l.ref,name:l.name,placeholder:e("placeholder"),onBlur:c,onClick:l.onClick,onFocus:a})},Nw=({className:t})=>Z(Mp)?w.jsx(jw,{className:t}):null,Iw=p.memo(Nw),Fw="DeliveryDetailsModal-module__root__qwKnjX",Bw={root:Fw},Vw=({className:t,location:e,onClose:n,onSubmit:r})=>w.jsx("div",{className:K(Bw.root,t),children:w.jsx(Ph,{location:e,onClose:n,onSubmit:r})}),Hw="LocationDetailsModal-module__root__PyRnLM",Uw={root:Hw},$w=({className:t,location:e,onClose:n,onSubmit:r})=>{const i=()=>{r==null||r(e)};return w.jsx("div",{className:K(Uw.root,t),children:w.jsx(uf,{location:e,onClose:n,onSubmit:i})})},zw="MapContainer-module__root__1Os6Q-",qw="MapContainer-module__mapWrapper__Cwe7qC",Gw="MapContainer-module__wrapperBlurred__04NN2L",Ww="MapContainer-module__locationSelector__Pr1zS-",Zw="MapContainer-module__filterButton__CW3Qv7",Kw="MapContainer-module__sidebarOpen__lGMVrJ",Qw="MapContainer-module__filterIcon__T01XsJ",Jw="MapContainer-module__details__gM8LWX",xt={root:zw,mapWrapper:qw,wrapperBlurred:Gw,locationSelector:Ww,filterButton:Zw,sidebarOpen:Kw,filterIcon:Qw,details:Jw},Xw=()=>{const{onPointClick:t}=be(),e=Z(tc),n=it(Np),r=Re(ec),i=p.useCallback(()=>{Z.getState().setDetailsOpen(!1)},[]),s=p.useCallback(o=>{t==null||t(o),Z.getState().setDetailsOpen(!1),it.getState().setSelectedLocation(null),Re.getState().setDeliverPoint(null)},[t]);return w.jsxs(w.Fragment,{children:[(r==null?void 0:r.address)&&e&&w.jsx(Vw,{location:r,className:xt.details,onClose:i,onSubmit:s}),n&&e&&w.jsx($w,{location:n,className:xt.details,onClose:i,onSubmit:s})]})},Yw=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:60,height:40,fill:"none",viewBox:"0 0 60 40",...t},N.createElement("path",{d:"M0 0h52a8 8 0 0 1 8 8v24a8 8 0 0 1-8 8H0V0Z"}),N.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,strokeWidth:1.5,d:"M32.093 10h13.814c1.151 0 2.093.91 2.093 2.02v2.223c0 .808-.523 1.818-1.047 2.324l-4.5 3.839c-.627.505-1.046 1.515-1.046 2.323v4.344c0 .607-.419 1.415-.942 1.718L39 29.7c-1.36.808-3.244-.101-3.244-1.717v-5.355c0-.707-.419-1.616-.837-2.121l-3.977-4.041c-.523-.506-.942-1.415-.942-2.02V12.12c0-1.21.942-2.12 2.093-2.12Z"})),e8=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:28,height:28,fill:"none",viewBox:"0 0 28 28",...t},N.createElement("rect",{width:28,height:28,fill:"#333",rx:4}),N.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,d:"M9.165 7h9.67c.806 0 1.465.636 1.465 1.414V9.97c0 .566-.366 1.273-.733 1.627l-3.15 2.687c-.44.353-.732 1.06-.732 1.627v3.04c0 .425-.293.99-.66 1.203L14 20.79c-.952.566-2.271-.07-2.271-1.202V15.84c0-.495-.293-1.132-.586-1.485l-2.784-2.83c-.366-.353-.659-.99-.659-1.413V8.485C7.7 7.636 8.36 7 9.165 7Z"})),t8=()=>{const t=Tr(i=>i.open),e=Tr(i=>i.toggle),n=Nn("screenSm"),r=()=>{e(!0)};return w.jsxs("div",{role:"presentation",className:K(xt.filterButton,{[xt.sidebarOpen]:t}),onClick:n?void 0:r,children:[n&&w.jsx(Mh,{}),n?w.jsx(e8,{className:xt.filterIcon,onClick:r}):w.jsx(Yw,{className:xt.filterIcon})]})},n8=({children:t,className:e})=>{const{hideFilters:n,hideSearchInput:r}=be(),i=Z(kp),s=Z(tc);return w.jsxs("div",{className:K(xt.root,e),children:[!r&&!s&&w.jsx(Iw,{className:xt.locationSelector}),!n&&w.jsx(t8,{}),w.jsx("div",{className:K(xt.mapWrapper,{[xt.wrapperBlurred]:i}),children:t}),w.jsx(Xw,{})]})},r8=p.memo(n8),i8="Separator-module__root__eQtZey",s8={root:i8},Xo=({className:t,...e})=>w.jsx("hr",{className:K(s8.root,t),...e}),o8="Sidebar-module__root__4j1MA3",a8="Sidebar-module__closeButton__HLXy1c",c8="Sidebar-module__open__mqQXF6",l8="Sidebar-module__header__Afp6uz",u8="Sidebar-module__typeFilter__GN46u9",d8="Sidebar-module__separator__6I4QoJ",f8="Sidebar-module__withRightPadding__2u1Ina",h8="Sidebar-module__sheetContent__SaoncI",p8="Sidebar-module__doneButton__4aeaSD",Ft={root:o8,closeButton:a8,open:c8,header:l8,typeFilter:u8,separator:d8,withRightPadding:f8,sheetContent:h8,doneButton:p8},m8=()=>{const{t}=mt("common"),e=Nn("screenSm"),n=Tr(i=>i.toggle),r=()=>{n(!1)};return w.jsxs("div",{className:Ft.header,children:[e&&w.jsx("div",{role:"presentation",className:Ft.doneButton,onClick:r,children:t("done")}),!e&&w.jsx(Ar,{className:Ft.closeButton,onClick:r})]})},g8="Radio-module__root__7ElY2W",v8="Radio-module__label__c-sYW3",ju={root:g8,label:v8},y8=({className:t,label:e,labelProps:n={},...r})=>{const i=p.useId(),{className:s,...o}=n;return w.jsxs("label",{htmlFor:i,className:K(ju.label,s),...o,children:[w.jsx("input",{id:i,type:"radio",className:K(ju.root,t),...r}),e]})},cr=t=>w.jsx(y8,{...t,type:"checkbox"}),b8="RadioGroup-module__root__ewZw-x",w8="RadioGroup-module__body__k8BJAs",S8="RadioGroup-module__legend__tcfV7q",Yo={root:b8,body:w8,legend:S8},jh=({children:t,className:e,label:n,onChange:r,value:i,...s})=>w.jsxs("div",{className:K(Yo.root,e),...s,children:[n&&w.jsx("span",{className:Yo.legend,children:n}),w.jsx("div",{className:Yo.body,children:p.Children.map(t,o=>p.isValidElement(o)?p.cloneElement(o,{checked:!!(i!=null&&i[o.props.value]),onChange:a=>r==null?void 0:r({...i,[a.target.value]:a.target.checked})}):null)})]}),_8=({className:t,onChange:e})=>{const{t:n}=mt("receive_filter"),r=un(Vp);return w.jsxs(jh,{value:r,label:n("title"),className:t,onChange:e,children:[w.jsx(cr,{name:"receive",value:ht.DressingRoom,label:n("dressing_room")}),w.jsx(cr,{name:"receive",value:ht.CheckOrder,label:n("check_order")}),w.jsx(cr,{name:"receive",value:ht.PayByCash,label:n("pay_by_cash")})]})},C8=p.memo(_8),E8=({className:t,onChange:e})=>{const{t:n}=mt("send_filter"),r=un(Bp);return w.jsxs(jh,{className:t,value:r,label:n("title"),onChange:e,children:[w.jsx(cr,{name:"send",value:pt.Return,label:n("sending_returns")}),w.jsx(cr,{name:"send",value:pt.Shipping,label:n("shipping")}),w.jsx(cr,{name:"send",value:pt.Payment,label:n("payment")})]})},x8=p.memo(E8),O8="TypeFilter-module__root__WH5EQV",T8="TypeFilter-module__button__f0mSfo",Ts={root:O8,button:T8},P8=({className:t,onChange:e,value:n})=>{const{t:r}=mt("type_filter"),i=s=>()=>e==null?void 0:e(s);return w.jsxs("div",{className:K(Ts.root,t),children:[w.jsx(rt,{className:Ts.button,variant:n===Nt.All?"primary":"secondary",onClick:i(Nt.All),children:r("all")}),w.jsx(rt,{className:Ts.button,variant:n===Nt.PostOffice?"primary":"secondary",onClick:i(Nt.PostOffice),children:r("post_office")}),w.jsx(rt,{className:Ts.button,variant:n===Nt.PickPoint?"primary":"secondary",onClick:i(Nt.PickPoint),children:r("pick_point")})]})},A8=({className:t,onChange:e})=>{const n=un(Fp);return w.jsx(P8,{value:n,className:t,onChange:e})},R8=p.memo(A8),L8=({className:t})=>{const e=Nn("screenSm"),n=Tr(c=>c.open),r=p.useCallback(c=>un.getState().setFilter({type:c}),[]),i=p.useCallback(c=>un.getState().setFilter({send:c}),[]),s=p.useCallback(c=>un.getState().setFilter({receive:c}),[]),o=p.useCallback(()=>Tr.getState().toggle(!1),[]),a=w.jsxs(w.Fragment,{children:[w.jsx(m8,{}),w.jsxs("div",{className:Ft.withRightPadding,children:[w.jsx(R8,{className:Ft.typeFilter,onChange:r}),w.jsx(Xo,{className:Ft.separator}),w.jsx(C8,{onChange:s}),w.jsx(Xo,{}),w.jsx(x8,{onChange:i}),w.jsx(Xo,{})]})]});return e?w.jsx(ah,{initialFocusRef:!1,open:n,snapPoints:({maxHeight:c})=>c-ch,onDismiss:o,children:w.jsx("div",{className:Ft.sheetContent,children:a})}):w.jsx("div",{className:K(Ft.root,t,{[Ft.open]:n}),children:a})},k8="App-module__map__Kf-2JS",M8="App-module__sidebar__ORIzGk",D8="App-module__header__bgP9DA",ea={map:k8,sidebar:M8,header:D8},j8=new Yb,Nh=({config:t,options:e})=>{const n=Tm(t),{INN:r,cityName:i,countryAbbreviation:s,hideFilters:o,hideHeader:a,map:c,regionName:l}=n;Ot(r,"INN is required"),Pm(r,e),Ot(c==null?void 0:c.provider,"Map provider is required");const u=v6(c.provider);return hm({cityName:i,countryAbbreviation:s,regionName:l}),w.jsx(qh,{baseColor:"#f3f3f3",highlightColor:"#ecebeb",children:w.jsx(i4,{client:j8,children:w.jsx(Ju.Provider,{value:n,children:w.jsx(c6,{children:w.jsx(j6,{children:w.jsx(D6,{children:w.jsx(vv,{tolgee:Lh,fallback:w.jsx(Ac,{}),children:w.jsx(Mw,{children:w.jsx(rw,{children:w.jsxs(nw,{children:[!a&&w.jsx(Q6,{className:ea.header}),!o&&w.jsx(L8,{className:ea.sidebar}),w.jsx(r8,{className:ea.map,children:w.jsx(u,{})}),w.jsx(Lw,{})]})})})})})})})})})})},Ih=async t=>hi.request({baseURL:"https://api.geo-data.omnic.solutions/api/1.0/",method:"POST",url:"normalize/address",data:t,headers:{Authorization:"Token 9877f9631b2e30570cc1c5aa8c740b0c912efe99a8b6c45c21cf4bd394adc7e9"}}),Fh=p.createContext(null),N8=(t,e)=>({...t,...e,palette:{...t.palette,...e==null?void 0:e.palette},inputs:e!=null&&e.inputs?{...t.inputs,...e.inputs}:t.inputs,handlers:e!=null&&e.handlers?{...t.handlers,...e.handlers}:t.handlers}),I8=({children:t})=>{const[e,n]=p.useState(),[r,i]=p.useState(),s=p.useRef(null),o=p.useRef(null),a=p.useRef(!1),c=p.useCallback(u=>{if(a.current){console.warn("Widget already launched");return}a.current=!0,n(u)},[]),l=p.useMemo(()=>({widgetOutHolderRef:s,widgetLocationsRef:o,launchWidget:c,setDynamicConfig:i}),[c]);return w.jsxs(Fh.Provider,{value:l,children:[w.jsx("div",{ref:s,style:{position:"fixed",left:"-9999px",top:"-9999px"},children:w.jsx("div",{ref:o,id:"@omnic/widget-locations",style:{height:"100%",width:"100%"},children:e&&w.jsx(Nh,{options:e.options,config:N8(e.config,r)})})}),t]})};function Bh(){const t=p.useContext(Fh);if(!t)throw new Error("Please use hook useWidgetLocationsContext inside WidgetLocationsProvider");return t}const Nu=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;const e=Object.getPrototypeOf(t);return e===Object.prototype||e===null},Ya=(t,e,n=new WeakMap)=>{if(Object.is(t,e))return!0;if(!t||!e||typeof t!="object"&&typeof t!="function"||typeof e!="object"&&typeof e!="function")return!1;const r=t,i=e,s=n.get(r);if(s!=null&&s.has(i))return!0;if(s?s.add(i):n.set(r,new WeakSet([i])),Array.isArray(t)&&Array.isArray(e))return t.length!==e.length?!1:t.every((o,a)=>Ya(o,e[a],n));if(Nu(t)&&Nu(e)){const o=Object.keys(t),a=Object.keys(e);return o.length!==a.length?!1:o.every(c=>Ya(t[c],e[c],n))}return!1},F8=t=>{const{setDynamicConfig:e,widgetLocationsRef:n,widgetOutHolderRef:r}=Bh(),i=p.useRef(null),s=p.useRef(null);return p.useEffect(()=>{!t||Ya(s.current,t)||(s.current=t,e(t))},[t,e]),p.useEffect(()=>{const o=r.current,a=n.current,c=i.current;return a&&c&&c.appendChild(a),()=>{a&&o&&o.appendChild(a)}},[n,r]),w.jsx("div",{ref:i,style:{width:"100%",height:"100%"}})};exports.EReceiveFilter=ht;exports.ESendFilter=pt;exports.ETypeFilter=Nt;exports.MapPlaceholder=F8;exports.Widget=Nh;exports.WidgetLocationsProvider=I8;exports.createPointsIterator=ca;exports.fetchPointsRequest=aa;exports.fromHoursMinutesToMinutes=Hp;exports.fromMinutesToHoursMinutes=Up;exports.getAddressFormGeocode=ua;exports.getBoundsFromPoint=$p;exports.getCurrentPosition=cc;exports.getNormalizedAddress=Ih;exports.getPropertyValue=Td;exports.isCoordinates=la;exports.isDeliveryPoint=lm;exports.isHttpSuccess=Od;exports.isPlaceId=xd;exports.placeToPlaceResult=Pd;exports.replaceSvgCurrentColor=rr;exports.setWidgetCSSProperty=Mi;exports.useWidgetLocationsContext=Bh;
229
+ </svg>`,a=`Cluster of ${e} markers`,c=Number(google.maps.Marker.MAX_ZINDEX)+e;if(ze.isAdvancedMarkerAvailable(i)){const d=new DOMParser().parseFromString(o,"image/svg+xml").documentElement;d.setAttribute("transform","translate(0 25)");const f={map:i,position:n,zIndex:c,title:a,content:d};return new google.maps.marker.AdvancedMarkerElement(f)}const l={position:n,zIndex:c,title:a,icon:{url:`data:image/svg+xml;base64,${btoa(o)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(l)}}function d5(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class Pc{constructor(){d5(Pc,google.maps.OverlayView)}}var bn;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click",t.GMP_CLICK="gmp-click"})(bn||(bn={}));const f5=(t,e,n)=>{e.bounds&&n.fitBounds(e.bounds)};class h5 extends Pc{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new c5(r),renderer:s=new u5,onClusterClick:o=f5}){super(),this.map=null,this.idleListener=null,this.markers=[...n],this.clusters=[],this.algorithm=i,this.renderer=s,this.onClusterClick=o,e&&this.setMap(e)}addMarker(e,n){this.markers.includes(e)||(this.markers.push(e),n||this.render())}addMarkers(e,n){e.forEach(r=>{this.addMarker(r,!0)}),n||this.render()}removeMarker(e,n){const r=this.markers.indexOf(e);return r===-1?!1:(ze.setMap(e,null),this.markers.splice(r,1),n||this.render(),!0)}removeMarkers(e,n){let r=!1;return e.forEach(i=>{r=this.removeMarker(i,!0)||r}),r&&!n&&this.render(),r}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,bn.CLUSTERING_BEGIN,this);const{clusters:n,changed:r}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(r||r==null){const i=new Set;for(const o of n)o.markers.length==1&&i.add(o.markers[0]);const s=[];for(const o of this.clusters)o.marker!=null&&(o.markers.length==1?i.has(o.marker)||ze.setMap(o.marker,null):s.push(o.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>s.forEach(o=>ze.setMap(o,null)))}google.maps.event.trigger(this,bn.CLUSTERING_END,this)}}onAdd(){const e=this.getMap();Xa(e),this.idleListener=e.addListener("idle",this.render.bind(this)),this.render()}onRemove(){this.idleListener&&google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>ze.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new l5(this.markers,this.clusters),n=this.getMap();this.clusters.forEach(r=>{if(r.markers.length===1)r.marker=r.markers[0];else if(r.marker=this.renderer.render(r,e,n),r.markers.forEach(i=>ze.setMap(i,null)),this.onClusterClick){const i=ze.isAdvancedMarker(r.marker)?bn.GMP_CLICK:bn.CLUSTER_CLICK;r.marker.addListener(i,s=>{google.maps.event.trigger(this,bn.CLUSTER_CLICK,r),this.onClusterClick(s,r,n)})}ze.setMap(r.marker,n)})}}const p5="LocationBalloon-module__root__GtUl6q",m5="LocationBalloon-module__submit__lNcF4k",g5="LocationBalloon-module__details__--VOKk",v5="LocationBalloon-module__icon__X7DOVA",y5="LocationBalloon-module__header__5VQJDW",b5="LocationBalloon-module__titleContainer__BAO73U",w5="LocationBalloon-module__title__bX9pf8",S5="LocationBalloon-module__description__htav7b",_5="LocationBalloon-module__actions__c8dlOR",C5="LocationBalloon-module__close__7Ujvya",bt={root:p5,submit:m5,details:g5,icon:v5,header:y5,titleContainer:b5,title:w5,description:S5,actions:_5,close:C5},E5={default:Zd,llama:Kd},x5=({SSR:t,className:e,hideDetails:n,location:r,location_name:i,name:s,onCloseClick:o,onDetails:a,onSubmit:c})=>{var h;const{logo:l="default"}=be(),{isLoading:u,lmsData:d}=mo(),f=(h=d==null?void 0:d.location)==null?void 0:h.what3words,v=!!(f!=null&&f.id),m=E5[l];return w.jsxs("div",{className:K(bt.root,e),children:[w.jsxs("div",{className:bt.header,children:[w.jsxs("div",{className:bt.titleContainer,children:[u?w.jsx(Ze,{circle:!0,width:40,height:40}):w.jsx("div",{className:bt.icon,children:w.jsx(m,{})}),u?w.jsx(Ze,{width:200}):w.jsx("span",{className:bt.title,children:s||"{{ properties.point.name }}"})]}),w.jsx("div",{className:bt.close,children:w.jsx(Ar,{position:"relative",onClick:o})})]}),w.jsxs("div",{className:bt.description,children:[u?w.jsx(Ze,{width:300}):(r==null?void 0:r.full_address)||"{{ properties.point.location.full_address }}"," ",u?w.jsx(Ze,{width:300}):i||"{{ properties.point.location_name }}"]}),u?w.jsx(Ze,{width:150}):v&&w.jsx(lf,{what3words:f}),w.jsxs("div",{className:bt.actions,children:[w.jsx(rt,{id:Xh,variant:"primary",className:bt.submit,disabled:u,onClick:c,children:t?"{ choose }":w.jsx(It,{keyName:"choose",ns:"common"})}),!n&&w.jsxs(rt,{id:Ku,as:"link",variant:"primary",className:bt.details,disabled:u,onClick:a,children:[t?"{ details }":w.jsx(It,{keyName:"details",ns:"common"}),w.jsx(_c,{})]})]})]})},O5=({handleCloseClick:t,handleDetailsClick:e,handlePointClick:n,handleSubmitClick:r,point:i,setMarkerRef:s})=>{const[o,a]=p.useState(!1),{hideDetails:c,iconType:l,palette:u}=be(),d=p.useRef(null),{closeSamePoints:f}=Pt(),v=it(O=>O.location),m=(u==null?void 0:u.primary)||"#fc0",h=l==="omni-llama"?We.PinLlama:We.PinOmnic,S=!!i&&(v==null?void 0:v.uid)===i.uid,b=Nn("screenSm"),{isIdle:C}=Z(),y=dc({isSelectedPoint:S}),E=C&&S&&y&&o;p.useEffect(()=>{d.current&&a(d.current.checkVisibility()??!1)},[i]);const x=p.useMemo(()=>{let O;if(i.type===30)switch(l){case"omni-llama":{S?O=We.PinLlamaSelected:O=We.PinLlama;break}case"we-chip":{S?O=We.PinWeChipSelected:O=We.PinWeChip;break}default:{S?O=We.PinOmnicSelected:O=rr(h,m);break}}else S?O=rr(We.PinPvz,"--owl-color-black"):O=rr(We.PinPvz,"--owl-color-grey-80");return Ot(O,"Icon url is not defined"),O},[i.type,S,l,h,m]),g=p.useMemo(()=>({lat:i.location.latitude,lng:i.location.longitude}),[i.location.latitude,i.location.longitude]),_=()=>{f(),n(i)};return w.jsxs(w.Fragment,{children:[w.jsx(Gd,{ref:O=>{d.current=O,s(O)},position:g,zIndex:S?9999:void 0,onClick:_,children:w.jsx("span",{dangerouslySetInnerHTML:{__html:x}})},i.uid),E&&!b&&w.jsx(Wd,{anchor:d.current||void 0,onCloseClick:t,children:w.jsx(x5,{...i,hideDetails:c,className:Le.balloon,onCloseClick:t,onSubmit:()=>r(i),onDetails:()=>e(i)})})]})},T5=({handleCloseClick:t,points:e,...n})=>{const{setSamePoints:r}=Pt(),{onSamePointsClusterClick:i}=be(),s=ji(),o=p.useMemo(()=>(v,m)=>{if(!m)return;t();const h=m.markers??[],S=h.map(E=>{const x=E.position;if(!x)return{lat:NaN,lng:NaN};const g=typeof x.lat=="number"?x.lat:x.lat(),_=typeof x.lng=="number"?x.lng:x.lng();return{lat:g,lng:_}});if(!S.length)return;const{lat:b,lng:C}=S[0];if(S.every(E=>E.lat===b&&E.lng===C)){const E=e.filter(({location:{latitude:x,longitude:g}})=>x===b&&g===C);r(E),i==null||i(E);return}if(s instanceof google.maps.Map){const E=new google.maps.LatLngBounds;for(const x of h){const g=x.position;if(!g)continue;const _=(typeof g.lat=="number",g);E.extend(_)}s.fitBounds(E,150)}},[s,e,t,i,r]),a=p.useMemo(()=>({render:({count:v,position:m})=>{const h=document.createElement("div");return h.className=Le.cluster,h.innerHTML=`<span class="${Le.number}">${v}</span>`,new google.maps.marker.AdvancedMarkerElement({position:m,content:h,zIndex:v})}}),[]),c=p.useRef(new h5({renderer:a,map:null,onClusterClick:o})),l=p.useRef([]),[u,d]=p.useState([]);p.useEffect(()=>{d([]),c.current.clearMarkers()},[e,s]),p.useEffect(()=>{c.current.setMap(null),s&&c.current.setMap(s)},[s]),p.useEffect(()=>{!s||!u.length||c.current.addMarkers(u)},[u,s]);function f(v){u.length||d(v)}return w.jsx(w.Fragment,{children:e.map((v,m)=>{const h=m===0,S=m===e.length-1;return h&&(l.current=[]),w.jsx(O5,{point:v,handleCloseClick:t,setMarkerRef:b=>{b&&(l.current.push(b),S&&f([...l.current]))},...n},v.uid)})})},P5=p.memo(T5),A5=t=>{const e=Pt(dm);return w.jsx(P5,{points:e,...t})},R5=p.memo(A5),Th=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:42,height:42,fill:"none",viewBox:"0 0 42 42",...t},N.createElement("rect",{width:42,height:42,fill:"#fff",rx:21}),N.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M31.003 28V17.766a3 3 0 0 0-1.579-2.643l-7.003-3.765a3 3 0 0 0-2.842 0l-7.003 3.765a3 3 0 0 0-1.58 2.643V28a3 3 0 0 0 3 3h14.008a3 3 0 0 0 3-3Zm-5.919 1h2.92a1 1 0 0 0 1-1V17.766a1 1 0 0 0-.527-.881l-7.003-3.766a1 1 0 0 0-.948 0l-7.003 3.766a1 1 0 0 0-.527.88v10.237a1 1 0 0 0 1 1h2.92a2.513 2.513 0 0 1-.05-.5v-7.606a2.5 2.5 0 0 1 2.5-2.5h3.268a2.5 2.5 0 0 1 2.5 2.5V28.5c0 .171-.017.338-.05.5Zm-2.426 0a.5.5 0 0 0 .476-.499v-7.606a.5.5 0 0 0-.5-.5h-3.269a.5.5 0 0 0-.5.5V28.5a.5.5 0 0 0 .476.5h3.317Z",clipRule:"evenodd"}),N.createElement("rect",{width:41,height:41,x:.5,y:.5,stroke:"#1D3665",strokeOpacity:.1,rx:20.5})),L5="DeliveryBalloon-module__root__Nu90iy",k5="DeliveryBalloon-module__details__eqUTaI",M5="DeliveryBalloon-module__wh__1lJtLN",D5="DeliveryBalloon-module__header__JVdyxN",j5="DeliveryBalloon-module__title__-zKKCt",N5="DeliveryBalloon-module__description__no5-ki",I5="DeliveryBalloon-module__actions__C-N0H-",F5="DeliveryBalloon-module__errorVariant__e6uhZl",B5="DeliveryBalloon-module__logo__62gC5h",Dt={root:L5,details:k5,wh:M5,header:D5,title:j5,description:N5,actions:I5,errorVariant:F5,logo:B5},V5=({SSR:t,address:e,className:n,hasCloseButton:r,hideDetails:i,onClose:s,onDetails:o,variant:a})=>{const{onWarehouseSelect:c,warehouseSelection:l}=be(),{setWarehousePoint:u,warehousePoint:d}=Re(),f=a==="error",v=a==="default",m=function(){return l?t?"{ courier_balloon.warehouse_title }":w.jsx(It,{keyName:"warehouse_title",ns:"courier_balloon"}):t?"{ courier_balloon.title }":w.jsx(It,{keyName:"title",ns:"courier_balloon"})}(),h=t?"{ courier_balloon.error_title }":w.jsx(It,{keyName:"error_title",ns:"courier_balloon"}),S=t?"{ courier_balloon.error_description }":w.jsx(It,{keyName:"error_description",ns:"courier_balloon"});function b(){d&&(c==null||c(d),u(null))}const{label:C,onClick:y}=l?{onClick:b,label:t?"{ select }":w.jsx(It,{keyName:"select",ns:"common"})}:{onClick:o,label:t?"{ details }":w.jsx(It,{keyName:"details",ns:"common"})};return w.jsxs("div",{className:K(Dt.root,n,Dt[`${a}Variant`]),children:[w.jsxs("div",{className:Dt.header,children:[w.jsx(Th,{className:Dt.logo}),w.jsx("span",{className:Dt.title,children:f?h:m}),r&&w.jsx(Ar,{onClick:s})]}),w.jsx("div",{className:Dt.description,children:f?S:e||"{{ properties.address }}"}),v&&(!i||l)&&w.jsx("div",{className:Dt.actions,children:w.jsx(rt,{id:Ku,as:"button",variant:"primary",className:K(Dt.details,l?Dt.wh:""),onClick:y,children:C})})]})},H5="Chip-module__root__zsoSyP",U5="Chip-module__active__BlTSFB",ku={root:H5,active:U5},Mu=({active:t,children:e,className:n,...r})=>w.jsx("div",{...r,className:K(ku.root,n,{[ku.active]:t}),children:e}),$5="TextArea-module__root__8YFknR",z5={root:$5},Du=p.forwardRef(({className:t,inputRef:e,onBlur:n,onChange:r,onFocus:i,...s},o)=>{const a=p.useRef(null);p.useImperativeHandle(o,()=>({focus:()=>{var l,u;(l=a.current)==null||l.focus(),i&&i({target:{value:(u=a.current)==null?void 0:u.value}})},blur:()=>{var l,u;(l=a.current)==null||l.blur(),n&&n({target:{value:(u=a.current)==null?void 0:u.value}})},setValue:l=>{r&&r({target:{value:l}}),a.current&&(a.current.value=l)}}),[n,r,i]);const c=Rh(e,a);return w.jsx("textarea",{...s,ref:c,className:K(z5.root,t),onBlur:n,onFocus:i,onChange:r})}),q5=({hideDeliveryTime:t,set:e})=>(n,r)=>{let i={...n};switch(r.type){case"SET_COMMENT":{i={...n,comment:r.payload};break}case"SET_DELIVERY_TIME":{i={...n,delivery_time:r.payload};break}case"SET_APARTMENT_NUMBER":{i={...n,apartment_number:r.payload};break}}return i.meta={...i.meta,valid:(t||!!i.delivery_time)&&!!i.apartment_number},e==null||e(i),i},G5="DeliveryDetailsView-module__title__azeoUr",W5="DeliveryDetailsView-module__logo__4zZtpM",Z5="DeliveryDetailsView-module__header__oDE9He",K5="DeliveryDetailsView-module__content__6P27SY",Q5="DeliveryDetailsView-module__section__2M3Qip",J5="DeliveryDetailsView-module__chips__KmYgha",X5="DeliveryDetailsView-module__actions__43XZ-V",Y5="DeliveryDetailsView-module__submit__58LKBw",e6="DeliveryDetailsView-module__actionsHidden__SW-67b",t6="DeliveryDetailsView-module__commentSection__GlX1A2",n6="DeliveryDetailsView-module__comment__2pGG6h",He={title:G5,logo:W5,header:Z5,content:K5,section:Q5,chips:J5,actions:X5,submit:Y5,actionsHidden:e6,commentSection:t6,comment:n6},r6=p.forwardRef(({classes:t,hideActions:e,location:n,onChange:r,onClose:i,onSubmit:s},o)=>{var g;const{hideDeliveryTime:a,inputs:c,locale:l}=be(),{t:u}=mt(["details_modal","courier_balloon","common"]),d=p.useMemo(()=>q5({set:r,hideDeliveryTime:a}),[a,r]),[f,v]=p.useState(!1),[m,h]=p.useReducer(d,{comment:"",delivery_time:"",apartment_number:"",...n}),S=p.useCallback(async()=>{v(!0);try{Ot(n.address,"Address is required");const _=await Ih({address:n.address,algorithm:10,service:10,language:l||Qu});if(!Od(_))return;const O=_==null?void 0:_.data.data,P={...m,address:O};return s==null||s(P),P}finally{v(!1)}},[l,n.address,s,m]);p.useImperativeHandle(o,()=>({submit:S}),[S]);const b=_=>()=>{h({payload:_,type:"SET_DELIVERY_TIME"})},C=_=>{h({payload:_.target.value,type:"SET_APARTMENT_NUMBER"})},y=_=>{h({payload:_.target.value,type:"SET_COMMENT"})},E=so(c==null?void 0:c.apartment),x=so(c==null?void 0:c.comment);return w.jsxs(w.Fragment,{children:[w.jsxs("div",{className:K(He.header,t==null?void 0:t.header),children:[w.jsx(Ar,{onClick:i}),w.jsxs("div",{className:He.title,children:[w.jsx(Th,{className:He.logo}),w.jsx("span",{children:u("title",{ns:"courier_balloon"})})]})]}),w.jsxs("div",{className:K(He.content,t==null?void 0:t.content),children:[w.jsxs("section",{className:He.section,children:[w.jsxs("span",{children:[u("address"),":"]}),w.jsx("p",{children:n.address})]}),!a&&w.jsxs("section",{className:He.section,children:[w.jsxs("span",{children:[u("delivery_time"),":"]}),w.jsxs("div",{className:He.chips,children:[w.jsx(Mu,{active:m.delivery_time==="8:00-13:00",onClick:b("8:00-13:00"),children:"8:00 - 13:00"}),w.jsx(Mu,{active:m.delivery_time==="14:00-22:00",onClick:b("14:00-22:00"),children:"14:00 - 22:00"})]})]}),w.jsxs("section",{className:He.section,children:[w.jsxs("span",{children:[u("apartment_number"),":"]}),w.jsx(Du,{...E,rows:1,onChange:C})]}),w.jsxs("section",{className:K(He.section,He.commentSection),children:[w.jsxs("span",{children:[u("comment"),":"]}),w.jsx(Du,{...x,className:He.comment,onChange:y})]})]}),w.jsx("div",{className:K(He.actions,{[He.actionsHidden]:e}),children:w.jsx(rt,{loading:f,disabled:!((g=m.meta)!=null&&g.valid)||f,variant:"primary",className:He.submit,onClick:S,children:u("choose",{ns:"common"})})})]})}),Ph=p.memo(r6),i6={header:Le.deliveryDetailsViewHeader,content:Le.deliveryDetailsViewContent},s6=({hideDeliveryTime:t,hideDetails:e,onPointClick:n,point:r,setDeliveryPoint:i,setOpenDetails:s})=>{var L;const[o,a]=p.useState(!1),[c,l]=p.useState(!1),[u,d]=p.useState({...r,comment:"",delivery_time:"",apartment_number:""}),f=p.useRef(null),v=p.useRef(null),{warehouseSelection:m}=be(),{warehousePoint:h}=Re(),S=dc({isSelectedPoint:!0}),b=((L=f.current)==null?void 0:L.checkVisibility())??!1;p.useEffect(()=>{setTimeout(()=>{a(!0)},100)},[]),p.useEffect(()=>{d({...r,comment:"",delivery_time:"",apartment_number:""})},[r]);const C=Nn("screenSm"),y=p.useMemo(()=>({lat:u.coords[0],lng:u.coords[1]}),[u.coords]),E=()=>{s==null||s(!0)},x=()=>{i==null||i(null)},g=p.useMemo(()=>rr(We.PinHome,"--owl-color-success"),[]),_=async()=>{var A;try{l(!0);const D=await((A=v.current)==null?void 0:A.submit());if(!D)return;n==null||n(D),s==null||s(!1),i==null||i(null)}finally{l(!1)}},O=w.jsx(V5,{...u,hideDetails:e,hasCloseButton:C,variant:u.address?"default":"error",className:Le.balloon,onDetails:E,onClose:x}),P=m?!!h&&b:S&&!b,R=t?!!u.apartment_number:!!u.apartment_number&&!!u.delivery_time;return w.jsxs(w.Fragment,{children:[w.jsx(Gd,{ref:f,position:y,children:w.jsx("span",{dangerouslySetInnerHTML:{__html:g}})}),C&&w.jsxs(lh,{minSnapHeight:u.address?200:void 0,submitDisabled:!R||c,submitLoading:c,hideFooter:!u.address,open:P,onDismiss:x,onSubmitClick:_,children:[u.address&&w.jsx(Ph,{ref:v,hideActions:!0,classes:i6,location:r,onChange:d,onClose:x}),u.address?null:O]}),!C&&P&&w.jsx(Wd,{anchor:f.current||void 0,onCloseClick:x,children:O})]})},Ac=()=>w.jsx(uh,{children:w.jsx(qs,{})});async function o6(){return(await _e.request({method:"GET",baseURL:"https://api.geo-data.omnic.solutions/api/1.0/",url:"/key-data",headers:{Authorization:"Token fa812020-3197-401a-9b39-345999046111"}})).data.data}function a6(t){return _h({queryKey:["wl-map-key-wl"],queryFn:()=>o6(),refetchOnWindowFocus:!1,retry:2,enabled:t})}const Ah=p.createContext(null),c6=({children:t})=>{const{gMapId:e,gMapKey:n,mapTheme:r}=be(),i=!n||!e,{data:s,isFetching:o}=a6(i),a=s==null?void 0:s.key;function c(){var f,v,m;switch(r){case"omnic":return(f=s==null?void 0:s.additional_data)==null?void 0:f.map_id_omnic;case"llama":return(v=s==null?void 0:s.additional_data)==null?void 0:v.map_id_llama;case"chip":return(m=s==null?void 0:s.additional_data)==null?void 0:m.map_id_chip;default:return"e130cd87a3f1b9cbe3cb5de4"}}const l=n||a||"AIzaSyDsI0AO8VsUrTPoyR9fF7T31FKx1a9TLO0",u=e||c(),d=p.useMemo(()=>({mapKey:l,mapId:u}),[u,l]);return w.jsx(Ah.Provider,{value:d,children:o?w.jsx(Ac,{}):t})},Rc=()=>{const t=p.useContext(Ah);if(!t)throw new Error("useMapKeyContext must be used within a MapKeyProvider");return t},l6={place:null,mapKey:""},u6=t=>{var e,n;return(n=(e=t.place)==null?void 0:e.address_components)==null?void 0:n.find(r=>r.types.includes("locality"))},Bi=Ht((t,e)=>({...l6,setMapKey(n){t({mapKey:n})},async setPlace(n,r,i){var c,l,u,d,f,v;const{map:s}=Z.getState();let o,a;if(console.debug("[OmnicWidgetLocations::setDeliveryAdressPlace]",{value:n,types:r}),la(n)){const m=await ua(n,e().mapKey,r);o=(c=m==null?void 0:m.results)==null?void 0:c[0],i&&(o=(l=m==null?void 0:m.results)==null?void 0:l.find(h=>{var S;return(S=h.types)==null?void 0:S.includes(i)}))}else if(o=n,o!=null&&o.place_id){const{results:m}=await ua(o.place_id,e().mapKey);a=(d=(u=m==null?void 0:m[0])==null?void 0:u.geometry)==null?void 0:d.viewport}else(f=o==null?void 0:o.geometry)!=null&&f.viewport?a=o.geometry.viewport:(v=o==null?void 0:o.geometry)!=null&&v.location&&(a=new google.maps.LatLngBounds,a.extend(o.geometry.location));return a&&(console.debug("[OmnicWidgetLocations::fitMapBounds]",a.toJSON()),s==null||s.fitBounds(a)),Ot(o,"Place is not defined"),t({place:o}),o},async setPlaceAndPoint(n,r){var l;const i=r==null?void 0:r.types,s=la(n)?await e().setPlace(n,i):await e().setPlace(n),o=(l=s.geometry)==null?void 0:l.location;Ot(o,"Location is not defined");const a=[o.lat(),o.lng()],c={address:s.formatted_address,coords:a};return r!=null&&r.warehouseSelection&&Re.getState().setWarehousePoint({...s,coords:{lat:o.lat(),lng:o.lng()}}),(!(r!=null&&r.ignoreSelection)||r!=null&&r.warehouseSelection)&&Re.getState().setDeliverPoint(c),s},setPlaceSimple(n,r){var i,s;if(r!=null&&r.withNavigation){const{map:o}=Z.getState();Ot(o,"Map is not defined");let a;(i=n==null?void 0:n.geometry)!=null&&i.viewport?a=n.geometry.viewport:(s=n==null?void 0:n.geometry)!=null&&s.location&&(a=new google.maps.LatLngBounds,a.extend(n.geometry.location)),a&&(o.fitBounds(a),o.setZoom(12))}t({place:n})}})),d6=({children:t,className:e,...n})=>{const{disableDelivery:r,map:i,warehouseSelection:s}=be(),{mapId:o}=Rc(),a=p.useMemo(()=>{var l,u;return{lat:((l=i==null?void 0:i.center)==null?void 0:l[0])??ta[0],lng:((u=i==null?void 0:i.center)==null?void 0:u[1])??ta[1]}},[i==null?void 0:i.center]),c=p.useCallback(async l=>{const u=l.detail.latLng;if(!u||r&&!s)return;Z.getState().setDetailsOpen(!1),it.getState().setSelectedLocation(null);const d=[u.lat,u.lng];console.debug("[OmnicLocationsWidget::mapClick]",d);try{await Bi.getState().setPlaceAndPoint(d,{warehouseSelection:s})}catch{Re.getState().setDeliverPoint({address:null,coords:d})}},[r,s]);return w.jsx(qd,{disableDefaultUI:!0,mapId:o,defaultZoom:i==null?void 0:i.initialZoom,defaultCenter:a,className:K(Le.root,e),clickableIcons:!1,minZoom:4,maxZoom:20,restriction:{strictBounds:!0,latLngBounds:{north:85,south:-85,west:-179,east:179}},onClick:c,...n,children:t})},f6=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},N.createElement("rect",{width:2,height:20,x:9,fill:"#fff",rx:1}),N.createElement("rect",{width:2,height:20,x:20,y:9,fill:"#fff",rx:1,transform:"rotate(90 20 9)"}),N.createElement("circle",{cx:10,cy:10,r:8,fill:"#fff"}),N.createElement("circle",{cx:10,cy:10,r:6,fill:"currentcolor"}),N.createElement("circle",{cx:10,cy:10,r:4,fill:"#fff"})),h6=t=>{const e=document.createElement("div"),n=document.createElement("div");e.classList.add(Le.mapControl),n.classList.add(Le.mapControl),e.innerHTML="+",n.innerHTML="—",t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(n),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{const r=t.getZoom()||0;return t.setZoom(r+1)}),n.addEventListener("click",()=>{const r=t.getZoom()||0;return t.setZoom(r-1)})},p6=t=>{const e=document.createElement("div");e.classList.add(Le.mapControl),e.classList.add(Le.geolocationControl),e.innerHTML=Uh.renderToString(w.jsx(f6,{})),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{cc()})},m6=({className:t})=>{const e=un(),n=Z(Ap),r=Z(Dp),i=Pt(Ad),s=Re(ec),o=ji(),{lmsData:a}=mo(),{cityName:c,countryAbbreviation:l,disableGeolocation:u,hideDeliveryTime:d,hideDetails:f,hideMapControls:v,onPointClick:m,regionName:h,skipPointInfo:S}=be(),b=p.useCallback(V=>{console.debug("[OmnicLocationsWidget::loadMap]",V),Z.getState().setMap(V),Z.getState().setLoaded(),v||(h6(V),u||p6(V))},[u,v]),C=p.useCallback(()=>{console.debug("[OmnicLocationsWidget::unmountMap]"),Z.getState().setMap(null)},[]);p.useEffect(()=>{if(o)return b(o),()=>{C()}},[o,b,C]);const y=p.useCallback(V=>{const z=a==null?void 0:a.location.what3words,W=z!=null&&z.id?z:void 0;m==null||m(V,W)},[m,a]),E=p.useRef(null),x=p.useRef(null),g=p.useCallback(V=>{const z=V.getSouthWest(),W=V.getNorthEast(),ce=ne=>Math.round(ne*1e3)/1e3,le=`${ce(z.lat())}:${ce(z.lng())}:${ce(W.lat())}:${ce(W.lng())}`,ue=JSON.stringify(e??{});return`${le}|${ue}|${c??""}|${l??""}|${h??""}`},[c,l,e,h]),_=p.useCallback(()=>{Z.getState().setIdle(!0),n&&(E.current&&window.clearTimeout(E.current),E.current=window.setTimeout(()=>{const V=n.getBounds();if(!V)return;const z=g(V);x.current!==z&&(x.current=z,console.debug("[OmnicLocationsWidget::changeBounds]",V),Pt.getState().loadNext({bounds:[[V.getSouthWest().lat(),V.getNorthEast().lat()],[V.getSouthWest().lng(),V.getNorthEast().lng()]],filter:e,city_name:c,country_abbreviation:l,region_name:h}))},250))},[g,c,l,e,n,h]);p.useEffect(()=>()=>{E.current&&window.clearTimeout(E.current)},[]);const O=p.useCallback(async V=>{Re.getState().setDeliverPoint(null),it.getState().setSelectedLocation(V)},[]),P=p.useCallback(()=>{console.debug("[OmnicLocationsWidget::tilesLoaded]")},[]),R=Z.getState().setDetailsOpen,{getLMSData:L}=b4(),A=V=>{if(L(V.code),S){y(V);return}R(!1),O(V)},D=()=>{R(!1),O(null)},I=V=>{R(!0),O(V)},U=V=>{y(V),R(!1),O(null)};return w.jsxs(w.Fragment,{children:[w.jsxs("div",{className:K(Le.mapContainer,t),children:[w.jsxs(d6,{onIdle:_,onTilesLoaded:P,onBoundsChanged:()=>{Z.getState().setIdle(!1)},children:[s&&w.jsx(s6,{hideDeliveryTime:d,hideDetails:f,point:s,setOpenDetails:Z.getState().setDetailsOpen,setDeliveryPoint:Re.getState().setDeliverPoint,onPointClick:y}),w.jsx(R5,{handleCloseClick:D,handleDetailsClick:I,handlePointClick:A,handleSubmitClick:U})]}),(i||r)&&w.jsx(uh,{className:Le.overlay,children:w.jsx(qs,{})})]}),w.jsx(Ib,{handleDetailsClick:I,handlePointClick:A}),w.jsx(db,{handleCloseClick:D,handleSubmitClick:U})]})},g6=p.memo(m6),v6=t=>({google:g6})[t];function Rh(...t){return p.useCallback(e=>{for(const n of t)typeof n=="function"?n(e):n&&typeof n=="object"&&(n.current=e)},t)}const so=t=>{const e=p.useCallback(()=>{var n;(n=t==null?void 0:t.onClick)==null||n.call(t,t.name)},[t]);return{ref:t==null?void 0:t.ref,name:t==null?void 0:t.name,onClick:e}},y6=()=>{throw new Error("useMediaQuery is a client-only hook")};function b6(t){const e=p.useCallback(r=>{const i=window.matchMedia(t);return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[t]),n=()=>window.matchMedia(t).matches;return p.useSyncExternalStore(e,n,y6)}const w6="768px",S6="1024px",_6="1280px",C6="1536px",E6={screenSm:w6,screenMd:S6,screenLg:_6,screenXl:C6};function Nn(t){return b6(`(max-width: calc(${E6[t]} - 1px))`)}const Lh=mv().use(nv()).use(Wg()).init({defaultLanguage:"en",defaultNs:"common",ns:["common","courier_balloon","current_location","details_modal","header","location_aside","location_selector","receive_filter","send_filter","type_filter"],apiUrl:"https://tms.omnic.solutions",apiKey:"tgpak_gfpwentkga2g4zdngbzwozdinvztezlknu4xmnlpnbrgc"}),x6=t=>{p.useEffect(()=>{t&&(Lh.changeLanguage(t),$s.setLanguage(t))},[t])},O6=t=>{p.useEffect(()=>{if(t){const e=Object.keys(t);for(const n of e){const r=t[n];r&&Mi(`--owl-color-${n}`,r)}}},[t])},T6=t=>{p.useEffect(()=>{t&&t!==void 0&&Mi("--owl-button-radius",`${t}px`)},[t])},P6=t=>{p.useEffect(()=>{t&&t!==void 0&&Mi("--owl-font",t)},[t])},A6=500,Jn=[];function kh(t={}){const{country:e,debounceMs:n=A6,onPlaceSelect:r,types:i}=t,s=uc("places"),[o,a]=p.useState(""),[c,l]=p.useState(Jn),[u,d]=p.useState(!1),f=p.useMemo(()=>i,[JSON.stringify(i)]),v=p.useRef(null),m=p.useRef(),h=p.useRef(r);h.current=r;const S=p.useCallback(()=>s?(v.current||(v.current=new s.AutocompleteSessionToken),v.current):null,[s]),b=p.useCallback(()=>{v.current=null},[]),C=p.useCallback(()=>{l(Jn)},[]);p.useEffect(()=>{if(!s||!o.trim()){l(E=>E.length>0?Jn:E);return}return clearTimeout(m.current),m.current=setTimeout(async()=>{d(!0);try{const E=S(),x={input:o,...E&&{sessionToken:E},...e&&{includedRegionCodes:[e]},...(f==null?void 0:f.length)&&{includedPrimaryTypes:f}},{suggestions:g}=await s.AutocompleteSuggestion.fetchAutocompleteSuggestions(x),_=g.filter(O=>O.placePrediction!==null).map(O=>{var R,L;const P=O.placePrediction;return{placeId:P.placeId,mainText:((R=P.mainText)==null?void 0:R.text)??"",secondaryText:((L=P.secondaryText)==null?void 0:L.text)??"",description:P.text.text}});l(_.length>0?_:Jn)}catch(E){console.error("[usePlaceAutocomplete] Failed to fetch suggestions:",E),l(Jn)}finally{d(!1)}},n),()=>clearTimeout(m.current)},[o,s,e,f,n,S]);const y=p.useCallback(async E=>{var x;if(s)try{const g=new s.Place({id:E}),_=await Pd(g);(x=h.current)==null||x.call(h,_),b(),l(Jn)}catch(g){console.error("[usePlaceAutocomplete] Failed to fetch place details:",g)}},[s,b]);return p.useMemo(()=>({value:o,setValue:a,suggestions:c,isLoading:u,clearSuggestions:C,handleSelect:y}),[o,c,u,C,y])}const R6={open:!1},L6=t=>t.open,wn=Ht(t=>({...R6,toggle(e){t(n=>({open:e??!n.open}))}})),k6=t=>{const e=t==="selector";p.useEffect(()=>{e&&wn.getState().toggle(!0)},[e])},M6=t=>{p.useEffect(()=>{t==="sharp"&&Mi("--owl-radius","0")},[t])},D6=({children:t})=>{const{cornersVariant:e,font:n,locale:r,palette:i,radius:s,startScreen:o}=be();return P6(n),x6(r),O6(i),T6(s),k6(o),M6(e),w.jsx(w.Fragment,{children:t})},j6=({children:t})=>{const{disableGeolocation:e,map:n}=be(),[r,i]=p.useState(e),{loaded:s}=Z();return Ot(n==null?void 0:n.center,"Map center is required"),Ot(n==null?void 0:n.initialZoom,"Map initial zoom is required"),p.useEffect(()=>{!s||e||r||cc({success:o=>{n.center=[o.coords.latitude,o.coords.longitude],i(!0),it.getState().setIsTrackingEnabled(!0)},error:()=>{i(!0)}})},[e,r,s,n]),t},N6=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:28,fill:"none",viewBox:"0 0 24 28",...t},N.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M24 11.777C24 4.052 17.606 0 12 0S0 4.052 0 11.777C0 16.915 3.994 22.334 12 28c8.006-5.666 12-11.085 12-16.224ZM12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z",clipRule:"evenodd"})),I6=()=>{wn.getState().toggle(!0),Z.getState().setDetailsOpen(!1),Re.getState().setDeliverPoint(null),it.getState().setSelectedLocation(null)},F6="CurrentLocation-module__root__AeQCGT",B6="CurrentLocation-module__icon__459m9q",V6="CurrentLocation-module__text__w-9v28",Jo={root:F6,icon:B6,text:V6},Mh=({className:t})=>{const{t:e}=mt("current_location"),n=Bi(u6),{location:r}=it(),s=(r==null?void 0:r.location.full_address)??(n==null?void 0:n.long_name)??e("choose_from_map");return w.jsxs("div",{role:"presentation",className:K(Jo.root,t),onClick:I6,children:[w.jsx(N6,{className:Jo.icon}),w.jsx("span",{className:Jo.text,children:s})]})},H6=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:123,height:32,fill:"none",viewBox:"0 0 123 32",...t},N.createElement("path",{fill:"currentcolor",d:"M6.698 32a6.579 6.579 0 0 1-3.35-.889 6.718 6.718 0 0 1-2.443-2.4A6.285 6.285 0 0 1 0 25.422V6.578c0-1.215.302-2.311.905-3.29A6.718 6.718 0 0 1 3.35.889 6.579 6.579 0 0 1 6.698 0h19.188c1.207 0 2.308.296 3.304.889a6.72 6.72 0 0 1 2.444 2.4c.633.978.95 2.074.95 3.289v18.844a6.061 6.061 0 0 1-.95 3.29 6.72 6.72 0 0 1-2.444 2.4c-.996.592-2.097.888-3.304.888H6.698Zm.317-6.933h18.464V6.933H7.015v18.134ZM37.568 32V0h7.24l11.043 12.933L66.848 0h7.287v32h-7.06V10.533L55.85 23.69 44.582 10.578V32h-7.014Zm41.985 0V0h7.241l18.238 21.333V0h7.105v32h-7.241L86.568 10.578V32h-7.015Zm36.523 0V0H123v32h-6.924Z"})),U6=t=>N.createElement("svg",{width:119,height:44,viewBox:"0 0 119 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},N.createElement("path",{d:"M4.70489 0.199253H0V13.4418H10.7452V10.0105H4.70489V0.199253Z",fill:"black"}),N.createElement("path",{d:"M16.9359 0.199253H12.2287V13.4418H22.974V10.0105H16.9359V0.199253Z",fill:"black"}),N.createElement("path",{d:"M27.9807 0.199253L23.6569 13.4418H28.3442L28.9701 10.913H32.5644L33.1703 13.4418H37.9766L33.6354 0.199253H27.9807ZM29.6775 8.00558L30.7881 3.41028L31.879 8.00558H29.6775Z",fill:"black"}),N.createElement("path",{d:"M48.1266 6.0777L47.5404 8.54701H47.5008L46.9146 6.0777L45.3786 0.199253H38.7936V13.4418H42.9146V8.84631L42.8551 4.39405H42.9345L45.48 13.4418H49.2373L51.8222 4.39405H51.8817L51.8222 8.84631V13.4418H55.9233V0.199253H49.6626L48.1266 6.0777Z",fill:"black"}),N.createElement("path",{d:"M61.057 0.199253L56.7333 13.4418H61.4206L62.0465 10.913H65.6429L66.2489 13.4418H71.0552L66.7139 0.199253H61.057ZM62.7539 8.00558L63.8645 3.41028L64.9553 8.00558H62.7539Z",fill:"black"}),N.createElement("path",{d:"M85.656 6.77975C86.6916 6.6323 87.4541 6.28455 87.9389 5.73657C88.4238 5.18853 88.6662 4.51949 88.6662 3.72939C88.6662 2.55195 88.2562 1.67601 87.4344 1.1016C86.6145 0.513972 85.3607 0.212458 83.677 0.199253H76.0413V13.4418H84.2015C85.8301 13.4418 87.0354 13.1533 87.8177 12.5789C88.611 11.9913 89.0099 11.1132 89.0099 9.95118C89.0099 9.09505 88.7411 8.38636 88.2011 7.82518C87.6612 7.26393 86.8151 6.9228 85.656 6.80175V6.77975ZM80.5455 3.41028H82.6457C83.4545 3.41028 83.8577 3.7316 83.8577 4.37425C83.8577 5.01689 83.4545 5.33822 82.6457 5.33822H80.5455V3.41028ZM83.8797 10.1492C83.677 10.312 83.3685 10.3913 82.952 10.3913H80.5499V8.46561H82.952C83.3685 8.46561 83.6792 8.54701 83.8797 8.70549C84.0957 8.86619 84.2015 9.09945 84.2015 9.40754C84.2015 9.71567 84.0935 9.97757 83.8797 10.1492Z",fill:"black"}),N.createElement("path",{d:"M114.374 6.72035L118.616 0.199253H113.485L111.91 3.51152L110.354 0.199253H104.801L109.063 6.8414L104.638 13.4418H109.951L111.566 10.0105L113.325 13.4418H118.999L114.374 6.72035Z",fill:"black"}),N.createElement("path",{d:"M102.472 0.378544C102.053 0.125449 101.59 0 101.086 0H93.0312C92.5242 0 92.0549 0.127649 91.6252 0.378544C91.1931 0.631642 90.8517 0.972769 90.5982 1.40194C90.3448 1.8201 90.217 2.28667 90.217 2.80386V10.8369C90.217 11.3432 90.3448 11.8097 90.5982 12.2388C90.8517 12.6681 91.1931 13.0092 91.6252 13.2622C92.0549 13.5152 92.5242 13.6407 93.0312 13.6407H101.086C101.593 13.6407 102.053 13.513 102.472 13.2622C102.902 13.0092 103.245 12.6681 103.497 12.2388C103.763 11.8097 103.895 11.341 103.895 10.8369V2.80606C103.895 2.28667 103.761 1.8201 103.497 1.40414C103.243 0.974969 102.902 0.633842 102.472 0.380745V0.378544ZM100.116 9.89279H93.9611V3.75243H100.116V9.89279Z",fill:"black"}),N.createElement("path",{d:"M43.3879 27.3704C42.6166 26.8512 41.7372 26.4993 40.7478 26.3145L44.9726 21.5605H40.8226L36.1199 26.794V30.7935C37.0917 30.4415 37.9887 30.2655 38.8107 30.2655C39.5644 30.2655 40.2101 30.4085 40.7478 30.6923C41.6204 31.1455 42.0569 31.8319 42.0569 32.7559V32.8307C42.0569 33.1827 41.973 33.4269 41.8056 33.5611C41.6558 33.6953 41.3692 33.7635 40.9505 33.7635H32.8715C32.2345 33.7635 31.7983 33.6469 31.5625 33.4115C31.3444 33.1607 31.2363 32.6987 31.2363 32.0277V26.3431L27.0866 28.532V32.6569C27.0866 33.0925 27.0117 33.3873 26.8595 33.5369C26.7075 33.6887 26.4144 33.7635 25.9803 33.7635H23.7412C23.305 33.7635 23.0118 33.6887 22.8619 33.5369C22.7121 33.3851 22.6349 33.0925 22.6349 32.6569V26.8468L18.4852 29.0357V32.6591C18.4852 33.0947 18.4103 33.3895 18.2583 33.5391C18.1084 33.6909 17.8131 33.7657 17.379 33.7657H15.1664C14.73 33.7657 14.4369 33.6909 14.2871 33.5391C14.1372 33.3873 14.06 33.0947 14.06 32.6591V27.3506L9.91037 29.5395V35.9282C9.91037 37.6727 8.92967 38.5439 6.96835 38.5439C6.02952 38.5439 5.28242 38.2073 4.72931 37.5386C4.17615 36.8522 3.89848 35.9458 3.89848 34.8216C3.89848 33.6975 4.18276 32.5161 4.75355 31.4249L0.830824 32.2543C0.277676 33.2113 0 34.3091 0 35.5498C0 37.2944 0.50246 38.8033 1.50958 40.0771C2.801 41.7381 4.61911 42.5674 6.96835 42.5674C8.6454 42.5674 10.0779 42.1736 11.2701 41.3861C12.5946 40.5149 13.4497 39.2895 13.8353 37.7123C14.1372 37.7629 14.4568 37.7871 14.7917 37.7871H18.0114C19.0009 37.7365 19.8559 37.4858 20.5767 37.0326C21.3655 37.5364 22.2956 37.7871 23.3689 37.7871H26.5885C27.7125 37.7365 28.6513 37.4352 29.405 36.8808C30.3262 37.4836 31.4259 37.7871 32.6996 37.7871H41.3581C42.7157 37.7871 43.8309 37.4022 44.7036 36.63C45.7107 35.7566 46.2132 34.5334 46.2132 32.9561V32.7053C46.2132 30.3909 45.2745 28.6134 43.3967 27.3726L43.3879 27.3704Z",fill:"#6A4A9D"}),N.createElement("path",{d:"M66.0266 39.8246C65.4051 39.8246 64.9026 40.0094 64.517 40.3789C64.1313 40.7639 63.9397 41.2677 63.9397 41.8881C63.9397 42.5084 64.1335 43.0123 64.517 43.3973C64.9026 43.7998 65.4051 44 66.0266 44C66.648 44 67.1416 43.8064 67.5097 43.4215C67.8953 43.0365 68.0869 42.5238 68.0869 41.8881C68.0869 41.2523 67.8931 40.7639 67.5097 40.3789C67.1416 40.0094 66.6458 39.8246 66.0266 39.8246Z",fill:"#6A4A9D"}),N.createElement("path",{d:"M65.0208 32.6578C65.0208 33.0933 64.9459 33.3881 64.7938 33.5377C64.6418 33.6896 64.3487 33.7644 63.9124 33.7644H59.5733V30.6954C59.5733 29.3205 59.1788 28.2051 58.3922 27.3495C57.4864 26.3441 56.2038 25.8403 54.5444 25.8403C53.002 25.8403 51.752 26.3353 50.7956 27.3253C49.74 28.4165 49.2111 29.9079 49.2111 31.802C49.2111 33.1109 49.6143 34.2835 50.4187 35.3241C51.3751 36.5494 52.6666 37.2862 54.2932 37.5372C54.745 37.6032 55.124 37.6472 55.4259 37.6626C55.3599 37.997 55.124 38.283 54.7207 38.5182C54.3351 38.769 53.9076 38.8946 53.4382 38.8946C52.532 38.8946 51.5339 38.5754 50.4452 37.9398V41.5366C51.5691 42.2229 52.6841 42.5683 53.7908 42.5683C55.1835 42.5683 56.3979 42.1987 57.438 41.4619C58.6962 40.5731 59.3993 39.3478 59.5513 37.788H64.2936C65.6691 37.788 66.793 37.3942 67.6635 36.6044C68.6684 35.6981 69.173 34.4485 69.173 32.8558V26.3397L65.0235 28.5285V32.6534L65.0208 32.6578ZM55.4259 33.6896C55.3599 33.672 55.2674 33.6654 55.1484 33.6654C54.864 33.6147 54.6612 33.573 54.5444 33.5399C53.707 33.3221 53.2861 32.693 53.2861 31.6524C53.2861 30.3787 53.7048 29.7407 54.5444 29.7407C55.1306 29.7407 55.4237 30.0597 55.4237 30.6977V33.6918L55.4259 33.6896Z",fill:"#6A4A9D"}),N.createElement("path",{d:"M95.419 25.837C94.0615 25.837 92.9465 26.2221 92.0734 26.9942C91.0839 27.883 90.5903 29.1149 90.5903 30.6923V32.6547C90.5903 33.0903 90.5155 33.3851 90.3633 33.5347C90.2135 33.6865 89.9182 33.7613 89.4839 33.7613H85.3124C84.8761 33.7613 84.583 33.6865 84.431 33.5347C84.2811 33.3829 84.204 33.0903 84.204 32.6547V21.5605L80.0544 23.7495V32.8571C80.0544 34.2497 80.4489 35.3892 81.2357 36.278C82.1237 37.2834 83.3556 37.7871 84.9334 37.7871H89.8587C90.8305 37.7871 91.6943 37.5782 92.4507 37.158C93.2726 37.5782 94.3282 37.7871 95.6196 37.7871C97.0608 37.7871 98.2354 37.2922 99.1411 36.3022C100.181 35.1956 100.701 33.6953 100.701 31.7989C100.701 30.1731 100.292 28.8224 99.4694 27.7489C98.513 26.4751 97.1644 25.837 95.419 25.837ZM95.3948 33.7613C94.9584 33.7613 94.7403 33.5853 94.7403 33.2333V30.5427C94.7403 30.0059 94.9673 29.7375 95.419 29.7375C96.2234 29.7375 96.6267 30.3755 96.6267 31.6493C96.6267 33.0573 96.2168 33.7635 95.3948 33.7635V33.7613Z",fill:"#6A4A9D"}),N.createElement("path",{d:"M114.85 32.0277C114.85 32.6987 114.734 33.1607 114.498 33.4115C114.28 33.6469 113.852 33.7635 113.215 33.7635H112.31V24.8317L108.159 27.0448V33.7613H105.167L103.08 37.7871H113.392C115.036 37.7871 116.36 37.2921 117.365 36.3021C118.456 35.2462 119 33.8295 119 32.0497V21.5605L114.85 23.7737V32.0277Z",fill:"#6A4A9D"})),$6="Header-module__root__Pe4MYp",z6="Header-module__nav__wtnkmT",q6="Header-module__navItem__-Fy63Z",G6="Header-module__logo__xO2bWO",ei={root:$6,nav:z6,navItem:q6,logo:G6},W6={llama:U6,default:H6},Z6=()=>{const{hideLogo:t,logo:e="default"}=be();if(t)return null;const n=W6[e];return w.jsx("div",{className:ei.logo,children:w.jsx(n,{})})},K6=({className:t})=>{const{t:e}=mt("header"),{disableDelivery:n}=be(),r=Z(Rp),i=Re(ec);p.useEffect(()=>{i?Z.getState().setMode("location_delivery"):Z.getState().setMode("self_pickup")},[i]);const s=()=>{Re.getState().setDeliverPoint(null),Z.getState().setMode("self_pickup")},o=()=>{Re.getState().setDeliverPoint(null),Z.getState().setMode("location_delivery")},a=r==="self_pickup",c=r==="location_delivery";return w.jsxs("div",{className:K(ei.root,t),children:[w.jsx(Z6,{}),w.jsxs("nav",{className:ei.nav,children:[!n&&w.jsx(rt,{as:"link",className:ei.navItem,variant:a?"primary":"secondary",onClick:s,children:e("self_pickup")}),!n&&w.jsx(rt,{as:"link",className:ei.navItem,variant:c?"primary":"secondary",onClick:o,children:e("courier_delivery")}),w.jsx(Mh,{})]})]})},Q6=p.memo(K6),J6={open:!1},Tr=Ht(t=>({...J6,toggle(e){Z.getState().setDetailsOpen(!1),Re.getState().setDeliverPoint(null),it.getState().setSelectedLocation(null),t(n=>({open:e??!n.open}))}})),X6="Layout-module__root__qzPL-f",Y6="Layout-module__headerHidden__JEN-d0",ew="Layout-module__sidebarHidden__x017O3",tw="Layout-module__sidebarOpen__IZnIjs",Es={root:X6,headerHidden:Y6,sidebarHidden:ew,sidebarOpen:tw},nw=({children:t})=>{const{hideFilters:e,hideHeader:n}=be(),r=Tr(i=>i.open);return w.jsx("div",{className:K(Es.root,{[Es.sidebarOpen]:r,[Es.headerHidden]:n,[Es.sidebarHidden]:e}),children:t})},rw=({children:t})=>{const e=Pt(fm);return Pt(Ad)&&!e?w.jsx(Ac,{}):w.jsx(w.Fragment,{children:t})},iw="Aside-module__root__EotK2f",sw="Aside-module__open__Zwmbs5",ow="Aside-module__overlay__slLdHF",aw="Aside-module__container__28P4wq",xs={root:iw,open:sw,overlay:ow,container:aw},cw=({children:t,className:e,open:n})=>w.jsxs("div",{className:K(xs.root,e,{[xs.open]:n}),children:[w.jsx("div",{className:xs.overlay}),w.jsx("div",{className:xs.container,children:t})]}),lw="Input-module__locationSearchRoot__svh-f9",uw="Input-module__endAdornment__m40K5R",dw="Input-module__input__505b7i",fw="Input-module__startAdornment__D-sJ0N",hw="Input-module__locationSearchInput__2YK1MG",pw="Input-module__label__gmqtsf",mw="Input-module__inputContainer__vubIa-",Xn={locationSearchRoot:lw,endAdornment:uw,input:dw,startAdornment:fw,locationSearchInput:hw,label:pw,inputContainer:mw},gw=p.forwardRef(({className:t,endAdornment:e,inputRef:n,label:r,onBlur:i,onChange:s,startAdornment:o,...a},c)=>{const l=p.useId(),u=p.useRef(null);p.useImperativeHandle(c,()=>({focus:()=>{var f;(f=u.current)==null||f.focus()},blur:()=>{var f;(f=u.current)==null||f.blur()},setValue:f=>{if(s){s({target:{value:f}});return}if(i){i({target:{value:f}});return}u.current&&(u.current.value=f)}}),[i,s]);const d=Rh(n,u);return w.jsxs("label",{htmlFor:a.id??l,className:K(Xn.locationSearchRoot,t),children:[r&&w.jsx("span",{className:Xn.label,children:r}),w.jsxs("div",{className:Xn.inputContainer,children:[o&&w.jsx("div",{className:Xn.startAdornment,children:o}),w.jsx("input",{...a,ref:d,id:a.id??l,className:Xn.locationSearchInput,onChange:s,onBlur:i}),e&&w.jsx("div",{className:Xn.endAdornment,children:e})]})]})}),vw="PlaceAutocomplete-module__container__fdiqiO",yw="PlaceAutocomplete-module__dropdown__u-0PdK",bw="PlaceAutocomplete-module__item__zHJqmC",ww="PlaceAutocomplete-module__itemMain__-skwdB",Sw="PlaceAutocomplete-module__itemSecondary__sD5QDK",_w="PlaceAutocomplete-module__itemArrow__CtQ5GG",er={container:vw,dropdown:yw,item:bw,itemMain:ww,itemSecondary:Sw,itemArrow:_w},Cw=({onSelect:t,suggestions:e})=>w.jsx("div",{className:er.dropdown,role:"listbox",children:e.map(n=>w.jsxs("div",{className:er.item,role:"option","aria-selected":!1,onClick:()=>t(n),onKeyDown:r=>{r.key==="Enter"&&t(n)},children:[w.jsx("span",{className:er.itemMain,children:n.mainText}),n.secondaryText&&w.jsx("span",{className:er.itemSecondary,children:n.secondaryText}),w.jsx(_c,{className:er.itemArrow})]},n.placeId))}),Dh=({autocomplete:t,className:e,endAdornment:n,inputRef:r,label:i,name:s,onBlur:o,onClick:a,onFocus:c,placeholder:l})=>{const u=p.useRef(null),d=t.suggestions.length>0,f=p.useRef(t.clearSuggestions);f.current=t.clearSuggestions,p.useEffect(()=>{if(!d)return;const h=S=>{u.current&&!u.current.contains(S.target)&&f.current()};return document.addEventListener("click",h),()=>document.removeEventListener("click",h)},[d]);const v=h=>{t.setValue(h.target.value)},m=h=>{t.setValue(h.description),t.handleSelect(h.placeId)};return w.jsxs("div",{ref:u,className:K(er.container,e),children:[w.jsx(gw,{inputRef:r,label:i,name:s,value:t.value,placeholder:l,endAdornment:n,onChange:v,onClick:a,onFocus:c,onBlur:o}),d&&w.jsx(Cw,{suggestions:t.suggestions,onSelect:m})]})},Ew="LocationAside-module__submit__CSKcqi",xw="LocationAside-module__container__S1NejR",Ow="LocationAside-module__selector__hl74ke",Tw="LocationAside-module__label__0Zk8at",Pw="LocationAside-module__header__N1wgyn",Aw="LocationAside-module__close__VsE88z",Os={submit:Ew,container:xw,selector:Ow,label:Tw,header:Pw,close:Aw},Rw=p.forwardRef((t,e)=>{const{t:n}=mt(["location_aside","common"]),r=wn(L6),{country:i,hideCloseButtonOnLocationScreen:s,inputs:o,onCloseLocationSelector:a,onLocationSelect:c}=be(),l=p.useRef(null);p.useImperativeHandle(e,()=>({open:()=>wn.getState().toggle(!0),close:()=>wn.getState().toggle(!1)}),[]);const u=p.useCallback(m=>{wn.getState().toggle(!1),Bi.getState().setPlaceSimple(m,{withNavigation:!0}),c==null||c(m)},[c]),d=kh({country:i,onPlaceSelect:u}),f=()=>{wn.getState().toggle(!1),a==null||a()},v=so(o==null?void 0:o.city);return w.jsx(cw,{open:r,children:w.jsx("div",{ref:l,className:Os.container,children:w.jsxs("div",{className:Os.selector,children:[w.jsxs("div",{className:Os.header,children:[w.jsx("div",{className:Os.label,children:n("choose_city")}),!s&&w.jsx(Ar,{position:"relative",onClick:f})]}),w.jsx(Dh,{autocomplete:d,inputRef:v.ref,name:v.name,placeholder:n("placeholder"),onClick:v.onClick})]})})})}),Lw=p.memo(Rw),kw=({children:t})=>{const{locale:e}=be(),{mapKey:n}=Rc(),r=p.useRef(e);return w.jsx(Vm,{apiKey:n,language:r.current,libraries:ep,children:t})},Mw=({children:t})=>{const{disableGoogleInit:e}=be(),{mapKey:n}=Rc(),{setMapKey:r}=Bi();return p.useEffect(()=>{r(n)},[n,r]),e?w.jsx(w.Fragment,{children:t}):w.jsx(kw,{children:t})},Dw=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},N.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M14.617 16.032a9 9 0 1 1 1.414-1.414l3.676 3.675a1 1 0 0 1-1.414 1.414l-3.676-3.675ZM2 9a7 7 0 1 1 12.04 4.858 1.005 1.005 0 0 0-.182.182A7 7 0 0 1 2 9Z",clipRule:"evenodd"})),jw=({className:t})=>{const{t:e}=mt("location_selector"),{country:n,inputs:r,onLocationSelect:i}=be(),s=p.useCallback(u=>{Bi.getState().setPlaceSimple(u,{withNavigation:!0}),i==null||i(u)},[i]),o=kh({country:n,types:[],onPlaceSelect:s}),a=()=>{o.value&&Z.getState().setBlurred(!0),Z.getState().setDetailsOpen(!1),Re.getState().setDeliverPoint(null),it.getState().setSelectedLocation(null)},c=()=>{Z.getState().setBlurred(!1)},l=so(r==null?void 0:r.address);return w.jsx(Dh,{autocomplete:o,className:t,endAdornment:w.jsx(Dw,{}),inputRef:l.ref,name:l.name,placeholder:e("placeholder"),onBlur:c,onClick:l.onClick,onFocus:a})},Nw=({className:t})=>Z(Mp)?w.jsx(jw,{className:t}):null,Iw=p.memo(Nw),Fw="DeliveryDetailsModal-module__root__qwKnjX",Bw={root:Fw},Vw=({className:t,location:e,onClose:n,onSubmit:r})=>w.jsx("div",{className:K(Bw.root,t),children:w.jsx(Ph,{location:e,onClose:n,onSubmit:r})}),Hw="LocationDetailsModal-module__root__PyRnLM",Uw={root:Hw},$w=({className:t,location:e,onClose:n,onSubmit:r})=>{const i=()=>{r==null||r(e)};return w.jsx("div",{className:K(Uw.root,t),children:w.jsx(uf,{location:e,onClose:n,onSubmit:i})})},zw="MapContainer-module__root__1Os6Q-",qw="MapContainer-module__mapWrapper__Cwe7qC",Gw="MapContainer-module__wrapperBlurred__04NN2L",Ww="MapContainer-module__locationSelector__Pr1zS-",Zw="MapContainer-module__filterButton__CW3Qv7",Kw="MapContainer-module__sidebarOpen__lGMVrJ",Qw="MapContainer-module__filterIcon__T01XsJ",Jw="MapContainer-module__details__gM8LWX",xt={root:zw,mapWrapper:qw,wrapperBlurred:Gw,locationSelector:Ww,filterButton:Zw,sidebarOpen:Kw,filterIcon:Qw,details:Jw},Xw=()=>{const{onPointClick:t}=be(),e=Z(tc),n=it(Np),r=Re(ec),i=p.useCallback(()=>{Z.getState().setDetailsOpen(!1)},[]),s=p.useCallback(o=>{t==null||t(o),Z.getState().setDetailsOpen(!1),it.getState().setSelectedLocation(null),Re.getState().setDeliverPoint(null)},[t]);return w.jsxs(w.Fragment,{children:[(r==null?void 0:r.address)&&e&&w.jsx(Vw,{location:r,className:xt.details,onClose:i,onSubmit:s}),n&&e&&w.jsx($w,{location:n,className:xt.details,onClose:i,onSubmit:s})]})},Yw=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:60,height:40,fill:"none",viewBox:"0 0 60 40",...t},N.createElement("path",{d:"M0 0h52a8 8 0 0 1 8 8v24a8 8 0 0 1-8 8H0V0Z"}),N.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,strokeWidth:1.5,d:"M32.093 10h13.814c1.151 0 2.093.91 2.093 2.02v2.223c0 .808-.523 1.818-1.047 2.324l-4.5 3.839c-.627.505-1.046 1.515-1.046 2.323v4.344c0 .607-.419 1.415-.942 1.718L39 29.7c-1.36.808-3.244-.101-3.244-1.717v-5.355c0-.707-.419-1.616-.837-2.121l-3.977-4.041c-.523-.506-.942-1.415-.942-2.02V12.12c0-1.21.942-2.12 2.093-2.12Z"})),e8=t=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:28,height:28,fill:"none",viewBox:"0 0 28 28",...t},N.createElement("rect",{width:28,height:28,fill:"#333",rx:4}),N.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,d:"M9.165 7h9.67c.806 0 1.465.636 1.465 1.414V9.97c0 .566-.366 1.273-.733 1.627l-3.15 2.687c-.44.353-.732 1.06-.732 1.627v3.04c0 .425-.293.99-.66 1.203L14 20.79c-.952.566-2.271-.07-2.271-1.202V15.84c0-.495-.293-1.132-.586-1.485l-2.784-2.83c-.366-.353-.659-.99-.659-1.413V8.485C7.7 7.636 8.36 7 9.165 7Z"})),t8=()=>{const t=Tr(i=>i.open),e=Tr(i=>i.toggle),n=Nn("screenSm"),r=()=>{e(!0)};return w.jsxs("div",{role:"presentation",className:K(xt.filterButton,{[xt.sidebarOpen]:t}),onClick:n?void 0:r,children:[n&&w.jsx(Mh,{}),n?w.jsx(e8,{className:xt.filterIcon,onClick:r}):w.jsx(Yw,{className:xt.filterIcon})]})},n8=({children:t,className:e})=>{const{hideFilters:n,hideSearchInput:r}=be(),i=Z(kp),s=Z(tc);return w.jsxs("div",{className:K(xt.root,e),children:[!r&&!s&&w.jsx(Iw,{className:xt.locationSelector}),!n&&w.jsx(t8,{}),w.jsx("div",{className:K(xt.mapWrapper,{[xt.wrapperBlurred]:i}),children:t}),w.jsx(Xw,{})]})},r8=p.memo(n8),i8="Separator-module__root__eQtZey",s8={root:i8},Xo=({className:t,...e})=>w.jsx("hr",{className:K(s8.root,t),...e}),o8="Sidebar-module__root__4j1MA3",a8="Sidebar-module__closeButton__HLXy1c",c8="Sidebar-module__open__mqQXF6",l8="Sidebar-module__header__Afp6uz",u8="Sidebar-module__typeFilter__GN46u9",d8="Sidebar-module__separator__6I4QoJ",f8="Sidebar-module__withRightPadding__2u1Ina",h8="Sidebar-module__sheetContent__SaoncI",p8="Sidebar-module__doneButton__4aeaSD",Ft={root:o8,closeButton:a8,open:c8,header:l8,typeFilter:u8,separator:d8,withRightPadding:f8,sheetContent:h8,doneButton:p8},m8=()=>{const{t}=mt("common"),e=Nn("screenSm"),n=Tr(i=>i.toggle),r=()=>{n(!1)};return w.jsxs("div",{className:Ft.header,children:[e&&w.jsx("div",{role:"presentation",className:Ft.doneButton,onClick:r,children:t("done")}),!e&&w.jsx(Ar,{className:Ft.closeButton,onClick:r})]})},g8="Radio-module__root__7ElY2W",v8="Radio-module__label__c-sYW3",ju={root:g8,label:v8},y8=({className:t,label:e,labelProps:n={},...r})=>{const i=p.useId(),{className:s,...o}=n;return w.jsxs("label",{htmlFor:i,className:K(ju.label,s),...o,children:[w.jsx("input",{id:i,type:"radio",className:K(ju.root,t),...r}),e]})},cr=t=>w.jsx(y8,{...t,type:"checkbox"}),b8="RadioGroup-module__root__ewZw-x",w8="RadioGroup-module__body__k8BJAs",S8="RadioGroup-module__legend__tcfV7q",Yo={root:b8,body:w8,legend:S8},jh=({children:t,className:e,label:n,onChange:r,value:i,...s})=>w.jsxs("div",{className:K(Yo.root,e),...s,children:[n&&w.jsx("span",{className:Yo.legend,children:n}),w.jsx("div",{className:Yo.body,children:p.Children.map(t,o=>p.isValidElement(o)?p.cloneElement(o,{checked:!!(i!=null&&i[o.props.value]),onChange:a=>r==null?void 0:r({...i,[a.target.value]:a.target.checked})}):null)})]}),_8=({className:t,onChange:e})=>{const{t:n}=mt("receive_filter"),r=un(Vp);return w.jsxs(jh,{value:r,label:n("title"),className:t,onChange:e,children:[w.jsx(cr,{name:"receive",value:ht.DressingRoom,label:n("dressing_room")}),w.jsx(cr,{name:"receive",value:ht.CheckOrder,label:n("check_order")}),w.jsx(cr,{name:"receive",value:ht.PayByCash,label:n("pay_by_cash")})]})},C8=p.memo(_8),E8=({className:t,onChange:e})=>{const{t:n}=mt("send_filter"),r=un(Bp);return w.jsxs(jh,{className:t,value:r,label:n("title"),onChange:e,children:[w.jsx(cr,{name:"send",value:pt.Return,label:n("sending_returns")}),w.jsx(cr,{name:"send",value:pt.Shipping,label:n("shipping")}),w.jsx(cr,{name:"send",value:pt.Payment,label:n("payment")})]})},x8=p.memo(E8),O8="TypeFilter-module__root__WH5EQV",T8="TypeFilter-module__button__f0mSfo",Ts={root:O8,button:T8},P8=({className:t,onChange:e,value:n})=>{const{t:r}=mt("type_filter"),i=s=>()=>e==null?void 0:e(s);return w.jsxs("div",{className:K(Ts.root,t),children:[w.jsx(rt,{className:Ts.button,variant:n===Nt.All?"primary":"secondary",onClick:i(Nt.All),children:r("all")}),w.jsx(rt,{className:Ts.button,variant:n===Nt.PostOffice?"primary":"secondary",onClick:i(Nt.PostOffice),children:r("post_office")}),w.jsx(rt,{className:Ts.button,variant:n===Nt.PickPoint?"primary":"secondary",onClick:i(Nt.PickPoint),children:r("pick_point")})]})},A8=({className:t,onChange:e})=>{const n=un(Fp);return w.jsx(P8,{value:n,className:t,onChange:e})},R8=p.memo(A8),L8=({className:t})=>{const e=Nn("screenSm"),n=Tr(c=>c.open),r=p.useCallback(c=>un.getState().setFilter({type:c}),[]),i=p.useCallback(c=>un.getState().setFilter({send:c}),[]),s=p.useCallback(c=>un.getState().setFilter({receive:c}),[]),o=p.useCallback(()=>Tr.getState().toggle(!1),[]),a=w.jsxs(w.Fragment,{children:[w.jsx(m8,{}),w.jsxs("div",{className:Ft.withRightPadding,children:[w.jsx(R8,{className:Ft.typeFilter,onChange:r}),w.jsx(Xo,{className:Ft.separator}),w.jsx(C8,{onChange:s}),w.jsx(Xo,{}),w.jsx(x8,{onChange:i}),w.jsx(Xo,{})]})]});return e?w.jsx(ah,{initialFocusRef:!1,open:n,snapPoints:({maxHeight:c})=>c-ch,onDismiss:o,children:w.jsx("div",{className:Ft.sheetContent,children:a})}):w.jsx("div",{className:K(Ft.root,t,{[Ft.open]:n}),children:a})},k8="App-module__map__Kf-2JS",M8="App-module__sidebar__ORIzGk",D8="App-module__header__bgP9DA",ea={map:k8,sidebar:M8,header:D8},j8=new Yb,Nh=({config:t,options:e})=>{const n=Tm(t),{INN:r,cityName:i,countryAbbreviation:s,hideFilters:o,hideHeader:a,map:c,regionName:l}=n;Ot(r,"INN is required"),Pm(r,e),Ot(c==null?void 0:c.provider,"Map provider is required");const u=v6(c.provider);return hm({cityName:i,countryAbbreviation:s,regionName:l}),w.jsx(qh,{baseColor:"#f3f3f3",highlightColor:"#ecebeb",children:w.jsx(i4,{client:j8,children:w.jsx(Ju.Provider,{value:n,children:w.jsx(c6,{children:w.jsx(j6,{children:w.jsx(D6,{children:w.jsx(vv,{tolgee:Lh,fallback:w.jsx(Ac,{}),children:w.jsx(Mw,{children:w.jsx(rw,{children:w.jsxs(nw,{children:[!a&&w.jsx(Q6,{className:ea.header}),!o&&w.jsx(L8,{className:ea.sidebar}),w.jsx(r8,{className:ea.map,children:w.jsx(u,{})}),w.jsx(Lw,{})]})})})})})})})})})})},Ih=async t=>hi.request({baseURL:"https://api.geo-data.omnic.solutions/api/1.0/",method:"POST",url:"normalize/address",data:t,headers:{Authorization:"Token 9877f9631b2e30570cc1c5aa8c740b0c912efe99a8b6c45c21cf4bd394adc7e9"}}),Fh=p.createContext(null),N8=(t,e)=>({...t,...e,palette:{...t.palette,...e==null?void 0:e.palette},inputs:e!=null&&e.inputs?{...t.inputs,...e.inputs}:t.inputs,handlers:e!=null&&e.handlers?{...t.handlers,...e.handlers}:t.handlers}),I8=({children:t})=>{const[e,n]=p.useState(),[r,i]=p.useState(),s=p.useRef(null),o=p.useRef(null),a=p.useRef(!1),c=p.useCallback(u=>{if(a.current){console.warn("Widget already launched");return}a.current=!0,n(u)},[]),l=p.useMemo(()=>({widgetOutHolderRef:s,widgetLocationsRef:o,launchWidget:c,setDynamicConfig:i}),[c]);return w.jsxs(Fh.Provider,{value:l,children:[w.jsx("div",{ref:s,style:{position:"fixed",left:"-9999px",top:"-9999px"},children:w.jsx("div",{ref:o,id:"@omnic/widget-locations",style:{height:"100%",width:"100%"},children:e&&w.jsx(Nh,{options:e.options,config:N8(e.config,r)})})}),t]})};function Bh(){const t=p.useContext(Fh);if(!t)throw new Error("Please use hook useWidgetLocationsContext inside WidgetLocationsProvider");return t}const Nu=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;const e=Object.getPrototypeOf(t);return e===Object.prototype||e===null},Ya=(t,e,n=new WeakMap)=>{if(Object.is(t,e))return!0;if(!t||!e||typeof t!="object"&&typeof t!="function"||typeof e!="object"&&typeof e!="function")return!1;const r=t,i=e,s=n.get(r);if(s!=null&&s.has(i))return!0;if(s?s.add(i):n.set(r,new WeakSet([i])),Array.isArray(t)&&Array.isArray(e))return t.length!==e.length?!1:t.every((o,a)=>Ya(o,e[a],n));if(Nu(t)&&Nu(e)){const o=Object.keys(t),a=Object.keys(e);return o.length!==a.length?!1:o.every(c=>Ya(t[c],e[c],n))}return!1},F8=t=>{const{setDynamicConfig:e,widgetLocationsRef:n,widgetOutHolderRef:r}=Bh(),i=p.useRef(null),s=p.useRef(null);return p.useEffect(()=>{!t||Ya(s.current,t)||(s.current=t,e(t))},[t,e]),p.useEffect(()=>{const o=r.current,a=n.current,c=i.current;return a&&c&&c.appendChild(a),()=>{a&&o&&o.appendChild(a)}},[n,r]),w.jsx("div",{ref:i,style:{width:"100%",height:"100%"}})};exports.EReceiveFilter=ht;exports.ESendFilter=pt;exports.ETypeFilter=Nt;exports.MapPlaceholder=F8;exports.Widget=Nh;exports.WidgetLocationsProvider=I8;exports.createPointsIterator=ca;exports.fetchPointsRequest=aa;exports.fromHoursMinutesToMinutes=Hp;exports.fromMinutesToHoursMinutes=Up;exports.getAddressFormGeocode=ua;exports.getBoundsFromPoint=$p;exports.getCurrentPosition=cc;exports.getNormalizedAddress=Ih;exports.getPropertyValue=Td;exports.isCoordinates=la;exports.isDeliveryPoint=lm;exports.isHttpSuccess=Od;exports.isPlaceId=xd;exports.placeToPlaceResult=Pd;exports.replaceSvgCurrentColor=rr;exports.setWidgetCSSProperty=Mi;exports.useWidgetLocationsContext=Bh;
@@ -15675,7 +15675,7 @@ function Zn(t) {
15675
15675
  return R6(`(max-width: calc(${I6[t]} - 1px))`);
15676
15676
  }
15677
15677
  const $h = Tv().use(pv()).use(ov()).init({
15678
- language: "en",
15678
+ defaultLanguage: "en",
15679
15679
  defaultNs: "common",
15680
15680
  ns: [
15681
15681
  "common",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omnic/widget-locations",
3
- "version": "1.1.77",
3
+ "version": "1.1.78",
4
4
  "description": "Simple map widget for Omnic Delivery applications",
5
5
  "files": [
6
6
  "@types",
@@ -74,5 +74,5 @@
74
74
  "lerna": "8.1.2",
75
75
  "sass": "1.72.0"
76
76
  },
77
- "gitHead": "57fd33ac0c66a147f87b9d680d8b3c0e94fd4e28"
77
+ "gitHead": "dad601b3feef6b00814b783568c6c1f820b62ab7"
78
78
  }